szdl-utils-kit 0.2.15 → 0.2.17

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/index.js CHANGED
@@ -1,25 +1,25 @@
1
1
  var ue = Object.defineProperty;
2
2
  var me = (y, A, e) => A in y ? ue(y, A, { enumerable: !0, configurable: !0, writable: !0, value: e }) : y[A] = e;
3
- var C = (y, A, e) => (me(y, typeof A != "symbol" ? A + "" : A, e), e), Wt = (y, A, e) => {
3
+ var C = (y, A, e) => (me(y, typeof A != "symbol" ? A + "" : A, e), e), kt = (y, A, e) => {
4
4
  if (!A.has(y))
5
5
  throw TypeError("Cannot " + e);
6
6
  };
7
- var h = (y, A, e) => (Wt(y, A, "read from private field"), e ? e.call(y) : A.get(y)), N = (y, A, e) => {
7
+ var h = (y, A, e) => (kt(y, A, "read from private field"), e ? e.call(y) : A.get(y)), N = (y, A, e) => {
8
8
  if (A.has(y))
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  A instanceof WeakSet ? A.add(y) : A.set(y, e);
11
- }, g = (y, A, e, n) => (Wt(y, A, "write to private field"), n ? n.call(y, e) : A.set(y, e), e);
12
- var _ = (y, A, e) => (Wt(y, A, "access private method"), e);
11
+ }, T = (y, A, e, n) => (kt(y, A, "write to private field"), n ? n.call(y, e) : A.set(y, e), e);
12
+ var O = (y, A, e) => (kt(y, A, "access private method"), e);
13
13
  var fe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
14
14
  function Ne(y) {
15
15
  return y && y.__esModule && Object.prototype.hasOwnProperty.call(y, "default") ? y.default : y;
16
16
  }
17
- var kt = { exports: {} };
17
+ var Xt = { exports: {} };
18
18
  (function(y, A) {
19
19
  (function(e) {
20
20
  Array.prototype.indexOf || (Array.prototype.indexOf = function(t, s) {
21
- var o, a;
22
- for (o = s || 0, a = this.length; o < a; o += 1)
21
+ var o, c;
22
+ for (o = s || 0, c = this.length; o < c; o += 1)
23
23
  if (this[o] === t)
24
24
  return o;
25
25
  return -1;
@@ -28,27 +28,27 @@ var kt = { exports: {} };
28
28
  for (var o = t.toString(); o.length < s; )
29
29
  o = "0" + o;
30
30
  return o;
31
- }, c = function(t, s) {
31
+ }, a = function(t, s) {
32
32
  return s !== e ? (t.year(s.year() || s.year), t.month(s.month() || s.month), t.day(s.day() || s.day), t.hours(s.hours() || s.hours), t.minutes(s.minutes() || s.minutes), t.seconds(s.seconds() || s.seconds), t.milliseconds(s.milliseconds() || s.milliseconds), t) : e;
33
33
  }, l = function(t, s) {
34
- var o, a = "";
35
- return o = t.slice(s, s + 1), o !== "" && !isNaN(Number(o)) && (a += "%H"), o = t.charAt(s + 2), o !== "" && o === ":" && (a += o), o = t.slice(s + 3, s + 4), o !== "" && !isNaN(Number(o)) && (a += "%M"), o = t.charAt(s + 5), o !== "" && o === ":" && (a += o), o = t.slice(s + 6, s + 7), o !== "" && !isNaN(Number(o)) && (a += "%S"), a;
36
- }, O = function(t, s) {
37
- var o, a = [
34
+ var o, c = "";
35
+ return o = t.slice(s, s + 1), o !== "" && !isNaN(Number(o)) && (c += "%H"), o = t.charAt(s + 2), o !== "" && o === ":" && (c += o), o = t.slice(s + 3, s + 4), o !== "" && !isNaN(Number(o)) && (c += "%M"), o = t.charAt(s + 5), o !== "" && o === ":" && (c += o), o = t.slice(s + 6, s + 7), o !== "" && !isNaN(Number(o)) && (c += "%S"), c;
36
+ }, _ = function(t, s) {
37
+ var o, c = [
38
38
  t.slice(s, s + 1),
39
39
  t.charAt(s + 2),
40
40
  t.slice(s + 3, s + 4),
41
41
  t.charAt(s + 5),
42
42
  t.slice(s + 6, s + 9)
43
43
  ], M;
44
- return !isNaN(Number(a[0])) && !isNaN(Number(a[2])) && !isNaN(Number(a[4])) ? (a[1] === "." && a[3] === "." ? o = "%d.%m.%Y" : a[1] === "-" && a[3] === "-" ? o = "%m-%d-%Y" : a[1] === "/" && a[3] === "/" && (o = "%m/%d/%Y"), o) : (M = [
44
+ return !isNaN(Number(c[0])) && !isNaN(Number(c[2])) && !isNaN(Number(c[4])) ? (c[1] === "." && c[3] === "." ? o = "%d.%m.%Y" : c[1] === "-" && c[3] === "-" ? o = "%m-%d-%Y" : c[1] === "/" && c[3] === "/" && (o = "%m/%d/%Y"), o) : (M = [
45
45
  t.slice(s, s + 3),
46
46
  t.charAt(s + 4),
47
47
  t.slice(s + 5, s + 6),
48
48
  t.charAt(s + 7),
49
49
  t.slice(s + 8, s + 9)
50
50
  ], !isNaN(Number(M[0])) && !isNaN(Number(M[2])) && !isNaN(Number(M[4])) ? (M[1] === "-" && M[3] === "-" && (o = "%Y-%m-%d"), o) : "");
51
- }, m = n.tempus, r, d, S = n.navigator || {}, u = "en", f = {
51
+ }, m = n.tempus, r, E, S = n.navigator || {}, u = "en", f = {
52
52
  en: {
53
53
  JANUARY_SHORT: "Jan",
54
54
  FEBRUARY_SHORT: "Feb",
@@ -259,12 +259,12 @@ var kt = { exports: {} };
259
259
  f[u].FRIDAY_SHORT,
260
260
  f[u].SATURDAY_SHORT
261
261
  ];
262
- }, P, St, ht, at, le = function(t, s, o) {
263
- var a;
264
- n.XMLHttpRequest ? a = new XMLHttpRequest() : a = new ActiveXObject("Microsoft.XMLHTTP"), a.onreadystatechange = function() {
265
- a.readyState === 4 && (a.status === 200 ? s && (n.JSON === e ? alert(`Please, include json2 into your project if you want use old browsers!
266
- https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.parse(a.responseText))) : o && o(a));
267
- }, a.open("GET", t, !1), a.send();
262
+ }, P, St, at, ht, le = function(t, s, o) {
263
+ var c;
264
+ n.XMLHttpRequest ? c = new XMLHttpRequest() : c = new ActiveXObject("Microsoft.XMLHTTP"), c.onreadystatechange = function() {
265
+ c.readyState === 4 && (c.status === 200 ? s && (n.JSON === e ? alert(`Please, include json2 into your project if you want use old browsers!
266
+ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.parse(c.responseText))) : o && o(c));
267
+ }, c.open("GET", t, !1), c.send();
268
268
  }, I = {
269
269
  "%d": {
270
270
  format: function(t) {
@@ -316,7 +316,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
316
316
  "%a": {
317
317
  format: function(t) {
318
318
  var s = t.dayOfWeek();
319
- return at[s !== e ? s : r.MIN_DAY_OF_WEEK];
319
+ return ht[s !== e ? s : r.MIN_DAY_OF_WEEK];
320
320
  },
321
321
  parse: function() {
322
322
  return {};
@@ -328,7 +328,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
328
328
  "%A": {
329
329
  format: function(t) {
330
330
  var s = t.dayOfWeek();
331
- return ht[s !== e ? s : r.MIN_DAY_OF_WEEK];
331
+ return at[s !== e ? s : r.MIN_DAY_OF_WEEK];
332
332
  },
333
333
  parse: function() {
334
334
  return {};
@@ -415,11 +415,11 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
415
415
  return i(t.year() || r.MIN_YEAR, 4) + "-" + i(t.month() || r.MIN_MONTH, 2) + "-" + i(t.day() || r.MIN_DAY, 2);
416
416
  },
417
417
  parse: function(t) {
418
- var s = Number(t.slice(0, 4)), o = Number(t.slice(5, 7)), a = Number(t.slice(8, 10));
418
+ var s = Number(t.slice(0, 4)), o = Number(t.slice(5, 7)), c = Number(t.slice(8, 10));
419
419
  return {
420
420
  year: s,
421
421
  month: o,
422
- day: a
422
+ day: c
423
423
  };
424
424
  },
425
425
  minLength: 10,
@@ -431,9 +431,9 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
431
431
  return i(t.month() || r.MIN_MONTH, 2) + "/" + i(t.day() || r.MIN_DAY, 2) + "/" + i(t.year() || r.MIN_YEAR, 4);
432
432
  },
433
433
  parse: function(t) {
434
- var s = Number(t.slice(0, 2)), o = Number(t.slice(3, 5)), a = Number(t.slice(6, 10));
434
+ var s = Number(t.slice(0, 2)), o = Number(t.slice(3, 5)), c = Number(t.slice(6, 10));
435
435
  return {
436
- year: a,
436
+ year: c,
437
437
  month: s,
438
438
  day: o
439
439
  };
@@ -445,8 +445,8 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
445
445
  }, Mt = {
446
446
  useMilliseconds: !1,
447
447
  monthFromZero: !1
448
- }, T;
449
- T = function(t, s, o) {
448
+ }, g;
449
+ g = function(t, s, o) {
450
450
  return this._d = /* @__PURE__ */ new Date(), this._i = {
451
451
  year: !1,
452
452
  month: !1,
@@ -456,55 +456,55 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
456
456
  seconds: !1,
457
457
  milliseconds: !1
458
458
  }, t !== e && this.set(t, s, o), this;
459
- }, T.fn = T.prototype, T.fn.dayCount = function() {
459
+ }, g.fn = g.prototype, g.fn.dayCount = function() {
460
460
  var t = this.month(), s = r.MAX_DAY_IN_MONTHS[t - (r.options("monthFromZero") ? 0 : 1)];
461
461
  return this.leapYear() && t === (r.options("monthFromZero") ? 1 : 2) && (s += 1), s;
462
- }, T.fn.year = function(t) {
462
+ }, g.fn.year = function(t) {
463
463
  if (arguments.length !== 0)
464
464
  (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= r.MIN_YEAR && Number(t) <= r.MAX_YEAR ? (this._d.setFullYear(Number(t)), this._i.year = !1) : this._i.year = Number(t) : (this._d.setFullYear(r.MIN_YEAR), this._i.year = !1);
465
465
  else
466
466
  return this._i.year === !1 ? this._d.getFullYear() : this._i.year;
467
467
  return this;
468
- }, T.fn.month = function(t) {
468
+ }, g.fn.month = function(t) {
469
469
  if (arguments.length !== 0)
470
470
  (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= r.MIN_MONTH && Number(t) <= r.MAX_MONTH ? (this._d.setMonth(r.options("monthFromZero") ? Number(t) : Number(t) - 1), this._i.month = !1) : this._i.month = Number(t) : (this._d.setMonth(r.options("monthFromZero") ? r.MIN_MONTH : r.MIN_MONTH - 1), this._i.month = !1);
471
471
  else
472
472
  return this._i.month === !1 ? r.options("monthFromZero") ? this._d.getMonth() : this._d.getMonth() + 1 : this._i.month;
473
473
  return this;
474
- }, T.fn.day = function(t) {
474
+ }, g.fn.day = function(t) {
475
475
  if (arguments.length !== 0)
476
476
  (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= r.MIN_DAY && Number(t) <= this.dayCount() ? (this._d.setDate(Number(t)), this._i.day = !1) : this._i.day = Number(t) : (this._d.setDate(r.MIN_DAY), this._i.day = !1);
477
477
  else
478
478
  return this._i.day === !1 ? this._d.getDate() : this._i.day;
479
479
  return this;
480
- }, T.fn.hours = function(t) {
480
+ }, g.fn.hours = function(t) {
481
481
  if (arguments.length !== 0)
482
482
  (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= r.MIN_HOURS && Number(t) <= r.MAX_HOURS ? (this._d.setHours(Number(t)), this._i.hours = !1) : this._i.hours = Number(t) : (this._d.setHours(r.MIN_HOURS), this._i.hours = !1);
483
483
  else
484
484
  return this._i.hours === !1 ? this._d.getHours() : this._i.hours;
485
485
  return this;
486
- }, T.fn.minutes = function(t) {
486
+ }, g.fn.minutes = function(t) {
487
487
  if (arguments.length !== 0)
488
488
  (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= r.MIN_MINUTES && Number(t) <= r.MAX_MINUTES ? (this._d.setMinutes(Number(t)), this._i.minutes = !1) : this._i.minutes = Number(t) : (this._d.setMinutes(r.MIN_MINUTES), this._i.minutes = !1);
489
489
  else
490
490
  return this._i.minutes === !1 ? this._d.getMinutes() : this._i.minutes;
491
491
  return this;
492
- }, T.fn.seconds = function(t) {
492
+ }, g.fn.seconds = function(t) {
493
493
  if (arguments.length !== 0)
494
494
  (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= r.MIN_SECONDS && Number(t) <= r.MAX_SECONDS ? (this._d.setSeconds(Number(t)), this._i.seconds = !1) : this._i.seconds = Number(t) : (this._d.setSeconds(r.MIN_SECONDS), this._i.seconds = !1);
495
495
  else
496
496
  return this._i.seconds === !1 ? this._d.getSeconds() : this._i.seconds;
497
497
  return this;
498
- }, T.fn.milliseconds = function(t) {
498
+ }, g.fn.milliseconds = function(t) {
499
499
  if (arguments.length !== 0)
500
500
  (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= r.MIN_MILLISECONDS && Number(t) <= r.MAX_MILLISECONDS ? (this._d.setMilliseconds(Number(t)), this._i.milliseconds = !1) : this._i.milliseconds = Number(t) : (this._d.setMilliseconds(r.MIN_MILLISECONDS), this._i.milliseconds = !1);
501
501
  else
502
502
  return this._i.milliseconds === !1 ? this._d.getMilliseconds() : this._i.milliseconds;
503
503
  return this;
504
- }, T.fn.week = function() {
504
+ }, g.fn.week = function() {
505
505
  var t = new Date(this.year(), 0, 1), s = r(this.utc()).hours(0).minutes(0).seconds(0).milliseconds(0).utc() * 1e3;
506
506
  return Math.ceil(((s - t.getTime()) / 864e5 + t.getDay() + 1) / 7);
507
- }, T.fn.set = function(t, s, o) {
507
+ }, g.fn.set = function(t, s, o) {
508
508
  if (this._i = {
509
509
  year: !1,
510
510
  month: !1,
@@ -520,9 +520,9 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
520
520
  if (typeof t == "number")
521
521
  return this._d = new Date(t * (r.options("useMilliseconds") ? 1 : 1e3)), this;
522
522
  if (typeof t == "object" && (t instanceof Array ? (this.day(r.MIN_DAY), this.year(t[0]), this.month(t[1]), this.day(t[2]), this.hours(t[3]), this.minutes(t[4]), this.seconds(t[5]), this.milliseconds(t[6])) : (this.day(r.MIN_DAY), this.year(t.year), this.month(t.month), this.day(t.day), this.hours(t.hours), this.minutes(t.minutes), this.seconds(t.seconds), this.milliseconds(t.milliseconds))), typeof t == "string") {
523
- var a, M = [], E, R, X = [], H = 0, D = 0, L, w, p = {}, b;
523
+ var c, M = [], d, R, X = [], H = 0, D = 0, L, w, p = {}, b;
524
524
  if (t === e)
525
- return E = c(this, o), E === e && (this._i = {
525
+ return d = a(this, o), d === e && (this._i = {
526
526
  year: -1,
527
527
  month: -1,
528
528
  day: -1,
@@ -530,7 +530,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
530
530
  minutes: -1,
531
531
  seconds: -1,
532
532
  milliseconds: -1
533
- }), E;
533
+ }), d;
534
534
  for (s === e && (s = r.detectFormat(t)); H < s.length; ) {
535
535
  if (s.charAt(H) === "%") {
536
536
  if (R = s.charAt(H) + s.charAt(H + 1), I[R] !== e) {
@@ -549,7 +549,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
549
549
  break;
550
550
  }
551
551
  if (L < I[R].minLength)
552
- return E = c(this, o), E === e && (this._i = {
552
+ return d = a(this, o), d === e && (this._i = {
553
553
  year: -1,
554
554
  month: -1,
555
555
  day: -1,
@@ -557,11 +557,11 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
557
557
  minutes: -1,
558
558
  seconds: -1,
559
559
  milliseconds: -1
560
- }), E;
560
+ }), d;
561
561
  M.push(R), X.push(w), L -= 1, D += L, H += 1;
562
562
  }
563
563
  } else if (t.charAt(D) !== s.charAt(H))
564
- return E = c(this, o), E === e && (this._i = {
564
+ return d = a(this, o), d === e && (this._i = {
565
565
  year: -1,
566
566
  month: -1,
567
567
  day: -1,
@@ -569,11 +569,11 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
569
569
  minutes: -1,
570
570
  seconds: -1,
571
571
  milliseconds: -1
572
- }), E;
572
+ }), d;
573
573
  H += 1, D += 1;
574
574
  }
575
- for (a in M)
576
- M.hasOwnProperty(a) && I.hasOwnProperty(M[a]) && (b = I[M[a]].parse(X[a]), p = {
575
+ for (c in M)
576
+ M.hasOwnProperty(c) && I.hasOwnProperty(M[c]) && (b = I[M[c]].parse(X[c]), p = {
577
577
  year: b.year !== e ? b.year : p.year,
578
578
  month: b.month !== e ? b.month : p.month,
579
579
  day: b.day !== e ? b.day : p.day,
@@ -584,18 +584,18 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
584
584
  this.day(r.MIN_DAY), this.year(p.year), this.month(p.month), this.day(p.day), this.hours(p.hours), this.minutes(p.minutes), this.seconds(p.seconds), this.milliseconds(p.milliseconds);
585
585
  }
586
586
  return this;
587
- }, T.fn.leapYear = function() {
587
+ }, g.fn.leapYear = function() {
588
588
  var t = this.year();
589
589
  return t % 4 === 0 ? t % 100 === 0 ? t % 400 === 0 : !0 : !1;
590
- }, T.fn.timestamp = function(t) {
590
+ }, g.fn.timestamp = function(t) {
591
591
  return arguments.length !== 0 ? (this._d = new Date(Number(t) * (r.options("useMilliseconds") ? 1 : 1e3) + this._d.getTimezoneOffset() * 6e4), this) : r.options("useMilliseconds") ? this._d.getTime() - this._d.getTimezoneOffset() * 6e4 : Math.floor(this._d.getTime() / 1e3) - this._d.getTimezoneOffset() * 60;
592
- }, T.fn.utc = function(t) {
592
+ }, g.fn.utc = function(t) {
593
593
  return arguments.length !== 0 ? (this._d = new Date(Number(t) * (r.options("useMilliseconds") ? 1 : 1e3)), this) : r.options("useMilliseconds") ? this._d.getTime() : Math.floor(this._d.getTime() / 1e3);
594
- }, T.fn.dayOfWeek = function(t) {
594
+ }, g.fn.dayOfWeek = function(t) {
595
595
  if (t === "long")
596
- return ht[this._d.getDay()];
597
- if (t === "short")
598
596
  return at[this._d.getDay()];
597
+ if (t === "short")
598
+ return ht[this._d.getDay()];
599
599
  if (t === e)
600
600
  return this._d.getDay();
601
601
  if (t === 0 || t === "Sunday")
@@ -612,7 +612,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
612
612
  return this.calc({ day: (this.dayOfWeek() === 0 ? -2 : 5) - this.dayOfWeek() });
613
613
  if (t === 6 || t === "Saturday")
614
614
  return this.calc({ day: (this.dayOfWeek() === 0 ? -1 : 6) - this.dayOfWeek() });
615
- }, T.fn.timezone = function(t) {
615
+ }, g.fn.timezone = function(t) {
616
616
  switch (t) {
617
617
  case "hours":
618
618
  return Math.floor(this._d.getTimezoneOffset() / 60);
@@ -621,7 +621,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
621
621
  default:
622
622
  return this._d.getTimezoneOffset() * 60;
623
623
  }
624
- }, T.fn.get = function(t) {
624
+ }, g.fn.get = function(t) {
625
625
  switch (t) {
626
626
  case "Date":
627
627
  return new Date(
@@ -670,36 +670,36 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
670
670
  timestamp: this.timestamp()
671
671
  };
672
672
  }
673
- }, T.fn.format = function(t) {
674
- for (var s = 0, o = "", a; s < t.length; )
675
- t.charAt(s) === "%" ? (a = t.charAt(s) + t.charAt(s + 1), I[a] !== e ? (o += I[a].format(this), s += 1) : o += "%") : o += t.charAt(s), s += 1;
673
+ }, g.fn.format = function(t) {
674
+ for (var s = 0, o = "", c; s < t.length; )
675
+ t.charAt(s) === "%" ? (c = t.charAt(s) + t.charAt(s + 1), I[c] !== e ? (o += I[c].format(this), s += 1) : o += "%") : o += t.charAt(s), s += 1;
676
676
  return o;
677
- }, T.fn.valid = function() {
677
+ }, g.fn.valid = function() {
678
678
  return this._i.year === !1 && this._i.month === !1 && this._i.day === !1 && this._i.hours === !1 && this._i.minutes === !1 && this._i.seconds === !1 && this._i.milliseconds === !1;
679
- }, T.fn.errors = function() {
679
+ }, g.fn.errors = function() {
680
680
  return this._i;
681
- }, T.fn.between = function(t, s) {
682
- var o = this.timestamp(), a = t.timestamp();
681
+ }, g.fn.between = function(t, s) {
682
+ var o = this.timestamp(), c = t.timestamp();
683
683
  switch (s) {
684
684
  case "year":
685
- return Math.floor((a - o) / 31556952);
685
+ return Math.floor((c - o) / 31556952);
686
686
  case "month":
687
- return Math.floor((a - o) / 2629746);
687
+ return Math.floor((c - o) / 2629746);
688
688
  case "day":
689
- return Math.floor((a - o) / 86400);
689
+ return Math.floor((c - o) / 86400);
690
690
  case "hours":
691
- return Math.floor((a - o) / 3600);
691
+ return Math.floor((c - o) / 3600);
692
692
  case "minutes":
693
- return Math.floor((a - o) / 60);
693
+ return Math.floor((c - o) / 60);
694
694
  case "seconds":
695
- return a - o;
695
+ return c - o;
696
696
  default:
697
697
  return e;
698
698
  }
699
- }, T.fn.calc = function(t) {
699
+ }, g.fn.calc = function(t) {
700
700
  return t.year !== e && this._d.setFullYear(this._d.getFullYear() + t.year), t.month !== e && this._d.setMonth(this._d.getMonth() + t.month), t.day !== e && this._d.setDate(this._d.getDate() + t.day), t.hours !== e && this._d.setHours(this._d.getHours() + t.hours), t.minutes !== e && this._d.setMinutes(this._d.getMinutes() + t.minutes), t.seconds !== e && this._d.setSeconds(this._d.getSeconds() + t.seconds), t.milliseconds !== e && this._d.setMilliseconds(this._d.getMilliseconds() + t.milliseconds), this;
701
701
  }, r = function(t, s, o) {
702
- return new T(t, s, o);
702
+ return new g(t, s, o);
703
703
  }, r.MIN_YEAR = 1e3, r.MAX_YEAR = 3e3, r.MIN_MONTH = 1, r.MAX_MONTH = 12, r.MIN_DAY = 1, r.MAX_DAY_IN_MONTHS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], r.MIN_DAY_OF_WEEK = 0, r.MAX_DAY_OF_WEEK = 6, r.MIN_HOURS = 0, r.MAX_HOURS = 23, r.MIN_MINUTES = 0, r.MAX_MINUTES = 59, r.MIN_SECONDS = 0, r.MAX_SECONDS = 59, r.MIN_MILLISECONDS = 0, r.MAX_MILLISECONDS = 999, r.VERSION = "0.2.18", r.options = function(t, s) {
704
704
  if (t === e)
705
705
  return Mt;
@@ -712,22 +712,22 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
712
712
  }, r.noConflict = function() {
713
713
  return n.tempus = m, r;
714
714
  }, r.generate = function(t) {
715
- var s, o, a, M, E, R, X, H;
716
- if (typeof t.dateFrom != "number" && (t.dateFrom instanceof T ? s = t.dateFrom.utc() : s = r(t.dateFrom, t.formatFrom).utc()), typeof t.dateTo != "number" && (t.dateTo instanceof T ? o = t.dateTo.utc() : o = r(t.dateTo, t.formatTo !== e ? t.formatTo : t.formatFrom).utc()), typeof t.period == "number" ? E = {
715
+ var s, o, c, M, d, R, X, H;
716
+ if (typeof t.dateFrom != "number" && (t.dateFrom instanceof g ? s = t.dateFrom.utc() : s = r(t.dateFrom, t.formatFrom).utc()), typeof t.dateTo != "number" && (t.dateTo instanceof g ? o = t.dateTo.utc() : o = r(t.dateTo, t.formatTo !== e ? t.formatTo : t.formatFrom).utc()), typeof t.period == "number" ? d = {
717
717
  year: 0,
718
718
  month: 0,
719
719
  day: 0,
720
720
  hours: 0,
721
721
  minutes: 0,
722
722
  seconds: t.period
723
- } : typeof t.period == "string" ? E = {
723
+ } : typeof t.period == "string" ? d = {
724
724
  year: t.period === "year" ? 1 : 0,
725
725
  month: t.period === "month" ? 1 : 0,
726
726
  day: t.period === "day" ? 1 : 0,
727
727
  hours: t.period === "hours" ? 1 : 0,
728
728
  minutes: t.period === "minutes" ? 1 : 0,
729
729
  seconds: t.period === "seconds" ? 1 : 0
730
- } : typeof t.period == "object" && (E = {
730
+ } : typeof t.period == "object" && (d = {
731
731
  year: t.period.year !== e ? t.period.year : 0,
732
732
  month: t.period.month !== e ? t.period.month : 0,
733
733
  day: t.period.day !== e ? t.period.day : 0,
@@ -738,27 +738,27 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
738
738
  return t.asObject === !0 ? t.format !== e ? w[r(p).format(t.format)] = {} : w[r(p).format("%F %H:%M:%S")] = {} : t.format !== e ? w.push(b ? null : r(p).format(t.format)) : w.push(b ? null : r(p)), w;
739
739
  }, t.groupBy !== e && t.fillNulls) {
740
740
  var D = {
741
- year: E.year ? -E.year : e,
742
- month: E.month ? -E.month : e,
743
- day: E.day ? -E.day : e,
744
- hours: E.hours ? -E.hours : e,
745
- minutes: E.minutes ? -E.minutes : e,
746
- seconds: E.seconds ? -E.seconds : e,
747
- milliseconds: E.milliseconds ? -E.milliseconds : e
741
+ year: d.year ? -d.year : e,
742
+ month: d.month ? -d.month : e,
743
+ day: d.day ? -d.day : e,
744
+ hours: d.hours ? -d.hours : e,
745
+ minutes: d.minutes ? -d.minutes : e,
746
+ seconds: d.seconds ? -d.seconds : e,
747
+ milliseconds: d.milliseconds ? -d.milliseconds : e
748
748
  };
749
- for (a = r(s).calc(D).utc(); r(a).get()[t.groupBy] === X; )
750
- H(R[R.length - 1], a, !0), a = r(a).calc(D).utc();
749
+ for (c = r(s).calc(D).utc(); r(c).get()[t.groupBy] === X; )
750
+ H(R[R.length - 1], c, !0), c = r(c).calc(D).utc();
751
751
  if (t.groupBy === "week") {
752
752
  var L = r(s).dayOfWeek();
753
- for (a = r(s).dayOfWeek(0).utc(); R[0].length < L && a < s; )
754
- H(R[R.length - 1], a, !0), a = r(a).calc(E).utc();
753
+ for (c = r(s).dayOfWeek(0).utc(); R[0].length < L && c < s; )
754
+ H(R[R.length - 1], c, !0), c = r(c).calc(d).utc();
755
755
  }
756
756
  }
757
757
  for (; s <= o; )
758
- t.groupBy === e ? H(R, s) : r(s).get()[t.groupBy] === X ? H(R[R.length - 1], s) : (R.push([]), H(R[R.length - 1], s), X = r(s).get()[t.groupBy]), s = r(s).calc(E).utc();
758
+ t.groupBy === e ? H(R, s) : r(s).get()[t.groupBy] === X ? H(R[R.length - 1], s) : (R.push([]), H(R[R.length - 1], s), X = r(s).get()[t.groupBy]), s = r(s).calc(d).utc();
759
759
  if (t.groupBy !== e && t.fillNulls)
760
- for (M = r(o).calc(E).utc(); r(M).get()[t.groupBy] === X; )
761
- H(R[R.length - 1], M, !0), M = r(M).calc(E).utc();
760
+ for (M = r(o).calc(d).utc(); r(M).get()[t.groupBy] === X; )
761
+ H(R[R.length - 1], M, !0), M = r(M).calc(d).utc();
762
762
  return R;
763
763
  }, r.monthNames = function(t) {
764
764
  switch (t) {
@@ -770,48 +770,48 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
770
770
  }, r.dayNames = function(t) {
771
771
  switch (t) {
772
772
  case "long":
773
- return ht;
774
- default:
775
773
  return at;
774
+ default:
775
+ return ht;
776
776
  }
777
777
  }, r.lang = function(t) {
778
778
  if (t !== e)
779
- u = t, f[u] === e && (u = "en"), P = G(), St = ot(), ht = Z(), at = J();
779
+ u = t, f[u] === e && (u = "en"), P = G(), St = ot(), at = Z(), ht = J();
780
780
  else
781
781
  return u;
782
782
  return e;
783
783
  }, r.availableLangs = function() {
784
784
  return Object.keys(f);
785
- }, r.registerFormat = function(t, s, o, a, M, E) {
785
+ }, r.registerFormat = function(t, s, o, c, M, d) {
786
786
  I[t] = {
787
787
  format: s,
788
788
  parse: o,
789
- minLength: a,
789
+ minLength: c,
790
790
  maxLength: M,
791
- type: E
791
+ type: d
792
792
  };
793
793
  }, r.unregisterFormat = function(t) {
794
794
  delete I[t];
795
795
  }, r.detectFormat = function(t) {
796
- var s, o, a;
797
- return s = O(t, 0), s !== "" && (a = 10), o = t.charAt(a), (o === "T" || o === " ") && (s += o, a += 1), s += l(t, a), s;
798
- }, d = {
799
- TempusDate: T
796
+ var s, o, c;
797
+ return s = _(t, 0), s !== "" && (c = 10), o = t.charAt(c), (o === "T" || o === " ") && (s += o, c += 1), s += l(t, c), s;
798
+ }, E = {
799
+ TempusDate: g
800
800
  }, r.classes = function(t, s) {
801
801
  if (s === e)
802
- return d[t];
803
- d[t] = s;
802
+ return E[t];
803
+ E[t] = s;
804
804
  }, r.loadTranslations = function(t) {
805
805
  typeof t == "object" ? f = t : typeof t == "string" && le(t, function(s) {
806
806
  f = s;
807
807
  }, function(s) {
808
808
  });
809
- }, u = (S.language || S.systemLanguage || S.userLanguage || "en").substr(0, 2).toLowerCase(), f[u] === e && (u = "en"), P = G(), St = ot(), ht = Z(), at = J(), y.exports && (A = y.exports = r), A.tempus = r;
809
+ }, u = (S.language || S.systemLanguage || S.userLanguage || "en").substr(0, 2).toLowerCase(), f[u] === e && (u = "en"), P = G(), St = ot(), at = Z(), ht = J(), y.exports && (A = y.exports = r), A.tempus = r;
810
810
  }).call(fe);
811
- })(kt, kt.exports);
812
- var _e = kt.exports;
813
- const Xt = /* @__PURE__ */ Ne(_e);
814
- var V, lt, z, Y, k, K, q, B, j, Ht, v, F, $, tt, rt, Lt, ut, xt, mt, jt, ft, Qt, Nt, Zt, _t, Vt, Dt, ee, Yt, Ae, Ot, zt, yt, Kt, Et, qt, it, pt, dt, vt, Bt, se, et, ct, nt, bt, Tt, $t;
811
+ })(Xt, Xt.exports);
812
+ var _e = Xt.exports;
813
+ const pt = /* @__PURE__ */ Ne(_e);
814
+ var V, lt, z, Y, k, K, q, B, j, Yt, v, F, $, tt, rt, bt, ut, xt, mt, jt, ft, Qt, Nt, Zt, _t, Vt, Bt, ee, It, Ae, Ot, zt, yt, Kt, dt, qt, it, Ht, Et, vt, Ut, se, et, ct, nt, Dt, gt, $t;
815
815
  class x {
816
816
  constructor(A, e = {}) {
817
817
  N(this, rt);
@@ -820,17 +820,17 @@ class x {
820
820
  N(this, ft);
821
821
  N(this, Nt);
822
822
  N(this, _t);
823
- N(this, Dt);
824
- N(this, Yt);
823
+ N(this, Bt);
824
+ N(this, It);
825
825
  N(this, Ot);
826
826
  N(this, yt);
827
- N(this, Et);
828
- N(this, it);
829
827
  N(this, dt);
830
- N(this, Bt);
828
+ N(this, it);
829
+ N(this, Et);
830
+ N(this, Ut);
831
831
  N(this, et);
832
832
  N(this, nt);
833
- N(this, Tt);
833
+ N(this, gt);
834
834
  N(this, V, null);
835
835
  N(this, lt, null);
836
836
  N(this, z, []);
@@ -840,163 +840,163 @@ class x {
840
840
  N(this, q, null);
841
841
  N(this, B, null);
842
842
  N(this, j, null);
843
- N(this, Ht, 100);
843
+ N(this, Yt, 100);
844
844
  N(this, v, "no");
845
845
  N(this, F, !1);
846
846
  N(this, $, !1);
847
847
  N(this, tt, !1);
848
848
  C(this, "errors", {});
849
849
  C(this, "answerData", {});
850
- g(this, V, A), g(this, lt, e);
850
+ T(this, V, A), T(this, lt, e);
851
851
  }
852
852
  get serial() {
853
853
  return h(this, F);
854
854
  }
855
855
  setSerial() {
856
- g(this, F, !0), g(this, $, !0), g(this, tt, !1);
856
+ T(this, F, !0), T(this, $, !0), T(this, tt, !1);
857
857
  }
858
858
  setParallel() {
859
- g(this, F, !1), g(this, $, !1), g(this, tt, !0);
859
+ T(this, F, !1), T(this, $, !1), T(this, tt, !0);
860
860
  }
861
861
  stop() {
862
- g(this, K, !1);
862
+ T(this, K, !1);
863
863
  }
864
864
  async batch(A, e) {
865
- h(this, j) && _(this, ut, xt).call(this), e && g(this, q, e), h(this, $) === !1 && g(this, F, !1), Object.keys(A).length > 500 && g(this, F, !0), g(this, K, !0), g(this, z, []), g(this, Y, {}), this.errors = {}, this.answerData = {};
866
- const n = _(this, ft, Qt).call(this, A);
865
+ h(this, j) && O(this, ut, xt).call(this), e && T(this, q, e), h(this, $) === !1 && T(this, F, !1), Object.keys(A).length > 500 && T(this, F, !0), T(this, K, !0), T(this, z, []), T(this, Y, {}), this.errors = {}, this.answerData = {};
866
+ const n = O(this, ft, Qt).call(this, A);
867
867
  if (Object.keys(A).length < 500) {
868
- const i = n.map((c, l) => _(this, Nt, Zt).call(this, c, n[l]));
869
- return Promise.allSettled(i).then((c) => {
868
+ const i = n.map((a, l) => O(this, Nt, Zt).call(this, a, n[l]));
869
+ return Promise.allSettled(i).then((a) => {
870
870
  let l = {};
871
- for (let O of c)
872
- O.status === "fulfilled" && (l = { ...l, ...O.value });
871
+ for (let _ of a)
872
+ _.status === "fulfilled" && (l = { ...l, ..._.value });
873
873
  return l;
874
874
  });
875
875
  } else {
876
- let i = {}, c = 0, l = 1, O = Object.keys(A).length || 1, m = (r) => {
877
- c += Object.keys(r).length, l = Math.round(c / O * 100);
876
+ let i = {}, a = 0, l = 1, _ = Object.keys(A).length || 1, m = (r) => {
877
+ a += Object.keys(r).length, l = Math.round(a / _ * 100);
878
878
  };
879
- for (let [r, d] of Object.entries(n)) {
880
- let S = await _(this, Nt, Zt).call(this, d, n[r], !0);
881
- m(d), e && e({ percent: l }), i = { ...i, ...S };
879
+ for (let [r, E] of Object.entries(n)) {
880
+ let S = await O(this, Nt, Zt).call(this, E, n[r], !0);
881
+ m(E), e && e({ percent: l }), i = { ...i, ...S };
882
882
  }
883
883
  return i;
884
884
  }
885
885
  }
886
886
  async batchTotalCount(A, e) {
887
- g(this, Y, {}), this.errors = {};
888
- let n = 1, i = 0, c = Object.keys(A).length || 1, l = (m) => {
889
- i += Object.keys(m).length, n = Math.round(i / c * 100);
887
+ T(this, Y, {}), this.errors = {};
888
+ let n = 1, i = 0, a = Object.keys(A).length || 1, l = (m) => {
889
+ i += Object.keys(m).length, n = Math.round(i / a * 100);
890
890
  };
891
891
  e && e({ percent: n });
892
- const O = _(this, ft, Qt).call(this, A);
892
+ const _ = O(this, ft, Qt).call(this, A);
893
893
  if (h(this, tt)) {
894
- const m = O.map((r) => _(this, _t, Vt).call(this, r).then((d) => (l(r), e && e({ percent: n }), d)));
894
+ const m = _.map((r) => O(this, _t, Vt).call(this, r).then((E) => (l(r), e && e({ percent: n }), E)));
895
895
  return Promise.allSettled(m).then((r) => {
896
- let d = {};
896
+ let E = {};
897
897
  for (let S of r)
898
- S.status === "fulfilled" && (d = { ...d, ...S.value });
899
- return d;
898
+ S.status === "fulfilled" && (E = { ...E, ...S.value });
899
+ return E;
900
900
  });
901
901
  } else {
902
902
  let m = {};
903
- for (let r of O) {
904
- let d = await _(this, _t, Vt).call(this, r);
905
- l(r), e && e({ percent: n }), m = { ...m, ...d };
903
+ for (let r of _) {
904
+ let E = await O(this, _t, Vt).call(this, r);
905
+ l(r), e && e({ percent: n }), m = { ...m, ...E };
906
906
  }
907
907
  return m;
908
908
  }
909
909
  }
910
910
  }
911
- V = new WeakMap(), lt = new WeakMap(), z = new WeakMap(), Y = new WeakMap(), k = new WeakMap(), K = new WeakMap(), q = new WeakMap(), B = new WeakMap(), j = new WeakMap(), Ht = new WeakMap(), v = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), rt = new WeakSet(), Lt = function() {
911
+ V = new WeakMap(), lt = new WeakMap(), z = new WeakMap(), Y = new WeakMap(), k = new WeakMap(), K = new WeakMap(), q = new WeakMap(), B = new WeakMap(), j = new WeakMap(), Yt = new WeakMap(), v = new WeakMap(), F = new WeakMap(), $ = new WeakMap(), tt = new WeakMap(), rt = new WeakSet(), bt = function() {
912
912
  let A = 0;
913
913
  if (!h(this, B))
914
914
  return Math.round(A);
915
915
  let e = 0, n = 0;
916
916
  return Object.values(h(this, B)).forEach((i) => {
917
- const { total: c, count: l } = i;
918
- e += c ?? 0, n += l ?? 0;
917
+ const { total: a, count: l } = i;
918
+ e += a ?? 0, n += l ?? 0;
919
919
  }), e ? A = n / e * 100 : A = 100, { percent: Math.round(A), allCount: n, allTotal: e };
920
920
  }, ut = new WeakSet(), xt = function() {
921
- clearInterval(h(this, j)), g(this, j, ""), g(this, B, ""), g(this, q, ""), g(this, v, "no");
921
+ clearInterval(h(this, j)), T(this, j, ""), T(this, B, ""), T(this, q, ""), T(this, v, "no");
922
922
  }, mt = new WeakSet(), jt = function({ key: A, value: e }) {
923
- const n = _(this, et, ct).call(this, e.data()), i = Array.isArray(n) ? n.length : 0, c = _(this, nt, bt).call(this, e.total(), i);
923
+ const n = O(this, et, ct).call(this, e.data()), i = Array.isArray(n) ? n.length : 0, a = O(this, nt, Dt).call(this, e.total(), i);
924
924
  let l = 1;
925
- n && (l = i), h(this, q) && (h(this, B) || g(this, B, {}), h(this, B)[A] && h(this, B)[A].count && (l += h(this, B)[A].count), h(this, B)[A] = { total: c, count: l }, h(this, j) || g(this, j, setInterval(() => {
926
- const { percent: O, allCount: m, allTotal: r } = h(this, rt, Lt);
927
- (h(this, v) === "no" || h(this, v) < h(this, rt, Lt).percent) && (h(this, q).call(this, {
925
+ n && (l = i), h(this, q) && (h(this, B) || T(this, B, {}), h(this, B)[A] && h(this, B)[A].count && (l += h(this, B)[A].count), h(this, B)[A] = { total: a, count: l }, h(this, j) || T(this, j, setInterval(() => {
926
+ const { percent: _, allCount: m, allTotal: r } = h(this, rt, bt);
927
+ (h(this, v) === "no" || h(this, v) < h(this, rt, bt).percent) && (h(this, q).call(this, {
928
928
  data: h(this, B),
929
- percent: O,
929
+ percent: _,
930
930
  allCount: m,
931
931
  allTotal: r
932
- }), g(this, v, h(this, rt, Lt).percent)), O === 100 && _(this, ut, xt).call(this);
933
- }, h(this, Ht))));
932
+ }), T(this, v, h(this, rt, bt).percent)), _ === 100 && O(this, ut, xt).call(this);
933
+ }, h(this, Yt))));
934
934
  }, ft = new WeakSet(), Qt = function(A) {
935
935
  const e = [], n = Object.entries(A);
936
936
  for (let i = 0; i < n.length; i += h(this, k)) {
937
- const c = n.slice(i, i + h(this, k));
938
- e.push(Object.fromEntries(c));
937
+ const a = n.slice(i, i + h(this, k));
938
+ e.push(Object.fromEntries(a));
939
939
  }
940
940
  return e;
941
941
  }, Nt = new WeakSet(), Zt = function(A, e, n) {
942
942
  return new Promise((i) => {
943
- const c = _(this, dt, vt).call(this, e), l = [];
944
- let O = 0, m = 0;
943
+ const a = O(this, Et, vt).call(this, e), l = [];
944
+ let _ = 0, m = 0;
945
945
  h(this, V).call(this, A, (r) => {
946
- Object.entries(r).forEach(([d, S]) => {
946
+ Object.entries(r).forEach(([E, S]) => {
947
947
  let u = {};
948
948
  const f = S.error();
949
949
  if (f) {
950
950
  let { query: { method: J }, answer: P } = S;
951
- this.errors[d] = { error: f, method: J }, O += 1;
951
+ this.errors[E] = { error: f, method: J }, _ += 1;
952
952
  }
953
953
  if (S != null && S.answer && Object.keys(S.answer).length) {
954
954
  for (let [J, P] of Object.entries(S.answer))
955
955
  J != "result" && P && (u[J] = P);
956
- Object.keys(u).length && (this.answerData[d] = u);
956
+ Object.keys(u).length && (this.answerData[E] = u);
957
957
  }
958
- const G = _(this, et, ct).call(this, S.data()), ot = Array.isArray(G) ? G.length : 0, Z = _(this, nt, bt).call(this, S.total(), ot);
959
- if (Array.isArray(G) ? h(this, Y)[d] = G : typeof G == "object" && G !== null && Object.keys(G).length === 0 ? h(this, Y)[d] = [] : h(this, Y)[d] = G, m += Z, n || _(this, mt, jt).call(this, { key: d, value: S }), Z > h(this, k) && Z > ot) {
958
+ const G = O(this, et, ct).call(this, S.data()), ot = Array.isArray(G) ? G.length : 0, Z = O(this, nt, Dt).call(this, S.total(), ot);
959
+ if (Array.isArray(G) ? h(this, Y)[E] = G : typeof G == "object" && G !== null && Object.keys(G).length === 0 ? h(this, Y)[E] = [] : h(this, Y)[E] = G, m += Z, n || O(this, mt, jt).call(this, { key: E, value: S }), Z > h(this, k) && Z > ot) {
960
960
  const J = Math.ceil(Z / h(this, k)) - 1, P = Array.from({ length: J });
961
- l.push([d, c[d], P]);
961
+ l.push([E, a[E], P]);
962
962
  }
963
- }), m > 5e3 && h(this, $) === !1 && h(this, tt) === !1 && g(this, F, !0), O > 0 && _(this, Tt, $t).call(this), l.length ? (_(this, Dt, ee).call(this, l), _(this, Yt, Ae).call(this).then(() => i(_(this, it, pt).call(this)))) : i(_(this, it, pt).call(this));
963
+ }), m > 5e3 && h(this, $) === !1 && h(this, tt) === !1 && T(this, F, !0), _ > 0 && O(this, gt, $t).call(this), l.length ? (O(this, Bt, ee).call(this, l), O(this, It, Ae).call(this).then(() => i(O(this, it, Ht).call(this)))) : i(O(this, it, Ht).call(this));
964
964
  });
965
965
  });
966
966
  }, _t = new WeakSet(), Vt = function(A) {
967
967
  return new Promise((e) => {
968
- const n = _(this, dt, vt).call(this, A);
968
+ const n = O(this, Et, vt).call(this, A);
969
969
  let i = 0;
970
- h(this, V).call(this, n, (c) => {
971
- Object.entries(c).forEach(([l, O]) => {
972
- const m = O.error();
970
+ h(this, V).call(this, n, (a) => {
971
+ Object.entries(a).forEach(([l, _]) => {
972
+ const m = _.error();
973
973
  m && (this.errors[l] = m, i += 1);
974
- const r = _(this, et, ct).call(this, O.data()), d = Array.isArray(r) ? r.length : 0, S = _(this, nt, bt).call(this, O.total(), d);
974
+ const r = O(this, et, ct).call(this, _.data()), E = Array.isArray(r) ? r.length : 0, S = O(this, nt, Dt).call(this, _.total(), E);
975
975
  h(this, Y)[l] = S;
976
- }), i > 0 && _(this, Tt, $t).call(this), e(_(this, it, pt).call(this));
976
+ }), i > 0 && O(this, gt, $t).call(this), e(O(this, it, Ht).call(this));
977
977
  });
978
978
  });
979
- }, Dt = new WeakSet(), ee = function(A) {
979
+ }, Bt = new WeakSet(), ee = function(A) {
980
980
  let e = [];
981
- A.forEach(([n, i, c]) => {
982
- c.forEach((l, O) => {
983
- const m = O + 1, r = h(this, k) * m, S = [[n, m].join("_"), _(this, Bt, se).call(this, i, r)];
981
+ A.forEach(([n, i, a]) => {
982
+ a.forEach((l, _) => {
983
+ const m = _ + 1, r = h(this, k) * m, S = [[n, m].join("_"), O(this, Ut, se).call(this, i, r)];
984
984
  e.length === h(this, k) ? (h(this, z).push(e), e = [S]) : e.push(S);
985
985
  });
986
986
  }), e.length && h(this, z).push(e);
987
- }, Yt = new WeakSet(), Ae = function() {
987
+ }, It = new WeakSet(), Ae = function() {
988
988
  const A = [], e = [], n = (i) => {
989
- Object.entries(i).forEach(([c, l]) => {
990
- const [O] = c.split("_"), m = _(this, et, ct).call(this, l.data());
991
- Array.isArray(m) && h(this, Y)[O].push(...m), _(this, mt, jt).call(this, { key: O, value: l });
989
+ Object.entries(i).forEach(([a, l]) => {
990
+ const [_] = a.split("_"), m = O(this, et, ct).call(this, l.data());
991
+ Array.isArray(m) && h(this, Y)[_].push(...m), O(this, mt, jt).call(this, { key: _, value: l });
992
992
  });
993
993
  };
994
- return h(this, z).forEach((i, c) => {
995
- const l = Object.fromEntries(i), O = () => new Promise((m) => h(this, V).call(this, l, (r) => {
996
- h(this, F) ? n(r) : e[c] = r, m();
994
+ return h(this, z).forEach((i, a) => {
995
+ const l = Object.fromEntries(i), _ = () => new Promise((m) => h(this, V).call(this, l, (r) => {
996
+ h(this, F) ? n(r) : e[a] = r, m();
997
997
  }));
998
- A.push(O);
999
- }), h(this, F) ? _(this, yt, Kt).call(this, A) : _(this, Et, qt).call(this, A).then(() => {
998
+ A.push(_);
999
+ }), h(this, F) ? O(this, yt, Kt).call(this, A) : O(this, dt, qt).call(this, A).then(() => {
1000
1000
  e.forEach(n);
1001
1001
  });
1002
1002
  }, Ot = new WeakSet(), zt = function() {
@@ -1007,36 +1007,36 @@ V = new WeakMap(), lt = new WeakMap(), z = new WeakMap(), Y = new WeakMap(), k =
1007
1007
  const e = A.shift();
1008
1008
  return Promise.allSettled([
1009
1009
  e(),
1010
- _(this, Ot, zt).call(this)
1011
- ]).then(() => h(this, K) ? _(this, yt, Kt).call(this, A) : Promise.resolve());
1012
- }, Et = new WeakSet(), qt = function(A) {
1010
+ O(this, Ot, zt).call(this)
1011
+ ]).then(() => h(this, K) ? O(this, yt, Kt).call(this, A) : Promise.resolve());
1012
+ }, dt = new WeakSet(), qt = function(A) {
1013
1013
  if (!A.length)
1014
1014
  return Promise.resolve();
1015
1015
  const e = A.shift();
1016
- return _(this, Ot, zt).call(this).then(() => e()).then(() => h(this, K) ? _(this, Et, qt).call(this, A) : Promise.resolve());
1017
- }, it = new WeakSet(), pt = function() {
1016
+ return O(this, Ot, zt).call(this).then(() => e()).then(() => h(this, K) ? O(this, dt, qt).call(this, A) : Promise.resolve());
1017
+ }, it = new WeakSet(), Ht = function() {
1018
1018
  return Object.entries(h(this, lt)).forEach(([A, e]) => {
1019
1019
  h(this, Y)[A] && (h(this, Y)[A] = e(h(this, Y)[A]));
1020
1020
  }), h(this, Y);
1021
- }, dt = new WeakSet(), vt = function(A) {
1021
+ }, Et = new WeakSet(), vt = function(A) {
1022
1022
  return Object.entries(A).reduce((e, [n, i]) => {
1023
1023
  if (Array.isArray(i)) {
1024
- const [c, l = {}] = i;
1025
- e[n] = [c, l];
1024
+ const [a, l = {}] = i;
1025
+ e[n] = [a, l];
1026
1026
  } else {
1027
- const { method: c, params: l = {} } = i;
1028
- e[n] = [c, l];
1027
+ const { method: a, params: l = {} } = i;
1028
+ e[n] = [a, l];
1029
1029
  }
1030
1030
  return e;
1031
1031
  }, {});
1032
- }, Bt = new WeakSet(), se = function(A, e) {
1032
+ }, Ut = new WeakSet(), se = function(A, e) {
1033
1033
  const [n, i] = A;
1034
1034
  return [n, { start: e, ...i }];
1035
1035
  }, et = new WeakSet(), ct = function(A) {
1036
1036
  return ((A == null ? void 0 : A.items) || (A == null ? void 0 : A.documents)) ?? A;
1037
- }, nt = new WeakSet(), bt = function(A, e) {
1037
+ }, nt = new WeakSet(), Dt = function(A, e) {
1038
1038
  return A !== A && (A = 0), A === 0 && e === 0 ? 0 : A || e;
1039
- }, Tt = new WeakSet(), $t = function() {
1039
+ }, gt = new WeakSet(), $t = function() {
1040
1040
  console.group(`${this.constructor.name}: Ошибки в методах!`), Object.entries(this.errors).forEach(([A, e]) => {
1041
1041
  console.info(`[${A}]`, e.toString());
1042
1042
  }), console.groupEnd();
@@ -1076,28 +1076,35 @@ class re {
1076
1076
  });
1077
1077
  }), A.src = "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAP5tZGF0AAAAAQYAAADlZYiEE28FmH9jNWDBjI+Z/1tIBZsjfhbmcNNUpBFej0U3p+zhaJ3eemJRL2LUMa5tkidy6bp+eatLE3jBIY864TvaAmqEFCgLMTCwVbem1n3myAw9yDXQdR5HfU/8iYf+eneVnRf7Qx9M70XDUuPx1MJX671XJwAE0VAMpnhbcUDx0pTldvUX9KQPhkZNH3eyZHmObkAeyEJ2tl+BEBJIGc90BiqKL60+5EA6fXB6iG5UU/M5KsW8BNAAUw5CbRJIqohNk10fwKbUXwya03rqGkE8+wuYGtEbrVYXb+iOl1mHHVPLYQbIAAcGyAAHAAAFNG1vb3YAAABsbXZoZAAAAAAAAAAAAAAAAAAAA+gAAAAvAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAIldHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAFAAAAA8AAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAAAAAAAAAAAQAAAAABnW1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAQAAAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAUhtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEIc3RibAAAAKRzdHNkAAAAAAAAAAEAAACUYXZjMQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAFAAPAASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAC5hdmNDAU1AC//hABZnTUAL2wUH7ARAAAADAEAAAAQDxQq4AQAFaOrAZXIAAAAQcGFzcAAAAAEAAAABAAAAGHN0dHMAAAAAAAAAAQAAAAEAAAAAAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAABRzdHN6AAAAAAAAAO4AAAABAAAAFHN0Y28AAAAAAAAAAQAAADAAAAIadHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAgAAAAAAAAAvAAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAALwAAAAAAAQAAAAABkm1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAArEQAAAgAVcQAAAAAAC1oZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU291bmRIYW5kbGVyAAAAAT1taW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAQFzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAAC7gAAAAViBYCAgAISCAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAAACAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAUc3RzegAAAAAAAAAEAAAAAgAAABRzdGNvAAAAAAAAAAEAAAEeAAAAGnNncGQBAAAAcm9sbAAAAAIAAAAB//8AAAAcc2JncAAAAAByb2xsAAAAAQAAAAIAAAABAAAAgXVkdGEAAAB5bWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWR0YQAAAAAAAAAAAAAAAAAAAAAfa2V5cwAAAAAAAAABAAAAD21kdGFlbmNvZGVyAAAALWlsc3QAAAAlAAAAAQAAAB1kYXRhAAAAAQAAAABMYXZmNTguMTIuMTAw";
1078
1078
  }
1079
+ /** Скачать данные в JSON-файл */
1080
+ downloadFileJson(A, e) {
1081
+ let n = new Blob([JSON.stringify(A)], { type: "application/json" }), i = URL.createObjectURL(n), a = document.createElement("a");
1082
+ a.style.display = "none", a.href = i, a.download = `${e}.json`, document.body.appendChild(a), a.click(), setTimeout(() => {
1083
+ document.body.removeChild(a), URL.revokeObjectURL(i);
1084
+ }, 200);
1085
+ }
1079
1086
  }
1080
1087
  At = new WeakMap();
1081
- const Jt = new re();
1082
- var W, Q, It, st, gt, Ut, ie, Rt, te, Gt, ne, wt, oe, Ct, he;
1088
+ const Lt = new re();
1089
+ var W, Q, Gt, st, Tt, wt, ie, Rt, te, Ct, ne, Ft, oe, Pt, ae;
1083
1090
  class Oe {
1084
1091
  constructor() {
1085
- N(this, Ut);
1092
+ N(this, wt);
1086
1093
  /** Вывод ошибок логера
1087
1094
  * @param {'entity'} type - тип ошибки
1088
1095
  */
1089
1096
  N(this, Rt);
1090
- N(this, Gt);
1091
- N(this, wt);
1092
1097
  N(this, Ct);
1098
+ N(this, Ft);
1099
+ N(this, Pt);
1093
1100
  N(this, W, "logger");
1094
1101
  N(this, Q, !1);
1095
- N(this, It, 2e3);
1102
+ N(this, Gt, 2e3);
1096
1103
  N(this, st, /* @__PURE__ */ new Map());
1097
- N(this, gt, {});
1104
+ N(this, Tt, {});
1098
1105
  /** Очистка хранилища элементов старше 'N' месяцев */
1099
1106
  C(this, "periodClear", 3);
1100
- _(this, Ut, ie).call(this);
1107
+ O(this, wt, ie).call(this);
1101
1108
  }
1102
1109
  /** Инициализация логера */
1103
1110
  async init() {
@@ -1106,7 +1113,7 @@ class Oe {
1106
1113
  });
1107
1114
  if (e != null && e.length)
1108
1115
  if (e.find((i) => i.ENTITY == h(this, W)))
1109
- g(this, Q, !0);
1116
+ T(this, Q, !0);
1110
1117
  else {
1111
1118
  let { entityAdd: i } = await A.batch({
1112
1119
  entityAdd: {
@@ -1118,9 +1125,9 @@ class Oe {
1118
1125
  }
1119
1126
  }
1120
1127
  });
1121
- i && g(this, Q, !0);
1128
+ i && T(this, Q, !0);
1122
1129
  }
1123
- return _(this, wt, oe).call(this), h(this, Q);
1130
+ return O(this, Ft, oe).call(this), h(this, Q);
1124
1131
  }
1125
1132
  /**
1126
1133
  * @param {{ type: 'call'|'batch'|'batch-total-count';
@@ -1133,14 +1140,14 @@ class Oe {
1133
1140
  */
1134
1141
  start({ type: A, data: e }) {
1135
1142
  if (!h(this, Q)) {
1136
- _(this, Rt, te).call(this, "entity");
1143
+ O(this, Rt, te).call(this, "entity");
1137
1144
  return;
1138
1145
  }
1139
- const n = Jt.hash;
1146
+ const n = Lt.hash;
1140
1147
  return h(this, st).set(n, {
1141
1148
  type: A,
1142
1149
  data: e,
1143
- userInfo: h(this, gt),
1150
+ userInfo: h(this, Tt),
1144
1151
  errorList: [],
1145
1152
  status: "",
1146
1153
  answer: null,
@@ -1156,20 +1163,23 @@ class Oe {
1156
1163
  */
1157
1164
  stop({ key: A, errorList: e, status: n, answer: i }) {
1158
1165
  if (!h(this, Q)) {
1159
- _(this, Rt, te).call(this, "entity");
1166
+ O(this, Rt, te).call(this, "entity");
1160
1167
  return;
1161
1168
  }
1162
- let c = h(this, st).get(A);
1163
- e && (c.errorList = e), n && (c.status = n), i && (c.answer = i), Jt.actionFilter({
1169
+ let a = h(this, st).get(A);
1170
+ e && (a.errorList = e), n && (a.status = n), i && (a.answer = i), Lt.actionFilter({
1164
1171
  keyTimer: "add.entity.items",
1165
- duration: h(this, It),
1172
+ duration: h(this, Gt),
1166
1173
  action: () => {
1167
- _(this, Gt, ne).call(this);
1174
+ O(this, Ct, ne).call(this);
1168
1175
  }
1169
1176
  });
1170
1177
  }
1171
- async getEntityList() {
1172
- let A = new x(BX24.callBatch), { entityList: e } = await A.batch({
1178
+ /**
1179
+ * @param { ({percent}:{percent:number})=>{} } progressCall - коллбэк
1180
+ */
1181
+ async getEntityList(A) {
1182
+ let e = new x(BX24.callBatch), { entityList: n } = await e.batch({
1173
1183
  entityList: {
1174
1184
  method: "entity.item.get",
1175
1185
  params: {
@@ -1177,31 +1187,36 @@ class Oe {
1177
1187
  SORT: { ID: "DESC" }
1178
1188
  }
1179
1189
  }
1180
- });
1181
- return e = e.map((n) => {
1182
- const { ID: i, DATE_CREATE: c, DETAIL_TEXT: l } = n;
1190
+ }, A);
1191
+ return n = n.map((i) => {
1192
+ const { ID: a, DATE_CREATE: l, DETAIL_TEXT: _ } = i;
1183
1193
  return {
1184
- ...JSON.parse(l),
1185
- id: i,
1186
- dateCreate: c
1194
+ ...JSON.parse(_),
1195
+ id: a,
1196
+ dateCreate: l
1187
1197
  };
1188
- }), e;
1198
+ }), n;
1199
+ }
1200
+ /** Выгрузка всех данных из хранилища в JSON-файл */
1201
+ async downAllEntityJson() {
1202
+ let A = await this.getEntityList(), e = pt().format("%Y-%m-%d");
1203
+ Lt.downloadFileJson(A, `sdklogger-entity-data__${e}`);
1189
1204
  }
1190
1205
  }
1191
- W = new WeakMap(), Q = new WeakMap(), It = new WeakMap(), st = new WeakMap(), gt = new WeakMap(), Ut = new WeakSet(), ie = async function() {
1206
+ W = new WeakMap(), Q = new WeakMap(), Gt = new WeakMap(), st = new WeakMap(), Tt = new WeakMap(), wt = new WeakSet(), ie = async function() {
1192
1207
  const A = new x(BX24.callBatch), e = BX24.isAdmin(), { curUser: n } = await A.batch({
1193
1208
  curUser: { method: "user.current" }
1194
1209
  });
1195
- g(this, gt, { isAdmin: e, curUser: n });
1210
+ T(this, Tt, { isAdmin: e, curUser: n });
1196
1211
  }, Rt = new WeakSet(), te = function(A) {
1197
- A == "entity" && Jt.actionFilter({
1212
+ A == "entity" && Lt.actionFilter({
1198
1213
  keyTimer: "error.logger.entity",
1199
1214
  duration: 500,
1200
1215
  action: () => {
1201
1216
  console.error("Хранилище для логгера не инициализировано");
1202
1217
  }
1203
1218
  });
1204
- }, Gt = new WeakSet(), ne = async function() {
1219
+ }, Ct = new WeakSet(), ne = async function() {
1205
1220
  let A = {}, e = new x(BX24.callBatch);
1206
1221
  for (let [n, i] of h(this, st).entries())
1207
1222
  i.status && (A[n] = {
@@ -1214,38 +1229,38 @@ W = new WeakMap(), Q = new WeakMap(), It = new WeakMap(), st = new WeakMap(), gt
1214
1229
  });
1215
1230
  if (Object.keys(A).length) {
1216
1231
  let n = await e.batch(A), { errors: i } = e;
1217
- for (let [c, l] of Object.entries({ ...n, ...i }))
1218
- h(this, st).delete(c);
1232
+ for (let [a, l] of Object.entries({ ...n, ...i }))
1233
+ h(this, st).delete(a);
1219
1234
  }
1220
- }, wt = new WeakSet(), oe = async function() {
1235
+ }, Ft = new WeakSet(), oe = async function() {
1221
1236
  let A = new x(BX24.callBatch), e = await this.getEntityList(), { serverTime: n } = await A.batch({
1222
1237
  serverTime: { method: "server.time" }
1223
- }), i = e.filter((c) => {
1224
- let { dateCreate: l } = c;
1225
- return Xt(new Date(l)).between(Xt(new Date(n)), "month") >= this.periodClear;
1238
+ }), i = e.filter((a) => {
1239
+ let { dateCreate: l } = a;
1240
+ return pt(new Date(l)).between(pt(new Date(n)), "month") >= this.periodClear;
1226
1241
  });
1227
- _(this, Ct, he).call(this, i);
1228
- }, Ct = new WeakSet(), he = async function(A) {
1242
+ O(this, Pt, ae).call(this, i);
1243
+ }, Pt = new WeakSet(), ae = async function(A) {
1229
1244
  let e = new x(BX24.callBatch), n = A.map((i) => {
1230
- let { id: c } = i;
1245
+ let { id: a } = i;
1231
1246
  return {
1232
1247
  method: "entity.item.delete",
1233
1248
  params: {
1234
1249
  ENTITY: h(this, W),
1235
- ID: c
1250
+ ID: a
1236
1251
  }
1237
1252
  };
1238
1253
  });
1239
1254
  return await e.batch(n);
1240
1255
  };
1241
1256
  const U = new Oe();
1242
- var Ft, ae, Pt, ce;
1243
- class Ee {
1257
+ var Wt, he, Jt, ce;
1258
+ class de {
1244
1259
  constructor(A) {
1245
1260
  /** Запрос данных о приложении */
1246
- N(this, Ft);
1261
+ N(this, Wt);
1247
1262
  /** Запрос данных о текущем пользователе */
1248
- N(this, Pt);
1263
+ N(this, Jt);
1249
1264
  C(this, "domain", "");
1250
1265
  C(this, "isAdmin", !1);
1251
1266
  C(this, "appInfo", null);
@@ -1261,8 +1276,8 @@ class Ee {
1261
1276
  window.BX24 && BX24.init(async () => {
1262
1277
  console.info("init BX24"), clearInterval(e), this.domain = BX24.getDomain(), this.isAdmin = BX24.isAdmin(), this.placeInfo = BX24.placement.info(), await U.init();
1263
1278
  const [n, i] = await Promise.all([
1264
- _(this, Ft, ae).call(this),
1265
- _(this, Pt, ce).call(this)
1279
+ O(this, Wt, he).call(this),
1280
+ O(this, Jt, ce).call(this)
1266
1281
  ]);
1267
1282
  this.appInfo = n, this.userInfo = i, new re().noSleep(), A(!0);
1268
1283
  });
@@ -1295,27 +1310,27 @@ class Ee {
1295
1310
  type: "call",
1296
1311
  data: { method: A, params: e, updateList: n }
1297
1312
  });
1298
- return new Promise((c) => {
1313
+ return new Promise((a) => {
1299
1314
  e || (e = {}), BX24.callMethod(A, e, function(l) {
1300
- let O = {};
1315
+ let _ = {};
1301
1316
  if (l != null && l.answer)
1302
1317
  for (let [m, r] of Object.entries(l.answer))
1303
- m != "result" && r && (O[m] = r);
1318
+ m != "result" && r && (_[m] = r);
1304
1319
  if (l.error()) {
1305
1320
  let m = l.error();
1306
1321
  console.error(m), U.stop({
1307
- answer: O,
1322
+ answer: _,
1308
1323
  key: i,
1309
1324
  status: "fail",
1310
1325
  errorList: [m.toSting()]
1311
- }), c(!1);
1326
+ }), a(!1);
1312
1327
  } else {
1313
1328
  let m = l.data();
1314
1329
  m != null && m.items && (m = m.items), U.stop({
1315
- answer: O,
1330
+ answer: _,
1316
1331
  key: i,
1317
1332
  status: "success"
1318
- }), c(m);
1333
+ }), a(m);
1319
1334
  }
1320
1335
  });
1321
1336
  });
@@ -1340,37 +1355,37 @@ class Ee {
1340
1355
  * }}
1341
1356
  */
1342
1357
  async batch(A, e, { updateList: n, errorCall: i } = {}) {
1343
- let c = new x(BX24.callBatch), l = U.start({
1358
+ let a = new x(BX24.callBatch), l = U.start({
1344
1359
  type: "batch",
1345
1360
  data: { commandList: A, updateList: n }
1346
1361
  });
1347
1362
  try {
1348
- let O = await c.batch(A, e);
1349
- if (Object.keys(c.errors).length) {
1350
- let m = Object.entries(c.errors).map(([r, d]) => ({
1363
+ let _ = await a.batch(A, e);
1364
+ if (Object.keys(a.errors).length) {
1365
+ let m = Object.entries(a.errors).map(([r, E]) => ({
1351
1366
  key: r,
1352
- error: d.toSting()
1367
+ error: E.toSting()
1353
1368
  }));
1354
- i && i(c.errors), U.stop({
1369
+ i && i(a.errors), U.stop({
1355
1370
  key: l,
1356
1371
  status: "fail",
1357
1372
  errorList: m,
1358
- answer: c.answerData
1373
+ answer: a.answerData
1359
1374
  });
1360
1375
  } else
1361
1376
  U.stop({
1362
1377
  key: l,
1363
1378
  status: "success",
1364
- answer: c.answerData
1379
+ answer: a.answerData
1365
1380
  });
1366
- return O;
1367
- } catch (O) {
1381
+ return _;
1382
+ } catch (_) {
1368
1383
  return U.stop({
1369
1384
  key: l,
1370
1385
  status: "fail-runtime",
1371
- errorList: [O.toSting()],
1372
- answer: c.answerData
1373
- }), console.error(O), !1;
1386
+ errorList: [_.toSting()],
1387
+ answer: a.answerData
1388
+ }), console.error(_), !1;
1374
1389
  }
1375
1390
  }
1376
1391
  /**
@@ -1383,10 +1398,10 @@ class Ee {
1383
1398
  data: { commandList: A }
1384
1399
  });
1385
1400
  try {
1386
- let c = await n.batchTotalCount(A, e);
1401
+ let a = await n.batchTotalCount(A, e);
1387
1402
  if (Object.keys(n.errors).length) {
1388
- let l = Object.entries(n.errors).map(([O, m]) => ({
1389
- key: O,
1403
+ let l = Object.entries(n.errors).map(([_, m]) => ({
1404
+ key: _,
1390
1405
  error: m.toSting()
1391
1406
  }));
1392
1407
  U.stop({
@@ -1399,13 +1414,13 @@ class Ee {
1399
1414
  key: i,
1400
1415
  status: "success"
1401
1416
  });
1402
- return c;
1403
- } catch (c) {
1417
+ return a;
1418
+ } catch (a) {
1404
1419
  return U.stop({
1405
1420
  key: i,
1406
1421
  status: "fail",
1407
- errorList: [c.toSting()]
1408
- }), console.error(c), !1;
1422
+ errorList: [a.toSting()]
1423
+ }), console.error(a), !1;
1409
1424
  }
1410
1425
  }
1411
1426
  /** Запрос данных о местах встройки приложения */
@@ -1416,8 +1431,8 @@ class Ee {
1416
1431
  async placementBind(A) {
1417
1432
  this.placeData || (this.placeData = await this.getPlacement());
1418
1433
  const { appName: e, pathApp: n } = this.appConst, i = this.placeData.map((l) => l.placement);
1419
- let c = this.placeData.find((l) => l.placement == A);
1420
- i.includes(A) ? c.handler != n && (window.placementUnBind || (window.placementUnBind = {}), window.placementUnBind[A] || this.placementUnBind(c).then(() => {
1434
+ let a = this.placeData.find((l) => l.placement == A);
1435
+ i.includes(A) ? a.handler != n && (window.placementUnBind || (window.placementUnBind = {}), window.placementUnBind[A] || this.placementUnBind(a).then(() => {
1421
1436
  window.placementUnBind[A] || (window.placementUnBind[A] = !0, this.placementBind(A));
1422
1437
  })) : this.call({
1423
1438
  method: "placement.bind",
@@ -1463,7 +1478,7 @@ class Ee {
1463
1478
  }
1464
1479
  /* регистрация бота */
1465
1480
  regBot({ code: A, type: e, name: n }) {
1466
- const { appName: i, pathApp: c, chatBotLogo: l } = this.appConst, O = this.appInfo.ID;
1481
+ const { appName: i, pathApp: a, chatBotLogo: l } = this.appConst, _ = this.appInfo.ID;
1467
1482
  return this.call({
1468
1483
  method: "imbot.register",
1469
1484
  params: {
@@ -1471,7 +1486,7 @@ class Ee {
1471
1486
  // Строковой идентификатор бота, уникальный в рамках вашего приложения (обяз.)
1472
1487
  TYPE: e ?? "O",
1473
1488
  // Тип бота, B - чат-бот, ответы поступают сразу, H - человек, ответы поступают с задержкой от 2-х до 10 секунд, O - чат-бот для Открытых линий, S - чат-бот с повышенными привилегиями (supervisor)
1474
- EVENT_HANDLER: c,
1489
+ EVENT_HANDLER: a,
1475
1490
  // Ссылка на обработчик событий, поступивших от сервера - см. Обработчики событий ниже (обяз).
1476
1491
  OPENLINE: "Y",
1477
1492
  // Включение режима поддержки Открытых линий, можно не указывать, если TYPE = 'O'
@@ -1479,7 +1494,7 @@ class Ee {
1479
1494
  // строковый идентификатор чат-бота, используется только в режиме Вебхуков
1480
1495
  PROPERTIES: {
1481
1496
  // Личные данные чат-бота (обяз.)
1482
- NAME: `${n ?? i} - бот #${O}`,
1497
+ NAME: `${n ?? i} - бот #${_}`,
1483
1498
  // Имя чат-бота (обязательное одно из полей NAME или LAST_NAME)
1484
1499
  LAST_NAME: "",
1485
1500
  // Фамилия чат-бота (обязательное одно из полей NAME или LAST_NAME)
@@ -1487,7 +1502,7 @@ class Ee {
1487
1502
  // Цвет чат-бота для мобильного приложения RED, GREEN, MINT, LIGHT_BLUE, DARK_BLUE, PURPLE, AQUA, PINK, LIME, BROWN, AZURE, KHAKI, SAND, MARENGO, GRAY, GRAPHITE
1488
1503
  EMAIL: "",
1489
1504
  // E-mail для связи. НЕЛЬЗЯ использовать e-mail, дублирующий e-mail реальных пользователей
1490
- PERSONAL_BIRTHDAY: Xt().format("%Y-%m-%d"),
1505
+ PERSONAL_BIRTHDAY: pt().format("%Y-%m-%d"),
1491
1506
  // День рождения в формате YYYY-mm-dd
1492
1507
  WORK_POSITION: "Почтальон",
1493
1508
  // Занимаемая должность, используется как описание чат-бота
@@ -1511,15 +1526,15 @@ class Ee {
1511
1526
  }).then((e) => (console.log("чат-бот удален", e), e));
1512
1527
  }
1513
1528
  }
1514
- Ft = new WeakSet(), ae = function() {
1529
+ Wt = new WeakSet(), he = function() {
1515
1530
  return this.call({ method: "app.info" });
1516
- }, Pt = new WeakSet(), ce = function() {
1531
+ }, Jt = new WeakSet(), ce = function() {
1517
1532
  return this.call({ method: "user.current" });
1518
1533
  };
1519
1534
  export {
1520
1535
  x as Batch,
1521
- Ee as BxBoot,
1536
+ de as BxBoot,
1522
1537
  re as BxHelper,
1523
1538
  Oe as BxLogger,
1524
- Xt as tempus
1539
+ pt as tempus
1525
1540
  };