@danidoble/webserial 4.0.1 → 4.0.3

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/dist/webserial.js CHANGED
@@ -3,7 +3,7 @@ var Me = (f) => {
3
3
  throw TypeError(f);
4
4
  };
5
5
  var _n = (f, r, t) => r in f ? pn(f, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : f[r] = t;
6
- var B = (f, r, t) => _n(f, typeof r != "symbol" ? r + "" : r, t), be = (f, r, t) => r.has(f) || Me("Cannot " + t);
6
+ var A = (f, r, t) => _n(f, typeof r != "symbol" ? r + "" : r, t), be = (f, r, t) => r.has(f) || Me("Cannot " + t);
7
7
  var y = (f, r, t) => (be(f, r, "read from private field"), t ? t.call(f) : r.get(f)), S = (f, r, t) => r.has(f) ? Me("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(f) : r.set(f, t), x = (f, r, t, e) => (be(f, r, "write to private field"), e ? e.call(f, t) : r.set(f, t), t), i = (f, r, t) => (be(f, r, "access private method"), t);
8
8
  var M = [];
9
9
  for (var ye = 0; ye < 256; ++ye)
@@ -11,11 +11,11 @@ for (var ye = 0; ye < 256; ++ye)
11
11
  function fn(f, r = 0) {
12
12
  return (M[f[r + 0]] + M[f[r + 1]] + M[f[r + 2]] + M[f[r + 3]] + "-" + M[f[r + 4]] + M[f[r + 5]] + "-" + M[f[r + 6]] + M[f[r + 7]] + "-" + M[f[r + 8]] + M[f[r + 9]] + "-" + M[f[r + 10]] + M[f[r + 11]] + M[f[r + 12]] + M[f[r + 13]] + M[f[r + 14]] + M[f[r + 15]]).toLowerCase();
13
13
  }
14
- var ne, bn = new Uint8Array(16);
14
+ var te, bn = new Uint8Array(16);
15
15
  function yn() {
16
- if (!ne && (ne = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ne))
16
+ if (!te && (te = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !te))
17
17
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
18
- return ne(bn);
18
+ return te(bn);
19
19
  }
20
20
  var wn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
21
21
  const Fe = {
@@ -31,16 +31,16 @@ function kn(f, r, t) {
31
31
  class Pe extends EventTarget {
32
32
  constructor() {
33
33
  super(...arguments);
34
- B(this, "__listeners__", {});
34
+ A(this, "__listeners__", {});
35
35
  }
36
36
  dispatch(t, e = null) {
37
37
  const n = new vn(t, { detail: e });
38
38
  this.dispatchEvent(n);
39
39
  }
40
40
  dispatchAsync(t, e = null, n = 100) {
41
- const s = this;
41
+ const a = this;
42
42
  setTimeout(() => {
43
- s.dispatch(t, e);
43
+ a.dispatch(t, e);
44
44
  }, n);
45
45
  }
46
46
  on(t, e) {
@@ -64,7 +64,7 @@ class vn extends CustomEvent {
64
64
  super(r, t);
65
65
  }
66
66
  }
67
- function $(f = 100) {
67
+ function W(f = 100) {
68
68
  return new Promise((r) => setTimeout(() => r(), f));
69
69
  }
70
70
  function Ne() {
@@ -73,18 +73,18 @@ function Ne() {
73
73
  function we(f = 1) {
74
74
  return f * 1e3;
75
75
  }
76
- var H, L, o, Ae, Be, _, ke, C, m, ie, p, ve, K;
77
- const a = class a {
76
+ var q, H, o, Ae, Be, _, ke, C, m, ne, p, ve, Y;
77
+ const s = class s {
78
78
  static status(r = null) {
79
79
  var e, n;
80
- if (!i(e = a, o, _).call(e, r)) return !1;
80
+ if (!i(e = s, o, _).call(e, r)) return !1;
81
81
  let t = [];
82
- switch (y(a, H)) {
82
+ switch (y(s, q)) {
83
83
  case "locker":
84
84
  t = ["0", "8"];
85
85
  break;
86
86
  case "boardroid":
87
- t = ["2", (5 + y(a, L)).toString(16).toUpperCase()];
87
+ t = ["2", (5 + y(s, H)).toString(16).toUpperCase()];
88
88
  break;
89
89
  case "jofemar":
90
90
  t = ["6"];
@@ -92,13 +92,13 @@ const a = class a {
92
92
  default:
93
93
  return !1;
94
94
  }
95
- i(n = a, o, p).call(n, t);
95
+ i(n = s, o, p).call(n, t);
96
96
  }
97
97
  static dispensed(r = null) {
98
98
  var e, n;
99
- if (!i(e = a, o, _).call(e, r)) return !1;
99
+ if (!i(e = s, o, _).call(e, r)) return !1;
100
100
  let t = [];
101
- switch (y(a, H)) {
101
+ switch (y(s, q)) {
102
102
  case "locker":
103
103
  t = ["0", "7", "4", "4", "4"];
104
104
  break;
@@ -111,13 +111,13 @@ const a = class a {
111
111
  default:
112
112
  return !1;
113
113
  }
114
- i(n = a, o, p).call(n, t);
114
+ i(n = s, o, p).call(n, t);
115
115
  }
116
116
  static notDispensed(r = null) {
117
117
  var e, n;
118
- if (!i(e = a, o, _).call(e, r)) return !1;
118
+ if (!i(e = s, o, _).call(e, r)) return !1;
119
119
  let t = [];
120
- switch (y(a, H)) {
120
+ switch (y(s, q)) {
121
121
  case "locker":
122
122
  t = ["0", "7", "5", "5", "5"];
123
123
  break;
@@ -130,30 +130,30 @@ const a = class a {
130
130
  default:
131
131
  return !1;
132
132
  }
133
- i(n = a, o, p).call(n, t);
133
+ i(n = s, o, p).call(n, t);
134
134
  }
135
135
  static gateInactive(r = null) {
136
136
  var t;
137
- if (!i(t = a, o, _).call(t, r) || !i(this, o, ke).call(this)) return !1;
137
+ if (!i(t = s, o, _).call(t, r) || !i(this, o, ke).call(this)) return !1;
138
138
  i(this, o, p).call(this, ["0", "7", "5", "5", "5"]);
139
139
  }
140
140
  static gateConfigured(r = null) {
141
141
  var t;
142
- if (!i(t = a, o, _).call(t, r) || !i(this, o, ke).call(this)) return !1;
142
+ if (!i(t = s, o, _).call(t, r) || !i(this, o, ke).call(this)) return !1;
143
143
  i(this, o, p).call(this, ["0", "6"]);
144
144
  }
145
145
  static keyPressed(r = null) {
146
- var s, c, u;
147
- if (!i(s = a, o, _).call(s, r) || !i(c = a, o, m).call(c)) return !1;
148
- const t = ["30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "2A", "23", "41", "42", "43", "44"], e = (128 + y(a, L)).toString(16), n = Math.floor(Math.random() * 15);
149
- i(u = a, o, p).call(u, ["2", e, "54", t[n]]);
146
+ var a, c, u;
147
+ if (!i(a = s, o, _).call(a, r) || !i(c = s, o, m).call(c)) return !1;
148
+ const t = ["30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "2A", "23", "41", "42", "43", "44"], e = (128 + y(s, H)).toString(16), n = Math.floor(Math.random() * 15);
149
+ i(u = s, o, p).call(u, ["2", e, "54", t[n]]);
150
150
  }
151
151
  static doorOpened(r = null) {
152
- var n, s;
153
- if (!i(n = a, o, _).call(n, r) || !i(this, o, ie).call(this)) return !1;
152
+ var n, a;
153
+ if (!i(n = s, o, _).call(n, r) || !i(this, o, ne).call(this)) return !1;
154
154
  let t = [];
155
- const e = (128 + y(a, L)).toString(16);
156
- switch (y(a, H)) {
155
+ const e = (128 + y(s, H)).toString(16);
156
+ switch (y(s, q)) {
157
157
  case "boardroid":
158
158
  t = ["2", "D8", "dc"];
159
159
  break;
@@ -161,14 +161,14 @@ const a = class a {
161
161
  t = ["2", e, "50", "4F"];
162
162
  break;
163
163
  }
164
- i(s = a, o, p).call(s, t);
164
+ i(a = s, o, p).call(a, t);
165
165
  }
166
166
  static doorClosed(r = null) {
167
- var n, s;
168
- if (!i(n = a, o, _).call(n, r) || !i(this, o, ie).call(this)) return !1;
167
+ var n, a;
168
+ if (!i(n = s, o, _).call(n, r) || !i(this, o, ne).call(this)) return !1;
169
169
  let t = [];
170
- const e = (128 + y(a, L)).toString(16);
171
- switch (y(a, H)) {
170
+ const e = (128 + y(s, H)).toString(16);
171
+ switch (y(s, q)) {
172
172
  case "boardroid":
173
173
  t = ["2", "D8", "db"];
174
174
  break;
@@ -176,38 +176,38 @@ const a = class a {
176
176
  t = ["2", e, "50", "43"];
177
177
  break;
178
178
  }
179
- i(s = a, o, p).call(s, t);
179
+ i(a = s, o, p).call(a, t);
180
180
  }
181
181
  static channelDisconnected(r = null) {
182
- var e, n, s;
183
- if (!i(e = a, o, _).call(e, r) || !i(n = a, o, m).call(n)) return !1;
184
- const t = (128 + y(a, L)).toString(16);
185
- i(s = a, o, p).call(s, ["2", t, "43", "43", "43", "FD"]);
182
+ var e, n, a;
183
+ if (!i(e = s, o, _).call(e, r) || !i(n = s, o, m).call(n)) return !1;
184
+ const t = (128 + y(s, H)).toString(16);
185
+ i(a = s, o, p).call(a, ["2", t, "43", "43", "43", "FD"]);
186
186
  }
187
187
  static channelConnected(r = null) {
188
- var e, n, s;
189
- if (!i(e = a, o, _).call(e, r) || !i(n = a, o, m).call(n)) return !1;
190
- const t = (128 + y(a, L)).toString(16);
191
- i(s = a, o, p).call(s, ["2", t, "43", "43", "43", "FC"]);
188
+ var e, n, a;
189
+ if (!i(e = s, o, _).call(e, r) || !i(n = s, o, m).call(n)) return !1;
190
+ const t = (128 + y(s, H)).toString(16);
191
+ i(a = s, o, p).call(a, ["2", t, "43", "43", "43", "FC"]);
192
192
  }
193
193
  static channelEmpty(r = null) {
194
- var e, n, s;
195
- if (!i(e = a, o, _).call(e, r) || !i(n = a, o, m).call(n)) return !1;
196
- const t = (128 + y(a, L)).toString(16);
197
- i(s = a, o, p).call(s, ["2", t, "43", "43", "43", "FF"]);
194
+ var e, n, a;
195
+ if (!i(e = s, o, _).call(e, r) || !i(n = s, o, m).call(n)) return !1;
196
+ const t = (128 + y(s, H)).toString(16);
197
+ i(a = s, o, p).call(a, ["2", t, "43", "43", "43", "FF"]);
198
198
  }
199
199
  static workingTemperature(r = null) {
200
- var e, n, s;
201
- if (!i(e = a, o, _).call(e, r) || !i(n = a, o, m).call(n)) return !1;
202
- const t = (128 + y(a, L)).toString(16);
203
- i(s = a, o, p).call(s, ["2", t, "43", "54", "16"]);
200
+ var e, n, a;
201
+ if (!i(e = s, o, _).call(e, r) || !i(n = s, o, m).call(n)) return !1;
202
+ const t = (128 + y(s, H)).toString(16);
203
+ i(a = s, o, p).call(a, ["2", t, "43", "54", "16"]);
204
204
  }
205
205
  static currentTemperature(r = null) {
206
- var n, s, c;
207
- if (!i(n = a, o, _).call(n, r) || !i(s = a, o, ie).call(s)) return !1;
206
+ var n, a, c;
207
+ if (!i(n = s, o, _).call(n, r) || !i(a = s, o, ne).call(a)) return !1;
208
208
  let t = [];
209
- const e = (128 + y(a, L)).toString(16);
210
- switch (y(a, H)) {
209
+ const e = (128 + y(s, H)).toString(16);
210
+ switch (y(s, q)) {
211
211
  case "boardroid":
212
212
  t = ["2", "D9", "44", "30"];
213
213
  break;
@@ -215,218 +215,218 @@ const a = class a {
215
215
  t = ["2", e, "43", "74", "2B", "30", "39", "2E", "31", "7F", "43"];
216
216
  break;
217
217
  }
218
- i(c = a, o, p).call(c, t);
218
+ i(c = s, o, p).call(c, t);
219
219
  }
220
220
  static ready(r = null) {
221
221
  var t, e, n;
222
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
223
- i(n = a, o, p).call(n, ["6", "30"]);
222
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
223
+ i(n = s, o, p).call(n, ["6", "30"]);
224
224
  }
225
225
  static busy(r = null) {
226
226
  var t, e, n;
227
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
228
- i(n = a, o, p).call(n, ["6", "31"]);
227
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
228
+ i(n = s, o, p).call(n, ["6", "31"]);
229
229
  }
230
230
  static invalidTray(r = null) {
231
231
  var t, e, n;
232
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
233
- i(n = a, o, p).call(n, ["6", "32"]);
232
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
233
+ i(n = s, o, p).call(n, ["6", "32"]);
234
234
  }
235
235
  static invalidChannel(r = null) {
236
236
  var t, e, n;
237
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
238
- i(n = a, o, p).call(n, ["6", "33"]);
237
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
238
+ i(n = s, o, p).call(n, ["6", "33"]);
239
239
  }
240
240
  static emptyChannel(r = null) {
241
241
  var t, e, n;
242
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
243
- i(n = a, o, p).call(n, ["6", "34"]);
242
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
243
+ i(n = s, o, p).call(n, ["6", "34"]);
244
244
  }
245
245
  static elevatorJam(r = null) {
246
246
  var t, e, n;
247
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
248
- i(n = a, o, p).call(n, ["6", "35"]);
247
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
248
+ i(n = s, o, p).call(n, ["6", "35"]);
249
249
  }
250
250
  static elevatorMalfunction(r = null) {
251
251
  var t, e, n;
252
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
253
- i(n = a, o, p).call(n, ["6", "36"]);
252
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
253
+ i(n = s, o, p).call(n, ["6", "36"]);
254
254
  }
255
255
  static phototransistorFailure(r = null) {
256
256
  var t, e, n;
257
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
258
- i(n = a, o, p).call(n, ["6", "37"]);
257
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
258
+ i(n = s, o, p).call(n, ["6", "37"]);
259
259
  }
260
260
  static allChannelsEmpty(r = null) {
261
261
  var t, e, n;
262
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
263
- i(n = a, o, p).call(n, ["6", "38"]);
262
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
263
+ i(n = s, o, p).call(n, ["6", "38"]);
264
264
  }
265
265
  static productDetectorFailure(r = null) {
266
266
  var t, e, n;
267
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
268
- i(n = a, o, p).call(n, ["6", "39"]);
267
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
268
+ i(n = s, o, p).call(n, ["6", "39"]);
269
269
  }
270
270
  static displayDisconnected(r = null) {
271
271
  var t, e, n;
272
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
273
- i(n = a, o, p).call(n, ["6", "41"]);
272
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
273
+ i(n = s, o, p).call(n, ["6", "41"]);
274
274
  }
275
275
  static productUnderElevator(r = null) {
276
276
  var t, e, n;
277
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
278
- i(n = a, o, p).call(n, ["6", "42"]);
277
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
278
+ i(n = s, o, p).call(n, ["6", "42"]);
279
279
  }
280
280
  static elevatorSettingAlarm(r = null) {
281
281
  var t, e, n;
282
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
283
- i(n = a, o, p).call(n, ["6", "43"]);
282
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
283
+ i(n = s, o, p).call(n, ["6", "43"]);
284
284
  }
285
285
  static buttonPanelFailure(r = null) {
286
286
  var t, e, n;
287
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
288
- i(n = a, o, p).call(n, ["6", "44"]);
287
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
288
+ i(n = s, o, p).call(n, ["6", "44"]);
289
289
  }
290
290
  static errorWritingEeprom(r = null) {
291
291
  var t, e, n;
292
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
293
- i(n = a, o, p).call(n, ["6", "45"]);
292
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
293
+ i(n = s, o, p).call(n, ["6", "45"]);
294
294
  }
295
295
  static errorControlTemperature(r = null) {
296
296
  var t, e, n;
297
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
298
- i(n = a, o, p).call(n, ["6", "46"]);
297
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
298
+ i(n = s, o, p).call(n, ["6", "46"]);
299
299
  }
300
300
  static thermometerDisconnected(r = null) {
301
301
  var t, e, n;
302
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
303
- i(n = a, o, p).call(n, ["6", "47"]);
302
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
303
+ i(n = s, o, p).call(n, ["6", "47"]);
304
304
  }
305
305
  static thermometerMisconfigured(r = null) {
306
306
  var t, e, n;
307
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
308
- i(n = a, o, p).call(n, ["6", "48"]);
307
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
308
+ i(n = s, o, p).call(n, ["6", "48"]);
309
309
  }
310
310
  static thermometerFailure(r = null) {
311
311
  var t, e, n;
312
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
313
- i(n = a, o, p).call(n, ["6", "49"]);
312
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
313
+ i(n = s, o, p).call(n, ["6", "49"]);
314
314
  }
315
315
  static errorExtractorConsumption(r = null) {
316
316
  var t, e, n;
317
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
318
- i(n = a, o, p).call(n, ["6", "4A"]);
317
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
318
+ i(n = s, o, p).call(n, ["6", "4A"]);
319
319
  }
320
320
  static channelSearchError(r = null) {
321
321
  var t, e, n;
322
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
323
- i(n = a, o, p).call(n, ["6", "4B"]);
322
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
323
+ i(n = s, o, p).call(n, ["6", "4B"]);
324
324
  }
325
325
  static productExitMouthSearchError(r = null) {
326
326
  var t, e, n;
327
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
328
- i(n = a, o, p).call(n, ["6", "4C"]);
327
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
328
+ i(n = s, o, p).call(n, ["6", "4C"]);
329
329
  }
330
330
  static elevatorInteriorLocked(r = null) {
331
331
  var t, e, n;
332
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
333
- i(n = a, o, p).call(n, ["6", "4D"]);
332
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
333
+ i(n = s, o, p).call(n, ["6", "4D"]);
334
334
  }
335
335
  static productDetectorVerifierError(r = null) {
336
336
  var t, e, n;
337
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
338
- i(n = a, o, p).call(n, ["6", "4E"]);
337
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
338
+ i(n = s, o, p).call(n, ["6", "4E"]);
339
339
  }
340
340
  static waitingForProductRecall(r = null) {
341
341
  var t, e, n;
342
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
343
- i(n = a, o, p).call(n, ["6", "4F"]);
342
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
343
+ i(n = s, o, p).call(n, ["6", "4F"]);
344
344
  }
345
345
  static productExpiredByTemperature(r = null) {
346
346
  var t, e, n;
347
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
348
- i(n = a, o, p).call(n, ["6", "50"]);
347
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
348
+ i(n = s, o, p).call(n, ["6", "50"]);
349
349
  }
350
350
  static faultyAutomaticDoor(r = null) {
351
351
  var t, e, n;
352
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
353
- i(n = a, o, p).call(n, ["6", "51"]);
352
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
353
+ i(n = s, o, p).call(n, ["6", "51"]);
354
354
  }
355
355
  static rejectLever(r = null) {
356
356
  var t, e, n;
357
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
358
- i(n = a, o, p).call(n, ["2", "A0", "1"]);
357
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
358
+ i(n = s, o, p).call(n, ["2", "A0", "1"]);
359
359
  }
360
360
  static resetCoinPurse(r = null) {
361
361
  var t, e, n;
362
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
363
- i(n = a, o, p).call(n, ["2", "A0", "2"]);
362
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
363
+ i(n = s, o, p).call(n, ["2", "A0", "2"]);
364
364
  }
365
365
  static coinInsertedBox(r = null, t = null) {
366
- var s, c, u, d;
367
- if (!i(s = a, o, _).call(s, r) || !i(c = a, o, C).call(c)) return !1;
368
- const e = ["40", "41", "42", "43", "44", "45"], n = i(u = a, o, ve).call(u, e, t);
369
- i(d = a, o, p).call(d, ["2", "A0", n]);
366
+ var a, c, u, h;
367
+ if (!i(a = s, o, _).call(a, r) || !i(c = s, o, C).call(c)) return !1;
368
+ const e = ["40", "41", "42", "43", "44", "45"], n = i(u = s, o, ve).call(u, e, t);
369
+ i(h = s, o, p).call(h, ["2", "A0", n]);
370
370
  }
371
371
  static coinInsertedTube(r = null, t = null) {
372
- var s, c, u, d;
373
- if (!i(s = a, o, _).call(s, r) || !i(c = a, o, C).call(c)) return !1;
374
- const e = ["50", "51", "52", "53", "54", "55"], n = i(u = a, o, ve).call(u, e, t);
375
- i(d = a, o, p).call(d, ["2", "A0", n]);
372
+ var a, c, u, h;
373
+ if (!i(a = s, o, _).call(a, r) || !i(c = s, o, C).call(c)) return !1;
374
+ const e = ["50", "51", "52", "53", "54", "55"], n = i(u = s, o, ve).call(u, e, t);
375
+ i(h = s, o, p).call(h, ["2", "A0", n]);
376
376
  }
377
377
  static banknoteInsertedStacker(r = null, t = null) {
378
- var s, c, u, d;
379
- if (!i(s = a, o, _).call(s, r) || !i(c = a, o, C).call(c)) return !1;
380
- const e = ["80", "81", "82", "83", "84"], n = i(u = a, o, K).call(u, e, t);
381
- i(d = a, o, p).call(d, ["2", "B0", n]);
378
+ var a, c, u, h;
379
+ if (!i(a = s, o, _).call(a, r) || !i(c = s, o, C).call(c)) return !1;
380
+ const e = ["80", "81", "82", "83", "84"], n = i(u = s, o, Y).call(u, e, t);
381
+ i(h = s, o, p).call(h, ["2", "B0", n]);
382
382
  }
383
383
  static banknoteInsertedEscrow(r = null, t = null) {
384
- var s, c, u, d;
385
- if (!i(s = a, o, _).call(s, r) || !i(c = a, o, C).call(c)) return !1;
386
- const e = ["90", "91", "92", "93", "94"], n = i(u = a, o, K).call(u, e, t);
387
- i(d = a, o, p).call(d, ["2", "B0", n]);
384
+ var a, c, u, h;
385
+ if (!i(a = s, o, _).call(a, r) || !i(c = s, o, C).call(c)) return !1;
386
+ const e = ["90", "91", "92", "93", "94"], n = i(u = s, o, Y).call(u, e, t);
387
+ i(h = s, o, p).call(h, ["2", "B0", n]);
388
388
  }
389
389
  static banknoteEjected(r = null, t = null) {
390
- var s, c, u, d;
391
- if (!i(s = a, o, _).call(s, r) || !i(c = a, o, C).call(c)) return !1;
392
- const e = ["A0", "A1", "A2", "A3", "A4"], n = i(u = a, o, K).call(u, e, t);
393
- i(d = a, o, p).call(d, ["2", "B0", n]);
390
+ var a, c, u, h;
391
+ if (!i(a = s, o, _).call(a, r) || !i(c = s, o, C).call(c)) return !1;
392
+ const e = ["A0", "A1", "A2", "A3", "A4"], n = i(u = s, o, Y).call(u, e, t);
393
+ i(h = s, o, p).call(h, ["2", "B0", n]);
394
394
  }
395
395
  static banknoteInsertedRecycler(r = null, t = null) {
396
- var s, c, u, d;
397
- if (!i(s = a, o, _).call(s, r) || !i(c = a, o, C).call(c)) return !1;
398
- const e = ["B0", "B1", "B2", "B3", "B4"], n = i(u = a, o, K).call(u, e, t);
399
- i(d = a, o, p).call(d, ["2", "B0", n]);
396
+ var a, c, u, h;
397
+ if (!i(a = s, o, _).call(a, r) || !i(c = s, o, C).call(c)) return !1;
398
+ const e = ["B0", "B1", "B2", "B3", "B4"], n = i(u = s, o, Y).call(u, e, t);
399
+ i(h = s, o, p).call(h, ["2", "B0", n]);
400
400
  }
401
401
  static banknoteTaken(r = null) {
402
402
  var t, e, n;
403
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
404
- i(n = a, o, p).call(n, ["2", "B0", "2a"]);
403
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
404
+ i(n = s, o, p).call(n, ["2", "B0", "2a"]);
405
405
  }
406
406
  static coinPurseEnabled(r = null) {
407
407
  var t, e, n;
408
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
409
- i(n = a, o, p).call(n, ["2", "D0", "1"]);
408
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
409
+ i(n = s, o, p).call(n, ["2", "D0", "1"]);
410
410
  }
411
411
  static coinPurseDisabled(r = null) {
412
412
  var t, e, n;
413
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
414
- i(n = a, o, p).call(n, ["2", "D0", "0"]);
413
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
414
+ i(n = s, o, p).call(n, ["2", "D0", "0"]);
415
415
  }
416
416
  static billPurseDisabled(r = null) {
417
417
  var t, e, n;
418
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
419
- i(n = a, o, p).call(n, ["2", "D1", "0", "0"]);
418
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
419
+ i(n = s, o, p).call(n, ["2", "D1", "0", "0"]);
420
420
  }
421
421
  static billPurseEnabled(r = null) {
422
422
  var t, e, n;
423
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
424
- i(n = a, o, p).call(n, ["2", "D1", "1", "1"]);
423
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
424
+ i(n = s, o, p).call(n, ["2", "D1", "1", "1"]);
425
425
  }
426
426
  static readTubes(r = null) {
427
427
  var b, g, T;
428
- if (!i(b = a, o, _).call(b, r) || !i(g = a, o, C).call(g)) return !1;
429
- const t = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f"], [e, n, s, c, u, d] = [
428
+ if (!i(b = s, o, _).call(b, r) || !i(g = s, o, C).call(g)) return !1;
429
+ const t = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f"], [e, n, a, c, u, h] = [
430
430
  t[Math.floor(Math.random() * 30)],
431
431
  t[Math.floor(Math.random() * 30)],
432
432
  t[Math.floor(Math.random() * 30)],
@@ -434,54 +434,54 @@ const a = class a {
434
434
  t[Math.floor(Math.random() * 30)],
435
435
  t[Math.floor(Math.random() * 30)]
436
436
  ];
437
- i(T = a, o, p).call(T, ["2", "D2", e, n, s, c, u, d]);
437
+ i(T = s, o, p).call(T, ["2", "D2", e, n, a, c, u, h]);
438
438
  }
439
439
  static readBillPurse(r = null, t = null) {
440
- var n, s, c, u;
441
- if (!i(n = a, o, _).call(n, r) || !i(s = a, o, C).call(s)) return !1;
440
+ var n, a, c, u;
441
+ if (!i(n = s, o, _).call(n, r) || !i(a = s, o, C).call(a)) return !1;
442
442
  let e = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c"];
443
443
  if (r._recycler.ict) {
444
- const d = e[Math.floor(Math.random() * 31)];
445
- let b = "0", g = "0", T = "0", I = "0", j = "0";
444
+ const h = e[Math.floor(Math.random() * 31)];
445
+ let b = "0", g = "0", T = "0", I = "0", U = "0";
446
446
  if (t !== null && !isNaN(parseInt(t)))
447
447
  switch (t.toString()) {
448
448
  case "20":
449
- b = d;
449
+ b = h;
450
450
  break;
451
451
  case "50":
452
- g = d;
452
+ g = h;
453
453
  break;
454
454
  case "100":
455
- T = d;
455
+ T = h;
456
456
  break;
457
457
  case "200":
458
- I = d;
458
+ I = h;
459
459
  break;
460
460
  case "500":
461
- j = d;
461
+ U = h;
462
462
  break;
463
463
  }
464
464
  else
465
465
  switch (r._recycler.bill) {
466
466
  case 0:
467
- b = d;
467
+ b = h;
468
468
  break;
469
469
  case 1:
470
- g = d;
470
+ g = h;
471
471
  break;
472
472
  case 2:
473
- T = d;
473
+ T = h;
474
474
  break;
475
475
  case 3:
476
- I = d;
476
+ I = h;
477
477
  break;
478
478
  case 4:
479
- j = d;
479
+ U = h;
480
480
  break;
481
481
  }
482
- i(c = a, o, p).call(c, ["2", "D3", b, g, T, I, j, "0"]);
482
+ i(c = s, o, p).call(c, ["2", "D3", b, g, T, I, U, "0"]);
483
483
  } else {
484
- const [d, b, g, T, I, j] = [
484
+ const [h, b, g, T, I, U] = [
485
485
  e[Math.floor(Math.random() * 30)],
486
486
  e[Math.floor(Math.random() * 30)],
487
487
  e[Math.floor(Math.random() * 30)],
@@ -489,29 +489,29 @@ const a = class a {
489
489
  e[Math.floor(Math.random())],
490
490
  e[Math.floor(Math.random())]
491
491
  ];
492
- i(u = a, o, p).call(u, ["2", "D3", d, b, g, T, I, j]);
492
+ i(u = s, o, p).call(u, ["2", "D3", h, b, g, T, I, U]);
493
493
  }
494
494
  }
495
495
  static banknoteAccepted(r = null) {
496
496
  var t, e, n;
497
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
498
- i(n = a, o, p).call(n, ["2", "D4", "1"]);
497
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
498
+ i(n = s, o, p).call(n, ["2", "D4", "1"]);
499
499
  }
500
500
  static banknoteRejected(r = null) {
501
501
  var t, e, n;
502
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
503
- i(n = a, o, p).call(n, ["2", "D4", "0"]);
502
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
503
+ i(n = s, o, p).call(n, ["2", "D4", "0"]);
504
504
  }
505
505
  static banknotesDispensed(r = null) {
506
- var e, n, s, c;
507
- if (!i(e = a, o, _).call(e, r) || !i(n = a, o, C).call(n)) return !1;
506
+ var e, n, a, c;
507
+ if (!i(e = s, o, _).call(e, r) || !i(n = s, o, C).call(n)) return !1;
508
508
  let t = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c"];
509
509
  if (r._recycler.ict) {
510
510
  const u = t[Math.floor(Math.random() * 30)];
511
- let d = "0", b = "0", g = "0", T = "0", I = "0";
511
+ let h = "0", b = "0", g = "0", T = "0", I = "0";
512
512
  switch (r._recycler.bill) {
513
513
  case 0:
514
- d = u;
514
+ h = u;
515
515
  break;
516
516
  case 1:
517
517
  b = u;
@@ -526,9 +526,9 @@ const a = class a {
526
526
  I = u;
527
527
  break;
528
528
  }
529
- i(s = a, o, p).call(s, ["2", "D5", d, b, g, T, I, "0"]);
529
+ i(a = s, o, p).call(a, ["2", "D5", h, b, g, T, I, "0"]);
530
530
  } else {
531
- const [u, d, b, g, T, I] = [
531
+ const [u, h, b, g, T, I] = [
532
532
  t[Math.floor(Math.random() * 30)],
533
533
  t[Math.floor(Math.random() * 30)],
534
534
  t[Math.floor(Math.random() * 30)],
@@ -536,108 +536,108 @@ const a = class a {
536
536
  t[Math.floor(Math.random())],
537
537
  t[Math.floor(Math.random())]
538
538
  ];
539
- i(c = a, o, p).call(c, ["2", "D5", u, d, b, g, T, I]);
539
+ i(c = s, o, p).call(c, ["2", "D5", u, h, b, g, T, I]);
540
540
  }
541
541
  }
542
542
  static coinsDispensed(r = null) {
543
543
  var t, e, n;
544
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
545
- i(n = a, o, p).call(n, ["2", "D6"]);
544
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
545
+ i(n = s, o, p).call(n, ["2", "D6"]);
546
546
  }
547
547
  static relayOn(r = null) {
548
548
  var t, e, n;
549
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
550
- i(n = a, o, p).call(n, ["2", "DA", "1"]);
549
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
550
+ i(n = s, o, p).call(n, ["2", "DA", "1"]);
551
551
  }
552
552
  static relayOff(r = null) {
553
553
  var t, e, n;
554
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
555
- i(n = a, o, p).call(n, ["2", "DA", "0"]);
554
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
555
+ i(n = s, o, p).call(n, ["2", "DA", "0"]);
556
556
  }
557
557
  static nayaxEnabled(r = null) {
558
558
  var t, e, n;
559
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
560
- i(n = a, o, p).call(n, ["2", "DD", "1"]);
559
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
560
+ i(n = s, o, p).call(n, ["2", "DD", "1"]);
561
561
  }
562
562
  static nayaxDisabled(r = null) {
563
563
  var t, e, n;
564
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
565
- i(n = a, o, p).call(n, ["2", "DD", "0"]);
564
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
565
+ i(n = s, o, p).call(n, ["2", "DD", "0"]);
566
566
  }
567
567
  static nayaxPreCreditAuthorized(r = null) {
568
568
  var t, e, n;
569
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
570
- i(n = a, o, p).call(n, ["2", "DD", "3"]);
569
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
570
+ i(n = s, o, p).call(n, ["2", "DD", "3"]);
571
571
  }
572
572
  static nayaxCancelRequest(r = null) {
573
573
  var t, e, n;
574
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
575
- i(n = a, o, p).call(n, ["2", "DD", "4"]);
574
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
575
+ i(n = s, o, p).call(n, ["2", "DD", "4"]);
576
576
  }
577
577
  static nayaxSellApproved(r = null) {
578
578
  var t, e, n;
579
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
580
- i(n = a, o, p).call(n, ["2", "DD", "5"]);
579
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
580
+ i(n = s, o, p).call(n, ["2", "DD", "5"]);
581
581
  }
582
582
  static nayaxSellDenied(r = null) {
583
583
  var t, e, n;
584
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
585
- i(n = a, o, p).call(n, ["2", "DD", "6"]);
584
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
585
+ i(n = s, o, p).call(n, ["2", "DD", "6"]);
586
586
  }
587
587
  static nayaxEndSession(r = null) {
588
588
  var t, e, n;
589
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
590
- i(n = a, o, p).call(n, ["2", "DD", "7"]);
589
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
590
+ i(n = s, o, p).call(n, ["2", "DD", "7"]);
591
591
  }
592
592
  static nayaxCancelled(r = null) {
593
593
  var t, e, n;
594
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
595
- i(n = a, o, p).call(n, ["2", "DD", "8"]);
594
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
595
+ i(n = s, o, p).call(n, ["2", "DD", "8"]);
596
596
  }
597
597
  static nayaxDispensed(r = null) {
598
598
  var t, e, n;
599
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
600
- i(n = a, o, p).call(n, ["2", "DD", "A", "0"]);
599
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
600
+ i(n = s, o, p).call(n, ["2", "DD", "A", "0"]);
601
601
  }
602
602
  static nayaxNotDispensed(r = null) {
603
603
  var t, e, n;
604
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, C).call(e)) return !1;
605
- i(n = a, o, p).call(n, ["2", "DD", "A", "1"]);
604
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, C).call(e)) return !1;
605
+ i(n = s, o, p).call(n, ["2", "DD", "A", "1"]);
606
606
  }
607
607
  static fullTray(r = null) {
608
608
  var t, e, n;
609
- if (!i(t = a, o, _).call(t, r) || !i(e = a, o, m).call(e)) return !1;
610
- i(n = a, o, p).call(n, ["6", "4F"]);
609
+ if (!i(t = s, o, _).call(t, r) || !i(e = s, o, m).call(e)) return !1;
610
+ i(n = s, o, p).call(n, ["6", "4F"]);
611
611
  }
612
612
  static setConnection(r = null) {
613
613
  var t;
614
- if (!i(t = a, o, _).call(t, r)) return !1;
614
+ if (!i(t = s, o, _).call(t, r)) return !1;
615
615
  r.__internal__.serial.connected = !0;
616
616
  }
617
617
  };
618
- H = new WeakMap(), L = new WeakMap(), o = new WeakSet(), Ae = function() {
619
- if (a.enable === !1) throw new Error("Emulator is disabled");
620
- return a.enable;
618
+ q = new WeakMap(), H = new WeakMap(), o = new WeakSet(), Ae = function() {
619
+ if (s.enable === !1) throw new Error("Emulator is disabled");
620
+ return s.enable;
621
621
  }, Be = function(r) {
622
- if (typeof r != "object" || !(r instanceof Y)) throw new Error(`Type ${r.typeDevice} is not supported`);
623
- return a.instance = r, x(a, H, r.typeDevice), x(a, L, r.deviceNumber), !0;
622
+ if (typeof r != "object" || !(r instanceof G)) throw new Error(`Type ${r.typeDevice} is not supported`);
623
+ return s.instance = r, x(s, q, r.typeDevice), x(s, H, r.deviceNumber), !0;
624
624
  }, _ = function(r = null) {
625
625
  var t, e;
626
- return !i(t = a, o, Ae).call(t) || r === null && a.instance === null ? !1 : (a.instance === null && i(e = a, o, Be).call(e, r), !0);
626
+ return !i(t = s, o, Ae).call(t) || r === null && s.instance === null ? !1 : (s.instance === null && i(e = s, o, Be).call(e, r), !0);
627
627
  }, ke = function() {
628
- if (y(a, H) !== "locker") throw new Error("This function is only available for Locker devices");
628
+ if (y(s, q) !== "locker") throw new Error("This function is only available for Locker devices");
629
629
  return !0;
630
630
  }, C = function() {
631
- if (y(a, H) !== "boardroid") throw new Error("This function is only available for Boardroid devices");
631
+ if (y(s, q) !== "boardroid") throw new Error("This function is only available for Boardroid devices");
632
632
  return !0;
633
633
  }, m = function() {
634
- if (y(a, H) !== "jofemar") throw new Error("This function is only available for Jofemar devices");
634
+ if (y(s, q) !== "jofemar") throw new Error("This function is only available for Jofemar devices");
635
635
  return !0;
636
- }, ie = function() {
637
- if (y(a, H) === "locker") throw new Error("This function is not available for Locker devices");
636
+ }, ne = function() {
637
+ if (y(s, q) === "locker") throw new Error("This function is not available for Locker devices");
638
638
  return !0;
639
639
  }, p = function(r) {
640
- a.instance.__emulate({ code: r });
640
+ s.instance.__emulate({ code: r });
641
641
  }, ve = function(r, t = null) {
642
642
  let e = r[Math.floor(Math.random() * 5)];
643
643
  if (t !== null && !isNaN(parseFloat(t)))
@@ -659,7 +659,7 @@ H = new WeakMap(), L = new WeakMap(), o = new WeakSet(), Ae = function() {
659
659
  break;
660
660
  }
661
661
  return e;
662
- }, K = function(r, t = null) {
662
+ }, Y = function(r, t = null) {
663
663
  let e = r[Math.floor(Math.random() * 4)];
664
664
  if (t !== null && !isNaN(parseFloat(t)))
665
665
  switch (t.toString()) {
@@ -680,8 +680,8 @@ H = new WeakMap(), L = new WeakMap(), o = new WeakSet(), Ae = function() {
680
680
  break;
681
681
  }
682
682
  return e;
683
- }, S(a, o), B(a, "enable", !1), B(a, "instance", null), S(a, H, null), S(a, L, 1);
684
- let pe = a;
683
+ }, S(s, o), A(s, "enable", !1), A(s, "instance", null), S(s, q, null), S(s, H, 1);
684
+ let pe = s;
685
685
  const k = class k extends Pe {
686
686
  static typeError(r) {
687
687
  const t = new Error();
@@ -739,7 +739,7 @@ const k = class k extends Pe {
739
739
  return typeof k.devices[r] > "u" ? k.typeError(r) : Object.values(k.devices[r]).find((n) => n.deviceNumber === t) ?? null;
740
740
  }
741
741
  };
742
- B(k, "instance", null), B(k, "devices", {
742
+ A(k, "instance", null), A(k, "devices", {
743
743
  relay: [],
744
744
  locker: [],
745
745
  jofemar: [],
@@ -748,8 +748,8 @@ B(k, "instance", null), B(k, "devices", {
748
748
  });
749
749
  let D = k;
750
750
  D.instance || (D.instance = new D());
751
- var w, Re, me, Q, qe, He, Le, Oe, Ue, je, We, $e, Qe, Ve, Je, ze;
752
- class Y extends Pe {
751
+ var w, Re, me, $, qe, He, Le, Oe, Ue, je, We, $e, Qe, Ve, Je, ze;
752
+ class G extends Pe {
753
753
  /**
754
754
  *
755
755
  * @param {null|array} filters
@@ -761,11 +761,11 @@ class Y extends Pe {
761
761
  filters: t = null,
762
762
  config_port: e = null,
763
763
  no_device: n = 1,
764
- device_listen_on_port: s = 1
764
+ device_listen_on_port: a = 1
765
765
  } = {}) {
766
766
  super();
767
767
  S(this, w);
768
- B(this, "__internal__", {
768
+ A(this, "__internal__", {
769
769
  device_number: 1,
770
770
  aux_port_connector: 0,
771
771
  last_error: { message: null, action: null, code: null, no_code: 0 },
@@ -822,7 +822,7 @@ class Y extends Pe {
822
822
  backup_dispense: {}
823
823
  }
824
824
  });
825
- t && (this.serialFilters = t), e && (this.serialConfigPort = e), n && i(this, w, Je).call(this, n), s && (typeof s == "number" || typeof s == "string") && (this.listenOnPort = s), i(this, w, We).call(this), i(this, w, $e).call(this);
825
+ t && (this.serialFilters = t), e && (this.serialConfigPort = e), n && i(this, w, Je).call(this, n), a && (typeof a == "number" || typeof a == "string") && (this.listenOnPort = a), i(this, w, We).call(this), i(this, w, $e).call(this);
826
826
  }
827
827
  set listenOnPort(t) {
828
828
  if (t = parseInt(t), isNaN(t) || t < 1 || t > 255) throw new Error("Invalid port number");
@@ -877,14 +877,14 @@ class Y extends Pe {
877
877
  async connect() {
878
878
  return new Promise((t, e) => {
879
879
  Ne() || e("Web Serial not supported"), setTimeout(async () => {
880
- await $(499), await this.serialConnect(), this.isConnected ? t(`${this.typeDevice} device ${this.deviceNumber} connected`) : e(`${this.typeDevice} device ${this.deviceNumber} not connected`);
880
+ await W(499), await this.serialConnect(), this.isConnected ? t(`${this.typeDevice} device ${this.deviceNumber} connected`) : e(`${this.typeDevice} device ${this.deviceNumber} not connected`);
881
881
  }, 1);
882
882
  });
883
883
  }
884
884
  async serialDisconnect() {
885
885
  try {
886
886
  const t = this.__internal__.serial.reader, e = this.__internal__.serial.output_stream;
887
- t && (await t.cancel().catch((s) => this.serialErrors(s)), await this.__internal__.serial.input_done), e && (await e.getWriter().close(), await this.__internal__.serial.output_done), this.__internal__.serial.connected && this.__internal__.serial && await this.__internal__.serial.port.close();
887
+ t && (await t.cancel().catch((a) => this.serialErrors(a)), await this.__internal__.serial.input_done), e && (await e.getWriter().close(), await this.__internal__.serial.output_done), this.__internal__.serial.connected && this.__internal__.serial && await this.__internal__.serial.port.close();
888
888
  } catch (t) {
889
889
  this.serialErrors(t);
890
890
  } finally {
@@ -950,22 +950,22 @@ class Y extends Pe {
950
950
  if (t.length > 0)
951
951
  await this.serialPortsSaved(t);
952
952
  else {
953
- const s = this.serialFilters;
954
- this.__internal__.serial.port = await navigator.serial.requestPort({ filters: s });
953
+ const a = this.serialFilters;
954
+ this.__internal__.serial.port = await navigator.serial.requestPort({ filters: a });
955
955
  }
956
956
  const e = this.__internal__.serial.port;
957
957
  await e.open(this.serialConfigPort);
958
958
  const n = this;
959
- e.onconnect = (s) => {
960
- n.dispatch("serial:connected", s.detail), D.instance.dispatch("change"), n.__internal__.serial.queue.length > 0 && n.dispatch("internal:queue", {});
961
- }, e.ondisconnect = async (s) => {
962
- await n.disconnect(s.detail ?? null);
963
- }, await $(this.__internal__.serial.delay_first_connection), this.__internal__.timeout.until_response = setTimeout(async () => {
959
+ e.onconnect = (a) => {
960
+ n.dispatch("serial:connected", a.detail), D.instance.dispatch("change"), n.__internal__.serial.queue.length > 0 && n.dispatch("internal:queue", {});
961
+ }, e.ondisconnect = async (a) => {
962
+ await n.disconnect(a.detail ?? null);
963
+ }, await W(this.__internal__.serial.delay_first_connection), this.__internal__.timeout.until_response = setTimeout(async () => {
964
964
  await n.timeout(n.__internal__.serial.bytes_connection, "connection:start");
965
965
  }, this.__internal__.time.response_connection), await i(this, w, me).call(this, this.__internal__.serial.bytes_connection), this.dispatch("serial:sent", {
966
966
  action: "connect",
967
967
  bytes: this.__internal__.serial.bytes_connection
968
- }), this.typeDevice === "relay" && i(this, w, Q).call(this, ["DD", "DD"], null), await i(this, w, Ue).call(this);
968
+ }), this.typeDevice === "relay" && i(this, w, $).call(this, ["DD", "DD"], null), await i(this, w, Ue).call(this);
969
969
  } catch (t) {
970
970
  this.serialErrors(t);
971
971
  }
@@ -984,8 +984,8 @@ class Y extends Pe {
984
984
  }
985
985
  add0x(t) {
986
986
  let e = [];
987
- return t.forEach((n, s) => {
988
- e[s] = "0x" + n;
987
+ return t.forEach((n, a) => {
988
+ e[a] = "0x" + n;
989
989
  }), e;
990
990
  }
991
991
  bytesToHex(t) {
@@ -1078,8 +1078,8 @@ class Y extends Pe {
1078
1078
  const n = setInterval(async () => {
1079
1079
  if (this.__internal__.serial.queue.length > 0) return;
1080
1080
  clearInterval(n), await this.appendToQueue(t, "dispense");
1081
- const s = await this.internalDispenseStatus();
1082
- e(s);
1081
+ const a = await this.internalDispenseStatus();
1082
+ e(a);
1083
1083
  }, 100);
1084
1084
  });
1085
1085
  }
@@ -1122,27 +1122,27 @@ w = new WeakSet(), Re = function(t) {
1122
1122
  return;
1123
1123
  throw new Error("The port is closed.");
1124
1124
  }
1125
- const n = new Uint8Array(t), s = e.writable.getWriter();
1126
- await s.write(n), s.releaseLock();
1125
+ const n = new Uint8Array(t), a = e.writable.getWriter();
1126
+ await a.write(n), a.releaseLock();
1127
1127
  }, // #bytesToLowerCase(code = []) {
1128
1128
  // return code.map((item) => item.toString().toLowerCase());
1129
1129
  // }
1130
- Q = function(t = [], e = null) {
1130
+ $ = function(t = [], e = null) {
1131
1131
  if (t && t.length > 0) {
1132
1132
  this.__internal__.serial.connected || (this.dispatch("serial:connected"), D.instance.dispatch("change")), this.__internal__.serial.connected = !0, this.__internal__.interval.reconnection && (clearInterval(this.__internal__.interval.reconnection), this.__internal__.interval.reconnection = 0), this.__internal__.timeout.until_response && (clearTimeout(this.__internal__.timeout.until_response), this.__internal__.timeout.until_response = 0);
1133
1133
  const n = [];
1134
- for (const s in t)
1135
- n.push(t[s].toString().padStart(2, "0").toLowerCase());
1134
+ for (const a in t)
1135
+ n.push(t[a].toString().padStart(2, "0").toLowerCase());
1136
1136
  this.serialMessage(n);
1137
1137
  } else
1138
1138
  this.serialCorruptMessage(t, e);
1139
1139
  this.__internal__.serial.queue.length !== 0 && this.dispatch("internal:queue", {});
1140
1140
  }, qe = async function() {
1141
1141
  const t = this.serialFilters, e = await navigator.serial.getPorts({ filters: t });
1142
- return t.length === 0 ? e : e.filter((s) => {
1143
- const c = s.getInfo();
1142
+ return t.length === 0 ? e : e.filter((a) => {
1143
+ const c = a.getInfo();
1144
1144
  return t.some((u) => c.usbProductId === u.usbProductId && c.usbVendorId === u.usbVendorId);
1145
- }).filter((s) => !i(this, w, Re).call(this, s));
1145
+ }).filter((a) => !i(this, w, Re).call(this, a));
1146
1146
  }, He = function(t) {
1147
1147
  if (t) {
1148
1148
  const e = this.__internal__.serial.response.buffer;
@@ -1154,23 +1154,23 @@ Q = function(t = [], e = null) {
1154
1154
  let t = [];
1155
1155
  for (const e in this.__internal__.serial.response.buffer)
1156
1156
  t.push(this.__internal__.serial.response.buffer[e].toString(16));
1157
- this.__internal__.serial.response.buffer && i(this, w, Q).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1157
+ this.__internal__.serial.response.buffer && i(this, w, $).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1158
1158
  }, 400);
1159
1159
  }, Oe = async function() {
1160
1160
  if (this.__internal__.serial.response.length === this.__internal__.serial.response.buffer.length) {
1161
1161
  const t = [];
1162
1162
  for (const e in this.__internal__.serial.response.buffer)
1163
1163
  t.push(this.__internal__.serial.response.buffer[e].toString(16));
1164
- await i(this, w, Q).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1164
+ await i(this, w, $).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1165
1165
  } else if (this.__internal__.serial.response.length < this.__internal__.serial.response.buffer.length) {
1166
1166
  let t = [];
1167
1167
  for (let n = 0; n < this.__internal__.serial.response.length; n++)
1168
1168
  t[n] = this.__internal__.serial.response.buffer[n];
1169
1169
  if (t.length === this.__internal__.serial.response.length) {
1170
1170
  const n = [];
1171
- for (const s in t)
1172
- n.push(t[s].toString(16));
1173
- await i(this, w, Q).call(this, n), this.__internal__.serial.response.buffer = new Uint8Array(0);
1171
+ for (const a in t)
1172
+ n.push(t[a].toString(16));
1173
+ await i(this, w, $).call(this, n), this.__internal__.serial.response.buffer = new Uint8Array(0);
1174
1174
  return;
1175
1175
  }
1176
1176
  t = [];
@@ -1180,9 +1180,9 @@ Q = function(t = [], e = null) {
1180
1180
  t[n - this.__internal__.serial.response.length] = this.__internal__.serial.response.buffer[n];
1181
1181
  if (t.length === this.__internal__.serial.response.length) {
1182
1182
  const n = [];
1183
- for (const s in t)
1184
- n.push(t[s].toString(16));
1185
- await i(this, w, Q).call(this, n), this.__internal__.serial.response.buffer = new Uint8Array(0);
1183
+ for (const a in t)
1184
+ n.push(t[a].toString(16));
1185
+ await i(this, w, $).call(this, n), this.__internal__.serial.response.buffer = new Uint8Array(0);
1186
1186
  }
1187
1187
  }
1188
1188
  }
@@ -1194,12 +1194,12 @@ Q = function(t = [], e = null) {
1194
1194
  try {
1195
1195
  let n = !0;
1196
1196
  for (; n; ) {
1197
- const { value: s, done: c } = await e.read();
1197
+ const { value: a, done: c } = await e.read();
1198
1198
  if (c) {
1199
1199
  e.releaseLock(), this.__internal__.serial.keep_reading = !1, n = !1;
1200
1200
  break;
1201
1201
  }
1202
- i(this, w, He).call(this, s), this.__internal__.serial.response.length === null ? await i(this, w, Le).call(this) : await i(this, w, Oe).call(this);
1202
+ i(this, w, He).call(this, a), this.__internal__.serial.response.length === null ? await i(this, w, Le).call(this) : await i(this, w, Oe).call(this);
1203
1203
  }
1204
1204
  } catch (n) {
1205
1205
  this.serialErrors(n);
@@ -1249,12 +1249,12 @@ Q = function(t = [], e = null) {
1249
1249
  if (this.__internal__.timeout.until_response || this.__internal__.serial.queue.length === 0) return;
1250
1250
  const t = this.__internal__.serial.queue[0];
1251
1251
  let e = this.__internal__.time.response_general;
1252
- t.action === "dispense" && (e = this.__internal__.dispense.limit_counter * 1e3, this.__internal__.dispense.custom_limit_counter && (e = this.__internal__.dispense.custom_limit_counter * 1e3), e += Math.ceil(e * 0.6)), this.__internal__.timeout.until_response = setTimeout(async () => {
1252
+ t.action === "dispense" && (e = 800), this.__internal__.timeout.until_response = setTimeout(async () => {
1253
1253
  await this.timeout(t.bytes, t.action);
1254
1254
  }, e), await i(this, w, me).call(this, t.bytes), this.dispatch("serial:sent", {
1255
1255
  action: t.action,
1256
1256
  bytes: t.bytes
1257
- }), this.typeDevice === "relay" && i(this, w, Q).call(this, ["DD", "DD"], null);
1257
+ }), this.typeDevice === "relay" && i(this, w, $).call(this, ["DD", "DD"], null);
1258
1258
  const n = [...this.__internal__.serial.queue];
1259
1259
  this.__internal__.serial.queue = n.splice(1);
1260
1260
  }, Je = function(t = 1) {
@@ -1262,8 +1262,8 @@ Q = function(t = [], e = null) {
1262
1262
  }, ze = function() {
1263
1263
  this.__internal__.last_error = { message: null, action: null, code: null, no_code: 0 };
1264
1264
  };
1265
- var ee, _e, Ge;
1266
- class gn extends Y {
1265
+ var X, _e, Ge;
1266
+ class gn extends G {
1267
1267
  constructor({
1268
1268
  filters: t = null,
1269
1269
  config_port: e = null,
@@ -1271,7 +1271,7 @@ class gn extends Y {
1271
1271
  } = {}) {
1272
1272
  super({ filters: t, config_port: e, no_device: n });
1273
1273
  S(this, _e);
1274
- S(this, ee, {
1274
+ S(this, X, {
1275
1275
  activate: ["A0", "01", "01", "A2"],
1276
1276
  deactivate: ["A0", "01", "00", "A1"]
1277
1277
  });
@@ -1300,8 +1300,8 @@ class gn extends Y {
1300
1300
  }
1301
1301
  serialRelaySumHex(t) {
1302
1302
  let e = 0;
1303
- return t.forEach((n, s) => {
1304
- s !== 3 && (e += parseInt(n, 16));
1303
+ return t.forEach((n, a) => {
1304
+ a !== 3 && (e += parseInt(n, 16));
1305
1305
  }), e.toString(16).toUpperCase();
1306
1306
  }
1307
1307
  serialSetConnectionConstant(t = 1) {
@@ -1309,34 +1309,34 @@ class gn extends Y {
1309
1309
  return e[1] = this.hexMaker(this.decToHex(t.toString())), e[3] = this.serialRelaySumHex(e), this.add0x(e);
1310
1310
  }
1311
1311
  async turnOn() {
1312
- const t = y(this, ee).activate;
1312
+ const t = y(this, X).activate;
1313
1313
  t[3] = this.serialRelaySumHex(t), await this.appendToQueue(t, "relay:turn-on");
1314
1314
  }
1315
1315
  async turnOff() {
1316
- const t = y(this, ee).deactivate;
1316
+ const t = y(this, X).deactivate;
1317
1317
  t[3] = this.serialRelaySumHex(t), await this.appendToQueue(t, "relay:turn-off");
1318
1318
  }
1319
1319
  async toggle({ inverse: t = !1, ms: e = 300 } = {}) {
1320
1320
  const n = this;
1321
- t ? (await n.turnOff(), await $(e), await n.turnOn()) : (await n.turnOn(), await $(e), await n.turnOff());
1321
+ t ? (await n.turnOff(), await W(e), await n.turnOn()) : (await n.turnOn(), await W(e), await n.turnOff());
1322
1322
  }
1323
1323
  }
1324
- ee = new WeakMap(), _e = new WeakSet(), Ge = function() {
1324
+ X = new WeakMap(), _e = new WeakSet(), Ge = function() {
1325
1325
  D.add(this);
1326
1326
  };
1327
- var A, E, W, v, Ye, Ke, Ze, ge, Z, V, re, se, ae;
1328
- class Cn extends Y {
1327
+ var N, E, j, v, Ye, Ke, Ze, ge, K, Q, ie, re, ae;
1328
+ class Cn extends G {
1329
1329
  constructor({
1330
1330
  filters: t = null,
1331
1331
  config_port: e = null,
1332
1332
  no_device: n = 1,
1333
- device_listen_on_port: s = 3
1333
+ device_listen_on_port: a = 3
1334
1334
  } = {}) {
1335
- super({ filters: t, config_port: e, no_device: n, device_listen_on_port: s });
1335
+ super({ filters: t, config_port: e, no_device: n, device_listen_on_port: a });
1336
1336
  S(this, v);
1337
- S(this, A, !1);
1337
+ S(this, N, !1);
1338
1338
  S(this, E, 0);
1339
- S(this, W, 0);
1339
+ S(this, j, 0);
1340
1340
  if (this.__internal__.device.type = "locker", D.getCustom(this.typeDevice, n)) throw new Error(`Device ${this.typeDevice} ${n} already exists`);
1341
1341
  this.__internal__.device.milliseconds = 666, this.__internal__.dispense.limit_counter = 1, i(this, v, Ke).call(this), i(this, v, Ye).call(this);
1342
1342
  }
@@ -1355,14 +1355,14 @@ class Cn extends Y {
1355
1355
  case "07":
1356
1356
  switch (t[4]) {
1357
1357
  case "00":
1358
- e.name = "Cell closed.", e.description = "The selected cell is closed.", e.request = "dispense", e.no_code = 1102, this.__internal__.dispense.status = !1, this.dispatch("dispensed", {}), y(this, A) && y(this, E) >= 89 ? (e.finished_test = !0, x(this, A, !1), x(this, E, 0)) : y(this, A) && (e.finished_test = !1);
1358
+ e.name = "Cell closed.", e.description = "The selected cell is closed.", e.request = "dispense", e.no_code = 1102, this.__internal__.dispense.status = !1, this.dispatch("dispensed", {}), y(this, N) && y(this, E) >= 89 ? (e.finished_test = !0, x(this, N, !1), x(this, E, 0)) : y(this, N) && (e.finished_test = !1);
1359
1359
  break;
1360
1360
  case "01":
1361
1361
  case "04":
1362
- e.name = "Cell open.", e.description = "The selected cell was open successfully.", e.request = "dispense", e.no_code = 102, this.__internal__.dispense.status = !0, this.dispatch("dispensed", {}), y(this, A) && y(this, E) >= 89 ? (e.finished_test = !0, x(this, A, !1), x(this, E, 0)) : y(this, A) && (e.finished_test = !1);
1362
+ e.name = "Cell open.", e.description = "The selected cell was open successfully.", e.request = "dispense", e.no_code = 102, this.__internal__.dispense.status = !0, this.dispatch("dispensed", {}), y(this, N) && y(this, E) >= 89 ? (e.finished_test = !0, x(this, N, !1), x(this, E, 0)) : y(this, N) && (e.finished_test = !1);
1363
1363
  break;
1364
1364
  case "05":
1365
- e.name = "Cell inactive.", e.description = "The selected cell is inactive or doesn't exist.", e.request = "dispense", e.no_code = 101, this.__internal__.dispense.status = !1, this.dispatch("not-dispensed", {}), y(this, A) && y(this, E) >= 89 ? (e.finished_test = !0, x(this, A, !1), x(this, E, 0)) : y(this, A) && (e.finished_test = !1);
1365
+ e.name = "Cell inactive.", e.description = "The selected cell is inactive or doesn't exist.", e.request = "dispense", e.no_code = 101, this.__internal__.dispense.status = !1, this.dispatch("not-dispensed", {}), y(this, N) && y(this, E) >= 89 ? (e.finished_test = !0, x(this, N, !1), x(this, E, 0)) : y(this, N) && (e.finished_test = !1);
1366
1366
  break;
1367
1367
  }
1368
1368
  break;
@@ -1383,27 +1383,27 @@ class Cn extends Y {
1383
1383
  let n = null;
1384
1384
  try {
1385
1385
  n = new Uint8Array(t.length + 8), n.set(t, 2), n[0] = 2, n[1] = t.length + 4, n[n.length - 2] = 3;
1386
- let s = 0;
1387
- for (let d = 1; d < t.length; d++)
1388
- s += t[d], s *= parseInt(Math.pow(2, d - 1).toString());
1389
- n[t.length + 2] = s % 256, n[t.length + 3] = e * 3 % 256, n[t.length + 4] = e * 8 % 256;
1386
+ let a = 0;
1387
+ for (let h = 1; h < t.length; h++)
1388
+ a += t[h], a *= parseInt(Math.pow(2, h - 1).toString());
1389
+ n[t.length + 2] = a % 256, n[t.length + 3] = e * 3 % 256, n[t.length + 4] = e * 8 % 256;
1390
1390
  let c = 0;
1391
- for (let d = 3; d < t.length + 5; d++)
1392
- c += n[d];
1391
+ for (let h = 3; h < t.length + 5; h++)
1392
+ c += n[h];
1393
1393
  n[t.length + 5] = c % 256;
1394
1394
  let u = 0;
1395
- for (let d = 0; d < n.length - 1; d++)
1396
- u ^= n[d];
1395
+ for (let h = 0; h < n.length - 1; h++)
1396
+ u ^= n[h];
1397
1397
  n[n.length - 1] = u;
1398
- } catch (s) {
1399
- this.serialErrors(`Error generating command: ${s.message}`), n = null;
1398
+ } catch (a) {
1399
+ this.serialErrors(`Error generating command: ${a.message}`), n = null;
1400
1400
  }
1401
1401
  return n;
1402
1402
  }
1403
1403
  serialLockerHexCmd(t) {
1404
1404
  const e = this.serialLockerCmdMaker(t), n = [];
1405
- for (let s = 0; s < e.length; s++)
1406
- n.push(this.decToHex(e[s]));
1405
+ for (let a = 0; a < e.length; a++)
1406
+ n.push(this.decToHex(e[a]));
1407
1407
  return n;
1408
1408
  }
1409
1409
  serialLockerGetConnectionCmd(t = 3) {
@@ -1419,44 +1419,44 @@ class Cn extends Y {
1419
1419
  return n === 0 && (n = 8), [e, n];
1420
1420
  }
1421
1421
  async dispense({ cell: t = 1 } = {}) {
1422
- t = i(this, v, Z).call(this, t);
1422
+ t = i(this, v, K).call(this, t);
1423
1423
  const e = i(this, v, Ze).call(this, t);
1424
1424
  return await this.internalDispense(e);
1425
1425
  }
1426
1426
  async enable({ cell: t = 1 } = {}) {
1427
- t = i(this, v, Z).call(this, t);
1428
- const [e, n] = this.parseCellToColumnRow(t), s = i(this, v, ge).call(this, { enable: !0, column: e, row: n });
1429
- await this.appendToQueue(s, "activate");
1427
+ t = i(this, v, K).call(this, t);
1428
+ const [e, n] = this.parseCellToColumnRow(t), a = i(this, v, ge).call(this, { enable: !0, column: e, row: n });
1429
+ await this.appendToQueue(a, "activate");
1430
1430
  }
1431
1431
  async disable({ cell: t = 1 } = {}) {
1432
- t = i(this, v, Z).call(this, t);
1433
- const [e, n] = this.parseCellToColumnRow(t), s = i(this, v, ge).call(this, { enable: !1, column: e, row: n });
1434
- await this.appendToQueue(s, "disable");
1432
+ t = i(this, v, K).call(this, t);
1433
+ const [e, n] = this.parseCellToColumnRow(t), a = i(this, v, ge).call(this, { enable: !1, column: e, row: n });
1434
+ await this.appendToQueue(a, "disable");
1435
1435
  }
1436
1436
  async openAll() {
1437
1437
  if (this.isDispensing) throw new Error("Another dispensing process is running");
1438
- i(this, v, V).call(this), x(this, A, !0), i(this, v, re).call(this);
1438
+ i(this, v, Q).call(this), x(this, N, !0), i(this, v, ie).call(this);
1439
1439
  const t = [];
1440
1440
  for (let e = 1; e <= 90; e++) {
1441
1441
  const n = await this.dispense(e);
1442
- t.push(n), x(this, E, e), i(this, v, re).call(this);
1442
+ t.push(n), x(this, E, e), i(this, v, ie).call(this);
1443
1443
  }
1444
- x(this, E, 90), i(this, v, re).call(this, t), i(this, v, V).call(this);
1444
+ x(this, E, 90), i(this, v, ie).call(this, t), i(this, v, Q).call(this);
1445
1445
  }
1446
1446
  async enableAll() {
1447
- i(this, v, V).call(this), x(this, A, !0), i(this, v, se).call(this);
1447
+ i(this, v, Q).call(this), x(this, N, !0), i(this, v, re).call(this);
1448
1448
  for (let t = 1; t <= 90; t++)
1449
- await this.enable(t), x(this, E, t), i(this, v, se).call(this);
1450
- x(this, E, 90), i(this, v, se).call(this), i(this, v, V).call(this);
1449
+ await this.enable(t), x(this, E, t), i(this, v, re).call(this);
1450
+ x(this, E, 90), i(this, v, re).call(this), i(this, v, Q).call(this);
1451
1451
  }
1452
1452
  async disableAll() {
1453
- i(this, v, V).call(this), x(this, A, !0), i(this, v, ae).call(this);
1453
+ i(this, v, Q).call(this), x(this, N, !0), i(this, v, ae).call(this);
1454
1454
  for (let t = 1; t <= 90; t++)
1455
1455
  await this.enable(t), x(this, E, t), i(this, v, ae).call(this);
1456
- x(this, E, 90), i(this, v, ae).call(this), i(this, v, V).call(this);
1456
+ x(this, E, 90), i(this, v, ae).call(this), i(this, v, Q).call(this);
1457
1457
  }
1458
1458
  }
1459
- A = new WeakMap(), E = new WeakMap(), W = new WeakMap(), v = new WeakSet(), Ye = function() {
1459
+ N = new WeakMap(), E = new WeakMap(), j = new WeakMap(), v = new WeakSet(), Ye = function() {
1460
1460
  const t = [
1461
1461
  "percentage:disable",
1462
1462
  "percentage:enable",
@@ -1467,12 +1467,12 @@ A = new WeakMap(), E = new WeakMap(), W = new WeakMap(), v = new WeakSet(), Ye =
1467
1467
  }, Ke = function() {
1468
1468
  D.add(this);
1469
1469
  }, Ze = function(t = 1) {
1470
- return t = i(this, v, Z).call(this, t), this.serialLockerHexCmd(new Uint8Array([16, this.__internal__.device.listen_on_port, t]));
1470
+ return t = i(this, v, K).call(this, t), this.serialLockerHexCmd(new Uint8Array([16, this.__internal__.device.listen_on_port, t]));
1471
1471
  }, ge = function({ enable: t = !0, column: e = 0, row: n = 10 } = {}) {
1472
1472
  if (e < 0 || e > 8) throw new Error("Invalid column number");
1473
1473
  if (n < 0 || n > 10) throw new Error("Invalid row number");
1474
- let s = 1;
1475
- return t || (s = 0), this.serialLockerHexCmd(new Uint8Array([48, this.__internal__.device.listen_on_port, e, n, s]));
1474
+ let a = 1;
1475
+ return t || (a = 0), this.serialLockerHexCmd(new Uint8Array([48, this.__internal__.device.listen_on_port, e, n, a]));
1476
1476
  }, // #serialLockerGetOpenCmd(cell = 1) {
1477
1477
  // cell = this.#validateCell(cell);
1478
1478
  // const time = this.__internal__.device.milliseconds;
@@ -1481,32 +1481,32 @@ A = new WeakMap(), E = new WeakMap(), W = new WeakMap(), v = new WeakSet(), Ye =
1481
1481
  // const timeLow = Math.floor(time / 3) % 256;
1482
1482
  // return this.serialLockerHexCmd(new Uint8Array([64, this.__internal__.device.listen_on_port, cell, timeHigh, timeLow]));
1483
1483
  // }
1484
- Z = function(t) {
1484
+ K = function(t) {
1485
1485
  const e = parseInt(t);
1486
1486
  if (isNaN(e) || e < 1 || e > 90) throw new Error("Invalid cell number");
1487
1487
  return e;
1488
- }, V = function() {
1489
- x(this, A, !1), x(this, E, 0), x(this, W, 0);
1490
- }, re = function(t = null) {
1491
- x(this, W, Math.round(y(this, E) * 100 / 90)), this.dispatch("percentage:open", { percentage: y(this, W), dispensed: t });
1492
- }, se = function() {
1493
- x(this, W, Math.round(y(this, E) * 100 / 90)), this.dispatch("percentage:enable", { percentage: y(this, W) });
1488
+ }, Q = function() {
1489
+ x(this, N, !1), x(this, E, 0), x(this, j, 0);
1490
+ }, ie = function(t = null) {
1491
+ x(this, j, Math.round(y(this, E) * 100 / 90)), this.dispatch("percentage:open", { percentage: y(this, j), dispensed: t });
1492
+ }, re = function() {
1493
+ x(this, j, Math.round(y(this, E) * 100 / 90)), this.dispatch("percentage:enable", { percentage: y(this, j) });
1494
1494
  }, ae = function() {
1495
- x(this, W, Math.round(y(this, E) * 100 / 90)), this.dispatch("percentage:disable", { percentage: y(this, W) });
1495
+ x(this, j, Math.round(y(this, E) * 100 / 90)), this.dispatch("percentage:disable", { percentage: y(this, j) });
1496
1496
  };
1497
- var l, Xe, et, tt, R, F, nt, it, rt, st, at, ot, lt, ct, ht, dt, ut, pt, _t, ft, bt, yt, wt, kt, vt, mt, gt, Ct, xt, Tt, Dt, Et, O, P, oe, N, U, It, St, Mt, Ft, X, Ce, xe, le, ce, Pt;
1498
- class xn extends Y {
1497
+ var l, Xe, et, tt, B, se, nt, it, rt, at, st, ot, lt, ct, dt, ht, ut, pt, _t, ft, bt, yt, wt, kt, vt, mt, gt, Ct, xt, Tt, Dt, Et, L, F, oe, P, O, It, St, Mt, Ft, Z, Ce, xe, le, ce, Pt;
1498
+ class xn extends G {
1499
1499
  constructor({
1500
1500
  filters: t = null,
1501
1501
  config_port: e = null,
1502
1502
  no_device: n = 1,
1503
- device_listen_on_port: s = 1,
1503
+ device_listen_on_port: a = 1,
1504
1504
  type: c = "esplus",
1505
1505
  support_cart: u = !0
1506
1506
  } = {}) {
1507
- super({ filters: t, config_port: e, no_device: n, device_listen_on_port: s });
1507
+ super({ filters: t, config_port: e, no_device: n, device_listen_on_port: a });
1508
1508
  S(this, l);
1509
- B(this, "__device", {
1509
+ A(this, "__device", {
1510
1510
  type: "esplus",
1511
1511
  support_cart: !1,
1512
1512
  withdraw: {
@@ -1552,7 +1552,7 @@ class xn extends Y {
1552
1552
  }
1553
1553
  set listenOnPort(t) {
1554
1554
  if (t = parseInt(t), isNaN(t) || t < 1 || t > 31) throw new Error("Invalid port number, valid range is 1 to 31");
1555
- this.__internal__.device.listen_on_port = t, this.__internal__.serial.bytes_connection = this.serialSetConnectionConstant(t), this.__internal__.device.hex_number = (128 + this.listenOnPort).toString(16);
1555
+ this.__internal__.device.listen_on_port = t, this.__internal__.serial.bytes_connection = this.serialSetConnectionConstant(t), this.__internal__.device.hex_number = (128 + t).toString(16);
1556
1556
  }
1557
1557
  set deviceType(t) {
1558
1558
  if (typeof t != "string") throw new Error("Invalid device type, must be a string");
@@ -1567,8 +1567,8 @@ class xn extends Y {
1567
1567
  }
1568
1568
  serialJofemarMakeBytes(t) {
1569
1569
  let e = this.hexToDec(this.sumHex(t)), n = this.calcCheckSums(e.toString());
1570
- for (let s = 0; s < 2; s++)
1571
- t.push(this.hexMaker(n[s]));
1570
+ for (let a = 0; a < 2; a++)
1571
+ t.push(this.hexMaker(n[a]));
1572
1572
  return t.push("03"), this.add0x(t);
1573
1573
  }
1574
1574
  calcCheckSums(t) {
@@ -1578,8 +1578,8 @@ class xn extends Y {
1578
1578
  }
1579
1579
  serialSetConnectionConstant(t = 1) {
1580
1580
  let e = ["02", "30", "30", (128 + t).toString(16), "53", "FF", "FF"], n = [];
1581
- return e.forEach((s) => {
1582
- n.push(this.hexMaker(s));
1581
+ return e.forEach((a) => {
1582
+ n.push(this.hexMaker(a));
1583
1583
  }), this.serialJofemarMakeBytes(n);
1584
1584
  }
1585
1585
  serialMessage(t) {
@@ -1604,7 +1604,7 @@ class xn extends Y {
1604
1604
  n = i(this, l, It).call(this, t, n);
1605
1605
  break;
1606
1606
  case "15":
1607
- n.name = "Checksum error", n.description = "The calculated checksum does not match the received checksum", n.no_code = 38, i(this, l, P).call(this);
1607
+ n.name = "Checksum error", n.description = "The calculated checksum does not match the received checksum", n.no_code = 38, i(this, l, F).call(this);
1608
1608
  break;
1609
1609
  default:
1610
1610
  n.name = "unknown", n.description = "The message received is unknown", n.no_code = 404;
@@ -1626,48 +1626,48 @@ class xn extends Y {
1626
1626
  cart: e = !1
1627
1627
  } = {}) {
1628
1628
  if (t = parseInt(t), isNaN(t) || t < 1 || t > 130) throw new Error("Invalid selection");
1629
- const { channel: n, tray: s } = i(this, l, St).call(this, t);
1629
+ const { channel: n, tray: a } = i(this, l, St).call(this, t);
1630
1630
  this.__internal__.dispense.backup_dispense = {
1631
1631
  selection: t,
1632
1632
  cart: e,
1633
1633
  channel: n,
1634
- tray: s
1634
+ tray: a
1635
1635
  };
1636
- let u = ["02", "30", "30", this.__internal__.device.hex_number, "56", s, n];
1637
- e && (u[4] = "4D"), u = i(this, l, F).call(this, u);
1638
- let d;
1636
+ let u = ["02", "30", "30", this.__internal__.device.hex_number, "56", a, n];
1637
+ e && (u[4] = "4D"), u = i(this, l, se).call(this, u);
1638
+ let h;
1639
1639
  do
1640
- d = await this.internalDispense(u), i(this, l, Mt).call(this), d.error === "elevator-locked" ? await i(this, l, nt).call(this) : d.error === "no-response" && await $(1e3);
1641
- while (["elevator-locked", "no-response"].includes(d.error));
1642
- return this.__internal__.dispense.backup_dispense = {}, d;
1640
+ h = await this.internalDispense(u), i(this, l, Mt).call(this), h.error === "elevator-locked" ? await i(this, l, nt).call(this) : h.error === "no-response" && await W(1e3);
1641
+ while (["elevator-locked", "no-response"].includes(h.error));
1642
+ return this.__internal__.dispense.backup_dispense = {}, h;
1643
1643
  }
1644
1644
  async endDispense() {
1645
1645
  let e = ["02", "30", "30", this.__internal__.device.hex_number, "4D", "80", "80"];
1646
- return e = i(this, l, F).call(this, e), await this.internalDispense(e);
1646
+ return e = i(this, l, se).call(this, e), await this.internalDispense(e);
1647
1647
  }
1648
1648
  async collect() {
1649
- const t = i(this, l, F).call(this, ["02", "30", "30", "81", "4E", "FF", "FF"]);
1650
- return await i(this, l, R).call(this, t, "collect");
1649
+ const t = ["02", "30", "30", "81", "4E", "FF", "FF"];
1650
+ return await i(this, l, B).call(this, t, "collect");
1651
1651
  }
1652
1652
  async resetSoldOutErrors() {
1653
- return await i(this, l, X).call(this, "80");
1653
+ return await i(this, l, Z).call(this, "80");
1654
1654
  }
1655
1655
  async resetWaitingProductRemovedError() {
1656
- return await i(this, l, X).call(this, "81");
1656
+ return await i(this, l, Z).call(this, "81");
1657
1657
  }
1658
1658
  async resetMachineErrors() {
1659
- return this.__internal__.serial.queue.length === 0 ? (i(this, l, Ce).call(this), await i(this, l, X).call(this, "FF")) : new Promise((t) => {
1659
+ return this.__internal__.serial.queue.length === 0 ? (i(this, l, Ce).call(this), await i(this, l, Z).call(this, "FF")) : new Promise((t) => {
1660
1660
  const e = setInterval(async () => {
1661
- this.__internal__.serial.queue.length > 0 || (clearInterval(e), await i(this, l, X).call(this, "FF"), i(this, l, Ce).call(this), t(!0));
1661
+ this.__internal__.serial.queue.length > 0 || (clearInterval(e), await i(this, l, Z).call(this, "FF"), i(this, l, Ce).call(this), t(!0));
1662
1662
  }, 100);
1663
1663
  });
1664
1664
  }
1665
1665
  async resetAllErrors() {
1666
- return await this.resetSoldOutErrors(), await $(100), await this.resetWaitingProductRemovedError(), await $(100), await this.resetMachineErrors();
1666
+ return await this.resetSoldOutErrors(), await W(100), await this.resetWaitingProductRemovedError(), await W(100), await this.resetMachineErrors();
1667
1667
  }
1668
1668
  async status() {
1669
- const t = i(this, l, F).call(this, ["02", "30", "30", "81", "53", "FF", "FF"]);
1670
- return await i(this, l, R).call(this, t, "status");
1669
+ const t = ["02", "30", "30", "81", "53", "FF", "FF"];
1670
+ return await i(this, l, B).call(this, t, "status");
1671
1671
  }
1672
1672
  async lightsOn() {
1673
1673
  return await i(this, l, xe).call(this, "81");
@@ -1676,8 +1676,8 @@ class xn extends Y {
1676
1676
  return await i(this, l, xe).call(this, "80");
1677
1677
  }
1678
1678
  async program(t, e) {
1679
- const n = i(this, l, F).call(this, ["02", "30", "30", "81", "50", t, e]);
1680
- return await i(this, l, R).call(this, n, "program");
1679
+ const n = ["02", "30", "30", "81", "50", t, e];
1680
+ return await i(this, l, B).call(this, n, "program");
1681
1681
  }
1682
1682
  async programDisplayLanguage({ language: t = "spanish" } = {}) {
1683
1683
  const e = { spanish: "30", english: "31", french: "32" };
@@ -1704,8 +1704,8 @@ class xn extends Y {
1704
1704
  t = parseFloat(t);
1705
1705
  const e = this.__device.type === "iceplus" ? 6.5 : 32, n = this.__device.type === "iceplus" ? -25 : 0.5;
1706
1706
  if (isNaN(t) || t < n || t > e || t % 0.5 !== 0) throw new Error("Invalid degrees, must be a multiple of 0.5 and between 0.5 and 32");
1707
- let s = t * 2 + 128;
1708
- return this.__device.type === "iceplus" && (s += 51), s = Math.ceil(s), await this.program("54", s.toString(16));
1707
+ let a = t * 2 + 128;
1708
+ return this.__device.type === "iceplus" && (a += 51), a = Math.ceil(a), await this.program("54", a.toString(16));
1709
1709
  }
1710
1710
  /**
1711
1711
  * @param {number|string} tray
@@ -1789,8 +1789,8 @@ class xn extends Y {
1789
1789
  async programVoltageEngine({ selection: t = 1, voltage: e = 5 } = {}) {
1790
1790
  if (e = parseFloat(e), t = parseInt(t), isNaN(t) || t < 1 || t > this.__device.channels.verification.end) throw new Error(`Invalid selection, valid range is 1 to ${this.__device.channels.verification.end}`);
1791
1791
  if (isNaN(e) || e < 5 || e > 9.5 || e % 0.5 !== 0) throw new Error("Invalid voltage, valid range is 5 to 9.5");
1792
- const n = 109 + t, c = (128 + (e - 5) * 2).toString(16), u = i(this, l, F).call(this, ["02", "30", "30", "81", "47", n, c]);
1793
- return await i(this, l, R).call(this, u, "voltage-engine");
1792
+ const n = 109 + t, c = (128 + (e - 5) * 2).toString(16), u = ["02", "30", "30", "81", "47", n, c];
1793
+ return await i(this, l, B).call(this, u, "voltage-engine");
1794
1794
  }
1795
1795
  /**
1796
1796
  * @param {number|string} selection
@@ -1799,8 +1799,8 @@ class xn extends Y {
1799
1799
  */
1800
1800
  async programPushOverProducts({ selection: t = 1, enable: e = !0 } = {}) {
1801
1801
  if (t = parseInt(t), isNaN(t) || t < 1 || t > this.__device.channels.verification.end) throw new Error(`Invalid selection, valid range is 1 to ${this.__device.channels.verification.end}`);
1802
- const n = 109 + t, s = e ? "31" : "30", c = i(this, l, F).call(this, ["02", "30", "30", "81", "4F", n, s]);
1803
- return await i(this, l, R).call(this, c, "push-over-products");
1802
+ const c = ["02", "30", "30", "81", "4F", 109 + t, e ? "31" : "30"];
1803
+ return await i(this, l, B).call(this, c, "push-over-products");
1804
1804
  }
1805
1805
  /**
1806
1806
  * @param {number|string} selection
@@ -1812,12 +1812,12 @@ class xn extends Y {
1812
1812
  if (isNaN(e) || e < 0 || e > 10 || e % 0.1 !== 0) throw new Error("Invalid seconds, valid range is 0.0 to 10.0 with a step of 0.1");
1813
1813
  const n = 109 + t;
1814
1814
  e = e.toFixed(1);
1815
- const s = 128 + e * 10, c = i(this, l, F).call(this, ["02", "30", "30", "81", "45", n, s]);
1816
- return await i(this, l, R).call(this, c, "channel-running-after-dispense");
1815
+ const a = 128 + e * 10, c = ["02", "30", "30", "81", "45", n, a];
1816
+ return await i(this, l, B).call(this, c, "channel-running-after-dispense");
1817
1817
  }
1818
1818
  async checkData(t, e = "FF") {
1819
- const n = i(this, l, F).call(this, ["02", "30", "30", "81", "43", t, e]);
1820
- return await i(this, l, R).call(this, n, "check-data");
1819
+ const n = ["02", "30", "30", "81", "43", t, e];
1820
+ return await i(this, l, B).call(this, n, "check-data");
1821
1821
  }
1822
1822
  async getDisplayLanguage() {
1823
1823
  return await this.checkData("49");
@@ -1918,8 +1918,8 @@ class xn extends Y {
1918
1918
  */
1919
1919
  async setDisplayMessageTemporarily({ message: t = "", seconds: e = 1 }) {
1920
1920
  if (t = t.substring(0, 32), e = parseInt(e), isNaN(e) || e < 1 || e > 125) throw new Error("Invalid seconds, valid range is 1 to 125");
1921
- const n = i(this, l, ce).call(this, t), s = (128 + e).toString(16);
1922
- return await i(this, l, le).call(this, s, n);
1921
+ const n = i(this, l, ce).call(this, t), a = (128 + e).toString(16);
1922
+ return await i(this, l, le).call(this, a, n);
1923
1923
  }
1924
1924
  /**
1925
1925
  * @param {string} message
@@ -1932,8 +1932,8 @@ class xn extends Y {
1932
1932
  }
1933
1933
  async programClock({ date: t = /* @__PURE__ */ new Date() } = {}) {
1934
1934
  if (!(t instanceof Date)) throw new Error("Invalid date, must be an instance of Date");
1935
- const e = i(this, l, F).call(this, ["02", "30", "30", "81", "72", ...i(this, l, Pt).call(this, t)]);
1936
- return await i(this, l, R).call(this, e, "clock");
1935
+ const e = ["02", "30", "30", "81", "72", ...i(this, l, Pt).call(this, t)];
1936
+ return await i(this, l, B).call(this, e, "clock");
1937
1937
  }
1938
1938
  /**
1939
1939
  * @param {null|string} event
@@ -1942,8 +1942,8 @@ class xn extends Y {
1942
1942
  */
1943
1943
  async eventsConfig({ event: t = null, enable: e = !0 } = {}) {
1944
1944
  if (t === null) throw new Error("Invalid event");
1945
- const n = e ? "31" : "30", s = i(this, l, F).call(this, ["02", "30", "30", "81", "41", t, n]);
1946
- return await i(this, l, R).call(this, s, "events-config");
1945
+ const a = ["02", "30", "30", "81", "41", t, e ? "31" : "30"];
1946
+ return await i(this, l, B).call(this, a, "events-config");
1947
1947
  }
1948
1948
  async eventEnable({ event: t = null } = {}) {
1949
1949
  if (t === null) throw new Error("Invalid event");
@@ -1959,8 +1959,7 @@ class xn extends Y {
1959
1959
  }
1960
1960
  async sendCustomCode({ code: t = [] } = {}) {
1961
1961
  if (t.length < 5) throw new Error("Invalid code, minimum length is 5");
1962
- const e = i(this, l, F).call(this, t);
1963
- return await i(this, l, R).call(this, e, "custom");
1962
+ return await i(this, l, B).call(this, t, "custom");
1964
1963
  }
1965
1964
  async assignChannels() {
1966
1965
  const t = this.__device.channels.verification.start, e = this.__device.channels.verification.end;
@@ -1969,8 +1968,8 @@ class xn extends Y {
1969
1968
  for (let n = t; n <= e; n++)
1970
1969
  this.__device.channels.verification.current = n, await this.getChannelPresence({ selection: n });
1971
1970
  return new Promise((n) => {
1972
- let s = setInterval(() => {
1973
- this.__device.channels.verification.channels.length === e - t + 1 && (clearInterval(s), this.dispatch("channels", { channels: this.__device.channels.verification.channels }), this.__device.channels.verification.clear(), n(!0));
1971
+ let a = setInterval(() => {
1972
+ this.__device.channels.verification.channels.length === e - t + 1 && (clearInterval(a), this.dispatch("channels", { channels: this.__device.channels.verification.channels }), this.__device.channels.verification.clear(), n(!0));
1974
1973
  }, 500);
1975
1974
  });
1976
1975
  }
@@ -2015,16 +2014,16 @@ l = new WeakSet(), Xe = function() {
2015
2014
  this.on("internal:dispense:running", () => i(this, l, Ft));
2016
2015
  }, tt = function() {
2017
2016
  D.add(this);
2018
- }, R = function(t, e) {
2019
- return t[3] = this.__internal__.device.hex_number, this.appendToQueue(i(this, l, F).call(this, t), e);
2020
- }, F = function(t) {
2017
+ }, B = function(t, e) {
2018
+ return t[3] = this.__internal__.device.hex_number, this.appendToQueue(i(this, l, se).call(this, t), e);
2019
+ }, se = function(t) {
2021
2020
  let e = this.hexToDec(this.sumHex(t)), n = this.calcCheckSums(e.toString());
2022
- for (let s = 0; s < 2; s++)
2023
- t.push(this.hexMaker(n[s]));
2021
+ for (let a = 0; a < 2; a++)
2022
+ t.push(this.hexMaker(n[a]));
2024
2023
  return t.push("03"), t;
2025
2024
  }, nt = async function() {
2026
2025
  if (this.__internal__.dispense.elevator.locking_interval) return;
2027
- this.__internal__.dispense.elevator.need_reset && (this.__internal__.dispense.elevator.need_reset = !1, await this.resetWaitingProductRemovedError(), await $(500)), await this.collect();
2026
+ this.__internal__.dispense.elevator.need_reset && (this.__internal__.dispense.elevator.need_reset = !1, await this.resetWaitingProductRemovedError(), await W(500)), await this.collect();
2028
2027
  const t = this;
2029
2028
  return this.__internal__.dispense.status = "elevator-locked", this.__internal__.dispense.elevator.locking_time = 60, new Promise((e) => {
2030
2029
  t.__internal__.dispense.elevator.locking_interval = setInterval(() => {
@@ -2062,9 +2061,9 @@ l = new WeakSet(), Xe = function() {
2062
2061
  44: "D"
2063
2062
  };
2064
2063
  return e.additional.ascii = n[t] ?? null, e.name = "Key pressed", e.description = `The key ${e.additional.ascii} was pressed`, e.no_code = 2, this.dispatch("keyboard:pressed", e.additional), e;
2065
- }, st = function(t, e) {
2066
- return e.additional = { open: !1 }, e.no_code = 3, t === "4f" ? (e.name = "door open", e.description = "The door was opened", e.additional.open = !0, this.dispatch("door:event", e.additional)) : t === "43" ? (e.name = "door close", e.description = "The door was closed", e.additional.open = !1, this.dispatch("door:event", e.additional)) : (e.name = "door event", e.description = "The door event received is unknown", this.dispatch("door:event", { open: e.additional.open, message: e })), e;
2067
2064
  }, at = function(t, e) {
2065
+ return e.additional = { open: !1 }, e.no_code = 3, t === "4f" ? (e.name = "door open", e.description = "The door was opened", e.additional.open = !0, this.dispatch("door:event", e.additional)) : t === "43" ? (e.name = "door close", e.description = "The door was closed", e.additional.open = !1, this.dispatch("door:event", e.additional)) : (e.name = "door event", e.description = "The door event received is unknown", this.dispatch("door:event", { open: e.additional.open, message: e })), e;
2066
+ }, st = function(t, e) {
2068
2067
  e.no_code = 404;
2069
2068
  let n = t[5] ?? null;
2070
2069
  return n && this.listenOnPort > 1 && (n = this.hexToDec(n) - this.listenOnPort + 1, n = this.decToHex(n)), n && (n === "FD" ? (e.no_code = 4, e.name = "channel disconnected", e.description = "The channel is disconnected", e.additional = { active: !1 }) : n === "FC" ? (e.no_code = 5, e.name = "channel connected", e.description = "The channel is connected", e.additional = { active: !0 }) : (e.no_code = 6, e.name = "channel sold out", e.description = "The channel is empty", e.additional = { active: !0 }), this.__device.channels.verification.running && (this.__device.channels.verification.channels.push({
@@ -2073,14 +2072,14 @@ l = new WeakSet(), Xe = function() {
2073
2072
  }), e.additional.selection = this.__device.channels.verification.current), this.dispatch("channel:status", e.additional)), e;
2074
2073
  }, ot = function(t, e) {
2075
2074
  e.no_code = 39, e.name = "Program version";
2076
- const n = t.slice(4, 12), s = n.map((c) => String.fromCharCode(this.hexToDec(c))).join("");
2077
- return e.additional = { version: s, hex: n }, e.description = `The program version is ${s}`, this.dispatch("program:version", e.additional), e;
2075
+ const n = t.slice(4, 12), a = n.map((c) => String.fromCharCode(this.hexToDec(c))).join("");
2076
+ return e.additional = { version: a, hex: n }, e.description = `The program version is ${a}`, this.dispatch("program:version", e.additional), e;
2078
2077
  }, lt = function(t, e) {
2079
2078
  e.no_code = 39, e.name = "Machine faults", e.description = "No faults detected", e.additional = { no_faults: 0, faults: [] };
2080
2079
  const n = t.slice(4, -3);
2081
2080
  if (n.length > 1 && n[0] !== "30") {
2082
2081
  e.description = "Machine has faults";
2083
- const s = {
2082
+ const a = {
2084
2083
  31: "Busy",
2085
2084
  32: "Invalid tray",
2086
2085
  33: "Invalid channel",
@@ -2115,40 +2114,40 @@ l = new WeakSet(), Xe = function() {
2115
2114
  64: "Product detector didn't change during its verification test"
2116
2115
  };
2117
2116
  for (const c of n)
2118
- s[c] && (e.additional.faults.push(s[c]), e.additional.no_faults++);
2117
+ a[c] && (e.additional.faults.push(a[c]), e.additional.no_faults++);
2119
2118
  }
2120
2119
  return this.dispatch("machine:faults", e.additional), e;
2121
2120
  }, ct = function(t, e) {
2122
2121
  e.no_code = 40, e.name = "Clock registers", e.description = "Clock registers";
2123
- const n = t.slice(4, -3), s = n.map((fe) => String.fromCharCode(this.hexToDec(fe))).join(""), [c, u] = s.split(" "), [d, b] = c.split(":"), [g, T, I] = u.split("-"), j = new Date(2e3 + parseInt(I), parseInt(T) - 1, parseInt(g), parseInt(d), parseInt(b));
2122
+ const n = t.slice(4, -3), a = n.map((fe) => String.fromCharCode(this.hexToDec(fe))).join(""), [c, u] = a.split(" "), [h, b] = c.split(":"), [g, T, I] = u.split("-"), U = new Date(2e3 + parseInt(I), parseInt(T) - 1, parseInt(g), parseInt(h), parseInt(b));
2124
2123
  return e.additional = {
2125
2124
  day: g,
2126
2125
  month: T,
2127
2126
  year: I,
2128
- hours: d,
2127
+ hours: h,
2129
2128
  minutes: b,
2130
- formatted: s,
2131
- date: j,
2129
+ formatted: a,
2130
+ date: U,
2132
2131
  hex: n
2133
2132
  }, this.dispatch("clock:registers", e.additional), e;
2134
- }, ht = function(t, e) {
2133
+ }, dt = function(t, e) {
2135
2134
  e.no_code = 41, e.name = "Machine activity", e.description = "Events from read machine activity";
2136
2135
  const n = String.fromCharCode(this.hexToDec(t[4]));
2137
2136
  if (n !== "0") {
2138
- const s = t.slice(5, -3);
2139
- if (n === "T" && s.length === 4) {
2140
- const c = String.fromCharCode(this.hexToDec(s[0])), u = String.fromCharCode(this.hexToDec(s[1])), d = String.fromCharCode(this.hexToDec(s[3]));
2137
+ const a = t.slice(5, -3);
2138
+ if (n === "T" && a.length === 4) {
2139
+ const c = String.fromCharCode(this.hexToDec(a[0])), u = String.fromCharCode(this.hexToDec(a[1])), h = String.fromCharCode(this.hexToDec(a[3]));
2141
2140
  e.additional = {
2142
2141
  ascii: n,
2143
2142
  type: "DU.d",
2144
2143
  dozens: c,
2145
2144
  units: u,
2146
- decimals: d,
2147
- time: parseFloat(`${c}${u}.${d}`),
2145
+ decimals: h,
2146
+ time: parseFloat(`${c}${u}.${h}`),
2148
2147
  meaning: "Extraction time (in seconds)"
2149
2148
  };
2150
- } else if (["B", "D", "E", "F", "G"].includes(n) && s.length === 3) {
2151
- const c = String.fromCharCode(this.hexToDec(s[0])), u = String.fromCharCode(this.hexToDec(s[1])), d = String.fromCharCode(this.hexToDec(s[2])), b = parseInt(`${c}${u}${d}`), g = {
2149
+ } else if (["B", "D", "E", "F", "G"].includes(n) && a.length === 3) {
2150
+ const c = String.fromCharCode(this.hexToDec(a[0])), u = String.fromCharCode(this.hexToDec(a[1])), h = String.fromCharCode(this.hexToDec(a[2])), b = parseInt(`${c}${u}${h}`), g = {
2152
2151
  B: "Error on going to tray channel",
2153
2152
  D: "Error on product detector",
2154
2153
  E: "Extraction of channel ok",
@@ -2159,14 +2158,14 @@ l = new WeakSet(), Xe = function() {
2159
2158
  type: "HDU",
2160
2159
  hundreds: c,
2161
2160
  dozens: u,
2162
- decimals: d,
2161
+ decimals: h,
2163
2162
  channel: b,
2164
2163
  selection: b - 109,
2165
2164
  ascii: n,
2166
2165
  meaning: g[n] ?? "Unknown"
2167
2166
  };
2168
- } else if (s.length === 13) {
2169
- const c = s.map((un) => String.fromCharCode(this.hexToDec(un))).join(""), u = parseInt(c.slice(0, 2)), d = parseInt(c.slice(2, 4)), b = parseInt(c.slice(4, 6)), g = parseInt(c.slice(7, 9)), T = parseInt(c.slice(9, 11)) - 1, I = 2e3 + parseInt(c.slice(11, 13)), j = new Date(I, T, g, u, d, b), fe = {
2167
+ } else if (a.length === 13) {
2168
+ const c = a.map((un) => String.fromCharCode(this.hexToDec(un))).join(""), u = parseInt(c.slice(0, 2)), h = parseInt(c.slice(2, 4)), b = parseInt(c.slice(4, 6)), g = parseInt(c.slice(7, 9)), T = parseInt(c.slice(9, 11)) - 1, I = 2e3 + parseInt(c.slice(11, 13)), U = new Date(I, T, g, u, h, b), fe = {
2170
2169
  A: "Attempt to close product exit door",
2171
2170
  C: "Closing of exterior door",
2172
2171
  H: "Error on opening of product exit door",
@@ -2186,16 +2185,16 @@ l = new WeakSet(), Xe = function() {
2186
2185
  };
2187
2186
  e.additional = {
2188
2187
  type: "hhmmssWddMMAA",
2189
- date: j,
2190
- hex: s,
2191
- formatted: j.toLocaleString(),
2188
+ date: U,
2189
+ hex: a,
2190
+ formatted: U.toLocaleString(),
2192
2191
  ascii: n,
2193
2192
  meaning: fe[n] ?? "Unknown"
2194
2193
  };
2195
2194
  }
2196
2195
  }
2197
2196
  return this.dispatch("machine:activity", e.additional), e;
2198
- }, dt = function(t, e) {
2197
+ }, ht = function(t, e) {
2199
2198
  const n = {
2200
2199
  30: "Spanish",
2201
2200
  31: "English",
@@ -2317,15 +2316,15 @@ l = new WeakSet(), Xe = function() {
2317
2316
  e.request = "--automatic", e = i(this, l, rt).call(this, t[3], e);
2318
2317
  break;
2319
2318
  case "50":
2320
- e.request = "--automatic", e = i(this, l, st).call(this, t[3], e);
2319
+ e.request = "--automatic", e = i(this, l, at).call(this, t[3], e);
2321
2320
  break;
2322
2321
  case "43":
2323
2322
  switch (e.request = "check-data", t[3]) {
2324
2323
  case "41":
2325
- e = i(this, l, ht).call(this, t, e);
2324
+ e = i(this, l, dt).call(this, t, e);
2326
2325
  break;
2327
2326
  case "43":
2328
- e.request = "channel-status", e = i(this, l, at).call(this, t, e);
2327
+ e.request = "channel-status", e = i(this, l, st).call(this, t, e);
2329
2328
  break;
2330
2329
  case "50":
2331
2330
  e = i(this, l, ot).call(this, t, e);
@@ -2343,7 +2342,7 @@ l = new WeakSet(), Xe = function() {
2343
2342
  e.request = "current-temperature", e = i(this, l, Dt).call(this, t, e);
2344
2343
  break;
2345
2344
  case "49":
2346
- e = i(this, l, dt).call(this, t[4], e);
2345
+ e = i(this, l, ht).call(this, t[4], e);
2347
2346
  break;
2348
2347
  case "5a":
2349
2348
  e = i(this, l, ut).call(this, t[4], e);
@@ -2388,9 +2387,9 @@ l = new WeakSet(), Xe = function() {
2388
2387
  break;
2389
2388
  }
2390
2389
  return e;
2391
- }, O = function() {
2390
+ }, L = function() {
2392
2391
  this.__internal__.dispense.dispensing && (this.__internal__.dispense.status = !0);
2393
- }, P = function() {
2392
+ }, F = function() {
2394
2393
  this.__internal__.dispense.dispensing && (this.__internal__.dispense.status = !1);
2395
2394
  }, oe = function() {
2396
2395
  this.__internal__.dispense.dispensing && (this.__internal__.dispense.status = "elevator-locked");
@@ -2399,98 +2398,98 @@ l = new WeakSet(), Xe = function() {
2399
2398
  * @param {null|string} type
2400
2399
  * @param {string} severity
2401
2400
  */
2402
- N = function({ type: t = null, severity: e = "low" } = {}) {
2401
+ P = function({ type: t = null, severity: e = "low" } = {}) {
2403
2402
  this.dispatch("jofemar:warning", { type: t, severity: e });
2404
2403
  }, /**
2405
2404
  * Dispatch an error message
2406
2405
  * @param {null|string} type
2407
2406
  * @param {string} severity
2408
2407
  */
2409
- U = function({ type: t = null, severity: e = "high" } = {}) {
2408
+ O = function({ type: t = null, severity: e = "high" } = {}) {
2410
2409
  this.dispatch("jofemar:error", { type: t, severity: e });
2411
2410
  }, It = function(t, e) {
2412
2411
  if (e.request = "status", t[1] && !t[2]) {
2413
2412
  switch (t[1]) {
2414
2413
  case "30":
2415
- e.name = "Machine ready", e.description = "The machine is ready for instructions", e.no_code = 9, i(this, l, O).call(this);
2414
+ e.name = "Machine ready", e.description = "The machine is ready for instructions", e.no_code = 9, i(this, l, L).call(this);
2416
2415
  break;
2417
2416
  case "31":
2418
2417
  e.name = "Machine busy", e.description = "The machine is busy right now", e.no_code = 10;
2419
2418
  break;
2420
2419
  case "32":
2421
- e.name = "Invalid tray", e.description = "The tray requested is invalid", e.no_code = 11, i(this, l, P).call(this), i(this, l, N).call(this, { type: "invalid-tray" });
2420
+ e.name = "Invalid tray", e.description = "The tray requested is invalid", e.no_code = 11, i(this, l, F).call(this), i(this, l, P).call(this, { type: "invalid-tray" });
2422
2421
  break;
2423
2422
  case "33":
2424
- e.name = "Invalid channel", e.description = "The channel requested is invalid", e.no_code = 12, i(this, l, P).call(this), i(this, l, N).call(this, { type: "invalid-channel" });
2423
+ e.name = "Invalid channel", e.description = "The channel requested is invalid", e.no_code = 12, i(this, l, F).call(this), i(this, l, P).call(this, { type: "invalid-channel" });
2425
2424
  break;
2426
2425
  case "34":
2427
- e.name = "Empty channel", e.description = "The channel requested is empty", e.no_code = 13, i(this, l, P).call(this), i(this, l, N).call(this, { type: "empty-channel" });
2426
+ e.name = "Empty channel", e.description = "The channel requested is empty", e.no_code = 13, i(this, l, F).call(this), i(this, l, P).call(this, { type: "empty-channel" });
2428
2427
  break;
2429
2428
  case "35":
2430
- e.name = "Jam", e.description = "Jam in elevator engine", e.no_code = 14, i(this, l, P).call(this), i(this, l, U).call(this, { type: "jam" });
2429
+ e.name = "Jam", e.description = "Jam in elevator engine", e.no_code = 14, i(this, l, F).call(this), i(this, l, O).call(this, { type: "jam" });
2431
2430
  break;
2432
2431
  case "36":
2433
- e.name = "Malfunction", e.description = "Malfunction in the elevator belt or product detector", e.no_code = 15, i(this, l, P).call(this), i(this, l, U).call(this, { type: "malfunction" });
2432
+ e.name = "Malfunction", e.description = "Malfunction in the elevator belt or product detector", e.no_code = 15, i(this, l, F).call(this), i(this, l, O).call(this, { type: "malfunction" });
2434
2433
  break;
2435
2434
  case "37":
2436
- e.name = "Photo transistors", e.description = "Failure in one of the photo transistors in the cabinet", e.no_code = 16, i(this, l, P).call(this), i(this, l, U).call(this, { type: "photo-transistors" });
2435
+ e.name = "Photo transistors", e.description = "Failure in one of the photo transistors in the cabinet", e.no_code = 16, i(this, l, F).call(this), i(this, l, O).call(this, { type: "photo-transistors" });
2437
2436
  break;
2438
2437
  case "38":
2439
- e.name = "Without channels", e.description = "No channels detected", e.no_code = 17, i(this, l, P).call(this), i(this, l, U).call(this, { type: "without-channels" });
2438
+ e.name = "Without channels", e.description = "No channels detected", e.no_code = 17, i(this, l, F).call(this), i(this, l, O).call(this, { type: "without-channels" });
2440
2439
  break;
2441
2440
  case "39":
2442
- e.name = "Product detector fault", e.description = "Product detector fault", e.no_code = 18, i(this, l, oe).call(this), i(this, l, N).call(this, { type: "fault-product-detector" });
2441
+ e.name = "Product detector fault", e.description = "Product detector fault", e.no_code = 18, i(this, l, oe).call(this), i(this, l, P).call(this, { type: "fault-product-detector" });
2443
2442
  break;
2444
2443
  case "41":
2445
- e.name = "Fault in 485 BUS", e.description = "Machine display is disconnected", e.no_code = 19, i(this, l, O).call(this), i(this, l, N).call(this, { type: "display-disconnected" });
2444
+ e.name = "Fault in 485 BUS", e.description = "Machine display is disconnected", e.no_code = 19, i(this, l, L).call(this), i(this, l, P).call(this, { type: "display-disconnected" });
2446
2445
  break;
2447
2446
  case "42":
2448
- e.name = "Product under elevator", e.description = "Product alarm under elevator", e.no_code = 20, i(this, l, P).call(this), i(this, l, N).call(this, { type: "product-under-elevator" });
2447
+ e.name = "Product under elevator", e.description = "Product alarm under elevator", e.no_code = 20, i(this, l, F).call(this), i(this, l, P).call(this, { type: "product-under-elevator" });
2449
2448
  break;
2450
2449
  case "43":
2451
- e.name = "Error when elevator approaching to a position", e.description = "Error when elevator approaching to a position", e.no_code = 21, i(this, l, O).call(this), i(this, l, N).call(this, { type: "error-approaching-position", severity: "high" });
2450
+ e.name = "Error when elevator approaching to a position", e.description = "Error when elevator approaching to a position", e.no_code = 21, i(this, l, L).call(this), i(this, l, P).call(this, { type: "error-approaching-position", severity: "high" });
2452
2451
  break;
2453
2452
  case "44":
2454
- e.name = "Fault in keyboard", e.description = "Fault in keyboard", e.no_code = 22, i(this, l, P).call(this), i(this, l, U).call(this, { type: "fault-keyboard" });
2453
+ e.name = "Fault in keyboard", e.description = "Fault in keyboard", e.no_code = 22, i(this, l, F).call(this), i(this, l, O).call(this, { type: "fault-keyboard" });
2455
2454
  break;
2456
2455
  case "45":
2457
- e.name = "Eeprom writing error", e.description = "Eeprom writing error", e.no_code = 23, i(this, l, P).call(this), i(this, l, U).call(this, { type: "eeprom-writing-error", severity: "critical" });
2456
+ e.name = "Eeprom writing error", e.description = "Eeprom writing error", e.no_code = 23, i(this, l, F).call(this), i(this, l, O).call(this, { type: "eeprom-writing-error", severity: "critical" });
2458
2457
  break;
2459
2458
  case "46":
2460
- e.name = "Fault communicating with temperature control", e.description = "Fault communicating with temperature control", e.no_code = 24, i(this, l, O).call(this), i(this, l, N).call(this, { type: "fault-temperature-control" });
2459
+ e.name = "Fault communicating with temperature control", e.description = "Fault communicating with temperature control", e.no_code = 24, i(this, l, L).call(this), i(this, l, P).call(this, { type: "fault-temperature-control" });
2461
2460
  break;
2462
2461
  case "47":
2463
- e.name = "Thermometer disconnected", e.description = "The thermometer is disconnected", e.no_code = 25, i(this, l, O).call(this), i(this, l, N).call(this, { type: "thermometer-disconnected" });
2462
+ e.name = "Thermometer disconnected", e.description = "The thermometer is disconnected", e.no_code = 25, i(this, l, L).call(this), i(this, l, P).call(this, { type: "thermometer-disconnected" });
2464
2463
  break;
2465
2464
  case "48":
2466
- e.name = "Thermometer programming lost", e.description = "Thermometer programming lost", e.no_code = 26, i(this, l, O).call(this), i(this, l, N).call(this, { type: "thermometer-programming-lost" });
2465
+ e.name = "Thermometer programming lost", e.description = "Thermometer programming lost", e.no_code = 26, i(this, l, L).call(this), i(this, l, P).call(this, { type: "thermometer-programming-lost" });
2467
2466
  break;
2468
2467
  case "49":
2469
- e.name = "Thermometer faulty", e.description = "Thermometer faulty", e.no_code = 27, i(this, l, O).call(this), i(this, l, N).call(this, { type: "thermometer-faulty" });
2468
+ e.name = "Thermometer faulty", e.description = "Thermometer faulty", e.no_code = 27, i(this, l, L).call(this), i(this, l, P).call(this, { type: "thermometer-faulty" });
2470
2469
  break;
2471
2470
  case "4a":
2472
- e.name = "Channels power consumption detector faulty", e.description = "Channels power consumption detector faulty", e.no_code = 28, i(this, l, P).call(this), i(this, l, U).call(this, { type: "channels-power-consumption-detector-faulty", severity: "critical" });
2471
+ e.name = "Channels power consumption detector faulty", e.description = "Channels power consumption detector faulty", e.no_code = 28, i(this, l, F).call(this), i(this, l, O).call(this, { type: "channels-power-consumption-detector-faulty", severity: "critical" });
2473
2472
  break;
2474
2473
  case "4b":
2475
- e.name = "Elevator does not find channel or tray", e.description = "Elevator does not find channel or tray", e.no_code = 29, i(this, l, P).call(this), i(this, l, N).call(this, { type: "elevator-not-find-channel-tray" });
2474
+ e.name = "Elevator does not find channel or tray", e.description = "Elevator does not find channel or tray", e.no_code = 29, i(this, l, F).call(this), i(this, l, P).call(this, { type: "elevator-not-find-channel-tray" });
2476
2475
  break;
2477
2476
  case "4c":
2478
- e.name = "Elevator does not find delivery product position", e.description = "Elevator does not find delivery product position", e.no_code = 30, i(this, l, P).call(this), i(this, l, U).call(this, { type: "elevator-not-find-delivery-position" });
2477
+ e.name = "Elevator does not find delivery product position", e.description = "Elevator does not find delivery product position", e.no_code = 30, i(this, l, F).call(this), i(this, l, O).call(this, { type: "elevator-not-find-delivery-position" });
2479
2478
  break;
2480
2479
  case "4d":
2481
- e.name = "Interior of elevator blocked", e.description = "Interior of elevator blocked", e.no_code = 31, i(this, l, oe).call(this), this.__internal__.dispense.elevator.need_reset || (this.__internal__.dispense.elevator.need_reset = !0), i(this, l, U).call(this, { type: "interior-elevator-blocked", severity: "low" });
2480
+ e.name = "Interior of elevator blocked", e.description = "Interior of elevator blocked", e.no_code = 31, i(this, l, oe).call(this), this.__internal__.dispense.elevator.need_reset || (this.__internal__.dispense.elevator.need_reset = !0), i(this, l, O).call(this, { type: "interior-elevator-blocked", severity: "low" });
2482
2481
  break;
2483
2482
  case "4e":
2484
- e.name = "Error in tester of product detector", e.description = "Error in tester of product detector", e.no_code = 32, i(this, l, P).call(this), i(this, l, U).call(this, { type: "error-tester-product-detector" });
2483
+ e.name = "Error in tester of product detector", e.description = "Error in tester of product detector", e.no_code = 32, i(this, l, F).call(this), i(this, l, O).call(this, { type: "error-tester-product-detector" });
2485
2484
  break;
2486
2485
  case "4f":
2487
2486
  e.name = "Waiting for product to be removed", e.description = "Waiting for product to be removed", e.no_code = 33, i(this, l, oe).call(this);
2488
2487
  break;
2489
2488
  case "50":
2490
- e.name = "Product expired by temperature reasons", e.description = "Product expired by temperature reasons", e.no_code = 34, i(this, l, O).call(this), i(this, l, N).call(this, { type: "product-expired-temperature" });
2489
+ e.name = "Product expired by temperature reasons", e.description = "Product expired by temperature reasons", e.no_code = 34, i(this, l, L).call(this), i(this, l, P).call(this, { type: "product-expired-temperature" });
2491
2490
  break;
2492
2491
  case "51":
2493
- e.name = "Automatic door faulty", e.description = "Automatic door faulty", e.no_code = 35, i(this, l, O).call(this), i(this, l, N).call(this, { type: "automatic-door-faulty" });
2492
+ e.name = "Automatic door faulty", e.description = "Automatic door faulty", e.no_code = 35, i(this, l, L).call(this), i(this, l, P).call(this, { type: "automatic-door-faulty" });
2494
2493
  break;
2495
2494
  case "59":
2496
2495
  case "5a":
@@ -2511,15 +2510,15 @@ U = function({ type: t = null, severity: e = "high" } = {}) {
2511
2510
  e.additional.nsf_alarm = 5;
2512
2511
  break;
2513
2512
  }
2514
- e.no_code = 36, i(this, l, O).call(this), i(this, l, N).call(this, { type: "product-expired" });
2513
+ e.no_code = 36, i(this, l, L).call(this), i(this, l, P).call(this, { type: "product-expired" });
2515
2514
  break;
2516
2515
  case "64":
2517
- e.name = "Product detector didn't change during its verification test", e.description = "Product detector didn't change during its verification test", e.no_code = 37, i(this, l, O).call(this), i(this, l, N).call(this, { type: "automatic-door-faulty" });
2516
+ e.name = "Product detector didn't change during its verification test", e.description = "Product detector didn't change during its verification test", e.no_code = 37, i(this, l, L).call(this), i(this, l, P).call(this, { type: "automatic-door-faulty" });
2518
2517
  break;
2519
2518
  }
2520
2519
  this.dispatch("machine:status", e);
2521
2520
  } else
2522
- e.name = "executed", e.description = "The last command was executed successfully", e.no_code = 8, !t[1] && this.__internal__.dispense.dispensing && i(this, l, P).call(this);
2521
+ e.name = "executed", e.description = "The last command was executed successfully", e.no_code = 8, !t[1] && this.__internal__.dispense.dispensing && i(this, l, F).call(this);
2523
2522
  return e;
2524
2523
  }, St = function(t) {
2525
2524
  if (t = parseInt(t) + 109, t = t.toString(), t.length !== 3)
@@ -2536,23 +2535,23 @@ U = function({ type: t = null, severity: e = "high" } = {}) {
2536
2535
  });
2537
2536
  }, t.__internal__.dispense.interval_time);
2538
2537
  }, t.__internal__.dispense.timeout_time);
2539
- }, X = async function(t) {
2540
- const e = i(this, l, F).call(this, ["02", "30", "30", "81", "52", t, "FF"]);
2541
- return await i(this, l, R).call(this, e, "reset");
2538
+ }, Z = async function(t) {
2539
+ const e = ["02", "30", "30", "81", "52", t, "FF"];
2540
+ return await i(this, l, B).call(this, e, "reset");
2542
2541
  }, Ce = function() {
2543
- const t = this.__device.type === "iceplus" ? we(40) : we(25), e = /* @__PURE__ */ new Date(), n = 1e3 * t + e.getTime(), s = new Date(n);
2542
+ const t = this.__device.type === "iceplus" ? we(40) : we(25), e = /* @__PURE__ */ new Date(), n = 1e3 * t + e.getTime(), a = new Date(n);
2544
2543
  this.dispatch("reset:errors", {
2545
2544
  description: "Resetting machine errors",
2546
2545
  duration: t,
2547
2546
  started_at: e,
2548
- finished_at: s
2547
+ finished_at: a
2549
2548
  });
2550
2549
  }, xe = async function(t) {
2551
- const e = i(this, l, F).call(this, ["02", "30", "30", "81", "4C", t, "FF"]);
2552
- return await i(this, l, R).call(this, e, "lights");
2550
+ const e = ["02", "30", "30", "81", "4C", t, "FF"];
2551
+ return await i(this, l, B).call(this, e, "lights");
2553
2552
  }, le = async function(t = "80", e = []) {
2554
- const n = i(this, l, F).call(this, ["02", "30", "30", "81", "44", t, ...e]);
2555
- return await i(this, l, R).call(this, n, "display");
2553
+ const n = ["02", "30", "30", "81", "44", t, ...e];
2554
+ return await i(this, l, B).call(this, n, "display");
2556
2555
  }, ce = function(t = "") {
2557
2556
  t = t.padEnd(32, " ");
2558
2557
  const e = [];
@@ -2561,24 +2560,24 @@ U = function({ type: t = null, severity: e = "high" } = {}) {
2561
2560
  return e;
2562
2561
  }, Pt = function(t) {
2563
2562
  if (!(t instanceof Date)) throw new Error("Invalid date, must be an instance of Date");
2564
- const e = t.getHours().toString().padStart(2, "0"), n = t.getMinutes().toString().padStart(2, "0"), s = t.getDate().toString().padStart(2, "0"), c = (t.getMonth() + 1).toString().padStart(2, "0"), u = t.getFullYear().toString().substring(2, 4), d = `${e}:${n} ${s}-${c}-${u}`, b = [];
2563
+ const e = t.getHours().toString().padStart(2, "0"), n = t.getMinutes().toString().padStart(2, "0"), a = t.getDate().toString().padStart(2, "0"), c = (t.getMonth() + 1).toString().padStart(2, "0"), u = t.getFullYear().toString().substring(2, 4), h = `${e}:${n} ${a}-${c}-${u}`, b = [];
2565
2564
  for (let g = 0; g < 14; g++)
2566
- b.push(d.charCodeAt(g).toString(16));
2565
+ b.push(h.charCodeAt(g).toString(16));
2567
2566
  return b;
2568
2567
  };
2569
- var te, J, z, h, Nt, At, he, Bt, Rt, qt, Ht, Lt, Ot, Ut, jt, Te, Wt, $t, Qt, Vt, Jt, zt, Gt, Yt, Kt, Zt, Xt, en, tn, nn, q, de, rn, sn, an, on, De, ue, ln, cn, Ee, Ie, Se;
2570
- class Tn extends Y {
2568
+ var ee, V, J, d, Nt, At, de, Bt, Rt, qt, Ht, Lt, Ot, Ut, jt, Te, Wt, $t, Qt, Vt, Jt, zt, Gt, Yt, Kt, Zt, Xt, en, tn, nn, R, he, rn, an, sn, on, De, ue, ln, cn, Ee, Ie, Se;
2569
+ class Tn extends G {
2571
2570
  constructor({
2572
2571
  filters: t = null,
2573
2572
  config_port: e = null,
2574
2573
  no_device: n = 1
2575
2574
  } = {}) {
2576
2575
  super({ filters: t, config_port: e, no_device: n });
2577
- S(this, h);
2578
- B(this, "__coin_purse", {
2576
+ S(this, d);
2577
+ A(this, "__coin_purse", {
2579
2578
  available: !0
2580
2579
  });
2581
- B(this, "__banknote_purse", {
2580
+ A(this, "__banknote_purse", {
2582
2581
  available: !0,
2583
2582
  isRecycler: !0,
2584
2583
  recycler: {
@@ -2587,7 +2586,7 @@ class Tn extends Y {
2587
2586
  // 0: $20, 1: $50, 2: $100, 3: $200, 4: $500
2588
2587
  }
2589
2588
  });
2590
- B(this, "__sale", {
2589
+ A(this, "__sale", {
2591
2590
  price: 0,
2592
2591
  change: 0,
2593
2592
  change_verified: 0,
@@ -2597,40 +2596,40 @@ class Tn extends Y {
2597
2596
  this.price = 0, this.change = 0, this.change_verified = 0, this.dispense_all = !0, this.last_change = 0;
2598
2597
  }
2599
2598
  });
2600
- B(this, "__money_session", {
2599
+ A(this, "__money_session", {
2601
2600
  inserted: 0,
2602
2601
  retired: 0,
2603
2602
  clear() {
2604
2603
  this.inserted = 0, this.retired = 0;
2605
2604
  }
2606
2605
  });
2607
- B(this, "coins", {
2606
+ A(this, "coins", {
2608
2607
  tubes: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
2609
2608
  box: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
2610
2609
  totals: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
2611
2610
  total: 0
2612
2611
  });
2613
- B(this, "banknotes", {
2612
+ A(this, "banknotes", {
2614
2613
  stacker: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
2615
2614
  recycler: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
2616
2615
  out: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
2617
2616
  totals: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
2618
2617
  total: 0
2619
2618
  });
2620
- B(this, "card_reader", {
2619
+ A(this, "card_reader", {
2621
2620
  available: !1,
2622
2621
  max_pre_credit: 0
2623
2622
  });
2624
- S(this, te, !1);
2623
+ S(this, ee, !1);
2624
+ S(this, V, 0);
2625
2625
  S(this, J, 0);
2626
- S(this, z, 0);
2627
2626
  if (this.__internal__.device.type = "boardroid", D.getCustom(this.typeDevice, n)) throw new Error(`Device ${this.typeDevice} ${n} already exists`);
2628
2627
  this.__internal__.serial.config_port.baudRate = 115200, this.__internal__.serial.response.length = 14, this.__internal__.time.response_connection = 600, this.__internal__.time.response_general = 4e3, this.__internal__.dispense.limit_counter = 15, this.__internal__.dispense.custom_limit_counter = null, this.__internal__.dispense.backup_dispense = {
2629
2628
  channel: 1,
2630
2629
  second_channel: null,
2631
2630
  sensor: !0,
2632
2631
  seconds: null
2633
- }, i(this, h, Nt).call(this), i(this, h, At).call(this);
2632
+ }, i(this, d, Nt).call(this), i(this, d, At).call(this);
2634
2633
  }
2635
2634
  get totalInTubes() {
2636
2635
  return this.coins.tubes.g50 * 0.5 + this.coins.tubes.c50 * 0.5 + this.coins.tubes.p1 + this.coins.tubes.p2 * 2 + this.coins.tubes.p5 * 5 + this.coins.tubes.p10 * 10;
@@ -2675,8 +2674,8 @@ class Tn extends Y {
2675
2674
  }
2676
2675
  serialBoardroidSumHex(t) {
2677
2676
  let e = 0;
2678
- return t.forEach((n, s) => {
2679
- s !== 0 && s !== 11 && (e += parseInt(n, 16));
2677
+ return t.forEach((n, a) => {
2678
+ a !== 0 && a !== 11 && (e += parseInt(n, 16));
2680
2679
  }), e.toString(16).toUpperCase();
2681
2680
  }
2682
2681
  serialMessage(t) {
@@ -2690,46 +2689,46 @@ class Tn extends Y {
2690
2689
  const n = (5 + this.deviceNumber).toString(16).padStart(2, "0").toLowerCase();
2691
2690
  switch (t[1]) {
2692
2691
  case n:
2693
- e.request = "connect", e = i(this, h, Rt).call(this, e);
2692
+ e.request = "connect", e = i(this, d, Rt).call(this, e);
2694
2693
  break;
2695
2694
  case "a0":
2696
- e.request = "--automatic", e = i(this, h, Wt).call(this, t, e);
2695
+ e.request = "--automatic", e = i(this, d, Wt).call(this, t, e);
2697
2696
  break;
2698
2697
  case "b0":
2699
- e.request = "--automatic", e = i(this, h, $t).call(this, t, e);
2698
+ e.request = "--automatic", e = i(this, d, $t).call(this, t, e);
2700
2699
  break;
2701
2700
  case "d0":
2702
- e.request = "coin-purse:config", e = i(this, h, Qt).call(this, t[2], e);
2701
+ e.request = "coin-purse:config", e = i(this, d, Qt).call(this, t[2], e);
2703
2702
  break;
2704
2703
  case "d1":
2705
- e.request = "banknote-purse:config", e.additional = { scrow: null }, e = i(this, h, Vt).call(this, t, e);
2704
+ e.request = "banknote-purse:config", e.additional = { scrow: null }, e = i(this, d, Vt).call(this, t, e);
2706
2705
  break;
2707
2706
  case "d2":
2708
- e.request = "coin-purse:read-tubes", e = i(this, h, Jt).call(this, t, e);
2707
+ e.request = "coin-purse:read-tubes", e = i(this, d, Jt).call(this, t, e);
2709
2708
  break;
2710
2709
  case "d3":
2711
- e.request = "banknote-purse:read-recycler", e = i(this, h, zt).call(this, t, e);
2710
+ e.request = "banknote-purse:read-recycler", e = i(this, d, zt).call(this, t, e);
2712
2711
  break;
2713
2712
  case "d4":
2714
- e.request = "banknote-purse:banknote-scrow-status", e = i(this, h, Gt).call(this, t[2], e);
2713
+ e.request = "banknote-purse:banknote-scrow-status", e = i(this, d, Gt).call(this, t[2], e);
2715
2714
  break;
2716
2715
  case "d5":
2717
- e.request = "banknote-purse:dispense", e = i(this, h, Yt).call(this, t, e);
2716
+ e.request = "banknote-purse:dispense", e = i(this, d, Yt).call(this, t, e);
2718
2717
  break;
2719
2718
  case "d6":
2720
- e.request = "coin-purse:dispense", e = i(this, h, Kt).call(this, t, e);
2719
+ e.request = "coin-purse:dispense", e = i(this, d, Kt).call(this, t, e);
2721
2720
  break;
2722
2721
  case "d7":
2723
- e.request = "dispense", e = i(this, h, Zt).call(this, t[5], e);
2722
+ e.request = "dispense", e = i(this, d, Zt).call(this, t[5], e);
2724
2723
  break;
2725
2724
  case "d8":
2726
- e.request = "--automatic", e = i(this, h, Xt).call(this, t[13], e);
2725
+ e.request = "--automatic", e = i(this, d, Xt).call(this, t[13], e);
2727
2726
  break;
2728
2727
  case "d9":
2729
- e.request = "status:temperature", e = i(this, h, en).call(this, t, e);
2728
+ e.request = "status:temperature", e = i(this, d, en).call(this, t, e);
2730
2729
  break;
2731
2730
  case "da":
2732
- e.request = "status:relay", e = i(this, h, tn).call(this, t[2], e);
2731
+ e.request = "status:relay", e = i(this, d, tn).call(this, t[2], e);
2733
2732
  break;
2734
2733
  case "db":
2735
2734
  e.request = "banknote-purse:save-memory", e.no_code = 18, e.name = "Bill purse memory saved?", e.description = "The memory of bill purse was saved successfully?", this.dispatch("banknote-purse:save-memory", { message: e });
@@ -2738,7 +2737,7 @@ class Tn extends Y {
2738
2737
  e.request = "coin-purse:read-memory", e.no_code = 19, e.name = "Coin purse memory read?", e.description = "The memory of coin purse was read successfully?", this.dispatch("banknote-purse:read-memory", { message: e });
2739
2738
  break;
2740
2739
  case "dd":
2741
- e.request = "card-reader", i(this, h, nn).call(this, t, e);
2740
+ e.request = "card-reader", i(this, d, nn).call(this, t, e);
2742
2741
  break;
2743
2742
  default:
2744
2743
  e.request = "--unknown", e.name = "Response unrecognized", e.description = "The response of application was received, but dont identify with any of current parameters", e.no_code = 400, this.dispatch("unknown", e);
@@ -2753,7 +2752,7 @@ class Tn extends Y {
2753
2752
  async coinPurseConfigure({ enable: t = !1, high: e = "FF", low: n = "FF" } = {}) {
2754
2753
  if (!this.__coin_purse.available) throw new Error("Coin purse not available");
2755
2754
  const c = ["F1", "C1", t ? "01" : "00", e, n, "00", "00", "00", "00", "00", "F2", "00"];
2756
- await i(this, h, q).call(this, c, "coin-purse:config");
2755
+ await i(this, d, R).call(this, c, "coin-purse:config");
2757
2756
  }
2758
2757
  async coinPurseEnable() {
2759
2758
  await this.coinPurseConfigure({ enable: !0 });
@@ -2761,40 +2760,40 @@ class Tn extends Y {
2761
2760
  async coinPurseDisable() {
2762
2761
  await this.coinPurseConfigure({ enable: !1 });
2763
2762
  }
2764
- async coinPurseDispense({ $_50c: t = 0, $_1: e = 0, $_2: n = 0, $_5: s = 0, $_10: c = 0 } = {}) {
2763
+ async coinPurseDispense({ $_50c: t = 0, $_1: e = 0, $_2: n = 0, $_5: a = 0, $_10: c = 0 } = {}) {
2765
2764
  if (!this.__coin_purse.available) throw new Error("Coin purse not available");
2766
- if ([t, e, n, s, c].some((d) => isNaN(d) || typeof d == "string"))
2765
+ if ([t, e, n, a, c].some((h) => isNaN(h) || typeof h == "string"))
2767
2766
  throw new Error("One of the values is not a number");
2768
- if (t < 1 && e < 1 && n < 1 && s < 1 && c < 1) throw new Error("No coins to dispense");
2769
- [t, e, n, s, c] = [
2767
+ if (t < 1 && e < 1 && n < 1 && a < 1 && c < 1) throw new Error("No coins to dispense");
2768
+ [t, e, n, a, c] = [
2770
2769
  this.decToHex(t),
2771
2770
  this.decToHex(e),
2772
2771
  this.decToHex(n),
2773
- this.decToHex(s),
2772
+ this.decToHex(a),
2774
2773
  this.decToHex(c)
2775
2774
  ];
2776
- let u = ["F1", "C6", t, e, n, s, c, "00", "00", "00", "F2", "00"];
2777
- await i(this, h, q).call(this, u, "coin-purse:dispense");
2775
+ let u = ["F1", "C6", t, e, n, a, c, "00", "00", "00", "F2", "00"];
2776
+ await i(this, d, R).call(this, u, "coin-purse:dispense");
2778
2777
  }
2779
2778
  async coinPurseReadTubes() {
2780
2779
  const t = ["F1", "C2", "00", "00", "00", "00", "00", "00", "00", "00", "F2", "00"];
2781
- await i(this, h, q).call(this, t, "coin-purse:read-tubes");
2780
+ await i(this, d, R).call(this, t, "coin-purse:read-tubes");
2782
2781
  }
2783
2782
  async banknotePurseConfigure({ enable: t = !1, scrow: e = !1 } = {}) {
2784
2783
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
2785
2784
  let n;
2786
- return i(this, h, he).call(this) ? n = i(this, h, rn).call(this, { enable: t, scrow: e }) : n = i(this, h, sn).call(this, { enable: t, scrow: e }), await i(this, h, q).call(this, n, "banknote-purse:config");
2785
+ return i(this, d, de).call(this) ? n = i(this, d, rn).call(this, { enable: t, scrow: e }) : n = i(this, d, an).call(this, { enable: t, scrow: e }), await i(this, d, R).call(this, n, "banknote-purse:config");
2787
2786
  }
2788
- async banknotePurseDispense({ $_20: t = 0, $_50: e = 0, $_100: n = 0, $_200: s = 0, $_500: c = 0, $_1000: u = 0 } = {}) {
2787
+ async banknotePurseDispense({ $_20: t = 0, $_50: e = 0, $_100: n = 0, $_200: a = 0, $_500: c = 0, $_1000: u = 0 } = {}) {
2789
2788
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
2790
2789
  if (!this.__banknote_purse.isRecycler) throw new Error("Banknote purse is not recycler");
2791
- let d;
2792
- if (i(this, h, he).call(this)) {
2793
- const b = [t, e, n, s, c];
2794
- d = i(this, h, an).call(this, b[this.__banknote_purse.recycler.banknote]);
2790
+ let h;
2791
+ if (i(this, d, de).call(this)) {
2792
+ const b = [t, e, n, a, c];
2793
+ h = i(this, d, sn).call(this, b[this.__banknote_purse.recycler.banknote]);
2795
2794
  } else
2796
- d = i(this, h, on).call(this, { $_20: t, $_50: e, $_100: n, $_200: s, $_500: c, $_1000: u });
2797
- await i(this, h, q).call(this, d, "banknote-purse:dispense");
2795
+ h = i(this, d, on).call(this, { $_20: t, $_50: e, $_100: n, $_200: a, $_500: c, $_1000: u });
2796
+ await i(this, d, R).call(this, h, "banknote-purse:dispense");
2798
2797
  }
2799
2798
  async banknotePurseEnable({ scrow: t = !1 }) {
2800
2799
  return await this.banknotePurseConfigure({ enable: !0, scrow: t });
@@ -2805,24 +2804,24 @@ class Tn extends Y {
2805
2804
  async banknotePurseAcceptInScrow() {
2806
2805
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
2807
2806
  const t = ["F1", "C4", "01", "00", "00", "00", "00", "00", "00", "00", "F2", "00"];
2808
- await i(this, h, q).call(this, t, "banknote-purse:banknote-scrow-status");
2807
+ await i(this, d, R).call(this, t, "banknote-purse:banknote-scrow-status");
2809
2808
  }
2810
2809
  async banknotePurseRejectInScrow() {
2811
2810
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
2812
2811
  const t = ["F1", "C4", "00", "00", "00", "00", "00", "00", "00", "00", "F2", "00"];
2813
- await i(this, h, q).call(this, t, "banknote-purse:banknote-scrow-status");
2812
+ await i(this, d, R).call(this, t, "banknote-purse:banknote-scrow-status");
2814
2813
  }
2815
2814
  async banknotePurseSaveMemory({
2816
2815
  channel: t = null,
2817
2816
  $_20: e = null,
2818
2817
  $_50: n = null,
2819
- $_100: s = null,
2818
+ $_100: a = null,
2820
2819
  $_200: c = null,
2821
2820
  $_500: u = null,
2822
- $_1000: d = null
2821
+ $_1000: h = null
2823
2822
  } = {}) {
2824
2823
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
2825
- if (t === null || e === null || n === null || s === null || c === null || u === null || d === null)
2824
+ if (t === null || e === null || n === null || a === null || c === null || u === null || h === null)
2826
2825
  throw new Error("One of the values is not defined");
2827
2826
  const b = [
2828
2827
  "F1",
@@ -2831,39 +2830,39 @@ class Tn extends Y {
2831
2830
  "00",
2832
2831
  this.decToHex(e),
2833
2832
  this.decToHex(n),
2834
- this.decToHex(s),
2833
+ this.decToHex(a),
2835
2834
  this.decToHex(c),
2836
2835
  this.decToHex(u),
2837
- this.decToHex(d),
2836
+ this.decToHex(h),
2838
2837
  "F2",
2839
2838
  "00"
2840
2839
  ];
2841
- await i(this, h, q).call(this, b, "banknote-purse:save-memory");
2840
+ await i(this, d, R).call(this, b, "banknote-purse:save-memory");
2842
2841
  }
2843
2842
  async banknotePurseReadRecycler() {
2844
2843
  if (!this.__banknote_purse.available) throw new Error("Banknote purse not available");
2845
2844
  if (!this.__banknote_purse.isRecycler) throw new Error("Banknote purse is not recycler");
2846
2845
  const t = ["F1", "C3", "00", "00", "00", "00", "00", "00", "00", "00", "F2", "B5"];
2847
- return await i(this, h, q).call(this, t, "banknote-purse:read-recycler");
2846
+ return await i(this, d, R).call(this, t, "banknote-purse:read-recycler");
2848
2847
  }
2849
2848
  async cardReaderDisable() {
2850
2849
  if (!this.card_reader.available) throw new Error("Card reader not available");
2851
2850
  const t = ["F1", "CD", "00", "00", "00", "00", "00", "00", "00", "00", "F2", "00"];
2852
- return await i(this, h, q).call(this, t, "card-reader:disable");
2851
+ return await i(this, d, R).call(this, t, "card-reader:disable");
2853
2852
  }
2854
- async cardReaderDispense({ channel: t = 1, second_channel: e = null, sensor: n = !0, seconds: s = null, price: c = 0 } = {}) {
2853
+ async cardReaderDispense({ channel: t = 1, second_channel: e = null, sensor: n = !0, seconds: a = null, price: c = 0 } = {}) {
2855
2854
  if (!this.card_reader.available) throw new Error("Card reader not available");
2856
2855
  if (isNaN(this.card_reader.max_pre_credit) || this.card_reader.max_pre_credit === 0) throw new Error("Card reader pre-credit not configured");
2857
2856
  if (isNaN(c) || c <= 0) throw new Error("Price must be greater than 0");
2858
2857
  if (c > this.card_reader.max_pre_credit) throw new Error("Price is greater than pre-credit configured");
2859
- if (!n && (s === null || s <= 0 || s > 40)) throw new Error("Invalid time to dispense without sensor, must be between 0.1 and 40.0 seconds");
2860
- const u = this.decToHex(c / 256), d = this.decToHex(c % 256), b = this.decToHex(t + 9);
2858
+ if (!n && (a === null || a <= 0 || a > 40)) throw new Error("Invalid time to dispense without sensor, must be between 0.1 and 40.0 seconds");
2859
+ const u = this.decToHex(c / 256), h = this.decToHex(c % 256), b = this.decToHex(t + 9);
2861
2860
  let g = "00";
2862
2861
  e && (g = this.decToHex(e + 9));
2863
2862
  let T = "00";
2864
- n || (T = this.decToHex(s * 10));
2865
- const I = ["F1", "CD", "01", b, g, T, u, d, "00", "00", "F2", "00"];
2866
- await i(this, h, q).call(this, I, "card-reader:dispense");
2863
+ n || (T = this.decToHex(a * 10));
2864
+ const I = ["F1", "CD", "01", b, g, T, u, h, "00", "00", "F2", "00"];
2865
+ await i(this, d, R).call(this, I, "card-reader:dispense");
2867
2866
  }
2868
2867
  async paymentPursesDisable({ coin: t = !0, banknote: e = !0, cardReader: n = !1 } = {}) {
2869
2868
  t && await this.coinPurseDisable(), e && await this.banknotePurseDisable(), n && await this.cardReaderDisable();
@@ -2873,7 +2872,7 @@ class Tn extends Y {
2873
2872
  }
2874
2873
  async coolingRelayConfigure({ enable: t = !1 } = {}) {
2875
2874
  const n = ["F1", "CC", t ? "01" : "00", "00", "00", "00", "00", "00", "00", "00", "F2", "00"];
2876
- return await i(this, h, q).call(this, n, "status:relay");
2875
+ return await i(this, d, R).call(this, n, "status:relay");
2877
2876
  }
2878
2877
  async coolingRelayEnable() {
2879
2878
  return await this.coolingRelayConfigure({ enable: !0 });
@@ -2883,7 +2882,7 @@ class Tn extends Y {
2883
2882
  }
2884
2883
  async readTemperature() {
2885
2884
  const t = ["F1", "CB", "00", "00", "00", "00", "00", "00", "00", "00", "F2", "00"];
2886
- return await i(this, h, q).call(this, t, "status:temperature");
2885
+ return await i(this, d, R).call(this, t, "status:temperature");
2887
2886
  }
2888
2887
  /**
2889
2888
  * Dispense a product from the machine
@@ -2898,64 +2897,64 @@ class Tn extends Y {
2898
2897
  selection: t = 1,
2899
2898
  second_selection: e = null,
2900
2899
  sensor: n = !0,
2901
- seconds: s = null,
2900
+ seconds: a = null,
2902
2901
  retry: c = !0
2903
2902
  } = {}) {
2904
2903
  if (t = parseInt(t), isNaN(t) || t < 1 || t > 80) throw new Error("Invalid channel number");
2905
2904
  if (e !== null && (e < 1 || e > 80 || e === t)) throw new Error("Invalid second channel number");
2906
- if (!n && (s === null || s <= 0 || s > 40)) throw new Error("Invalid time to dispense without sensor, must be between 0.1 and 40.0 seconds");
2905
+ if (!n && (a === null || a <= 0 || a > 40)) throw new Error("Invalid time to dispense without sensor, must be between 0.1 and 40.0 seconds");
2907
2906
  c && (this.__internal__.dispense.backup_dispense = {
2908
2907
  selection: t,
2909
2908
  second_selection: e,
2910
2909
  sensor: n,
2911
- seconds: s
2910
+ seconds: a
2912
2911
  }), t += 9;
2913
2912
  const u = this.decToHex(t);
2914
- let d = "00";
2915
- e && (e += 9, d = this.decToHex(e));
2913
+ let h = "00";
2914
+ e && (e += 9, h = this.decToHex(e));
2916
2915
  let b = "00";
2917
- n || (b = this.decToHex(Math.round(s * 6.2)), this.__internal__.dispense.custom_limit_counter = s);
2918
- const g = i(this, h, de).call(this, ["F1", "C7", u, d, b, "00", "00", "00", "00", "00", "F2", "00"]);
2916
+ n || (b = this.decToHex(Math.round(a * 6.2)), this.__internal__.dispense.custom_limit_counter = a);
2917
+ const g = i(this, d, he).call(this, ["F1", "C7", u, h, b, "00", "00", "00", "00", "00", "F2", "00"]);
2919
2918
  let T = await this.internalDispense(g);
2920
2919
  return !T.dispensed && c && (T = await this.internalDispense(g)), this.__internal__.dispense.custom_limit_counter = null, T;
2921
2920
  }
2922
2921
  async testEngines({ singleEngine: t = !1 } = {}) {
2923
2922
  if (this.isDispensing) throw new Error("Another dispensing process is running");
2924
- i(this, h, De).call(this), x(this, te, !0);
2923
+ i(this, d, De).call(this), x(this, ee, !0);
2925
2924
  const e = [];
2926
- i(this, h, ue).call(this);
2925
+ i(this, d, ue).call(this);
2927
2926
  for (let n = 1; n <= 80; n++) {
2928
- const s = await this.dispense({
2927
+ const a = await this.dispense({
2929
2928
  selection: n,
2930
2929
  second_selection: t ? null : n + 1,
2931
2930
  sensor: !1,
2932
2931
  seconds: 0.4,
2933
2932
  retry: !1
2934
2933
  });
2935
- e.push(s), x(this, J, n), i(this, h, ue).call(this), t || n++;
2934
+ e.push(a), x(this, V, n), i(this, d, ue).call(this), t || n++;
2936
2935
  }
2937
- x(this, J, 80), i(this, h, ue).call(this, { dispensed: e }), i(this, h, De).call(this);
2936
+ x(this, V, 80), i(this, d, ue).call(this, { dispensed: e }), i(this, d, De).call(this);
2938
2937
  }
2939
2938
  async sendCustomCode({ code: t = [] } = {}) {
2940
2939
  if (t.length === 0) throw new Error("Invalid code");
2941
- const e = i(this, h, de).call(this, t);
2940
+ const e = i(this, d, he).call(this, t);
2942
2941
  await this.appendToQueue(e, "custom");
2943
2942
  }
2944
2943
  hasToReturnChange(t = 0) {
2945
2944
  let e = t;
2946
- return e <= 0 ? !0 : (e = i(this, h, Ee).call(this, e).pending, e = i(this, h, Ie).call(this, e).pending, !(e > 0));
2945
+ return e <= 0 ? !0 : (e = i(this, d, Ee).call(this, e).pending, e = i(this, d, Ie).call(this, e).pending, !(e > 0));
2947
2946
  }
2948
2947
  async returnChange() {
2949
- return await i(this, h, Se).call(this);
2948
+ return await i(this, d, Se).call(this);
2950
2949
  }
2951
2950
  async returnInsertedMoney() {
2952
- return this.__money_session.inserted <= 0 ? !1 : await i(this, h, Se).call(this, this.__money_session.inserted);
2951
+ return this.__money_session.inserted <= 0 ? !1 : await i(this, d, Se).call(this, this.__money_session.inserted);
2953
2952
  }
2954
2953
  async serialCorruptMessage(t, e) {
2955
2954
  this.dispatch("corrupt:message", { data: t, message: e });
2956
2955
  }
2957
2956
  }
2958
- te = new WeakMap(), J = new WeakMap(), z = new WeakMap(), h = new WeakSet(), Nt = function() {
2957
+ ee = new WeakMap(), V = new WeakMap(), J = new WeakMap(), d = new WeakSet(), Nt = function() {
2959
2958
  const t = [
2960
2959
  "banknote-purse:banknote-scrow-status",
2961
2960
  "banknote-purse:config",
@@ -2982,7 +2981,7 @@ te = new WeakMap(), J = new WeakMap(), z = new WeakMap(), h = new WeakSet(), Nt
2982
2981
  this.serialRegisterAvailableListener(e);
2983
2982
  }, At = function() {
2984
2983
  D.add(this);
2985
- }, he = function() {
2984
+ }, de = function() {
2986
2985
  return this.__banknote_purse.isRecycler && this.__banknote_purse.recycler.ict;
2987
2986
  }, Bt = function() {
2988
2987
  return this.hasCoinPurse || this.hasRecycler;
@@ -3053,38 +3052,38 @@ te = new WeakMap(), J = new WeakMap(), z = new WeakMap(), h = new WeakSet(), Nt
3053
3052
  }, Te = function(t, e) {
3054
3053
  if (!t) return;
3055
3054
  let n = !0;
3056
- if (i(this, h, Ht).call(this, t)) {
3055
+ if (i(this, d, Ht).call(this, t)) {
3057
3056
  if (typeof this.coins.tubes[t] > "u") return;
3058
3057
  e === "tube" ? this.coins.tubes[t] += 1 : e === "box" && (this.coins.box[t] += 1);
3059
- let s = 0;
3060
- ["g50", "c50"].includes(t) ? s = 0.5 : s += parseInt(t.slice(1)), this.coins.totals[t] += s, this.__money_session.inserted += s, this.coins.total += s;
3061
- } else if (i(this, h, Ot).call(this, t)) {
3058
+ let a = 0;
3059
+ ["g50", "c50"].includes(t) ? a = 0.5 : a += parseInt(t.slice(1)), this.coins.totals[t] += a, this.__money_session.inserted += a, this.coins.total += a;
3060
+ } else if (i(this, d, Ot).call(this, t)) {
3062
3061
  if (typeof this.banknotes.tubes[t] > "u") return;
3063
3062
  e === "recycler" ? this.banknotes.recycler[t] += 1 : e === "stacker" && (this.banknotes.stacker[t] += 1);
3064
- let s = parseInt(t.slice(1));
3065
- this.banknotes.totals[t] += s, this.__money_session.inserted += s, this.banknotes.total += s;
3066
- } else if (i(this, h, Ut).call(this, t) && e === "out") {
3063
+ let a = parseInt(t.slice(1));
3064
+ this.banknotes.totals[t] += a, this.__money_session.inserted += a, this.banknotes.total += a;
3065
+ } else if (i(this, d, Ut).call(this, t) && e === "out") {
3067
3066
  if (typeof this.banknotes.out[t] > "u") return;
3068
3067
  this.banknotes.out[t] += 1;
3069
- let s = parseInt(t.slice(1));
3070
- this.__money_session.retired += s, this.banknotes.recycler[t] -= 1, this.banknotes.total -= s, n = !1, this.dispatch("session:money-dispensed", { type_money: t, retired: s, finish: !1, type: "banknotes" });
3068
+ let a = parseInt(t.slice(1));
3069
+ this.__money_session.retired += a, this.banknotes.recycler[t] -= 1, this.banknotes.total -= a, n = !1, this.dispatch("session:money-dispensed", { type_money: t, retired: a, finish: !1, type: "banknotes" });
3071
3070
  }
3072
3071
  n && this.dispatch("session:money-request", {});
3073
3072
  }, Wt = function(t, e) {
3074
3073
  const n = parseInt(t[2], 16);
3075
- return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, n === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : n === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : n >= 64 && n <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : n >= 80 && n <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : n >= 96 && n <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : n >= 112 && n <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : n >= 144 && n <= 159 ? (e.name = "Coin dispensed", e.additional.where = "out", e.description = `Undefined value: ¿${t[2]}?`) : (e.name = "Coin inserted", e.description = "Undefined status. Without information of this", e.no_code = 400), n === 1 || n === 2 || n >= 160 || n >= 128 && n <= 143 || ([e.description, e.additional.coin] = i(this, h, qt).call(this, t[2]), e.no_code = 38 + n, i(this, h, Te).call(this, e.additional.coin, e.additional.where), ["tube", "out"].includes(e.additional.where) && this.dispatch("coin-purse:tubes", this.coins.tubes), this.dispatch("coin-purse:coin-event", this.coins)), e;
3074
+ return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, n === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : n === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : n >= 64 && n <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : n >= 80 && n <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : n >= 96 && n <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : n >= 112 && n <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : n >= 144 && n <= 159 ? (e.name = "Coin dispensed", e.additional.where = "out", e.description = `Undefined value: ¿${t[2]}?`) : (e.name = "Coin inserted", e.description = "Undefined status. Without information of this", e.no_code = 400), n === 1 || n === 2 || n >= 160 || n >= 128 && n <= 143 || ([e.description, e.additional.coin] = i(this, d, qt).call(this, t[2]), e.no_code = 38 + n, i(this, d, Te).call(this, e.additional.coin, e.additional.where), ["tube", "out"].includes(e.additional.where) && this.dispatch("coin-purse:tubes", this.coins.tubes), this.dispatch("coin-purse:coin-event", this.coins)), e;
3076
3075
  }, $t = function(t, e) {
3077
3076
  const n = parseInt(t[2], 16);
3078
- return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, n === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = i(this, h, jt).call(this), e.additional.where = "out", e.no_code = 200) : n >= 128 && n <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : n >= 144 && n <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : n >= 160 && n <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : n >= 176 && n <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), n >= 128 && n <= 191 && ([e.description, e.additional.banknote] = i(this, h, Lt).call(this, t[2]), e.no_code = 74 + n), i(this, h, Te).call(this, e.additional.banknote, e.additional.where), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
3077
+ return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, n === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = i(this, d, jt).call(this), e.additional.where = "out", e.no_code = 200) : n >= 128 && n <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : n >= 144 && n <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : n >= 160 && n <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : n >= 176 && n <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), n >= 128 && n <= 191 && ([e.description, e.additional.banknote] = i(this, d, Lt).call(this, t[2]), e.no_code = 74 + n), i(this, d, Te).call(this, e.additional.banknote, e.additional.where), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
3079
3078
  }, Qt = function(t, e) {
3080
3079
  const n = parseInt(t, 16);
3081
3080
  return n === 1 ? (e.name = "Coin purse enabled", e.description = "Configuration complete, enabled", e.no_code = 3) : n === 0 ? (e.name = "Coin purse disabled", e.description = "Disabled by system request", e.no_code = 4) : (e.name = "Status unknown", e.description = "The response of coin purse doesn't identify successfully", e.no_code = 400), this.dispatch("coin-purse:config", { enabled: n === 1 }), e;
3082
3081
  }, Vt = function(t, e) {
3083
- const n = parseInt(t[2], 16), s = parseInt(t[3], 16);
3084
- return n === 0 ? (e.name = "Bill purse disabled", e.description = "Configuration complete, disabled") : n === 1 && (e.name = "Bill purse enabled", e.description = "Configuration complete, enabled"), s === 0 ? e.additional.scrow = "Scrow disabled, banknote received automatic" : s === 1 && (e.additional.scrow = "Scrow enabled, require manual action"), e.no_code = 5, this.dispatch("banknote-purse:config", { enabled: n === 1, scrow: s === 1 }), e;
3082
+ const n = parseInt(t[2], 16), a = parseInt(t[3], 16);
3083
+ return n === 0 ? (e.name = "Bill purse disabled", e.description = "Configuration complete, disabled") : n === 1 && (e.name = "Bill purse enabled", e.description = "Configuration complete, enabled"), a === 0 ? e.additional.scrow = "Scrow disabled, banknote received automatic" : a === 1 && (e.additional.scrow = "Scrow enabled, require manual action"), e.no_code = 5, this.dispatch("banknote-purse:config", { enabled: n === 1, scrow: a === 1 }), e;
3085
3084
  }, Jt = function(t, e) {
3086
3085
  e.no_code = 6;
3087
- const [n, s, c, u, d, b] = [
3086
+ const [n, a, c, u, h, b] = [
3088
3087
  parseInt(t[2], 16),
3089
3088
  parseInt(t[3], 16),
3090
3089
  parseInt(t[4], 16),
@@ -3093,11 +3092,11 @@ te = new WeakMap(), J = new WeakMap(), z = new WeakMap(), h = new WeakSet(), Nt
3093
3092
  parseInt(t[7], 16)
3094
3093
  ];
3095
3094
  return e.additional = {
3096
- coins: { g50: n, c50: s, p1: c, p2: u, p5: d, p10: b }
3097
- }, this.coins.tubes.g50 = n, this.coins.tubes.c50 = s, this.coins.tubes.p1 = c, this.coins.tubes.p2 = u, this.coins.tubes.p5 = d, this.coins.tubes.p10 = b, this.coins.totals.g50 = (this.coins.box.g50 + n) * 0.5, this.coins.totals.c50 = (this.coins.box.c50 + s) * 0.5, this.coins.totals.p1 = this.coins.box.p1 + c, this.coins.totals.p2 = (this.coins.box.p2 + u) * 2, this.coins.totals.p5 = (this.coins.box.p5 + d) * 5, this.coins.totals.p10 = (this.coins.box.p10 + b) * 10, this.coins.total = this.coins.totals.g50 + this.coins.totals.c50 + this.coins.totals.p1 + this.coins.totals.p2 + this.coins.totals.p5 + this.coins.totals.p10, e.name = "Read tubes", e.description = "Quantity of coins approximated", this.dispatch("coin-purse:tubes", this.coins.tubes), e;
3095
+ coins: { g50: n, c50: a, p1: c, p2: u, p5: h, p10: b }
3096
+ }, this.coins.tubes.g50 = n, this.coins.tubes.c50 = a, this.coins.tubes.p1 = c, this.coins.tubes.p2 = u, this.coins.tubes.p5 = h, this.coins.tubes.p10 = b, this.coins.totals.g50 = (this.coins.box.g50 + n) * 0.5, this.coins.totals.c50 = (this.coins.box.c50 + a) * 0.5, this.coins.totals.p1 = this.coins.box.p1 + c, this.coins.totals.p2 = (this.coins.box.p2 + u) * 2, this.coins.totals.p5 = (this.coins.box.p5 + h) * 5, this.coins.totals.p10 = (this.coins.box.p10 + b) * 10, this.coins.total = this.coins.totals.g50 + this.coins.totals.c50 + this.coins.totals.p1 + this.coins.totals.p2 + this.coins.totals.p5 + this.coins.totals.p10, e.name = "Read tubes", e.description = "Quantity of coins approximated", this.dispatch("coin-purse:tubes", this.coins.tubes), e;
3098
3097
  }, zt = function(t, e) {
3099
3098
  e.no_code = 7;
3100
- const [n, s, c, u, d, b] = [
3099
+ const [n, a, c, u, h, b] = [
3101
3100
  parseInt(t[2], 16),
3102
3101
  parseInt(t[3], 16),
3103
3102
  parseInt(t[4], 16),
@@ -3106,22 +3105,22 @@ te = new WeakMap(), J = new WeakMap(), z = new WeakMap(), h = new WeakSet(), Nt
3106
3105
  parseInt(t[7], 16)
3107
3106
  ];
3108
3107
  return e.additional = {
3109
- banknotes: { b20: n, b50: s, b100: c, b200: u, b500: d, b1000: b }
3110
- }, this.banknotes.recycler.p20 = n, this.banknotes.recycler.p50 = s, this.banknotes.recycler.p100 = c, this.banknotes.recycler.p200 = u, this.banknotes.recycler.p500 = d, this.banknotes.recycler.p1000 = b, this.banknotes.totals.p20 = (this.banknotes.stacker.p20 + n) * 20, this.banknotes.totals.p50 = (this.banknotes.stacker.p50 + s) * 50, this.banknotes.totals.p100 = (this.banknotes.stacker.p100 + c) * 100, this.banknotes.totals.p200 = (this.banknotes.stacker.p200 + u) * 200, this.banknotes.totals.p500 = (this.banknotes.stacker.p500 + d) * 500, this.banknotes.totals.p1000 = (this.banknotes.stacker.p1000 + b) * 1e3, this.banknotes.total = this.banknotes.totals.p20 + this.banknotes.totals.p50 + this.banknotes.totals.p100 + this.banknotes.totals.p200 + this.banknotes.totals.p500 + this.banknotes.totals.p1000, e.name = "Read recycler", e.description = "Quantity of banknotes approximated", this.dispatch("banknote-purse:recycler", this.banknotes.recycler), e;
3108
+ banknotes: { b20: n, b50: a, b100: c, b200: u, b500: h, b1000: b }
3109
+ }, this.banknotes.recycler.p20 = n, this.banknotes.recycler.p50 = a, this.banknotes.recycler.p100 = c, this.banknotes.recycler.p200 = u, this.banknotes.recycler.p500 = h, this.banknotes.recycler.p1000 = b, this.banknotes.totals.p20 = (this.banknotes.stacker.p20 + n) * 20, this.banknotes.totals.p50 = (this.banknotes.stacker.p50 + a) * 50, this.banknotes.totals.p100 = (this.banknotes.stacker.p100 + c) * 100, this.banknotes.totals.p200 = (this.banknotes.stacker.p200 + u) * 200, this.banknotes.totals.p500 = (this.banknotes.stacker.p500 + h) * 500, this.banknotes.totals.p1000 = (this.banknotes.stacker.p1000 + b) * 1e3, this.banknotes.total = this.banknotes.totals.p20 + this.banknotes.totals.p50 + this.banknotes.totals.p100 + this.banknotes.totals.p200 + this.banknotes.totals.p500 + this.banknotes.totals.p1000, e.name = "Read recycler", e.description = "Quantity of banknotes approximated", this.dispatch("banknote-purse:recycler", this.banknotes.recycler), e;
3111
3110
  }, Gt = function(t, e) {
3112
3111
  const n = parseInt(t, 16);
3113
3112
  return n === 1 ? e.name = "Banknote accepted" : n === 0 ? e.name = "Banknote rejected" : e.name = "Unknown status banknote", e.no_code = 8, this.dispatch("banknote-purse:banknote-scrow-status", { status: n === 1 }), e;
3114
3113
  }, Yt = function(t, e) {
3115
- const [n, s, c, u, d, b] = [
3114
+ const [n, a, c, u, h, b] = [
3116
3115
  parseInt(t[2], 16),
3117
3116
  parseInt(t[3], 16),
3118
3117
  parseInt(t[4], 16),
3119
3118
  parseInt(t[5], 16),
3120
3119
  parseInt(t[6], 16),
3121
3120
  parseInt(t[7], 16)
3122
- ], g = n * 20 + s * 50 + c * 100 + u * 200 + d * 500 + b * 1e3;
3121
+ ], g = n * 20 + a * 50 + c * 100 + u * 200 + h * 500 + b * 1e3;
3123
3122
  return e.name = "Banknotes dispensed", e.description = g > 0 ? "Banknotes dispensed by request" : "No banknotes dispensed, recycler empty", e.no_code = 9, e.additional = {
3124
- banknotes: { b20: n, b50: s, b100: c, b200: u, b500: d, b1000: b },
3123
+ banknotes: { b20: n, b50: a, b100: c, b200: u, b500: h, b1000: b },
3125
3124
  total_dispensed: g
3126
3125
  }, this.dispatch("session:money-dispensed", {
3127
3126
  type_money: null,
@@ -3144,16 +3143,16 @@ te = new WeakMap(), J = new WeakMap(), z = new WeakMap(), h = new WeakSet(), Nt
3144
3143
  let n = "closed";
3145
3144
  return t === "db" ? (e.name = "Door closed", e.no_code = 13) : t === "dc" ? (e.name = "Door open", e.no_code = 14, n = "open") : (e.name = "Unknown status door", e.description = "The response of door doesn't identify successfully", e.no_code = 400, n = "unknown"), this.dispatch("event:door", { open: n === "open" }), e;
3146
3145
  }, en = function(t, e) {
3147
- const n = parseInt(t[2], 16) * 255, s = parseInt(t[3], 16), c = (n + s) * 0.1;
3146
+ const n = parseInt(t[2], 16) * 255, a = parseInt(t[3], 16), c = (n + a) * 0.1;
3148
3147
  return e.no_code = 15, e.name = "Temperature status", e.description = `Temperature: ${c}`, e.additional = {
3149
3148
  high: n,
3150
- low: s,
3149
+ low: a,
3151
3150
  temperature: parseFloat(c.toString())
3152
3151
  }, this.dispatch("status:temperature", e.additional), e;
3153
3152
  }, tn = function(t, e) {
3154
3153
  const n = parseInt(t, 16);
3155
- let s = "unknown";
3156
- return n === 1 ? (e.name = "Relay on", e.description = "Relay on", e.no_code = 16, s = "on") : n === 0 ? (e.name = "Relay off", e.description = "Relay off", e.no_code = 17, s = "off") : (e.name = "Status unknown", e.description = "Status unknown", e.no_code = 400), this.dispatch("status:relay", { enabled: s === "on" }), e;
3154
+ let a = "unknown";
3155
+ return n === 1 ? (e.name = "Relay on", e.description = "Relay on", e.no_code = 16, a = "on") : n === 0 ? (e.name = "Relay off", e.description = "Relay off", e.no_code = 17, a = "off") : (e.name = "Status unknown", e.description = "Status unknown", e.no_code = 400), this.dispatch("status:relay", { enabled: a === "on" }), e;
3157
3156
  }, nn = function(t, e) {
3158
3157
  const n = parseInt(t[2], 16);
3159
3158
  if (e.no_code = 20 + n, e.name = "Status unknown", e.description = "The status of card reader does not identified correctly", e.no_code = 400, n === 0)
@@ -3173,52 +3172,52 @@ te = new WeakMap(), J = new WeakMap(), z = new WeakMap(), h = new WeakSet(), Nt
3173
3172
  else if (n === 8)
3174
3173
  e.request += ":cancel", e.name = "Cancelled", e.description = "Cancellation complete";
3175
3174
  else if (n === 10) {
3176
- const s = parseInt(t[8], 16);
3177
- s === 0 ? (e.no_code = 30, e.name = "product not dispensed", e.description = "The product requested wasn't delivered") : s === 1 && (e.no_code = 31, e.name = "product dispensed", e.description = "The product requested was delivered");
3175
+ const a = parseInt(t[8], 16);
3176
+ a === 0 ? (e.no_code = 30, e.name = "product not dispensed", e.description = "The product requested wasn't delivered") : a === 1 && (e.no_code = 31, e.name = "product dispensed", e.description = "The product requested was delivered");
3178
3177
  }
3179
3178
  return this.dispatch("card-reader:event", e), e;
3180
- }, q = function(t, e) {
3181
- return this.appendToQueue(i(this, h, de).call(this, t), e);
3182
- }, de = function(t) {
3179
+ }, R = function(t, e) {
3180
+ return this.appendToQueue(i(this, d, he).call(this, t), e);
3181
+ }, he = function(t) {
3183
3182
  return t[11] = this.serialBoardroidSumHex(t), t.map((e, n) => {
3184
3183
  t[n] = this.hexMaker(e);
3185
3184
  }), t;
3186
3185
  }, rn = function({ enable: t = !1, scrow: e = !1 } = {}) {
3187
- const n = t ? "FF" : "00", s = e ? "FF" : "00";
3188
- return ["F1", "C0", n, n, s, s, "00", "00", "00", "00", "F2", "00"];
3189
- }, sn = function({ enable: t = !1, scrow: e = !1 } = {}) {
3186
+ const n = t ? "FF" : "00", a = e ? "FF" : "00";
3187
+ return ["F1", "C0", n, n, a, a, "00", "00", "00", "00", "F2", "00"];
3188
+ }, an = function({ enable: t = !1, scrow: e = !1 } = {}) {
3190
3189
  return ["F1", "C0", t ? "01" : "00", e ? "01" : "00", "00", "00", "00", "00", "00", "00", "F2", "00"];
3191
- }, an = function(t = 1) {
3190
+ }, sn = function(t = 1) {
3192
3191
  if (t < 1) throw new Error("No banknotes to dispense");
3193
3192
  return t = this.decToHex(t), ["F1", "C5", this.decToHex(this.__banknote_purse.recycler.banknote.toString()), t, "00", "00", "00", "00", "00", "00", "F2", "00"];
3194
- }, on = function({ $_20: t = 0, $_50: e = 0, $_100: n = 0, $_200: s = 0, $_500: c = 0, $_1000: u = 0 } = {}) {
3195
- if ([t, e, n, s, c, u].some((d) => isNaN(d) || typeof d == "string"))
3193
+ }, on = function({ $_20: t = 0, $_50: e = 0, $_100: n = 0, $_200: a = 0, $_500: c = 0, $_1000: u = 0 } = {}) {
3194
+ if ([t, e, n, a, c, u].some((h) => isNaN(h) || typeof h == "string"))
3196
3195
  throw new Error("One of the values is not a number");
3197
- if (t < 1 && e < 1 && n < 1 && s < 1 && c < 1 && u < 1) throw new Error("No banknotes to dispense");
3198
- return [t, e, n, s, c, u] = [
3196
+ if (t < 1 && e < 1 && n < 1 && a < 1 && c < 1 && u < 1) throw new Error("No banknotes to dispense");
3197
+ return [t, e, n, a, c, u] = [
3199
3198
  this.decToHex(t),
3200
3199
  this.decToHex(e),
3201
3200
  this.decToHex(n),
3202
- this.decToHex(s),
3201
+ this.decToHex(a),
3203
3202
  this.decToHex(c),
3204
3203
  this.decToHex(u)
3205
- ], ["F1", "C5", t, e, n, s, c, u, "00", "00", "F2", "00"];
3204
+ ], ["F1", "C5", t, e, n, a, c, u, "00", "00", "F2", "00"];
3206
3205
  }, De = function() {
3207
- x(this, te, !1), x(this, J, 0), x(this, z, 0);
3206
+ x(this, ee, !1), x(this, V, 0), x(this, J, 0);
3208
3207
  }, /**
3209
3208
  *
3210
3209
  * @param {null|object} dispensed
3211
3210
  * @param {number} limit
3212
3211
  */
3213
3212
  ue = function({ dispensed: t = null, limit: e = 80 } = {}) {
3214
- x(this, z, Math.round(y(this, J) * 100 / e)), this.dispatch("percentage:test", { percentage: y(this, z), dispensed: t });
3213
+ x(this, J, Math.round(y(this, V) * 100 / e)), this.dispatch("percentage:test", { percentage: y(this, J), dispensed: t });
3215
3214
  }, ln = function(t) {
3216
- const e = ["20", "50", "100", "200", "500"], n = "$_" + e[this.__banknote_purse.recycler.banknote], s = parseInt(e[this.__banknote_purse.recycler.banknote]), c = parseInt((t / s).toString()), u = {
3215
+ const e = ["20", "50", "100", "200", "500"], n = "$_" + e[this.__banknote_purse.recycler.banknote], a = parseInt(e[this.__banknote_purse.recycler.banknote]), c = parseInt((t / a).toString()), u = {
3217
3216
  banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
3218
3217
  pending: t,
3219
3218
  will_dispense: c > 0
3220
3219
  };
3221
- return this.totalInRecycler === 0 || c < 1 || t === 0 || (u.banknotes[n] = c, u.pending = t % s), u;
3220
+ return this.totalInRecycler === 0 || c < 1 || t === 0 || (u.banknotes[n] = c, u.pending = t % a), u;
3222
3221
  }, cn = function(t) {
3223
3222
  const e = {
3224
3223
  banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
@@ -3227,7 +3226,7 @@ ue = function({ dispensed: t = null, limit: e = 80 } = {}) {
3227
3226
  };
3228
3227
  return this.totalInRecycler === 0 || t === 0 || (e.banknotes.$_1000 = parseInt((t / 1e3).toString()), e.pending = t % 1e3, e.banknotes.$_500 = parseInt((e.pending / 500).toString()), e.pending = e.pending % 500, e.banknotes.$_200 = parseInt((e.pending / 200).toString()), e.pending = e.pending % 200, e.banknotes.$_100 = parseInt((e.pending / 100).toString()), e.pending = e.pending % 100, e.banknotes.$_50 = parseInt((e.pending / 50).toString()), e.pending = e.pending % 50, e.banknotes.$_20 = parseInt((e.pending / 20).toString()), e.pending = e.pending % 20, e.will_dispense = e.banknotes.$_1000 > 0 || e.banknotes.$_500 > 0 || e.banknotes.$_200 > 0 || e.banknotes.$_100 > 0 || e.banknotes.$_50 > 0 || e.banknotes.$_20 > 0), e;
3229
3228
  }, Ee = function(t) {
3230
- return i(this, h, he).call(this) ? i(this, h, ln).call(this, t) : i(this, h, cn).call(this, t);
3229
+ return i(this, d, de).call(this) ? i(this, d, ln).call(this, t) : i(this, d, cn).call(this, t);
3231
3230
  }, Ie = function(t) {
3232
3231
  const e = {
3233
3232
  coins: { $_50c: 0, $_1: 0, $_2: 0, $_5: 0, $_10: 0 },
@@ -3236,25 +3235,25 @@ ue = function({ dispensed: t = null, limit: e = 80 } = {}) {
3236
3235
  };
3237
3236
  return t <= 0 || this.totalInTubes === 0 || (e.coins.$_10 = parseInt((t / 10).toString()), e.pending = t % 10, e.coins.$_5 = parseInt((e.pending / 5).toString()), e.pending = e.pending % 5, e.coins.$_2 = parseInt((e.pending / 2).toString()), e.pending = e.pending % 2, e.coins.$_1 = parseInt(e.pending), e.pending = e.pending % 1, e.coins.$_50c = parseInt((e.pending / 0.5).toString()), e.pending = e.pending % 0.5, e.will_dispense = e.coins.$_10 > 0 || e.coins.$_5 > 0 || e.coins.$_2 > 0 || e.coins.$_1 > 0 || e.coins.$_50c > 0), e;
3238
3237
  }, Se = async function(t = null) {
3239
- if (!i(this, h, Bt).call(this)) throw new Error("Change not available");
3238
+ if (!i(this, d, Bt).call(this)) throw new Error("Change not available");
3240
3239
  let e = this.change, n = this.change;
3241
3240
  if (t !== null && (e = t, n = t), n <= 0) return !1;
3242
- const s = i(this, h, Ee).call(this, n);
3243
- n = s.pending;
3244
- const c = i(this, h, Ie).call(this, n);
3245
- return n = c.pending, n > 0 && this.dispatch("change:pending", { pending: n }), n === e ? !1 : (s.will_dispense && await this.banknotePurseDispense(s.banknotes), c.will_dispense && await this.coinPurseDispense(c.coins), !0);
3241
+ const a = i(this, d, Ee).call(this, n);
3242
+ n = a.pending;
3243
+ const c = i(this, d, Ie).call(this, n);
3244
+ return n = c.pending, n > 0 && this.dispatch("change:pending", { pending: n }), n === e ? !1 : (a.will_dispense && await this.banknotePurseDispense(a.banknotes), c.will_dispense && await this.coinPurseDispense(c.coins), !0);
3246
3245
  };
3247
- var G, hn, dn;
3248
- class Dn extends Y {
3246
+ var z, dn, hn;
3247
+ class Dn extends G {
3249
3248
  constructor({
3250
3249
  filters: t = null,
3251
3250
  config_port: e = null,
3252
3251
  no_device: n = 1
3253
3252
  } = {}) {
3254
3253
  super({ filters: t, config_port: e, no_device: n });
3255
- S(this, G);
3254
+ S(this, z);
3256
3255
  if (this.__internal__.device.type = "arduino", D.getCustom(this.typeDevice, n)) throw new Error(`Device ${this.typeDevice} ${n} already exists`);
3257
- this.__internal__.time.response_connection = 2e3, this.__internal__.time.response_general = 2e3, this.__internal__.serial.delay_first_connection = 1e3, i(this, G, dn).call(this), i(this, G, hn).call(this);
3256
+ this.__internal__.time.response_connection = 2e3, this.__internal__.time.response_general = 2e3, this.__internal__.serial.delay_first_connection = 1e3, i(this, z, hn).call(this), i(this, z, dn).call(this);
3258
3257
  }
3259
3258
  serialMessage(t) {
3260
3259
  const e = {
@@ -3264,8 +3263,8 @@ class Dn extends Y {
3264
3263
  description: null,
3265
3264
  request: null,
3266
3265
  no_code: 0
3267
- }, n = t.map((c) => parseInt(c, 16)), s = String.fromCharCode(...n).replace(/[\n\r]+/g, "");
3268
- switch (e.code = s, s) {
3266
+ }, n = t.map((c) => parseInt(c, 16)), a = String.fromCharCode(...n).replace(/[\n\r]+/g, "");
3267
+ switch (e.code = a, a) {
3269
3268
  case "connected":
3270
3269
  e.name = "connected", e.description = "Connection established", e.request = "connect", e.no_code = 100;
3271
3270
  break;
@@ -3289,7 +3288,7 @@ class Dn extends Y {
3289
3288
  t += `
3290
3289
  `;
3291
3290
  const n = e.encode(t);
3292
- return Array.from(n).map((s) => s.toString(16));
3291
+ return Array.from(n).map((a) => a.toString(16));
3293
3292
  }
3294
3293
  // eslint-disable-next-line no-unused-vars
3295
3294
  serialSetConnectionConstant(t = 1) {
@@ -3316,9 +3315,9 @@ class Dn extends Y {
3316
3315
  await this.sayCredits(), await this.sayAra(), await this.sayHi();
3317
3316
  }
3318
3317
  }
3319
- G = new WeakSet(), hn = function() {
3318
+ z = new WeakSet(), dn = function() {
3320
3319
  D.addCustom("arduino", this);
3321
- }, dn = function() {
3320
+ }, hn = function() {
3322
3321
  };
3323
3322
  /**
3324
3323
  * @license Webserial
@@ -3330,7 +3329,7 @@ G = new WeakSet(), hn = function() {
3330
3329
  * LICENSE file in the root directory of this source tree.
3331
3330
  */
3332
3331
  const En = {
3333
- wait: $,
3332
+ wait: W,
3334
3333
  getSeconds: we,
3335
3334
  supportWebSerial: Ne
3336
3335
  }, In = "3.0.0";
@@ -3340,7 +3339,7 @@ export {
3340
3339
  D as Devices,
3341
3340
  pe as Emulator,
3342
3341
  xn as Jofemar,
3343
- Y as Kernel,
3342
+ G as Kernel,
3344
3343
  Cn as Locker,
3345
3344
  gn as Relay,
3346
3345
  En as utils,