szdl-utils-kit 0.2.18 → 0.2.20

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,20 +1,20 @@
1
- var me = Object.defineProperty;
2
- var fe = (y, A, e) => A in y ? me(y, A, { enumerable: !0, configurable: !0, writable: !0, value: e }) : y[A] = e;
3
- var C = (y, A, e) => (fe(y, typeof A != "symbol" ? A + "" : A, e), e), Xt = (y, A, e) => {
1
+ var fe = Object.defineProperty;
2
+ var Ne = (y, A, e) => A in y ? fe(y, A, { enumerable: !0, configurable: !0, writable: !0, value: e }) : y[A] = e;
3
+ var C = (y, A, e) => (Ne(y, typeof A != "symbol" ? A + "" : A, e), e), xt = (y, A, e) => {
4
4
  if (!A.has(y))
5
5
  throw TypeError("Cannot " + e);
6
6
  };
7
- var o = (y, A, e) => (Xt(y, A, "read from private field"), e ? e.call(y) : A.get(y)), N = (y, A, e) => {
7
+ var o = (y, A, e) => (xt(y, A, "read from private field"), e ? e.call(y) : A.get(y)), f = (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
- }, E = (y, A, e, n) => (Xt(y, A, "write to private field"), n ? n.call(y, e) : A.set(y, e), e);
12
- var _ = (y, A, e) => (Xt(y, A, "access private method"), e);
13
- var Ne = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
14
- function _e(y) {
11
+ }, E = (y, A, e, n) => (xt(y, A, "write to private field"), n ? n.call(y, e) : A.set(y, e), e);
12
+ var _ = (y, A, e) => (xt(y, A, "access private method"), e);
13
+ var _e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
14
+ function Oe(y) {
15
15
  return y && y.__esModule && Object.prototype.hasOwnProperty.call(y, "default") ? y.default : y;
16
16
  }
17
- var xt = { exports: {} };
17
+ var jt = { exports: {} };
18
18
  (function(y, A) {
19
19
  (function(e) {
20
20
  Array.prototype.indexOf || (Array.prototype.indexOf = function(t, s) {
@@ -24,7 +24,7 @@ var xt = { exports: {} };
24
24
  return a;
25
25
  return -1;
26
26
  });
27
- var n = this, i = function(t, s) {
27
+ var n = this, r = function(t, s) {
28
28
  for (var a = t.toString(); a.length < s; )
29
29
  a = "0" + a;
30
30
  return a;
@@ -40,15 +40,15 @@ var xt = { exports: {} };
40
40
  t.slice(s + 3, s + 4),
41
41
  t.charAt(s + 5),
42
42
  t.slice(s + 6, s + 9)
43
- ], M;
44
- return !isNaN(Number(c[0])) && !isNaN(Number(c[2])) && !isNaN(Number(c[4])) ? (c[1] === "." && c[3] === "." ? a = "%d.%m.%Y" : c[1] === "-" && c[3] === "-" ? a = "%m-%d-%Y" : c[1] === "/" && c[3] === "/" && (a = "%m/%d/%Y"), a) : (M = [
43
+ ], L;
44
+ return !isNaN(Number(c[0])) && !isNaN(Number(c[2])) && !isNaN(Number(c[4])) ? (c[1] === "." && c[3] === "." ? a = "%d.%m.%Y" : c[1] === "-" && c[3] === "-" ? a = "%m-%d-%Y" : c[1] === "/" && c[3] === "/" && (a = "%m/%d/%Y"), a) : (L = [
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
- ], !isNaN(Number(M[0])) && !isNaN(Number(M[2])) && !isNaN(Number(M[4])) ? (M[1] === "-" && M[3] === "-" && (a = "%Y-%m-%d"), a) : "");
51
- }, u = n.tempus, r, g, S = n.navigator || {}, m = "en", f = {
50
+ ], !isNaN(Number(L[0])) && !isNaN(Number(L[2])) && !isNaN(Number(L[4])) ? (L[1] === "-" && L[3] === "-" && (a = "%Y-%m-%d"), a) : "");
51
+ }, u = n.tempus, i, T, g = n.navigator || {}, m = "en", N = {
52
52
  en: {
53
53
  JANUARY_SHORT: "Jan",
54
54
  FEBRUARY_SHORT: "Feb",
@@ -211,64 +211,64 @@ var xt = { exports: {} };
211
211
  }
212
212
  }, G = function() {
213
213
  return [
214
- f[m].JANUARY_LONG,
215
- f[m].FEBRUARY_LONG,
216
- f[m].MARCH_LONG,
217
- f[m].APRIL_LONG,
218
- f[m].MAY_LONG,
219
- f[m].JUNE_LONG,
220
- f[m].JULY_LONG,
221
- f[m].AUGUST_LONG,
222
- f[m].SEPTEMBER_LONG,
223
- f[m].OCTOBER_LONG,
224
- f[m].NOVEMBER_LONG,
225
- f[m].DECEMBER_LONG
214
+ N[m].JANUARY_LONG,
215
+ N[m].FEBRUARY_LONG,
216
+ N[m].MARCH_LONG,
217
+ N[m].APRIL_LONG,
218
+ N[m].MAY_LONG,
219
+ N[m].JUNE_LONG,
220
+ N[m].JULY_LONG,
221
+ N[m].AUGUST_LONG,
222
+ N[m].SEPTEMBER_LONG,
223
+ N[m].OCTOBER_LONG,
224
+ N[m].NOVEMBER_LONG,
225
+ N[m].DECEMBER_LONG
226
226
  ];
227
- }, at = function() {
227
+ }, ht = function() {
228
228
  return [
229
- f[m].JANUARY_SHORT,
230
- f[m].FEBRUARY_SHORT,
231
- f[m].MARCH_SHORT,
232
- f[m].APRIL_SHORT,
233
- f[m].MAY_SHORT,
234
- f[m].JUNE_SHORT,
235
- f[m].JULY_SHORT,
236
- f[m].AUGUST_SHORT,
237
- f[m].SEPTEMBER_SHORT,
238
- f[m].OCTOBER_SHORT,
239
- f[m].NOVEMBER_SHORT,
240
- f[m].DECEMBER_SHORT
229
+ N[m].JANUARY_SHORT,
230
+ N[m].FEBRUARY_SHORT,
231
+ N[m].MARCH_SHORT,
232
+ N[m].APRIL_SHORT,
233
+ N[m].MAY_SHORT,
234
+ N[m].JUNE_SHORT,
235
+ N[m].JULY_SHORT,
236
+ N[m].AUGUST_SHORT,
237
+ N[m].SEPTEMBER_SHORT,
238
+ N[m].OCTOBER_SHORT,
239
+ N[m].NOVEMBER_SHORT,
240
+ N[m].DECEMBER_SHORT
241
241
  ];
242
- }, V = function() {
242
+ }, z = function() {
243
243
  return [
244
- f[m].SUNDAY_LONG,
245
- f[m].MONDAY_LONG,
246
- f[m].TUESDAY_LONG,
247
- f[m].WEDNESDAY_LONG,
248
- f[m].THURSDAY_LONG,
249
- f[m].FRIDAY_LONG,
250
- f[m].SATURDAY_LONG
244
+ N[m].SUNDAY_LONG,
245
+ N[m].MONDAY_LONG,
246
+ N[m].TUESDAY_LONG,
247
+ N[m].WEDNESDAY_LONG,
248
+ N[m].THURSDAY_LONG,
249
+ N[m].FRIDAY_LONG,
250
+ N[m].SATURDAY_LONG
251
251
  ];
252
- }, J = function() {
252
+ }, k = function() {
253
253
  return [
254
- f[m].SUNDAY_SHORT,
255
- f[m].MONDAY_SHORT,
256
- f[m].TUESDAY_SHORT,
257
- f[m].WEDNESDAY_SHORT,
258
- f[m].THURSDAY_SHORT,
259
- f[m].FRIDAY_SHORT,
260
- f[m].SATURDAY_SHORT
254
+ N[m].SUNDAY_SHORT,
255
+ N[m].MONDAY_SHORT,
256
+ N[m].TUESDAY_SHORT,
257
+ N[m].WEDNESDAY_SHORT,
258
+ N[m].THURSDAY_SHORT,
259
+ N[m].FRIDAY_SHORT,
260
+ N[m].SATURDAY_SHORT
261
261
  ];
262
- }, P, Mt, ht, ct, ue = function(t, s, a) {
262
+ }, P, Mt, ct, lt, me = function(t, s, a) {
263
263
  var c;
264
264
  n.XMLHttpRequest ? c = new XMLHttpRequest() : c = new ActiveXObject("Microsoft.XMLHTTP"), c.onreadystatechange = function() {
265
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
266
  https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.parse(c.responseText))) : a && a(c));
267
267
  }, c.open("GET", t, !1), c.send();
268
- }, I = {
268
+ }, U = {
269
269
  "%d": {
270
270
  format: function(t) {
271
- return i(t.day() || r.MIN_DAY, 2);
271
+ return r(t.day() || i.MIN_DAY, 2);
272
272
  },
273
273
  parse: function(t) {
274
274
  var s = Number(t);
@@ -280,7 +280,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
280
280
  },
281
281
  "%m": {
282
282
  format: function(t) {
283
- return i(t.month() || r.MIN_MONTH, 2);
283
+ return r(t.month() || i.MIN_MONTH, 2);
284
284
  },
285
285
  parse: function(t) {
286
286
  var s = Number(t);
@@ -292,7 +292,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
292
292
  },
293
293
  "%Y": {
294
294
  format: function(t) {
295
- return i(t.year() || r.MIN_YEAR, 4);
295
+ return r(t.year() || i.MIN_YEAR, 4);
296
296
  },
297
297
  parse: function(t) {
298
298
  var s = Number(t);
@@ -304,7 +304,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
304
304
  },
305
305
  "%w": {
306
306
  format: function(t) {
307
- return t.dayOfWeek() || r.MIN_DAY_OF_WEEK;
307
+ return t.dayOfWeek() || i.MIN_DAY_OF_WEEK;
308
308
  },
309
309
  parse: function() {
310
310
  return {};
@@ -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 ct[s !== e ? s : r.MIN_DAY_OF_WEEK];
319
+ return lt[s !== e ? s : i.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 ct[s !== e ? s : i.MIN_DAY_OF_WEEK];
332
332
  },
333
333
  parse: function() {
334
334
  return {};
@@ -339,11 +339,11 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
339
339
  },
340
340
  "%b": {
341
341
  format: function(t) {
342
- var s = r.options("monthFromZero") ? t.month() : t.month() - 1;
343
- return Mt[s !== e ? s : r.MIN_MONTH];
342
+ var s = i.options("monthFromZero") ? t.month() : t.month() - 1;
343
+ return Mt[s !== e ? s : i.MIN_MONTH];
344
344
  },
345
345
  parse: function(t) {
346
- var s = r.monthNames().indexOf(t) + (r.options("monthFromZero") ? 0 : 1);
346
+ var s = i.monthNames().indexOf(t) + (i.options("monthFromZero") ? 0 : 1);
347
347
  return { month: s !== -1 ? s : e };
348
348
  },
349
349
  minLength: 1,
@@ -352,11 +352,11 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
352
352
  },
353
353
  "%B": {
354
354
  format: function(t) {
355
- var s = r.options("monthFromZero") ? t.month() : t.month() - 1;
356
- return P[s !== e ? s : r.MIN_MONTH];
355
+ var s = i.options("monthFromZero") ? t.month() : t.month() - 1;
356
+ return P[s !== e ? s : i.MIN_MONTH];
357
357
  },
358
358
  parse: function(t) {
359
- var s = r.monthNames(!0).indexOf(t) + (r.options("monthFromZero") ? 0 : 1);
359
+ var s = i.monthNames(!0).indexOf(t) + (i.options("monthFromZero") ? 0 : 1);
360
360
  return { month: s !== -1 ? s : e };
361
361
  },
362
362
  minLength: 1,
@@ -365,7 +365,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
365
365
  },
366
366
  "%H": {
367
367
  format: function(t) {
368
- return i(t.hours() || r.MIN_HOURS, 2);
368
+ return r(t.hours() || i.MIN_HOURS, 2);
369
369
  },
370
370
  parse: function(t) {
371
371
  var s = Number(t);
@@ -377,7 +377,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
377
377
  },
378
378
  "%M": {
379
379
  format: function(t) {
380
- return i(t.minutes() || r.MIN_MINUTES, 2);
380
+ return r(t.minutes() || i.MIN_MINUTES, 2);
381
381
  },
382
382
  parse: function(t) {
383
383
  var s = Number(t);
@@ -389,7 +389,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
389
389
  },
390
390
  "%S": {
391
391
  format: function(t) {
392
- return i(t.seconds() || r.MIN_SECONDS, 2);
392
+ return r(t.seconds() || i.MIN_SECONDS, 2);
393
393
  },
394
394
  parse: function(t) {
395
395
  var s = Number(t);
@@ -404,7 +404,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
404
404
  return t.timestamp();
405
405
  },
406
406
  parse: function(t) {
407
- return isNaN(Number(t)) ? {} : r(Number(t)).get();
407
+ return isNaN(Number(t)) ? {} : i(Number(t)).get();
408
408
  },
409
409
  minLength: 1,
410
410
  maxLength: 20,
@@ -412,7 +412,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
412
412
  },
413
413
  "%F": {
414
414
  format: function(t) {
415
- return i(t.year() || r.MIN_YEAR, 4) + "-" + i(t.month() || r.MIN_MONTH, 2) + "-" + i(t.day() || r.MIN_DAY, 2);
415
+ return r(t.year() || i.MIN_YEAR, 4) + "-" + r(t.month() || i.MIN_MONTH, 2) + "-" + r(t.day() || i.MIN_DAY, 2);
416
416
  },
417
417
  parse: function(t) {
418
418
  var s = Number(t.slice(0, 4)), a = Number(t.slice(5, 7)), c = Number(t.slice(8, 10));
@@ -428,7 +428,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
428
428
  },
429
429
  "%D": {
430
430
  format: function(t) {
431
- return i(t.month() || r.MIN_MONTH, 2) + "/" + i(t.day() || r.MIN_DAY, 2) + "/" + i(t.year() || r.MIN_YEAR, 4);
431
+ return r(t.month() || i.MIN_MONTH, 2) + "/" + r(t.day() || i.MIN_DAY, 2) + "/" + r(t.year() || i.MIN_YEAR, 4);
432
432
  },
433
433
  parse: function(t) {
434
434
  var s = Number(t.slice(0, 2)), a = Number(t.slice(3, 5)), c = Number(t.slice(6, 10));
@@ -442,11 +442,11 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
442
442
  maxLength: 10,
443
443
  type: "string"
444
444
  }
445
- }, Lt = {
445
+ }, pt = {
446
446
  useMilliseconds: !1,
447
447
  monthFromZero: !1
448
- }, T;
449
- T = function(t, s, a) {
448
+ }, R;
449
+ R = function(t, s, a) {
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, a), this;
459
- }, T.fn = T.prototype, T.fn.dayCount = function() {
460
- var t = this.month(), s = r.MAX_DAY_IN_MONTHS[t - (r.options("monthFromZero") ? 0 : 1)];
461
- return this.leapYear() && t === (r.options("monthFromZero") ? 1 : 2) && (s += 1), s;
462
- }, T.fn.year = function(t) {
459
+ }, R.fn = R.prototype, R.fn.dayCount = function() {
460
+ var t = this.month(), s = i.MAX_DAY_IN_MONTHS[t - (i.options("monthFromZero") ? 0 : 1)];
461
+ return this.leapYear() && t === (i.options("monthFromZero") ? 1 : 2) && (s += 1), s;
462
+ }, R.fn.year = function(t) {
463
463
  if (arguments.length !== 0)
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);
464
+ (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= i.MIN_YEAR && Number(t) <= i.MAX_YEAR ? (this._d.setFullYear(Number(t)), this._i.year = !1) : this._i.year = Number(t) : (this._d.setFullYear(i.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
+ }, R.fn.month = function(t) {
469
469
  if (arguments.length !== 0)
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);
470
+ (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= i.MIN_MONTH && Number(t) <= i.MAX_MONTH ? (this._d.setMonth(i.options("monthFromZero") ? Number(t) : Number(t) - 1), this._i.month = !1) : this._i.month = Number(t) : (this._d.setMonth(i.options("monthFromZero") ? i.MIN_MONTH : i.MIN_MONTH - 1), this._i.month = !1);
471
471
  else
472
- return this._i.month === !1 ? r.options("monthFromZero") ? this._d.getMonth() : this._d.getMonth() + 1 : this._i.month;
472
+ return this._i.month === !1 ? i.options("monthFromZero") ? this._d.getMonth() : this._d.getMonth() + 1 : this._i.month;
473
473
  return this;
474
- }, T.fn.day = function(t) {
474
+ }, R.fn.day = function(t) {
475
475
  if (arguments.length !== 0)
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);
476
+ (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= i.MIN_DAY && Number(t) <= this.dayCount() ? (this._d.setDate(Number(t)), this._i.day = !1) : this._i.day = Number(t) : (this._d.setDate(i.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
+ }, R.fn.hours = function(t) {
481
481
  if (arguments.length !== 0)
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);
482
+ (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= i.MIN_HOURS && Number(t) <= i.MAX_HOURS ? (this._d.setHours(Number(t)), this._i.hours = !1) : this._i.hours = Number(t) : (this._d.setHours(i.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
+ }, R.fn.minutes = function(t) {
487
487
  if (arguments.length !== 0)
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);
488
+ (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= i.MIN_MINUTES && Number(t) <= i.MAX_MINUTES ? (this._d.setMinutes(Number(t)), this._i.minutes = !1) : this._i.minutes = Number(t) : (this._d.setMinutes(i.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
+ }, R.fn.seconds = function(t) {
493
493
  if (arguments.length !== 0)
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);
494
+ (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= i.MIN_SECONDS && Number(t) <= i.MAX_SECONDS ? (this._d.setSeconds(Number(t)), this._i.seconds = !1) : this._i.seconds = Number(t) : (this._d.setSeconds(i.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
+ }, R.fn.milliseconds = function(t) {
499
499
  if (arguments.length !== 0)
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);
500
+ (typeof t == "number" || typeof t == "string") && !isNaN(Number(t)) ? Number(t) >= i.MIN_MILLISECONDS && Number(t) <= i.MAX_MILLISECONDS ? (this._d.setMilliseconds(Number(t)), this._i.milliseconds = !1) : this._i.milliseconds = Number(t) : (this._d.setMilliseconds(i.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() {
505
- var t = new Date(this.year(), 0, 1), s = r(this.utc()).hours(0).minutes(0).seconds(0).milliseconds(0).utc() * 1e3;
504
+ }, R.fn.week = function() {
505
+ var t = new Date(this.year(), 0, 1), s = i(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, a) {
507
+ }, R.fn.set = function(t, s, a) {
508
508
  if (this._i = {
509
509
  year: !1,
510
510
  month: !1,
@@ -518,9 +518,9 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
518
518
  if (t instanceof Date)
519
519
  return this._d = t, this;
520
520
  if (typeof t == "number")
521
- return this._d = new Date(t * (r.options("useMilliseconds") ? 1 : 1e3)), this;
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 c, M = [], d, R, X = [], H = 0, D = 0, L, w, p = {}, b;
521
+ return this._d = new Date(t * (i.options("useMilliseconds") ? 1 : 1e3)), this;
522
+ if (typeof t == "object" && (t instanceof Array ? (this.day(i.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(i.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 c, L = [], d, S, X = [], H = 0, D = 0, M, w, p = {}, b;
524
524
  if (t === e)
525
525
  return d = h(this, a), d === e && (this._i = {
526
526
  year: -1,
@@ -531,24 +531,24 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
531
531
  seconds: -1,
532
532
  milliseconds: -1
533
533
  }), d;
534
- for (s === e && (s = r.detectFormat(t)); H < s.length; ) {
534
+ for (s === e && (s = i.detectFormat(t)); H < s.length; ) {
535
535
  if (s.charAt(H) === "%") {
536
- if (R = s.charAt(H) + s.charAt(H + 1), I[R] !== e) {
537
- switch (L = 0, w = "", I[R].type) {
536
+ if (S = s.charAt(H) + s.charAt(H + 1), U[S] !== e) {
537
+ switch (M = 0, w = "", U[S].type) {
538
538
  case "number":
539
- for (; L < I[R].maxLength && D + L < t.length && !isNaN(Number(t.charAt(D + L))); )
540
- w += t.charAt(D + L), L += 1;
539
+ for (; M < U[S].maxLength && D + M < t.length && !isNaN(Number(t.charAt(D + M))); )
540
+ w += t.charAt(D + M), M += 1;
541
541
  break;
542
542
  case "word":
543
- for (; L < I[R].maxLength && D + L < t.length && /^[\u00BF-\u1FFF\u2C00-\uD7FF\w]+$/.test(t.charAt(D + L)); )
544
- w += t.charAt(D + L), L += 1;
543
+ for (; M < U[S].maxLength && D + M < t.length && /^[\u00BF-\u1FFF\u2C00-\uD7FF\w]+$/.test(t.charAt(D + M)); )
544
+ w += t.charAt(D + M), M += 1;
545
545
  break;
546
546
  case "string":
547
- for (; L < I[R].maxLength && D + L < t.length; )
548
- w += t.charAt(D + L), L += 1;
547
+ for (; M < U[S].maxLength && D + M < t.length; )
548
+ w += t.charAt(D + M), M += 1;
549
549
  break;
550
550
  }
551
- if (L < I[R].minLength)
551
+ if (M < U[S].minLength)
552
552
  return d = h(this, a), d === e && (this._i = {
553
553
  year: -1,
554
554
  month: -1,
@@ -558,7 +558,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
558
558
  seconds: -1,
559
559
  milliseconds: -1
560
560
  }), d;
561
- M.push(R), X.push(w), L -= 1, D += L, H += 1;
561
+ L.push(S), X.push(w), M -= 1, D += M, H += 1;
562
562
  }
563
563
  } else if (t.charAt(D) !== s.charAt(H))
564
564
  return d = h(this, a), d === e && (this._i = {
@@ -572,8 +572,8 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
572
572
  }), d;
573
573
  H += 1, D += 1;
574
574
  }
575
- for (c in M)
576
- M.hasOwnProperty(c) && I.hasOwnProperty(M[c]) && (b = I[M[c]].parse(X[c]), p = {
575
+ for (c in L)
576
+ L.hasOwnProperty(c) && U.hasOwnProperty(L[c]) && (b = U[L[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,
@@ -581,21 +581,21 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
581
581
  minutes: b.minutes !== e ? b.minutes : p.minutes,
582
582
  seconds: b.seconds !== e ? b.seconds : p.seconds
583
583
  });
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);
584
+ this.day(i.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
+ }, R.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) {
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) {
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) {
590
+ }, R.fn.timestamp = function(t) {
591
+ return arguments.length !== 0 ? (this._d = new Date(Number(t) * (i.options("useMilliseconds") ? 1 : 1e3) + this._d.getTimezoneOffset() * 6e4), this) : i.options("useMilliseconds") ? this._d.getTime() - this._d.getTimezoneOffset() * 6e4 : Math.floor(this._d.getTime() / 1e3) - this._d.getTimezoneOffset() * 60;
592
+ }, R.fn.utc = function(t) {
593
+ return arguments.length !== 0 ? (this._d = new Date(Number(t) * (i.options("useMilliseconds") ? 1 : 1e3)), this) : i.options("useMilliseconds") ? this._d.getTime() : Math.floor(this._d.getTime() / 1e3);
594
+ }, R.fn.dayOfWeek = function(t) {
595
595
  if (t === "long")
596
- return ht[this._d.getDay()];
597
- if (t === "short")
598
596
  return ct[this._d.getDay()];
597
+ if (t === "short")
598
+ return lt[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
+ }, R.fn.timezone = function(t) {
616
616
  switch (t) {
617
617
  case "hours":
618
618
  return Math.floor(this._d.getTimezoneOffset() / 60);
@@ -621,12 +621,12 @@ 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
+ }, R.fn.get = function(t) {
625
625
  switch (t) {
626
626
  case "Date":
627
627
  return new Date(
628
628
  this.year(),
629
- this.month() - (r.options("monthFromZero") ? 0 : 1),
629
+ this.month() - (i.options("monthFromZero") ? 0 : 1),
630
630
  this.day(),
631
631
  this.hours(),
632
632
  this.minutes(),
@@ -636,7 +636,7 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
636
636
  case "DateUTC":
637
637
  return new Date(Date.UTC(
638
638
  this.year(),
639
- this.month() - (r.options("monthFromZero") ? 0 : 1),
639
+ this.month() - (i.options("monthFromZero") ? 0 : 1),
640
640
  this.day(),
641
641
  this.hours(),
642
642
  this.minutes(),
@@ -670,15 +670,15 @@ 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) {
673
+ }, R.fn.format = function(t) {
674
674
  for (var s = 0, a = "", c; s < t.length; )
675
- t.charAt(s) === "%" ? (c = t.charAt(s) + t.charAt(s + 1), I[c] !== e ? (a += I[c].format(this), s += 1) : a += "%") : a += t.charAt(s), s += 1;
675
+ t.charAt(s) === "%" ? (c = t.charAt(s) + t.charAt(s + 1), U[c] !== e ? (a += U[c].format(this), s += 1) : a += "%") : a += t.charAt(s), s += 1;
676
676
  return a;
677
- }, T.fn.valid = function() {
677
+ }, R.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
+ }, R.fn.errors = function() {
680
680
  return this._i;
681
- }, T.fn.between = function(t, s) {
681
+ }, R.fn.between = function(t, s) {
682
682
  var a = this.timestamp(), c = t.timestamp();
683
683
  switch (s) {
684
684
  case "year":
@@ -696,24 +696,24 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
696
696
  default:
697
697
  return e;
698
698
  }
699
- }, T.fn.calc = function(t) {
699
+ }, R.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
- }, r = function(t, s, a) {
702
- return new T(t, s, a);
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) {
701
+ }, i = function(t, s, a) {
702
+ return new R(t, s, a);
703
+ }, i.MIN_YEAR = 1e3, i.MAX_YEAR = 3e3, i.MIN_MONTH = 1, i.MAX_MONTH = 12, i.MIN_DAY = 1, i.MAX_DAY_IN_MONTHS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], i.MIN_DAY_OF_WEEK = 0, i.MAX_DAY_OF_WEEK = 6, i.MIN_HOURS = 0, i.MAX_HOURS = 23, i.MIN_MINUTES = 0, i.MAX_MINUTES = 59, i.MIN_SECONDS = 0, i.MAX_SECONDS = 59, i.MIN_MILLISECONDS = 0, i.MAX_MILLISECONDS = 999, i.VERSION = "0.2.18", i.options = function(t, s) {
704
704
  if (t === e)
705
- return Lt;
706
- if (Lt.hasOwnProperty(t)) {
705
+ return pt;
706
+ if (pt.hasOwnProperty(t)) {
707
707
  if (s === e)
708
- return Lt[t];
709
- Lt[t] = s, t === "monthFromZero" && (r.MIN_MONTH = s ? 0 : 1, r.MAX_MONTH = s ? 11 : 12);
708
+ return pt[t];
709
+ pt[t] = s, t === "monthFromZero" && (i.MIN_MONTH = s ? 0 : 1, i.MAX_MONTH = s ? 11 : 12);
710
710
  }
711
711
  return e;
712
- }, r.noConflict = function() {
713
- return n.tempus = u, r;
714
- }, r.generate = function(t) {
715
- var s, a, c, M, d, 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 ? a = t.dateTo.utc() : a = r(t.dateTo, t.formatTo !== e ? t.formatTo : t.formatFrom).utc()), typeof t.period == "number" ? d = {
712
+ }, i.noConflict = function() {
713
+ return n.tempus = u, i;
714
+ }, i.generate = function(t) {
715
+ var s, a, c, L, d, S, X, H;
716
+ if (typeof t.dateFrom != "number" && (t.dateFrom instanceof R ? s = t.dateFrom.utc() : s = i(t.dateFrom, t.formatFrom).utc()), typeof t.dateTo != "number" && (t.dateTo instanceof R ? a = t.dateTo.utc() : a = i(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,
@@ -734,8 +734,8 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
734
734
  hours: t.period.hours !== e ? t.period.hours : 0,
735
735
  minutes: t.period.minutes !== e ? t.period.minutes : 0,
736
736
  seconds: t.period.seconds !== e ? t.period.seconds : 0
737
- }), t.groupBy === e ? R = t.asObject === !0 ? {} : [] : (R = [], R.push([]), X = r(s).get()[t.groupBy]), H = function(w, p, b) {
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;
737
+ }), t.groupBy === e ? S = t.asObject === !0 ? {} : [] : (S = [], S.push([]), X = i(s).get()[t.groupBy]), H = function(w, p, b) {
738
+ return t.asObject === !0 ? t.format !== e ? w[i(p).format(t.format)] = {} : w[i(p).format("%F %H:%M:%S")] = {} : t.format !== e ? w.push(b ? null : i(p).format(t.format)) : w.push(b ? null : i(p)), w;
739
739
  }, t.groupBy !== e && t.fillNulls) {
740
740
  var D = {
741
741
  year: d.year ? -d.year : e,
@@ -746,305 +746,314 @@ https://github.com/douglascrockford/JSON-js/blob/master/json2.js`) : s(JSON.pars
746
746
  seconds: d.seconds ? -d.seconds : e,
747
747
  milliseconds: d.milliseconds ? -d.milliseconds : e
748
748
  };
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();
749
+ for (c = i(s).calc(D).utc(); i(c).get()[t.groupBy] === X; )
750
+ H(S[S.length - 1], c, !0), c = i(c).calc(D).utc();
751
751
  if (t.groupBy === "week") {
752
- var L = r(s).dayOfWeek();
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();
752
+ var M = i(s).dayOfWeek();
753
+ for (c = i(s).dayOfWeek(0).utc(); S[0].length < M && c < s; )
754
+ H(S[S.length - 1], c, !0), c = i(c).calc(d).utc();
755
755
  }
756
756
  }
757
757
  for (; s <= a; )
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();
758
+ t.groupBy === e ? H(S, s) : i(s).get()[t.groupBy] === X ? H(S[S.length - 1], s) : (S.push([]), H(S[S.length - 1], s), X = i(s).get()[t.groupBy]), s = i(s).calc(d).utc();
759
759
  if (t.groupBy !== e && t.fillNulls)
760
- for (M = r(a).calc(d).utc(); r(M).get()[t.groupBy] === X; )
761
- H(R[R.length - 1], M, !0), M = r(M).calc(d).utc();
762
- return R;
763
- }, r.monthNames = function(t) {
760
+ for (L = i(a).calc(d).utc(); i(L).get()[t.groupBy] === X; )
761
+ H(S[S.length - 1], L, !0), L = i(L).calc(d).utc();
762
+ return S;
763
+ }, i.monthNames = function(t) {
764
764
  switch (t) {
765
765
  case "long":
766
766
  return P;
767
767
  default:
768
768
  return Mt;
769
769
  }
770
- }, r.dayNames = function(t) {
770
+ }, i.dayNames = function(t) {
771
771
  switch (t) {
772
772
  case "long":
773
- return ht;
774
- default:
775
773
  return ct;
774
+ default:
775
+ return lt;
776
776
  }
777
- }, r.lang = function(t) {
777
+ }, i.lang = function(t) {
778
778
  if (t !== e)
779
- m = t, f[m] === e && (m = "en"), P = G(), Mt = at(), ht = V(), ct = J();
779
+ m = t, N[m] === e && (m = "en"), P = G(), Mt = ht(), ct = z(), lt = k();
780
780
  else
781
781
  return m;
782
782
  return e;
783
- }, r.availableLangs = function() {
784
- return Object.keys(f);
785
- }, r.registerFormat = function(t, s, a, c, M, d) {
786
- I[t] = {
783
+ }, i.availableLangs = function() {
784
+ return Object.keys(N);
785
+ }, i.registerFormat = function(t, s, a, c, L, d) {
786
+ U[t] = {
787
787
  format: s,
788
788
  parse: a,
789
789
  minLength: c,
790
- maxLength: M,
790
+ maxLength: L,
791
791
  type: d
792
792
  };
793
- }, r.unregisterFormat = function(t) {
794
- delete I[t];
795
- }, r.detectFormat = function(t) {
793
+ }, i.unregisterFormat = function(t) {
794
+ delete U[t];
795
+ }, i.detectFormat = function(t) {
796
796
  var s, a, c;
797
797
  return s = O(t, 0), s !== "" && (c = 10), a = t.charAt(c), (a === "T" || a === " ") && (s += a, c += 1), s += l(t, c), s;
798
- }, g = {
799
- TempusDate: T
800
- }, r.classes = function(t, s) {
798
+ }, T = {
799
+ TempusDate: R
800
+ }, i.classes = function(t, s) {
801
801
  if (s === e)
802
- return g[t];
803
- g[t] = s;
804
- }, r.loadTranslations = function(t) {
805
- typeof t == "object" ? f = t : typeof t == "string" && ue(t, function(s) {
806
- f = s;
802
+ return T[t];
803
+ T[t] = s;
804
+ }, i.loadTranslations = function(t) {
805
+ typeof t == "object" ? N = t : typeof t == "string" && me(t, function(s) {
806
+ N = s;
807
807
  }, function(s) {
808
808
  });
809
- }, m = (S.language || S.systemLanguage || S.userLanguage || "en").substr(0, 2).toLowerCase(), f[m] === e && (m = "en"), P = G(), Mt = at(), ht = V(), ct = J(), y.exports && (A = y.exports = r), A.tempus = r;
810
- }).call(Ne);
811
- })(xt, xt.exports);
812
- var Oe = xt.exports;
813
- const bt = /* @__PURE__ */ _e(Oe);
814
- var z, ut, K, Y, k, q, v, B, j, Bt, $, F, tt, et, it, Ht, mt, jt, ft, Qt, Nt, Zt, _t, Vt, Ot, zt, It, Ae, Ut, se, yt, Kt, dt, qt, Et, vt, nt, Dt, gt, $t, Gt, re, At, lt, ot, Yt, Tt, te;
809
+ }, m = (g.language || g.systemLanguage || g.userLanguage || "en").substr(0, 2).toLowerCase(), N[m] === e && (m = "en"), P = G(), Mt = ht(), ct = z(), lt = k(), y.exports && (A = y.exports = i), A.tempus = i;
810
+ }).call(_e);
811
+ })(jt, jt.exports);
812
+ var ye = jt.exports;
813
+ const Ht = /* @__PURE__ */ Oe(ye);
814
+ var K, mt, q, Y, W, j, v, $, I, Q, It, tt, F, et, At, nt, Dt, ft, Qt, Nt, Zt, _t, Vt, Ot, zt, yt, Kt, Ut, se, Gt, ie, dt, qt, Et, vt, gt, $t, ot, Yt, Tt, te, wt, re, st, ut, at, Bt, Rt, ee;
815
815
  class x {
816
816
  constructor(A, e = {}) {
817
- N(this, it);
818
- N(this, mt);
819
- N(this, ft);
820
- N(this, Nt);
821
- N(this, _t);
822
- N(this, Ot);
823
- N(this, It);
824
- N(this, Ut);
825
- N(this, yt);
826
- N(this, dt);
827
- N(this, Et);
828
- N(this, nt);
829
- N(this, gt);
830
- N(this, Gt);
831
- N(this, At);
832
- N(this, ot);
833
- N(this, Tt);
834
- N(this, z, null);
835
- N(this, ut, null);
836
- N(this, K, []);
837
- N(this, Y, {});
838
- N(this, k, 50);
839
- N(this, q, !0);
840
- N(this, v, null);
841
- N(this, B, null);
842
- N(this, j, null);
843
- N(this, Bt, 100);
844
- N(this, $, "no");
845
- N(this, F, !1);
846
- N(this, tt, !1);
847
- N(this, et, !1);
817
+ f(this, nt);
818
+ f(this, ft);
819
+ f(this, Nt);
820
+ f(this, _t);
821
+ f(this, Ot);
822
+ f(this, yt);
823
+ f(this, Ut);
824
+ f(this, Gt);
825
+ f(this, dt);
826
+ f(this, Et);
827
+ f(this, gt);
828
+ f(this, ot);
829
+ f(this, Tt);
830
+ f(this, wt);
831
+ f(this, st);
832
+ f(this, at);
833
+ f(this, Rt);
834
+ f(this, K, null);
835
+ f(this, mt, null);
836
+ f(this, q, []);
837
+ f(this, Y, {});
838
+ f(this, W, 50);
839
+ f(this, j, 500);
840
+ f(this, v, !0);
841
+ f(this, $, null);
842
+ f(this, I, null);
843
+ f(this, Q, null);
844
+ f(this, It, 100);
845
+ f(this, tt, "no");
846
+ f(this, F, !1);
847
+ f(this, et, !1);
848
+ f(this, At, !1);
848
849
  C(this, "errors", {});
849
850
  C(this, "answerData", {});
850
- E(this, z, A), E(this, ut, e);
851
+ E(this, K, A), E(this, mt, e);
851
852
  }
852
853
  get serial() {
853
854
  return o(this, F);
854
855
  }
856
+ get limitCommandSerial() {
857
+ return o(this, j);
858
+ }
859
+ set limitCommandSerial(A) {
860
+ if (A < 10)
861
+ throw new Error("limitCommandSerial не может быть меньше 10");
862
+ A >= 10 && A < 50 && (E(this, W, A), E(this, j, A)), E(this, j, A);
863
+ }
855
864
  setSerial() {
856
- E(this, F, !0), E(this, tt, !0), E(this, et, !1);
865
+ E(this, F, !0), E(this, et, !0), E(this, At, !1);
857
866
  }
858
867
  setParallel() {
859
- E(this, F, !1), E(this, tt, !1), E(this, et, !0);
868
+ E(this, F, !1), E(this, et, !1), E(this, At, !0);
860
869
  }
861
870
  stop() {
862
- E(this, q, !1);
871
+ E(this, v, !1);
863
872
  }
864
873
  async batch(A, e) {
865
- o(this, j) && _(this, mt, jt).call(this), e && E(this, v, e), o(this, tt) === !1 && E(this, F, !1), Object.keys(A).length > 500 && E(this, F, !0), E(this, q, !0), E(this, K, []), E(this, Y, {}), this.errors = {}, this.answerData = {};
866
- const n = _(this, Nt, Zt).call(this, A);
867
- if (Object.keys(A).length < 500) {
868
- const i = n.map((h, l) => _(this, _t, Vt).call(this, h, n[l]));
869
- return Promise.allSettled(i).then((h) => {
874
+ o(this, Q) && _(this, ft, Qt).call(this), e && E(this, $, e), o(this, et) === !1 && E(this, F, !1), Object.keys(A).length > o(this, j) && E(this, F, !0), E(this, v, !0), E(this, q, []), E(this, Y, {}), this.errors = {}, this.answerData = {};
875
+ const n = _(this, _t, Vt).call(this, A);
876
+ if (Object.keys(A).length < o(this, j)) {
877
+ const r = n.map((h, l) => _(this, Ot, zt).call(this, h, n[l]));
878
+ return Promise.allSettled(r).then((h) => {
870
879
  let l = {};
871
880
  for (let O of h)
872
881
  O.status === "fulfilled" && (l = { ...l, ...O.value });
873
882
  return l;
874
883
  });
875
884
  } else {
876
- let i = {}, h = 0, l = 1, O = Object.keys(A).length || 1, u = (r) => {
877
- h += Object.keys(r).length, l = Math.round(h / O * 100);
885
+ let r = {}, h = 0, l = 1, O = Object.keys(A).length || 1, u = (i) => {
886
+ h += Object.keys(i).length, l = Math.round(h / O * 100);
878
887
  };
879
- for (let [r, g] of Object.entries(n)) {
880
- let S = await _(this, _t, Vt).call(this, g, n[r], !0);
881
- u(g), e && e({ percent: l }), i = { ...i, ...S };
888
+ for (let [i, T] of Object.entries(n)) {
889
+ let g = await _(this, Ot, zt).call(this, T, n[i], !0);
890
+ u(T), e && e({ percent: l }), r = { ...r, ...g };
882
891
  }
883
- return i;
892
+ return r;
884
893
  }
885
894
  }
886
895
  async batchTotalCount(A, e) {
887
896
  E(this, Y, {}), this.errors = {};
888
- let n = 1, i = 0, h = Object.keys(A).length || 1, l = (u) => {
889
- i += Object.keys(u).length, n = Math.round(i / h * 100);
897
+ let n = 1, r = 0, h = Object.keys(A).length || 1, l = (u) => {
898
+ r += Object.keys(u).length, n = Math.round(r / h * 100);
890
899
  };
891
900
  e && e({ percent: n });
892
- const O = _(this, Nt, Zt).call(this, A);
893
- if (o(this, et)) {
894
- const u = O.map((r) => _(this, Ot, zt).call(this, r).then((g) => (l(r), e && e({ percent: n }), g)));
895
- return Promise.allSettled(u).then((r) => {
896
- let g = {};
897
- for (let S of r)
898
- S.status === "fulfilled" && (g = { ...g, ...S.value });
899
- return g;
901
+ const O = _(this, _t, Vt).call(this, A);
902
+ if (o(this, At)) {
903
+ const u = O.map((i) => _(this, yt, Kt).call(this, i).then((T) => (l(i), e && e({ percent: n }), T)));
904
+ return Promise.allSettled(u).then((i) => {
905
+ let T = {};
906
+ for (let g of i)
907
+ g.status === "fulfilled" && (T = { ...T, ...g.value });
908
+ return T;
900
909
  });
901
910
  } else {
902
911
  let u = {};
903
- for (let r of O) {
904
- let g = await _(this, Ot, zt).call(this, r);
905
- l(r), e && e({ percent: n }), u = { ...u, ...g };
912
+ for (let i of O) {
913
+ let T = await _(this, yt, Kt).call(this, i);
914
+ l(i), e && e({ percent: n }), u = { ...u, ...T };
906
915
  }
907
916
  return u;
908
917
  }
909
918
  }
910
919
  }
911
- z = new WeakMap(), ut = new WeakMap(), K = new WeakMap(), Y = new WeakMap(), k = new WeakMap(), q = new WeakMap(), v = new WeakMap(), B = new WeakMap(), j = new WeakMap(), Bt = new WeakMap(), $ = new WeakMap(), F = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), it = new WeakSet(), Ht = function() {
920
+ K = new WeakMap(), mt = new WeakMap(), q = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), j = new WeakMap(), v = new WeakMap(), $ = new WeakMap(), I = new WeakMap(), Q = new WeakMap(), It = new WeakMap(), tt = new WeakMap(), F = new WeakMap(), et = new WeakMap(), At = new WeakMap(), nt = new WeakSet(), Dt = function() {
912
921
  let A = 0;
913
- if (!o(this, B))
922
+ if (!o(this, I))
914
923
  return Math.round(A);
915
924
  let e = 0, n = 0;
916
- return Object.values(o(this, B)).forEach((i) => {
917
- const { total: h, count: l } = i;
925
+ return Object.values(o(this, I)).forEach((r) => {
926
+ const { total: h, count: l } = r;
918
927
  e += h ?? 0, n += l ?? 0;
919
928
  }), e ? A = n / e * 100 : A = 100, { percent: Math.round(A), allCount: n, allTotal: e };
920
- }, mt = new WeakSet(), jt = function() {
921
- clearInterval(o(this, j)), E(this, j, ""), E(this, B, ""), E(this, v, ""), E(this, $, "no");
922
- }, ft = new WeakSet(), Qt = function({ key: A, value: e }) {
923
- const n = _(this, At, lt).call(this, e.data()), i = Array.isArray(n) ? n.length : 0, h = _(this, ot, Yt).call(this, e.total(), i);
929
+ }, ft = new WeakSet(), Qt = function() {
930
+ clearInterval(o(this, Q)), E(this, Q, ""), E(this, I, ""), E(this, $, ""), E(this, tt, "no");
931
+ }, Nt = new WeakSet(), Zt = function({ key: A, value: e }) {
932
+ const n = _(this, st, ut).call(this, e.data()), r = Array.isArray(n) ? n.length : 0, h = _(this, at, Bt).call(this, e.total(), r);
924
933
  let l = 1;
925
- n && (l = i), o(this, v) && (o(this, B) || E(this, B, {}), o(this, B)[A] && o(this, B)[A].count && (l += o(this, B)[A].count), o(this, B)[A] = { total: h, count: l }, o(this, j) || E(this, j, setInterval(() => {
926
- const { percent: O, allCount: u, allTotal: r } = o(this, it, Ht);
927
- (o(this, $) === "no" || o(this, $) < o(this, it, Ht).percent) && (o(this, v).call(this, {
928
- data: o(this, B),
934
+ n && (l = r), o(this, $) && (o(this, I) || E(this, I, {}), o(this, I)[A] && o(this, I)[A].count && (l += o(this, I)[A].count), o(this, I)[A] = { total: h, count: l }, o(this, Q) || E(this, Q, setInterval(() => {
935
+ const { percent: O, allCount: u, allTotal: i } = o(this, nt, Dt);
936
+ (o(this, tt) === "no" || o(this, tt) < o(this, nt, Dt).percent) && (o(this, $).call(this, {
937
+ data: o(this, I),
929
938
  percent: O,
930
939
  allCount: u,
931
- allTotal: r
932
- }), E(this, $, o(this, it, Ht).percent)), O === 100 && _(this, mt, jt).call(this);
933
- }, o(this, Bt))));
934
- }, Nt = new WeakSet(), Zt = function(A) {
940
+ allTotal: i
941
+ }), E(this, tt, o(this, nt, Dt).percent)), O === 100 && _(this, ft, Qt).call(this);
942
+ }, o(this, It))));
943
+ }, _t = new WeakSet(), Vt = function(A) {
935
944
  const e = [], n = Object.entries(A);
936
- for (let i = 0; i < n.length; i += o(this, k)) {
937
- const h = n.slice(i, i + o(this, k));
945
+ for (let r = 0; r < n.length; r += o(this, W)) {
946
+ const h = n.slice(r, r + o(this, W));
938
947
  e.push(Object.fromEntries(h));
939
948
  }
940
949
  return e;
941
- }, _t = new WeakSet(), Vt = function(A, e, n) {
942
- return new Promise((i) => {
943
- const h = _(this, gt, $t).call(this, e), l = [];
950
+ }, Ot = new WeakSet(), zt = function(A, e, n) {
951
+ return new Promise((r) => {
952
+ const h = _(this, Tt, te).call(this, e), l = [];
944
953
  let O = 0, u = 0;
945
- o(this, z).call(this, A, (r) => {
946
- Object.entries(r).forEach(([g, S]) => {
954
+ o(this, K).call(this, A, (i) => {
955
+ Object.entries(i).forEach(([T, g]) => {
947
956
  let m = {};
948
- const f = S.error();
949
- if (f) {
950
- let { query: { method: J }, answer: P } = S;
951
- this.errors[g] = { error: f, method: J }, O += 1;
957
+ const N = g.error();
958
+ if (N) {
959
+ let { query: { method: k }, answer: P } = g;
960
+ this.errors[T] = { error: N, method: k }, O += 1;
952
961
  }
953
- if (S != null && S.answer && Object.keys(S.answer).length) {
954
- for (let [J, P] of Object.entries(S.answer))
955
- J != "result" && P && (m[J] = P);
956
- Object.keys(m).length && (this.answerData[g] = m);
962
+ if (g != null && g.answer && Object.keys(g.answer).length) {
963
+ for (let [k, P] of Object.entries(g.answer))
964
+ k != "result" && P && (m[k] = P);
965
+ Object.keys(m).length && (this.answerData[T] = m);
957
966
  }
958
- const G = _(this, At, lt).call(this, S.data()), at = Array.isArray(G) ? G.length : 0, V = _(this, ot, Yt).call(this, S.total(), at);
959
- if (Array.isArray(G) ? o(this, Y)[g] = G : typeof G == "object" && G !== null && Object.keys(G).length === 0 ? o(this, Y)[g] = [] : o(this, Y)[g] = G, u += V, n || _(this, ft, Qt).call(this, { key: g, value: S }), V > o(this, k) && V > at) {
960
- const J = Math.ceil(V / o(this, k)) - 1, P = Array.from({ length: J });
961
- l.push([g, h[g], P]);
967
+ const G = _(this, st, ut).call(this, g.data()), ht = Array.isArray(G) ? G.length : 0, z = _(this, at, Bt).call(this, g.total(), ht);
968
+ if (Array.isArray(G) ? o(this, Y)[T] = G : typeof G == "object" && G !== null && Object.keys(G).length === 0 ? o(this, Y)[T] = [] : o(this, Y)[T] = G, u += z, n || _(this, Nt, Zt).call(this, { key: T, value: g }), z > o(this, W) && z > ht) {
969
+ const k = Math.ceil(z / o(this, W)) - 1, P = Array.from({ length: k });
970
+ l.push([T, h[T], P]);
962
971
  }
963
- }), u > 5e3 && o(this, tt) === !1 && o(this, et) === !1 && E(this, F, !0), O > 0 && _(this, Tt, te).call(this), l.length ? (_(this, It, Ae).call(this, l), _(this, Ut, se).call(this).then(() => i(_(this, nt, Dt).call(this)))) : i(_(this, nt, Dt).call(this));
972
+ }), u > 5e3 && o(this, et) === !1 && o(this, At) === !1 && E(this, F, !0), O > 0 && _(this, Rt, ee).call(this), l.length ? (_(this, Ut, se).call(this, l), _(this, Gt, ie).call(this).then(() => r(_(this, ot, Yt).call(this)))) : r(_(this, ot, Yt).call(this));
964
973
  });
965
974
  });
966
- }, Ot = new WeakSet(), zt = function(A) {
975
+ }, yt = new WeakSet(), Kt = function(A) {
967
976
  return new Promise((e) => {
968
- const n = _(this, gt, $t).call(this, A);
969
- let i = 0;
970
- o(this, z).call(this, n, (h) => {
977
+ const n = _(this, Tt, te).call(this, A);
978
+ let r = 0;
979
+ o(this, K).call(this, n, (h) => {
971
980
  Object.entries(h).forEach(([l, O]) => {
972
981
  const u = O.error();
973
- u && (this.errors[l] = u, i += 1);
974
- const r = _(this, At, lt).call(this, O.data()), g = Array.isArray(r) ? r.length : 0, S = _(this, ot, Yt).call(this, O.total(), g);
975
- o(this, Y)[l] = S;
976
- }), i > 0 && _(this, Tt, te).call(this), e(_(this, nt, Dt).call(this));
982
+ u && (this.errors[l] = u, r += 1);
983
+ const i = _(this, st, ut).call(this, O.data()), T = Array.isArray(i) ? i.length : 0, g = _(this, at, Bt).call(this, O.total(), T);
984
+ o(this, Y)[l] = g;
985
+ }), r > 0 && _(this, Rt, ee).call(this), e(_(this, ot, Yt).call(this));
977
986
  });
978
987
  });
979
- }, It = new WeakSet(), Ae = function(A) {
988
+ }, Ut = new WeakSet(), se = function(A) {
980
989
  let e = [];
981
- A.forEach(([n, i, h]) => {
990
+ A.forEach(([n, r, h]) => {
982
991
  h.forEach((l, O) => {
983
- const u = O + 1, r = o(this, k) * u, S = [[n, u].join("_"), _(this, Gt, re).call(this, i, r)];
984
- e.length === o(this, k) ? (o(this, K).push(e), e = [S]) : e.push(S);
992
+ const u = O + 1, i = o(this, W) * u, g = [[n, u].join("_"), _(this, wt, re).call(this, r, i)];
993
+ e.length === o(this, W) ? (o(this, q).push(e), e = [g]) : e.push(g);
985
994
  });
986
- }), e.length && o(this, K).push(e);
987
- }, Ut = new WeakSet(), se = function() {
988
- const A = [], e = [], n = (i) => {
989
- Object.entries(i).forEach(([h, l]) => {
990
- const [O] = h.split("_"), u = _(this, At, lt).call(this, l.data());
991
- Array.isArray(u) && o(this, Y)[O].push(...u), _(this, ft, Qt).call(this, { key: O, value: l });
995
+ }), e.length && o(this, q).push(e);
996
+ }, Gt = new WeakSet(), ie = function() {
997
+ const A = [], e = [], n = (r) => {
998
+ Object.entries(r).forEach(([h, l]) => {
999
+ const [O] = h.split("_"), u = _(this, st, ut).call(this, l.data());
1000
+ Array.isArray(u) && o(this, Y)[O].push(...u), _(this, Nt, Zt).call(this, { key: O, value: l });
992
1001
  });
993
1002
  };
994
- return o(this, K).forEach((i, h) => {
995
- const l = Object.fromEntries(i), O = () => new Promise((u) => o(this, z).call(this, l, (r) => {
996
- o(this, F) ? n(r) : e[h] = r, u();
1003
+ return o(this, q).forEach((r, h) => {
1004
+ const l = Object.fromEntries(r), O = () => new Promise((u) => o(this, K).call(this, l, (i) => {
1005
+ o(this, F) ? n(i) : e[h] = i, u();
997
1006
  }));
998
1007
  A.push(O);
999
- }), o(this, F) ? _(this, dt, qt).call(this, A) : _(this, Et, vt).call(this, A).then(() => {
1008
+ }), o(this, F) ? _(this, Et, vt).call(this, A) : _(this, gt, $t).call(this, A).then(() => {
1000
1009
  e.forEach(n);
1001
1010
  });
1002
- }, yt = new WeakSet(), Kt = function() {
1011
+ }, dt = new WeakSet(), qt = function() {
1003
1012
  return new Promise((A) => setTimeout(A, 500));
1004
- }, dt = new WeakSet(), qt = function(A) {
1013
+ }, Et = new WeakSet(), vt = function(A) {
1005
1014
  if (!A.length)
1006
1015
  return Promise.resolve();
1007
1016
  const e = A.shift();
1008
1017
  return Promise.allSettled([
1009
1018
  e(),
1010
- _(this, yt, Kt).call(this)
1011
- ]).then(() => o(this, q) ? _(this, dt, qt).call(this, A) : Promise.resolve());
1012
- }, Et = new WeakSet(), vt = function(A) {
1019
+ _(this, dt, qt).call(this)
1020
+ ]).then(() => o(this, v) ? _(this, Et, vt).call(this, A) : Promise.resolve());
1021
+ }, gt = new WeakSet(), $t = function(A) {
1013
1022
  if (!A.length)
1014
1023
  return Promise.resolve();
1015
1024
  const e = A.shift();
1016
- return _(this, yt, Kt).call(this).then(() => e()).then(() => o(this, q) ? _(this, Et, vt).call(this, A) : Promise.resolve());
1017
- }, nt = new WeakSet(), Dt = function() {
1018
- return Object.entries(o(this, ut)).forEach(([A, e]) => {
1025
+ return _(this, dt, qt).call(this).then(() => e()).then(() => o(this, v) ? _(this, gt, $t).call(this, A) : Promise.resolve());
1026
+ }, ot = new WeakSet(), Yt = function() {
1027
+ return Object.entries(o(this, mt)).forEach(([A, e]) => {
1019
1028
  o(this, Y)[A] && (o(this, Y)[A] = e(o(this, Y)[A]));
1020
1029
  }), o(this, Y);
1021
- }, gt = new WeakSet(), $t = function(A) {
1022
- return Object.entries(A).reduce((e, [n, i]) => {
1023
- if (Array.isArray(i)) {
1024
- const [h, l = {}] = i;
1030
+ }, Tt = new WeakSet(), te = function(A) {
1031
+ return Object.entries(A).reduce((e, [n, r]) => {
1032
+ if (Array.isArray(r)) {
1033
+ const [h, l = {}] = r;
1025
1034
  e[n] = [h, l];
1026
1035
  } else {
1027
- const { method: h, params: l = {} } = i;
1036
+ const { method: h, params: l = {} } = r;
1028
1037
  e[n] = [h, l];
1029
1038
  }
1030
1039
  return e;
1031
1040
  }, {});
1032
- }, Gt = new WeakSet(), re = function(A, e) {
1033
- const [n, i] = A;
1034
- return [n, { start: e, ...i }];
1035
- }, At = new WeakSet(), lt = function(A) {
1041
+ }, wt = new WeakSet(), re = function(A, e) {
1042
+ const [n, r] = A;
1043
+ return [n, { start: e, ...r }];
1044
+ }, st = new WeakSet(), ut = function(A) {
1036
1045
  return ((A == null ? void 0 : A.items) || (A == null ? void 0 : A.documents)) ?? A;
1037
- }, ot = new WeakSet(), Yt = function(A, e) {
1046
+ }, at = new WeakSet(), Bt = function(A, e) {
1038
1047
  return A !== A && (A = 0), A === 0 && e === 0 ? 0 : A || e;
1039
- }, Tt = new WeakSet(), te = function() {
1048
+ }, Rt = new WeakSet(), ee = function() {
1040
1049
  console.group(`${this.constructor.name}: Ошибки в методах!`), Object.entries(this.errors).forEach(([A, e]) => {
1041
- console.info(`[${A}]`, e.toString());
1050
+ console.info(`[${A}]`, e);
1042
1051
  }), console.groupEnd();
1043
1052
  };
1044
- var st;
1045
- class ie {
1053
+ var it;
1054
+ class ne {
1046
1055
  constructor() {
1047
- N(this, st, {});
1056
+ f(this, it, {});
1048
1057
  }
1049
1058
  get hash() {
1050
1059
  return this.createHash(8);
@@ -1053,13 +1062,13 @@ class ie {
1053
1062
  createHash(A) {
1054
1063
  let e = "abcdefghijklmnopqrstuvwxyz0123456789", n = "";
1055
1064
  A = A || 6;
1056
- for (let i = 0; i < A; i++)
1065
+ for (let r = 0; r < A; r++)
1057
1066
  n += e.charAt(Math.floor(Math.random() * e.length));
1058
1067
  return n;
1059
1068
  }
1060
1069
  /** Фильтр часто запускаемых действий */
1061
1070
  actionFilter({ keyTimer: A, duration: e = 10, action: n }) {
1062
- o(this, st)[A] && (clearTimeout(o(this, st)[A]), o(this, st)[A] = null), n && (o(this, st)[A] = setTimeout(() => {
1071
+ o(this, it)[A] && (clearTimeout(o(this, it)[A]), o(this, it)[A] = null), n && (o(this, it)[A] = setTimeout(() => {
1063
1072
  n();
1064
1073
  }, e));
1065
1074
  }
@@ -1078,34 +1087,34 @@ class ie {
1078
1087
  }
1079
1088
  /** Скачать данные в JSON-файл */
1080
1089
  downloadFileJson(A, e) {
1081
- let n = new Blob([JSON.stringify(A)], { type: "application/json" }), i = URL.createObjectURL(n), h = document.createElement("a");
1082
- h.style.display = "none", h.href = i, h.download = `${e}.json`, document.body.appendChild(h), h.click(), setTimeout(() => {
1083
- document.body.removeChild(h), URL.revokeObjectURL(i);
1090
+ let n = new Blob([JSON.stringify(A)], { type: "application/json" }), r = URL.createObjectURL(n), h = document.createElement("a");
1091
+ h.style.display = "none", h.href = r, h.download = `${e}.json`, document.body.appendChild(h), h.click(), setTimeout(() => {
1092
+ document.body.removeChild(h), URL.revokeObjectURL(r);
1084
1093
  }, 200);
1085
1094
  }
1086
1095
  }
1087
- st = new WeakMap();
1088
- const pt = new ie();
1089
- var W, Q, wt, rt, Rt, Z, Ct, ne, St, ee, Ft, oe, Pt, ae, Wt, he;
1090
- class ye {
1096
+ it = new WeakMap();
1097
+ const bt = new ne();
1098
+ var J, Z, Ct, rt, St, V, Ft, oe, Lt, Ae, Pt, ae, Wt, he, Jt, ce;
1099
+ class de {
1091
1100
  constructor() {
1092
- N(this, Ct);
1101
+ f(this, Ft);
1093
1102
  /** Вывод ошибок логера
1094
1103
  * @param {'entity'} type - тип ошибки
1095
1104
  */
1096
- N(this, St);
1097
- N(this, Ft);
1098
- N(this, Pt);
1099
- N(this, Wt);
1100
- N(this, W, "logger");
1101
- N(this, Q, !1);
1102
- N(this, wt, 2e3);
1103
- N(this, rt, /* @__PURE__ */ new Map());
1104
- N(this, Rt, {});
1105
- N(this, Z, null);
1105
+ f(this, Lt);
1106
+ f(this, Pt);
1107
+ f(this, Wt);
1108
+ f(this, Jt);
1109
+ f(this, J, "logger");
1110
+ f(this, Z, !1);
1111
+ f(this, Ct, 2e3);
1112
+ f(this, rt, /* @__PURE__ */ new Map());
1113
+ f(this, St, {});
1114
+ f(this, V, null);
1106
1115
  /** Очистка хранилища элементов старше 'N' месяцев */
1107
1116
  C(this, "periodClear", 3);
1108
- _(this, Ct, ne).call(this);
1117
+ _(this, Ft, oe).call(this);
1109
1118
  }
1110
1119
  /** Инициализация логера */
1111
1120
  async init() {
@@ -1113,22 +1122,22 @@ class ye {
1113
1122
  entityList: { method: "entity.get" }
1114
1123
  });
1115
1124
  if (e != null && e.length)
1116
- if (e.find((i) => i.ENTITY == o(this, W)))
1117
- E(this, Q, !0);
1125
+ if (e.find((r) => r.ENTITY == o(this, J)))
1126
+ E(this, Z, !0);
1118
1127
  else {
1119
- let { entityAdd: i } = await A.batch({
1128
+ let { entityAdd: r } = await A.batch({
1120
1129
  entityAdd: {
1121
1130
  method: "entity.add",
1122
1131
  params: {
1123
- ENTITY: o(this, W),
1124
- NAME: o(this, W),
1132
+ ENTITY: o(this, J),
1133
+ NAME: o(this, J),
1125
1134
  ACCESS: { AU: "X" }
1126
1135
  }
1127
1136
  }
1128
1137
  });
1129
- i && E(this, Q, !0);
1138
+ r && E(this, Z, !0);
1130
1139
  }
1131
- return _(this, Pt, ae).call(this), o(this, Q);
1140
+ return _(this, Wt, he).call(this), o(this, Z);
1132
1141
  }
1133
1142
  /**
1134
1143
  * @param {{ type: 'call'|'batch'|'batch-total-count';
@@ -1140,15 +1149,15 @@ class ye {
1140
1149
  * @returns {string}
1141
1150
  */
1142
1151
  start({ type: A, data: e }) {
1143
- if (!o(this, Q)) {
1144
- _(this, St, ee).call(this, "entity");
1152
+ if (!o(this, Z)) {
1153
+ _(this, Lt, Ae).call(this, "entity");
1145
1154
  return;
1146
1155
  }
1147
- const n = pt.hash;
1156
+ const n = bt.hash;
1148
1157
  return o(this, rt).set(n, {
1149
1158
  type: A,
1150
1159
  data: e,
1151
- userInfo: o(this, Rt),
1160
+ userInfo: o(this, St),
1152
1161
  errorList: [],
1153
1162
  status: "",
1154
1163
  answer: null,
@@ -1162,17 +1171,17 @@ class ye {
1162
1171
  * status: 'success'|'fail'|'fail-runtime',
1163
1172
  * answer: { [key]: unknown } }}
1164
1173
  */
1165
- stop({ key: A, errorList: e, status: n, answer: i }) {
1166
- if (!o(this, Q)) {
1167
- _(this, St, ee).call(this, "entity");
1174
+ stop({ key: A, errorList: e, status: n, answer: r }) {
1175
+ if (!o(this, Z)) {
1176
+ _(this, Lt, Ae).call(this, "entity");
1168
1177
  return;
1169
1178
  }
1170
1179
  let h = o(this, rt).get(A);
1171
- e && (h.errorList = e), n && (h.status = n), i && (h.answer = i), pt.actionFilter({
1180
+ e && (h.errorList = e), n && (h.status = n), r && (h.answer = r), bt.actionFilter({
1172
1181
  keyTimer: "add.entity.items",
1173
- duration: o(this, wt),
1182
+ duration: o(this, Ct),
1174
1183
  action: () => {
1175
- _(this, Ft, oe).call(this);
1184
+ _(this, Pt, ae).call(this);
1176
1185
  }
1177
1186
  });
1178
1187
  }
@@ -1180,14 +1189,14 @@ class ye {
1180
1189
  * @param { ({percent}:{percent:number})=>{} } progressCall - коллбэк
1181
1190
  */
1182
1191
  async getEntityList(A) {
1183
- var i;
1184
- if ((i = o(this, Z)) != null && i.length)
1185
- return o(this, Z);
1192
+ var r;
1193
+ if ((r = o(this, V)) != null && r.length)
1194
+ return o(this, V);
1186
1195
  let e = new x(BX24.callBatch), { entityList: n } = await e.batch({
1187
1196
  entityList: {
1188
1197
  method: "entity.item.get",
1189
1198
  params: {
1190
- ENTITY: o(this, W),
1199
+ ENTITY: o(this, J),
1191
1200
  SORT: { ID: "DESC" }
1192
1201
  }
1193
1202
  }
@@ -1203,70 +1212,70 @@ class ye {
1203
1212
  }
1204
1213
  /** Выгрузка всех данных из хранилища в JSON-файл */
1205
1214
  async downAllEntityJson() {
1206
- let A = await this.getEntityList(), e = bt().format("%Y-%m-%d");
1207
- pt.downloadFileJson(A, `sdklogger-entity-data__${e}`);
1215
+ let A = await this.getEntityList(), e = Ht().format("%Y-%m-%d");
1216
+ bt.downloadFileJson(A, `sdklogger-entity-data__${e}`);
1208
1217
  }
1209
1218
  }
1210
- W = new WeakMap(), Q = new WeakMap(), wt = new WeakMap(), rt = new WeakMap(), Rt = new WeakMap(), Z = new WeakMap(), Ct = new WeakSet(), ne = async function() {
1219
+ J = new WeakMap(), Z = new WeakMap(), Ct = new WeakMap(), rt = new WeakMap(), St = new WeakMap(), V = new WeakMap(), Ft = new WeakSet(), oe = async function() {
1211
1220
  const A = new x(BX24.callBatch), e = BX24.isAdmin(), { curUser: n } = await A.batch({
1212
1221
  curUser: { method: "user.current" }
1213
1222
  });
1214
- E(this, Rt, { isAdmin: e, curUser: n });
1215
- }, St = new WeakSet(), ee = function(A) {
1216
- A == "entity" && pt.actionFilter({
1223
+ E(this, St, { isAdmin: e, curUser: n });
1224
+ }, Lt = new WeakSet(), Ae = function(A) {
1225
+ A == "entity" && bt.actionFilter({
1217
1226
  keyTimer: "error.logger.entity",
1218
1227
  duration: 500,
1219
1228
  action: () => {
1220
1229
  console.error("Хранилище для логгера не инициализировано");
1221
1230
  }
1222
1231
  });
1223
- }, Ft = new WeakSet(), oe = async function() {
1232
+ }, Pt = new WeakSet(), ae = async function() {
1224
1233
  let A = {}, e = new x(BX24.callBatch);
1225
- for (let [n, i] of o(this, rt).entries())
1226
- i.status && (A[n] = {
1234
+ for (let [n, r] of o(this, rt).entries())
1235
+ r.status && (A[n] = {
1227
1236
  method: "entity.item.add",
1228
1237
  params: {
1229
- ENTITY: o(this, W),
1230
- NAME: o(this, W),
1231
- DETAIL_TEXT: JSON.stringify(i)
1238
+ ENTITY: o(this, J),
1239
+ NAME: o(this, J),
1240
+ DETAIL_TEXT: JSON.stringify(r)
1232
1241
  }
1233
1242
  });
1234
1243
  if (Object.keys(A).length) {
1235
- let n = await e.batch(A), { errors: i } = e;
1236
- for (let [h, l] of Object.entries({ ...n, ...i }))
1244
+ let n = await e.batch(A), { errors: r } = e;
1245
+ for (let [h, l] of Object.entries({ ...n, ...r }))
1237
1246
  o(this, rt).delete(h);
1238
1247
  }
1239
- }, Pt = new WeakSet(), ae = async function() {
1248
+ }, Wt = new WeakSet(), he = async function() {
1240
1249
  let A = new x(BX24.callBatch), { serverTime: e } = await A.batch({
1241
1250
  serverTime: { method: "server.time" }
1242
1251
  });
1243
- o(this, Z) || E(this, Z, await this.getEntityList());
1244
- let n = o(this, Z).filter((i) => {
1245
- let { dateCreate: h } = i;
1246
- return bt(new Date(h)).between(bt(new Date(e)), "month") >= this.periodClear;
1252
+ o(this, V) || E(this, V, await this.getEntityList());
1253
+ let n = o(this, V).filter((r) => {
1254
+ let { dateCreate: h } = r;
1255
+ return Ht(new Date(h)).between(Ht(new Date(e)), "month") >= this.periodClear;
1247
1256
  });
1248
- _(this, Wt, he).call(this, n);
1249
- }, Wt = new WeakSet(), he = async function(A) {
1250
- let e = new x(BX24.callBatch), n = A.map((i) => {
1251
- let { id: h } = i;
1257
+ _(this, Jt, ce).call(this, n);
1258
+ }, Jt = new WeakSet(), ce = async function(A) {
1259
+ let e = new x(BX24.callBatch), n = A.map((r) => {
1260
+ let { id: h } = r;
1252
1261
  return {
1253
1262
  method: "entity.item.delete",
1254
1263
  params: {
1255
- ENTITY: o(this, W),
1264
+ ENTITY: o(this, J),
1256
1265
  ID: h
1257
1266
  }
1258
1267
  };
1259
1268
  });
1260
1269
  return await e.batch(n);
1261
1270
  };
1262
- const U = new ye();
1263
- var Jt, ce, kt, le;
1264
- class Ee {
1271
+ const B = new de();
1272
+ var kt, le, Xt, ue;
1273
+ class ge {
1265
1274
  constructor(A) {
1266
1275
  /** Запрос данных о приложении */
1267
- N(this, Jt);
1276
+ f(this, kt);
1268
1277
  /** Запрос данных о текущем пользователе */
1269
- N(this, kt);
1278
+ f(this, Xt);
1270
1279
  C(this, "domain", "");
1271
1280
  C(this, "isAdmin", !1);
1272
1281
  C(this, "appInfo", null);
@@ -1280,12 +1289,12 @@ class Ee {
1280
1289
  return new Promise((A) => {
1281
1290
  let e = setInterval(() => {
1282
1291
  window.BX24 && BX24.init(async () => {
1283
- console.info("init BX24"), clearInterval(e), this.domain = BX24.getDomain(), this.isAdmin = BX24.isAdmin(), this.placeInfo = BX24.placement.info(), await U.init();
1284
- const [n, i] = await Promise.all([
1285
- _(this, Jt, ce).call(this),
1286
- _(this, kt, le).call(this)
1292
+ console.info("init BX24"), clearInterval(e), this.domain = BX24.getDomain(), this.isAdmin = BX24.isAdmin(), this.placeInfo = BX24.placement.info(), await B.init();
1293
+ const [n, r] = await Promise.all([
1294
+ _(this, kt, le).call(this),
1295
+ _(this, Xt, ue).call(this)
1287
1296
  ]);
1288
- this.appInfo = n, this.userInfo = i, new ie().noSleep(), A(!0);
1297
+ this.appInfo = n, this.userInfo = r, new ne().noSleep(), A(!0);
1289
1298
  });
1290
1299
  }, 100);
1291
1300
  });
@@ -1312,7 +1321,7 @@ class Ee {
1312
1321
  * }[]
1313
1322
  */
1314
1323
  call({ method: A, params: e, updateList: n }) {
1315
- let i = U.start({
1324
+ let r = B.start({
1316
1325
  type: "call",
1317
1326
  data: { method: A, params: e, updateList: n }
1318
1327
  });
@@ -1320,21 +1329,21 @@ class Ee {
1320
1329
  e || (e = {}), BX24.callMethod(A, e, function(l) {
1321
1330
  let O = {};
1322
1331
  if (l != null && l.answer)
1323
- for (let [u, r] of Object.entries(l.answer))
1324
- u != "result" && r && (O[u] = r);
1332
+ for (let [u, i] of Object.entries(l.answer))
1333
+ u != "result" && i && (O[u] = i);
1325
1334
  if (l.error()) {
1326
1335
  let u = l.error();
1327
- console.error(u), U.stop({
1336
+ console.error(u), B.stop({
1328
1337
  answer: O,
1329
- key: i,
1338
+ key: r,
1330
1339
  status: "fail",
1331
1340
  errorList: [u.toSting()]
1332
1341
  }), h(!1);
1333
1342
  } else {
1334
1343
  let u = l.data();
1335
- u != null && u.items && (u = u.items), U.stop({
1344
+ u != null && u.items && (u = u.items), B.stop({
1336
1345
  answer: O,
1337
- key: i,
1346
+ key: r,
1338
1347
  status: "success"
1339
1348
  }), h(u);
1340
1349
  }
@@ -1360,38 +1369,43 @@ class Ee {
1360
1369
  * }[]
1361
1370
  * }}
1362
1371
  */
1363
- async batch(A, e, { updateList: n, errorCall: i } = {}) {
1364
- let h = new x(BX24.callBatch), l = U.start({
1372
+ async batch(A, e, { updateList: n, errorCall: r, limitCommandSerial: h } = {}) {
1373
+ let l = new x(BX24.callBatch), O = B.start({
1365
1374
  type: "batch",
1366
1375
  data: { commandList: A, updateList: n }
1367
1376
  });
1377
+ h && (l.limitCommandSerial = h);
1368
1378
  try {
1369
- let O = await h.batch(A, e);
1370
- if (Object.keys(h.errors).length) {
1371
- let u = Object.entries(h.errors).map(([r, g]) => ({
1372
- key: r,
1373
- error: g.toSting()
1374
- }));
1375
- i && i(h.errors), U.stop({
1376
- key: l,
1379
+ let u = await l.batch(A, e);
1380
+ if (Object.keys(l.errors).length) {
1381
+ let i = Object.entries(l.errors).map(([T, g]) => {
1382
+ var m;
1383
+ return {
1384
+ key: T,
1385
+ error: `${g == null ? void 0 : g.method} ${(m = g == null ? void 0 : g.error) == null ? void 0 : m.toString()}`.trim()
1386
+ };
1387
+ });
1388
+ r && r(l.errors), B.stop({
1389
+ key: O,
1377
1390
  status: "fail",
1378
- errorList: u,
1379
- answer: h.answerData
1391
+ errorList: i,
1392
+ answer: l.answerData
1380
1393
  });
1381
1394
  } else
1382
- U.stop({
1383
- key: l,
1395
+ B.stop({
1396
+ key: O,
1384
1397
  status: "success",
1385
- answer: h.answerData
1398
+ answer: l.answerData
1386
1399
  });
1387
- return O;
1388
- } catch (O) {
1389
- return U.stop({
1390
- key: l,
1400
+ return u;
1401
+ } catch (u) {
1402
+ let i = u == null ? void 0 : u.toString();
1403
+ return B.stop({
1404
+ key: O,
1391
1405
  status: "fail-runtime",
1392
- errorList: [O.toSting()],
1393
- answer: h.answerData
1394
- }), console.error(O), !1;
1406
+ errorList: [i],
1407
+ answer: l.answerData
1408
+ }), console.error(u), !1;
1395
1409
  }
1396
1410
  }
1397
1411
  /**
@@ -1399,7 +1413,7 @@ class Ee {
1399
1413
  * @param progressCall - callback(data), в data приходят данные о загрузке данных
1400
1414
  */
1401
1415
  async batchTotalCount(A, e) {
1402
- let n = new x(BX24.callBatch), i = U.start({
1416
+ let n = new x(BX24.callBatch), r = B.start({
1403
1417
  type: "batch",
1404
1418
  data: { commandList: A }
1405
1419
  });
@@ -1410,20 +1424,20 @@ class Ee {
1410
1424
  key: O,
1411
1425
  error: u.toSting()
1412
1426
  }));
1413
- U.stop({
1414
- key: i,
1427
+ B.stop({
1428
+ key: r,
1415
1429
  status: "fail",
1416
1430
  errorList: l
1417
1431
  });
1418
1432
  } else
1419
- U.stop({
1420
- key: i,
1433
+ B.stop({
1434
+ key: r,
1421
1435
  status: "success"
1422
1436
  });
1423
1437
  return h;
1424
1438
  } catch (h) {
1425
- return U.stop({
1426
- key: i,
1439
+ return B.stop({
1440
+ key: r,
1427
1441
  status: "fail",
1428
1442
  errorList: [h.toSting()]
1429
1443
  }), console.error(h), !1;
@@ -1436,9 +1450,9 @@ class Ee {
1436
1450
  /** Встройка приложения в place */
1437
1451
  async placementBind(A) {
1438
1452
  this.placeData || (this.placeData = await this.getPlacement());
1439
- const { appName: e, pathApp: n } = this.appConst, i = this.placeData.map((l) => l.placement);
1453
+ const { appName: e, pathApp: n } = this.appConst, r = this.placeData.map((l) => l.placement);
1440
1454
  let h = this.placeData.find((l) => l.placement == A);
1441
- i.includes(A) ? h.handler != n && (window.placementUnBind || (window.placementUnBind = {}), window.placementUnBind[A] || this.placementUnBind(h).then(() => {
1455
+ r.includes(A) ? h.handler != n && (window.placementUnBind || (window.placementUnBind = {}), window.placementUnBind[A] || this.placementUnBind(h).then(() => {
1442
1456
  window.placementUnBind[A] || (window.placementUnBind[A] = !0, this.placementBind(A));
1443
1457
  })) : this.call({
1444
1458
  method: "placement.bind",
@@ -1469,7 +1483,7 @@ class Ee {
1469
1483
  }
1470
1484
  }
1471
1485
  }
1472
- }).then((i) => (console.log("Встройка отвязана", A), i));
1486
+ }).then((r) => (console.log("Встройка отвязана", A), r));
1473
1487
  }
1474
1488
  /** Чат-бот */
1475
1489
  /* получение списка ботов */
@@ -1484,7 +1498,7 @@ class Ee {
1484
1498
  }
1485
1499
  /* регистрация бота */
1486
1500
  regBot({ code: A, type: e, name: n }) {
1487
- const { appName: i, pathApp: h, chatBotLogo: l } = this.appConst, O = this.appInfo.ID;
1501
+ const { appName: r, pathApp: h, chatBotLogo: l } = this.appConst, O = this.appInfo.ID;
1488
1502
  return this.call({
1489
1503
  method: "imbot.register",
1490
1504
  params: {
@@ -1500,7 +1514,7 @@ class Ee {
1500
1514
  // строковый идентификатор чат-бота, используется только в режиме Вебхуков
1501
1515
  PROPERTIES: {
1502
1516
  // Личные данные чат-бота (обяз.)
1503
- NAME: `${n ?? i} - бот #${O}`,
1517
+ NAME: `${n ?? r} - бот #${O}`,
1504
1518
  // Имя чат-бота (обязательное одно из полей NAME или LAST_NAME)
1505
1519
  LAST_NAME: "",
1506
1520
  // Фамилия чат-бота (обязательное одно из полей NAME или LAST_NAME)
@@ -1508,7 +1522,7 @@ class Ee {
1508
1522
  // Цвет чат-бота для мобильного приложения RED, GREEN, MINT, LIGHT_BLUE, DARK_BLUE, PURPLE, AQUA, PINK, LIME, BROWN, AZURE, KHAKI, SAND, MARENGO, GRAY, GRAPHITE
1509
1523
  EMAIL: "",
1510
1524
  // E-mail для связи. НЕЛЬЗЯ использовать e-mail, дублирующий e-mail реальных пользователей
1511
- PERSONAL_BIRTHDAY: bt().format("%Y-%m-%d"),
1525
+ PERSONAL_BIRTHDAY: Ht().format("%Y-%m-%d"),
1512
1526
  // День рождения в формате YYYY-mm-dd
1513
1527
  WORK_POSITION: "Почтальон",
1514
1528
  // Занимаемая должность, используется как описание чат-бота
@@ -1531,16 +1545,20 @@ class Ee {
1531
1545
  }
1532
1546
  }).then((e) => (console.log("чат-бот удален", e), e));
1533
1547
  }
1548
+ /* Получение данных логера */
1549
+ getLoggerList(A) {
1550
+ return B.getEntityList(A);
1551
+ }
1534
1552
  }
1535
- Jt = new WeakSet(), ce = function() {
1553
+ kt = new WeakSet(), le = function() {
1536
1554
  return this.call({ method: "app.info" });
1537
- }, kt = new WeakSet(), le = function() {
1555
+ }, Xt = new WeakSet(), ue = function() {
1538
1556
  return this.call({ method: "user.current" });
1539
1557
  };
1540
1558
  export {
1541
1559
  x as Batch,
1542
- Ee as BxBoot,
1543
- ie as BxHelper,
1544
- ye as BxLogger,
1545
- bt as tempus
1560
+ ge as BxBoot,
1561
+ ne as BxHelper,
1562
+ de as BxLogger,
1563
+ Ht as tempus
1546
1564
  };