@dxtmisha/functional-basic 0.2.0 → 0.5.2

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/library.js CHANGED
@@ -1,7 +1,7 @@
1
- var Rt = Object.defineProperty;
2
- var Pt = (i, t, e) => t in i ? Rt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var c = (i, t, e) => Pt(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { geo as Wt } from "@dxtmisha/media";
1
+ var Pt = Object.defineProperty;
2
+ var Wt = (i, t, e) => t in i ? Pt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var c = (i, t, e) => Wt(i, typeof t != "symbol" ? t + "" : t, e);
4
+ import { geo as Ut } from "@dxtmisha/media";
5
5
  function L(i, t) {
6
6
  return t ? Object.assign({}, i, t) : Object.assign({}, i);
7
7
  }
@@ -51,10 +51,10 @@ function D(i, t) {
51
51
  }
52
52
  return !1;
53
53
  }
54
- function C(i) {
54
+ function k(i) {
55
55
  return m(i) && !Array.isArray(i);
56
56
  }
57
- function z(i) {
57
+ function R(i) {
58
58
  return typeof i == "string";
59
59
  }
60
60
  function j(i) {
@@ -63,7 +63,7 @@ function j(i) {
63
63
  function l() {
64
64
  return typeof window != "undefined" && !!window.document;
65
65
  }
66
- function at(i) {
66
+ function ct(i) {
67
67
  switch (typeof i) {
68
68
  case "number":
69
69
  return !0;
@@ -73,7 +73,7 @@ function at(i) {
73
73
  return !1;
74
74
  }
75
75
  }
76
- function k(i) {
76
+ function C(i) {
77
77
  if (typeof i == "number")
78
78
  return i;
79
79
  if (!i)
@@ -81,18 +81,21 @@ function k(i) {
81
81
  let t = i.replace(/[^\d., ]+/ig, "");
82
82
  return t.match(/( [0-9]{3}[ ,.]|[0-9] [0-9])/ig) ? t = t.replace(/ /ig, "").replace(/,/ig, ".") : t.match(/,[0-9]{3}[,.]/ig) ? t = t.replace(/,/ig, "") : t.match(/[.][0-9]{3}[,.]/ig) ? t = t.replace(/[.]/ig, "").replace(/,/ig, ".") : t = t.replace(/,/ig, "."), parseFloat(t);
83
83
  }
84
- function it(i, t) {
85
- return q(i) ? !1 : Array.isArray(t) ? t.includes(i) : at(i) && at(t) ? k(i) === k(t) : i === t;
84
+ function st(i, t) {
85
+ return q(i) ? !1 : Array.isArray(t) ? t.includes(i) : ct(i) && ct(t) ? C(i) === C(t) : i === t;
86
86
  }
87
- function Ct(i) {
87
+ function At(i) {
88
88
  return i instanceof Function || typeof i == "function";
89
89
  }
90
- function E(i) {
91
- return Ct(i) ? i() : i;
90
+ function I(i) {
91
+ return At(i) ? i() : i;
92
92
  }
93
- const T = {};
94
- let ct = "ui-storage";
95
- class O {
93
+ function rt() {
94
+ return location.href.startsWith("data:");
95
+ }
96
+ const G = {};
97
+ let ut = "ui-storage";
98
+ class T {
96
99
  /**
97
100
  * Constructor
98
101
  * @param name value name/ название значения
@@ -103,9 +106,9 @@ class O {
103
106
  c(this, "age");
104
107
  this.name = t, this.isSession = e;
105
108
  const s = `${e ? "session" : "storage"}#${t}`;
106
- if (s in T)
107
- return T[s];
108
- this.make(), T[s] = this;
109
+ if (s in G)
110
+ return G[s];
111
+ this.make(), G[s] = this;
109
112
  }
110
113
  /**
111
114
  * Changing the prefix in key names. Should be called at the beginning of the code.
@@ -114,7 +117,7 @@ class O {
114
117
  * @param newPrefix new prefix/ новый префикс
115
118
  */
116
119
  static setPrefix(t) {
117
- ct = t;
120
+ ut = t;
118
121
  }
119
122
  /**
120
123
  * Getting data from local storage.
@@ -137,7 +140,7 @@ class O {
137
140
  */
138
141
  set(t) {
139
142
  var e;
140
- return this.value = E(t), this.age = (/* @__PURE__ */ new Date()).getTime(), this.value === void 0 ? this.remove() : (e = this.getMethod()) == null || e.setItem(this.getIndex(), JSON.stringify({
143
+ return this.value = I(t), this.age = (/* @__PURE__ */ new Date()).getTime(), this.value === void 0 ? this.remove() : (e = this.getMethod()) == null || e.setItem(this.getIndex(), JSON.stringify({
141
144
  value: this.value,
142
145
  age: this.age
143
146
  })), this.value;
@@ -174,7 +177,7 @@ class O {
174
177
  * Возвращает объект для работы с хранилищем.
175
178
  */
176
179
  getMethod() {
177
- if (l()) {
180
+ if (l() && !rt()) {
178
181
  const t = this.isSession ? window == null ? void 0 : window.sessionStorage : window == null ? void 0 : window.localStorage;
179
182
  if (t)
180
183
  return t;
@@ -186,7 +189,7 @@ class O {
186
189
  * Получение имени ключа в хранилище.
187
190
  */
188
191
  getIndex() {
189
- return `${ct}__${this.name}`;
192
+ return `${ut}__${this.name}`;
190
193
  }
191
194
  /**
192
195
  * Getting data from storage.
@@ -278,7 +281,7 @@ const jt = "geo-code", p = class p {
278
281
  * Возвращает полный список стран.
279
282
  */
280
283
  static getList() {
281
- return Wt;
284
+ return Ut;
282
285
  }
283
286
  /**
284
287
  * Returns the data about the country by its full code.
@@ -299,7 +302,7 @@ const jt = "geo-code", p = class p {
299
302
  */
300
303
  static getByCodeFull(t) {
301
304
  return this.getList().find(
302
- (e) => it(t, [
305
+ (e) => st(t, [
303
306
  `${e.language}-${e.country}`,
304
307
  `${e.country}-${e.language}`
305
308
  ])
@@ -435,27 +438,27 @@ const jt = "geo-code", p = class p {
435
438
  });
436
439
  }
437
440
  };
438
- c(p, "storage", new O(jt)), c(p, "location"), c(p, "item"), c(p, "language"), c(p, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), p.location = p.findLocation(), p.language = p.findLanguage(p.location), p.item = p.getByCode(p.location);
439
- let b = p;
440
- function At(i) {
441
+ c(p, "storage", new T(jt)), c(p, "location"), c(p, "item"), c(p, "language"), c(p, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), p.location = p.findLocation(), p.language = p.findLanguage(p.location), p.item = p.getByCode(p.location);
442
+ let w = p;
443
+ function Nt(i) {
441
444
  return l() && i === window;
442
445
  }
443
446
  function A(i) {
444
447
  var t;
445
448
  if (l())
446
- return At(i) ? document.body : z(i) ? (t = document.querySelector(i)) != null ? t : void 0 : i;
449
+ return Nt(i) ? document.body : R(i) ? (t = document.querySelector(i)) != null ? t : void 0 : i;
447
450
  }
448
- function ut(i) {
449
- return At(i) ? i : A(i);
451
+ function ht(i) {
452
+ return Nt(i) ? i : A(i);
450
453
  }
451
- function Ut(i) {
454
+ function Ht(i) {
452
455
  var t;
453
456
  return !!((t = A(i)) != null && t.closest("html"));
454
457
  }
455
- function H(i) {
458
+ function z(i) {
456
459
  return Array.isArray(i) ? i : [i];
457
460
  }
458
- class ht {
461
+ class lt {
459
462
  /**
460
463
  * Classes Constructor
461
464
  * @param elementSelector element/ элемент
@@ -497,7 +500,7 @@ class ht {
497
500
  */
498
501
  c(this, "listenerRecent", (t) => {
499
502
  var e, s;
500
- Ut(this.elementControl) ? ((e = this.listener) == null || e.call(this.element, t, this.detail), m(this.options) && ((s = this.options) != null && s.once) && this.stop()) : this.stop();
503
+ Ht(this.elementControl) ? ((e = this.listener) == null || e.call(this.element, t, this.detail), m(this.options) && ((s = this.options) != null && s.once) && this.stop()) : this.stop();
501
504
  });
502
505
  /**
503
506
  * Event states.
@@ -506,7 +509,7 @@ class ht {
506
509
  */
507
510
  c(this, "activity", !1);
508
511
  c(this, "activityItems", []);
509
- this.listener = s, this.options = n, this.detail = o, this.element = ut(t), this.elementControl = A(t), this.type = H(e);
512
+ this.listener = s, this.options = n, this.detail = o, this.element = ht(t), this.elementControl = A(t), this.type = z(e);
510
513
  }
511
514
  /**
512
515
  * Checks whether event listening is currently enabled.
@@ -526,7 +529,7 @@ class ht {
526
529
  * @param elementSelector element/ элемент
527
530
  */
528
531
  setElement(t) {
529
- const e = ut(t);
532
+ const e = ht(t);
530
533
  return this.elementControlEdit || (this.elementControl = A(t)), this.element = e, this.reset(), this;
531
534
  }
532
535
  /**
@@ -545,7 +548,7 @@ class ht {
545
548
  * @param type type/ тип
546
549
  */
547
550
  setType(t) {
548
- return this.type = H(t), this.reset(), this;
551
+ return this.type = z(t), this.reset(), this;
549
552
  }
550
553
  /**
551
554
  * Modifies the object that receives the notification.
@@ -691,7 +694,7 @@ class ht {
691
694
  return !1;
692
695
  }
693
696
  }
694
- const lt = "ui-loading", K = class K {
697
+ const dt = "ui-loading", V = class V {
695
698
  /**
696
699
  * Check if the loader is active now.
697
700
  *
@@ -726,7 +729,7 @@ const lt = "ui-loading", K = class K {
726
729
  * @param element element/ элемент
727
730
  */
728
731
  static registrationEvent(t, e) {
729
- l() && new ht(window, lt, t).setElementControl(e).start();
732
+ l() && new lt(window, dt, t).setElementControl(e).start();
730
733
  }
731
734
  /**
732
735
  * Calls the event listener.
@@ -738,8 +741,8 @@ const lt = "ui-loading", K = class K {
738
741
  (t = this.event) == null || t.dispatch({ loading: this.is() });
739
742
  }
740
743
  };
741
- c(K, "value", 0), c(K, "event"), l() && (K.event = new ht(window, lt));
742
- let x = K;
744
+ c(V, "value", 0), c(V, "event"), l() && (V.event = new lt(window, dt));
745
+ let x = V;
743
746
  class zt {
744
747
  constructor() {
745
748
  /** Default headers/ Заголовки по умолчанию */
@@ -767,11 +770,11 @@ class zt {
767
770
  * Изменяет данные заголовка по умолчанию.
768
771
  */
769
772
  set(t) {
770
- return C(t) && (this.headers = t), this;
773
+ return k(t) && (this.headers = t), this;
771
774
  }
772
775
  }
773
776
  var S = /* @__PURE__ */ ((i) => (i.get = "GET", i.post = "POST", i.put = "PUT", i.delete = "DELETE", i))(S || {});
774
- class Ht {
777
+ class Zt {
775
778
  constructor() {
776
779
  /** Default request data/ Данные запроса по умолчанию */
777
780
  c(this, "value");
@@ -803,7 +806,7 @@ class Ht {
803
806
  if (e) {
804
807
  if (t instanceof FormData)
805
808
  this.addByFormData(t, e);
806
- else if (C(t))
809
+ else if (k(t))
807
810
  return L(e, t);
808
811
  }
809
812
  return t;
@@ -828,7 +831,7 @@ class Ht {
828
831
  t.has(s) || t.set(s, e[s]);
829
832
  }
830
833
  }
831
- class Zt {
834
+ class Vt {
832
835
  constructor() {
833
836
  c(this, "value");
834
837
  }
@@ -923,7 +926,7 @@ class Zt {
923
926
  * @param response response data/ данные ответа
924
927
  */
925
928
  setLastResponse(t) {
926
- return t && C(t) && "message" in t && this.setLastMessage(String(t.message)), this.set({ lastResponse: t }), this;
929
+ return t && k(t) && "message" in t && this.setLastMessage(String(t.message)), this.set({ lastResponse: t }), this;
927
930
  }
928
931
  /**
929
932
  * Sets messages from the last request.
@@ -946,14 +949,14 @@ class Zt {
946
949
  }
947
950
  }
948
951
  async function Kt(i) {
949
- const t = E(i);
952
+ const t = I(i);
950
953
  return t instanceof Promise ? await t : t;
951
954
  }
952
955
  function Y(i, t) {
953
956
  return Math.floor(Math.random() * (t - i + 1) + i);
954
957
  }
955
- const dt = "d-response-loading";
956
- class Vt {
958
+ const gt = "d-response-loading";
959
+ class Yt {
957
960
  /**
958
961
  * Constructor
959
962
  * @param requestDefault default request processor/ процессор запросов по умолчанию
@@ -996,7 +999,7 @@ class Vt {
996
999
  * @param response data for caching/ данные для кеширования
997
1000
  */
998
1001
  add(t) {
999
- return this.response.push(...H(t)), this;
1002
+ return this.response.push(...z(t)), this;
1000
1003
  }
1001
1004
  /**
1002
1005
  * Sets developer mode.
@@ -1033,7 +1036,7 @@ class Vt {
1033
1036
  * @param item cached item/ кешированный элемент
1034
1037
  */
1035
1038
  isDisable(t) {
1036
- return !!E(t == null ? void 0 : t.disable);
1039
+ return !!I(t == null ? void 0 : t.disable);
1037
1040
  }
1038
1041
  /**
1039
1042
  * Checks if the path matches the cached one.
@@ -1073,7 +1076,7 @@ class Vt {
1073
1076
  */
1074
1077
  isResponse(t, e) {
1075
1078
  const s = this.requestDefault.request(t == null ? void 0 : t.request);
1076
- return e === s || s === "*any" || D(e) && D(s) && C(e) && C(s) && !(e instanceof FormData) && !(s instanceof FormData) && Object.values(e).length === Object.values(s).length && Object.entries(s).reduce(
1079
+ return e === s || s === "*any" || D(e) && D(s) && k(e) && k(s) && !(e instanceof FormData) && !(s instanceof FormData) && Object.values(e).length === Object.values(s).length && Object.entries(s).reduce(
1077
1080
  (n, [o, a]) => n && (a === (e == null ? void 0 : e[o]) || a === "*any"),
1078
1081
  !0
1079
1082
  );
@@ -1088,7 +1091,7 @@ class Vt {
1088
1091
  fetch(t, e) {
1089
1092
  return this.startResponseLoading(), new Promise((s) => {
1090
1093
  Kt(
1091
- Ct(t.response) ? t.response(e) : t.response
1094
+ At(t.response) ? t.response(e) : t.response
1092
1095
  ).then((n) => {
1093
1096
  t != null && t.lag ? (x.show(), setTimeout(() => {
1094
1097
  this.stopResponseLoading(), s(n), x.hide();
@@ -1102,7 +1105,7 @@ class Vt {
1102
1105
  * Включить загрузку для эмуляции запроса.
1103
1106
  */
1104
1107
  startResponseLoading() {
1105
- this.loading && clearTimeout(this.loading), l() && document.body.classList.add(dt);
1108
+ this.loading && clearTimeout(this.loading), l() && document.body.classList.add(gt);
1106
1109
  }
1107
1110
  /**
1108
1111
  * Disable loading for request emulation.
@@ -1111,11 +1114,11 @@ class Vt {
1111
1114
  */
1112
1115
  stopResponseLoading() {
1113
1116
  this.loading = setTimeout(() => {
1114
- this.loading = void 0, l() && document.body.classList.remove(dt);
1117
+ this.loading = void 0, l() && document.body.classList.remove(gt);
1115
1118
  }, 1200);
1116
1119
  }
1117
1120
  }
1118
- class Yt {
1121
+ class qt {
1119
1122
  constructor() {
1120
1123
  /** Function for call before the request/ Функция для вызова перед запросом */
1121
1124
  c(this, "callback");
@@ -1186,7 +1189,7 @@ class Yt {
1186
1189
  return this.callbackEnd && (e = await this.callbackEnd(t)), e;
1187
1190
  }
1188
1191
  }
1189
- const w = class w {
1192
+ const b = class b {
1190
1193
  /**
1191
1194
  * Is the server local.
1192
1195
  *
@@ -1219,7 +1222,7 @@ const w = class w {
1219
1222
  * @param api adding a path to the site’s API/ добавление пути к API сайта
1220
1223
  */
1221
1224
  static getUrl(t, e = !0) {
1222
- return `${e ? this.url : ""}${t}`.replace("{locale}", b.getLocation()).replace("{country}", b.getCountry()).replace("{language}", b.getLanguage());
1225
+ return `${e ? this.url : ""}${t}`.replace("{locale}", w.getLocation()).replace("{country}", w.getCountry()).replace("{language}", w.getLanguage());
1223
1226
  }
1224
1227
  /**
1225
1228
  * Getting data for the body.
@@ -1232,7 +1235,7 @@ const w = class w {
1232
1235
  if (t instanceof FormData)
1233
1236
  return t;
1234
1237
  if (e !== S.get && D(t))
1235
- return z(t) ? t : JSON.stringify(t);
1238
+ return R(t) ? t : JSON.stringify(t);
1236
1239
  }
1237
1240
  /**
1238
1241
  * Getting data for the body of the get method.
@@ -1256,7 +1259,7 @@ const w = class w {
1256
1259
  * Изменяет данные заголовка по умолчанию.
1257
1260
  */
1258
1261
  static setHeaders(t) {
1259
- return this.headers.set(t), w;
1262
+ return this.headers.set(t), b;
1260
1263
  }
1261
1264
  /**
1262
1265
  * Modifies the default request data.
@@ -1264,7 +1267,7 @@ const w = class w {
1264
1267
  * Изменяет данные запроса по умолчанию.
1265
1268
  */
1266
1269
  static setRequestDefault(t) {
1267
- return this.requestDefault.set(t), w;
1270
+ return this.requestDefault.set(t), b;
1268
1271
  }
1269
1272
  /**
1270
1273
  * Change the base path to the script.
@@ -1273,7 +1276,7 @@ const w = class w {
1273
1276
  * @param url path to the script/ путь к скрипту
1274
1277
  */
1275
1278
  static setUrl(t) {
1276
- return this.url = t, w;
1279
+ return this.url = t, b;
1277
1280
  }
1278
1281
  /**
1279
1282
  * The function is modified for a call before the request.
@@ -1282,7 +1285,7 @@ const w = class w {
1282
1285
  * @param callback function for call/ функция для вызова
1283
1286
  */
1284
1287
  static setPreparation(t) {
1285
- return this.preparation.set(t), w;
1288
+ return this.preparation.set(t), b;
1286
1289
  }
1287
1290
  /**
1288
1291
  * Modify the function after the request.
@@ -1291,7 +1294,7 @@ const w = class w {
1291
1294
  * @param callback function for call/ функция для вызова
1292
1295
  */
1293
1296
  static setEnd(t) {
1294
- return this.preparation.setEnd(t), w;
1297
+ return this.preparation.setEnd(t), b;
1295
1298
  }
1296
1299
  /**
1297
1300
  * To execute a request.
@@ -1300,7 +1303,7 @@ const w = class w {
1300
1303
  * @param pathRequest query string or list of parameters/ строка запроса или список параметров
1301
1304
  */
1302
1305
  static async request(t) {
1303
- return z(t) ? await this.fetch({
1306
+ return R(t) ? await this.fetch({
1304
1307
  path: t
1305
1308
  }) : await this.fetch(t);
1306
1309
  }
@@ -1411,11 +1414,11 @@ const w = class w {
1411
1414
  headers: u = {},
1412
1415
  type: h = "application/json;charset=UTF-8",
1413
1416
  init: f = {}
1414
- } = t, d = o != null ? o : this.getUrl(n, s), I = `${d}${this.getBodyForGet(e, d, a)}`, Q = this.headers.get(u, h), X = L(f, {
1417
+ } = t, d = o != null ? o : this.getUrl(n, s), E = `${d}${this.getBodyForGet(e, d, a)}`, Q = this.headers.get(u, h), M = L(f, {
1415
1418
  method: a,
1416
1419
  body: this.getBody(e, a)
1417
1420
  });
1418
- return Q && (X.headers = Q), await fetch(I, X);
1421
+ return Q && (M.headers = Q), await fetch(E, M);
1419
1422
  }
1420
1423
  /**
1421
1424
  * Transforms data if needed.
@@ -1425,8 +1428,8 @@ const w = class w {
1425
1428
  * @param toData is it necessary to process the data/ нужно ли обрабатывать данные
1426
1429
  */
1427
1430
  static makeData(t, e) {
1428
- if (this.status.setLastResponse(t), t && e && C(t) && "data" in t) {
1429
- if (C(t.data)) {
1431
+ if (this.status.setLastResponse(t), t && e && k(t) && "data" in t) {
1432
+ if (k(t.data)) {
1430
1433
  const s = L(t.data);
1431
1434
  return "success" in t && (s.success = t.success), s;
1432
1435
  }
@@ -1435,9 +1438,9 @@ const w = class w {
1435
1438
  return t;
1436
1439
  }
1437
1440
  };
1438
- c(w, "url", "/api/"), c(w, "headers", new zt()), c(w, "requestDefault", new Ht()), c(w, "status", new Zt()), c(w, "response", new Vt(w.requestDefault)), c(w, "preparation", new Yt());
1439
- let U = w;
1440
- class Se {
1441
+ c(b, "url", "/api/"), c(b, "headers", new zt()), c(b, "requestDefault", new Zt()), c(b, "status", new Vt()), c(b, "response", new Yt(b.requestDefault)), c(b, "preparation", new qt());
1442
+ let H = b;
1443
+ class Ce {
1441
1444
  /**
1442
1445
  * Constructor
1443
1446
  * @param name channel name/ название канала
@@ -1457,7 +1460,7 @@ class Se {
1457
1460
  });
1458
1461
  if (this.callback = e, l())
1459
1462
  try {
1460
- this.channel = new BroadcastChannel(`${qt()}__${t}`), this.channel.onmessage = this.update;
1463
+ this.channel = new BroadcastChannel(`${Jt()}__${t}`), this.channel.onmessage = this.update;
1461
1464
  } catch (s) {
1462
1465
  console.error(`BroadcastMessage ${t}:`, s);
1463
1466
  }
@@ -1482,8 +1485,8 @@ class Se {
1482
1485
  return this.callback = t, this;
1483
1486
  }
1484
1487
  }
1485
- const qt = () => new O("__broadcast-name").get(() => `name_${Y(1e6, 9999999)}`);
1486
- class Jt {
1488
+ const Jt = () => new T("__broadcast-name").get(() => `name_${Y(1e6, 9999999)}`);
1489
+ class Qt {
1487
1490
  /**
1488
1491
  * Constructor
1489
1492
  * @param callback function for the cache/ функция для кэша
@@ -1546,7 +1549,7 @@ class Jt {
1546
1549
  return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, s) => e !== t[s]) >= 0 ? (this.comparisons = [...t], !0) : !1;
1547
1550
  }
1548
1551
  }
1549
- class Qt {
1552
+ class Mt {
1550
1553
  constructor() {
1551
1554
  c(this, "cache", {});
1552
1555
  }
@@ -1580,10 +1583,10 @@ class Qt {
1580
1583
  * @param callback function for the cache/ функция для кэша
1581
1584
  */
1582
1585
  getCacheItem(t, e) {
1583
- return t in this.cache || (this.cache[t] = new Jt(e)), this.cache[t];
1586
+ return t in this.cache || (this.cache[t] = new Qt(e)), this.cache[t];
1584
1587
  }
1585
1588
  }
1586
- const _ = class _ {
1589
+ const O = class O {
1587
1590
  /**
1588
1591
  * Getting data for the cache, and if there is no cache, it performs a function to save the cache.
1589
1592
  *
@@ -1596,9 +1599,9 @@ const _ = class _ {
1596
1599
  return this.cache.get(t, e, s);
1597
1600
  }
1598
1601
  };
1599
- c(_, "cache"), _.cache = new Qt();
1600
- let gt = _;
1601
- function Nt(i, t = !1) {
1602
+ c(O, "cache"), O.cache = new Mt();
1603
+ let ft = O;
1604
+ function It(i, t = !1) {
1602
1605
  if (typeof i == "string") {
1603
1606
  const e = i.trim();
1604
1607
  switch (e) {
@@ -1650,14 +1653,14 @@ class Et {
1650
1653
  this.storage.set(t);
1651
1654
  }
1652
1655
  }
1653
- c(Et, "storage", new O(Xt));
1654
- const M = {}, ot = class ot {
1656
+ c(Et, "storage", new T(Xt));
1657
+ const X = {}, at = class at {
1655
1658
  constructor(t) {
1656
1659
  c(this, "value");
1657
1660
  c(this, "options", {});
1658
- if (this.name = t, t in G)
1659
- return G[t];
1660
- this.value = M == null ? void 0 : M[t], G[t] = this;
1661
+ if (this.name = t, t in tt)
1662
+ return tt[t];
1663
+ this.value = X == null ? void 0 : X[t], tt[t] = this;
1661
1664
  }
1662
1665
  /**
1663
1666
  * Get data or update if none.
@@ -1677,7 +1680,7 @@ const M = {}, ot = class ot {
1677
1680
  * @param options additional parameters/ дополнительные параметры
1678
1681
  */
1679
1682
  set(t, e) {
1680
- this.value = E(t), Object.assign(this.options, e), this.update();
1683
+ this.value = I(t), Object.assign(this.options, e), this.update();
1681
1684
  }
1682
1685
  /**
1683
1686
  * Delete cookie data.
@@ -1703,7 +1706,7 @@ const M = {}, ot = class ot {
1703
1706
  */
1704
1707
  update() {
1705
1708
  var t, e, s, n, o;
1706
- if (l() && !Et.get()) {
1709
+ if (l() && !rt() && !Et.get()) {
1707
1710
  const a = String((t = this.value) != null ? t : "");
1708
1711
  document.cookie = [
1709
1712
  `${encodeURIComponent(this.name)}=${encodeURIComponent(a)}`,
@@ -1721,27 +1724,27 @@ const M = {}, ot = class ot {
1721
1724
  static updateData() {
1722
1725
  for (const t of document.cookie.split(";")) {
1723
1726
  const [e, s] = t.trim().split("=");
1724
- e && D(s) && (M[e] = Nt(s));
1727
+ e && D(s) && (X[e] = It(s));
1725
1728
  }
1726
1729
  }
1727
1730
  };
1728
- l() && ot.updateData();
1729
- let ft = ot;
1730
- const G = {};
1731
+ l() && !rt() && at.updateData();
1732
+ let mt = at;
1733
+ const tt = {};
1731
1734
  function B(i) {
1732
- var n, o, a, u, h, f, d, I;
1735
+ var n, o, a, u, h, f, d, E;
1733
1736
  if (i instanceof Date)
1734
1737
  return i;
1735
1738
  if (q(i))
1736
1739
  return /* @__PURE__ */ new Date();
1737
1740
  if (typeof i == "number")
1738
1741
  return new Date(i);
1739
- let t = i, e = b.getTimezoneFormat();
1740
- i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (Q, X, xt) => (t = X, e = xt, Q));
1741
- const s = (I = (d = (f = (h = (u = (a = (o = (n = /^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) != null ? n : /^\d{4}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00`) != null ? o : /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(t) && t.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6")) != null ? a : /^\d{4}-\d{2}-\d{2}$/.exec(t) && `${t}T00:00:00`) != null ? u : /^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) != null ? h : /^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) != null ? f : /^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) != null ? d : /^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) != null ? I : t.replace(" ", "T");
1742
- return /* @__PURE__ */ new Date(`${s}${e}`);
1742
+ let t = i, e = w.getTimezoneFormat().trim();
1743
+ i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (Q, M, Rt) => (t = M, e = Rt.trim(), Q));
1744
+ const s = (E = (d = (f = (h = (u = (a = (o = (n = /^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) != null ? n : /^\d{4}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00`) != null ? o : /^\d{4}\d{2}\d{2} \d{2}:\d{2}:\d{2}$/.exec(t) && t.replace(/^(\d{4})(\d{2})(\d{2}) (\d{2}):(\d{2}):(\d{2})$/, "$1-$2-$3T$4:$5:$6")) != null ? a : /^\d{4}-\d{2}-\d{2}$/.exec(t) && `${t}T00:00:00`) != null ? u : /^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) != null ? h : /^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) != null ? f : /^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) != null ? d : /^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) != null ? E : t.replace(" ", "T");
1745
+ return /* @__PURE__ */ new Date(`${s.trim()}${e}`);
1743
1746
  }
1744
- function Mt(i, t) {
1747
+ function _t(i, t) {
1745
1748
  return g(i, (e) => e == null ? void 0 : e[t]);
1746
1749
  }
1747
1750
  class J {
@@ -1750,13 +1753,13 @@ class J {
1750
1753
  * @param code country code, full form language-country or one of them/
1751
1754
  * код страны, полный вид язык-страна или один из них
1752
1755
  */
1753
- constructor(t = b.getLocation()) {
1756
+ constructor(t = w.getLocation()) {
1754
1757
  c(this, "geo");
1755
- this.geo = b.find(t);
1758
+ this.geo = w.find(t);
1756
1759
  const e = this.getLocation();
1757
- if (e in tt)
1758
- return tt[e];
1759
- tt[e] = this;
1760
+ if (e in et)
1761
+ return et[e];
1762
+ et[e] = this;
1760
1763
  }
1761
1764
  /**
1762
1765
  * Returns an instance of the class according to the specified country code.
@@ -1765,7 +1768,7 @@ class J {
1765
1768
  * @param code country code, full form language-country or one of them/
1766
1769
  * код страны, полный вид язык-страна или один из них
1767
1770
  */
1768
- static getInstance(t = b.getLocation()) {
1771
+ static getInstance(t = w.getLocation()) {
1769
1772
  return new J(t);
1770
1773
  }
1771
1774
  /**
@@ -1818,7 +1821,7 @@ class J {
1818
1821
  type: "language",
1819
1822
  style: e
1820
1823
  };
1821
- return this.display(b.getByCode(t).language, s);
1824
+ return this.display(w.getByCode(t).language, s);
1822
1825
  }
1823
1826
  /**
1824
1827
  * Get display names of region.
@@ -1873,7 +1876,7 @@ class J {
1873
1876
  */
1874
1877
  number(t, e) {
1875
1878
  var s, n;
1876
- return ((n = (s = this.numberObject(e)) == null ? void 0 : s.format) == null ? void 0 : n.call(s, k(t))) || t.toString();
1879
+ return ((n = (s = this.numberObject(e)) == null ? void 0 : s.format) == null ? void 0 : n.call(s, C(t))) || t.toString();
1877
1880
  }
1878
1881
  /**
1879
1882
  * Decimal point symbol.
@@ -1901,8 +1904,8 @@ class J {
1901
1904
  }, o = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...a) => (n.currency = String(a[2]).toUpperCase(), String(a[1])));
1902
1905
  if (s) {
1903
1906
  const a = this.numberObject(n);
1904
- return a ? Mt(
1905
- a.formatToParts(k(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
1907
+ return a ? _t(
1908
+ a.formatToParts(C(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
1906
1909
  "value"
1907
1910
  ).join("") : t.toString();
1908
1911
  } else return "currency" in n ? this.number(
@@ -1956,8 +1959,8 @@ class J {
1956
1959
  * в форматировании блока
1957
1960
  */
1958
1961
  sizeFile(t, e = "byte") {
1959
- const s = k(t);
1960
- if (s > 1024 && z(e))
1962
+ const s = C(t);
1963
+ if (s > 1024 && R(e))
1961
1964
  switch (e) {
1962
1965
  case "byte":
1963
1966
  return this.sizeFile(s / 1024, "kilobyte");
@@ -1994,7 +1997,7 @@ class J {
1994
1997
  * объект с некоторыми или всеми свойствами
1995
1998
  */
1996
1999
  percentBy100(t, e) {
1997
- return this.percent(k(t) / 100, e);
2000
+ return this.percent(C(t) / 100, e);
1998
2001
  }
1999
2002
  /**
2000
2003
  * Применять форматирование, учитывающее множественное число, и языковые правила, связанные с множественным числом
@@ -2006,7 +2009,7 @@ class J {
2006
2009
  */
2007
2010
  plural(t, e, s, n) {
2008
2011
  var u;
2009
- const o = k(t), a = e.split("|");
2012
+ const o = C(t), a = e.split("|");
2010
2013
  if (a.length > 1)
2011
2014
  try {
2012
2015
  if (l()) {
@@ -2088,8 +2091,8 @@ class J {
2088
2091
  * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
2089
2092
  */
2090
2093
  relativeLimit(t, e, s, n, o, a, u) {
2091
- const h = B(t), f = s || /* @__PURE__ */ new Date(), d = new Date(f), I = new Date(f);
2092
- return d.setDate(f.getDate() - e), I.setDate(f.getDate() + e), h >= d && h <= I ? this.relative(
2094
+ const h = B(t), f = s || /* @__PURE__ */ new Date(), d = new Date(f), E = new Date(f);
2095
+ return d.setDate(f.getDate() - e), E.setDate(f.getDate() + e), h >= d && h <= E ? this.relative(
2093
2096
  h,
2094
2097
  n,
2095
2098
  f
@@ -2113,7 +2116,7 @@ class J {
2113
2116
  };
2114
2117
  try {
2115
2118
  if (l())
2116
- return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(k(t)), e);
2119
+ return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(C(t)), e);
2117
2120
  } catch (o) {
2118
2121
  console.error("relative: ", o);
2119
2122
  }
@@ -2251,15 +2254,15 @@ class J {
2251
2254
  return ["full", "datetime", "date", void 0, "year-month", "year"].indexOf(t) !== -1 && (s.year = "numeric"), ["full", "datetime", "date", void 0, "year-month", "month", "day-month"].indexOf(t) !== -1 && (s.month = e), ["full", "datetime", "date", void 0, "day", "day-month"].indexOf(t) !== -1 && (s.day = "2-digit"), t !== void 0 && (["full", "datetime", "time", "hour-minute", "hour"].indexOf(t) !== -1 && (s.hour = "2-digit"), ["full", "datetime", "time", "hour-minute", "minute"].indexOf(t) !== -1 && (s.minute = "2-digit"), ["full", "time", "second"].indexOf(t) !== -1 && (s.second = "2-digit")), s;
2252
2255
  }
2253
2256
  }
2254
- const tt = {};
2255
- class It {
2257
+ const et = {};
2258
+ class Bt {
2256
2259
  /**
2257
2260
  * Constructor
2258
2261
  * @param date date for processing/ дата для обработки
2259
2262
  * @param type type of date format for output/ тип формата даты вывода
2260
2263
  * @param code country and language code/ код страны и языка
2261
2264
  */
2262
- constructor(t, e = "date", s = b.getLocation()) {
2265
+ constructor(t, e = "date", s = w.getLocation()) {
2263
2266
  c(this, "date");
2264
2267
  c(this, "hour24", !1);
2265
2268
  c(this, "watch");
@@ -2330,10 +2333,7 @@ class It {
2330
2333
  const s = e / 60 * -1;
2331
2334
  if (t === "hour")
2332
2335
  return this.getIntl().number(Math.trunc(s), { signDisplay: "always" });
2333
- const n = this.getIntl().number(Math.trunc(s), {
2334
- signDisplay: "always",
2335
- minimumIntegerDigits: 2
2336
- }), o = s.toString().match(/.\d+/) ? "30" : "00";
2336
+ const n = this.toTimeZoneHourFormat(s), o = s.toString().match(/.\d+/) ? "30" : "00";
2337
2337
  return t === "RFC" ? `${n}${o}` : `${n}:${o}`;
2338
2338
  }
2339
2339
  /**
@@ -2479,7 +2479,7 @@ class It {
2479
2479
  * @param timeZone add time zone/ добавить временную зону
2480
2480
  */
2481
2481
  standard(t = !0) {
2482
- const e = new It(this.date, this.type, "en-GB"), s = [];
2482
+ const e = new Bt(this.date, this.type, "en-GB"), s = [];
2483
2483
  let n;
2484
2484
  return e.setHour24(!0), this.type === "hour-minute" ? n = e.locale(this.type, {
2485
2485
  year: "numeric",
@@ -2889,6 +2889,20 @@ class It {
2889
2889
  cloneDayPrevious() {
2890
2890
  return this.cloneClass().moveDayPrevious();
2891
2891
  }
2892
+ /**
2893
+ * Returns the time zone hour format.
2894
+ *
2895
+ * Возвращает часовой формат временной зоны.
2896
+ * @param hour hour/ час
2897
+ */
2898
+ toTimeZoneHourFormat(t) {
2899
+ l() && this.getIntl().number(Math.trunc(t), {
2900
+ signDisplay: "always",
2901
+ minimumIntegerDigits: 2
2902
+ });
2903
+ let e = Math.trunc(t).toString();
2904
+ return e.length < 2 && (e = `0${e}`), `${t >= 0 ? "+" : "-"}${e}`;
2905
+ }
2892
2906
  /**
2893
2907
  * Updating all values.
2894
2908
  *
@@ -2904,12 +2918,12 @@ class It {
2904
2918
  ), this;
2905
2919
  }
2906
2920
  }
2907
- const r = "@flag", P = class P {
2921
+ const r = "@flag", W = class W {
2908
2922
  /**
2909
2923
  * Constructor
2910
2924
  * @param code country and language code/ код страны и языка
2911
2925
  */
2912
- constructor(t = b.getLocation()) {
2926
+ constructor(t = w.getLocation()) {
2913
2927
  this.code = t;
2914
2928
  }
2915
2929
  /**
@@ -2920,14 +2934,14 @@ const r = "@flag", P = class P {
2920
2934
  */
2921
2935
  get(t = this.code) {
2922
2936
  var s;
2923
- const e = b.find(t);
2937
+ const e = w.find(t);
2924
2938
  if (e) {
2925
2939
  const n = this.getCountry(e);
2926
2940
  return {
2927
2941
  language: this.getLanguage(e),
2928
2942
  country: n,
2929
2943
  standard: e.standard,
2930
- icon: (s = P.flags) == null ? void 0 : s[e.country],
2944
+ icon: (s = W.flags) == null ? void 0 : s[e.country],
2931
2945
  label: n,
2932
2946
  value: e.country
2933
2947
  };
@@ -2960,7 +2974,7 @@ const r = "@flag", P = class P {
2960
2974
  */
2961
2975
  getNational(t) {
2962
2976
  return g(this.getList(t), (e) => {
2963
- const s = new P(e.standard).get(e.standard);
2977
+ const s = new W(e.standard).get(e.standard);
2964
2978
  return {
2965
2979
  ...e,
2966
2980
  description: s == null ? void 0 : s.country,
@@ -2993,7 +3007,7 @@ const r = "@flag", P = class P {
2993
3007
  * @param codes country code/ код страны
2994
3008
  */
2995
3009
  getCodes(t) {
2996
- return t != null ? t : Object.keys(P.flags);
3010
+ return t != null ? t : Object.keys(W.flags);
2997
3011
  }
2998
3012
  /**
2999
3013
  * Getting the name of the language.
@@ -3014,7 +3028,7 @@ const r = "@flag", P = class P {
3014
3028
  return this.getLocation().countryName(t.country);
3015
3029
  }
3016
3030
  };
3017
- c(P, "flags", {
3031
+ c(W, "flags", {
3018
3032
  AD: `${r}-ad`,
3019
3033
  AE: `${r}-ae`,
3020
3034
  AF: `${r}-af`,
@@ -3257,8 +3271,8 @@ c(P, "flags", {
3257
3271
  ZM: `${r}-zm`,
3258
3272
  ZW: `${r}-zw`
3259
3273
  });
3260
- let mt = P;
3261
- const W = class W {
3274
+ let yt = W;
3275
+ const U = class U {
3262
3276
  /**
3263
3277
  * Getting an object with information about the phone code and country.
3264
3278
  *
@@ -3368,12 +3382,12 @@ const W = class W {
3368
3382
  * Формирование списка для карты.
3369
3383
  */
3370
3384
  static makeList() {
3371
- const t = g(b.getList(), (e) => {
3385
+ const t = g(w.getList(), (e) => {
3372
3386
  if (e != null && e.phoneMask)
3373
3387
  return {
3374
3388
  phone: (e == null ? void 0 : e.phoneCode) && Number(e.phoneCode.replace(/[^0-9]+/, "")) || void 0,
3375
3389
  within: (e == null ? void 0 : e.phoneWithin) || 0,
3376
- mask: H(e.phoneMask),
3390
+ mask: z(e.phoneMask),
3377
3391
  value: e.country
3378
3392
  };
3379
3393
  });
@@ -3437,9 +3451,9 @@ const W = class W {
3437
3451
  return t.replace(/\*/, this.getWithinSymbol(e));
3438
3452
  }
3439
3453
  };
3440
- c(W, "list", []), c(W, "map", {}), W.makeList(), W.makeMap();
3441
- let yt = W, R;
3442
- class De {
3454
+ c(U, "list", []), c(U, "map", {}), U.makeList(), U.makeMap();
3455
+ let $t = U, P;
3456
+ class ke {
3443
3457
  /**
3444
3458
  * Returns the value by its name.
3445
3459
  *
@@ -3447,7 +3461,7 @@ class De {
3447
3461
  * @param name property name/ название свойства
3448
3462
  */
3449
3463
  static get(t) {
3450
- return R && (R == null ? void 0 : R[t]);
3464
+ return P && (P == null ? void 0 : P[t]);
3451
3465
  }
3452
3466
  /**
3453
3467
  * Adds data, this method works only once.
@@ -3456,7 +3470,7 @@ class De {
3456
3470
  * @param data global data/ глобальные данные
3457
3471
  */
3458
3472
  static add(t) {
3459
- R === void 0 && (R = L(t));
3473
+ P === void 0 && (P = L(t));
3460
3474
  }
3461
3475
  }
3462
3476
  const F = class F {
@@ -3479,7 +3493,7 @@ const F = class F {
3479
3493
  */
3480
3494
  static set(t, e) {
3481
3495
  var n;
3482
- const s = E(e);
3496
+ const s = I(e);
3483
3497
  s !== ((n = this.hash) == null ? void 0 : n[t]) && (this.hash[t] = s, this.update());
3484
3498
  }
3485
3499
  /**
@@ -3513,7 +3527,7 @@ const F = class F {
3513
3527
  const t = {};
3514
3528
  return location.hash.replace(
3515
3529
  /([\w-]+)[:=]([^;]+)/ig,
3516
- (...e) => (t[String(e[1])] = Nt(e[2]), "")
3530
+ (...e) => (t[String(e[1])] = It(e[2]), "")
3517
3531
  ), t;
3518
3532
  }
3519
3533
  /**
@@ -3540,8 +3554,8 @@ const F = class F {
3540
3554
  }
3541
3555
  };
3542
3556
  c(F, "hash", {}), c(F, "watch", {}), c(F, "block", !1), l() && (F.reload(), addEventListener("hashchange", () => F.reload()));
3543
- let $t = F;
3544
- const et = "__UI_ICON", pt = 320, bt = "--LOAD--", V = class V {
3557
+ let pt = F;
3558
+ const it = "__UI_ICON", wt = 320, bt = "--LOAD--", K = class K {
3545
3559
  /**
3546
3560
  * Checks if the given icon is in the list of connected icons.
3547
3561
  *
@@ -3564,7 +3578,7 @@ const et = "__UI_ICON", pt = 320, bt = "--LOAD--", V = class V {
3564
3578
  static async get(t, e = "", s = 1e3 * 60 * 3) {
3565
3579
  var o, a, u, h;
3566
3580
  const n = (h = (u = (o = this.icons) == null ? void 0 : o[this.getName(t)]) != null ? u : (a = this.icons) == null ? void 0 : a[t]) != null ? h : `${t.replace(/^@/, e != null ? e : this.url)}.svg`;
3567
- return typeof n == "string" ? n === bt && s > 0 ? (await this.wait(), this.get(t, e, s - pt)) : n : await n;
3581
+ return typeof n == "string" ? n === bt && s > 0 ? (await this.wait(), this.get(t, e, s - wt)) : n : await n;
3568
3582
  }
3569
3583
  /**
3570
3584
  * Returns a list of names of all registered icons.
@@ -3580,7 +3594,7 @@ const et = "__UI_ICON", pt = 320, bt = "--LOAD--", V = class V {
3580
3594
  * Возвращает глобальную ссылку.
3581
3595
  */
3582
3596
  static getUrlGlobal() {
3583
- return `${U.isLocalhost(), ""}${this.url}`;
3597
+ return `${H.isLocalhost(), ""}${this.url}`;
3584
3598
  }
3585
3599
  /**
3586
3600
  * Adding custom icons.
@@ -3644,42 +3658,42 @@ const et = "__UI_ICON", pt = 320, bt = "--LOAD--", V = class V {
3644
3658
  * Задержка выполнения скрипта.
3645
3659
  */
3646
3660
  static wait() {
3647
- return new Promise((t) => setTimeout(() => t(), pt));
3661
+ return new Promise((t) => setTimeout(() => t(), wt));
3648
3662
  }
3649
3663
  };
3650
- c(V, "icons", {}), c(V, "url", "/icons/"), l() && (et in window || (window[et] = {}), V.icons = window[et]);
3651
- let wt = V;
3652
- function _t(i, t, e) {
3664
+ c(K, "icons", {}), c(K, "url", "/icons/"), l() && (it in window || (window[it] = {}), K.icons = window[it]);
3665
+ let vt = K;
3666
+ function Ot(i, t, e) {
3653
3667
  var s, n;
3654
3668
  return (n = (s = A(i)) == null ? void 0 : s[t]) != null ? n : e;
3655
3669
  }
3656
- function Ot(i, t, e) {
3670
+ function Tt(i, t, e) {
3657
3671
  const s = A(i);
3658
3672
  if (s) {
3659
- const n = _t(s, t);
3673
+ const n = Ot(s, t);
3660
3674
  if (m(n) && m(e))
3661
3675
  g(e, (o, a) => {
3662
- n[a] = E(o);
3676
+ n[a] = I(o);
3663
3677
  });
3664
3678
  else {
3665
- const o = E(e);
3666
- !(t in s) && typeof o == "string" ? s.setAttribute(t.toString(), o) : s[t] = E(e);
3679
+ const o = I(e);
3680
+ !(t in s) && typeof o == "string" ? s.setAttribute(t.toString(), o) : s[t] = I(e);
3667
3681
  }
3668
3682
  }
3669
3683
  return s;
3670
3684
  }
3671
- function st(i, t = "div", e, s) {
3685
+ function _(i, t = "div", e, s) {
3672
3686
  if (!l())
3673
3687
  return;
3674
3688
  const n = document.createElement(t);
3675
- return typeof e == "function" ? e(n) : C(e) && g(e, (o, a) => {
3676
- Ot(n, a, o);
3689
+ return typeof e == "function" ? e(n) : k(e) && g(e, (o, a) => {
3690
+ Tt(n, a, o);
3677
3691
  }), i == null || i.insertBefore(n, s != null ? s : null), n;
3678
3692
  }
3679
- function Tt(i) {
3693
+ function Gt(i) {
3680
3694
  return i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").trim();
3681
3695
  }
3682
- class nt {
3696
+ class ot {
3683
3697
  /**
3684
3698
  * Creates an instance of MetaManager.
3685
3699
  *
@@ -3793,7 +3807,7 @@ class nt {
3793
3807
  e.content = s;
3794
3808
  else if (l()) {
3795
3809
  const o = { content: s };
3796
- this.isProperty ? o.property = t : o.name = t, st(document.head, "meta", o);
3810
+ this.isProperty ? o.property = t : o.name = t, _(document.head, "meta", o);
3797
3811
  }
3798
3812
  return this;
3799
3813
  }
@@ -3805,7 +3819,7 @@ class nt {
3805
3819
  */
3806
3820
  toHtmlString(t) {
3807
3821
  var s;
3808
- const e = Tt((s = this.items[t]) != null ? s : "");
3822
+ const e = Gt((s = this.items[t]) != null ? s : "");
3809
3823
  return e ? `<meta ${this.getAttributeName()}="${t}" content="${e}">` : "";
3810
3824
  }
3811
3825
  /**
@@ -3820,8 +3834,8 @@ class nt {
3820
3834
  }), this;
3821
3835
  }
3822
3836
  }
3823
- var v = /* @__PURE__ */ ((i) => (i.description = "description", i.keywords = "keywords", i.canonical = "canonical", i.robots = "robots", i.author = "author", i))(v || {}), Gt = /* @__PURE__ */ ((i) => (i.indexFollow = "index, follow", i.noIndexFollow = "noindex, follow", i.indexNoFollow = "index, nofollow", i.noIndexNoFollow = "noindex, nofollow", i.noArchive = "noarchive", i.noSnippet = "nosnippet", i.noImageIndex = "noimageindex", i.images = "images", i.noTranslate = "notranslate", i.noPreview = "nopreview", i.textOnly = "textonly", i.noIndexSubpages = "noindex, noarchive", i.none = "none", i))(Gt || {}), y = /* @__PURE__ */ ((i) => (i.title = "og:title", i.type = "og:type", i.url = "og:url", i.image = "og:image", i.description = "og:description", i.locale = "og:locale", i.siteName = "og:site_name", i.localeAlternate = "og:locale:alternate", i.imageUrl = "og:image:url", i.imageSecureUrl = "og:image:secure_url", i.imageType = "og:image:type", i.imageWidth = "og:image:width", i.imageHeight = "og:image:height", i.imageAlt = "og:image:alt", i.video = "og:video", i.videoUrl = "og:video:url", i.videoSecureUrl = "og:video:secure_url", i.videoType = "og:video:type", i.videoWidth = "og:video:width", i.videoHeight = "og:video:height", i.audio = "og:audio", i.audioSecureUrl = "og:audio:secure_url", i.audioType = "og:audio:type", i.articlePublishedTime = "article:published_time", i.articleModifiedTime = "article:modified_time", i.articleExpirationTime = "article:expiration_time", i.articleAuthor = "article:author", i.articleSection = "article:section", i.articleTag = "article:tag", i.bookAuthor = "book:author", i.bookIsbn = "book:isbn", i.bookReleaseDate = "book:release_date", i.bookTag = "book:tag", i.musicDuration = "music:duration", i.musicAlbum = "music:album", i.musicAlbumDisc = "music:album:disc", i.musicAlbumTrack = "music:album:track", i.musicMusician = "music:musician", i.musicSong = "music:song", i.musicSongDisc = "music:song:disc", i.musicSongTrack = "music:song:track", i.musicReleaseDate = "music:release_date", i.musicCreator = "music:creator", i.videoActor = "video:actor", i.videoActorRole = "video:actor:role", i.videoDirector = "video:director", i.videoWriter = "video:writer", i.videoDuration = "video:duration", i.videoReleaseDate = "video:release_date", i.videoTag = "video:tag", i.videoSeries = "video:series", i.profileFirstName = "profile:first_name", i.profileLastName = "profile:last_name", i.profileUsername = "profile:username", i.profileGender = "profile:gender", i.productBrand = "product:brand", i.productAvailability = "product:availability", i.productCondition = "product:condition", i.productPriceAmount = "product:price:amount", i.productPriceCurrency = "product:price:currency", i.productRetailerItemId = "product:retailer_item_id", i.productCategory = "product:category", i.productEan = "product:ean", i.productIsbn = "product:isbn", i.productMfrPartNo = "product:mfr_part_no", i.productUpc = "product:upc", i.productWeightValue = "product:weight:value", i.productWeightUnits = "product:weight:units", i.productColor = "product:color", i.productMaterial = "product:material", i.productPattern = "product:pattern", i.productAgeGroup = "product:age_group", i.productGender = "product:gender", i))(y || {}), te = /* @__PURE__ */ ((i) => (i.website = "website", i.article = "article", i.video = "video.other", i.videoTvShow = "video.tv_show", i.videoEpisode = "video.episode", i.videoMovie = "video.movie", i.musicAlbum = "music.album", i.musicPlaylist = "music.playlist", i.musicSong = "music.song", i.musicRadioStation = "music.radio_station", i.app = "app", i.product = "product", i.business = "business.business", i.place = "place", i.event = "event", i.profile = "profile", i.book = "book", i))(te || {}), ee = /* @__PURE__ */ ((i) => (i.inStock = "in stock", i.outOfStock = "out of stock", i.preorder = "preorder", i.backorder = "backorder", i.discontinued = "discontinued", i.pending = "pending", i))(ee || {}), ie = /* @__PURE__ */ ((i) => (i.new = "new", i.used = "used", i.refurbished = "refurbished", i))(ie || {}), se = /* @__PURE__ */ ((i) => (i.newborn = "newborn", i.infant = "infant", i.toddler = "toddler", i.kids = "kids", i.adult = "adult", i))(se || {}), re = /* @__PURE__ */ ((i) => (i.female = "female", i.male = "male", i.unisex = "unisex", i))(re || {}), $ = /* @__PURE__ */ ((i) => (i.card = "twitter:card", i.site = "twitter:site", i.creator = "twitter:creator", i.url = "twitter:url", i.title = "twitter:title", i.description = "twitter:description", i.image = "twitter:image", i.imageAlt = "twitter:image:alt", i.imageSrc = "twitter:image:src", i.imageWidth = "twitter:image:width", i.imageHeight = "twitter:image:height", i.label1 = "twitter:label1", i.data1 = "twitter:data1", i.label2 = "twitter:label2", i.data2 = "twitter:data2", i.appNameIphone = "twitter:app:name:iphone", i.appIdIphone = "twitter:app:id:iphone", i.appUrlIphone = "twitter:app:url:iphone", i.appNameIpad = "twitter:app:name:ipad", i.appIdIpad = "twitter:app:id:ipad", i.appUrlIpad = "twitter:app:url:ipad", i.appNameGooglePlay = "twitter:app:name:googleplay", i.appIdGooglePlay = "twitter:app:id:googleplay", i.appUrlGooglePlay = "twitter:app:url:googleplay", i.player = "twitter:player", i.playerWidth = "twitter:player:width", i.playerHeight = "twitter:player:height", i.playerStream = "twitter:player:stream", i.playerStreamContentType = "twitter:player:stream:content_type", i))($ || {}), ne = /* @__PURE__ */ ((i) => (i.summary = "summary", i.summaryLargeImage = "summary_large_image", i.app = "app", i.player = "player", i.product = "product", i.gallery = "gallery", i.photo = "photo", i.leadGeneration = "lead_generation", i.audio = "audio", i.poll = "poll", i))(ne || {});
3824
- class oe extends nt {
3837
+ var v = /* @__PURE__ */ ((i) => (i.description = "description", i.keywords = "keywords", i.canonical = "canonical", i.robots = "robots", i.author = "author", i))(v || {}), te = /* @__PURE__ */ ((i) => (i.indexFollow = "index, follow", i.noIndexFollow = "noindex, follow", i.indexNoFollow = "index, nofollow", i.noIndexNoFollow = "noindex, nofollow", i.noArchive = "noarchive", i.noSnippet = "nosnippet", i.noImageIndex = "noimageindex", i.images = "images", i.noTranslate = "notranslate", i.noPreview = "nopreview", i.textOnly = "textonly", i.noIndexSubpages = "noindex, noarchive", i.none = "none", i))(te || {}), y = /* @__PURE__ */ ((i) => (i.title = "og:title", i.type = "og:type", i.url = "og:url", i.image = "og:image", i.description = "og:description", i.locale = "og:locale", i.siteName = "og:site_name", i.localeAlternate = "og:locale:alternate", i.imageUrl = "og:image:url", i.imageSecureUrl = "og:image:secure_url", i.imageType = "og:image:type", i.imageWidth = "og:image:width", i.imageHeight = "og:image:height", i.imageAlt = "og:image:alt", i.video = "og:video", i.videoUrl = "og:video:url", i.videoSecureUrl = "og:video:secure_url", i.videoType = "og:video:type", i.videoWidth = "og:video:width", i.videoHeight = "og:video:height", i.audio = "og:audio", i.audioSecureUrl = "og:audio:secure_url", i.audioType = "og:audio:type", i.articlePublishedTime = "article:published_time", i.articleModifiedTime = "article:modified_time", i.articleExpirationTime = "article:expiration_time", i.articleAuthor = "article:author", i.articleSection = "article:section", i.articleTag = "article:tag", i.bookAuthor = "book:author", i.bookIsbn = "book:isbn", i.bookReleaseDate = "book:release_date", i.bookTag = "book:tag", i.musicDuration = "music:duration", i.musicAlbum = "music:album", i.musicAlbumDisc = "music:album:disc", i.musicAlbumTrack = "music:album:track", i.musicMusician = "music:musician", i.musicSong = "music:song", i.musicSongDisc = "music:song:disc", i.musicSongTrack = "music:song:track", i.musicReleaseDate = "music:release_date", i.musicCreator = "music:creator", i.videoActor = "video:actor", i.videoActorRole = "video:actor:role", i.videoDirector = "video:director", i.videoWriter = "video:writer", i.videoDuration = "video:duration", i.videoReleaseDate = "video:release_date", i.videoTag = "video:tag", i.videoSeries = "video:series", i.profileFirstName = "profile:first_name", i.profileLastName = "profile:last_name", i.profileUsername = "profile:username", i.profileGender = "profile:gender", i.productBrand = "product:brand", i.productAvailability = "product:availability", i.productCondition = "product:condition", i.productPriceAmount = "product:price:amount", i.productPriceCurrency = "product:price:currency", i.productRetailerItemId = "product:retailer_item_id", i.productCategory = "product:category", i.productEan = "product:ean", i.productIsbn = "product:isbn", i.productMfrPartNo = "product:mfr_part_no", i.productUpc = "product:upc", i.productWeightValue = "product:weight:value", i.productWeightUnits = "product:weight:units", i.productColor = "product:color", i.productMaterial = "product:material", i.productPattern = "product:pattern", i.productAgeGroup = "product:age_group", i.productGender = "product:gender", i))(y || {}), ee = /* @__PURE__ */ ((i) => (i.website = "website", i.article = "article", i.video = "video.other", i.videoTvShow = "video.tv_show", i.videoEpisode = "video.episode", i.videoMovie = "video.movie", i.musicAlbum = "music.album", i.musicPlaylist = "music.playlist", i.musicSong = "music.song", i.musicRadioStation = "music.radio_station", i.app = "app", i.product = "product", i.business = "business.business", i.place = "place", i.event = "event", i.profile = "profile", i.book = "book", i))(ee || {}), ie = /* @__PURE__ */ ((i) => (i.inStock = "in stock", i.outOfStock = "out of stock", i.preorder = "preorder", i.backorder = "backorder", i.discontinued = "discontinued", i.pending = "pending", i))(ie || {}), se = /* @__PURE__ */ ((i) => (i.new = "new", i.used = "used", i.refurbished = "refurbished", i))(se || {}), re = /* @__PURE__ */ ((i) => (i.newborn = "newborn", i.infant = "infant", i.toddler = "toddler", i.kids = "kids", i.adult = "adult", i))(re || {}), ne = /* @__PURE__ */ ((i) => (i.female = "female", i.male = "male", i.unisex = "unisex", i))(ne || {}), $ = /* @__PURE__ */ ((i) => (i.card = "twitter:card", i.site = "twitter:site", i.creator = "twitter:creator", i.url = "twitter:url", i.title = "twitter:title", i.description = "twitter:description", i.image = "twitter:image", i.imageAlt = "twitter:image:alt", i.imageSrc = "twitter:image:src", i.imageWidth = "twitter:image:width", i.imageHeight = "twitter:image:height", i.label1 = "twitter:label1", i.data1 = "twitter:data1", i.label2 = "twitter:label2", i.data2 = "twitter:data2", i.appNameIphone = "twitter:app:name:iphone", i.appIdIphone = "twitter:app:id:iphone", i.appUrlIphone = "twitter:app:url:iphone", i.appNameIpad = "twitter:app:name:ipad", i.appIdIpad = "twitter:app:id:ipad", i.appUrlIpad = "twitter:app:url:ipad", i.appNameGooglePlay = "twitter:app:name:googleplay", i.appIdGooglePlay = "twitter:app:id:googleplay", i.appUrlGooglePlay = "twitter:app:url:googleplay", i.player = "twitter:player", i.playerWidth = "twitter:player:width", i.playerHeight = "twitter:player:height", i.playerStream = "twitter:player:stream", i.playerStreamContentType = "twitter:player:stream:content_type", i))($ || {}), oe = /* @__PURE__ */ ((i) => (i.summary = "summary", i.summaryLargeImage = "summary_large_image", i.app = "app", i.player = "player", i.product = "product", i.gallery = "gallery", i.photo = "photo", i.leadGeneration = "lead_generation", i.audio = "audio", i.poll = "poll", i))(oe || {});
3838
+ class ae extends ot {
3825
3839
  constructor() {
3826
3840
  super(Object.values(y), !0);
3827
3841
  }
@@ -3945,7 +3959,7 @@ class oe extends nt {
3945
3959
  return this.set(y.siteName, t);
3946
3960
  }
3947
3961
  }
3948
- class ae extends nt {
3962
+ class ce extends ot {
3949
3963
  constructor() {
3950
3964
  super(Object.values($));
3951
3965
  }
@@ -4069,7 +4083,7 @@ class ae extends nt {
4069
4083
  return this.set($.image, t), this;
4070
4084
  }
4071
4085
  }
4072
- class Le extends nt {
4086
+ class Ae extends ot {
4073
4087
  /**
4074
4088
  * Creates an instance of Meta with integrated Open Graph and Twitter Card support.
4075
4089
  *
@@ -4080,7 +4094,7 @@ class Le extends nt {
4080
4094
  c(this, "suffix");
4081
4095
  c(this, "og");
4082
4096
  c(this, "twitter");
4083
- this.og = new oe(), this.twitter = new ae();
4097
+ this.og = new ae(), this.twitter = new ce();
4084
4098
  }
4085
4099
  /**
4086
4100
  * Gets the MetaOg instance for advanced Open Graph operations.
@@ -4190,7 +4204,7 @@ class Le extends nt {
4190
4204
  * @param keywords keywords as string or array / ключевые слова в виде строки или массива
4191
4205
  */
4192
4206
  setKeywords(e) {
4193
- return this.set(v.keywords, H(e).join(", ")), this;
4207
+ return this.set(v.keywords, z(e).join(", ")), this;
4194
4208
  }
4195
4209
  /**
4196
4210
  * Sets the description meta tag.
@@ -4281,7 +4295,7 @@ class Le extends nt {
4281
4295
  return D(this.suffix) ? ` - ${this.suffix}` : "";
4282
4296
  }
4283
4297
  }
4284
- class rt {
4298
+ class nt {
4285
4299
  /**
4286
4300
  * Checks whether to enable scroll hiding.
4287
4301
  *
@@ -4311,8 +4325,8 @@ class rt {
4311
4325
  * Создает элементы для проверки ширины скролла.
4312
4326
  */
4313
4327
  static createElement() {
4314
- return st(document.body, "div", (t) => {
4315
- t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%", st(t, "div", (e) => {
4328
+ return _(document.body, "div", (t) => {
4329
+ t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%", _(t, "div", (e) => {
4316
4330
  e.style.height = "100px";
4317
4331
  });
4318
4332
  });
@@ -4332,8 +4346,8 @@ class rt {
4332
4346
  });
4333
4347
  }
4334
4348
  }
4335
- c(rt, "storage", new O("scrollbar", !0)), c(rt, "calculate", !1);
4336
- const ce = [
4349
+ c(nt, "storage", new T("scrollbar", !0)), c(nt, "calculate", !1);
4350
+ const ue = [
4337
4351
  "d",
4338
4352
  "e",
4339
4353
  "f",
@@ -4353,15 +4367,15 @@ const ce = [
4353
4367
  "t",
4354
4368
  "u",
4355
4369
  "v"
4356
- ], ue = (i, t = {}) => {
4370
+ ], he = (i, t = {}) => {
4357
4371
  let e = String(i);
4358
4372
  if (i.match(/%[a-z]/)) {
4359
4373
  let s = 0;
4360
4374
  g(t, (n) => {
4361
- e = e.replace(new RegExp(`%${ce[s++]}`, "g"), String(n));
4375
+ e = e.replace(new RegExp(`%${ue[s++]}`, "g"), String(n));
4362
4376
  });
4363
4377
  }
4364
- return C(t) && g(t, (s, n) => {
4378
+ return k(t) && g(t, (s, n) => {
4365
4379
  e = e.replace(
4366
4380
  new RegExp(`\\[${n}\\](.*?)\\[/${n}\\]`, "g"),
4367
4381
  (o, a) => String(s).replace(/\[content]/g, a)
@@ -4378,7 +4392,7 @@ const ce = [
4378
4392
  static async get(t, e) {
4379
4393
  var n, o;
4380
4394
  const s = this.getName(t);
4381
- return s in this.data ? this.replacement(this.data[s], e) : (U.isLocalhost() || await this.add(t), this.replacement((o = (n = this.data) == null ? void 0 : n[s]) != null ? o : t));
4395
+ return s in this.data ? this.replacement(this.data[s], e) : (H.isLocalhost() || await this.add(t), this.replacement((o = (n = this.data) == null ? void 0 : n[s]) != null ? o : t));
4382
4396
  }
4383
4397
  /**
4384
4398
  * Getting the translation text by its code (Sync).
@@ -4451,7 +4465,7 @@ const ce = [
4451
4465
  */
4452
4466
  static addSync(t) {
4453
4467
  g(t, (e, s) => {
4454
- z(e) && D(e) && (this.data[this.getName(s)] = e);
4468
+ R(e) && D(e) && (this.data[this.getName(s)] = e);
4455
4469
  });
4456
4470
  }
4457
4471
  /**
@@ -4462,7 +4476,7 @@ const ce = [
4462
4476
  */
4463
4477
  static async addNormalOrSync(t) {
4464
4478
  if (D(t))
4465
- if (U.isLocalhost())
4479
+ if (H.isLocalhost())
4466
4480
  this.addSync(t);
4467
4481
  else {
4468
4482
  const e = Object.keys(t);
@@ -4488,7 +4502,7 @@ const ce = [
4488
4502
  * @param name code name/ название кода
4489
4503
  */
4490
4504
  static getName(t) {
4491
- return `${b.getLocation()}-${t}`;
4505
+ return `${w.getLocation()}-${t}`;
4492
4506
  }
4493
4507
  /**
4494
4508
  * Returns a list of names that are not yet in the list.
@@ -4498,7 +4512,7 @@ const ce = [
4498
4512
  */
4499
4513
  static getNamesNone(t) {
4500
4514
  const e = [];
4501
- return H(t).forEach((s) => {
4515
+ return z(t).forEach((s) => {
4502
4516
  s !== "__TRANSLATE_START__" && s !== "__TRANSLATE_END__" && !(this.getName(s) in this.data) && e.push(s);
4503
4517
  }), e;
4504
4518
  }
@@ -4508,7 +4522,7 @@ const ce = [
4508
4522
  * Получение списка переводов с сервера.
4509
4523
  */
4510
4524
  static async getResponse() {
4511
- const t = await U.get({
4525
+ const t = await H.get({
4512
4526
  api: !1,
4513
4527
  path: this.url,
4514
4528
  request: {
@@ -4527,7 +4541,7 @@ const ce = [
4527
4541
  * @param replacement values for replacement/ значения для замены
4528
4542
  */
4529
4543
  static replacement(t, e) {
4530
- return e ? ue(t, e) : t;
4544
+ return e ? he(t, e) : t;
4531
4545
  }
4532
4546
  /**
4533
4547
  * Adding translation data from the server.
@@ -4543,36 +4557,42 @@ const ce = [
4543
4557
  }
4544
4558
  };
4545
4559
  c(N, "url", "/api/translate"), c(N, "propsName", "list"), c(N, "data", {}), c(N, "cache", []), c(N, "resolveList", []), c(N, "timeout");
4546
- let vt = N;
4547
- function Bt(i) {
4560
+ let St = N;
4561
+ function Ft(i) {
4548
4562
  return Array.isArray(i);
4549
4563
  }
4550
- function ke(i) {
4564
+ function Ne(i) {
4551
4565
  var t;
4552
- return z(i) ? i.trim() : Bt(i) && i.findIndex((e) => m(e)) === -1 ? i.join(",") : m(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : (t = i == null ? void 0 : i.toString()) != null ? t : "";
4566
+ return R(i) ? i.trim() : Ft(i) && i.findIndex((e) => m(e)) === -1 ? i.join(",") : m(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : (t = i == null ? void 0 : i.toString()) != null ? t : "";
4553
4567
  }
4554
- function he(i, t) {
4568
+ function le(i, t) {
4555
4569
  return Array(t).fill(i);
4556
4570
  }
4557
- function Ce(i) {
4571
+ function Ie(i) {
4572
+ return new Promise((t, e) => {
4573
+ const s = new FileReader();
4574
+ s.onloadend = () => t(s.result), s.onerror = e, s.readAsDataURL(i);
4575
+ });
4576
+ }
4577
+ function Ee(i) {
4558
4578
  var t;
4559
4579
  if (l())
4560
4580
  return (t = document.querySelector(i)) != null ? t : void 0;
4561
4581
  }
4562
- function Ae(i) {
4582
+ function Be(i) {
4563
4583
  if (l())
4564
4584
  return document.querySelectorAll(i);
4565
4585
  }
4566
- function Ne(i) {
4586
+ function Fe(i) {
4567
4587
  i.preventDefault(), i.stopPropagation();
4568
4588
  }
4569
- function le(i, t, e) {
4589
+ function de(i, t, e) {
4570
4590
  const s = () => {
4571
- i(), t != null && t() ? le(i, t, e) : e == null || e();
4591
+ i(), t != null && t() ? de(i, t, e) : e == null || e();
4572
4592
  };
4573
4593
  l() ? requestAnimationFrame(s) : s();
4574
4594
  }
4575
- function Ee(i) {
4595
+ function xe(i) {
4576
4596
  var s;
4577
4597
  const t = {}, e = A(i);
4578
4598
  if (e)
@@ -4580,117 +4600,141 @@ function Ee(i) {
4580
4600
  t[n.name] = (s = (n == null ? void 0 : n.value) || (n == null ? void 0 : n.textContent)) != null ? s : void 0;
4581
4601
  return t;
4582
4602
  }
4583
- async function Ie(i) {
4603
+ async function Re(i) {
4584
4604
  var t, e;
4585
4605
  return (e = (t = i == null ? void 0 : i.clipboardData) == null ? void 0 : t.getData("text")) != null ? e : await navigator.clipboard.readText() || "";
4586
4606
  }
4587
- let St = Y(1e5, 9e5);
4588
- function Be(i, t) {
4607
+ let Dt = Y(1e5, 9e5);
4608
+ function Pe(i, t) {
4589
4609
  const e = A(i);
4590
- return e ? (D(e.id) || e.setAttribute("id", `id-${St++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${St++}`;
4610
+ return e ? (D(e.id) || e.setAttribute("id", `id-${Dt++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${Dt++}`;
4591
4611
  }
4592
- function de(i, t = "ig", e = ":value") {
4612
+ function ge(i) {
4613
+ return R(i) ? _(
4614
+ void 0,
4615
+ "img",
4616
+ { src: i }
4617
+ ) : i;
4618
+ }
4619
+ function fe(i, t = "ig", e = ":value") {
4593
4620
  const s = i.replace(/([[\]\\^$.?*+()/])/g, "\\$1");
4594
4621
  return new RegExp(e.replace(/:value/g, s), t);
4595
4622
  }
4596
- function ge(i, t) {
4623
+ function me(i, t) {
4597
4624
  var n;
4598
4625
  const e = t.split(".", 2), s = e[0];
4599
- return s && (i != null && i[s]) && C(i[s]) && (e != null && e[1]) ? ge(i[s], e[1]) : (n = s && (i == null ? void 0 : i[s])) != null ? n : "";
4626
+ return s && (i != null && i[s]) && k(i[s]) && (e != null && e[1]) ? me(i[s], e[1]) : (n = s && (i == null ? void 0 : i[s])) != null ? n : "";
4600
4627
  }
4601
- function Fe(i) {
4628
+ function We(i) {
4602
4629
  var t, e, s;
4603
4630
  return (s = (t = i == null ? void 0 : i.key) != null ? t : i == null ? void 0 : i.code) != null ? s : (e = i == null ? void 0 : i.keyCode) == null ? void 0 : e.toString();
4604
4631
  }
4605
- function Ft(i) {
4632
+ function xt(i) {
4606
4633
  return g(i, (t) => t.length);
4607
4634
  }
4608
- function xe(i) {
4609
- return Math.max(...Ft(i));
4635
+ function Ue(i) {
4636
+ return Math.max(...xt(i));
4610
4637
  }
4611
- function Re(i) {
4612
- return Math.min(...Ft(i));
4638
+ function je(i) {
4639
+ return Math.min(...xt(i));
4613
4640
  }
4614
- function fe(i) {
4641
+ function ye(i) {
4615
4642
  var t, e, s, n;
4616
4643
  return (i == null ? void 0 : i.clientX) || ((e = (t = i == null ? void 0 : i.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientX) || ((n = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : n.clientX) || 0;
4617
4644
  }
4618
- function me(i) {
4645
+ function $e(i) {
4619
4646
  var t, e, s, n;
4620
4647
  return (i == null ? void 0 : i.clientY) || ((e = (t = i == null ? void 0 : i.targetTouches) == null ? void 0 : t[0]) == null ? void 0 : e.clientY) || ((n = (s = i == null ? void 0 : i.touches) == null ? void 0 : s[0]) == null ? void 0 : n.clientY) || 0;
4621
4648
  }
4622
- function Pe(i) {
4649
+ function He(i) {
4623
4650
  return {
4624
- x: fe(i),
4625
- y: me(i)
4651
+ x: ye(i),
4652
+ y: $e(i)
4626
4653
  };
4627
4654
  }
4628
- function We(i, t) {
4655
+ function ze(i, t) {
4629
4656
  const e = {};
4630
4657
  return t.forEach((s) => {
4631
4658
  s in i && i[s] !== void 0 && (e[s] = i[s]);
4632
4659
  }), e;
4633
4660
  }
4634
- function je(i, t = void 0) {
4661
+ function Ze(i, t = void 0) {
4635
4662
  const e = {};
4636
4663
  return g(i, (s, n) => {
4637
4664
  s !== t && (e[n] = s);
4638
4665
  }), e;
4639
4666
  }
4640
- function Ue(i) {
4641
- return C(i) ? i : {};
4667
+ function Ve(i) {
4668
+ return k(i) ? i : {};
4642
4669
  }
4643
- function ye(i, t) {
4644
- return he(i, t).join("");
4670
+ function pe(i, t) {
4671
+ return le(i, t).join("");
4645
4672
  }
4646
- function ze(i, t, e = "#", s = 2, n = 12) {
4673
+ function Ke(i, t, e = "#", s = 2, n = 12) {
4647
4674
  const o = Y(i, t), a = [];
4648
4675
  for (let u = 0; u < o; u++)
4649
- a.push(ye(e, Y(s, n)));
4676
+ a.push(pe(e, Y(s, n)));
4650
4677
  return a.join(" ");
4651
4678
  }
4652
- function He(i, t) {
4679
+ function Ye(i, t) {
4653
4680
  const e = i != null ? i : 0;
4654
4681
  return t > e ? 100 / (t - e) : 0;
4655
4682
  }
4656
- function Ze(i, t) {
4683
+ function qe(i, t) {
4657
4684
  const e = i != null ? i : 0;
4658
4685
  return t > e ? (t - e) / 100 : 0;
4659
4686
  }
4660
- const Dt = 0;
4661
- function Ke(i, t, e) {
4687
+ const Lt = 0;
4688
+ function Je(i, t, e) {
4662
4689
  const s = t == null ? void 0 : t.closest(i);
4663
4690
  if (t && s && s.scrollHeight !== s.offsetHeight)
4664
4691
  if (e) {
4665
4692
  const n = e.getBoundingClientRect(), o = s.getBoundingClientRect(), a = t.getBoundingClientRect();
4666
4693
  s.scrollTop = t.offsetTop - (n.top - o.top) - (n.height / 2 - a.height / 2), s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight);
4667
- } else s.scrollTop > t.offsetTop ? s.scrollTop = t.offsetTop - Dt : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight + Dt);
4694
+ } else s.scrollTop > t.offsetTop ? s.scrollTop = t.offsetTop - Lt : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight + Lt);
4695
+ }
4696
+ function Qe(i, t, e = 0) {
4697
+ if (!l())
4698
+ return;
4699
+ const s = (t == null ? void 0 : t.behavior) || "smooth";
4700
+ if ("scrollIntoView" in i && !e) {
4701
+ i.scrollIntoView({
4702
+ behavior: s,
4703
+ block: (t == null ? void 0 : t.block) || "start",
4704
+ inline: (t == null ? void 0 : t.inline) || "start"
4705
+ });
4706
+ return;
4707
+ }
4708
+ if ("getBoundingClientRect" in i && "scrollTo" in window) {
4709
+ const n = ((window == null ? void 0 : window.scrollY) || window.pageYOffset) + i.getBoundingClientRect().top - e;
4710
+ window.scrollTo({
4711
+ top: n,
4712
+ behavior: s
4713
+ });
4714
+ }
4668
4715
  }
4669
- function Ve(i, t) {
4716
+ function Me(i, t) {
4670
4717
  return i.indexOf(t) !== -1;
4671
4718
  }
4672
- async function Ye() {
4719
+ async function Xe() {
4673
4720
  if (l()) {
4674
- const i = await rt.get();
4721
+ const i = await nt.get();
4675
4722
  document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
4676
4723
  }
4677
4724
  }
4678
- function qe(i, t) {
4725
+ function _e(i, t) {
4679
4726
  const e = {};
4680
4727
  return m(i) && m(t) && g(i, (s, n) => {
4681
4728
  n in t && (e[n] = s);
4682
4729
  }), e;
4683
4730
  }
4684
- function Je(i, t) {
4731
+ function Oe(i, t) {
4685
4732
  let e = Object.keys(i).length !== Object.keys(t).length;
4686
4733
  return e || g(i, (s, n) => {
4687
4734
  s !== (t == null ? void 0 : t[n]) && (e = !0);
4688
4735
  }), e;
4689
4736
  }
4690
- function Qe() {
4691
- return location.href.startsWith("data:");
4692
- }
4693
- function Xe(i) {
4737
+ function Te(i) {
4694
4738
  switch (typeof i) {
4695
4739
  case "number":
4696
4740
  return !0;
@@ -4700,14 +4744,22 @@ function Xe(i) {
4700
4744
  return !1;
4701
4745
  }
4702
4746
  }
4703
- function Me(i, t) {
4747
+ function Ge(i, t) {
4704
4748
  const e = Math.floor(t);
4705
4749
  return i >= e && i < e + 1;
4706
4750
  }
4707
- function _e(i, t) {
4708
- return Array.isArray(i) ? i.every((e) => it(e, t)) : it(i, t);
4751
+ function ti(i, t) {
4752
+ return Array.isArray(i) ? i.every((e) => st(e, t)) : st(i, t);
4709
4753
  }
4710
- function $e(i) {
4754
+ function ei(i, t) {
4755
+ if (i.startsWith(t))
4756
+ return i.slice(t.length).trim();
4757
+ let e = 0;
4758
+ for (; i[e] === t[e] && e < i.length && e < t.length; )
4759
+ e++;
4760
+ return i.slice(e).trim();
4761
+ }
4762
+ function we(i) {
4711
4763
  return [...new Set(i)];
4712
4764
  }
4713
4765
  function Z(i, t, e = !0) {
@@ -4716,7 +4768,7 @@ function Z(i, t, e = !0) {
4716
4768
  t,
4717
4769
  (n, o) => {
4718
4770
  const a = i == null ? void 0 : i[o];
4719
- m(a) && m(n) ? e && Array.isArray(a) && Array.isArray(n) ? s[o] = j($e([...a, ...n])) : s[o] = Z(
4771
+ m(a) && m(n) ? e && Array.isArray(a) && Array.isArray(n) ? s[o] = j(we([...a, ...n])) : s[o] = Z(
4720
4772
  Array.isArray(a) ? { ...a } : a,
4721
4773
  n,
4722
4774
  e
@@ -4724,28 +4776,47 @@ function Z(i, t, e = !0) {
4724
4776
  }
4725
4777
  ), s;
4726
4778
  }
4727
- function Oe(i, t) {
4779
+ function ii(i, t) {
4728
4780
  let e = i;
4729
4781
  return g(t, (s, n) => {
4730
- e = e.replace(de(`[${n}]`), E(s));
4782
+ e = e.replace(fe(`[${n}]`), I(s));
4731
4783
  }), e;
4732
4784
  }
4733
- function Te(i) {
4734
- const t = k(i);
4785
+ function be(i, t = "auto") {
4786
+ switch (t) {
4787
+ case "auto":
4788
+ return i.naturalWidth >= i.naturalHeight;
4789
+ case "width":
4790
+ return !0;
4791
+ case "height":
4792
+ return !1;
4793
+ }
4794
+ }
4795
+ function si(i, t, e = "auto", s) {
4796
+ var o;
4797
+ const n = ge(i);
4798
+ if (n && (n.naturalWidth > t && (e === "auto" || e === "width") || n.naturalHeight > t && (e === "auto" || e === "height"))) {
4799
+ const a = be(n, e), u = (o = document.createElement("canvas")) == null ? void 0 : o.getContext("2d");
4800
+ if (u)
4801
+ return u.canvas.width = a ? t : n.naturalWidth / n.naturalHeight * t, u.canvas.height = a ? n.naturalHeight / n.naturalWidth * t : t, u.drawImage(n, 0, 0, u.canvas.width, u.canvas.height), u.canvas.toDataURL(s);
4802
+ }
4803
+ }
4804
+ function ri(i) {
4805
+ const t = C(i);
4735
4806
  if (t > 0) {
4736
4807
  const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
4737
4808
  return `${e}:${s}`;
4738
4809
  }
4739
4810
  return "00:00";
4740
4811
  }
4741
- function Ge(i, t, {
4812
+ function ni(i, t, {
4742
4813
  multiple: e = !1,
4743
4814
  maxlength: s = 0,
4744
4815
  alwaysChange: n = !0,
4745
4816
  notEmpty: o = !1
4746
4817
  }) {
4747
4818
  if (e) {
4748
- if (Bt(i)) {
4819
+ if (Ft(i)) {
4749
4820
  const a = i.indexOf(t), u = [...i];
4750
4821
  return a !== -1 ? (!o || u.length > 1) && u.splice(a, 1) : (!s || i.length < s) && u.push(t), u;
4751
4822
  }
@@ -4753,7 +4824,7 @@ function Ge(i, t, {
4753
4824
  }
4754
4825
  return n || i !== t ? t : i;
4755
4826
  }
4756
- function ti(i, t, e) {
4827
+ function oi(i, t, e) {
4757
4828
  if (m(i) && m(t)) {
4758
4829
  if (e) {
4759
4830
  let s = {}, n = !1;
@@ -4766,27 +4837,33 @@ function ti(i, t, e) {
4766
4837
  }
4767
4838
  return j(i);
4768
4839
  }
4769
- function pe(i) {
4840
+ function ve(i) {
4770
4841
  return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (t) => `${t.toLowerCase()}`).replace(/-+([a-zA-Z0-9])/g, (...t) => `${String(t[1]).toUpperCase()}`).replace(/^([A-Z])/, (t) => `${t.toLowerCase()}`);
4771
4842
  }
4772
- function ei(i) {
4773
- return pe(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
4843
+ function ai(i) {
4844
+ return ve(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
4774
4845
  }
4775
- function ii(i) {
4846
+ function ci(i) {
4776
4847
  return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(/(?<=[A-Z])([A-Z])/g, (t) => `${t.toLowerCase()}`).replace(/^[A-Z]/, (t) => t.toLowerCase()).replace(/(?<=[\w ])[A-Z]/g, (t) => `-${t.toLowerCase()}`).replace(/[A-Z]/g, (t) => t.toLowerCase());
4777
4848
  }
4778
- function si(i, t, e, s) {
4779
- const n = k(i), o = k(t);
4780
- return t && o < n ? `${Lt(o, e, s)}+` : Lt(n, e, s);
4849
+ function ui(i, t, e, s) {
4850
+ const n = C(i), o = C(t);
4851
+ return t && o < n ? `${Ct(o, e, s)}+` : Ct(n, e, s);
4781
4852
  }
4782
- const Lt = (i, t, e) => t ? new J(e).number(i) : i;
4783
- function be(i, t) {
4853
+ const Ct = (i, t, e) => t ? new J(e).number(i) : i;
4854
+ function Se(i, t) {
4784
4855
  return 1 / i * t;
4785
4856
  }
4786
- function ri(i, t) {
4787
- return be(i, t) * 100;
4857
+ function hi(i, t) {
4858
+ return Se(i, t) * 100;
4859
+ }
4860
+ function li(i) {
4861
+ let t = "";
4862
+ for (const e of i)
4863
+ t += String.fromCharCode(e);
4864
+ return l() ? window.btoa(t) : globalThis && globalThis.Buffer ? globalThis == null ? void 0 : globalThis.Buffer.from(i).toString("base64") : "";
4788
4865
  }
4789
- async function ni(i) {
4866
+ async function di(i) {
4790
4867
  if (l())
4791
4868
  try {
4792
4869
  await navigator.clipboard.writeText(i);
@@ -4795,123 +4872,129 @@ async function ni(i) {
4795
4872
  }
4796
4873
  }
4797
4874
  export {
4798
- U as Api,
4799
- Ht as ApiDefault,
4875
+ H as Api,
4876
+ Zt as ApiDefault,
4800
4877
  zt as ApiHeaders,
4801
4878
  S as ApiMethodItem,
4802
- Yt as ApiPreparation,
4803
- Vt as ApiResponse,
4804
- Zt as ApiStatus,
4805
- Se as BroadcastMessage,
4806
- Qt as Cache,
4807
- Jt as CacheItem,
4808
- gt as CacheStatic,
4809
- ft as Cookie,
4879
+ qt as ApiPreparation,
4880
+ Yt as ApiResponse,
4881
+ Vt as ApiStatus,
4882
+ Ce as BroadcastMessage,
4883
+ Mt as Cache,
4884
+ Qt as CacheItem,
4885
+ ft as CacheStatic,
4886
+ mt as Cookie,
4810
4887
  Et as CookieBlock,
4811
- O as DataStorage,
4812
- It as Datetime,
4813
- ht as EventItem,
4888
+ T as DataStorage,
4889
+ Bt as Datetime,
4890
+ lt as EventItem,
4814
4891
  r as GEO_FLAG_ICON_NAME,
4815
- b as Geo,
4816
- mt as GeoFlag,
4892
+ w as Geo,
4893
+ yt as GeoFlag,
4817
4894
  J as GeoIntl,
4818
- yt as GeoPhone,
4819
- De as Global,
4820
- $t as Hash,
4821
- wt as Icons,
4895
+ $t as GeoPhone,
4896
+ ke as Global,
4897
+ pt as Hash,
4898
+ vt as Icons,
4822
4899
  x as Loading,
4823
- Le as Meta,
4824
- nt as MetaManager,
4825
- oe as MetaOg,
4826
- se as MetaOpenGraphAge,
4827
- ee as MetaOpenGraphAvailability,
4828
- ie as MetaOpenGraphCondition,
4829
- re as MetaOpenGraphGender,
4900
+ Ae as Meta,
4901
+ ot as MetaManager,
4902
+ ae as MetaOg,
4903
+ re as MetaOpenGraphAge,
4904
+ ie as MetaOpenGraphAvailability,
4905
+ se as MetaOpenGraphCondition,
4906
+ ne as MetaOpenGraphGender,
4830
4907
  y as MetaOpenGraphTag,
4831
- te as MetaOpenGraphType,
4832
- Gt as MetaRobots,
4908
+ ee as MetaOpenGraphType,
4909
+ te as MetaRobots,
4833
4910
  v as MetaTag,
4834
- ae as MetaTwitter,
4835
- ne as MetaTwitterCard,
4911
+ ce as MetaTwitter,
4912
+ oe as MetaTwitterCard,
4836
4913
  $ as MetaTwitterTag,
4837
- rt as ScrollbarWidth,
4838
- vt as Translate,
4839
- ke as anyToString,
4840
- ue as applyTemplate,
4841
- he as arrFill,
4914
+ nt as ScrollbarWidth,
4915
+ St as Translate,
4916
+ Ne as anyToString,
4917
+ he as applyTemplate,
4918
+ le as arrFill,
4919
+ Ie as blobToBase64,
4842
4920
  j as copyObject,
4843
4921
  L as copyObjectLite,
4844
- st as createElement,
4845
- Ce as domQuerySelector,
4846
- Ae as domQuerySelectorAll,
4847
- Tt as encodeAttribute,
4848
- Ne as eventStopPropagation,
4849
- E as executeFunction,
4922
+ _ as createElement,
4923
+ Ee as domQuerySelector,
4924
+ Be as domQuerySelectorAll,
4925
+ Gt as encodeAttribute,
4926
+ Fe as eventStopPropagation,
4927
+ I as executeFunction,
4850
4928
  Kt as executePromise,
4851
4929
  g as forEach,
4852
- le as frame,
4853
- Ee as getAttributes,
4854
- Ie as getClipboardData,
4855
- Mt as getColumn,
4930
+ de as frame,
4931
+ xe as getAttributes,
4932
+ Re as getClipboardData,
4933
+ _t as getColumn,
4856
4934
  A as getElement,
4857
- Be as getElementId,
4858
- _t as getElementItem,
4859
- ut as getElementOrWindow,
4860
- de as getExp,
4861
- ge as getItemByPath,
4862
- Fe as getKey,
4863
- Ft as getLengthOfAllArray,
4864
- xe as getMaxLengthAllArray,
4865
- Re as getMinLengthAllArray,
4866
- Pe as getMouseClient,
4867
- fe as getMouseClientX,
4868
- me as getMouseClientY,
4869
- We as getObjectByKeys,
4870
- je as getObjectNoUndefined,
4871
- Ue as getObjectOrNone,
4872
- ze as getRandomText,
4935
+ Pe as getElementId,
4936
+ ge as getElementImage,
4937
+ Ot as getElementItem,
4938
+ ht as getElementOrWindow,
4939
+ fe as getExp,
4940
+ me as getItemByPath,
4941
+ We as getKey,
4942
+ xt as getLengthOfAllArray,
4943
+ Ue as getMaxLengthAllArray,
4944
+ je as getMinLengthAllArray,
4945
+ He as getMouseClient,
4946
+ ye as getMouseClientX,
4947
+ $e as getMouseClientY,
4948
+ ze as getObjectByKeys,
4949
+ Ze as getObjectNoUndefined,
4950
+ Ve as getObjectOrNone,
4951
+ Ke as getRandomText,
4873
4952
  kt as getRequestString,
4874
- He as getStepPercent,
4875
- Ze as getStepValue,
4876
- Ke as goScroll,
4877
- Ve as inArray,
4878
- Ye as initScrollbarOffset,
4879
- qe as intersectKey,
4880
- Bt as isArray,
4881
- Je as isDifferent,
4882
- Qe as isDomData,
4953
+ Ye as getStepPercent,
4954
+ qe as getStepValue,
4955
+ Je as goScroll,
4956
+ Qe as goScrollSmooth,
4957
+ Me as inArray,
4958
+ Xe as initScrollbarOffset,
4959
+ _e as intersectKey,
4960
+ Ft as isArray,
4961
+ Oe as isDifferent,
4962
+ rt as isDomData,
4883
4963
  l as isDomRuntime,
4884
4964
  D as isFilled,
4885
- Xe as isFloat,
4886
- Ct as isFunction,
4887
- Ut as isInDom,
4888
- Me as isIntegerBetween,
4965
+ Te as isFloat,
4966
+ At as isFunction,
4967
+ Ht as isInDom,
4968
+ Ge as isIntegerBetween,
4889
4969
  q as isNull,
4890
- at as isNumber,
4970
+ ct as isNumber,
4891
4971
  m as isObject,
4892
- C as isObjectNotArray,
4893
- it as isSelected,
4894
- _e as isSelectedByList,
4895
- z as isString,
4896
- At as isWindow,
4972
+ k as isObjectNotArray,
4973
+ st as isSelected,
4974
+ ti as isSelectedByList,
4975
+ R as isString,
4976
+ Nt as isWindow,
4897
4977
  Y as random,
4978
+ ei as removeCommonPrefix,
4898
4979
  Z as replaceRecursive,
4899
- Oe as replaceTemplate,
4900
- Te as secondToTime,
4901
- Ot as setElementItem,
4902
- Ge as setValues,
4903
- ti as splice,
4904
- ye as strFill,
4905
- H as toArray,
4906
- pe as toCamelCase,
4907
- ei as toCamelCaseFirst,
4980
+ ii as replaceTemplate,
4981
+ si as resizeImageByMax,
4982
+ ri as secondToTime,
4983
+ Tt as setElementItem,
4984
+ ni as setValues,
4985
+ oi as splice,
4986
+ pe as strFill,
4987
+ z as toArray,
4988
+ ve as toCamelCase,
4989
+ ai as toCamelCaseFirst,
4908
4990
  B as toDate,
4909
- ii as toKebabCase,
4910
- k as toNumber,
4911
- si as toNumberByMax,
4912
- be as toPercent,
4913
- ri as toPercentBy100,
4914
- Nt as transformation,
4915
- $e as uniqueArray,
4916
- ni as writeClipboardData
4991
+ ci as toKebabCase,
4992
+ C as toNumber,
4993
+ ui as toNumberByMax,
4994
+ Se as toPercent,
4995
+ hi as toPercentBy100,
4996
+ It as transformation,
4997
+ li as uint8ArrayToBase64,
4998
+ we as uniqueArray,
4999
+ di as writeClipboardData
4917
5000
  };