@danidoble/webserial 4.1.2 → 4.1.4

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
@@ -1,15 +1,15 @@
1
1
  var ua = Object.defineProperty;
2
- var Vn = (r) => {
2
+ var Ln = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
5
  var da = (r, n, t) => n in r ? ua(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
6
- var J = (r, n, t) => da(r, typeof n != "symbol" ? n + "" : n, t), We = (r, n, t) => n.has(r) || Vn("Cannot " + t);
7
- var R = (r, n, t) => (We(r, n, "read from private field"), t ? t.call(r) : n.get(r)), X = (r, n, t) => n.has(r) ? Vn("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), F = (r, n, t, e) => (We(r, n, "write to private field"), e ? e.call(r, t) : n.set(r, t), t), o = (r, n, t) => (We(r, n, "access private method"), t);
8
- const $ = [];
6
+ var $ = (r, n, t) => da(r, typeof n != "symbol" ? n + "" : n, t), We = (r, n, t) => n.has(r) || Ln("Cannot " + t);
7
+ var R = (r, n, t) => (We(r, n, "read from private field"), t ? t.call(r) : n.get(r)), X = (r, n, t) => n.has(r) ? Ln("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), F = (r, n, t, e) => (We(r, n, "write to private field"), e ? e.call(r, t) : n.set(r, t), t), o = (r, n, t) => (We(r, n, "access private method"), t);
8
+ const J = [];
9
9
  for (let r = 0; r < 256; ++r)
10
- $.push((r + 256).toString(16).slice(1));
10
+ J.push((r + 256).toString(16).slice(1));
11
11
  function pa(r, n = 0) {
12
- return ($[r[n + 0]] + $[r[n + 1]] + $[r[n + 2]] + $[r[n + 3]] + "-" + $[r[n + 4]] + $[r[n + 5]] + "-" + $[r[n + 6]] + $[r[n + 7]] + "-" + $[r[n + 8]] + $[r[n + 9]] + "-" + $[r[n + 10]] + $[r[n + 11]] + $[r[n + 12]] + $[r[n + 13]] + $[r[n + 14]] + $[r[n + 15]]).toLowerCase();
12
+ return (J[r[n + 0]] + J[r[n + 1]] + J[r[n + 2]] + J[r[n + 3]] + "-" + J[r[n + 4]] + J[r[n + 5]] + "-" + J[r[n + 6]] + J[r[n + 7]] + "-" + J[r[n + 8]] + J[r[n + 9]] + "-" + J[r[n + 10]] + J[r[n + 11]] + J[r[n + 12]] + J[r[n + 13]] + J[r[n + 14]] + J[r[n + 15]]).toLowerCase();
13
13
  }
14
14
  let ze;
15
15
  const fa = new Uint8Array(16);
@@ -21,26 +21,26 @@ function _a() {
21
21
  }
22
22
  return ze(fa);
23
23
  }
24
- const ga = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), qn = { randomUUID: ga };
24
+ const ga = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Vn = { randomUUID: ga };
25
25
  function ba(r, n, t) {
26
26
  var i;
27
- if (qn.randomUUID && !r)
28
- return qn.randomUUID();
27
+ if (Vn.randomUUID && !r)
28
+ return Vn.randomUUID();
29
29
  r = r || {};
30
30
  const e = r.random ?? ((i = r.rng) == null ? void 0 : i.call(r)) ?? _a();
31
31
  if (e.length < 16)
32
32
  throw new Error("Random bytes length must be >= 16");
33
33
  return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, pa(e);
34
34
  }
35
- class fi extends EventTarget {
35
+ class pi extends EventTarget {
36
36
  constructor() {
37
37
  super(...arguments);
38
- J(this, "__listeners__", {});
39
- J(this, "__debug__", !1);
38
+ $(this, "__listeners__", {});
39
+ $(this, "__debug__", !1);
40
40
  }
41
41
  dispatch(t, e = null) {
42
- const i = new jn(t, { detail: e });
43
- this.dispatchEvent(i), this.__debug__ && this.dispatchEvent(new jn("debug", { detail: { type: t, data: e } }));
42
+ const i = new qn(t, { detail: e });
43
+ this.dispatchEvent(i), this.__debug__ && this.dispatchEvent(new qn("debug", { detail: { type: t, data: e } }));
44
44
  }
45
45
  dispatchAsync(t, e = null, i = 100) {
46
46
  const s = this;
@@ -64,7 +64,7 @@ class fi extends EventTarget {
64
64
  }));
65
65
  }
66
66
  }
67
- class jn extends CustomEvent {
67
+ class qn extends CustomEvent {
68
68
  constructor(n, t) {
69
69
  super(n, t);
70
70
  }
@@ -72,10 +72,10 @@ class jn extends CustomEvent {
72
72
  function ut(r = 100) {
73
73
  return new Promise((n) => setTimeout(() => n(), r));
74
74
  }
75
- function _i() {
75
+ function fi() {
76
76
  return "serial" in navigator;
77
77
  }
78
- function Hn() {
78
+ function jn() {
79
79
  return "geolocation" in navigator;
80
80
  }
81
81
  function ma() {
@@ -87,7 +87,7 @@ function tn(r = 1) {
87
87
  function Et(r) {
88
88
  return r == null || r === "";
89
89
  }
90
- var st, ct, d, gi, bi, T, en, M, N, _e, E, nn, $t;
90
+ var st, ct, d, _i, gi, T, en, M, B, _e, E, nn, Jt;
91
91
  const u = class u {
92
92
  static status(n = null) {
93
93
  var e, i;
@@ -158,7 +158,7 @@ const u = class u {
158
158
  }
159
159
  static keyPressed(n = null) {
160
160
  var s, a, c;
161
- if (!o(s = u, d, T).call(s, n) || !o(a = u, d, N).call(a)) return !1;
161
+ if (!o(s = u, d, T).call(s, n) || !o(a = u, d, B).call(a)) return !1;
162
162
  const t = ["30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "2A", "23", "41", "42", "43", "44"], e = (128 + R(u, ct)).toString(16), i = Math.floor(Math.random() * 15);
163
163
  o(c = u, d, E).call(c, ["2", e, "54", t[i]]);
164
164
  }
@@ -194,25 +194,25 @@ const u = class u {
194
194
  }
195
195
  static channelDisconnected(n = null) {
196
196
  var e, i, s;
197
- if (!o(e = u, d, T).call(e, n) || !o(i = u, d, N).call(i)) return !1;
197
+ if (!o(e = u, d, T).call(e, n) || !o(i = u, d, B).call(i)) return !1;
198
198
  const t = (128 + R(u, ct)).toString(16);
199
199
  o(s = u, d, E).call(s, ["2", t, "43", "43", "43", "FD"]);
200
200
  }
201
201
  static channelConnected(n = null) {
202
202
  var e, i, s;
203
- if (!o(e = u, d, T).call(e, n) || !o(i = u, d, N).call(i)) return !1;
203
+ if (!o(e = u, d, T).call(e, n) || !o(i = u, d, B).call(i)) return !1;
204
204
  const t = (128 + R(u, ct)).toString(16);
205
205
  o(s = u, d, E).call(s, ["2", t, "43", "43", "43", "FC"]);
206
206
  }
207
207
  static channelEmpty(n = null) {
208
208
  var e, i, s;
209
- if (!o(e = u, d, T).call(e, n) || !o(i = u, d, N).call(i)) return !1;
209
+ if (!o(e = u, d, T).call(e, n) || !o(i = u, d, B).call(i)) return !1;
210
210
  const t = (128 + R(u, ct)).toString(16);
211
211
  o(s = u, d, E).call(s, ["2", t, "43", "43", "43", "FF"]);
212
212
  }
213
213
  static workingTemperature(n = null) {
214
214
  var e, i, s;
215
- if (!o(e = u, d, T).call(e, n) || !o(i = u, d, N).call(i)) return !1;
215
+ if (!o(e = u, d, T).call(e, n) || !o(i = u, d, B).call(i)) return !1;
216
216
  const t = (128 + R(u, ct)).toString(16);
217
217
  o(s = u, d, E).call(s, ["2", t, "43", "54", "16"]);
218
218
  }
@@ -233,137 +233,137 @@ const u = class u {
233
233
  }
234
234
  static ready(n = null) {
235
235
  var t, e, i;
236
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
236
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
237
237
  o(i = u, d, E).call(i, ["6", "30"]);
238
238
  }
239
239
  static busy(n = null) {
240
240
  var t, e, i;
241
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
241
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
242
242
  o(i = u, d, E).call(i, ["6", "31"]);
243
243
  }
244
244
  static invalidTray(n = null) {
245
245
  var t, e, i;
246
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
246
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
247
247
  o(i = u, d, E).call(i, ["6", "32"]);
248
248
  }
249
249
  static invalidChannel(n = null) {
250
250
  var t, e, i;
251
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
251
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
252
252
  o(i = u, d, E).call(i, ["6", "33"]);
253
253
  }
254
254
  static emptyChannel(n = null) {
255
255
  var t, e, i;
256
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
256
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
257
257
  o(i = u, d, E).call(i, ["6", "34"]);
258
258
  }
259
259
  static elevatorJam(n = null) {
260
260
  var t, e, i;
261
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
261
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
262
262
  o(i = u, d, E).call(i, ["6", "35"]);
263
263
  }
264
264
  static elevatorMalfunction(n = null) {
265
265
  var t, e, i;
266
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
266
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
267
267
  o(i = u, d, E).call(i, ["6", "36"]);
268
268
  }
269
269
  static phototransistorFailure(n = null) {
270
270
  var t, e, i;
271
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
271
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
272
272
  o(i = u, d, E).call(i, ["6", "37"]);
273
273
  }
274
274
  static allChannelsEmpty(n = null) {
275
275
  var t, e, i;
276
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
276
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
277
277
  o(i = u, d, E).call(i, ["6", "38"]);
278
278
  }
279
279
  static productDetectorFailure(n = null) {
280
280
  var t, e, i;
281
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
281
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
282
282
  o(i = u, d, E).call(i, ["6", "39"]);
283
283
  }
284
284
  static displayDisconnected(n = null) {
285
285
  var t, e, i;
286
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
286
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
287
287
  o(i = u, d, E).call(i, ["6", "41"]);
288
288
  }
289
289
  static productUnderElevator(n = null) {
290
290
  var t, e, i;
291
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
291
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
292
292
  o(i = u, d, E).call(i, ["6", "42"]);
293
293
  }
294
294
  static elevatorSettingAlarm(n = null) {
295
295
  var t, e, i;
296
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
296
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
297
297
  o(i = u, d, E).call(i, ["6", "43"]);
298
298
  }
299
299
  static buttonPanelFailure(n = null) {
300
300
  var t, e, i;
301
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
301
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
302
302
  o(i = u, d, E).call(i, ["6", "44"]);
303
303
  }
304
304
  static errorWritingEeprom(n = null) {
305
305
  var t, e, i;
306
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
306
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
307
307
  o(i = u, d, E).call(i, ["6", "45"]);
308
308
  }
309
309
  static errorControlTemperature(n = null) {
310
310
  var t, e, i;
311
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
311
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
312
312
  o(i = u, d, E).call(i, ["6", "46"]);
313
313
  }
314
314
  static thermometerDisconnected(n = null) {
315
315
  var t, e, i;
316
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
316
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
317
317
  o(i = u, d, E).call(i, ["6", "47"]);
318
318
  }
319
319
  static thermometerMisconfigured(n = null) {
320
320
  var t, e, i;
321
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
321
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
322
322
  o(i = u, d, E).call(i, ["6", "48"]);
323
323
  }
324
324
  static thermometerFailure(n = null) {
325
325
  var t, e, i;
326
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
326
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
327
327
  o(i = u, d, E).call(i, ["6", "49"]);
328
328
  }
329
329
  static errorExtractorConsumption(n = null) {
330
330
  var t, e, i;
331
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
331
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
332
332
  o(i = u, d, E).call(i, ["6", "4A"]);
333
333
  }
334
334
  static channelSearchError(n = null) {
335
335
  var t, e, i;
336
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
336
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
337
337
  o(i = u, d, E).call(i, ["6", "4B"]);
338
338
  }
339
339
  static productExitMouthSearchError(n = null) {
340
340
  var t, e, i;
341
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
341
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
342
342
  o(i = u, d, E).call(i, ["6", "4C"]);
343
343
  }
344
344
  static elevatorInteriorLocked(n = null) {
345
345
  var t, e, i;
346
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
346
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
347
347
  o(i = u, d, E).call(i, ["6", "4D"]);
348
348
  }
349
349
  static productDetectorVerifierError(n = null) {
350
350
  var t, e, i;
351
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
351
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
352
352
  o(i = u, d, E).call(i, ["6", "4E"]);
353
353
  }
354
354
  static waitingForProductRecall(n = null) {
355
355
  var t, e, i;
356
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
356
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
357
357
  o(i = u, d, E).call(i, ["6", "4F"]);
358
358
  }
359
359
  static productExpiredByTemperature(n = null) {
360
360
  var t, e, i;
361
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
361
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
362
362
  o(i = u, d, E).call(i, ["6", "50"]);
363
363
  }
364
364
  static faultyAutomaticDoor(n = null) {
365
365
  var t, e, i;
366
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
366
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
367
367
  o(i = u, d, E).call(i, ["6", "51"]);
368
368
  }
369
369
  static rejectLever(n = null) {
@@ -391,25 +391,25 @@ const u = class u {
391
391
  static banknoteInsertedStacker(n = null, t = null) {
392
392
  var s, a, c, l;
393
393
  if (!o(s = u, d, T).call(s, n) || !o(a = u, d, M).call(a)) return !1;
394
- const e = ["80", "81", "82", "83", "84"], i = o(c = u, d, $t).call(c, e, t);
394
+ const e = ["80", "81", "82", "83", "84"], i = o(c = u, d, Jt).call(c, e, t);
395
395
  o(l = u, d, E).call(l, ["2", "B0", i]);
396
396
  }
397
397
  static banknoteInsertedEscrow(n = null, t = null) {
398
398
  var s, a, c, l;
399
399
  if (!o(s = u, d, T).call(s, n) || !o(a = u, d, M).call(a)) return !1;
400
- const e = ["90", "91", "92", "93", "94"], i = o(c = u, d, $t).call(c, e, t);
400
+ const e = ["90", "91", "92", "93", "94"], i = o(c = u, d, Jt).call(c, e, t);
401
401
  o(l = u, d, E).call(l, ["2", "B0", i]);
402
402
  }
403
403
  static banknoteEjected(n = null, t = null) {
404
404
  var s, a, c, l;
405
405
  if (!o(s = u, d, T).call(s, n) || !o(a = u, d, M).call(a)) return !1;
406
- const e = ["A0", "A1", "A2", "A3", "A4"], i = o(c = u, d, $t).call(c, e, t);
406
+ const e = ["A0", "A1", "A2", "A3", "A4"], i = o(c = u, d, Jt).call(c, e, t);
407
407
  o(l = u, d, E).call(l, ["2", "B0", i]);
408
408
  }
409
409
  static banknoteInsertedRecycler(n = null, t = null) {
410
410
  var s, a, c, l;
411
411
  if (!o(s = u, d, T).call(s, n) || !o(a = u, d, M).call(a)) return !1;
412
- const e = ["B0", "B1", "B2", "B3", "B4"], i = o(c = u, d, $t).call(c, e, t);
412
+ const e = ["B0", "B1", "B2", "B3", "B4"], i = o(c = u, d, Jt).call(c, e, t);
413
413
  o(l = u, d, E).call(l, ["2", "B0", i]);
414
414
  }
415
415
  static banknoteTaken(n = null) {
@@ -712,7 +712,7 @@ const u = class u {
712
712
  }
713
713
  static fullTray(n = null) {
714
714
  var t, e, i;
715
- if (!o(t = u, d, T).call(t, n) || !o(e = u, d, N).call(e)) return !1;
715
+ if (!o(t = u, d, T).call(t, n) || !o(e = u, d, B).call(e)) return !1;
716
716
  o(i = u, d, E).call(i, ["6", "4F"]);
717
717
  }
718
718
  static setConnection(n = null) {
@@ -721,16 +721,16 @@ const u = class u {
721
721
  n.__internal__.serial.connected = !0;
722
722
  }
723
723
  };
724
- st = new WeakMap(), ct = new WeakMap(), d = new WeakSet(), gi = function() {
724
+ st = new WeakMap(), ct = new WeakMap(), d = new WeakSet(), _i = function() {
725
725
  if (u.enable === !1) throw new Error("Emulator is disabled");
726
726
  return u.enable;
727
- }, bi = function(n) {
727
+ }, gi = function(n) {
728
728
  if (typeof n != "object" || !(n instanceof Ft))
729
729
  throw new Error(`Type ${n.typeDevice} is not supported`);
730
730
  return u.instance = n, F(u, st, n.typeDevice), F(u, ct, n.deviceNumber), !0;
731
731
  }, T = function(n = null) {
732
732
  var t, e;
733
- return !o(t = u, d, gi).call(t) || n === null && u.instance === null ? !1 : (u.instance === null && o(e = u, d, bi).call(e, n), !0);
733
+ return !o(t = u, d, _i).call(t) || n === null && u.instance === null ? !1 : (u.instance === null && o(e = u, d, gi).call(e, n), !0);
734
734
  }, en = function() {
735
735
  if (R(u, st) !== "locker") throw new Error("This function is only available for Locker devices");
736
736
  return !0;
@@ -738,7 +738,7 @@ st = new WeakMap(), ct = new WeakMap(), d = new WeakSet(), gi = function() {
738
738
  if (R(u, st) !== "boardroid")
739
739
  throw new Error("This function is only available for Boardroid devices");
740
740
  return !0;
741
- }, N = function() {
741
+ }, B = function() {
742
742
  if (R(u, st) !== "jofemar") throw new Error("This function is only available for Jofemar devices");
743
743
  return !0;
744
744
  }, _e = function() {
@@ -767,7 +767,7 @@ st = new WeakMap(), ct = new WeakMap(), d = new WeakSet(), gi = function() {
767
767
  break;
768
768
  }
769
769
  return e;
770
- }, $t = function(n, t = null) {
770
+ }, Jt = function(n, t = null) {
771
771
  let e = n[Math.floor(Math.random() * 4)];
772
772
  if (t !== null && !isNaN(parseFloat(t)))
773
773
  switch (t.toString()) {
@@ -788,9 +788,9 @@ st = new WeakMap(), ct = new WeakMap(), d = new WeakSet(), gi = function() {
788
788
  break;
789
789
  }
790
790
  return e;
791
- }, X(u, d), J(u, "enable", !1), J(u, "instance", null), X(u, st, null), X(u, ct, 1);
791
+ }, X(u, d), $(u, "enable", !1), $(u, "instance", null), X(u, st, null), X(u, ct, 1);
792
792
  let Ie = u;
793
- const O = class O extends fi {
793
+ const O = class O extends pi {
794
794
  static typeError(n) {
795
795
  const t = new Error();
796
796
  throw t.message = `Type ${n} is not supported`, t.name = "DeviceTypeError", t;
@@ -853,7 +853,7 @@ const O = class O extends fi {
853
853
  return typeof O.devices[n] > "u" ? O.typeError(n) : Object.values(O.devices[n]).find((i) => i.deviceNumber === t) ?? null;
854
854
  }
855
855
  };
856
- J(O, "instance", null), J(O, "devices", {
856
+ $(O, "instance", null), $(O, "devices", {
857
857
  relay: [],
858
858
  locker: [],
859
859
  jofemar: [],
@@ -863,8 +863,8 @@ J(O, "instance", null), J(O, "devices", {
863
863
  });
864
864
  let j = O;
865
865
  j.instance || (j.instance = new j());
866
- var I, mi, rn, At, yi, wi, vi, Pi, Ei, Ti, Ci, Si, ki, xi, Ai, Di;
867
- class Ft extends fi {
866
+ var I, bi, rn, At, mi, yi, wi, vi, Pi, Ei, Ti, Ci, Si, ki, xi, Ai;
867
+ class Ft extends pi {
868
868
  /**
869
869
  *
870
870
  * @param {null|array} filters
@@ -875,7 +875,7 @@ class Ft extends fi {
875
875
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1, device_listen_on_port: s = 1 } = {}) {
876
876
  super();
877
877
  X(this, I);
878
- J(this, "__internal__", {
878
+ $(this, "__internal__", {
879
879
  device_number: 1,
880
880
  aux_port_connector: 0,
881
881
  last_error: { message: null, action: null, code: null, no_code: 0 },
@@ -936,7 +936,9 @@ class Ft extends fi {
936
936
  backup_dispense: {}
937
937
  }
938
938
  });
939
- t && (this.serialFilters = t), e && (this.serialConfigPort = e), i && o(this, I, Ai).call(this, i), s && (typeof s == "number" || typeof s == "string") && (this.listenOnPort = s), o(this, I, Ci).call(this), o(this, I, Si).call(this);
939
+ if (!("serial" in navigator))
940
+ throw new Error("Web Serial not supported");
941
+ t && (this.serialFilters = t), e && (this.serialConfigPort = e), i && o(this, I, xi).call(this, i), s && (typeof s == "number" || typeof s == "string") && (this.listenOnPort = s), o(this, I, Ti).call(this), o(this, I, Ci).call(this);
940
942
  }
941
943
  set listenOnPort(t) {
942
944
  if (t = parseInt(t), isNaN(t) || t < 1 || t > 255) throw new Error("Invalid port number");
@@ -996,7 +998,7 @@ class Ft extends fi {
996
998
  }
997
999
  async connect() {
998
1000
  return new Promise((t, e) => {
999
- _i() || e("Web Serial not supported"), setTimeout(async () => {
1001
+ fi() || e("Web Serial not supported"), setTimeout(async () => {
1000
1002
  await ut(499), await this.serialConnect(), this.isConnected ? t(`${this.typeDevice} device ${this.deviceNumber} connected`) : e(`${this.typeDevice} device ${this.deviceNumber} not connected`);
1001
1003
  }, 1);
1002
1004
  });
@@ -1068,7 +1070,7 @@ class Ft extends fi {
1068
1070
  async serialConnect() {
1069
1071
  try {
1070
1072
  this.dispatch("serial:connecting", {});
1071
- const t = await o(this, I, yi).call(this);
1073
+ const t = await o(this, I, mi).call(this);
1072
1074
  if (t.length > 0)
1073
1075
  await this.serialPortsSaved(t);
1074
1076
  else {
@@ -1087,13 +1089,13 @@ class Ft extends fi {
1087
1089
  }, this.__internal__.time.response_connection), this.__internal__.serial.last_action = "connect", await o(this, I, rn).call(this, this.__internal__.serial.bytes_connection), this.dispatch("serial:sent", {
1088
1090
  action: "connect",
1089
1091
  bytes: this.__internal__.serial.bytes_connection
1090
- }), this.typeDevice === "relay" && o(this, I, At).call(this, ["DD", "DD"], null), await o(this, I, Ei).call(this);
1092
+ }), this.typeDevice === "relay" && o(this, I, At).call(this, ["DD", "DD"], null), await o(this, I, Pi).call(this);
1091
1093
  } catch (t) {
1092
1094
  this.serialErrors(t);
1093
1095
  }
1094
1096
  }
1095
1097
  async serialForget() {
1096
- return await o(this, I, Ti).call(this);
1098
+ return await o(this, I, Ei).call(this);
1097
1099
  }
1098
1100
  decToHex(t) {
1099
1101
  return parseInt(t, 10).toString(16);
@@ -1228,7 +1230,7 @@ class Ft extends fi {
1228
1230
  });
1229
1231
  }
1230
1232
  softReload() {
1231
- o(this, I, Di).call(this), this.dispatch("serial:soft-reload", {});
1233
+ o(this, I, Ai).call(this), this.dispatch("serial:soft-reload", {});
1232
1234
  }
1233
1235
  async sendConnect() {
1234
1236
  await this.appendToQueue(this.__internal__.serial.bytes_connection, "connect");
@@ -1276,7 +1278,7 @@ class Ft extends fi {
1276
1278
  return e.join("");
1277
1279
  }
1278
1280
  }
1279
- I = new WeakSet(), mi = function(t) {
1281
+ I = new WeakSet(), bi = function(t) {
1280
1282
  return !!(t.readable && t.writable);
1281
1283
  }, rn = async function(t) {
1282
1284
  const e = this.__internal__.serial.port;
@@ -1300,26 +1302,26 @@ At = function(t = [], e = null) {
1300
1302
  } else
1301
1303
  this.serialCorruptMessage(t, e);
1302
1304
  this.__internal__.serial.queue.length !== 0 && this.dispatch("internal:queue", {});
1303
- }, yi = async function() {
1305
+ }, mi = async function() {
1304
1306
  const t = this.serialFilters, e = await navigator.serial.getPorts({ filters: t });
1305
1307
  return t.length === 0 ? e : e.filter((s) => {
1306
1308
  const a = s.getInfo();
1307
1309
  return t.some((c) => a.usbProductId === c.usbProductId && a.usbVendorId === c.usbVendorId);
1308
- }).filter((s) => !o(this, I, mi).call(this, s));
1309
- }, wi = function(t) {
1310
+ }).filter((s) => !o(this, I, bi).call(this, s));
1311
+ }, yi = function(t) {
1310
1312
  if (t) {
1311
1313
  const e = this.__internal__.serial.response.buffer;
1312
1314
  let i = new Uint8Array(e.length + t.byteLength);
1313
1315
  i.set(e, 0), i.set(new Uint8Array(t), e.length), this.__internal__.serial.response.buffer = i;
1314
1316
  }
1315
- }, vi = async function() {
1317
+ }, wi = async function() {
1316
1318
  this.__internal__.serial.time_until_send_bytes && (clearTimeout(this.__internal__.serial.time_until_send_bytes), this.__internal__.serial.time_until_send_bytes = 0), this.__internal__.serial.time_until_send_bytes = setTimeout(() => {
1317
1319
  let t = [];
1318
1320
  for (const e in this.__internal__.serial.response.buffer)
1319
1321
  t.push(this.__internal__.serial.response.buffer[e].toString(16));
1320
1322
  this.__internal__.serial.response.buffer && o(this, I, At).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1321
1323
  }, 400);
1322
- }, Pi = async function() {
1324
+ }, vi = async function() {
1323
1325
  if (this.__internal__.serial.response.length === this.__internal__.serial.response.buffer.length) {
1324
1326
  const t = [];
1325
1327
  for (const e in this.__internal__.serial.response.buffer)
@@ -1349,7 +1351,7 @@ At = function(t = [], e = null) {
1349
1351
  }
1350
1352
  }
1351
1353
  }
1352
- }, Ei = async function() {
1354
+ }, Pi = async function() {
1353
1355
  const t = this.__internal__.serial.port;
1354
1356
  for (; t.readable && this.__internal__.serial.keep_reading; ) {
1355
1357
  const e = t.readable.getReader();
@@ -1362,7 +1364,7 @@ At = function(t = [], e = null) {
1362
1364
  e.releaseLock(), this.__internal__.serial.keep_reading = !1, i = !1;
1363
1365
  break;
1364
1366
  }
1365
- o(this, I, wi).call(this, s), this.__internal__.serial.response.length === null ? await o(this, I, vi).call(this) : await o(this, I, Pi).call(this);
1367
+ o(this, I, yi).call(this, s), this.__internal__.serial.response.length === null ? await o(this, I, wi).call(this) : await o(this, I, vi).call(this);
1366
1368
  }
1367
1369
  } catch (i) {
1368
1370
  this.serialErrors(i);
@@ -1371,9 +1373,9 @@ At = function(t = [], e = null) {
1371
1373
  }
1372
1374
  }
1373
1375
  this.__internal__.serial.keep_reading = !0, await this.__internal__.serial.port.close();
1374
- }, Ti = async function() {
1376
+ }, Ei = async function() {
1375
1377
  return typeof window > "u" ? !1 : "serial" in navigator && "forget" in window.SerialPort.prototype ? (await this.__internal__.serial.port.forget(), !0) : !1;
1376
- }, Ci = function() {
1378
+ }, Ti = function() {
1377
1379
  [
1378
1380
  "serial:connected",
1379
1381
  "serial:connecting",
@@ -1395,19 +1397,19 @@ At = function(t = [], e = null) {
1395
1397
  ].forEach((e) => {
1396
1398
  this.serialRegisterAvailableListener(e);
1397
1399
  });
1398
- }, Si = function() {
1400
+ }, Ci = function() {
1399
1401
  const t = this;
1400
1402
  this.on("internal:queue", async () => {
1401
1403
  var e;
1402
- await o(e = t, I, xi).call(e);
1403
- }), o(this, I, ki).call(this);
1404
- }, ki = function() {
1404
+ await o(e = t, I, ki).call(e);
1405
+ }), o(this, I, Si).call(this);
1406
+ }, Si = function() {
1405
1407
  const t = this;
1406
1408
  navigator.serial.addEventListener("connect", async () => {
1407
1409
  t.isDisconnected && await t.serialConnect().catch(() => {
1408
1410
  });
1409
1411
  });
1410
- }, xi = async function() {
1412
+ }, ki = async function() {
1411
1413
  if (!this.__internal__.serial.connected) {
1412
1414
  await this.serialConnect();
1413
1415
  return;
@@ -1423,13 +1425,13 @@ At = function(t = [], e = null) {
1423
1425
  }), this.typeDevice === "relay" && o(this, I, At).call(this, ["DD", "DD"], null);
1424
1426
  const i = [...this.__internal__.serial.queue];
1425
1427
  this.__internal__.serial.queue = i.splice(1);
1426
- }, Ai = function(t = 1) {
1428
+ }, xi = function(t = 1) {
1427
1429
  this.__internal__.device_number = t, this.__internal__.serial.bytes_connection = this.serialSetConnectionConstant(t);
1428
- }, Di = function() {
1430
+ }, Ai = function() {
1429
1431
  this.__internal__.last_error = { message: null, action: null, code: null, no_code: 0 };
1430
1432
  };
1431
- var se, Me, Ri;
1432
- class wc extends Ft {
1433
+ var se, Me, Di;
1434
+ class vc extends Ft {
1433
1435
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1 } = {}) {
1434
1436
  super({ filters: t, config_port: e, no_device: i });
1435
1437
  X(this, Me);
@@ -1439,7 +1441,7 @@ class wc extends Ft {
1439
1441
  });
1440
1442
  if (this.__internal__.device.type = "relay", j.getCustom(this.typeDevice, i))
1441
1443
  throw new Error(`Device ${this.typeDevice} ${i} already exists`);
1442
- o(this, Me, Ri).call(this);
1444
+ o(this, Me, Di).call(this);
1443
1445
  }
1444
1446
  serialMessage(t) {
1445
1447
  const e = {
@@ -1484,11 +1486,11 @@ class wc extends Ft {
1484
1486
  t ? (await i.turnOff(), await ut(e), await i.turnOn()) : (await i.turnOn(), await ut(e), await i.turnOff());
1485
1487
  }
1486
1488
  }
1487
- se = new WeakMap(), Me = new WeakSet(), Ri = function() {
1489
+ se = new WeakMap(), Me = new WeakSet(), Di = function() {
1488
1490
  j.add(this);
1489
1491
  };
1490
- var Y, z, Pt, D, Ii, Oi, Bi, Ni, sn, Mi, Dt, Rt, ge, be, me;
1491
- class vc extends Ft {
1492
+ var Y, z, Pt, D, Ri, Ii, Oi, Ni, sn, Bi, Dt, Rt, ge, be, me;
1493
+ class Pc extends Ft {
1492
1494
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1, device_listen_on_port: s = 3 } = {}) {
1493
1495
  super({ filters: t, config_port: e, no_device: i, device_listen_on_port: s });
1494
1496
  X(this, D);
@@ -1497,7 +1499,7 @@ class vc extends Ft {
1497
1499
  X(this, Pt, 0);
1498
1500
  if (this.__internal__.device.type = "locker", j.getCustom(this.typeDevice, i))
1499
1501
  throw new Error(`Device ${this.typeDevice} ${i} already exists`);
1500
- this.__internal__.device.milliseconds = 666, this.__internal__.dispense.limit_counter = 1, o(this, D, Oi).call(this), o(this, D, Ii).call(this);
1502
+ this.__internal__.device.milliseconds = 666, this.__internal__.dispense.limit_counter = 1, o(this, D, Ii).call(this), o(this, D, Ri).call(this);
1501
1503
  }
1502
1504
  serialMessage(t) {
1503
1505
  const e = {
@@ -1577,12 +1579,12 @@ class vc extends Ft {
1577
1579
  }
1578
1580
  async dispense({ cell: t = 1 } = {}) {
1579
1581
  t = o(this, D, Dt).call(this, t);
1580
- const e = o(this, D, Mi).call(this, t);
1582
+ const e = o(this, D, Bi).call(this, t);
1581
1583
  return await this.internalDispense(e);
1582
1584
  }
1583
1585
  async status({ cell: t = 1 } = {}) {
1584
1586
  t = o(this, D, Dt).call(this, t);
1585
- const e = o(this, D, Bi).call(this, t);
1587
+ const e = o(this, D, Oi).call(this, t);
1586
1588
  return await this.appendToQueue(e, "status");
1587
1589
  }
1588
1590
  async lightScan({ since: t = 0, until: e = 10 } = {}) {
@@ -1624,13 +1626,13 @@ class vc extends Ft {
1624
1626
  F(this, z, 90), o(this, D, me).call(this), o(this, D, Rt).call(this);
1625
1627
  }
1626
1628
  }
1627
- Y = new WeakMap(), z = new WeakMap(), Pt = new WeakMap(), D = new WeakSet(), Ii = function() {
1629
+ Y = new WeakMap(), z = new WeakMap(), Pt = new WeakMap(), D = new WeakSet(), Ri = function() {
1628
1630
  const t = ["percentage:disable", "percentage:enable", "percentage:open"];
1629
1631
  for (const e of t)
1630
1632
  this.serialRegisterAvailableListener(e);
1631
- }, Oi = function() {
1633
+ }, Ii = function() {
1632
1634
  j.add(this);
1633
- }, Bi = function(t = 1) {
1635
+ }, Oi = function(t = 1) {
1634
1636
  return t = o(this, D, Dt).call(this, t), this.serialLockerHexCmd(new Uint8Array([16, this.__internal__.device.listen_on_port, t]));
1635
1637
  }, Ni = function(t = 0, e = 10) {
1636
1638
  return this.serialLockerHexCmd(new Uint8Array([32, this.__internal__.device.listen_on_port, t, e]));
@@ -1639,7 +1641,7 @@ Y = new WeakMap(), z = new WeakMap(), Pt = new WeakMap(), D = new WeakSet(), Ii
1639
1641
  if (i < 0 || i > 10) throw new Error("Invalid row number");
1640
1642
  let s = 1;
1641
1643
  return t || (s = 0), this.serialLockerHexCmd(new Uint8Array([48, this.__internal__.device.listen_on_port, e, i, s]));
1642
- }, Mi = function(t = 1) {
1644
+ }, Bi = function(t = 1) {
1643
1645
  t = o(this, D, Dt).call(this, t);
1644
1646
  const e = this.__internal__.device.milliseconds, i = e % 256, s = Math.floor(e / 3) % 256;
1645
1647
  return this.serialLockerHexCmd(
@@ -1668,10 +1670,10 @@ function wa(r, n) {
1668
1670
  function le(r, n) {
1669
1671
  return r | n;
1670
1672
  }
1671
- function Kn(r, n) {
1673
+ function Hn(r, n) {
1672
1674
  return r ^ n;
1673
1675
  }
1674
- function Wn(r, n) {
1676
+ function Kn(r, n) {
1675
1677
  return r & ~n;
1676
1678
  }
1677
1679
  function va(r) {
@@ -1685,18 +1687,18 @@ function Pa(r) {
1685
1687
  r &= r - 1, ++n;
1686
1688
  return n;
1687
1689
  }
1688
- var Vt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Fi = "=";
1690
+ var Vt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Mi = "=";
1689
1691
  function Oe(r) {
1690
1692
  var n, t, e = "";
1691
1693
  for (n = 0; n + 3 <= r.length; n += 3)
1692
1694
  t = parseInt(r.substring(n, n + 3), 16), e += Vt.charAt(t >> 6) + Vt.charAt(t & 63);
1693
1695
  for (n + 1 == r.length ? (t = parseInt(r.substring(n, n + 1), 16), e += Vt.charAt(t << 2)) : n + 2 == r.length && (t = parseInt(r.substring(n, n + 2), 16), e += Vt.charAt(t >> 2) + Vt.charAt((t & 3) << 4)); (e.length & 3) > 0; )
1694
- e += Fi;
1696
+ e += Mi;
1695
1697
  return e;
1696
1698
  }
1697
- function zn(r) {
1699
+ function Wn(r) {
1698
1700
  var n = "", t, e = 0, i = 0;
1699
- for (t = 0; t < r.length && r.charAt(t) != Fi; ++t) {
1701
+ for (t = 0; t < r.length && r.charAt(t) != Mi; ++t) {
1700
1702
  var s = Vt.indexOf(r.charAt(t));
1701
1703
  s < 0 || (e == 0 ? (n += Tt(s >> 2), i = s & 3, e = 1) : e == 1 ? (n += Tt(i << 2 | s >> 4), i = s & 15, e = 2) : e == 2 ? (n += Tt(i), n += Tt(s >> 2), i = s & 3, e = 3) : (n += Tt(i << 2 | s >> 4), n += Tt(s & 15), e = 0));
1702
1704
  }
@@ -1808,9 +1810,9 @@ var Ut, Ea = {
1808
1810
  return n.length == 1 ? n[0] : this;
1809
1811
  }, r;
1810
1812
  }()
1811
- ), Ui = "…", Ta = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, Ca = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
1813
+ ), Fi = "…", Ta = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, Ca = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
1812
1814
  function jt(r, n) {
1813
- return r.length > n && (r = r.substring(0, n) + Ui), r;
1815
+ return r.length > n && (r = r.substring(0, n) + Fi), r;
1814
1816
  }
1815
1817
  var Xe = (
1816
1818
  /** @class */
@@ -1895,7 +1897,7 @@ var Xe = (
1895
1897
  e /= 2, i > e && (t = n + e);
1896
1898
  for (var a = n; a < t; ++a)
1897
1899
  s += this.hexByte(this.get(a));
1898
- return i > e && (s += Ui), s;
1900
+ return i > e && (s += Fi), s;
1899
1901
  }, r.prototype.parseOID = function(n, t, e) {
1900
1902
  for (var i = "", s = new Qt(), a = 0, c = n; c < t; ++c) {
1901
1903
  var l = this.get(c);
@@ -1921,7 +1923,7 @@ var Xe = (
1921
1923
  /** @class */
1922
1924
  function() {
1923
1925
  function r(n, t, e, i, s) {
1924
- if (!(i instanceof Xn))
1926
+ if (!(i instanceof zn))
1925
1927
  throw new Error("Invalid tag value.");
1926
1928
  this.stream = n, this.header = t, this.length = e, this.tag = i, this.sub = s;
1927
1929
  }
@@ -2086,7 +2088,7 @@ var Xe = (
2086
2088
  }, r.decode = function(n) {
2087
2089
  var t;
2088
2090
  n instanceof Xe ? t = n : t = new Xe(n, 0);
2089
- var e = new Xe(t), i = new Xn(t), s = r.decodeLength(t), a = t.pos, c = a - e.pos, l = null, h = function() {
2091
+ var e = new Xe(t), i = new zn(t), s = r.decodeLength(t), a = t.pos, c = a - e.pos, l = null, h = function() {
2090
2092
  var _ = [];
2091
2093
  if (s !== null) {
2092
2094
  for (var m = a + s; t.pos < m; )
@@ -2128,7 +2130,7 @@ var Xe = (
2128
2130
  return new r(e, c, s, i, l);
2129
2131
  }, r;
2130
2132
  }()
2131
- ), Xn = (
2133
+ ), zn = (
2132
2134
  /** @class */
2133
2135
  function() {
2134
2136
  function r(n) {
@@ -2147,7 +2149,7 @@ var Xe = (
2147
2149
  return this.tagClass === 0 && this.tagNumber === 0;
2148
2150
  }, r;
2149
2151
  }()
2150
- ), kt, ka = 244837814094590, Gn = (ka & 16777215) == 15715070, et = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], xa = (1 << 26) / et[et.length - 1], A = (
2152
+ ), kt, ka = 244837814094590, Xn = (ka & 16777215) == 15715070, et = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], xa = (1 << 26) / et[et.length - 1], A = (
2151
2153
  /** @class */
2152
2154
  function() {
2153
2155
  function r(n, t, e) {
@@ -2175,7 +2177,7 @@ var Xe = (
2175
2177
  l < t ? (i = (this[c] & (1 << l) - 1) << t - l, i |= this[--c] >> (l += this.DB - t)) : (i = this[c] >> (l -= t) & e, l <= 0 && (l += this.DB, --c)), i > 0 && (s = !0), s && (a += Tt(i));
2176
2178
  return s ? a : "0";
2177
2179
  }, r.prototype.negate = function() {
2178
- var n = B();
2180
+ var n = N();
2179
2181
  return r.ZERO.subTo(this, n), n;
2180
2182
  }, r.prototype.abs = function() {
2181
2183
  return this.s < 0 ? this.negate() : this;
@@ -2193,13 +2195,13 @@ var Xe = (
2193
2195
  }, r.prototype.bitLength = function() {
2194
2196
  return this.t <= 0 ? 0 : this.DB * (this.t - 1) + he(this[this.t - 1] ^ this.s & this.DM);
2195
2197
  }, r.prototype.mod = function(n) {
2196
- var t = B();
2198
+ var t = N();
2197
2199
  return this.abs().divRemTo(n, null, t), this.s < 0 && t.compareTo(r.ZERO) > 0 && n.subTo(t, t), t;
2198
2200
  }, r.prototype.modPowInt = function(n, t) {
2199
2201
  var e;
2200
- return n < 256 || t.isEven() ? e = new Jn(t) : e = new $n(t), this.exp(n, e);
2202
+ return n < 256 || t.isEven() ? e = new Gn(t) : e = new $n(t), this.exp(n, e);
2201
2203
  }, r.prototype.clone = function() {
2202
- var n = B();
2204
+ var n = N();
2203
2205
  return this.copyTo(n), n;
2204
2206
  }, r.prototype.intValue = function() {
2205
2207
  if (this.s < 0) {
@@ -2235,26 +2237,26 @@ var Xe = (
2235
2237
  }, r.prototype.max = function(n) {
2236
2238
  return this.compareTo(n) > 0 ? this : n;
2237
2239
  }, r.prototype.and = function(n) {
2238
- var t = B();
2240
+ var t = N();
2239
2241
  return this.bitwiseTo(n, wa, t), t;
2240
2242
  }, r.prototype.or = function(n) {
2241
- var t = B();
2243
+ var t = N();
2242
2244
  return this.bitwiseTo(n, le, t), t;
2243
2245
  }, r.prototype.xor = function(n) {
2244
- var t = B();
2245
- return this.bitwiseTo(n, Kn, t), t;
2246
+ var t = N();
2247
+ return this.bitwiseTo(n, Hn, t), t;
2246
2248
  }, r.prototype.andNot = function(n) {
2247
- var t = B();
2248
- return this.bitwiseTo(n, Wn, t), t;
2249
+ var t = N();
2250
+ return this.bitwiseTo(n, Kn, t), t;
2249
2251
  }, r.prototype.not = function() {
2250
- for (var n = B(), t = 0; t < this.t; ++t)
2252
+ for (var n = N(), t = 0; t < this.t; ++t)
2251
2253
  n[t] = this.DM & ~this[t];
2252
2254
  return n.t = this.t, n.s = ~this.s, n;
2253
2255
  }, r.prototype.shiftLeft = function(n) {
2254
- var t = B();
2256
+ var t = N();
2255
2257
  return n < 0 ? this.rShiftTo(-n, t) : this.lShiftTo(n, t), t;
2256
2258
  }, r.prototype.shiftRight = function(n) {
2257
- var t = B();
2259
+ var t = N();
2258
2260
  return n < 0 ? this.lShiftTo(-n, t) : this.rShiftTo(n, t), t;
2259
2261
  }, r.prototype.getLowestSetBit = function() {
2260
2262
  for (var n = 0; n < this.t; ++n)
@@ -2271,39 +2273,39 @@ var Xe = (
2271
2273
  }, r.prototype.setBit = function(n) {
2272
2274
  return this.changeBit(n, le);
2273
2275
  }, r.prototype.clearBit = function(n) {
2274
- return this.changeBit(n, Wn);
2275
- }, r.prototype.flipBit = function(n) {
2276
2276
  return this.changeBit(n, Kn);
2277
+ }, r.prototype.flipBit = function(n) {
2278
+ return this.changeBit(n, Hn);
2277
2279
  }, r.prototype.add = function(n) {
2278
- var t = B();
2280
+ var t = N();
2279
2281
  return this.addTo(n, t), t;
2280
2282
  }, r.prototype.subtract = function(n) {
2281
- var t = B();
2283
+ var t = N();
2282
2284
  return this.subTo(n, t), t;
2283
2285
  }, r.prototype.multiply = function(n) {
2284
- var t = B();
2286
+ var t = N();
2285
2287
  return this.multiplyTo(n, t), t;
2286
2288
  }, r.prototype.divide = function(n) {
2287
- var t = B();
2289
+ var t = N();
2288
2290
  return this.divRemTo(n, t, null), t;
2289
2291
  }, r.prototype.remainder = function(n) {
2290
- var t = B();
2292
+ var t = N();
2291
2293
  return this.divRemTo(n, null, t), t;
2292
2294
  }, r.prototype.divideAndRemainder = function(n) {
2293
- var t = B(), e = B();
2295
+ var t = N(), e = N();
2294
2296
  return this.divRemTo(n, t, e), [t, e];
2295
2297
  }, r.prototype.modPow = function(n, t) {
2296
2298
  var e = n.bitLength(), i, s = Ct(1), a;
2297
2299
  if (e <= 0)
2298
2300
  return s;
2299
- e < 18 ? i = 1 : e < 48 ? i = 3 : e < 144 ? i = 4 : e < 768 ? i = 5 : i = 6, e < 8 ? a = new Jn(t) : t.isEven() ? a = new Da(t) : a = new $n(t);
2301
+ e < 18 ? i = 1 : e < 48 ? i = 3 : e < 144 ? i = 4 : e < 768 ? i = 5 : i = 6, e < 8 ? a = new Gn(t) : t.isEven() ? a = new Da(t) : a = new $n(t);
2300
2302
  var c = [], l = 3, h = i - 1, p = (1 << i) - 1;
2301
2303
  if (c[1] = a.convert(this), i > 1) {
2302
- var _ = B();
2304
+ var _ = N();
2303
2305
  for (a.sqrTo(c[1], _); l <= p; )
2304
- c[l] = B(), a.mulTo(_, c[l - 2], c[l]), l += 2;
2306
+ c[l] = N(), a.mulTo(_, c[l - 2], c[l]), l += 2;
2305
2307
  }
2306
- var m = n.t - 1, P, v = !0, S = B(), C;
2308
+ var m = n.t - 1, P, v = !0, S = N(), C;
2307
2309
  for (e = he(n[m]) - 1; m >= 0; ) {
2308
2310
  for (e >= h ? P = n[m] >> e - h & p : (P = (n[m] & (1 << e + 1) - 1) << h - e, m > 0 && (P |= n[m - 1] >> this.DB + e - h)), l = i; !(P & 1); )
2309
2311
  P >>= 1, --l;
@@ -2396,7 +2398,7 @@ var Xe = (
2396
2398
  }
2397
2399
  this.t = 0, this.s = 0;
2398
2400
  for (var i = n.length, s = !1, a = 0; --i >= 0; ) {
2399
- var c = e == 8 ? +n[i] & 255 : Zn(n, i);
2401
+ var c = e == 8 ? +n[i] & 255 : Qn(n, i);
2400
2402
  if (c < 0) {
2401
2403
  n.charAt(i) == "-" && (s = !0);
2402
2404
  continue;
@@ -2472,18 +2474,18 @@ var Xe = (
2472
2474
  t != null && t.fromInt(0), e != null && this.copyTo(e);
2473
2475
  return;
2474
2476
  }
2475
- e == null && (e = B());
2476
- var a = B(), c = this.s, l = n.s, h = this.DB - he(i[i.t - 1]);
2477
+ e == null && (e = N());
2478
+ var a = N(), c = this.s, l = n.s, h = this.DB - he(i[i.t - 1]);
2477
2479
  h > 0 ? (i.lShiftTo(h, a), s.lShiftTo(h, e)) : (i.copyTo(a), s.copyTo(e));
2478
2480
  var p = a.t, _ = a[p - 1];
2479
2481
  if (_ != 0) {
2480
- var m = _ * (1 << this.F1) + (p > 1 ? a[p - 2] >> this.F2 : 0), P = this.FV / m, v = (1 << this.F1) / m, S = 1 << this.F2, C = e.t, L = C - p, U = t ?? B();
2482
+ var m = _ * (1 << this.F1) + (p > 1 ? a[p - 2] >> this.F2 : 0), P = this.FV / m, v = (1 << this.F1) / m, S = 1 << this.F2, C = e.t, L = C - p, U = t ?? N();
2481
2483
  for (a.dlShiftTo(L, U), e.compareTo(U) >= 0 && (e[e.t++] = 1, e.subTo(U, e)), r.ONE.dlShiftTo(p, U), U.subTo(a, a); a.t < p; )
2482
2484
  a[a.t++] = 0;
2483
2485
  for (; --L >= 0; ) {
2484
- var V = e[--C] == _ ? this.DM : Math.floor(e[C] * P + (e[C - 1] + S) * v);
2485
- if ((e[C] += a.am(0, V, e, L, 0, p)) < V)
2486
- for (a.dlShiftTo(L, U), e.subTo(U, e); e[C] < --V; )
2486
+ var q = e[--C] == _ ? this.DM : Math.floor(e[C] * P + (e[C - 1] + S) * v);
2487
+ if ((e[C] += a.am(0, q, e, L, 0, p)) < q)
2488
+ for (a.dlShiftTo(L, U), e.subTo(U, e); e[C] < --q; )
2487
2489
  e.subTo(U, e);
2488
2490
  }
2489
2491
  t != null && (e.drShiftTo(p, t), c != l && r.ZERO.subTo(t, t)), e.t = p, e.clamp(), h > 0 && e.rShiftTo(h, e), c < 0 && r.ZERO.subTo(e, e);
@@ -2502,7 +2504,7 @@ var Xe = (
2502
2504
  }, r.prototype.exp = function(n, t) {
2503
2505
  if (n > 4294967295 || n < 1)
2504
2506
  return r.ONE;
2505
- var e = B(), i = B(), s = t.convert(this), a = he(n) - 1;
2507
+ var e = N(), i = N(), s = t.convert(this), a = he(n) - 1;
2506
2508
  for (s.copyTo(e); --a >= 0; )
2507
2509
  if (t.sqrTo(e, i), (n & 1 << a) > 0)
2508
2510
  t.mulTo(i, s, e);
@@ -2516,14 +2518,14 @@ var Xe = (
2516
2518
  }, r.prototype.toRadix = function(n) {
2517
2519
  if (n == null && (n = 10), this.signum() == 0 || n < 2 || n > 36)
2518
2520
  return "0";
2519
- var t = this.chunkSize(n), e = Math.pow(n, t), i = Ct(e), s = B(), a = B(), c = "";
2521
+ var t = this.chunkSize(n), e = Math.pow(n, t), i = Ct(e), s = N(), a = N(), c = "";
2520
2522
  for (this.divRemTo(i, s, a); s.signum() > 0; )
2521
2523
  c = (e + a.intValue()).toString(n).substr(1) + c, s.divRemTo(i, s, a);
2522
2524
  return a.intValue().toString(n) + c;
2523
2525
  }, r.prototype.fromRadix = function(n, t) {
2524
2526
  this.fromInt(0), t == null && (t = 10);
2525
2527
  for (var e = this.chunkSize(t), i = Math.pow(t, e), s = !1, a = 0, c = 0, l = 0; l < n.length; ++l) {
2526
- var h = Zn(n, l);
2528
+ var h = Qn(n, l);
2527
2529
  if (h < 0) {
2528
2530
  n.charAt(l) == "-" && this.signum() == 0 && (s = !0);
2529
2531
  continue;
@@ -2615,7 +2617,7 @@ var Xe = (
2615
2617
  return !1;
2616
2618
  var i = t.shiftRight(e);
2617
2619
  n = n + 1 >> 1, n > et.length && (n = et.length);
2618
- for (var s = B(), a = 0; a < n; ++a) {
2620
+ for (var s = N(), a = 0; a < n; ++a) {
2619
2621
  s.fromInt(et[Math.floor(Math.random() * et.length)]);
2620
2622
  var c = s.modPow(i, this);
2621
2623
  if (c.compareTo(r.ONE) != 0 && c.compareTo(t) != 0) {
@@ -2628,7 +2630,7 @@ var Xe = (
2628
2630
  }
2629
2631
  return !0;
2630
2632
  }, r.prototype.square = function() {
2631
- var n = B();
2633
+ var n = N();
2632
2634
  return this.squareTo(n), n;
2633
2635
  }, r.prototype.gcda = function(n, t) {
2634
2636
  var e = this.s < 0 ? this.negate() : this.clone(), i = n.s < 0 ? n.negate() : n.clone();
@@ -2682,7 +2684,7 @@ var Xe = (
2682
2684
  n.squareTo(t);
2683
2685
  }, r;
2684
2686
  }()
2685
- ), Jn = (
2687
+ ), Gn = (
2686
2688
  /** @class */
2687
2689
  function() {
2688
2690
  function r(n) {
@@ -2707,10 +2709,10 @@ var Xe = (
2707
2709
  this.m = n, this.mp = n.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << n.DB - 15) - 1, this.mt2 = 2 * n.t;
2708
2710
  }
2709
2711
  return r.prototype.convert = function(n) {
2710
- var t = B();
2712
+ var t = N();
2711
2713
  return n.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), n.s < 0 && t.compareTo(A.ZERO) > 0 && this.m.subTo(t, t), t;
2712
2714
  }, r.prototype.revert = function(n) {
2713
- var t = B();
2715
+ var t = N();
2714
2716
  return n.copyTo(t), this.reduce(t), t;
2715
2717
  }, r.prototype.reduce = function(n) {
2716
2718
  for (; n.t <= this.mt2; )
@@ -2731,14 +2733,14 @@ var Xe = (
2731
2733
  /** @class */
2732
2734
  function() {
2733
2735
  function r(n) {
2734
- this.m = n, this.r2 = B(), this.q3 = B(), A.ONE.dlShiftTo(2 * n.t, this.r2), this.mu = this.r2.divide(n);
2736
+ this.m = n, this.r2 = N(), this.q3 = N(), A.ONE.dlShiftTo(2 * n.t, this.r2), this.mu = this.r2.divide(n);
2735
2737
  }
2736
2738
  return r.prototype.convert = function(n) {
2737
2739
  if (n.s < 0 || n.t > 2 * this.m.t)
2738
2740
  return n.mod(this.m);
2739
2741
  if (n.compareTo(this.m) < 0)
2740
2742
  return n;
2741
- var t = B();
2743
+ var t = N();
2742
2744
  return n.copyTo(t), this.reduce(t), t;
2743
2745
  }, r.prototype.revert = function(n) {
2744
2746
  return n;
@@ -2754,20 +2756,20 @@ var Xe = (
2754
2756
  }, r;
2755
2757
  }()
2756
2758
  );
2757
- function B() {
2759
+ function N() {
2758
2760
  return new A(null);
2759
2761
  }
2760
2762
  function H(r, n) {
2761
2763
  return new A(r, n);
2762
2764
  }
2763
- var Qn = typeof navigator < "u";
2764
- Qn && Gn && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am = function(n, t, e, i, s, a) {
2765
+ var Jn = typeof navigator < "u";
2766
+ Jn && Xn && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am = function(n, t, e, i, s, a) {
2765
2767
  for (var c = t & 32767, l = t >> 15; --a >= 0; ) {
2766
2768
  var h = this[n] & 32767, p = this[n++] >> 15, _ = l * h + p * c;
2767
2769
  h = c * h + ((_ & 32767) << 15) + e[i] + (s & 1073741823), s = (h >>> 30) + (_ >>> 15) + l * p + (s >>> 30), e[i++] = h & 1073741823;
2768
2770
  }
2769
2771
  return s;
2770
- }, kt = 30) : Qn && Gn && navigator.appName != "Netscape" ? (A.prototype.am = function(n, t, e, i, s, a) {
2772
+ }, kt = 30) : Jn && Xn && navigator.appName != "Netscape" ? (A.prototype.am = function(n, t, e, i, s, a) {
2771
2773
  for (; --a >= 0; ) {
2772
2774
  var c = t * this[n++] + e[i] + s;
2773
2775
  s = Math.floor(c / 67108864), e[i++] = c & 67108863;
@@ -2783,10 +2785,10 @@ Qn && Gn && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am
2783
2785
  A.prototype.DB = kt;
2784
2786
  A.prototype.DM = (1 << kt) - 1;
2785
2787
  A.prototype.DV = 1 << kt;
2786
- var Nn = 52;
2787
- A.prototype.FV = Math.pow(2, Nn);
2788
- A.prototype.F1 = Nn - kt;
2789
- A.prototype.F2 = 2 * kt - Nn;
2788
+ var Bn = 52;
2789
+ A.prototype.FV = Math.pow(2, Bn);
2790
+ A.prototype.F1 = Bn - kt;
2791
+ A.prototype.F2 = 2 * kt - Bn;
2790
2792
  var Fe = [], zt, dt;
2791
2793
  zt = 48;
2792
2794
  for (dt = 0; dt <= 9; ++dt)
@@ -2797,12 +2799,12 @@ for (dt = 10; dt < 36; ++dt)
2797
2799
  zt = 65;
2798
2800
  for (dt = 10; dt < 36; ++dt)
2799
2801
  Fe[zt++] = dt;
2800
- function Zn(r, n) {
2802
+ function Qn(r, n) {
2801
2803
  var t = Fe[r.charCodeAt(n)];
2802
2804
  return t ?? -1;
2803
2805
  }
2804
2806
  function Ct(r) {
2805
- var n = B();
2807
+ var n = N();
2806
2808
  return n.fromInt(r), n;
2807
2809
  }
2808
2810
  function he(r) {
@@ -2833,7 +2835,7 @@ var Ra = (
2833
2835
  function Ia() {
2834
2836
  return new Ra();
2835
2837
  }
2836
- var Li = 256, ue, St = null, bt;
2838
+ var Ui = 256, ue, St = null, bt;
2837
2839
  if (St == null) {
2838
2840
  St = [], bt = 0;
2839
2841
  var de = void 0;
@@ -2843,7 +2845,7 @@ if (St == null) {
2843
2845
  St[bt++] = Ge[de] & 255;
2844
2846
  }
2845
2847
  var pe = 0, fe = function(r) {
2846
- if (pe = pe || 0, pe >= 256 || bt >= Li) {
2848
+ if (pe = pe || 0, pe >= 256 || bt >= Ui) {
2847
2849
  window.removeEventListener ? window.removeEventListener("mousemove", fe, !1) : window.detachEvent && window.detachEvent("onmousemove", fe);
2848
2850
  return;
2849
2851
  }
@@ -2857,7 +2859,7 @@ if (St == null) {
2857
2859
  }
2858
2860
  function Oa() {
2859
2861
  if (ue == null) {
2860
- for (ue = Ia(); bt < Li; ) {
2862
+ for (ue = Ia(); bt < Ui; ) {
2861
2863
  var r = Math.floor(65536 * Math.random());
2862
2864
  St[bt++] = r & 255;
2863
2865
  }
@@ -2878,7 +2880,7 @@ var on = (
2878
2880
  }, r;
2879
2881
  }()
2880
2882
  );
2881
- function Ba(r, n) {
2883
+ function Na(r, n) {
2882
2884
  if (n < r.length + 22)
2883
2885
  return console.error("Message too long for RSA"), null;
2884
2886
  for (var t = n - r.length - 6, e = "", i = 0; i < t; i += 2)
@@ -2886,7 +2888,7 @@ function Ba(r, n) {
2886
2888
  var s = "0001" + e + "00" + r;
2887
2889
  return H(s, 16);
2888
2890
  }
2889
- function Na(r, n) {
2891
+ function Ba(r, n) {
2890
2892
  if (n < r.length + 11)
2891
2893
  return console.error("Message too long for RSA"), null;
2892
2894
  for (var t = [], e = r.length - 1; e >= 0 && n > 0; ) {
@@ -2918,7 +2920,7 @@ var Ma = (
2918
2920
  }, r.prototype.setPublic = function(n, t) {
2919
2921
  n != null && t != null && n.length > 0 && t.length > 0 ? (this.n = H(n, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
2920
2922
  }, r.prototype.encrypt = function(n) {
2921
- var t = this.n.bitLength() + 7 >> 3, e = Na(n, t);
2923
+ var t = this.n.bitLength() + 7 >> 3, e = Ba(n, t);
2922
2924
  if (e == null)
2923
2925
  return null;
2924
2926
  var i = this.doPublic(e);
@@ -2966,13 +2968,13 @@ var Ma = (
2966
2968
  e();
2967
2969
  }, 0)) : setTimeout(l, 0);
2968
2970
  }, p = function() {
2969
- c.q = B(), c.q.fromNumberAsync(s, 1, i, function() {
2971
+ c.q = N(), c.q.fromNumberAsync(s, 1, i, function() {
2970
2972
  c.q.subtract(A.ONE).gcda(a, function(m) {
2971
2973
  m.compareTo(A.ONE) == 0 && c.q.isProbablePrime(10) ? setTimeout(h, 0) : setTimeout(p, 0);
2972
2974
  });
2973
2975
  });
2974
2976
  }, _ = function() {
2975
- c.p = B(), c.p.fromNumberAsync(n - s, 1, i, function() {
2977
+ c.p = N(), c.p.fromNumberAsync(n - s, 1, i, function() {
2976
2978
  c.p.subtract(A.ONE).gcda(a, function(m) {
2977
2979
  m.compareTo(A.ONE) == 0 && c.p.isProbablePrime(10) ? setTimeout(p, 0) : setTimeout(_, 0);
2978
2980
  });
@@ -2982,7 +2984,7 @@ var Ma = (
2982
2984
  };
2983
2985
  setTimeout(l, 0);
2984
2986
  }, r.prototype.sign = function(n, t, e) {
2985
- var i = Ua(e), s = i + t(n).toString(), a = Ba(s, this.n.bitLength() / 4);
2987
+ var i = Ua(e), s = i + t(n).toString(), a = Na(s, this.n.bitLength() / 4);
2986
2988
  if (a == null)
2987
2989
  return null;
2988
2990
  var c = this.doPrivate(a);
@@ -3111,7 +3113,7 @@ y.asn1.ASN1Util = new function() {
3111
3113
  }, this.getPEMStringFromHex = function(r, n) {
3112
3114
  return hextopem(r, n);
3113
3115
  }, this.newObject = function(r) {
3114
- var n = y, t = n.asn1, e = t.DERBoolean, i = t.DERInteger, s = t.DERBitString, a = t.DEROctetString, c = t.DERNull, l = t.DERObjectIdentifier, h = t.DEREnumerated, p = t.DERUTF8String, _ = t.DERNumericString, m = t.DERPrintableString, P = t.DERTeletexString, v = t.DERIA5String, S = t.DERUTCTime, C = t.DERGeneralizedTime, L = t.DERSequence, U = t.DERSet, V = t.DERTaggedObject, nt = t.ASN1Util.newObject, G = Object.keys(r);
3116
+ var n = y, t = n.asn1, e = t.DERBoolean, i = t.DERInteger, s = t.DERBitString, a = t.DEROctetString, c = t.DERNull, l = t.DERObjectIdentifier, h = t.DEREnumerated, p = t.DERUTF8String, _ = t.DERNumericString, m = t.DERPrintableString, P = t.DERTeletexString, v = t.DERIA5String, S = t.DERUTCTime, C = t.DERGeneralizedTime, L = t.DERSequence, U = t.DERSet, q = t.DERTaggedObject, nt = t.ASN1Util.newObject, G = Object.keys(r);
3115
3117
  if (G.length != 1)
3116
3118
  throw "key of param shall be only one.";
3117
3119
  var k = G[0];
@@ -3163,7 +3165,7 @@ y.asn1.ASN1Util = new function() {
3163
3165
  var pt = r[k];
3164
3166
  if (Object.prototype.toString.call(pt) === "[object Array]" && pt.length == 3) {
3165
3167
  var ha = nt(pt[2]);
3166
- return new V({
3168
+ return new q({
3167
3169
  tag: pt[0],
3168
3170
  explicit: pt[1],
3169
3171
  obj: ha
@@ -3172,7 +3174,7 @@ y.asn1.ASN1Util = new function() {
3172
3174
  var ce = {};
3173
3175
  if (pt.explicit !== void 0 && (ce.explicit = pt.explicit), pt.tag !== void 0 && (ce.tag = pt.tag), pt.obj === void 0)
3174
3176
  throw "obj shall be specified for 'tag'.";
3175
- return ce.obj = nt(pt.obj), new V(ce);
3177
+ return ce.obj = nt(pt.obj), new q(ce);
3176
3178
  }
3177
3179
  }
3178
3180
  }, this.jsonToASN1HEX = function(r) {
@@ -3484,7 +3486,7 @@ var Va = /* @__PURE__ */ function() {
3484
3486
  }
3485
3487
  n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
3486
3488
  };
3487
- }(), Yn = (
3489
+ }(), Zn = (
3488
3490
  /** @class */
3489
3491
  function(r) {
3490
3492
  Va(n, r);
@@ -3582,21 +3584,21 @@ var Va = /* @__PURE__ */ function() {
3582
3584
  this.n = t.n, this.e = t.e, t.hasOwnProperty("d") && (this.d = t.d, this.p = t.p, this.q = t.q, this.dmp1 = t.dmp1, this.dmq1 = t.dmq1, this.coeff = t.coeff);
3583
3585
  }, n;
3584
3586
  }(Ma)
3585
- ), Je, qa = typeof process < "u" ? (Je = process.env) === null || Je === void 0 ? void 0 : Je.npm_package_version : void 0, ja = (
3587
+ ), $e, qa = typeof process < "u" ? ($e = process.env) === null || $e === void 0 ? void 0 : $e.npm_package_version : void 0, ja = (
3586
3588
  /** @class */
3587
3589
  function() {
3588
3590
  function r(n) {
3589
3591
  n === void 0 && (n = {}), n = n || {}, this.default_key_size = n.default_key_size ? parseInt(n.default_key_size, 10) : 1024, this.default_public_exponent = n.default_public_exponent || "010001", this.log = n.log || !1, this.key = null;
3590
3592
  }
3591
3593
  return r.prototype.setKey = function(n) {
3592
- this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Yn(n);
3594
+ this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Zn(n);
3593
3595
  }, r.prototype.setPrivateKey = function(n) {
3594
3596
  this.setKey(n);
3595
3597
  }, r.prototype.setPublicKey = function(n) {
3596
3598
  this.setKey(n);
3597
3599
  }, r.prototype.decrypt = function(n) {
3598
3600
  try {
3599
- return this.getKey().decrypt(zn(n));
3601
+ return this.getKey().decrypt(Wn(n));
3600
3602
  } catch {
3601
3603
  return !1;
3602
3604
  }
@@ -3614,13 +3616,13 @@ var Va = /* @__PURE__ */ function() {
3614
3616
  }
3615
3617
  }, r.prototype.verify = function(n, t, e) {
3616
3618
  try {
3617
- return this.getKey().verify(n, zn(t), e);
3619
+ return this.getKey().verify(n, Wn(t), e);
3618
3620
  } catch {
3619
3621
  return !1;
3620
3622
  }
3621
3623
  }, r.prototype.getKey = function(n) {
3622
3624
  if (!this.key) {
3623
- if (this.key = new Yn(), n && {}.toString.call(n) === "[object Function]") {
3625
+ if (this.key = new Zn(), n && {}.toString.call(n) === "[object Function]") {
3624
3626
  this.key.generateAsync(this.default_key_size, this.default_public_exponent, n);
3625
3627
  return;
3626
3628
  }
@@ -3638,7 +3640,7 @@ var Va = /* @__PURE__ */ function() {
3638
3640
  }, r.version = qa, r;
3639
3641
  }()
3640
3642
  );
3641
- function Vi(r, n) {
3643
+ function Li(r, n) {
3642
3644
  return function() {
3643
3645
  return r.apply(n, arguments);
3644
3646
  };
@@ -3650,17 +3652,17 @@ const { toString: Ha } = Object.prototype, { getPrototypeOf: Mn } = Object, Ue =
3650
3652
  function Ka(r) {
3651
3653
  return r !== null && !re(r) && r.constructor !== null && !re(r.constructor) && lt(r.constructor.isBuffer) && r.constructor.isBuffer(r);
3652
3654
  }
3653
- const qi = mt("ArrayBuffer");
3655
+ const Vi = mt("ArrayBuffer");
3654
3656
  function Wa(r) {
3655
3657
  let n;
3656
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? n = ArrayBuffer.isView(r) : n = r && r.buffer && qi(r.buffer), n;
3658
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? n = ArrayBuffer.isView(r) : n = r && r.buffer && Vi(r.buffer), n;
3657
3659
  }
3658
- const za = Le("string"), lt = Le("function"), ji = Le("number"), Ve = (r) => r !== null && typeof r == "object", Xa = (r) => r === !0 || r === !1, we = (r) => {
3660
+ const za = Le("string"), lt = Le("function"), qi = Le("number"), Ve = (r) => r !== null && typeof r == "object", Xa = (r) => r === !0 || r === !1, we = (r) => {
3659
3661
  if (Ue(r) !== "object")
3660
3662
  return !1;
3661
3663
  const n = Mn(r);
3662
3664
  return (n === null || n === Object.prototype || Object.getPrototypeOf(n) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
3663
- }, Ga = mt("Date"), Ja = mt("File"), $a = mt("Blob"), Qa = mt("FileList"), Za = (r) => Ve(r) && lt(r.pipe), Ya = (r) => {
3665
+ }, Ga = mt("Date"), $a = mt("File"), Ja = mt("Blob"), Qa = mt("FileList"), Za = (r) => Ve(r) && lt(r.pipe), Ya = (r) => {
3664
3666
  let n;
3665
3667
  return r && (typeof FormData == "function" && r instanceof FormData || lt(r.append) && ((n = Ue(r)) === "formdata" || // detect form-data instance
3666
3668
  n === "object" && lt(r.toString) && r.toString() === "[object FormData]"));
@@ -3679,7 +3681,7 @@ function ae(r, n, { allOwnKeys: t = !1 } = {}) {
3679
3681
  c = s[e], n.call(null, r[c], c, r);
3680
3682
  }
3681
3683
  }
3682
- function Hi(r, n) {
3684
+ function ji(r, n) {
3683
3685
  n = n.toLowerCase();
3684
3686
  const t = Object.keys(r);
3685
3687
  let e = t.length, i;
@@ -3688,10 +3690,10 @@ function Hi(r, n) {
3688
3690
  return i;
3689
3691
  return null;
3690
3692
  }
3691
- const Ot = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ki = (r) => !re(r) && r !== Ot;
3693
+ const Ot = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Hi = (r) => !re(r) && r !== Ot;
3692
3694
  function cn() {
3693
- const { caseless: r } = Ki(this) && this || {}, n = {}, t = (e, i) => {
3694
- const s = r && Hi(n, i) || i;
3695
+ const { caseless: r } = Hi(this) && this || {}, n = {}, t = (e, i) => {
3696
+ const s = r && ji(n, i) || i;
3695
3697
  we(n[s]) && we(e) ? n[s] = cn(n[s], e) : we(e) ? n[s] = cn({}, e) : Xt(e) ? n[s] = e.slice() : n[s] = e;
3696
3698
  };
3697
3699
  for (let e = 0, i = arguments.length; e < i; e++)
@@ -3699,7 +3701,7 @@ function cn() {
3699
3701
  return n;
3700
3702
  }
3701
3703
  const ao = (r, n, t, { allOwnKeys: e } = {}) => (ae(n, (i, s) => {
3702
- t && lt(i) ? r[s] = Vi(i, t) : r[s] = i;
3704
+ t && lt(i) ? r[s] = Li(i, t) : r[s] = i;
3703
3705
  }, { allOwnKeys: e }), r), oo = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), co = (r, n, t, e) => {
3704
3706
  r.prototype = Object.create(n.prototype, e), r.prototype.constructor = r, Object.defineProperty(r, "super", {
3705
3707
  value: n.prototype
@@ -3722,7 +3724,7 @@ const ao = (r, n, t, { allOwnKeys: e } = {}) => (ae(n, (i, s) => {
3722
3724
  if (!r) return null;
3723
3725
  if (Xt(r)) return r;
3724
3726
  let n = r.length;
3725
- if (!ji(n)) return null;
3727
+ if (!qi(n)) return null;
3726
3728
  const t = new Array(n);
3727
3729
  for (; n-- > 0; )
3728
3730
  t[n] = r[n];
@@ -3745,14 +3747,14 @@ const ao = (r, n, t, { allOwnKeys: e } = {}) => (ae(n, (i, s) => {
3745
3747
  function(t, e, i) {
3746
3748
  return e.toUpperCase() + i;
3747
3749
  }
3748
- ), ti = (({ hasOwnProperty: r }) => (n, t) => r.call(n, t))(Object.prototype), mo = mt("RegExp"), Wi = (r, n) => {
3750
+ ), Yn = (({ hasOwnProperty: r }) => (n, t) => r.call(n, t))(Object.prototype), mo = mt("RegExp"), Ki = (r, n) => {
3749
3751
  const t = Object.getOwnPropertyDescriptors(r), e = {};
3750
3752
  ae(t, (i, s) => {
3751
3753
  let a;
3752
3754
  (a = n(i, s, r)) !== !1 && (e[s] = a || i);
3753
3755
  }), Object.defineProperties(r, e);
3754
3756
  }, yo = (r) => {
3755
- Wi(r, (n, t) => {
3757
+ Ki(r, (n, t) => {
3756
3758
  if (lt(r) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
3757
3759
  return !1;
3758
3760
  const e = r[t];
@@ -3774,11 +3776,11 @@ const ao = (r, n, t, { allOwnKeys: e } = {}) => (ae(n, (i, s) => {
3774
3776
  };
3775
3777
  return Xt(r) ? e(r) : e(String(r).split(n)), t;
3776
3778
  }, vo = () => {
3777
- }, Po = (r, n) => r != null && Number.isFinite(r = +r) ? r : n, $e = "abcdefghijklmnopqrstuvwxyz", ei = "0123456789", zi = {
3778
- DIGIT: ei,
3779
- ALPHA: $e,
3780
- ALPHA_DIGIT: $e + $e.toUpperCase() + ei
3781
- }, Eo = (r = 16, n = zi.ALPHA_DIGIT) => {
3779
+ }, Po = (r, n) => r != null && Number.isFinite(r = +r) ? r : n, Je = "abcdefghijklmnopqrstuvwxyz", ti = "0123456789", Wi = {
3780
+ DIGIT: ti,
3781
+ ALPHA: Je,
3782
+ ALPHA_DIGIT: Je + Je.toUpperCase() + ti
3783
+ }, Eo = (r = 16, n = Wi.ALPHA_DIGIT) => {
3782
3784
  let t = "";
3783
3785
  const { length: e } = n;
3784
3786
  for (; r--; )
@@ -3805,21 +3807,21 @@ const Co = (r) => {
3805
3807
  return e;
3806
3808
  };
3807
3809
  return t(r, 0);
3808
- }, So = mt("AsyncFunction"), ko = (r) => r && (Ve(r) || lt(r)) && lt(r.then) && lt(r.catch), Xi = ((r, n) => r ? setImmediate : n ? ((t, e) => (Ot.addEventListener("message", ({ source: i, data: s }) => {
3810
+ }, So = mt("AsyncFunction"), ko = (r) => r && (Ve(r) || lt(r)) && lt(r.then) && lt(r.catch), zi = ((r, n) => r ? setImmediate : n ? ((t, e) => (Ot.addEventListener("message", ({ source: i, data: s }) => {
3809
3811
  i === Ot && s === t && e.length && e.shift()();
3810
3812
  }, !1), (i) => {
3811
3813
  e.push(i), Ot.postMessage(t, "*");
3812
3814
  }))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
3813
3815
  typeof setImmediate == "function",
3814
3816
  lt(Ot.postMessage)
3815
- ), xo = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ot) : typeof process < "u" && process.nextTick || Xi, b = {
3817
+ ), xo = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ot) : typeof process < "u" && process.nextTick || zi, b = {
3816
3818
  isArray: Xt,
3817
- isArrayBuffer: qi,
3819
+ isArrayBuffer: Vi,
3818
3820
  isBuffer: Ka,
3819
3821
  isFormData: Ya,
3820
3822
  isArrayBufferView: Wa,
3821
3823
  isString: za,
3822
- isNumber: ji,
3824
+ isNumber: qi,
3823
3825
  isBoolean: Xa,
3824
3826
  isObject: Ve,
3825
3827
  isPlainObject: we,
@@ -3829,8 +3831,8 @@ const Co = (r) => {
3829
3831
  isHeaders: ro,
3830
3832
  isUndefined: re,
3831
3833
  isDate: Ga,
3832
- isFile: Ja,
3833
- isBlob: $a,
3834
+ isFile: $a,
3835
+ isBlob: Ja,
3834
3836
  isRegExp: mo,
3835
3837
  isFunction: lt,
3836
3838
  isStream: Za,
@@ -3851,25 +3853,25 @@ const Co = (r) => {
3851
3853
  forEachEntry: fo,
3852
3854
  matchAll: _o,
3853
3855
  isHTMLForm: go,
3854
- hasOwnProperty: ti,
3855
- hasOwnProp: ti,
3856
+ hasOwnProperty: Yn,
3857
+ hasOwnProp: Yn,
3856
3858
  // an alias to avoid ESLint no-prototype-builtins detection
3857
- reduceDescriptors: Wi,
3859
+ reduceDescriptors: Ki,
3858
3860
  freezeMethods: yo,
3859
3861
  toObjectSet: wo,
3860
3862
  toCamelCase: bo,
3861
3863
  noop: vo,
3862
3864
  toFiniteNumber: Po,
3863
- findKey: Hi,
3865
+ findKey: ji,
3864
3866
  global: Ot,
3865
- isContextDefined: Ki,
3866
- ALPHABET: zi,
3867
+ isContextDefined: Hi,
3868
+ ALPHABET: Wi,
3867
3869
  generateString: Eo,
3868
3870
  isSpecCompliantForm: To,
3869
3871
  toJSONObject: Co,
3870
3872
  isAsyncFn: So,
3871
3873
  isThenable: ko,
3872
- setImmediate: Xi,
3874
+ setImmediate: zi,
3873
3875
  asap: xo
3874
3876
  };
3875
3877
  function x(r, n, t, e, i) {
@@ -3896,7 +3898,7 @@ b.inherits(x, Error, {
3896
3898
  };
3897
3899
  }
3898
3900
  });
3899
- const Gi = x.prototype, Ji = {};
3901
+ const Xi = x.prototype, Gi = {};
3900
3902
  [
3901
3903
  "ERR_BAD_OPTION_VALUE",
3902
3904
  "ERR_BAD_OPTION",
@@ -3912,12 +3914,12 @@ const Gi = x.prototype, Ji = {};
3912
3914
  "ERR_INVALID_URL"
3913
3915
  // eslint-disable-next-line func-names
3914
3916
  ].forEach((r) => {
3915
- Ji[r] = { value: r };
3917
+ Gi[r] = { value: r };
3916
3918
  });
3917
- Object.defineProperties(x, Ji);
3918
- Object.defineProperty(Gi, "isAxiosError", { value: !0 });
3919
+ Object.defineProperties(x, Gi);
3920
+ Object.defineProperty(Xi, "isAxiosError", { value: !0 });
3919
3921
  x.from = (r, n, t, e, i, s) => {
3920
- const a = Object.create(Gi);
3922
+ const a = Object.create(Xi);
3921
3923
  return b.toFlatObject(r, a, function(l) {
3922
3924
  return l !== Error.prototype;
3923
3925
  }, (c) => c !== "isAxiosError"), x.call(a, r.message, n, t, e, i), a.cause = r, a.name = r.name, s && Object.assign(a, s), a;
@@ -3929,7 +3931,7 @@ function ln(r) {
3929
3931
  function $i(r) {
3930
3932
  return b.endsWith(r, "[]") ? r.slice(0, -2) : r;
3931
3933
  }
3932
- function ni(r, n, t) {
3934
+ function ei(r, n, t) {
3933
3935
  return r ? r.concat(n).map(function(i, s) {
3934
3936
  return i = $i(i), !t && s ? "[" + i + "]" : i;
3935
3937
  }).join(t ? "." : "") : n;
@@ -3967,15 +3969,15 @@ function qe(r, n, t) {
3967
3969
  if (b.endsWith(S, "{}"))
3968
3970
  S = e ? S : S.slice(0, -2), v = JSON.stringify(v);
3969
3971
  else if (b.isArray(v) && Do(v) || (b.isFileList(v) || b.endsWith(S, "[]")) && (L = b.toArray(v)))
3970
- return S = $i(S), L.forEach(function(V, nt) {
3971
- !(b.isUndefined(V) || V === null) && n.append(
3972
+ return S = $i(S), L.forEach(function(q, nt) {
3973
+ !(b.isUndefined(q) || q === null) && n.append(
3972
3974
  // eslint-disable-next-line no-nested-ternary
3973
- a === !0 ? ni([S], nt, s) : a === null ? S : S + "[]",
3974
- h(V)
3975
+ a === !0 ? ei([S], nt, s) : a === null ? S : S + "[]",
3976
+ h(q)
3975
3977
  );
3976
3978
  }), !1;
3977
3979
  }
3978
- return ln(v) ? !0 : (n.append(ni(C, S, s), h(v)), !1);
3980
+ return ln(v) ? !0 : (n.append(ei(C, S, s), h(v)), !1);
3979
3981
  }
3980
3982
  const _ = [], m = Object.assign(Ro, {
3981
3983
  defaultVisitor: p,
@@ -4001,7 +4003,7 @@ function qe(r, n, t) {
4001
4003
  throw new TypeError("data must be an object");
4002
4004
  return P(r), n;
4003
4005
  }
4004
- function ii(r) {
4006
+ function ni(r) {
4005
4007
  const n = {
4006
4008
  "!": "%21",
4007
4009
  "'": "%27",
@@ -4018,14 +4020,14 @@ function ii(r) {
4018
4020
  function Fn(r, n) {
4019
4021
  this._pairs = [], r && qe(r, this, n);
4020
4022
  }
4021
- const Qi = Fn.prototype;
4022
- Qi.append = function(n, t) {
4023
+ const Ji = Fn.prototype;
4024
+ Ji.append = function(n, t) {
4023
4025
  this._pairs.push([n, t]);
4024
4026
  };
4025
- Qi.toString = function(n) {
4027
+ Ji.toString = function(n) {
4026
4028
  const t = n ? function(e) {
4027
- return n.call(this, e, ii);
4028
- } : ii;
4029
+ return n.call(this, e, ni);
4030
+ } : ni;
4029
4031
  return this._pairs.map(function(i) {
4030
4032
  return t(i[0]) + "=" + t(i[1]);
4031
4033
  }, "").join("&");
@@ -4033,7 +4035,7 @@ Qi.toString = function(n) {
4033
4035
  function Io(r) {
4034
4036
  return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
4035
4037
  }
4036
- function Zi(r, n, t) {
4038
+ function Qi(r, n, t) {
4037
4039
  if (!n)
4038
4040
  return r;
4039
4041
  const e = t && t.encode || Io;
@@ -4048,7 +4050,7 @@ function Zi(r, n, t) {
4048
4050
  }
4049
4051
  return r;
4050
4052
  }
4051
- class ri {
4053
+ class ii {
4052
4054
  constructor() {
4053
4055
  this.handlers = [];
4054
4056
  }
@@ -4102,16 +4104,16 @@ class ri {
4102
4104
  });
4103
4105
  }
4104
4106
  }
4105
- const Yi = {
4107
+ const Zi = {
4106
4108
  silentJSONParsing: !0,
4107
4109
  forcedJSONParsing: !0,
4108
4110
  clarifyTimeoutError: !1
4109
- }, Oo = typeof URLSearchParams < "u" ? URLSearchParams : Fn, Bo = typeof FormData < "u" ? FormData : null, No = typeof Blob < "u" ? Blob : null, Mo = {
4111
+ }, Oo = typeof URLSearchParams < "u" ? URLSearchParams : Fn, No = typeof FormData < "u" ? FormData : null, Bo = typeof Blob < "u" ? Blob : null, Mo = {
4110
4112
  isBrowser: !0,
4111
4113
  classes: {
4112
4114
  URLSearchParams: Oo,
4113
- FormData: Bo,
4114
- Blob: No
4115
+ FormData: No,
4116
+ Blob: Bo
4115
4117
  },
4116
4118
  protocols: ["http", "https", "file", "blob", "url", "data"]
4117
4119
  }, Un = typeof window < "u" && typeof document < "u", hn = typeof navigator == "object" && navigator || void 0, Fo = Un && (!hn || ["ReactNative", "NativeScript", "NS"].indexOf(hn.product) < 0), Uo = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
@@ -4145,7 +4147,7 @@ function Ho(r) {
4145
4147
  s = t[e], n[s] = r[s];
4146
4148
  return n;
4147
4149
  }
4148
- function tr(r) {
4150
+ function Yi(r) {
4149
4151
  function n(t, e, i, s) {
4150
4152
  let a = t[s++];
4151
4153
  if (a === "__proto__") return !0;
@@ -4168,15 +4170,15 @@ function Ko(r, n, t) {
4168
4170
  if (e.name !== "SyntaxError")
4169
4171
  throw e;
4170
4172
  }
4171
- return (0, JSON.stringify)(r);
4173
+ return (t || JSON.stringify)(r);
4172
4174
  }
4173
4175
  const oe = {
4174
- transitional: Yi,
4176
+ transitional: Zi,
4175
4177
  adapter: ["xhr", "http", "fetch"],
4176
4178
  transformRequest: [function(n, t) {
4177
4179
  const e = t.getContentType() || "", i = e.indexOf("application/json") > -1, s = b.isObject(n);
4178
4180
  if (s && b.isHTMLForm(n) && (n = new FormData(n)), b.isFormData(n))
4179
- return i ? JSON.stringify(tr(n)) : n;
4181
+ return i ? JSON.stringify(Yi(n)) : n;
4180
4182
  if (b.isArrayBuffer(n) || b.isBuffer(n) || b.isStream(n) || b.isFile(n) || b.isBlob(n) || b.isReadableStream(n))
4181
4183
  return n;
4182
4184
  if (b.isArrayBufferView(n))
@@ -4264,8 +4266,8 @@ const Wo = b.toObjectSet([
4264
4266
  `).forEach(function(a) {
4265
4267
  i = a.indexOf(":"), t = a.substring(0, i).trim().toLowerCase(), e = a.substring(i + 1).trim(), !(!t || n[t] && Wo[t]) && (t === "set-cookie" ? n[t] ? n[t].push(e) : n[t] = [e] : n[t] = n[t] ? n[t] + ", " + e : e);
4266
4268
  }), n;
4267
- }, si = Symbol("internals");
4268
- function Jt(r) {
4269
+ }, ri = Symbol("internals");
4270
+ function $t(r) {
4269
4271
  return r && String(r).trim().toLowerCase();
4270
4272
  }
4271
4273
  function ve(r) {
@@ -4289,10 +4291,10 @@ function Qe(r, n, t, e, i) {
4289
4291
  return e.test(n);
4290
4292
  }
4291
4293
  }
4292
- function Jo(r) {
4294
+ function $o(r) {
4293
4295
  return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (n, t, e) => t.toUpperCase() + e);
4294
4296
  }
4295
- function $o(r, n) {
4297
+ function Jo(r, n) {
4296
4298
  const t = b.toCamelCase(" " + n);
4297
4299
  ["get", "set", "has"].forEach((e) => {
4298
4300
  Object.defineProperty(r, e + t, {
@@ -4303,14 +4305,14 @@ function $o(r, n) {
4303
4305
  });
4304
4306
  });
4305
4307
  }
4306
- class at {
4308
+ let at = class {
4307
4309
  constructor(n) {
4308
4310
  n && this.set(n);
4309
4311
  }
4310
4312
  set(n, t, e) {
4311
4313
  const i = this;
4312
4314
  function s(c, l, h) {
4313
- const p = Jt(l);
4315
+ const p = $t(l);
4314
4316
  if (!p)
4315
4317
  throw new Error("header name must be a non-empty string");
4316
4318
  const _ = b.findKey(i, p);
@@ -4329,7 +4331,7 @@ class at {
4329
4331
  return this;
4330
4332
  }
4331
4333
  get(n, t) {
4332
- if (n = Jt(n), n) {
4334
+ if (n = $t(n), n) {
4333
4335
  const e = b.findKey(this, n);
4334
4336
  if (e) {
4335
4337
  const i = this[e];
@@ -4346,7 +4348,7 @@ class at {
4346
4348
  }
4347
4349
  }
4348
4350
  has(n, t) {
4349
- if (n = Jt(n), n) {
4351
+ if (n = $t(n), n) {
4350
4352
  const e = b.findKey(this, n);
4351
4353
  return !!(e && this[e] !== void 0 && (!t || Qe(this, this[e], e, t)));
4352
4354
  }
@@ -4356,7 +4358,7 @@ class at {
4356
4358
  const e = this;
4357
4359
  let i = !1;
4358
4360
  function s(a) {
4359
- if (a = Jt(a), a) {
4361
+ if (a = $t(a), a) {
4360
4362
  const c = b.findKey(e, a);
4361
4363
  c && (!t || Qe(e, e[c], c, t)) && (delete e[c], i = !0);
4362
4364
  }
@@ -4380,7 +4382,7 @@ class at {
4380
4382
  t[a] = ve(i), delete t[s];
4381
4383
  return;
4382
4384
  }
4383
- const c = n ? Jo(s) : String(s).trim();
4385
+ const c = n ? $o(s) : String(s).trim();
4384
4386
  c !== s && delete t[s], t[c] = ve(i), e[c] = !0;
4385
4387
  }), this;
4386
4388
  }
@@ -4411,16 +4413,16 @@ class at {
4411
4413
  return t.forEach((i) => e.set(i)), e;
4412
4414
  }
4413
4415
  static accessor(n) {
4414
- const e = (this[si] = this[si] = {
4416
+ const e = (this[ri] = this[ri] = {
4415
4417
  accessors: {}
4416
4418
  }).accessors, i = this.prototype;
4417
4419
  function s(a) {
4418
- const c = Jt(a);
4419
- e[c] || ($o(i, a), e[c] = !0);
4420
+ const c = $t(a);
4421
+ e[c] || (Jo(i, a), e[c] = !0);
4420
4422
  }
4421
4423
  return b.isArray(n) ? n.forEach(s) : s(n), this;
4422
4424
  }
4423
- }
4425
+ };
4424
4426
  at.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
4425
4427
  b.reduceDescriptors(at.prototype, ({ value: r }, n) => {
4426
4428
  let t = n[0].toUpperCase() + n.slice(1);
@@ -4439,7 +4441,7 @@ function Ze(r, n) {
4439
4441
  s = c.call(t, s, i.normalize(), n ? n.status : void 0);
4440
4442
  }), i.normalize(), s;
4441
4443
  }
4442
- function er(r) {
4444
+ function tr(r) {
4443
4445
  return !!(r && r.__CANCEL__);
4444
4446
  }
4445
4447
  function Gt(r, n, t) {
@@ -4448,7 +4450,7 @@ function Gt(r, n, t) {
4448
4450
  b.inherits(Gt, x, {
4449
4451
  __CANCEL__: !0
4450
4452
  });
4451
- function nr(r, n, t) {
4453
+ function er(r, n, t) {
4452
4454
  const e = t.config.validateStatus;
4453
4455
  !t.status || !e || e(t.status) ? r(t) : n(new x(
4454
4456
  "Request failed with status code " + t.status,
@@ -4490,7 +4492,7 @@ function Yo(r, n) {
4490
4492
  }, e - _)));
4491
4493
  }, () => i && a(i)];
4492
4494
  }
4493
- const Be = (r, n, t = 3) => {
4495
+ const Ne = (r, n, t = 3) => {
4494
4496
  let e = 0;
4495
4497
  const i = Zo(50, 250);
4496
4498
  return Yo((s) => {
@@ -4509,14 +4511,14 @@ const Be = (r, n, t = 3) => {
4509
4511
  };
4510
4512
  r(_);
4511
4513
  }, t);
4512
- }, ai = (r, n) => {
4514
+ }, si = (r, n) => {
4513
4515
  const t = r != null;
4514
4516
  return [(e) => n[0]({
4515
4517
  lengthComputable: t,
4516
4518
  total: r,
4517
4519
  loaded: e
4518
4520
  }), n[1]];
4519
- }, oi = (r) => (...n) => b.asap(() => r(...n)), tc = tt.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, n) => (t) => (t = new URL(t, tt.origin), r.protocol === t.protocol && r.host === t.host && (n || r.port === t.port)))(
4521
+ }, ai = (r) => (...n) => b.asap(() => r(...n)), tc = tt.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, n) => (t) => (t = new URL(t, tt.origin), r.protocol === t.protocol && r.host === t.host && (n || r.port === t.port)))(
4520
4522
  new URL(tt.origin),
4521
4523
  tt.navigator && /(msie|trident)/i.test(tt.navigator.userAgent)
4522
4524
  ) : () => !0, ec = tt.hasStandardBrowserEnv ? (
@@ -4552,10 +4554,10 @@ function nc(r) {
4552
4554
  function ic(r, n) {
4553
4555
  return n ? r.replace(/\/?\/$/, "") + "/" + n.replace(/^\/+/, "") : r;
4554
4556
  }
4555
- function ir(r, n) {
4557
+ function nr(r, n) {
4556
4558
  return r && !nc(n) ? ic(r, n) : n;
4557
4559
  }
4558
- const ci = (r) => r instanceof at ? { ...r } : r;
4560
+ const oi = (r) => r instanceof at ? { ...r } : r;
4559
4561
  function Mt(r, n) {
4560
4562
  n = n || {};
4561
4563
  const t = {};
@@ -4613,17 +4615,17 @@ function Mt(r, n) {
4613
4615
  socketPath: a,
4614
4616
  responseEncoding: a,
4615
4617
  validateStatus: c,
4616
- headers: (h, p, _) => i(ci(h), ci(p), _, !0)
4618
+ headers: (h, p, _) => i(oi(h), oi(p), _, !0)
4617
4619
  };
4618
4620
  return b.forEach(Object.keys(Object.assign({}, r, n)), function(p) {
4619
4621
  const _ = l[p] || i, m = _(r[p], n[p], p);
4620
4622
  b.isUndefined(m) && _ !== c || (t[p] = m);
4621
4623
  }), t;
4622
4624
  }
4623
- const rr = (r) => {
4625
+ const ir = (r) => {
4624
4626
  const n = Mt({}, r);
4625
4627
  let { data: t, withXSRFToken: e, xsrfHeaderName: i, xsrfCookieName: s, headers: a, auth: c } = n;
4626
- n.headers = a = at.from(a), n.url = Zi(ir(n.baseURL, n.url), r.params, r.paramsSerializer), c && a.set(
4628
+ n.headers = a = at.from(a), n.url = Qi(nr(n.baseURL, n.url), r.params, r.paramsSerializer), c && a.set(
4627
4629
  "Authorization",
4628
4630
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
4629
4631
  );
@@ -4643,7 +4645,7 @@ const rr = (r) => {
4643
4645
  return n;
4644
4646
  }, rc = typeof XMLHttpRequest < "u", sc = rc && function(r) {
4645
4647
  return new Promise(function(t, e) {
4646
- const i = rr(r);
4648
+ const i = ir(r);
4647
4649
  let s = i.data;
4648
4650
  const a = at.from(i.headers).normalize();
4649
4651
  let { responseType: c, onUploadProgress: l, onDownloadProgress: h } = i, p, _, m, P, v;
@@ -4655,17 +4657,17 @@ const rr = (r) => {
4655
4657
  function L() {
4656
4658
  if (!C)
4657
4659
  return;
4658
- const V = at.from(
4660
+ const q = at.from(
4659
4661
  "getAllResponseHeaders" in C && C.getAllResponseHeaders()
4660
4662
  ), G = {
4661
4663
  data: !c || c === "text" || c === "json" ? C.responseText : C.response,
4662
4664
  status: C.status,
4663
4665
  statusText: C.statusText,
4664
- headers: V,
4666
+ headers: q,
4665
4667
  config: r,
4666
4668
  request: C
4667
4669
  };
4668
- nr(function(ot) {
4670
+ er(function(ot) {
4669
4671
  t(ot), S();
4670
4672
  }, function(ot) {
4671
4673
  e(ot), S();
@@ -4679,7 +4681,7 @@ const rr = (r) => {
4679
4681
  e(new x("Network Error", x.ERR_NETWORK, r, C)), C = null;
4680
4682
  }, C.ontimeout = function() {
4681
4683
  let nt = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
4682
- const G = i.transitional || Yi;
4684
+ const G = i.transitional || Zi;
4683
4685
  i.timeoutErrorMessage && (nt = i.timeoutErrorMessage), e(new x(
4684
4686
  nt,
4685
4687
  G.clarifyTimeoutError ? x.ETIMEDOUT : x.ECONNABORTED,
@@ -4688,8 +4690,8 @@ const rr = (r) => {
4688
4690
  )), C = null;
4689
4691
  }, s === void 0 && a.setContentType(null), "setRequestHeader" in C && b.forEach(a.toJSON(), function(nt, G) {
4690
4692
  C.setRequestHeader(G, nt);
4691
- }), b.isUndefined(i.withCredentials) || (C.withCredentials = !!i.withCredentials), c && c !== "json" && (C.responseType = i.responseType), h && ([m, v] = Be(h, !0), C.addEventListener("progress", m)), l && C.upload && ([_, P] = Be(l), C.upload.addEventListener("progress", _), C.upload.addEventListener("loadend", P)), (i.cancelToken || i.signal) && (p = (V) => {
4692
- C && (e(!V || V.type ? new Gt(null, r, C) : V), C.abort(), C = null);
4693
+ }), b.isUndefined(i.withCredentials) || (C.withCredentials = !!i.withCredentials), c && c !== "json" && (C.responseType = i.responseType), h && ([m, v] = Ne(h, !0), C.addEventListener("progress", m)), l && C.upload && ([_, P] = Ne(l), C.upload.addEventListener("progress", _), C.upload.addEventListener("loadend", P)), (i.cancelToken || i.signal) && (p = (q) => {
4694
+ C && (e(!q || q.type ? new Gt(null, r, C) : q), C.abort(), C = null);
4693
4695
  }, i.cancelToken && i.cancelToken.subscribe(p), i.signal && (i.signal.aborted ? p() : i.signal.addEventListener("abort", p)));
4694
4696
  const U = Qo(i.url);
4695
4697
  if (U && tt.protocols.indexOf(U) === -1) {
@@ -4749,7 +4751,7 @@ const rr = (r) => {
4749
4751
  } finally {
4750
4752
  await n.cancel();
4751
4753
  }
4752
- }, li = (r, n, t, e) => {
4754
+ }, ci = (r, n, t, e) => {
4753
4755
  const i = cc(r, n);
4754
4756
  let s = 0, a, c = (l) => {
4755
4757
  a || (a = !0, e && e(l));
@@ -4778,13 +4780,13 @@ const rr = (r) => {
4778
4780
  }, {
4779
4781
  highWaterMark: 2
4780
4782
  });
4781
- }, je = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", sr = je && typeof ReadableStream == "function", hc = je && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((r) => (n) => r.encode(n))(new TextEncoder()) : async (r) => new Uint8Array(await new Response(r).arrayBuffer())), ar = (r, ...n) => {
4783
+ }, je = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", rr = je && typeof ReadableStream == "function", hc = je && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((r) => (n) => r.encode(n))(new TextEncoder()) : async (r) => new Uint8Array(await new Response(r).arrayBuffer())), sr = (r, ...n) => {
4782
4784
  try {
4783
4785
  return !!r(...n);
4784
4786
  } catch {
4785
4787
  return !1;
4786
4788
  }
4787
- }, uc = sr && ar(() => {
4789
+ }, uc = rr && sr(() => {
4788
4790
  let r = !1;
4789
4791
  const n = new Request(tt.origin, {
4790
4792
  body: new ReadableStream(),
@@ -4794,12 +4796,12 @@ const rr = (r) => {
4794
4796
  }
4795
4797
  }).headers.has("Content-Type");
4796
4798
  return r && !n;
4797
- }), hi = 64 * 1024, un = sr && ar(() => b.isReadableStream(new Response("").body)), Ne = {
4799
+ }), li = 64 * 1024, un = rr && sr(() => b.isReadableStream(new Response("").body)), Be = {
4798
4800
  stream: un && ((r) => r.body)
4799
4801
  };
4800
4802
  je && ((r) => {
4801
4803
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((n) => {
4802
- !Ne[n] && (Ne[n] = b.isFunction(r[n]) ? (t) => t[n]() : (t, e) => {
4804
+ !Be[n] && (Be[n] = b.isFunction(r[n]) ? (t) => t[n]() : (t, e) => {
4803
4805
  throw new x(`Response type '${n}' is not supported`, x.ERR_NOT_SUPPORT, e);
4804
4806
  });
4805
4807
  });
@@ -4835,7 +4837,7 @@ const dc = async (r) => {
4835
4837
  headers: p,
4836
4838
  withCredentials: _ = "same-origin",
4837
4839
  fetchOptions: m
4838
- } = rr(r);
4840
+ } = ir(r);
4839
4841
  h = h ? (h + "").toLowerCase() : "text";
4840
4842
  let P = ac([i, s && s.toAbortSignal()], a), v;
4841
4843
  const S = P && P.unsubscribe && (() => {
@@ -4850,11 +4852,11 @@ const dc = async (r) => {
4850
4852
  duplex: "half"
4851
4853
  }), k;
4852
4854
  if (b.isFormData(e) && (k = G.headers.get("content-type")) && p.setContentType(k), G.body) {
4853
- const [ot, yt] = ai(
4855
+ const [ot, yt] = si(
4854
4856
  C,
4855
- Be(oi(l))
4857
+ Ne(ai(l))
4856
4858
  );
4857
- e = li(G.body, hi, ot, yt);
4859
+ e = ci(G.body, li, ot, yt);
4858
4860
  }
4859
4861
  }
4860
4862
  b.isString(_) || (_ = _ ? "include" : "omit");
@@ -4869,27 +4871,27 @@ const dc = async (r) => {
4869
4871
  credentials: L ? _ : void 0
4870
4872
  });
4871
4873
  let U = await fetch(v);
4872
- const V = un && (h === "stream" || h === "response");
4873
- if (un && (c || V && S)) {
4874
+ const q = un && (h === "stream" || h === "response");
4875
+ if (un && (c || q && S)) {
4874
4876
  const G = {};
4875
4877
  ["status", "statusText", "headers"].forEach((wt) => {
4876
4878
  G[wt] = U[wt];
4877
4879
  });
4878
- const k = b.toFiniteNumber(U.headers.get("content-length")), [ot, yt] = c && ai(
4880
+ const k = b.toFiniteNumber(U.headers.get("content-length")), [ot, yt] = c && si(
4879
4881
  k,
4880
- Be(oi(c), !0)
4882
+ Ne(ai(c), !0)
4881
4883
  ) || [];
4882
4884
  U = new Response(
4883
- li(U.body, hi, ot, () => {
4885
+ ci(U.body, li, ot, () => {
4884
4886
  yt && yt(), S && S();
4885
4887
  }),
4886
4888
  G
4887
4889
  );
4888
4890
  }
4889
4891
  h = h || "text";
4890
- let nt = await Ne[b.findKey(Ne, h) || "text"](U, r);
4891
- return !V && S && S(), await new Promise((G, k) => {
4892
- nr(G, k, {
4892
+ let nt = await Be[b.findKey(Be, h) || "text"](U, r);
4893
+ return !q && S && S(), await new Promise((G, k) => {
4894
+ er(G, k, {
4893
4895
  data: nt,
4894
4896
  headers: at.from(U.headers),
4895
4897
  status: U.status,
@@ -4920,7 +4922,7 @@ b.forEach(dn, (r, n) => {
4920
4922
  Object.defineProperty(r, "adapterName", { value: n });
4921
4923
  }
4922
4924
  });
4923
- const ui = (r) => `- ${r}`, _c = (r) => b.isFunction(r) || r === null || r === !1, or = {
4925
+ const hi = (r) => `- ${r}`, _c = (r) => b.isFunction(r) || r === null || r === !1, ar = {
4924
4926
  getAdapter: (r) => {
4925
4927
  r = b.isArray(r) ? r : [r];
4926
4928
  const { length: n } = r;
@@ -4940,8 +4942,8 @@ const ui = (r) => `- ${r}`, _c = (r) => b.isFunction(r) || r === null || r === !
4940
4942
  ([c, l]) => `adapter ${c} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
4941
4943
  );
4942
4944
  let a = n ? s.length > 1 ? `since :
4943
- ` + s.map(ui).join(`
4944
- `) : " " + ui(s[0]) : "as no adapter specified";
4945
+ ` + s.map(hi).join(`
4946
+ `) : " " + hi(s[0]) : "as no adapter specified";
4945
4947
  throw new x(
4946
4948
  "There is no suitable adapter to dispatch the request " + a,
4947
4949
  "ERR_NOT_SUPPORT"
@@ -4955,34 +4957,34 @@ function Ye(r) {
4955
4957
  if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
4956
4958
  throw new Gt(null, r);
4957
4959
  }
4958
- function di(r) {
4960
+ function ui(r) {
4959
4961
  return Ye(r), r.headers = at.from(r.headers), r.data = Ze.call(
4960
4962
  r,
4961
4963
  r.transformRequest
4962
- ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), or.getAdapter(r.adapter || oe.adapter)(r).then(function(e) {
4964
+ ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), ar.getAdapter(r.adapter || oe.adapter)(r).then(function(e) {
4963
4965
  return Ye(r), e.data = Ze.call(
4964
4966
  r,
4965
4967
  r.transformResponse,
4966
4968
  e
4967
4969
  ), e.headers = at.from(e.headers), e;
4968
4970
  }, function(e) {
4969
- return er(e) || (Ye(r), e && e.response && (e.response.data = Ze.call(
4971
+ return tr(e) || (Ye(r), e && e.response && (e.response.data = Ze.call(
4970
4972
  r,
4971
4973
  r.transformResponse,
4972
4974
  e.response
4973
4975
  ), e.response.headers = at.from(e.response.headers))), Promise.reject(e);
4974
4976
  });
4975
4977
  }
4976
- const cr = "1.7.9", He = {};
4978
+ const or = "1.7.9", He = {};
4977
4979
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((r, n) => {
4978
4980
  He[r] = function(e) {
4979
4981
  return typeof e === r || "a" + (n < 1 ? "n " : " ") + r;
4980
4982
  };
4981
4983
  });
4982
- const pi = {};
4984
+ const di = {};
4983
4985
  He.transitional = function(n, t, e) {
4984
4986
  function i(s, a) {
4985
- return "[Axios v" + cr + "] Transitional option '" + s + "'" + a + (e ? ". " + e : "");
4987
+ return "[Axios v" + or + "] Transitional option '" + s + "'" + a + (e ? ". " + e : "");
4986
4988
  }
4987
4989
  return (s, a, c) => {
4988
4990
  if (n === !1)
@@ -4990,7 +4992,7 @@ He.transitional = function(n, t, e) {
4990
4992
  i(a, " has been removed" + (t ? " in " + t : "")),
4991
4993
  x.ERR_DEPRECATED
4992
4994
  );
4993
- return t && !pi[a] && (pi[a] = !0, console.warn(
4995
+ return t && !di[a] && (di[a] = !0, console.warn(
4994
4996
  i(
4995
4997
  a,
4996
4998
  " has been deprecated since v" + t + " and will be removed in the near future"
@@ -5022,11 +5024,11 @@ const Pe = {
5022
5024
  assertOptions: gc,
5023
5025
  validators: He
5024
5026
  }, vt = Pe.validators;
5025
- class Nt {
5027
+ let Bt = class {
5026
5028
  constructor(n) {
5027
5029
  this.defaults = n, this.interceptors = {
5028
- request: new ri(),
5029
- response: new ri()
5030
+ request: new ii(),
5031
+ response: new ii()
5030
5032
  };
5031
5033
  }
5032
5034
  /**
@@ -5091,7 +5093,7 @@ class Nt {
5091
5093
  });
5092
5094
  let p, _ = 0, m;
5093
5095
  if (!l) {
5094
- const v = [di.bind(this), void 0];
5096
+ const v = [ui.bind(this), void 0];
5095
5097
  for (v.unshift.apply(v, c), v.push.apply(v, h), m = v.length, p = Promise.resolve(t); _ < m; )
5096
5098
  p = p.then(v[_++], v[_++]);
5097
5099
  return p;
@@ -5108,7 +5110,7 @@ class Nt {
5108
5110
  }
5109
5111
  }
5110
5112
  try {
5111
- p = di.call(this, P);
5113
+ p = ui.call(this, P);
5112
5114
  } catch (v) {
5113
5115
  return Promise.reject(v);
5114
5116
  }
@@ -5118,12 +5120,12 @@ class Nt {
5118
5120
  }
5119
5121
  getUri(n) {
5120
5122
  n = Mt(this.defaults, n);
5121
- const t = ir(n.baseURL, n.url);
5122
- return Zi(t, n.params, n.paramsSerializer);
5123
+ const t = nr(n.baseURL, n.url);
5124
+ return Qi(t, n.params, n.paramsSerializer);
5123
5125
  }
5124
- }
5126
+ };
5125
5127
  b.forEach(["delete", "get", "head", "options"], function(n) {
5126
- Nt.prototype[n] = function(t, e) {
5128
+ Bt.prototype[n] = function(t, e) {
5127
5129
  return this.request(Mt(e || {}, {
5128
5130
  method: n,
5129
5131
  url: t,
@@ -5144,9 +5146,9 @@ b.forEach(["post", "put", "patch"], function(n) {
5144
5146
  }));
5145
5147
  };
5146
5148
  }
5147
- Nt.prototype[n] = t(), Nt.prototype[n + "Form"] = t(!0);
5149
+ Bt.prototype[n] = t(), Bt.prototype[n + "Form"] = t(!0);
5148
5150
  });
5149
- class Ln {
5151
+ let bc = class cr {
5150
5152
  constructor(n) {
5151
5153
  if (typeof n != "function")
5152
5154
  throw new TypeError("executor must be a function.");
@@ -5212,19 +5214,19 @@ class Ln {
5212
5214
  static source() {
5213
5215
  let n;
5214
5216
  return {
5215
- token: new Ln(function(i) {
5217
+ token: new cr(function(i) {
5216
5218
  n = i;
5217
5219
  }),
5218
5220
  cancel: n
5219
5221
  };
5220
5222
  }
5221
- }
5222
- function bc(r) {
5223
+ };
5224
+ function mc(r) {
5223
5225
  return function(t) {
5224
5226
  return r.apply(null, t);
5225
5227
  };
5226
5228
  }
5227
- function mc(r) {
5229
+ function yc(r) {
5228
5230
  return b.isObject(r) && r.isAxiosError === !0;
5229
5231
  }
5230
5232
  const pn = {
@@ -5296,33 +5298,51 @@ Object.entries(pn).forEach(([r, n]) => {
5296
5298
  pn[n] = r;
5297
5299
  });
5298
5300
  function lr(r) {
5299
- const n = new Nt(r), t = Vi(Nt.prototype.request, n);
5300
- return b.extend(t, Nt.prototype, n, { allOwnKeys: !0 }), b.extend(t, n, null, { allOwnKeys: !0 }), t.create = function(i) {
5301
+ const n = new Bt(r), t = Li(Bt.prototype.request, n);
5302
+ return b.extend(t, Bt.prototype, n, { allOwnKeys: !0 }), b.extend(t, n, null, { allOwnKeys: !0 }), t.create = function(i) {
5301
5303
  return lr(Mt(r, i));
5302
5304
  }, t;
5303
5305
  }
5304
- const q = lr(oe);
5305
- q.Axios = Nt;
5306
- q.CanceledError = Gt;
5307
- q.CancelToken = Ln;
5308
- q.isCancel = er;
5309
- q.VERSION = cr;
5310
- q.toFormData = qe;
5311
- q.AxiosError = x;
5312
- q.Cancel = q.CanceledError;
5313
- q.all = function(n) {
5306
+ const V = lr(oe);
5307
+ V.Axios = Bt;
5308
+ V.CanceledError = Gt;
5309
+ V.CancelToken = bc;
5310
+ V.isCancel = tr;
5311
+ V.VERSION = or;
5312
+ V.toFormData = qe;
5313
+ V.AxiosError = x;
5314
+ V.Cancel = V.CanceledError;
5315
+ V.all = function(n) {
5314
5316
  return Promise.all(n);
5315
5317
  };
5316
- q.spread = bc;
5317
- q.isAxiosError = mc;
5318
- q.mergeConfig = Mt;
5319
- q.AxiosHeaders = at;
5320
- q.formToJSON = (r) => tr(b.isHTMLForm(r) ? new FormData(r) : r);
5321
- q.getAdapter = or.getAdapter;
5322
- q.HttpStatusCode = pn;
5323
- q.default = q;
5324
- var f, hr, ur, dr, fn, pr, fr, _r, gr, br, mr, yr, wr, vr, Pr, Zt, Yt, Er, te, Tr, It, Cr, W, Sr, kr, _n, xr, Ar, Dr, gn, bn, ee, mn, Rr, ft, _t, Ee, yn, ne, wn, vn, Ir, Pn, En, Or, Br, qt, Tn, Nr, Mr, Fr, Te, Ur, Lr, Cn, Vr, qr, jr, Hr, Kr, Wr, zr, Xr, Gr, Sn, kn, Jr, $r, Qr;
5325
- class Pc extends Ft {
5318
+ V.spread = mc;
5319
+ V.isAxiosError = yc;
5320
+ V.mergeConfig = Mt;
5321
+ V.AxiosHeaders = at;
5322
+ V.formToJSON = (r) => Yi(b.isHTMLForm(r) ? new FormData(r) : r);
5323
+ V.getAdapter = ar.getAdapter;
5324
+ V.HttpStatusCode = pn;
5325
+ V.default = V;
5326
+ const {
5327
+ Axios: Cc,
5328
+ AxiosError: Sc,
5329
+ CanceledError: kc,
5330
+ isCancel: xc,
5331
+ CancelToken: Ac,
5332
+ VERSION: Dc,
5333
+ all: Rc,
5334
+ Cancel: Ic,
5335
+ isAxiosError: Oc,
5336
+ spread: Nc,
5337
+ toFormData: Bc,
5338
+ AxiosHeaders: Mc,
5339
+ HttpStatusCode: Fc,
5340
+ formToJSON: Uc,
5341
+ getAdapter: Lc,
5342
+ mergeConfig: Vc
5343
+ } = V;
5344
+ var f, hr, ur, dr, fn, pr, fr, _r, gr, br, mr, yr, wr, vr, Pr, Zt, Yt, Er, te, Tr, It, Cr, W, Sr, kr, _n, xr, Ar, Dr, gn, bn, ee, mn, Rr, ft, _t, Ee, yn, ne, wn, vn, Ir, Pn, En, Or, Nr, qt, Tn, Br, Mr, Fr, Te, Ur, Lr, Cn, Vr, qr, jr, Hr, Kr, Wr, zr, Xr, Gr, Sn, kn, $r, Jr, Qr;
5345
+ class qc extends Ft {
5326
5346
  constructor({
5327
5347
  filters: t = null,
5328
5348
  config_port: e = null,
@@ -5333,7 +5353,7 @@ class Pc extends Ft {
5333
5353
  } = {}) {
5334
5354
  super({ filters: t, config_port: e, no_device: i });
5335
5355
  X(this, f);
5336
- J(this, "__pinPad__", {
5356
+ $(this, "__pinPad__", {
5337
5357
  buffer: null,
5338
5358
  about: {
5339
5359
  EMV: null,
@@ -5633,7 +5653,7 @@ class Pc extends Ft {
5633
5653
  localStorage.removeItem("ppLoginResponse"), localStorage.removeItem("ppRSAKey"), localStorage.removeItem("ppPublicIP");
5634
5654
  }
5635
5655
  async checkPositionPermission() {
5636
- if (!Hn())
5656
+ if (!jn())
5637
5657
  throw new Error("Geolocation not supported");
5638
5658
  return new Promise((t, e) => {
5639
5659
  navigator.permissions.query({ name: "geolocation" }).then((i) => {
@@ -6042,7 +6062,7 @@ Tr = function(t, e, i = !1) {
6042
6062
  };
6043
6063
  if (await o(this, f, ee).call(this), o(this, f, gn).call(this))
6044
6064
  throw new Error("Empty RSA Key");
6045
- const s = o(this, f, Yt).call(this, 32), a = o(this, f, Zt).call(this, this.__pinPad__.config.publicKeyRSA, s), c = await o(this, f, te).call(this, s, JSON.stringify(i)), l = await q.post(e, c, {
6065
+ const s = o(this, f, Yt).call(this, 32), a = o(this, f, Zt).call(this, this.__pinPad__.config.publicKeyRSA, s), c = await o(this, f, te).call(this, s, JSON.stringify(i)), l = await V.post(e, c, {
6046
6066
  headers: {
6047
6067
  "Content-Type": "application/json",
6048
6068
  "cache-control": "no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0",
@@ -6065,7 +6085,7 @@ Tr = function(t, e, i = !1) {
6065
6085
  })
6066
6086
  ), await o(this, f, _n).call(this);
6067
6087
  }, _n = async function() {
6068
- await o(this, f, Br).call(this);
6088
+ await o(this, f, Nr).call(this);
6069
6089
  try {
6070
6090
  await o(this, f, Or).call(this);
6071
6091
  } catch (t) {
@@ -6094,7 +6114,7 @@ Tr = function(t, e, i = !1) {
6094
6114
  let t = localStorage.getItem("ppLoginResponse");
6095
6115
  t && (t = JSON.parse(t), this.__pinPad__.config.loginResponse || (this.__pinPad__.config.loginResponse = t.data), (/* @__PURE__ */ new Date()).getTime() - t.timestamp >= 864e5 && (this.__pinPad__.config.loginResponse = null));
6096
6116
  }, Dr = async function() {
6097
- const t = this.url + this.__pinPad__.constants.uris.RSAKey, e = await q.get(t).catch((i) => {
6117
+ const t = this.url + this.__pinPad__.constants.uris.RSAKey, e = await V.get(t).catch((i) => {
6098
6118
  throw new Error(`Error in request, verify internet connection: ${i.response.status} ${i.message}`);
6099
6119
  });
6100
6120
  if (e.headers.get("content-type").indexOf("application/json") === -1)
@@ -6159,7 +6179,7 @@ Tr = function(t, e, i = !1) {
6159
6179
  const t = /* @__PURE__ */ new Date(), e = t.getHours().toString().padStart(2, "0"), i = t.getMinutes().toString().padStart(2, "0");
6160
6180
  return e + i;
6161
6181
  }, Or = async function() {
6162
- return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, Hn() ? new Promise((t) => {
6182
+ return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, jn() ? new Promise((t) => {
6163
6183
  navigator.geolocation.getCurrentPosition(
6164
6184
  (e) => {
6165
6185
  this.__pinPad__.config.latitude = e.coords.latitude, this.__pinPad__.config.longitude = e.coords.longitude, t(this.latitudeLongitude);
@@ -6169,12 +6189,12 @@ Tr = function(t, e, i = !1) {
6169
6189
  }
6170
6190
  );
6171
6191
  }) : this.latitudeLongitude);
6172
- }, Br = async function() {
6192
+ }, Nr = async function() {
6173
6193
  let t = localStorage.getItem("ppPublicIP");
6174
6194
  if (t && (t = JSON.parse(t), this.__pinPad__.config.publicIP = t.data, (/* @__PURE__ */ new Date()).getTime() - t.timestamp >= 864e5 && (this.__pinPad__.config.publicIP = null)), this.__pinPad__.config.publicIP) return this.__pinPad__.config.publicIP;
6175
6195
  this.__pinPad__.config.publicIP = null;
6176
6196
  let e = !1;
6177
- const i = await q.get("https://api.ipify.org?format=json").catch(() => e = !0);
6197
+ const i = await V.get("https://api.ipify.org?format=json").catch(() => e = !0);
6178
6198
  return e ? null : (this.__pinPad__.config.publicIP = i.data.ip || null, localStorage.setItem(
6179
6199
  "ppPublicIP",
6180
6200
  JSON.stringify({
@@ -6186,7 +6206,7 @@ Tr = function(t, e, i = !1) {
6186
6206
  await o(this, f, ee).call(this);
6187
6207
  const i = o(this, f, Yt).call(this, 32);
6188
6208
  let s = o(this, f, Zt).call(this, this.__pinPad__.config.publicKeyRSA, i), a = await o(this, f, te).call(this, i, JSON.stringify(e));
6189
- return (await q.post(t, a, {
6209
+ return (await V.post(t, a, {
6190
6210
  headers: {
6191
6211
  "Content-Type": "application/json",
6192
6212
  "cache-control": "no-cache",
@@ -6199,7 +6219,7 @@ Tr = function(t, e, i = !1) {
6199
6219
  }, Tn = async function({ data: t, url: e, cancelable: i = !1 } = {}) {
6200
6220
  await o(this, f, ee).call(this);
6201
6221
  const s = o(this, f, Yt).call(this, 32), a = o(this, f, Zt).call(this, this.__pinPad__.config.publicKeyRSA, s), c = await o(this, f, te).call(this, s, JSON.stringify(t)), l = this;
6202
- return (await q.post(e, c, {
6222
+ return (await V.post(e, c, {
6203
6223
  headers: {
6204
6224
  "Content-Type": "application/json",
6205
6225
  "cache-control": "no-cache",
@@ -6210,7 +6230,7 @@ Tr = function(t, e, i = !1) {
6210
6230
  let _ = `Error in request, verify internet connection: ${p.status} ${p.message}`;
6211
6231
  throw p.response.status >= 500 && p.response.status <= 599 ? _ = "Service Temporarily Unavailable" : p.response.status >= 400 && p.response.status <= 499 && (_ = "Bad Request"), i && await o(m = l, f, Ir).call(m), new Error(_);
6212
6232
  })).data;
6213
- }, Nr = async function() {
6233
+ }, Br = async function() {
6214
6234
  const t = this.__pinPad__.constants.FS, e = this.__pinPad__.constants.ETX, i = this.__pinPad__.constants.STX;
6215
6235
  let s = "C57A" + this.__pinPad__.config.internal.qpsDomestic;
6216
6236
  if (s = s + t + "B" + this.__pinPad__.config.internal.qpsInternational, s = s + t + "C" + this.__pinPad__.config.internal.cvmlVMCDomestic, s = s + t + "D" + this.__pinPad__.config.internal.cvmlVMCInternational, s = s + t + "E" + this.__pinPad__.config.internal.cvmlAmex, s = s + t + "F" + this.__pinPad__.config.internal.translimitCTLSVMC, s = s + t + "G" + this.__pinPad__.config.internal.translimitCTLSAmex, s = i + o(this, f, ft).call(this, s) + s + e, s = s + o(this, f, _t).call(this, s), !this.__pinPad__.about.injectedValues) {
@@ -6299,7 +6319,7 @@ Tr = function(t, e, i = !1) {
6299
6319
  data: t,
6300
6320
  url: this.url + this.__pinPad__.constants.uris.keysDUKPT
6301
6321
  });
6302
- await o(this, f, $r).call(this, e);
6322
+ await o(this, f, Jr).call(this, e);
6303
6323
  }, Lr = async function() {
6304
6324
  if (!await o(this, f, bn).call(this))
6305
6325
  throw new Error("RSA public key is empty");
@@ -6309,7 +6329,7 @@ Tr = function(t, e, i = !1) {
6309
6329
  if (e.__pinPad__.about.supportInjection && e.__pinPad__.config.internal.emv && e.__pinPad__.about.injectedValues)
6310
6330
  return await o(l = e, f, Te).call(l, s, a), !0;
6311
6331
  let c = 0;
6312
- return e.__pinPad__.waiting.statusInjectWaiting = "pending", await o(h = e, f, Nr).call(h), new Promise((p, _) => {
6332
+ return e.__pinPad__.waiting.statusInjectWaiting = "pending", await o(h = e, f, Br).call(h), new Promise((p, _) => {
6313
6333
  c = setInterval(async () => {
6314
6334
  var m;
6315
6335
  e.__pinPad__.waiting.statusInjectWaiting === "resolved" ? (clearInterval(c), e.__pinPad__.waiting.statusInjectWaiting = null, await o(m = e, f, Te).call(m, s, a), p(!0)) : e.__pinPad__.waiting.statusInjectWaiting === "rejected" && (clearInterval(c), e.__pinPad__.waiting.statusInjectWaiting = null, _("Error"));
@@ -6373,7 +6393,7 @@ Tr = function(t, e, i = !1) {
6373
6393
  ), await o(this, f, qr).call(this, 5)), await o(this, f, ee).call(this);
6374
6394
  const a = o(this, f, Yt).call(this, 32), c = o(this, f, Zt).call(this, this.__pinPad__.config.publicKeyRSA, a), l = await o(this, f, te).call(this, a, JSON.stringify(e));
6375
6395
  let h = !1;
6376
- const p = await q.post(t, l, {
6396
+ const p = await V.post(t, l, {
6377
6397
  headers: {
6378
6398
  "Content-Type": "application/json",
6379
6399
  data: c || ""
@@ -6554,7 +6574,7 @@ Wr = function(t) {
6554
6574
  const p = o(this, f, Wr).call(this, h);
6555
6575
  return i.object = p, await o(this, f, Xr).call(this, p), i.approved = this.__pinPad__.operation.responseMit._approved, this.__pinPad__.operation.finalResult = p, i;
6556
6576
  } catch (c) {
6557
- throw t.__pinPad__.finishCommand.A = "01", t.__pinPad__.finishCommand.B = "", t.__pinPad__.finishCommand.C = "", t.__pinPad__.finishCommand.D = "", t.__pinPad__.finishCommand.E = "", t.__pinPad__.finishCommand.F = "", t.__pinPad__.finishCommand.G = "", t.__pinPad__.finishCommand.H = "", t.__pinPad__.finishCommand.I = "", t.__pinPad__.finishCommand.J = "", t.__pinPad__.finishCommand.K = "", await o(a = t, f, Jr).call(a, o(s = t, f, kn).call(s, c)), c;
6577
+ throw t.__pinPad__.finishCommand.A = "01", t.__pinPad__.finishCommand.B = "", t.__pinPad__.finishCommand.C = "", t.__pinPad__.finishCommand.D = "", t.__pinPad__.finishCommand.E = "", t.__pinPad__.finishCommand.F = "", t.__pinPad__.finishCommand.G = "", t.__pinPad__.finishCommand.H = "", t.__pinPad__.finishCommand.I = "", t.__pinPad__.finishCommand.J = "", t.__pinPad__.finishCommand.K = "", await o(a = t, f, $r).call(a, o(s = t, f, kn).call(s, c)), c;
6558
6578
  }
6559
6579
  }, Xr = async function(t) {
6560
6580
  if (this.__pinPad__.config.read.POSEM === "022" || this.__pinPad__.config.read.POSEM === "800" || this.__pinPad__.config.read.ReadCTLS === "1")
@@ -6653,7 +6673,7 @@ Wr = function(t) {
6653
6673
  message: e[t]
6654
6674
  } : { error: t, message: "Error desconocido" };
6655
6675
  return this.dispatch("pp:error", i), i;
6656
- }, Jr = async function(t) {
6676
+ }, $r = async function(t) {
6657
6677
  const e = this.__pinPad__.constants.FS, i = this.__pinPad__.constants.STX, s = this.__pinPad__.constants.ETX;
6658
6678
  let a = "C93A" + this.__pinPad__.finishCommand.A;
6659
6679
  if (a = a + e + "B" + this.__pinPad__.finishCommand.B, a = a + e + "C" + this.__pinPad__.finishCommand.C, a = a + e + "D" + this.__pinPad__.finishCommand.D, a = a + e + "E" + this.__pinPad__.finishCommand.E, a = a + e + "F" + this.__pinPad__.finishCommand.F, a = a + e + "G" + this.__pinPad__.finishCommand.G, a = a + e + "H" + this.__pinPad__.finishCommand.H, a = a + e + "I" + this.__pinPad__.finishCommand.I, a = a + e + "J" + this.__pinPad__.finishCommand.J, a = a + e + "K" + this.__pinPad__.finishCommand.K, a = i + o(this, f, ft).call(this, a) + a + s, a = a + o(this, f, _t).call(this, a), this.__pinPad__.config.read.POSEM === "022" || this.__pinPad__.config.read.POSEM === "800" || this.__pinPad__.config.read.ReadCTLS === "1") {
@@ -6662,7 +6682,7 @@ Wr = function(t) {
6662
6682
  }
6663
6683
  const c = this.parseStringToBytes(a, "");
6664
6684
  await this.appendToQueue(c, "finish-emv-end");
6665
- }, $r = async function(t) {
6685
+ }, Jr = async function(t) {
6666
6686
  if (t.cd_estatus = t.cd_estatus ? t.cd_estatus : "0", t.cd_estatus !== "1") {
6667
6687
  this.__pinPad__.operation.ignore.isError92TRX && await o(this, f, Sn).call(this);
6668
6688
  return;
@@ -6685,7 +6705,7 @@ Wr = function(t) {
6685
6705
  this.__pinPad__.config.read.AppId = "", this.__pinPad__.config.read.AppIdLabel = "", this.__pinPad__.config.read.Arqc = "", this.__pinPad__.config.read.ChipName = "", this.__pinPad__.config.read.ReadCTLS = "", this.__pinPad__.config.read.NB_Data = "", this.__pinPad__.config.read.NB_ksn = "", this.__pinPad__.config.read.PIN = "", this.__pinPad__.config.read.POSEM = "", this.__pinPad__.config.read.Tags = "", this.__pinPad__.config.read.Type = "", this.__pinPad__.config.read.Chip = "", this.__pinPad__.config.read.ChipNameEnc = "", this.__pinPad__.operation.ignore.error = "", this.__pinPad__.operation.ignore.C93Global = "", this.__pinPad__.operation.folio = "", this.__pinPad__.operation.authorization = "", this.__pinPad__.config.tokenizeTRX = !1;
6686
6706
  };
6687
6707
  var g, Zr, Yr, ts, it, Ce, es, ns, is, rs, ss, as, os, cs, ls, hs, us, ds, ps, fs, _s, gs, bs, ms, ys, ws, vs, Ps, Es, Ts, Cs, Ss, ht, Q, Se, Z, gt, ks, xs, As, Ds, ie, xn, An, ke, xe, Rs;
6688
- class Ec extends Ft {
6708
+ class jc extends Ft {
6689
6709
  constructor({
6690
6710
  filters: t = null,
6691
6711
  config_port: e = null,
@@ -6696,7 +6716,7 @@ class Ec extends Ft {
6696
6716
  } = {}) {
6697
6717
  super({ filters: t, config_port: e, no_device: i, device_listen_on_port: s });
6698
6718
  X(this, g);
6699
- J(this, "__device", {
6719
+ $(this, "__device", {
6700
6720
  type: "esplus",
6701
6721
  support_cart: !1,
6702
6722
  withdraw: {
@@ -7775,15 +7795,15 @@ gt = function({ type: t = null, severity: e = "high" } = {}) {
7775
7795
  h.push(l.charCodeAt(p).toString(16));
7776
7796
  return h;
7777
7797
  };
7778
- var Ht, Bt, Kt, w, Is, Os, Ae, Bs, Ns, Ms, Fs, Us, Ls, Vs, qs, Dn, js, Hs, Ks, Ws, zs, Xs, Gs, Js, $s, Qs, Zs, Ys, ta, ea, rt, De, na, ia, ra, sa, Rn, Re, aa, oa, In, On, Bn;
7779
- class Tc extends Ft {
7798
+ var Ht, Nt, Kt, w, Is, Os, Ae, Ns, Bs, Ms, Fs, Us, Ls, Vs, qs, Dn, js, Hs, Ks, Ws, zs, Xs, Gs, $s, Js, Qs, Zs, Ys, ta, ea, rt, De, na, ia, ra, sa, Rn, Re, aa, oa, In, On, Nn;
7799
+ class Hc extends Ft {
7780
7800
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1 } = {}) {
7781
7801
  super({ filters: t, config_port: e, no_device: i });
7782
7802
  X(this, w);
7783
- J(this, "__coin_purse", {
7803
+ $(this, "__coin_purse", {
7784
7804
  available: !0
7785
7805
  });
7786
- J(this, "__banknote_purse", {
7806
+ $(this, "__banknote_purse", {
7787
7807
  available: !0,
7788
7808
  isRecycler: !0,
7789
7809
  recycler: {
@@ -7792,7 +7812,7 @@ class Tc extends Ft {
7792
7812
  // 0: $20, 1: $50, 2: $100, 3: $200, 4: $500
7793
7813
  }
7794
7814
  });
7795
- J(this, "__sale", {
7815
+ $(this, "__sale", {
7796
7816
  price: 0,
7797
7817
  change: 0,
7798
7818
  change_verified: 0,
@@ -7802,32 +7822,32 @@ class Tc extends Ft {
7802
7822
  this.price = 0, this.change = 0, this.change_verified = 0, this.dispense_all = !0, this.last_change = 0;
7803
7823
  }
7804
7824
  });
7805
- J(this, "__money_session", {
7825
+ $(this, "__money_session", {
7806
7826
  inserted: 0,
7807
7827
  retired: 0,
7808
7828
  clear() {
7809
7829
  this.inserted = 0, this.retired = 0;
7810
7830
  }
7811
7831
  });
7812
- J(this, "coins", {
7832
+ $(this, "coins", {
7813
7833
  tubes: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
7814
7834
  box: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
7815
7835
  totals: { g50: 0, c50: 0, p1: 0, p2: 0, p5: 0, p10: 0 },
7816
7836
  total: 0
7817
7837
  });
7818
- J(this, "banknotes", {
7838
+ $(this, "banknotes", {
7819
7839
  stacker: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
7820
7840
  recycler: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
7821
7841
  out: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
7822
7842
  totals: { p20: 0, p50: 0, p100: 0, p200: 0, p500: 0, p1000: 0 },
7823
7843
  total: 0
7824
7844
  });
7825
- J(this, "card_reader", {
7845
+ $(this, "card_reader", {
7826
7846
  available: !1,
7827
7847
  max_pre_credit: 0
7828
7848
  });
7829
7849
  X(this, Ht, !1);
7830
- X(this, Bt, 0);
7850
+ X(this, Nt, 0);
7831
7851
  X(this, Kt, 0);
7832
7852
  if (this.__internal__.device.type = "boardroid", j.getCustom(this.typeDevice, i))
7833
7853
  throw new Error(`Device ${this.typeDevice} ${i} already exists`);
@@ -7866,6 +7886,11 @@ class Tc extends Ft {
7866
7886
  get hasCoinPurse() {
7867
7887
  return this.__coin_purse.available;
7868
7888
  }
7889
+ set hasCoinPurse(t) {
7890
+ if (typeof t != "boolean")
7891
+ throw new Error(`Invalid value: ${t}`);
7892
+ this.__coin_purse.available = t;
7893
+ }
7869
7894
  set price(t) {
7870
7895
  let e = parseFloat(t);
7871
7896
  (isNaN(e) || e < 0) && (e = 0), this.__sale.price = e;
@@ -7896,7 +7921,7 @@ class Tc extends Ft {
7896
7921
  const i = (5 + this.deviceNumber).toString(16).padStart(2, "0").toLowerCase();
7897
7922
  switch (t[1]) {
7898
7923
  case i:
7899
- e.request = "connect", e = o(this, w, Ns).call(this, e);
7924
+ e.request = "connect", e = o(this, w, Bs).call(this, e);
7900
7925
  break;
7901
7926
  case "a0":
7902
7927
  e.request = "--automatic", e = o(this, w, js).call(this, t, e);
@@ -7920,10 +7945,10 @@ class Tc extends Ft {
7920
7945
  e.request = "banknote-purse:banknote-scrow-status", e = o(this, w, Gs).call(this, t[2], e);
7921
7946
  break;
7922
7947
  case "d5":
7923
- e.request = "banknote-purse:dispense", e = o(this, w, Js).call(this, t, e);
7948
+ e.request = "banknote-purse:dispense", e = o(this, w, $s).call(this, t, e);
7924
7949
  break;
7925
7950
  case "d6":
7926
- e.request = "coin-purse:dispense", e = o(this, w, $s).call(this, t, e);
7951
+ e.request = "coin-purse:dispense", e = o(this, w, Js).call(this, t, e);
7927
7952
  break;
7928
7953
  case "d7":
7929
7954
  e.request = "dispense", e = o(this, w, Qs).call(this, t[5], e);
@@ -8150,9 +8175,9 @@ class Tc extends Ft {
8150
8175
  seconds: 0.4,
8151
8176
  retry: !1
8152
8177
  });
8153
- e.push(s), F(this, Bt, i), o(this, w, Re).call(this), t || i++;
8178
+ e.push(s), F(this, Nt, i), o(this, w, Re).call(this), t || i++;
8154
8179
  }
8155
- F(this, Bt, 80), o(this, w, Re).call(this, { dispensed: e }), o(this, w, Rn).call(this);
8180
+ F(this, Nt, 80), o(this, w, Re).call(this, { dispensed: e }), o(this, w, Rn).call(this);
8156
8181
  }
8157
8182
  async sendCustomCode({ code: t = [] } = {}) {
8158
8183
  if (t.length === 0) throw new Error("Invalid code");
@@ -8164,16 +8189,16 @@ class Tc extends Ft {
8164
8189
  return e <= 0 ? !0 : (e = o(this, w, In).call(this, e).pending, e = o(this, w, On).call(this, e).pending, !(e > 0));
8165
8190
  }
8166
8191
  async returnChange() {
8167
- return await o(this, w, Bn).call(this);
8192
+ return await o(this, w, Nn).call(this);
8168
8193
  }
8169
8194
  async returnInsertedMoney() {
8170
- return this.__money_session.inserted <= 0 ? !1 : await o(this, w, Bn).call(this, this.__money_session.inserted);
8195
+ return this.__money_session.inserted <= 0 ? !1 : await o(this, w, Nn).call(this, this.__money_session.inserted);
8171
8196
  }
8172
8197
  async serialCorruptMessage(t, e) {
8173
8198
  this.dispatch("corrupt:message", { data: t, message: e });
8174
8199
  }
8175
8200
  }
8176
- Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), Is = function() {
8201
+ Ht = new WeakMap(), Nt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), Is = function() {
8177
8202
  const t = [
8178
8203
  "banknote-purse:banknote-scrow-status",
8179
8204
  "banknote-purse:config",
@@ -8183,6 +8208,7 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8183
8208
  "banknote-purse:save-memory",
8184
8209
  "card-reader:event",
8185
8210
  "change:pending",
8211
+ "change:dispense",
8186
8212
  "coin-purse:coin-event",
8187
8213
  "coin-purse:config",
8188
8214
  "coin-purse:reject-lever",
@@ -8203,9 +8229,9 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8203
8229
  j.add(this);
8204
8230
  }, Ae = function() {
8205
8231
  return this.__banknote_purse.isRecycler && this.__banknote_purse.recycler.ict;
8206
- }, Bs = function() {
8232
+ }, Ns = function() {
8207
8233
  return this.hasCoinPurse || this.hasRecycler;
8208
- }, Ns = function(t) {
8234
+ }, Bs = function(t) {
8209
8235
  return t.name = "Connection with the serial device completed.", t.description = "Your connection with the serial device was successfully completed.", t.no_code = 1, this.dispatch("run:default-load", {}), t;
8210
8236
  }, Ms = function(t) {
8211
8237
  const e = {
@@ -8263,32 +8289,32 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8263
8289
  return ["r20", "r50", "r100"].includes(t);
8264
8290
  }, qs = function() {
8265
8291
  return ["r20", "r50", "r100", "r200", "r500"][this.__banknote_purse.recycler.banknote];
8266
- }, Dn = function(t, e) {
8292
+ }, Dn = function(t, e, i) {
8267
8293
  if (!t) return;
8268
- let i = !0;
8269
- if (o(this, w, Fs).call(this, t)) {
8294
+ let s = !0;
8295
+ if (o(this, w, Fs).call(this, t) && i === "coin") {
8270
8296
  if (typeof this.coins.tubes[t] > "u") return;
8271
8297
  e === "tube" ? this.coins.tubes[t] += 1 : e === "box" && (this.coins.box[t] += 1);
8272
- let s = 0;
8273
- ["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;
8274
- } else if (o(this, w, Ls).call(this, t)) {
8275
- if (typeof this.banknotes.tubes[t] > "u") return;
8298
+ let a = 0;
8299
+ ["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;
8300
+ } else if (o(this, w, Ls).call(this, t) && i === "banknote") {
8301
+ if (typeof this.banknotes.recycler[t] > "u") return;
8276
8302
  e === "recycler" ? this.banknotes.recycler[t] += 1 : e === "stacker" && (this.banknotes.stacker[t] += 1);
8277
- let s = parseInt(t.slice(1));
8278
- this.banknotes.totals[t] += s, this.__money_session.inserted += s, this.banknotes.total += s;
8279
- } else if (o(this, w, Vs).call(this, t) && e === "out") {
8280
- if (typeof this.banknotes.out[t] > "u") return;
8281
- this.banknotes.out[t] += 1;
8282
- let s = parseInt(t.slice(1));
8283
- this.__money_session.retired += s, this.banknotes.recycler[t] -= 1, this.banknotes.total -= s, i = !1, this.dispatch("session:money-dispensed", { type_money: t, retired: s, finish: !1, type: "banknotes" });
8284
- }
8285
- i && this.dispatch("session:money-request", {});
8303
+ let a = parseInt(t.slice(1));
8304
+ this.banknotes.totals[t] += a, this.__money_session.inserted += a, this.banknotes.total += a;
8305
+ } else if (o(this, w, Vs).call(this, t) && e === "out" && i === "banknote") {
8306
+ if (typeof this.banknotes.out[t.replace("r", "p")] > "u") return;
8307
+ this.banknotes.out[t.replace("r", "p")] += 1;
8308
+ let a = parseInt(t.slice(1));
8309
+ this.__money_session.retired += a, this.banknotes.recycler[t.replace("r", "p")] -= 1, this.banknotes.total -= a, s = !1, this.dispatch("session:money-dispensed", { type_money: t, retired: a, finish: !1, type: "banknotes" });
8310
+ }
8311
+ s && this.dispatch("session:money-request", {});
8286
8312
  }, js = function(t, e) {
8287
8313
  const i = parseInt(t[2], 16);
8288
- return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, i === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : i === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : i >= 64 && i <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : i >= 80 && i <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : i >= 96 && i <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : i >= 112 && i <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : i >= 144 && i <= 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), i === 1 || i === 2 || i >= 160 || i >= 128 && i <= 143 || ([e.description, e.additional.coin] = o(this, w, Ms).call(this, t[2]), e.no_code = 38 + i, o(this, w, Dn).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;
8314
+ return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, i === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : i === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : i >= 64 && i <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : i >= 80 && i <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : i >= 96 && i <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : i >= 112 && i <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : i >= 144 && i <= 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), i === 1 || i === 2 || i >= 160 || i >= 128 && i <= 143 || ([e.description, e.additional.coin] = o(this, w, Ms).call(this, t[2]), e.no_code = 38 + i, o(this, w, Dn).call(this, e.additional.coin, e.additional.where, "coin"), ["tube", "out"].includes(e.additional.where) && this.dispatch("coin-purse:tubes", this.coins.tubes), this.dispatch("coin-purse:coin-event", this.coins)), e;
8289
8315
  }, Hs = function(t, e) {
8290
8316
  const i = parseInt(t[2], 16);
8291
- return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, i === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = o(this, w, qs).call(this), e.additional.where = "out", e.no_code = 200) : i >= 128 && i <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : i >= 144 && i <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : i >= 160 && i <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : i >= 176 && i <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), i >= 128 && i <= 191 && ([e.description, e.additional.banknote] = o(this, w, Us).call(this, t[2]), e.no_code = 74 + i), o(this, w, Dn).call(this, e.additional.banknote, e.additional.where), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
8317
+ return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, i === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = o(this, w, qs).call(this), e.additional.where = "out", e.no_code = 200) : i >= 128 && i <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : i >= 144 && i <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : i >= 160 && i <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : i >= 176 && i <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), i >= 128 && i <= 191 && ([e.description, e.additional.banknote] = o(this, w, Us).call(this, t[2]), e.no_code = 74 + i), o(this, w, Dn).call(this, e.additional.banknote, e.additional.where, "banknote"), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
8292
8318
  }, Ks = function(t, e) {
8293
8319
  const i = parseInt(t, 16);
8294
8320
  return i === 1 ? (e.name = "Coin purse enabled", e.description = "Configuration complete, enabled", e.no_code = 3) : i === 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: i === 1 }), e;
@@ -8324,7 +8350,7 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8324
8350
  }, Gs = function(t, e) {
8325
8351
  const i = parseInt(t, 16);
8326
8352
  return i === 1 ? e.name = "Banknote accepted" : i === 0 ? e.name = "Banknote rejected" : e.name = "Unknown status banknote", e.no_code = 8, this.dispatch("banknote-purse:banknote-scrow-status", { status: i === 1 }), e;
8327
- }, Js = function(t, e) {
8353
+ }, $s = function(t, e) {
8328
8354
  const [i, s, a, c, l, h] = [
8329
8355
  parseInt(t[2], 16),
8330
8356
  parseInt(t[3], 16),
@@ -8343,7 +8369,7 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8343
8369
  type: "banknotes",
8344
8370
  data: e
8345
8371
  }), e;
8346
- }, $s = function(t, e) {
8372
+ }, Js = function(t, e) {
8347
8373
  return e.name = "Coins dispensed", e.no_code = 10, e.description = "Coins dispensed by request", isNaN(this.__sale.last_change) && (this.__sale.last_change = 0), this.__money_session.retired += this.__sale.last_change, this.dispatchAsync(
8348
8374
  "session:money-dispensed",
8349
8375
  {
@@ -8373,7 +8399,7 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8373
8399
  return i === 1 ? (e.name = "Relay on", e.description = "Relay on", e.no_code = 16, s = "on") : i === 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;
8374
8400
  }, ea = function(t, e) {
8375
8401
  const i = parseInt(t[2], 16);
8376
- if (e.no_code = 20 + i, e.name = "Status unknown", e.description = "The status of card reader does not identified correctly", e.no_code = 400, i === 0)
8402
+ if (e.no_code = 20 + i, e.name = "Status unknown", e.description = "The status of card reader does not identified correctly", i === 0)
8377
8403
  e.request += ":disable", e.name = "Card reader disabled", e.description = "Card reader device was disabled successfully";
8378
8404
  else if (i === 1 || i === 2)
8379
8405
  e.request += ":dispense", e.name = "Card reader enabled", e.description = "Card reader device is now enabled";
@@ -8392,7 +8418,8 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8392
8418
  else if (i === 10) {
8393
8419
  const s = parseInt(t[8], 16);
8394
8420
  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");
8395
- }
8421
+ } else
8422
+ e.no_code = 400;
8396
8423
  return this.dispatch("card-reader:event", e), e;
8397
8424
  }, rt = function(t, e) {
8398
8425
  return this.appendToQueue(o(this, w, De).call(this, t), e);
@@ -8422,14 +8449,14 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
8422
8449
  this.decToHex(c)
8423
8450
  ], ["F1", "C5", t, e, i, s, a, c, "00", "00", "F2", "00"];
8424
8451
  }, Rn = function() {
8425
- F(this, Ht, !1), F(this, Bt, 0), F(this, Kt, 0);
8452
+ F(this, Ht, !1), F(this, Nt, 0), F(this, Kt, 0);
8426
8453
  }, /**
8427
8454
  *
8428
8455
  * @param {null|object} dispensed
8429
8456
  * @param {number} limit
8430
8457
  */
8431
8458
  Re = function({ dispensed: t = null, limit: e = 80 } = {}) {
8432
- F(this, Kt, Math.round(R(this, Bt) * 100 / e)), this.dispatch("percentage:test", { percentage: R(this, Kt), dispensed: t });
8459
+ F(this, Kt, Math.round(R(this, Nt) * 100 / e)), this.dispatch("percentage:test", { percentage: R(this, Kt), dispensed: t });
8433
8460
  }, aa = function(t) {
8434
8461
  const e = ["20", "50", "100", "200", "500"], i = this.__banknote_purse.recycler.banknote, s = "$_" + e[i], a = parseInt(e[i]), c = this.banknotes.recycler[`p${e[i]}`], l = Math.min(Math.floor(t / a), c), h = {
8435
8462
  banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
@@ -8468,17 +8495,22 @@ Re = function({ dispensed: t = null, limit: e = 80 } = {}) {
8468
8495
  }
8469
8496
  };
8470
8497
  return i(10, "p10"), i(5, "p5"), i(2, "p2"), i(1, "p1"), i(0.5, "g50", "$_50c"), e.will_dispense = Object.values(e.coins).some((s) => s > 0), e;
8471
- }, Bn = async function(t = null) {
8472
- if (!o(this, w, Bs).call(this)) throw new Error("Change not available");
8498
+ }, Nn = async function(t = null) {
8499
+ if (!o(this, w, Ns).call(this)) throw new Error("Change not available");
8473
8500
  let e = this.change, i = this.change;
8474
8501
  if (t !== null && (e = t, i = t), i <= 0) return !1;
8475
8502
  const s = o(this, w, In).call(this, i);
8476
8503
  i = s.pending;
8477
8504
  const a = o(this, w, On).call(this, i);
8478
- return i = a.pending, i > 0 && this.dispatch("change:pending", { pending: i }), i === e ? !1 : (s.will_dispense && await this.banknotePurseDispense(s.banknotes), a.will_dispense && await this.coinPurseDispense(a.coins), !0);
8505
+ return i = a.pending, i > 0 && this.dispatch("change:pending", { pending: i }), this.dispatch("change:dispense", {
8506
+ recycler: s.banknotes,
8507
+ coins: a.coins,
8508
+ pending: i,
8509
+ delivery: e - i
8510
+ }), i === e ? !1 : (s.will_dispense && await this.banknotePurseDispense(s.banknotes), a.will_dispense && await this.coinPurseDispense(a.coins), !0);
8479
8511
  };
8480
8512
  var Wt, ca, la;
8481
- class Cc extends Ft {
8513
+ class Kc extends Ft {
8482
8514
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1 } = {}) {
8483
8515
  super({ filters: t, config_port: e, no_device: i });
8484
8516
  X(this, Wt);
@@ -8552,21 +8584,21 @@ Wt = new WeakSet(), ca = function() {
8552
8584
  * This source code is licensed under the MIT license found in the
8553
8585
  * LICENSE file in the root directory of this source tree.
8554
8586
  */
8555
- const Sc = {
8587
+ const Wc = {
8556
8588
  wait: ut,
8557
8589
  getSeconds: tn,
8558
- supportWebSerial: _i
8559
- }, kc = "4.1.1";
8590
+ supportWebSerial: fi
8591
+ }, zc = "4.1.3";
8560
8592
  export {
8561
- Cc as Arduino,
8562
- Tc as Boardroid,
8593
+ Kc as Arduino,
8594
+ Hc as Boardroid,
8563
8595
  j as Devices,
8564
8596
  Ie as Emulator,
8565
- Ec as Jofemar,
8597
+ jc as Jofemar,
8566
8598
  Ft as Kernel,
8567
- vc as Locker,
8568
- Pc as PinPad,
8569
- wc as Relay,
8570
- Sc as utils,
8571
- kc as version
8599
+ Pc as Locker,
8600
+ qc as PinPad,
8601
+ vc as Relay,
8602
+ Wc as utils,
8603
+ zc as version
8572
8604
  };