@dxtmisha/functional 1.1.0 → 1.3.0
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/{Icons-Bp74_rUm.js → Icons-BNmTjp32.js} +2 -2
- package/dist/classes/BroadcastMessage.d.ts +36 -0
- package/dist/classes/Meta.d.ts +168 -0
- package/dist/classes/MetaManager.d.ts +103 -0
- package/dist/classes/MetaOg.d.ts +101 -0
- package/dist/classes/MetaTwitter.d.ts +101 -0
- package/dist/classes/__tests__/Meta.test.d.ts +4 -0
- package/dist/classes/__tests__/MetaManager.test.d.ts +4 -0
- package/dist/classes/__tests__/MetaOg.test.d.ts +4 -0
- package/dist/classes/__tests__/MetaTwitter.test.d.ts +4 -0
- package/dist/composables/ref/__tests__/useMeta.test.d.ts +4 -0
- package/dist/composables/ref/useApiRef.d.ts +1 -1
- package/dist/composables/ref/useMeta.d.ts +22 -0
- package/dist/flags.js +1 -1
- package/dist/functions/encodeAttribute.d.ts +7 -0
- package/dist/library.d.ts +8 -0
- package/dist/library.js +1325 -630
- package/dist/types/constructorTypes.d.ts +2 -2
- package/dist/types/metaTypes.d.ts +584 -0
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -1,10 +1,64 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { i as d,
|
|
5
|
-
import { o as
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
var Wt = Object.defineProperty;
|
|
2
|
+
var Pt = (i, t, e) => t in i ? Wt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var A = (i, t, e) => Pt(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { D as X, i as d, r as z, e as B, a as F, b as jt, G as b, f, t as k, c as ht, d as R, g as Ht, h as M, j as p, k as C, A as V, l as m, E as Ut, m as j, L as $t, n as H } from "./Icons-BNmTjp32.js";
|
|
5
|
+
import { o as qi, I as Ji, p as Qi, q as Xi, s as Mi, u as Oi, v as Ti, w as Gi } from "./Icons-BNmTjp32.js";
|
|
6
|
+
import { ref as y, watch as g, h as _t, computed as c, toRefs as zt, useAttrs as Zt, useSlots as Kt, isRef as dt, triggerRef as Vt, shallowRef as Z, onUnmounted as ot, inject as Yt, provide as qt, watchEffect as Jt } from "vue";
|
|
7
|
+
function Qt(i, t, e) {
|
|
8
|
+
if (i in G)
|
|
9
|
+
return G[i];
|
|
10
|
+
const s = new X(i), n = y(s.get(t, e));
|
|
11
|
+
return g(n, (o) => s.set(o)), d() && window.addEventListener("storage", () => {
|
|
12
|
+
s.update(), n.value = s.get();
|
|
13
|
+
}), G[i] = n, n;
|
|
14
|
+
}
|
|
15
|
+
const G = {};
|
|
16
|
+
class Xt {
|
|
17
|
+
/**
|
|
18
|
+
* Constructor
|
|
19
|
+
* @param name channel name/ название канала
|
|
20
|
+
* @param callback callback on message received/ колбэк на получение сообщения
|
|
21
|
+
*/
|
|
22
|
+
constructor(t, e) {
|
|
23
|
+
if (this.callback = e, d())
|
|
24
|
+
try {
|
|
25
|
+
this.channel = new BroadcastChannel(`${Mt()}__${t}`), this.channel.onmessage = this.update;
|
|
26
|
+
} catch (s) {
|
|
27
|
+
console.error(`BroadcastMessage ${t}:`, s);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
channel;
|
|
31
|
+
/**
|
|
32
|
+
* Send a message to the channel.
|
|
33
|
+
*
|
|
34
|
+
* Отправить сообщение в канал.
|
|
35
|
+
* @param message message to send/ сообщение для отправки
|
|
36
|
+
*/
|
|
37
|
+
post(t) {
|
|
38
|
+
return this.channel?.postMessage(t), this;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Set the callback function to be called when a message is received.
|
|
42
|
+
*
|
|
43
|
+
* Установить функцию колбэка, которая будет вызвана при получении сообщения.
|
|
44
|
+
* @param callback callback function/ функция колбэка
|
|
45
|
+
*/
|
|
46
|
+
setCallback(t) {
|
|
47
|
+
return this.callback = t, this;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update state on message received.
|
|
51
|
+
*
|
|
52
|
+
* Обновление состояния при получении сообщения.
|
|
53
|
+
* @param event message event/ событие сообщения
|
|
54
|
+
*/
|
|
55
|
+
update = (t) => (this.callback?.(t), this);
|
|
56
|
+
}
|
|
57
|
+
const Mt = () => Qt(
|
|
58
|
+
"__broadcast-name",
|
|
59
|
+
() => `name_${z(1e6, 9999999)}`
|
|
60
|
+
);
|
|
61
|
+
class Ot {
|
|
8
62
|
/**
|
|
9
63
|
* Constructor
|
|
10
64
|
* @param callback function for the cache/ функция для кэша
|
|
@@ -67,7 +121,7 @@ class Ut {
|
|
|
67
121
|
return this.cache === void 0 || this.comparisons.length !== t.length || this.comparisons.findIndex((e, s) => e !== t[s]) >= 0 ? (this.comparisons = [...t], !0) : !1;
|
|
68
122
|
}
|
|
69
123
|
}
|
|
70
|
-
class
|
|
124
|
+
class Tt {
|
|
71
125
|
cache = {};
|
|
72
126
|
/**
|
|
73
127
|
* Getting data for the cache, and if there is no cache, it performs a function to save the cache.
|
|
@@ -99,10 +153,10 @@ class Zt {
|
|
|
99
153
|
* @param callback function for the cache/ функция для кэша
|
|
100
154
|
*/
|
|
101
155
|
getCacheItem(t, e) {
|
|
102
|
-
return t in this.cache || (this.cache[t] = new
|
|
156
|
+
return t in this.cache || (this.cache[t] = new Ot(e)), this.cache[t];
|
|
103
157
|
}
|
|
104
158
|
}
|
|
105
|
-
const
|
|
159
|
+
const Q = class Q {
|
|
106
160
|
/**
|
|
107
161
|
* Getting data for the cache, and if there is no cache, it performs a function to save the cache.
|
|
108
162
|
*
|
|
@@ -115,9 +169,9 @@ const Z = class Z {
|
|
|
115
169
|
return this.cache.get(t, e, s);
|
|
116
170
|
}
|
|
117
171
|
};
|
|
118
|
-
|
|
119
|
-
let
|
|
120
|
-
function
|
|
172
|
+
A(Q, "cache"), Q.cache = new Tt();
|
|
173
|
+
let vt = Q;
|
|
174
|
+
function Lt(i, t = !1) {
|
|
121
175
|
if (typeof i == "string") {
|
|
122
176
|
const e = i.trim();
|
|
123
177
|
switch (e) {
|
|
@@ -148,9 +202,9 @@ function St(i, t = !1) {
|
|
|
148
202
|
}
|
|
149
203
|
return i;
|
|
150
204
|
}
|
|
151
|
-
const
|
|
152
|
-
class
|
|
153
|
-
static storage = new
|
|
205
|
+
const Gt = "cookie-block";
|
|
206
|
+
class te {
|
|
207
|
+
static storage = new X(Gt);
|
|
154
208
|
/**
|
|
155
209
|
* Obtaining status.
|
|
156
210
|
*
|
|
@@ -169,11 +223,11 @@ class Kt {
|
|
|
169
223
|
this.storage.set(t);
|
|
170
224
|
}
|
|
171
225
|
}
|
|
172
|
-
const
|
|
226
|
+
const bt = {}, yt = class yt {
|
|
173
227
|
constructor(t) {
|
|
174
|
-
if (this.name = t, t in
|
|
175
|
-
return
|
|
176
|
-
this.value =
|
|
228
|
+
if (this.name = t, t in tt)
|
|
229
|
+
return tt[t];
|
|
230
|
+
this.value = bt?.[t], tt[t] = this;
|
|
177
231
|
}
|
|
178
232
|
value;
|
|
179
233
|
options = {};
|
|
@@ -195,7 +249,7 @@ const mt = {}, lt = class lt {
|
|
|
195
249
|
* @param options additional parameters/ дополнительные параметры
|
|
196
250
|
*/
|
|
197
251
|
set(t, e) {
|
|
198
|
-
this.value =
|
|
252
|
+
this.value = B(t), Object.assign(this.options, e), this.update();
|
|
199
253
|
}
|
|
200
254
|
/**
|
|
201
255
|
* Delete cookie data.
|
|
@@ -219,7 +273,7 @@ const mt = {}, lt = class lt {
|
|
|
219
273
|
* Обновление данных cookie.
|
|
220
274
|
*/
|
|
221
275
|
update() {
|
|
222
|
-
if (d() && !
|
|
276
|
+
if (d() && !te.get()) {
|
|
223
277
|
const t = String(this.value ?? "");
|
|
224
278
|
document.cookie = [
|
|
225
279
|
`${encodeURIComponent(this.name)}=${encodeURIComponent(t)}`,
|
|
@@ -237,29 +291,29 @@ const mt = {}, lt = class lt {
|
|
|
237
291
|
static updateData() {
|
|
238
292
|
for (const t of document.cookie.split(";")) {
|
|
239
293
|
const [e, s] = t.trim().split("=");
|
|
240
|
-
e &&
|
|
294
|
+
e && F(s) && (bt[e] = Lt(s));
|
|
241
295
|
}
|
|
242
296
|
}
|
|
243
297
|
};
|
|
244
|
-
d() &&
|
|
245
|
-
let
|
|
246
|
-
const
|
|
247
|
-
function
|
|
298
|
+
d() && yt.updateData();
|
|
299
|
+
let at = yt;
|
|
300
|
+
const tt = {};
|
|
301
|
+
function D(i) {
|
|
248
302
|
if (i instanceof Date)
|
|
249
303
|
return i;
|
|
250
|
-
if (
|
|
304
|
+
if (jt(i))
|
|
251
305
|
return /* @__PURE__ */ new Date();
|
|
252
306
|
if (typeof i == "number")
|
|
253
307
|
return new Date(i);
|
|
254
|
-
let t = i, e =
|
|
255
|
-
i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (n,
|
|
308
|
+
let t = i, e = b.getTimezoneFormat();
|
|
309
|
+
i.replace(/^([\s\S]+)([-+]\d{2}:?\d{2})$/, (n, o, a) => (t = o, e = a, n));
|
|
256
310
|
const s = (/^\d{4}\d{2}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})(\d{2})$/, "$1-$2-$3")}T00:00:00`) ?? (/^\d{4}\d{2}$/.exec(t) && `${t.replace(/^(\d{4})(\d{2})$/, "$1-$2")}-01T00:00:00`) ?? (/^\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")) ?? (/^\d{4}-\d{2}-\d{2}$/.exec(t) && `${t}T00:00:00`) ?? (/^\d{4}-\d{2}$/.exec(t) && `${t}-01T00:00:00`) ?? (/^\d{4}$/.exec(t) && `${t}-01-01T00:00:00`) ?? (/^\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}:00`) ?? (/^\d{2}:\d{2}:\d{2}$/.exec(t) && `2000-01-01T${t}`) ?? t.replace(" ", "T");
|
|
257
311
|
return /* @__PURE__ */ new Date(`${s}${e}`);
|
|
258
312
|
}
|
|
259
|
-
function
|
|
313
|
+
function ct(i, t) {
|
|
260
314
|
return f(i, (e) => e?.[t]);
|
|
261
315
|
}
|
|
262
|
-
class
|
|
316
|
+
class W {
|
|
263
317
|
/**
|
|
264
318
|
* Returns an instance of the class according to the specified country code.
|
|
265
319
|
*
|
|
@@ -267,8 +321,8 @@ class I {
|
|
|
267
321
|
* @param code country code, full form language-country or one of them/
|
|
268
322
|
* код страны, полный вид язык-страна или один из них
|
|
269
323
|
*/
|
|
270
|
-
static getInstance(t =
|
|
271
|
-
return new
|
|
324
|
+
static getInstance(t = b.getLocation()) {
|
|
325
|
+
return new W(t);
|
|
272
326
|
}
|
|
273
327
|
geo;
|
|
274
328
|
/**
|
|
@@ -276,12 +330,12 @@ class I {
|
|
|
276
330
|
* @param code country code, full form language-country or one of them/
|
|
277
331
|
* код страны, полный вид язык-страна или один из них
|
|
278
332
|
*/
|
|
279
|
-
constructor(t =
|
|
280
|
-
this.geo =
|
|
333
|
+
constructor(t = b.getLocation()) {
|
|
334
|
+
this.geo = b.find(t);
|
|
281
335
|
const e = this.getLocation();
|
|
282
|
-
if (e in
|
|
283
|
-
return
|
|
284
|
-
|
|
336
|
+
if (e in et)
|
|
337
|
+
return et[e];
|
|
338
|
+
et[e] = this;
|
|
285
339
|
}
|
|
286
340
|
/**
|
|
287
341
|
* Returns country code and language.
|
|
@@ -315,8 +369,8 @@ class I {
|
|
|
315
369
|
});
|
|
316
370
|
try {
|
|
317
371
|
d() && (t ? n = new Intl.DisplayNames(this.getLocation(), s).of(t) : s.type === "language" ? n = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.language) : s.type === "region" && (n = new Intl.DisplayNames(this.getLocation(), s).of(this.geo.country)));
|
|
318
|
-
} catch (
|
|
319
|
-
console.error("display: ",
|
|
372
|
+
} catch (o) {
|
|
373
|
+
console.error("display: ", o);
|
|
320
374
|
}
|
|
321
375
|
return n ?? t ?? "";
|
|
322
376
|
}
|
|
@@ -332,7 +386,7 @@ class I {
|
|
|
332
386
|
type: "language",
|
|
333
387
|
style: e
|
|
334
388
|
};
|
|
335
|
-
return this.display(
|
|
389
|
+
return this.display(b.getByCode(t).language, s);
|
|
336
390
|
}
|
|
337
391
|
/**
|
|
338
392
|
* Get display names of region.
|
|
@@ -358,23 +412,23 @@ class I {
|
|
|
358
412
|
* @param short shorten the names/ сократить названия
|
|
359
413
|
*/
|
|
360
414
|
fullName(t, e, s, n) {
|
|
361
|
-
const
|
|
362
|
-
let
|
|
363
|
-
switch (
|
|
415
|
+
const o = this.geo?.nameFormat ?? "fl";
|
|
416
|
+
let a;
|
|
417
|
+
switch (o) {
|
|
364
418
|
case "fsl":
|
|
365
|
-
|
|
419
|
+
a = `${e}${s ? ` ${s}` : ""} ${t}`;
|
|
366
420
|
break;
|
|
367
421
|
case "lf":
|
|
368
|
-
|
|
422
|
+
a = `${t} ${e}`;
|
|
369
423
|
break;
|
|
370
424
|
case "lsf":
|
|
371
|
-
|
|
425
|
+
a = `${t}${s ? ` ${s}` : ""} ${e}`;
|
|
372
426
|
break;
|
|
373
427
|
default:
|
|
374
|
-
|
|
428
|
+
a = `${e} ${t}`;
|
|
375
429
|
break;
|
|
376
430
|
}
|
|
377
|
-
return n ?
|
|
431
|
+
return n ? a.replace(/ (.)[^ ]+/ig, " $1.") : a;
|
|
378
432
|
}
|
|
379
433
|
/**
|
|
380
434
|
* In basic use without specifying a locale, a formatted string.
|
|
@@ -385,7 +439,7 @@ class I {
|
|
|
385
439
|
* или всеми свойствами
|
|
386
440
|
*/
|
|
387
441
|
number(t, e) {
|
|
388
|
-
return this.numberObject(e)?.format?.(
|
|
442
|
+
return this.numberObject(e)?.format?.(k(t)) || t.toString();
|
|
389
443
|
}
|
|
390
444
|
/**
|
|
391
445
|
* Decimal point symbol.
|
|
@@ -409,18 +463,18 @@ class I {
|
|
|
409
463
|
style: "currency",
|
|
410
464
|
currencyDisplay: "symbol",
|
|
411
465
|
...typeof e == "string" ? { currency: e } : e || {}
|
|
412
|
-
},
|
|
466
|
+
}, o = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]{3})$/i, (...a) => (n.currency = String(a[2]).toUpperCase(), String(a[1])));
|
|
413
467
|
if (s) {
|
|
414
|
-
const
|
|
415
|
-
return
|
|
416
|
-
|
|
468
|
+
const a = this.numberObject(n);
|
|
469
|
+
return a ? ct(
|
|
470
|
+
a.formatToParts(k(t)).filter((u) => ["literal", "currency"].indexOf(u.type) === -1),
|
|
417
471
|
"value"
|
|
418
472
|
).join("") : t.toString();
|
|
419
473
|
} else return "currency" in n ? this.number(
|
|
420
|
-
typeof t == "number" ? t :
|
|
474
|
+
typeof t == "number" ? t : o,
|
|
421
475
|
n
|
|
422
476
|
) : this.number(
|
|
423
|
-
typeof t == "number" ? t :
|
|
477
|
+
typeof t == "number" ? t : o,
|
|
424
478
|
{
|
|
425
479
|
...n,
|
|
426
480
|
style: "decimal"
|
|
@@ -456,7 +510,7 @@ class I {
|
|
|
456
510
|
const s = {
|
|
457
511
|
style: "unit",
|
|
458
512
|
...typeof e == "string" ? { unit: e } : e || {}
|
|
459
|
-
}, n = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...
|
|
513
|
+
}, n = t.toString().replace(/^([\S\s]+[\d ])([a-zA-Z]+)$/i, (...o) => (s.unit = String(o[2]).toLowerCase(), String(o[1])));
|
|
460
514
|
return this.number(n, s);
|
|
461
515
|
}
|
|
462
516
|
/**
|
|
@@ -466,8 +520,8 @@ class I {
|
|
|
466
520
|
* в форматировании блока
|
|
467
521
|
*/
|
|
468
522
|
sizeFile(t, e = "byte") {
|
|
469
|
-
const s =
|
|
470
|
-
if (s > 1024 &&
|
|
523
|
+
const s = k(t);
|
|
524
|
+
if (s > 1024 && ht(e))
|
|
471
525
|
switch (e) {
|
|
472
526
|
case "byte":
|
|
473
527
|
return this.sizeFile(s / 1024, "kilobyte");
|
|
@@ -504,7 +558,7 @@ class I {
|
|
|
504
558
|
* объект с некоторыми или всеми свойствами
|
|
505
559
|
*/
|
|
506
560
|
percentBy100(t, e) {
|
|
507
|
-
return this.percent(
|
|
561
|
+
return this.percent(k(t) / 100, e);
|
|
508
562
|
}
|
|
509
563
|
/**
|
|
510
564
|
* Применять форматирование, учитывающее множественное число, и языковые правила, связанные с множественным числом
|
|
@@ -515,38 +569,38 @@ class I {
|
|
|
515
569
|
* @param optionsNumber an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
516
570
|
*/
|
|
517
571
|
plural(t, e, s, n) {
|
|
518
|
-
const
|
|
519
|
-
if (
|
|
572
|
+
const o = k(t), a = e.split("|");
|
|
573
|
+
if (a.length > 1)
|
|
520
574
|
try {
|
|
521
575
|
if (d()) {
|
|
522
|
-
const
|
|
523
|
-
let
|
|
524
|
-
switch (
|
|
576
|
+
const l = new Intl.PluralRules(this.getLocation(), s).select(o);
|
|
577
|
+
let h;
|
|
578
|
+
switch (l) {
|
|
525
579
|
case "zero":
|
|
526
|
-
|
|
580
|
+
h = a[a.length - 1];
|
|
527
581
|
break;
|
|
528
582
|
case "one":
|
|
529
|
-
|
|
583
|
+
h = a?.[0];
|
|
530
584
|
break;
|
|
531
585
|
case "two":
|
|
532
|
-
|
|
586
|
+
h = a?.[1];
|
|
533
587
|
break;
|
|
534
588
|
case "few":
|
|
535
|
-
|
|
589
|
+
h = a?.[3] ? a?.[2] : a?.[1];
|
|
536
590
|
break;
|
|
537
591
|
case "many":
|
|
538
|
-
|
|
592
|
+
h = a?.[3] || a?.[2] || a?.[1];
|
|
539
593
|
break;
|
|
540
594
|
case "other":
|
|
541
|
-
|
|
595
|
+
a.length === 6 ? h = a[a.length - 2] : h = a[a.length - 1];
|
|
542
596
|
break;
|
|
543
597
|
}
|
|
544
|
-
return `${this.number(
|
|
598
|
+
return `${this.number(o, n)} ${h ?? ""}`.trim();
|
|
545
599
|
}
|
|
546
600
|
} catch (u) {
|
|
547
601
|
console.error("plural: ", u);
|
|
548
602
|
}
|
|
549
|
-
return `${this.number(
|
|
603
|
+
return `${this.number(o, n)} ${a?.[0] ?? ""}`.trim();
|
|
550
604
|
}
|
|
551
605
|
/**
|
|
552
606
|
* Enables language-sensitive date and time formatting.
|
|
@@ -558,8 +612,8 @@ class I {
|
|
|
558
612
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
559
613
|
*/
|
|
560
614
|
date(t, e, s, n) {
|
|
561
|
-
const
|
|
562
|
-
return n && (u.hour12 = !1),
|
|
615
|
+
const o = D(t), a = typeof s == "string", u = this.dateOptions(e, a ? s : "short");
|
|
616
|
+
return n && (u.hour12 = !1), a || Object.assign(u, s), o.toLocaleString(this.getLocation(), u);
|
|
563
617
|
}
|
|
564
618
|
/**
|
|
565
619
|
* Enables language-sensitive relative time formatting.
|
|
@@ -571,12 +625,12 @@ class I {
|
|
|
571
625
|
* @param todayValue current day/ текущий день
|
|
572
626
|
*/
|
|
573
627
|
relative(t, e, s) {
|
|
574
|
-
const n =
|
|
628
|
+
const n = D(t), o = s || /* @__PURE__ */ new Date(), a = {
|
|
575
629
|
numeric: "auto",
|
|
576
630
|
...typeof e == "string" ? { style: e } : e || {}
|
|
577
631
|
};
|
|
578
|
-
let u = "second",
|
|
579
|
-
return Math.abs(
|
|
632
|
+
let u = "second", l = (n.getTime() - o.getTime()) / 1e3;
|
|
633
|
+
return Math.abs(l) >= 60 && (u = "minute", l /= 60, Math.abs(l) >= 60 && (u = "hour", l /= 60, Math.abs(l) >= 24 && (u = "day", l /= 24, Math.abs(l) >= 30 && (u = "month", l /= 30, Math.abs(l) >= 12 && (u = "year", l /= 12))))), this.relativeByValue(l, u, a);
|
|
580
634
|
}
|
|
581
635
|
/**
|
|
582
636
|
* Enables language-sensitive relative time formatting
|
|
@@ -596,16 +650,16 @@ class I {
|
|
|
596
650
|
* @param type type of data format/ тип формата data
|
|
597
651
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
598
652
|
*/
|
|
599
|
-
relativeLimit(t, e, s, n,
|
|
600
|
-
const
|
|
601
|
-
return
|
|
602
|
-
|
|
653
|
+
relativeLimit(t, e, s, n, o, a, u) {
|
|
654
|
+
const l = D(t), h = s || /* @__PURE__ */ new Date(), I = new Date(h), N = new Date(h);
|
|
655
|
+
return I.setDate(h.getDate() - e), N.setDate(h.getDate() + e), l >= I && l <= N ? this.relative(
|
|
656
|
+
l,
|
|
603
657
|
n,
|
|
604
|
-
|
|
658
|
+
h
|
|
605
659
|
) : this.date(
|
|
606
|
-
|
|
607
|
-
o,
|
|
660
|
+
l,
|
|
608
661
|
a,
|
|
662
|
+
o,
|
|
609
663
|
u
|
|
610
664
|
);
|
|
611
665
|
}
|
|
@@ -622,9 +676,9 @@ class I {
|
|
|
622
676
|
};
|
|
623
677
|
try {
|
|
624
678
|
if (d())
|
|
625
|
-
return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(
|
|
626
|
-
} catch (
|
|
627
|
-
console.error("relative: ",
|
|
679
|
+
return new Intl.RelativeTimeFormat(this.getLocation(), n).format(Math.round(k(t)), e);
|
|
680
|
+
} catch (o) {
|
|
681
|
+
console.error("relative: ", o);
|
|
628
682
|
}
|
|
629
683
|
return "";
|
|
630
684
|
}
|
|
@@ -637,7 +691,7 @@ class I {
|
|
|
637
691
|
month(t, e) {
|
|
638
692
|
try {
|
|
639
693
|
if (d())
|
|
640
|
-
return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(
|
|
694
|
+
return Intl.DateTimeFormat(this.getLocation(), { month: e || "long" }).format(D(t));
|
|
641
695
|
} catch (s) {
|
|
642
696
|
console.error("month: ", s);
|
|
643
697
|
}
|
|
@@ -657,10 +711,10 @@ class I {
|
|
|
657
711
|
try {
|
|
658
712
|
if (d()) {
|
|
659
713
|
const s = /* @__PURE__ */ new Date(), n = Intl.DateTimeFormat(this.getLocation(), { month: t || "long" });
|
|
660
|
-
for (let
|
|
661
|
-
s.setMonth(
|
|
662
|
-
label: n.format(s).replace(/^./, (
|
|
663
|
-
value:
|
|
714
|
+
for (let o = 0; o < 12; o++)
|
|
715
|
+
s.setMonth(o), e.push({
|
|
716
|
+
label: n.format(s).replace(/^./, (a) => a.toUpperCase()),
|
|
717
|
+
value: o + 1
|
|
664
718
|
});
|
|
665
719
|
}
|
|
666
720
|
} catch (s) {
|
|
@@ -678,7 +732,7 @@ class I {
|
|
|
678
732
|
weekday(t, e) {
|
|
679
733
|
try {
|
|
680
734
|
if (d())
|
|
681
|
-
return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(
|
|
735
|
+
return Intl.DateTimeFormat(this.getLocation(), { weekday: e || "long" }).format(D(t));
|
|
682
736
|
} catch (s) {
|
|
683
737
|
console.error("weekday: ", s);
|
|
684
738
|
}
|
|
@@ -697,9 +751,9 @@ class I {
|
|
|
697
751
|
}];
|
|
698
752
|
try {
|
|
699
753
|
if (d()) {
|
|
700
|
-
const s = /* @__PURE__ */ new Date(), n = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }),
|
|
701
|
-
s.setDate(s.getDate() -
|
|
702
|
-
for (let
|
|
754
|
+
const s = /* @__PURE__ */ new Date(), n = Intl.DateTimeFormat(this.getLocation(), { weekday: t || "long" }), o = s.getDay() + (this.geo.firstDay === "Mo" ? -1 : 1);
|
|
755
|
+
s.setDate(s.getDate() - o);
|
|
756
|
+
for (let a = 0; a < 7; a++)
|
|
703
757
|
e.push({
|
|
704
758
|
label: n.format(s).replace(/^./, (u) => u.toUpperCase()),
|
|
705
759
|
value: s.getDay()
|
|
@@ -729,7 +783,7 @@ class I {
|
|
|
729
783
|
sort(t, e = (s, n) => [s, n]) {
|
|
730
784
|
if (d()) {
|
|
731
785
|
const s = new Intl.Collator(this.getLocation());
|
|
732
|
-
return t.sort((n,
|
|
786
|
+
return t.sort((n, o) => s.compare(...e(n, o)));
|
|
733
787
|
}
|
|
734
788
|
return t;
|
|
735
789
|
}
|
|
@@ -760,16 +814,16 @@ class I {
|
|
|
760
814
|
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;
|
|
761
815
|
}
|
|
762
816
|
}
|
|
763
|
-
const
|
|
764
|
-
class
|
|
817
|
+
const et = {};
|
|
818
|
+
class gt {
|
|
765
819
|
/**
|
|
766
820
|
* Constructor
|
|
767
821
|
* @param date date for processing/ дата для обработки
|
|
768
822
|
* @param type type of date format for output/ тип формата даты вывода
|
|
769
823
|
* @param code country and language code/ код страны и языка
|
|
770
824
|
*/
|
|
771
|
-
constructor(t, e = "date", s =
|
|
772
|
-
this.type = e, this.code = s, this.date =
|
|
825
|
+
constructor(t, e = "date", s = b.getLocation()) {
|
|
826
|
+
this.type = e, this.code = s, this.date = D(t);
|
|
773
827
|
}
|
|
774
828
|
date;
|
|
775
829
|
hour24 = !1;
|
|
@@ -780,7 +834,7 @@ class ut {
|
|
|
780
834
|
* Возвращает объект для работы с форматированием.
|
|
781
835
|
*/
|
|
782
836
|
getIntl() {
|
|
783
|
-
return new
|
|
837
|
+
return new W(this.code);
|
|
784
838
|
}
|
|
785
839
|
/**
|
|
786
840
|
* Returns a Date object.
|
|
@@ -842,8 +896,8 @@ class ut {
|
|
|
842
896
|
const n = this.getIntl().number(Math.trunc(s), {
|
|
843
897
|
signDisplay: "always",
|
|
844
898
|
minimumIntegerDigits: 2
|
|
845
|
-
}),
|
|
846
|
-
return t === "RFC" ? `${n}${
|
|
899
|
+
}), o = s.toString().match(/.\d+/) ? "30" : "00";
|
|
900
|
+
return t === "RFC" ? `${n}${o}` : `${n}:${o}`;
|
|
847
901
|
}
|
|
848
902
|
/**
|
|
849
903
|
* Returns the code of the first day of the week.
|
|
@@ -988,7 +1042,7 @@ class ut {
|
|
|
988
1042
|
* @param timeZone add time zone/ добавить временную зону
|
|
989
1043
|
*/
|
|
990
1044
|
standard(t = !0) {
|
|
991
|
-
const e = new
|
|
1045
|
+
const e = new gt(this.date, this.type, "en-GB"), s = [];
|
|
992
1046
|
let n;
|
|
993
1047
|
return e.setHour24(!0), this.type === "hour-minute" ? n = e.locale(this.type, {
|
|
994
1048
|
year: "numeric",
|
|
@@ -1004,7 +1058,7 @@ class ut {
|
|
|
1004
1058
|
* целочисленное значение, представляющее число
|
|
1005
1059
|
*/
|
|
1006
1060
|
setDate(t) {
|
|
1007
|
-
return this.date =
|
|
1061
|
+
return this.date = D(t), this.update(), this;
|
|
1008
1062
|
}
|
|
1009
1063
|
/**
|
|
1010
1064
|
* Change the type of data output.
|
|
@@ -1412,12 +1466,12 @@ class ut {
|
|
|
1412
1466
|
}
|
|
1413
1467
|
}
|
|
1414
1468
|
const r = "@flag";
|
|
1415
|
-
class
|
|
1469
|
+
class U {
|
|
1416
1470
|
/**
|
|
1417
1471
|
* Constructor
|
|
1418
1472
|
* @param code country and language code/ код страны и языка
|
|
1419
1473
|
*/
|
|
1420
|
-
constructor(t =
|
|
1474
|
+
constructor(t = b.getLocation()) {
|
|
1421
1475
|
this.code = t;
|
|
1422
1476
|
}
|
|
1423
1477
|
static flags = {
|
|
@@ -1670,14 +1724,14 @@ class R {
|
|
|
1670
1724
|
* @param code country code/ код страны
|
|
1671
1725
|
*/
|
|
1672
1726
|
get(t = this.code) {
|
|
1673
|
-
const e =
|
|
1727
|
+
const e = b.find(t);
|
|
1674
1728
|
if (e) {
|
|
1675
1729
|
const s = this.getCountry(e);
|
|
1676
1730
|
return {
|
|
1677
1731
|
language: this.getLanguage(e),
|
|
1678
1732
|
country: s,
|
|
1679
1733
|
standard: e.standard,
|
|
1680
|
-
icon:
|
|
1734
|
+
icon: U.flags?.[e.country],
|
|
1681
1735
|
label: s,
|
|
1682
1736
|
value: e.country
|
|
1683
1737
|
};
|
|
@@ -1709,7 +1763,7 @@ class R {
|
|
|
1709
1763
|
*/
|
|
1710
1764
|
getNational(t) {
|
|
1711
1765
|
return f(this.getList(t), (e) => {
|
|
1712
|
-
const s = new
|
|
1766
|
+
const s = new U(e.standard).get(e.standard);
|
|
1713
1767
|
return {
|
|
1714
1768
|
...e,
|
|
1715
1769
|
description: s?.country,
|
|
@@ -1733,7 +1787,7 @@ class R {
|
|
|
1733
1787
|
* Возвращает специальный объект для работы с форматированием.
|
|
1734
1788
|
*/
|
|
1735
1789
|
getLocation() {
|
|
1736
|
-
return new
|
|
1790
|
+
return new W(this.code);
|
|
1737
1791
|
}
|
|
1738
1792
|
/**
|
|
1739
1793
|
* Returns a list of countries to retrieve data from.
|
|
@@ -1742,7 +1796,7 @@ class R {
|
|
|
1742
1796
|
* @param codes country code/ код страны
|
|
1743
1797
|
*/
|
|
1744
1798
|
getCodes(t) {
|
|
1745
|
-
return t ?? Object.keys(
|
|
1799
|
+
return t ?? Object.keys(U.flags);
|
|
1746
1800
|
}
|
|
1747
1801
|
/**
|
|
1748
1802
|
* Getting the name of the language.
|
|
@@ -1763,7 +1817,7 @@ class R {
|
|
|
1763
1817
|
return this.getLocation().countryName(t.country);
|
|
1764
1818
|
}
|
|
1765
1819
|
}
|
|
1766
|
-
const
|
|
1820
|
+
const E = class E {
|
|
1767
1821
|
/**
|
|
1768
1822
|
* Getting an object with information about the phone code and country.
|
|
1769
1823
|
*
|
|
@@ -1781,8 +1835,8 @@ const N = class N {
|
|
|
1781
1835
|
*/
|
|
1782
1836
|
static getByPhone(t) {
|
|
1783
1837
|
let e = this.map, s, n = "";
|
|
1784
|
-
return this.toNumber(t).forEach((
|
|
1785
|
-
n === "" &&
|
|
1838
|
+
return this.toNumber(t).forEach((o) => {
|
|
1839
|
+
n === "" && o in e ? (s = e[o], e = s?.next ?? {}) : n += o;
|
|
1786
1840
|
}), {
|
|
1787
1841
|
item: s,
|
|
1788
1842
|
phone: n
|
|
@@ -1823,11 +1877,11 @@ const N = class N {
|
|
|
1823
1877
|
* @param masks a mask to transform a phone number/ маска для преобразования номер телефон
|
|
1824
1878
|
*/
|
|
1825
1879
|
static toMask(t, e) {
|
|
1826
|
-
if (
|
|
1880
|
+
if (F(t) && Array.isArray(e) && e.length > 0) {
|
|
1827
1881
|
const s = this.removeZero(t), n = s.length;
|
|
1828
|
-
for (const
|
|
1829
|
-
if (this.getUnnecessaryLength(
|
|
1830
|
-
return this.toStandard(s,
|
|
1882
|
+
for (const o of e)
|
|
1883
|
+
if (this.getUnnecessaryLength(o) === n)
|
|
1884
|
+
return this.toStandard(s, o);
|
|
1831
1885
|
}
|
|
1832
1886
|
}
|
|
1833
1887
|
/**
|
|
@@ -1871,12 +1925,12 @@ const N = class N {
|
|
|
1871
1925
|
* Формирование списка для карты.
|
|
1872
1926
|
*/
|
|
1873
1927
|
static makeList() {
|
|
1874
|
-
const t = f(
|
|
1928
|
+
const t = f(b.getList(), (e) => {
|
|
1875
1929
|
if (e?.phoneMask)
|
|
1876
1930
|
return {
|
|
1877
1931
|
phone: e?.phoneCode && Number(e.phoneCode.replace(/[^0-9]+/, "")) || void 0,
|
|
1878
1932
|
within: e?.phoneWithin || 0,
|
|
1879
|
-
mask:
|
|
1933
|
+
mask: R(e.phoneMask),
|
|
1880
1934
|
value: e.country
|
|
1881
1935
|
};
|
|
1882
1936
|
});
|
|
@@ -1891,19 +1945,19 @@ const N = class N {
|
|
|
1891
1945
|
this.list.forEach((t) => {
|
|
1892
1946
|
t.mask.forEach((e) => {
|
|
1893
1947
|
let s = this.map, n;
|
|
1894
|
-
if (this.toNumber(e).forEach((
|
|
1895
|
-
|
|
1948
|
+
if (this.toNumber(e).forEach((o) => {
|
|
1949
|
+
o in s || (s[o] = {
|
|
1896
1950
|
items: [],
|
|
1897
1951
|
info: void 0,
|
|
1898
1952
|
value: void 0,
|
|
1899
1953
|
mask: [],
|
|
1900
1954
|
maskFull: [],
|
|
1901
1955
|
next: {}
|
|
1902
|
-
}), n = s[
|
|
1956
|
+
}), n = s[o], s = n?.next ?? {};
|
|
1903
1957
|
}), n) {
|
|
1904
1958
|
n.value === void 0 && (n.info = t, n.value = t.value);
|
|
1905
|
-
const
|
|
1906
|
-
n.mask.push(
|
|
1959
|
+
const o = this.toWithin(e, t.within);
|
|
1960
|
+
n.mask.push(o), n.maskFull.push(o.replace(/\d/ig, "*")), n.items.push(t);
|
|
1907
1961
|
}
|
|
1908
1962
|
});
|
|
1909
1963
|
});
|
|
@@ -1939,9 +1993,9 @@ const N = class N {
|
|
|
1939
1993
|
return t.replace(/\*/, this.getWithinSymbol(e));
|
|
1940
1994
|
}
|
|
1941
1995
|
};
|
|
1942
|
-
|
|
1943
|
-
let
|
|
1944
|
-
class
|
|
1996
|
+
A(E, "list", []), A(E, "map", {}), E.makeList(), E.makeMap();
|
|
1997
|
+
let wt = E, K;
|
|
1998
|
+
class ze {
|
|
1945
1999
|
/**
|
|
1946
2000
|
* Returns the value by its name.
|
|
1947
2001
|
*
|
|
@@ -1949,7 +2003,7 @@ class Le {
|
|
|
1949
2003
|
* @param name property name/ название свойства
|
|
1950
2004
|
*/
|
|
1951
2005
|
static get(t) {
|
|
1952
|
-
return
|
|
2006
|
+
return K && K?.[t];
|
|
1953
2007
|
}
|
|
1954
2008
|
/**
|
|
1955
2009
|
* Adds data, this method works only once.
|
|
@@ -1958,10 +2012,10 @@ class Le {
|
|
|
1958
2012
|
* @param data global data/ глобальные данные
|
|
1959
2013
|
*/
|
|
1960
2014
|
static add(t) {
|
|
1961
|
-
|
|
2015
|
+
K === void 0 && (K = { ...t });
|
|
1962
2016
|
}
|
|
1963
2017
|
}
|
|
1964
|
-
const
|
|
2018
|
+
const x = class x {
|
|
1965
2019
|
/**
|
|
1966
2020
|
* Get data from hash.
|
|
1967
2021
|
*
|
|
@@ -1980,7 +2034,7 @@ const M = class M {
|
|
|
1980
2034
|
* @param callback value or function to change data/ значение или функция для изменения данных
|
|
1981
2035
|
*/
|
|
1982
2036
|
static set(t, e) {
|
|
1983
|
-
const s =
|
|
2037
|
+
const s = B(e);
|
|
1984
2038
|
s !== this.hash?.[t] && (this.hash[t] = s, this.update());
|
|
1985
2039
|
}
|
|
1986
2040
|
/**
|
|
@@ -2013,7 +2067,7 @@ const M = class M {
|
|
|
2013
2067
|
const t = {};
|
|
2014
2068
|
return location.hash.replace(
|
|
2015
2069
|
/([\w-]+)[:=]([^;]+)/ig,
|
|
2016
|
-
(...e) => (t[String(e[1])] =
|
|
2070
|
+
(...e) => (t[String(e[1])] = Lt(e[2]), "")
|
|
2017
2071
|
), t;
|
|
2018
2072
|
}
|
|
2019
2073
|
/**
|
|
@@ -2022,7 +2076,7 @@ const M = class M {
|
|
|
2022
2076
|
* Обновление строки хэша в URL.
|
|
2023
2077
|
*/
|
|
2024
2078
|
static update() {
|
|
2025
|
-
this.block = !0, history.replaceState(null, "", `#${
|
|
2079
|
+
this.block = !0, history.replaceState(null, "", `#${Ht(this.hash, "=", ";")}`), requestAnimationFrame(() => {
|
|
2026
2080
|
this.block = !1;
|
|
2027
2081
|
});
|
|
2028
2082
|
}
|
|
@@ -2038,36 +2092,636 @@ const M = class M {
|
|
|
2038
2092
|
});
|
|
2039
2093
|
}
|
|
2040
2094
|
};
|
|
2041
|
-
|
|
2042
|
-
let
|
|
2043
|
-
function
|
|
2044
|
-
return
|
|
2095
|
+
A(x, "hash", {}), A(x, "watch", {}), A(x, "block", !1), d() && (x.reload(), addEventListener("hashchange", () => x.reload()));
|
|
2096
|
+
let _ = x;
|
|
2097
|
+
function ee(i, t, e) {
|
|
2098
|
+
return M(i)?.[t] ?? e;
|
|
2045
2099
|
}
|
|
2046
|
-
function
|
|
2047
|
-
const s =
|
|
2100
|
+
function ie(i, t, e) {
|
|
2101
|
+
const s = M(i);
|
|
2048
2102
|
if (s) {
|
|
2049
|
-
const n =
|
|
2050
|
-
if (
|
|
2051
|
-
f(e, (
|
|
2052
|
-
n[
|
|
2103
|
+
const n = ee(s, t);
|
|
2104
|
+
if (p(n) && p(e))
|
|
2105
|
+
f(e, (o, a) => {
|
|
2106
|
+
n[a] = B(o);
|
|
2053
2107
|
});
|
|
2054
2108
|
else {
|
|
2055
|
-
const
|
|
2056
|
-
!(t in s) && typeof
|
|
2109
|
+
const o = B(e);
|
|
2110
|
+
!(t in s) && typeof o == "string" ? s.setAttribute(t.toString(), o) : s[t] = B(e);
|
|
2057
2111
|
}
|
|
2058
2112
|
}
|
|
2059
2113
|
return s;
|
|
2060
2114
|
}
|
|
2061
|
-
function
|
|
2115
|
+
function ut(i, t = "div", e, s) {
|
|
2062
2116
|
if (!d())
|
|
2063
2117
|
return;
|
|
2064
2118
|
const n = document.createElement(t);
|
|
2065
|
-
return typeof e == "function" ? e(n) :
|
|
2066
|
-
|
|
2119
|
+
return typeof e == "function" ? e(n) : C(e) && f(e, (o, a) => {
|
|
2120
|
+
ie(n, a, o);
|
|
2067
2121
|
}), i?.insertBefore(n, s ?? null), n;
|
|
2068
2122
|
}
|
|
2069
|
-
|
|
2070
|
-
|
|
2123
|
+
function se(i) {
|
|
2124
|
+
return i.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").trim();
|
|
2125
|
+
}
|
|
2126
|
+
class ft {
|
|
2127
|
+
/**
|
|
2128
|
+
* Creates an instance of MetaManager.
|
|
2129
|
+
*
|
|
2130
|
+
* Создает экземпляр MetaManager.
|
|
2131
|
+
* @param listMeta list of meta-tag names to manage / список имен мета-тегов для управления
|
|
2132
|
+
* @param isProperty use 'property' attribute instead of 'name' / использовать атрибут 'property' вместо 'name'
|
|
2133
|
+
*/
|
|
2134
|
+
constructor(t, e = !1) {
|
|
2135
|
+
this.listMeta = t, this.isProperty = e, this.update();
|
|
2136
|
+
}
|
|
2137
|
+
items = {};
|
|
2138
|
+
/**
|
|
2139
|
+
* Returns the list of meta tag names.
|
|
2140
|
+
*
|
|
2141
|
+
* Возвращает список имен мета-тегов.
|
|
2142
|
+
*/
|
|
2143
|
+
getListMeta() {
|
|
2144
|
+
return this.listMeta;
|
|
2145
|
+
}
|
|
2146
|
+
/**
|
|
2147
|
+
* Get the content of a meta tag by name.
|
|
2148
|
+
*
|
|
2149
|
+
* Получает содержимое мета-тега по имени.
|
|
2150
|
+
* @param name meta tag name / имя мета-тега
|
|
2151
|
+
*/
|
|
2152
|
+
get(t) {
|
|
2153
|
+
return this.items[t] ?? "";
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Returns all meta tags.
|
|
2157
|
+
*
|
|
2158
|
+
* Возвращает все мета-теги.
|
|
2159
|
+
*/
|
|
2160
|
+
getItems() {
|
|
2161
|
+
return this.items;
|
|
2162
|
+
}
|
|
2163
|
+
/**
|
|
2164
|
+
* Returns all meta tags as HTML string.
|
|
2165
|
+
*
|
|
2166
|
+
* Возвращает все мета-теги в виде HTML-строки.
|
|
2167
|
+
*/
|
|
2168
|
+
html() {
|
|
2169
|
+
return f(
|
|
2170
|
+
this.listMeta,
|
|
2171
|
+
(e) => this.toHtmlString(e)
|
|
2172
|
+
).join("");
|
|
2173
|
+
}
|
|
2174
|
+
/**
|
|
2175
|
+
* Sets the content of a meta tag.
|
|
2176
|
+
*
|
|
2177
|
+
* Устанавливает содержимое мета-тега.
|
|
2178
|
+
* @param name meta tag name / имя мета-тега
|
|
2179
|
+
* @param content meta tag content / содержимое мета-тега
|
|
2180
|
+
*/
|
|
2181
|
+
set(t, e) {
|
|
2182
|
+
return this.setItem(t, e).setMeta(t), this;
|
|
2183
|
+
}
|
|
2184
|
+
/**
|
|
2185
|
+
* Sets multiple meta tags from an object.
|
|
2186
|
+
*
|
|
2187
|
+
* Устанавливает несколько мета-тегов из объекта.
|
|
2188
|
+
* @param metaList object with meta tag names and content / объект с именами и содержимым мета-тегов
|
|
2189
|
+
*/
|
|
2190
|
+
setByList(t) {
|
|
2191
|
+
return f(
|
|
2192
|
+
t,
|
|
2193
|
+
(e, s) => this.set(s, String(e))
|
|
2194
|
+
), this;
|
|
2195
|
+
}
|
|
2196
|
+
/**
|
|
2197
|
+
* Returns the attribute name for meta tags.
|
|
2198
|
+
*
|
|
2199
|
+
* Возвращает имя атрибута для мета-тегов.
|
|
2200
|
+
*/
|
|
2201
|
+
getAttributeName() {
|
|
2202
|
+
return this.isProperty ? "property" : "name";
|
|
2203
|
+
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Finds a meta element in the DOM.
|
|
2206
|
+
*
|
|
2207
|
+
* Находит мета-элемент в DOM.
|
|
2208
|
+
* @param name meta tag name / имя мета-тега
|
|
2209
|
+
*/
|
|
2210
|
+
findMetaElement(t) {
|
|
2211
|
+
if (!d())
|
|
2212
|
+
return;
|
|
2213
|
+
const e = `meta[${this.getAttributeName()}="${t}"]`;
|
|
2214
|
+
return document.querySelector(e) || void 0;
|
|
2215
|
+
}
|
|
2216
|
+
/**
|
|
2217
|
+
* Sets the content of a meta tag in internal storage.
|
|
2218
|
+
*
|
|
2219
|
+
* Устанавливает содержимое мета-тега во внутреннем хранилище.
|
|
2220
|
+
* @param name meta tag name / имя мета-тега
|
|
2221
|
+
* @param content meta tag content / содержимое мета-тега
|
|
2222
|
+
*/
|
|
2223
|
+
setItem(t, e) {
|
|
2224
|
+
return this.items[t] = e, this;
|
|
2225
|
+
}
|
|
2226
|
+
/**
|
|
2227
|
+
* Sets or creates a meta tag in the DOM.
|
|
2228
|
+
*
|
|
2229
|
+
* Устанавливает или создает мета-тег в DOM.
|
|
2230
|
+
* @param name meta tag name / имя мета-тега
|
|
2231
|
+
*/
|
|
2232
|
+
setMeta(t) {
|
|
2233
|
+
const e = this.findMetaElement(t), s = this.items[t] ?? "";
|
|
2234
|
+
if (e)
|
|
2235
|
+
e.content = s;
|
|
2236
|
+
else if (d()) {
|
|
2237
|
+
const n = { content: s };
|
|
2238
|
+
this.isProperty ? n.property = t : n.name = t, ut(document.head, "meta", n);
|
|
2239
|
+
}
|
|
2240
|
+
return this;
|
|
2241
|
+
}
|
|
2242
|
+
/**
|
|
2243
|
+
* Converts meta tag to HTML string.
|
|
2244
|
+
*
|
|
2245
|
+
* Преобразует мета-тег в HTML-строку.
|
|
2246
|
+
* @param name meta tag name / имя мета-тега
|
|
2247
|
+
*/
|
|
2248
|
+
toHtmlString(t) {
|
|
2249
|
+
const e = se(this.items[t] ?? "");
|
|
2250
|
+
return e ? `<meta ${this.getAttributeName()}="${t}" content="${e}">` : "";
|
|
2251
|
+
}
|
|
2252
|
+
/**
|
|
2253
|
+
* Updates meta tags data from the DOM.
|
|
2254
|
+
*
|
|
2255
|
+
* Обновляет данные мета-тегов из DOM.
|
|
2256
|
+
*/
|
|
2257
|
+
update() {
|
|
2258
|
+
return this.listMeta.forEach((t) => {
|
|
2259
|
+
this.items[t] = this.findMetaElement(t)?.content ?? "";
|
|
2260
|
+
}), this;
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
var w = /* @__PURE__ */ ((i) => (i.description = "description", i.keywords = "keywords", i.canonical = "canonical", i.robots = "robots", i.author = "author", i))(w || {}), re = /* @__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))(re || {}), $ = /* @__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))($ || {}), ne = /* @__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))(ne || {}), oe = /* @__PURE__ */ ((i) => (i.inStock = "in stock", i.outOfStock = "out of stock", i.preorder = "preorder", i.backorder = "backorder", i.discontinued = "discontinued", i.pending = "pending", i))(oe || {}), ae = /* @__PURE__ */ ((i) => (i.new = "new", i.used = "used", i.refurbished = "refurbished", i))(ae || {}), ce = /* @__PURE__ */ ((i) => (i.newborn = "newborn", i.infant = "infant", i.toddler = "toddler", i.kids = "kids", i.adult = "adult", i))(ce || {}), ue = /* @__PURE__ */ ((i) => (i.female = "female", i.male = "male", i.unisex = "unisex", i))(ue || {}), v = /* @__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))(v || {}), le = /* @__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))(le || {});
|
|
2264
|
+
class he extends ft {
|
|
2265
|
+
constructor() {
|
|
2266
|
+
super(Object.values($), !0);
|
|
2267
|
+
}
|
|
2268
|
+
/**
|
|
2269
|
+
* Gets the Open Graph title.
|
|
2270
|
+
*
|
|
2271
|
+
* Получает заголовок Open Graph.
|
|
2272
|
+
*/
|
|
2273
|
+
getTitle() {
|
|
2274
|
+
return this.get($.title);
|
|
2275
|
+
}
|
|
2276
|
+
/**
|
|
2277
|
+
* Gets the Open Graph type.
|
|
2278
|
+
*
|
|
2279
|
+
* Получает тип Open Graph.
|
|
2280
|
+
*/
|
|
2281
|
+
getType() {
|
|
2282
|
+
return this.get($.type);
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* Gets the Open Graph URL.
|
|
2286
|
+
*
|
|
2287
|
+
* Получает URL Open Graph.
|
|
2288
|
+
*/
|
|
2289
|
+
getUrl() {
|
|
2290
|
+
return this.get($.url);
|
|
2291
|
+
}
|
|
2292
|
+
/**
|
|
2293
|
+
* Gets the Open Graph image URL.
|
|
2294
|
+
*
|
|
2295
|
+
* Получает URL изображения Open Graph.
|
|
2296
|
+
*/
|
|
2297
|
+
getImage() {
|
|
2298
|
+
return this.get($.image);
|
|
2299
|
+
}
|
|
2300
|
+
/**
|
|
2301
|
+
* Gets the Open Graph description.
|
|
2302
|
+
*
|
|
2303
|
+
* Получает описание Open Graph.
|
|
2304
|
+
*/
|
|
2305
|
+
getDescription() {
|
|
2306
|
+
return this.get($.description);
|
|
2307
|
+
}
|
|
2308
|
+
/**
|
|
2309
|
+
* Gets the Open Graph locale.
|
|
2310
|
+
*
|
|
2311
|
+
* Получает локаль Open Graph.
|
|
2312
|
+
*/
|
|
2313
|
+
getLocale() {
|
|
2314
|
+
return this.get($.locale);
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* Gets the Open Graph site name.
|
|
2318
|
+
*
|
|
2319
|
+
* Получает название сайта Open Graph.
|
|
2320
|
+
*/
|
|
2321
|
+
getSiteName() {
|
|
2322
|
+
return this.get($.siteName);
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* Sets the Open Graph title.
|
|
2326
|
+
*
|
|
2327
|
+
* Устанавливает заголовок Open Graph.
|
|
2328
|
+
* @param title title / заголовок
|
|
2329
|
+
*/
|
|
2330
|
+
setTitle(t) {
|
|
2331
|
+
return this.set($.title, t);
|
|
2332
|
+
}
|
|
2333
|
+
/**
|
|
2334
|
+
* Sets the Open Graph type.
|
|
2335
|
+
*
|
|
2336
|
+
* Устанавливает тип Open Graph.
|
|
2337
|
+
* @param type type / тип
|
|
2338
|
+
*/
|
|
2339
|
+
setType(t) {
|
|
2340
|
+
return this.set($.type, t);
|
|
2341
|
+
}
|
|
2342
|
+
/**
|
|
2343
|
+
* Sets the Open Graph URL.
|
|
2344
|
+
*
|
|
2345
|
+
* Устанавливает URL Open Graph.
|
|
2346
|
+
* @param url URL / URL
|
|
2347
|
+
*/
|
|
2348
|
+
setUrl(t) {
|
|
2349
|
+
return this.set($.url, t);
|
|
2350
|
+
}
|
|
2351
|
+
/**
|
|
2352
|
+
* Sets the Open Graph image URL.
|
|
2353
|
+
*
|
|
2354
|
+
* Устанавливает URL изображения Open Graph.
|
|
2355
|
+
* @param url image URL / URL изображения
|
|
2356
|
+
*/
|
|
2357
|
+
setImage(t) {
|
|
2358
|
+
return this.set($.image, t);
|
|
2359
|
+
}
|
|
2360
|
+
/**
|
|
2361
|
+
* Sets the Open Graph description.
|
|
2362
|
+
*
|
|
2363
|
+
* Устанавливает описание Open Graph.
|
|
2364
|
+
* @param description description / описание
|
|
2365
|
+
*/
|
|
2366
|
+
setDescription(t) {
|
|
2367
|
+
return this.set($.description, t);
|
|
2368
|
+
}
|
|
2369
|
+
/**
|
|
2370
|
+
* Sets the Open Graph locale.
|
|
2371
|
+
*
|
|
2372
|
+
* Устанавливает локаль Open Graph.
|
|
2373
|
+
* @param locale locale (e.g. 'en_US', 'ru_RU') / локаль (например, 'en_US', 'ru_RU')
|
|
2374
|
+
*/
|
|
2375
|
+
setLocale(t) {
|
|
2376
|
+
return this.set($.locale, t);
|
|
2377
|
+
}
|
|
2378
|
+
/**
|
|
2379
|
+
* Sets the Open Graph site name.
|
|
2380
|
+
*
|
|
2381
|
+
* Устанавливает название сайта Open Graph.
|
|
2382
|
+
* @param siteName site name / название сайта
|
|
2383
|
+
*/
|
|
2384
|
+
setSiteName(t) {
|
|
2385
|
+
return this.set($.siteName, t);
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
class de extends ft {
|
|
2389
|
+
constructor() {
|
|
2390
|
+
super(Object.values(v));
|
|
2391
|
+
}
|
|
2392
|
+
/**
|
|
2393
|
+
* Gets the Twitter Card type.
|
|
2394
|
+
*
|
|
2395
|
+
* Получает тип Twitter Card.
|
|
2396
|
+
*/
|
|
2397
|
+
getCard() {
|
|
2398
|
+
return this.get(v.card);
|
|
2399
|
+
}
|
|
2400
|
+
/**
|
|
2401
|
+
* Gets the website or brand @username.
|
|
2402
|
+
*
|
|
2403
|
+
* Получает аккаунт сайта или бренда (@username).
|
|
2404
|
+
*/
|
|
2405
|
+
getSite() {
|
|
2406
|
+
return this.get(v.site);
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Gets the content creator @username.
|
|
2410
|
+
*
|
|
2411
|
+
* Получает автора контента (@username).
|
|
2412
|
+
*/
|
|
2413
|
+
getCreator() {
|
|
2414
|
+
return this.get(v.creator);
|
|
2415
|
+
}
|
|
2416
|
+
/**
|
|
2417
|
+
* Gets the page URL.
|
|
2418
|
+
*
|
|
2419
|
+
* Получает URL страницы.
|
|
2420
|
+
*/
|
|
2421
|
+
getUrl() {
|
|
2422
|
+
return this.get(v.url);
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* Gets the card title.
|
|
2426
|
+
*
|
|
2427
|
+
* Получает заголовок карточки.
|
|
2428
|
+
*/
|
|
2429
|
+
getTitle() {
|
|
2430
|
+
return this.get(v.title);
|
|
2431
|
+
}
|
|
2432
|
+
/**
|
|
2433
|
+
* Gets the card description.
|
|
2434
|
+
*
|
|
2435
|
+
* Получает описание карточки.
|
|
2436
|
+
*/
|
|
2437
|
+
getDescription() {
|
|
2438
|
+
return this.get(v.description);
|
|
2439
|
+
}
|
|
2440
|
+
/**
|
|
2441
|
+
* Gets the card image URL.
|
|
2442
|
+
*
|
|
2443
|
+
* Получает URL изображения карточки.
|
|
2444
|
+
*/
|
|
2445
|
+
getImage() {
|
|
2446
|
+
return this.get(v.image);
|
|
2447
|
+
}
|
|
2448
|
+
/**
|
|
2449
|
+
* Sets the Twitter Card type.
|
|
2450
|
+
*
|
|
2451
|
+
* Устанавливает тип Twitter Card.
|
|
2452
|
+
* @param card card type / тип карточки
|
|
2453
|
+
*/
|
|
2454
|
+
setCard(t) {
|
|
2455
|
+
return this.set(v.card, t), this;
|
|
2456
|
+
}
|
|
2457
|
+
/**
|
|
2458
|
+
* Sets the website or brand @username.
|
|
2459
|
+
*
|
|
2460
|
+
* Устанавливает аккаунт сайта или бренда (@username).
|
|
2461
|
+
* @param site @username / аккаунт
|
|
2462
|
+
*/
|
|
2463
|
+
setSite(t) {
|
|
2464
|
+
return this.set(v.site, t), this;
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Sets the content creator @username.
|
|
2468
|
+
*
|
|
2469
|
+
* Устанавливает автора контента (@username).
|
|
2470
|
+
* @param creator @username / аккаунт автора
|
|
2471
|
+
*/
|
|
2472
|
+
setCreator(t) {
|
|
2473
|
+
return this.set(v.creator, t), this;
|
|
2474
|
+
}
|
|
2475
|
+
/**
|
|
2476
|
+
* Sets the page URL.
|
|
2477
|
+
*
|
|
2478
|
+
* Устанавливает URL страницы.
|
|
2479
|
+
* @param url URL / URL
|
|
2480
|
+
*/
|
|
2481
|
+
setUrl(t) {
|
|
2482
|
+
return this.set(v.url, t), this;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* Sets the card title.
|
|
2486
|
+
*
|
|
2487
|
+
* Устанавливает заголовок карточки.
|
|
2488
|
+
* @param title title / заголовок
|
|
2489
|
+
*/
|
|
2490
|
+
setTitle(t) {
|
|
2491
|
+
return this.set(v.title, t), this;
|
|
2492
|
+
}
|
|
2493
|
+
/**
|
|
2494
|
+
* Sets the card description.
|
|
2495
|
+
*
|
|
2496
|
+
* Устанавливает описание карточки.
|
|
2497
|
+
* @param description description / описание
|
|
2498
|
+
*/
|
|
2499
|
+
setDescription(t) {
|
|
2500
|
+
return this.set(v.description, t), this;
|
|
2501
|
+
}
|
|
2502
|
+
/**
|
|
2503
|
+
* Sets the card image URL.
|
|
2504
|
+
*
|
|
2505
|
+
* Устанавливает URL изображения карточки.
|
|
2506
|
+
* @param image image URL / URL изображения
|
|
2507
|
+
*/
|
|
2508
|
+
setImage(t) {
|
|
2509
|
+
return this.set(v.image, t), this;
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
class ge extends ft {
|
|
2513
|
+
suffix;
|
|
2514
|
+
og;
|
|
2515
|
+
twitter;
|
|
2516
|
+
/**
|
|
2517
|
+
* Creates an instance of Meta with integrated Open Graph and Twitter Card support.
|
|
2518
|
+
*
|
|
2519
|
+
* Создает экземпляр Meta с интегрированной поддержкой Open Graph и Twitter Card.
|
|
2520
|
+
*/
|
|
2521
|
+
constructor() {
|
|
2522
|
+
super(Object.values(w)), this.og = new he(), this.twitter = new de();
|
|
2523
|
+
}
|
|
2524
|
+
/**
|
|
2525
|
+
* Gets the MetaOg instance for advanced Open Graph operations.
|
|
2526
|
+
*
|
|
2527
|
+
* Получает экземпляр MetaOg для расширенных операций с Open Graph.
|
|
2528
|
+
*/
|
|
2529
|
+
getOg() {
|
|
2530
|
+
return this.og;
|
|
2531
|
+
}
|
|
2532
|
+
/**
|
|
2533
|
+
* Gets the MetaTwitter instance for advanced Twitter Card operations.
|
|
2534
|
+
*
|
|
2535
|
+
* Получает экземпляр MetaTwitter для расширенных операций с Twitter Card.
|
|
2536
|
+
*/
|
|
2537
|
+
getTwitter() {
|
|
2538
|
+
return this.twitter;
|
|
2539
|
+
}
|
|
2540
|
+
/**
|
|
2541
|
+
* Gets the page title without suffix.
|
|
2542
|
+
*
|
|
2543
|
+
* Получает заголовок страницы без суффикса.
|
|
2544
|
+
*/
|
|
2545
|
+
getTitle() {
|
|
2546
|
+
return d() ? document.title.replace(this.getSuffix(), "").trim() : "";
|
|
2547
|
+
}
|
|
2548
|
+
/**
|
|
2549
|
+
* Gets the keywords meta tag.
|
|
2550
|
+
*
|
|
2551
|
+
* Получает мета-тег keywords.
|
|
2552
|
+
*/
|
|
2553
|
+
getKeywords() {
|
|
2554
|
+
return this.get(w.keywords);
|
|
2555
|
+
}
|
|
2556
|
+
/**
|
|
2557
|
+
* Gets the description meta tag.
|
|
2558
|
+
*
|
|
2559
|
+
* Получает мета-тег description.
|
|
2560
|
+
*/
|
|
2561
|
+
getDescription() {
|
|
2562
|
+
return this.get(w.description);
|
|
2563
|
+
}
|
|
2564
|
+
/**
|
|
2565
|
+
* Gets the Open Graph image URL.
|
|
2566
|
+
*
|
|
2567
|
+
* Получает URL изображения Open Graph.
|
|
2568
|
+
*/
|
|
2569
|
+
getImage() {
|
|
2570
|
+
return this.og.getImage();
|
|
2571
|
+
}
|
|
2572
|
+
/**
|
|
2573
|
+
* Gets the canonical URL.
|
|
2574
|
+
*
|
|
2575
|
+
* Получает канонический URL.
|
|
2576
|
+
*/
|
|
2577
|
+
getCanonical() {
|
|
2578
|
+
return this.get(w.canonical);
|
|
2579
|
+
}
|
|
2580
|
+
/**
|
|
2581
|
+
* Gets the robots meta tag value.
|
|
2582
|
+
*
|
|
2583
|
+
* Получает значение мета-тега robots.
|
|
2584
|
+
*/
|
|
2585
|
+
getRobots() {
|
|
2586
|
+
return this.get(w.robots);
|
|
2587
|
+
}
|
|
2588
|
+
/**
|
|
2589
|
+
* Gets the author meta tag.
|
|
2590
|
+
*
|
|
2591
|
+
* Получает мета-тег author.
|
|
2592
|
+
*/
|
|
2593
|
+
getAuthor() {
|
|
2594
|
+
return this.get(w.author);
|
|
2595
|
+
}
|
|
2596
|
+
/**
|
|
2597
|
+
* Gets the Open Graph site name.
|
|
2598
|
+
*
|
|
2599
|
+
* Получает название сайта Open Graph.
|
|
2600
|
+
*/
|
|
2601
|
+
getSiteName() {
|
|
2602
|
+
return this.og.getSiteName();
|
|
2603
|
+
}
|
|
2604
|
+
/**
|
|
2605
|
+
* Gets the Open Graph locale.
|
|
2606
|
+
*
|
|
2607
|
+
* Получает локаль Open Graph.
|
|
2608
|
+
*/
|
|
2609
|
+
getLocale() {
|
|
2610
|
+
return this.og.getLocale();
|
|
2611
|
+
}
|
|
2612
|
+
/**
|
|
2613
|
+
* Sets the page title (with suffix) and updates Open Graph and Twitter Card titles.
|
|
2614
|
+
*
|
|
2615
|
+
* Устанавливает заголовок страницы (с суффиксом) и обновляет заголовки Open Graph и Twitter Card.
|
|
2616
|
+
* @param title page title / заголовок страницы
|
|
2617
|
+
*/
|
|
2618
|
+
setTitle(t) {
|
|
2619
|
+
if (d()) {
|
|
2620
|
+
const e = F(t) ? `${t}${this.getSuffix()}` : this.suffix ? this.suffix : "";
|
|
2621
|
+
document.title = e, this.og.setTitle(e), this.twitter.setTitle(e);
|
|
2622
|
+
}
|
|
2623
|
+
return this;
|
|
2624
|
+
}
|
|
2625
|
+
/**
|
|
2626
|
+
* Sets the keywords meta tag.
|
|
2627
|
+
*
|
|
2628
|
+
* Устанавливает мета-тег keywords.
|
|
2629
|
+
* @param keywords keywords as string or array / ключевые слова в виде строки или массива
|
|
2630
|
+
*/
|
|
2631
|
+
setKeywords(t) {
|
|
2632
|
+
return this.set(w.keywords, R(t).join(", ")), this;
|
|
2633
|
+
}
|
|
2634
|
+
/**
|
|
2635
|
+
* Sets the description meta tag.
|
|
2636
|
+
*
|
|
2637
|
+
* Устанавливает мета-тег description.
|
|
2638
|
+
* @param description page description / описание страницы
|
|
2639
|
+
*/
|
|
2640
|
+
setDescription(t) {
|
|
2641
|
+
return this.set(w.description, t), this;
|
|
2642
|
+
}
|
|
2643
|
+
/**
|
|
2644
|
+
* Sets the image for Open Graph and Twitter Card.
|
|
2645
|
+
*
|
|
2646
|
+
* Устанавливает изображение для Open Graph и Twitter Card.
|
|
2647
|
+
* @param image image URL / URL изображения
|
|
2648
|
+
*/
|
|
2649
|
+
setImage(t) {
|
|
2650
|
+
return this.og.setImage(t), this.twitter.setImage(t), this;
|
|
2651
|
+
}
|
|
2652
|
+
/**
|
|
2653
|
+
* Sets the canonical URL and updates Open Graph and Twitter Card URLs.
|
|
2654
|
+
*
|
|
2655
|
+
* Устанавливает канонический URL и обновляет URL для Open Graph и Twitter Card.
|
|
2656
|
+
* @param canonical canonical URL / канонический URL
|
|
2657
|
+
*/
|
|
2658
|
+
setCanonical(t) {
|
|
2659
|
+
return this.set(w.canonical, t), this.og.setUrl(t), this.twitter.setUrl(t), this;
|
|
2660
|
+
}
|
|
2661
|
+
/**
|
|
2662
|
+
* Sets the robots meta tag.
|
|
2663
|
+
*
|
|
2664
|
+
* Устанавливает мета-тег robots.
|
|
2665
|
+
* @param robots robots directive / директива robots
|
|
2666
|
+
*/
|
|
2667
|
+
setRobots(t) {
|
|
2668
|
+
return this.set(w.robots, t), this;
|
|
2669
|
+
}
|
|
2670
|
+
/**
|
|
2671
|
+
* Sets the author meta tag.
|
|
2672
|
+
*
|
|
2673
|
+
* Устанавливает мета-тег author.
|
|
2674
|
+
* @param author author name / имя автора
|
|
2675
|
+
*/
|
|
2676
|
+
setAuthor(t) {
|
|
2677
|
+
return this.set(w.author, t), this;
|
|
2678
|
+
}
|
|
2679
|
+
/**
|
|
2680
|
+
* Sets the site name for Open Graph and Twitter Card.
|
|
2681
|
+
*
|
|
2682
|
+
* Устанавливает название сайта для Open Graph и Twitter Card.
|
|
2683
|
+
* @param siteName site name / название сайта
|
|
2684
|
+
*/
|
|
2685
|
+
setSiteName(t) {
|
|
2686
|
+
return this.og.setSiteName(t), this.twitter.setSite(t), this;
|
|
2687
|
+
}
|
|
2688
|
+
/**
|
|
2689
|
+
* Sets the locale for Open Graph.
|
|
2690
|
+
*
|
|
2691
|
+
* Устанавливает локаль для Open Graph.
|
|
2692
|
+
* @param locale locale (e.g. 'en_US', 'ru_RU') / локаль (например, 'en_US', 'ru_RU')
|
|
2693
|
+
*/
|
|
2694
|
+
setLocale(t) {
|
|
2695
|
+
return this.og.setLocale(t), this;
|
|
2696
|
+
}
|
|
2697
|
+
/**
|
|
2698
|
+
* Sets the suffix to append to page title.
|
|
2699
|
+
*
|
|
2700
|
+
* Устанавливает суффикс для добавления к заголовку страницы.
|
|
2701
|
+
* @param suffix title suffix (e.g. 'My Site') / суффикс заголовка (например, 'Мой Сайт')
|
|
2702
|
+
*/
|
|
2703
|
+
setSuffix(t) {
|
|
2704
|
+
this.suffix = t;
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* Generates the complete HTML for all meta-tags including Open Graph and Twitter Card.
|
|
2708
|
+
*
|
|
2709
|
+
* Генерирует полный HTML для всех мета-тегов, включая Open Graph и Twitter Card.
|
|
2710
|
+
*/
|
|
2711
|
+
html() {
|
|
2712
|
+
return `${super.html()}${this.og.html()}${this.twitter.html()}`;
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Gets the formatted suffix with separator.
|
|
2716
|
+
*
|
|
2717
|
+
* Получает отформатированный суффикс с разделителем.
|
|
2718
|
+
*/
|
|
2719
|
+
getSuffix() {
|
|
2720
|
+
return F(this.suffix) ? ` - ${this.suffix}` : "";
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
class Ct {
|
|
2724
|
+
static storage = new X("scrollbar", !0);
|
|
2071
2725
|
static calculate = !1;
|
|
2072
2726
|
/**
|
|
2073
2727
|
* Checks whether to enable scroll hiding.
|
|
@@ -2097,8 +2751,8 @@ class wt {
|
|
|
2097
2751
|
* Создает элементы для проверки ширины скролла.
|
|
2098
2752
|
*/
|
|
2099
2753
|
static createElement() {
|
|
2100
|
-
return
|
|
2101
|
-
t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%",
|
|
2754
|
+
return ut(document.body, "div", (t) => {
|
|
2755
|
+
t.style.height = "24px", t.style.overflowY = "scroll", t.style.position = "fixed", t.style.width = "100%", ut(t, "div", (e) => {
|
|
2102
2756
|
e.style.height = "100px";
|
|
2103
2757
|
});
|
|
2104
2758
|
});
|
|
@@ -2118,7 +2772,7 @@ class wt {
|
|
|
2118
2772
|
});
|
|
2119
2773
|
}
|
|
2120
2774
|
}
|
|
2121
|
-
const
|
|
2775
|
+
const fe = [
|
|
2122
2776
|
"d",
|
|
2123
2777
|
"e",
|
|
2124
2778
|
"f",
|
|
@@ -2138,22 +2792,22 @@ const _t = [
|
|
|
2138
2792
|
"t",
|
|
2139
2793
|
"u",
|
|
2140
2794
|
"v"
|
|
2141
|
-
],
|
|
2795
|
+
], me = (i, t = {}) => {
|
|
2142
2796
|
let e = String(i);
|
|
2143
2797
|
if (i.match(/%[a-z]/)) {
|
|
2144
2798
|
let s = 0;
|
|
2145
2799
|
f(t, (n) => {
|
|
2146
|
-
e = e.replace(new RegExp(`%${
|
|
2800
|
+
e = e.replace(new RegExp(`%${fe[s++]}`, "g"), String(n));
|
|
2147
2801
|
});
|
|
2148
2802
|
}
|
|
2149
|
-
return
|
|
2803
|
+
return C(t) && f(t, (s, n) => {
|
|
2150
2804
|
e = e.replace(
|
|
2151
2805
|
new RegExp(`\\[${n}\\](.*?)\\[/${n}\\]`, "g"),
|
|
2152
|
-
(
|
|
2806
|
+
(o, a) => String(s).replace(/\[content]/g, a)
|
|
2153
2807
|
).replace(new RegExp(`\\[${n}\\]`, "g"), String(s));
|
|
2154
2808
|
}), e;
|
|
2155
2809
|
};
|
|
2156
|
-
class
|
|
2810
|
+
class q {
|
|
2157
2811
|
static url = "/api/translate";
|
|
2158
2812
|
static propsName = "list";
|
|
2159
2813
|
static data = {};
|
|
@@ -2169,7 +2823,7 @@ class z {
|
|
|
2169
2823
|
*/
|
|
2170
2824
|
static async get(t, e) {
|
|
2171
2825
|
const s = this.getName(t);
|
|
2172
|
-
return s in this.data ? this.replacement(this.data[s], e) : (
|
|
2826
|
+
return s in this.data ? this.replacement(this.data[s], e) : (V.isLocalhost() || await this.add(t), this.replacement(this.data?.[s] ?? t));
|
|
2173
2827
|
}
|
|
2174
2828
|
/**
|
|
2175
2829
|
* Getting the translation text by its code (Sync).
|
|
@@ -2195,10 +2849,10 @@ class z {
|
|
|
2195
2849
|
return new Promise((e) => {
|
|
2196
2850
|
const s = {};
|
|
2197
2851
|
let n = 0;
|
|
2198
|
-
for (const
|
|
2199
|
-
const
|
|
2200
|
-
this.get(
|
|
2201
|
-
s[
|
|
2852
|
+
for (const o of t) {
|
|
2853
|
+
const a = Array.isArray(o) ? o[0] : o, u = Array.isArray(o) ? o.slice(1) : void 0;
|
|
2854
|
+
this.get(a, u).then((l) => {
|
|
2855
|
+
s[a] = l, ++n >= t.length && e(s);
|
|
2202
2856
|
});
|
|
2203
2857
|
}
|
|
2204
2858
|
});
|
|
@@ -2214,8 +2868,8 @@ class z {
|
|
|
2214
2868
|
static getListSync(t, e = !1) {
|
|
2215
2869
|
const s = {};
|
|
2216
2870
|
for (const n of t) {
|
|
2217
|
-
const
|
|
2218
|
-
s[
|
|
2871
|
+
const o = Array.isArray(n) ? n[0] : n, a = Array.isArray(n) ? n.slice(1) : void 0;
|
|
2872
|
+
s[o] = this.getSync(o, e, a);
|
|
2219
2873
|
}
|
|
2220
2874
|
return s;
|
|
2221
2875
|
}
|
|
@@ -2242,7 +2896,7 @@ class z {
|
|
|
2242
2896
|
*/
|
|
2243
2897
|
static addSync(t) {
|
|
2244
2898
|
f(t, (e, s) => {
|
|
2245
|
-
|
|
2899
|
+
ht(e) && F(e) && (this.data[this.getName(s)] = e);
|
|
2246
2900
|
});
|
|
2247
2901
|
}
|
|
2248
2902
|
/**
|
|
@@ -2252,8 +2906,8 @@ class z {
|
|
|
2252
2906
|
* @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
|
|
2253
2907
|
*/
|
|
2254
2908
|
static async addNormalOrSync(t) {
|
|
2255
|
-
if (
|
|
2256
|
-
if (
|
|
2909
|
+
if (F(t))
|
|
2910
|
+
if (V.isLocalhost())
|
|
2257
2911
|
this.addSync(t);
|
|
2258
2912
|
else {
|
|
2259
2913
|
const e = Object.keys(t);
|
|
@@ -2267,7 +2921,7 @@ class z {
|
|
|
2267
2921
|
* @param url path to the script/ путь к скрипту
|
|
2268
2922
|
*/
|
|
2269
2923
|
static setUrl(t) {
|
|
2270
|
-
return this.url = t,
|
|
2924
|
+
return this.url = t, q;
|
|
2271
2925
|
}
|
|
2272
2926
|
static setPropsName(t) {
|
|
2273
2927
|
return this.propsName = t, this;
|
|
@@ -2279,7 +2933,7 @@ class z {
|
|
|
2279
2933
|
* @param name code name/ название кода
|
|
2280
2934
|
*/
|
|
2281
2935
|
static getName(t) {
|
|
2282
|
-
return `${
|
|
2936
|
+
return `${b.getLocation()}-${t}`;
|
|
2283
2937
|
}
|
|
2284
2938
|
/**
|
|
2285
2939
|
* Returns a list of names that are not yet in the list.
|
|
@@ -2289,7 +2943,7 @@ class z {
|
|
|
2289
2943
|
*/
|
|
2290
2944
|
static getNamesNone(t) {
|
|
2291
2945
|
const e = [];
|
|
2292
|
-
return
|
|
2946
|
+
return R(t).forEach((s) => {
|
|
2293
2947
|
s !== "__TRANSLATE_START__" && s !== "__TRANSLATE_END__" && !(this.getName(s) in this.data) && e.push(s);
|
|
2294
2948
|
}), e;
|
|
2295
2949
|
}
|
|
@@ -2299,7 +2953,7 @@ class z {
|
|
|
2299
2953
|
* Получение списка переводов с сервера.
|
|
2300
2954
|
*/
|
|
2301
2955
|
static async getResponse() {
|
|
2302
|
-
return await
|
|
2956
|
+
return await V.get({
|
|
2303
2957
|
api: !1,
|
|
2304
2958
|
path: this.url,
|
|
2305
2959
|
request: {
|
|
@@ -2317,7 +2971,7 @@ class z {
|
|
|
2317
2971
|
* @param replacement values for replacement/ значения для замены
|
|
2318
2972
|
*/
|
|
2319
2973
|
static replacement(t, e) {
|
|
2320
|
-
return e ?
|
|
2974
|
+
return e ? me(t, e) : t;
|
|
2321
2975
|
}
|
|
2322
2976
|
/**
|
|
2323
2977
|
* Adding translation data from the server.
|
|
@@ -2331,10 +2985,10 @@ class z {
|
|
|
2331
2985
|
}), this.cache = [];
|
|
2332
2986
|
}
|
|
2333
2987
|
}
|
|
2334
|
-
function
|
|
2988
|
+
function mt(i) {
|
|
2335
2989
|
return Array.isArray(i);
|
|
2336
2990
|
}
|
|
2337
|
-
class
|
|
2991
|
+
class ye {
|
|
2338
2992
|
/**
|
|
2339
2993
|
* Constructor
|
|
2340
2994
|
* @param props base data/ базовые данные
|
|
@@ -2351,7 +3005,7 @@ class Qt {
|
|
|
2351
3005
|
* @param name property name/ название свойства
|
|
2352
3006
|
*/
|
|
2353
3007
|
is(t) {
|
|
2354
|
-
return
|
|
3008
|
+
return mt(t) ? !!t.find((e) => this.isDifferent(e)) : this.isDifferent(t);
|
|
2355
3009
|
}
|
|
2356
3010
|
/**
|
|
2357
3011
|
* Checks if there are changes in the data.
|
|
@@ -2383,7 +3037,7 @@ class Qt {
|
|
|
2383
3037
|
return this.cache?.[t] !== this.props?.[t];
|
|
2384
3038
|
}
|
|
2385
3039
|
}
|
|
2386
|
-
class
|
|
3040
|
+
class pe {
|
|
2387
3041
|
/**
|
|
2388
3042
|
* Constructor
|
|
2389
3043
|
* @param props base data/ базовые данные
|
|
@@ -2392,7 +3046,7 @@ class Xt {
|
|
|
2392
3046
|
* @param changed base data/ данный для слежения
|
|
2393
3047
|
*/
|
|
2394
3048
|
constructor(t, e, s) {
|
|
2395
|
-
this.props = t, this.callback = e, this.changed = new
|
|
3049
|
+
this.props = t, this.callback = e, this.changed = new ye(t, s);
|
|
2396
3050
|
}
|
|
2397
3051
|
event = {};
|
|
2398
3052
|
changed;
|
|
@@ -2442,7 +3096,7 @@ class Xt {
|
|
|
2442
3096
|
this.callback && this.callback(this.event);
|
|
2443
3097
|
}
|
|
2444
3098
|
}
|
|
2445
|
-
class
|
|
3099
|
+
class Ze extends pe {
|
|
2446
3100
|
/**
|
|
2447
3101
|
* Calls the callback function.
|
|
2448
3102
|
*
|
|
@@ -2462,31 +3116,31 @@ class De extends Xt {
|
|
|
2462
3116
|
(t || this.changed.isChanged()) && (await this.initEvent(), this.makeCallbackItem(), this.changed.update());
|
|
2463
3117
|
}
|
|
2464
3118
|
}
|
|
2465
|
-
function
|
|
3119
|
+
function $e(i) {
|
|
2466
3120
|
return i && "class" in i && typeof i.class == "string" ? i.class : void 0;
|
|
2467
3121
|
}
|
|
2468
|
-
function
|
|
2469
|
-
const s =
|
|
3122
|
+
function ve(i, t, e) {
|
|
3123
|
+
const s = $e(t);
|
|
2470
3124
|
return e && s ? `${e}.${s}` : e || s || i;
|
|
2471
3125
|
}
|
|
2472
|
-
function
|
|
2473
|
-
const n =
|
|
2474
|
-
return
|
|
3126
|
+
function be(i, t, e, s) {
|
|
3127
|
+
const n = ve(i, t, s);
|
|
3128
|
+
return _t(i, { key: n, ...t }, e);
|
|
2475
3129
|
}
|
|
2476
|
-
function
|
|
2477
|
-
const e = i?.class, s = t?.class, n = i?.style,
|
|
3130
|
+
function lt(i, t) {
|
|
3131
|
+
const e = i?.class, s = t?.class, n = i?.style, o = t?.style, a = {
|
|
2478
3132
|
...i,
|
|
2479
3133
|
...t
|
|
2480
3134
|
};
|
|
2481
|
-
return e && s && (
|
|
3135
|
+
return e && s && (a.class = [], e && a.class.push(e), s && a.class.push(s)), n && o && (a.style = [], n && a.style.push(n), o && a.style.push(o)), a;
|
|
2482
3136
|
}
|
|
2483
|
-
function
|
|
3137
|
+
function we(...i) {
|
|
2484
3138
|
let t = {};
|
|
2485
3139
|
return i.forEach((e) => {
|
|
2486
|
-
e && (t =
|
|
3140
|
+
e && (t = lt(t, e));
|
|
2487
3141
|
}), t;
|
|
2488
3142
|
}
|
|
2489
|
-
class
|
|
3143
|
+
class It {
|
|
2490
3144
|
/**
|
|
2491
3145
|
* Constructor
|
|
2492
3146
|
* @param components list of connected components/ список подключенных компонентов
|
|
@@ -2527,7 +3181,7 @@ class Lt {
|
|
|
2527
3181
|
t in this.caching || (this.caching[t] = c(() => this.computeModification(t)));
|
|
2528
3182
|
const s = this.caching[t];
|
|
2529
3183
|
if (s)
|
|
2530
|
-
return e ?
|
|
3184
|
+
return e ? we(s.value, e) : s.value;
|
|
2531
3185
|
}
|
|
2532
3186
|
return e;
|
|
2533
3187
|
}
|
|
@@ -2541,13 +3195,13 @@ class Lt {
|
|
|
2541
3195
|
* @param index the name of the key/ названия ключа
|
|
2542
3196
|
*/
|
|
2543
3197
|
render(t, e, s, n) {
|
|
2544
|
-
const
|
|
3198
|
+
const o = this.renderOne(
|
|
2545
3199
|
t,
|
|
2546
3200
|
e,
|
|
2547
3201
|
s,
|
|
2548
3202
|
n
|
|
2549
3203
|
);
|
|
2550
|
-
return
|
|
3204
|
+
return o ? [o] : [];
|
|
2551
3205
|
}
|
|
2552
3206
|
/**
|
|
2553
3207
|
* Rendering a component by its name.
|
|
@@ -2560,12 +3214,12 @@ class Lt {
|
|
|
2560
3214
|
*/
|
|
2561
3215
|
renderOne(t, e, s, n) {
|
|
2562
3216
|
if (this.is(t)) {
|
|
2563
|
-
const
|
|
2564
|
-
return
|
|
3217
|
+
const o = n ?? t;
|
|
3218
|
+
return be(
|
|
2565
3219
|
this.get(t),
|
|
2566
|
-
this.getModification(
|
|
3220
|
+
this.getModification(o, e),
|
|
2567
3221
|
s,
|
|
2568
|
-
|
|
3222
|
+
o
|
|
2569
3223
|
);
|
|
2570
3224
|
}
|
|
2571
3225
|
}
|
|
@@ -2580,8 +3234,8 @@ class Lt {
|
|
|
2580
3234
|
* @param children sub-elements of the component/ под элементы компонента
|
|
2581
3235
|
* @param index the name of the key/ названия ключа
|
|
2582
3236
|
*/
|
|
2583
|
-
renderAdd(t, e, s, n,
|
|
2584
|
-
return t.push(...this.render(e, s, n,
|
|
3237
|
+
renderAdd(t, e, s, n, o) {
|
|
3238
|
+
return t.push(...this.render(e, s, n, o)), this;
|
|
2585
3239
|
}
|
|
2586
3240
|
/**
|
|
2587
3241
|
* Calculates modified input data for connected components.
|
|
@@ -2590,22 +3244,22 @@ class Lt {
|
|
|
2590
3244
|
* @param index the name of this/ название данного
|
|
2591
3245
|
*/
|
|
2592
3246
|
computeModification(t) {
|
|
2593
|
-
const e =
|
|
2594
|
-
if (e &&
|
|
3247
|
+
const e = m(this.modification?.[t]);
|
|
3248
|
+
if (e && C(e)) {
|
|
2595
3249
|
const s = {};
|
|
2596
|
-
return f(e, (n,
|
|
2597
|
-
s[
|
|
3250
|
+
return f(e, (n, o) => {
|
|
3251
|
+
s[o] = m(n);
|
|
2598
3252
|
}), s;
|
|
2599
3253
|
}
|
|
2600
3254
|
return {};
|
|
2601
3255
|
}
|
|
2602
3256
|
}
|
|
2603
|
-
class
|
|
3257
|
+
class Ke extends It {
|
|
2604
3258
|
}
|
|
2605
|
-
function
|
|
3259
|
+
function Nt(i) {
|
|
2606
3260
|
return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(new RegExp("(?<=[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()}`);
|
|
2607
3261
|
}
|
|
2608
|
-
class
|
|
3262
|
+
class Ve {
|
|
2609
3263
|
/**
|
|
2610
3264
|
* Constructor
|
|
2611
3265
|
* @param name class name/ название класса
|
|
@@ -2613,10 +3267,10 @@ class ke {
|
|
|
2613
3267
|
* @param options list of additional parameters/ список дополнительных параметров
|
|
2614
3268
|
*/
|
|
2615
3269
|
constructor(t, e, s) {
|
|
2616
|
-
this.props = e, this.options = s, this.name = this.initName(t), this.refs = this.props ?
|
|
3270
|
+
this.props = e, this.options = s, this.name = this.initName(t), this.refs = this.props ? zt(this.props) : {}, this.components = new It(s?.components, s?.compMod), this.emits = s?.emits, this.classes = c(() => this.updateClasses()), this.styles = c(() => this.updateStyles()), this.attrs = Zt(), this.slots = Kt();
|
|
2617
3271
|
}
|
|
2618
3272
|
name;
|
|
2619
|
-
element =
|
|
3273
|
+
element = y();
|
|
2620
3274
|
refs;
|
|
2621
3275
|
components;
|
|
2622
3276
|
emits;
|
|
@@ -2653,7 +3307,7 @@ class ke {
|
|
|
2653
3307
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
2654
3308
|
*/
|
|
2655
3309
|
getSubClass(t) {
|
|
2656
|
-
return `${this.getName()}__${
|
|
3310
|
+
return `${this.getName()}__${R(t).join("__")}`;
|
|
2657
3311
|
}
|
|
2658
3312
|
/**
|
|
2659
3313
|
* Getting the class name for the status.
|
|
@@ -2662,7 +3316,7 @@ class ke {
|
|
|
2662
3316
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
2663
3317
|
*/
|
|
2664
3318
|
getStatusClass(t) {
|
|
2665
|
-
return `${this.getName()}--${
|
|
3319
|
+
return `${this.getName()}--${R(t).join("--")}`;
|
|
2666
3320
|
}
|
|
2667
3321
|
/**
|
|
2668
3322
|
* Getting the property name for the style.
|
|
@@ -2671,7 +3325,7 @@ class ke {
|
|
|
2671
3325
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
2672
3326
|
*/
|
|
2673
3327
|
getStyle(t) {
|
|
2674
|
-
return `--${this.getName()}-sys-${
|
|
3328
|
+
return `--${this.getName()}-sys-${R(t).join("-")}`;
|
|
2675
3329
|
}
|
|
2676
3330
|
/**
|
|
2677
3331
|
* Getting additional parameters.
|
|
@@ -2720,7 +3374,7 @@ class ke {
|
|
|
2720
3374
|
* @param classes list of classes for transformation/ список классов для преобразования
|
|
2721
3375
|
*/
|
|
2722
3376
|
toClass(t) {
|
|
2723
|
-
return
|
|
3377
|
+
return C(t) ? t : Array.isArray(t) ? { [t.filter((s) => typeof s == "string" && s.trim() !== "").join(" ")]: !0 } : typeof t == "string" ? { [t]: !0 } : {};
|
|
2724
3378
|
}
|
|
2725
3379
|
/**
|
|
2726
3380
|
* Converts the class name to standard for the current component.
|
|
@@ -2729,7 +3383,7 @@ class ke {
|
|
|
2729
3383
|
* @param classes list of classes/ список классов
|
|
2730
3384
|
*/
|
|
2731
3385
|
toClassName(t) {
|
|
2732
|
-
if (
|
|
3386
|
+
if (p(t)) {
|
|
2733
3387
|
const e = {};
|
|
2734
3388
|
return f(t, (s, n) => {
|
|
2735
3389
|
n.match(/\?\?/) ? e[n.replace(/\?\?/, this.getName())] = s : n.match(/\?/) ? e[n.replace(/\?/, this.getDesign())] = s : e[n] = s;
|
|
@@ -2744,7 +3398,7 @@ class ke {
|
|
|
2744
3398
|
* @param name component name for transformation/ название компонента для преобразования
|
|
2745
3399
|
*/
|
|
2746
3400
|
initName(t) {
|
|
2747
|
-
return f(t.split(".", 2), (e) =>
|
|
3401
|
+
return f(t.split(".", 2), (e) => Nt(e));
|
|
2748
3402
|
}
|
|
2749
3403
|
/**
|
|
2750
3404
|
* Updating data about the class.
|
|
@@ -2778,10 +3432,10 @@ class ke {
|
|
|
2778
3432
|
} : e ?? {};
|
|
2779
3433
|
}
|
|
2780
3434
|
}
|
|
2781
|
-
function
|
|
2782
|
-
return
|
|
3435
|
+
function L(i) {
|
|
3436
|
+
return dt(i) ? i : y(i);
|
|
2783
3437
|
}
|
|
2784
|
-
class
|
|
3438
|
+
class Ye {
|
|
2785
3439
|
item;
|
|
2786
3440
|
type;
|
|
2787
3441
|
code;
|
|
@@ -2799,14 +3453,14 @@ class Me {
|
|
|
2799
3453
|
* @param type type of date format for output. тип формата даты вывода
|
|
2800
3454
|
* @param code country and language code. код страны и языка
|
|
2801
3455
|
*/
|
|
2802
|
-
constructor(t, e = "date", s =
|
|
2803
|
-
this.item =
|
|
3456
|
+
constructor(t, e = "date", s = b.getLocation()) {
|
|
3457
|
+
this.item = L(t), this.type = L(e), this.code = L(s), this.date = y(D(this.item.value)), this.datetime = new gt(
|
|
2804
3458
|
this.date.value,
|
|
2805
3459
|
this.type.value,
|
|
2806
3460
|
this.code.value
|
|
2807
|
-
),
|
|
2808
|
-
this.date.value =
|
|
2809
|
-
}),
|
|
3461
|
+
), g(this.item, (n) => {
|
|
3462
|
+
this.date.value = D(n);
|
|
3463
|
+
}), g(this.type, (n) => this.datetime.setType(n)), g(this.code, (n) => this.datetime.setCode(n)), g(this.date, (n) => this.datetime.setDate(n)), this.datetime.setWatch(() => Vt(this.date));
|
|
2810
3464
|
}
|
|
2811
3465
|
/**
|
|
2812
3466
|
* Returns the basic data for the date.
|
|
@@ -2926,7 +3580,7 @@ class Me {
|
|
|
2926
3580
|
return c(() => this.date.value && this.datetime.standard(t));
|
|
2927
3581
|
}
|
|
2928
3582
|
}
|
|
2929
|
-
class
|
|
3583
|
+
class qe extends Ut {
|
|
2930
3584
|
/**
|
|
2931
3585
|
* Classes Constructor
|
|
2932
3586
|
* @param elementSelector element/ элемент
|
|
@@ -2939,26 +3593,26 @@ class Ae extends Rt {
|
|
|
2939
3593
|
* @param detail an event-dependent value associated with the event/ зависимое от события
|
|
2940
3594
|
* значение, связанное с событием
|
|
2941
3595
|
*/
|
|
2942
|
-
constructor(t, e, s = ["click"], n,
|
|
2943
|
-
const u =
|
|
3596
|
+
constructor(t, e, s = ["click"], n, o, a) {
|
|
3597
|
+
const u = L(t), l = L(e);
|
|
2944
3598
|
super(
|
|
2945
3599
|
u.value,
|
|
2946
3600
|
s,
|
|
2947
3601
|
n,
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
),
|
|
3602
|
+
o,
|
|
3603
|
+
a
|
|
3604
|
+
), l.value && this.setElementControl(l.value), g(u, (h) => this.setElement(h)), g(l, (h) => this.setElementControl(h));
|
|
2951
3605
|
}
|
|
2952
3606
|
}
|
|
2953
|
-
class
|
|
3607
|
+
class Je {
|
|
2954
3608
|
code;
|
|
2955
3609
|
flag;
|
|
2956
3610
|
/**
|
|
2957
3611
|
* Constructor
|
|
2958
3612
|
* @param code country and language code/ код страны и языка
|
|
2959
3613
|
*/
|
|
2960
|
-
constructor(t =
|
|
2961
|
-
this.code =
|
|
3614
|
+
constructor(t = b.getLocation()) {
|
|
3615
|
+
this.code = L(t), this.flag = new U(this.code.value), g(this.code, (e) => this.flag.setCode(e));
|
|
2962
3616
|
}
|
|
2963
3617
|
/**
|
|
2964
3618
|
* Obtaining a reactive object with the country code.
|
|
@@ -3005,8 +3659,8 @@ class Ne {
|
|
|
3005
3659
|
return c(() => this.flag.getNational(t));
|
|
3006
3660
|
}
|
|
3007
3661
|
}
|
|
3008
|
-
class
|
|
3009
|
-
static item =
|
|
3662
|
+
class At {
|
|
3663
|
+
static item = Z(b.get());
|
|
3010
3664
|
static country = c(() => this.item.value.country);
|
|
3011
3665
|
static language = c(() => this.item.value.language);
|
|
3012
3666
|
static standard = c(() => this.item.value.standard);
|
|
@@ -3059,10 +3713,10 @@ class Ct {
|
|
|
3059
3713
|
* код страны, полный вид язык-страна или один из них
|
|
3060
3714
|
*/
|
|
3061
3715
|
static set(t) {
|
|
3062
|
-
|
|
3716
|
+
b.set(t, !0), this.item.value = b.getItem();
|
|
3063
3717
|
}
|
|
3064
3718
|
}
|
|
3065
|
-
class
|
|
3719
|
+
class Se {
|
|
3066
3720
|
location;
|
|
3067
3721
|
intl;
|
|
3068
3722
|
/**
|
|
@@ -3071,7 +3725,7 @@ class re {
|
|
|
3071
3725
|
* код страны, полный вид язык-страна или один из них
|
|
3072
3726
|
*/
|
|
3073
3727
|
constructor(t) {
|
|
3074
|
-
this.location =
|
|
3728
|
+
this.location = L(t), this.intl = c(() => new W(this.location.value ?? At.getLanguage().value));
|
|
3075
3729
|
}
|
|
3076
3730
|
/**
|
|
3077
3731
|
* The consistent translation of language, region and script display names.
|
|
@@ -3082,7 +3736,7 @@ class re {
|
|
|
3082
3736
|
* объект с некоторыми или всеми из следующих свойств
|
|
3083
3737
|
*/
|
|
3084
3738
|
display(t, e) {
|
|
3085
|
-
return c(() => this.intl.value.display(
|
|
3739
|
+
return c(() => this.intl.value.display(m(t), e));
|
|
3086
3740
|
}
|
|
3087
3741
|
/**
|
|
3088
3742
|
* Get display names of language.
|
|
@@ -3092,7 +3746,7 @@ class re {
|
|
|
3092
3746
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
3093
3747
|
*/
|
|
3094
3748
|
languageName(t, e) {
|
|
3095
|
-
return c(() => this.intl.value.languageName(
|
|
3749
|
+
return c(() => this.intl.value.languageName(m(t), e));
|
|
3096
3750
|
}
|
|
3097
3751
|
/**
|
|
3098
3752
|
* Get display names of region.
|
|
@@ -3102,7 +3756,7 @@ class re {
|
|
|
3102
3756
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
3103
3757
|
*/
|
|
3104
3758
|
countryName(t, e) {
|
|
3105
|
-
return c(() => this.intl.value.countryName(
|
|
3759
|
+
return c(() => this.intl.value.countryName(m(t), e));
|
|
3106
3760
|
}
|
|
3107
3761
|
/**
|
|
3108
3762
|
* In basic use without specifying a locale, a formatted string.
|
|
@@ -3114,7 +3768,7 @@ class re {
|
|
|
3114
3768
|
* или всеми свойствами
|
|
3115
3769
|
*/
|
|
3116
3770
|
number(t, e) {
|
|
3117
|
-
return c(() => this.intl.value.number(
|
|
3771
|
+
return c(() => this.intl.value.number(m(t), e));
|
|
3118
3772
|
}
|
|
3119
3773
|
/**
|
|
3120
3774
|
* Decimal point symbol.
|
|
@@ -3136,8 +3790,8 @@ class re {
|
|
|
3136
3790
|
currency(t, e, s = !1) {
|
|
3137
3791
|
return c(
|
|
3138
3792
|
() => this.intl.value.currency(
|
|
3139
|
-
|
|
3140
|
-
|
|
3793
|
+
m(t),
|
|
3794
|
+
m(e),
|
|
3141
3795
|
s
|
|
3142
3796
|
)
|
|
3143
3797
|
);
|
|
@@ -3152,7 +3806,7 @@ class re {
|
|
|
3152
3806
|
* в форматировании блока
|
|
3153
3807
|
*/
|
|
3154
3808
|
unit(t, e) {
|
|
3155
|
-
return c(() => this.intl.value.unit(
|
|
3809
|
+
return c(() => this.intl.value.unit(m(t), e));
|
|
3156
3810
|
}
|
|
3157
3811
|
/**
|
|
3158
3812
|
* Number as a percentage.
|
|
@@ -3162,7 +3816,7 @@ class re {
|
|
|
3162
3816
|
* @param options an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
3163
3817
|
*/
|
|
3164
3818
|
percent(t, e) {
|
|
3165
|
-
return c(() => this.intl.value.percent(
|
|
3819
|
+
return c(() => this.intl.value.percent(m(t), e));
|
|
3166
3820
|
}
|
|
3167
3821
|
/**
|
|
3168
3822
|
* Number as a percentage (unit).
|
|
@@ -3173,7 +3827,7 @@ class re {
|
|
|
3173
3827
|
* объект с некоторыми или всеми свойствами
|
|
3174
3828
|
*/
|
|
3175
3829
|
percentBy100(t, e) {
|
|
3176
|
-
return c(() => this.intl.value.percentBy100(
|
|
3830
|
+
return c(() => this.intl.value.percentBy100(m(t), e));
|
|
3177
3831
|
}
|
|
3178
3832
|
/**
|
|
3179
3833
|
* Enables language-sensitive date and time formatting.
|
|
@@ -3185,7 +3839,7 @@ class re {
|
|
|
3185
3839
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
3186
3840
|
*/
|
|
3187
3841
|
date(t, e, s, n) {
|
|
3188
|
-
return c(() => this.intl.value.date(
|
|
3842
|
+
return c(() => this.intl.value.date(m(t), e, s, n));
|
|
3189
3843
|
}
|
|
3190
3844
|
/**
|
|
3191
3845
|
* Enables language-sensitive relative time formatting.
|
|
@@ -3197,7 +3851,7 @@ class re {
|
|
|
3197
3851
|
* @param todayValue current day/ текущий день
|
|
3198
3852
|
*/
|
|
3199
3853
|
relative(t, e, s) {
|
|
3200
|
-
return c(() => this.intl.value.relative(
|
|
3854
|
+
return c(() => this.intl.value.relative(m(t), e, s));
|
|
3201
3855
|
}
|
|
3202
3856
|
/**
|
|
3203
3857
|
* Enables language-sensitive relative time formatting
|
|
@@ -3217,14 +3871,14 @@ class re {
|
|
|
3217
3871
|
* @param type type of data format/ тип формата data
|
|
3218
3872
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
3219
3873
|
*/
|
|
3220
|
-
relativeLimit(t, e, s, n,
|
|
3874
|
+
relativeLimit(t, e, s, n, o, a, u) {
|
|
3221
3875
|
return c(() => this.intl.value.relativeLimit(
|
|
3222
|
-
|
|
3876
|
+
m(t),
|
|
3223
3877
|
e,
|
|
3224
3878
|
s,
|
|
3225
3879
|
n,
|
|
3226
|
-
a,
|
|
3227
3880
|
o,
|
|
3881
|
+
a,
|
|
3228
3882
|
u
|
|
3229
3883
|
));
|
|
3230
3884
|
}
|
|
@@ -3236,7 +3890,7 @@ class re {
|
|
|
3236
3890
|
* @param style the representation of the month/ представление месяца
|
|
3237
3891
|
*/
|
|
3238
3892
|
month(t, e) {
|
|
3239
|
-
return c(() => this.intl.value.month(
|
|
3893
|
+
return c(() => this.intl.value.month(m(t), e));
|
|
3240
3894
|
}
|
|
3241
3895
|
/**
|
|
3242
3896
|
* Array to list of months.
|
|
@@ -3255,7 +3909,7 @@ class re {
|
|
|
3255
3909
|
* @param style the representation of the weekday/ представление о дне недели
|
|
3256
3910
|
*/
|
|
3257
3911
|
weekday(t, e) {
|
|
3258
|
-
return c(() => this.intl.value.weekday(
|
|
3912
|
+
return c(() => this.intl.value.weekday(m(t), e));
|
|
3259
3913
|
}
|
|
3260
3914
|
/**
|
|
3261
3915
|
* An array of the list of names of the days of the week.
|
|
@@ -3273,14 +3927,14 @@ class re {
|
|
|
3273
3927
|
* @param value the date to format/ дата для форматирования
|
|
3274
3928
|
*/
|
|
3275
3929
|
time(t) {
|
|
3276
|
-
return c(() => this.intl.value.time(
|
|
3930
|
+
return c(() => this.intl.value.time(m(t)));
|
|
3277
3931
|
}
|
|
3278
3932
|
}
|
|
3279
|
-
function
|
|
3933
|
+
function xt(i, t = "ig", e = ":value") {
|
|
3280
3934
|
const s = i.replace(/([[\]\\^$.?*+()/])/g, "\\$1");
|
|
3281
3935
|
return new RegExp(e.replace(/:value/g, s), t);
|
|
3282
3936
|
}
|
|
3283
|
-
class
|
|
3937
|
+
class Bt {
|
|
3284
3938
|
/**
|
|
3285
3939
|
* Creates an instance of ListData for managing list data.
|
|
3286
3940
|
*
|
|
@@ -3295,8 +3949,8 @@ class Mt {
|
|
|
3295
3949
|
* @param lite Threshold for lite mode / порог для облегченного режима
|
|
3296
3950
|
* @param parent Parent identifier / идентификатор родителя
|
|
3297
3951
|
*/
|
|
3298
|
-
constructor(t, e, s, n,
|
|
3299
|
-
this.list = t, this.focus = e, this.highlight = s, this.highlightLengthStart = n, this.selected =
|
|
3952
|
+
constructor(t, e, s, n, o, a, u, l, h) {
|
|
3953
|
+
this.list = t, this.focus = e, this.highlight = s, this.highlightLengthStart = n, this.selected = o, this.keyValue = a, this.keyLabel = u, this.lite = l, this.parent = h, dt(t) && g(t, () => {
|
|
3300
3954
|
this.subList = {};
|
|
3301
3955
|
});
|
|
3302
3956
|
}
|
|
@@ -3308,7 +3962,7 @@ class Mt {
|
|
|
3308
3962
|
*/
|
|
3309
3963
|
data = c(
|
|
3310
3964
|
() => f(
|
|
3311
|
-
|
|
3965
|
+
m(this.list) || [],
|
|
3312
3966
|
(t, e) => this.initItem(e, t)
|
|
3313
3967
|
)
|
|
3314
3968
|
);
|
|
@@ -3348,7 +4002,7 @@ class Mt {
|
|
|
3348
4002
|
...n,
|
|
3349
4003
|
focus: t === n.index,
|
|
3350
4004
|
highlight: e,
|
|
3351
|
-
selected:
|
|
4005
|
+
selected: j(n.index, s)
|
|
3352
4006
|
})
|
|
3353
4007
|
);
|
|
3354
4008
|
});
|
|
@@ -3390,7 +4044,7 @@ class Mt {
|
|
|
3390
4044
|
* Находит первый элемент, соответствующий условиям поиска.
|
|
3391
4045
|
*/
|
|
3392
4046
|
highlightFirstItem = c(() => {
|
|
3393
|
-
const t = this.getHighlight(), e = t && t.length >= this.getHighlightLengthStart() &&
|
|
4047
|
+
const t = this.getHighlight(), e = t && t.length >= this.getHighlightLengthStart() && xt(t, "i");
|
|
3394
4048
|
return e ? this.map.value.findIndex(
|
|
3395
4049
|
(s) => s.label?.toString().match(e) || s.index?.toString().match(e) || s.search?.toString().match(e)
|
|
3396
4050
|
) : -1;
|
|
@@ -3402,7 +4056,7 @@ class Mt {
|
|
|
3402
4056
|
*/
|
|
3403
4057
|
isSelected = c(() => {
|
|
3404
4058
|
const t = this.getSelected();
|
|
3405
|
-
return !!t && this.mapItems.value.findIndex((e) =>
|
|
4059
|
+
return !!t && this.mapItems.value.findIndex((e) => j(e.index, t)) !== -1;
|
|
3406
4060
|
});
|
|
3407
4061
|
/**
|
|
3408
4062
|
* Returns a list of selected items on the map.
|
|
@@ -3411,20 +4065,20 @@ class Mt {
|
|
|
3411
4065
|
*/
|
|
3412
4066
|
selectedList = c(() => {
|
|
3413
4067
|
const t = this.getSelected();
|
|
3414
|
-
return t && this.isSelected.value ? this.mapItems.value.filter((e) =>
|
|
4068
|
+
return t && this.isSelected.value ? this.mapItems.value.filter((e) => j(e.index, t)) : [];
|
|
3415
4069
|
});
|
|
3416
4070
|
/**
|
|
3417
4071
|
* Returns a list of selected items on the map.
|
|
3418
4072
|
*
|
|
3419
4073
|
* Возвращает список выделенных элементов на карте.
|
|
3420
4074
|
*/
|
|
3421
|
-
selectedNames = c(() =>
|
|
4075
|
+
selectedNames = c(() => ct(this.selectedList.value, "label"));
|
|
3422
4076
|
/**
|
|
3423
4077
|
* Returns a list of selected item values on the map.
|
|
3424
4078
|
*
|
|
3425
4079
|
* Возвращает список значений выделенных элементов на карте.
|
|
3426
4080
|
*/
|
|
3427
|
-
selectedValues = c(() =>
|
|
4081
|
+
selectedValues = c(() => ct(this.selectedList.value, "value"));
|
|
3428
4082
|
/**
|
|
3429
4083
|
* Checks whether it is necessary to first display a simplified version.
|
|
3430
4084
|
*
|
|
@@ -3554,7 +4208,7 @@ class Mt {
|
|
|
3554
4208
|
* @param item List item data/ данные элемента списка
|
|
3555
4209
|
*/
|
|
3556
4210
|
getSubList(t) {
|
|
3557
|
-
return t.index in this.subList || (this.subList[t.index] = new
|
|
4211
|
+
return t.index in this.subList || (this.subList[t.index] = new Bt(
|
|
3558
4212
|
t.value,
|
|
3559
4213
|
this.focus,
|
|
3560
4214
|
this.highlight,
|
|
@@ -3595,7 +4249,7 @@ class Mt {
|
|
|
3595
4249
|
* @param label item label / метка элемента
|
|
3596
4250
|
*/
|
|
3597
4251
|
getIndex(t, e, s, n) {
|
|
3598
|
-
return t && !
|
|
4252
|
+
return t && !p(t) ? t : e && !p(e) ? e : s && n;
|
|
3599
4253
|
}
|
|
3600
4254
|
/**
|
|
3601
4255
|
* Creates an object of the record element.
|
|
@@ -3605,8 +4259,8 @@ class Mt {
|
|
|
3605
4259
|
* @param item selected element/ выбранный элемент
|
|
3606
4260
|
*/
|
|
3607
4261
|
initItem(t, e) {
|
|
3608
|
-
if (
|
|
3609
|
-
const s = e?.[this.keyValue?.value ?? "value"], n = e?.[this.keyLabel?.value ?? "label"] ?? s,
|
|
4262
|
+
if (C(e)) {
|
|
4263
|
+
const s = e?.[this.keyValue?.value ?? "value"], n = e?.[this.keyLabel?.value ?? "label"] ?? s, o = this.getIndex(
|
|
3610
4264
|
e?.index,
|
|
3611
4265
|
s,
|
|
3612
4266
|
t,
|
|
@@ -3615,7 +4269,7 @@ class Mt {
|
|
|
3615
4269
|
return {
|
|
3616
4270
|
...e,
|
|
3617
4271
|
parent: this.parent,
|
|
3618
|
-
index:
|
|
4272
|
+
index: o,
|
|
3619
4273
|
type: e?.type ?? "item",
|
|
3620
4274
|
label: n,
|
|
3621
4275
|
value: s
|
|
@@ -3630,7 +4284,7 @@ class Mt {
|
|
|
3630
4284
|
};
|
|
3631
4285
|
}
|
|
3632
4286
|
}
|
|
3633
|
-
class
|
|
4287
|
+
class Qe {
|
|
3634
4288
|
static router;
|
|
3635
4289
|
/**
|
|
3636
4290
|
* Get router instance.
|
|
@@ -3668,18 +4322,18 @@ class Ie {
|
|
|
3668
4322
|
this.router || this.set(t);
|
|
3669
4323
|
}
|
|
3670
4324
|
}
|
|
3671
|
-
class
|
|
4325
|
+
class Xe {
|
|
3672
4326
|
/**
|
|
3673
4327
|
* Reactive item.
|
|
3674
4328
|
*
|
|
3675
4329
|
* Реактивный элемент.
|
|
3676
4330
|
*/
|
|
3677
|
-
item =
|
|
4331
|
+
item = y();
|
|
3678
4332
|
/**
|
|
3679
4333
|
* Constructor
|
|
3680
4334
|
*/
|
|
3681
4335
|
constructor() {
|
|
3682
|
-
|
|
4336
|
+
Ct.is().then((t) => {
|
|
3683
4337
|
this.item.value = t;
|
|
3684
4338
|
});
|
|
3685
4339
|
}
|
|
@@ -3690,106 +4344,99 @@ class Be {
|
|
|
3690
4344
|
*/
|
|
3691
4345
|
is = c(() => this.item.value !== void 0);
|
|
3692
4346
|
}
|
|
3693
|
-
const
|
|
3694
|
-
let
|
|
3695
|
-
function
|
|
3696
|
-
const
|
|
3697
|
-
let
|
|
3698
|
-
const
|
|
3699
|
-
if (
|
|
4347
|
+
const ke = (i) => typeof i == "string" ? { method: i } : i || {};
|
|
4348
|
+
let J;
|
|
4349
|
+
function Me(i, t, e = !0, s, n, o) {
|
|
4350
|
+
const a = y(), u = L(ke(t)), l = y(!1), h = y(!1);
|
|
4351
|
+
let I = !0, N = 0;
|
|
4352
|
+
const O = async () => {
|
|
4353
|
+
if (I)
|
|
3700
4354
|
return;
|
|
3701
|
-
const
|
|
3702
|
-
if ((!s || s.value) &&
|
|
3703
|
-
|
|
3704
|
-
let
|
|
3705
|
-
const
|
|
3706
|
-
path:
|
|
4355
|
+
const S = m(i);
|
|
4356
|
+
if ((!s || s.value) && S) {
|
|
4357
|
+
l.value = !0, h.value = !0;
|
|
4358
|
+
let T = {};
|
|
4359
|
+
const pt = await V.request({
|
|
4360
|
+
path: S,
|
|
3707
4361
|
...u.value
|
|
3708
4362
|
});
|
|
3709
|
-
|
|
3710
|
-
} else
|
|
3711
|
-
},
|
|
3712
|
-
const
|
|
3713
|
-
e &&
|
|
3714
|
-
|
|
4363
|
+
pt && (T = pt), n ? a.value = n(T) : a.value = T, l.value = !1;
|
|
4364
|
+
} else a.value !== void 0 && (a.value = void 0);
|
|
4365
|
+
}, Rt = () => {
|
|
4366
|
+
const S = [];
|
|
4367
|
+
e && S.push(u), dt(i) && S.push(i), s && S.push(s), J && S.push(J), S.length > 0 && g(S, async () => {
|
|
4368
|
+
l.value || await O();
|
|
3715
4369
|
});
|
|
3716
4370
|
};
|
|
3717
4371
|
return {
|
|
3718
4372
|
get data() {
|
|
3719
|
-
return
|
|
3720
|
-
|
|
3721
|
-
})),
|
|
4373
|
+
return I && (I = !1, O().then()), Rt(), o && (N++, ot(() => {
|
|
4374
|
+
N--, N < 1 && (console.warn("useApiRef: unmounted"), a.value = void 0, I = !0, N = 0);
|
|
4375
|
+
})), a;
|
|
3722
4376
|
},
|
|
3723
4377
|
get isStarting() {
|
|
3724
|
-
return c(() =>
|
|
4378
|
+
return c(() => a.value === void 0);
|
|
3725
4379
|
},
|
|
3726
|
-
loading
|
|
3727
|
-
get reading() {
|
|
4380
|
+
get loading() {
|
|
3728
4381
|
return c(() => l.value);
|
|
3729
4382
|
},
|
|
3730
|
-
|
|
4383
|
+
get reading() {
|
|
4384
|
+
return c(() => h.value);
|
|
4385
|
+
},
|
|
4386
|
+
reset: O
|
|
3731
4387
|
};
|
|
3732
4388
|
}
|
|
3733
|
-
const
|
|
3734
|
-
|
|
4389
|
+
const Oe = (i) => {
|
|
4390
|
+
J || (J = i);
|
|
3735
4391
|
};
|
|
3736
|
-
function
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
if (e in X)
|
|
3748
|
-
return X[e];
|
|
3749
|
-
const s = new BroadcastChannel(e), n = $(A(t));
|
|
3750
|
-
return y(n, (a) => s.postMessage({ message: a })), s.onmessage = (a) => {
|
|
3751
|
-
n.value !== a.data.message && (n.value = a.data.message);
|
|
3752
|
-
}, X[e] = n, n;
|
|
4392
|
+
function De(i, t) {
|
|
4393
|
+
const e = `broadcast--${i}`;
|
|
4394
|
+
if (e in it)
|
|
4395
|
+
return it[e];
|
|
4396
|
+
const s = y(B(t)), n = new Xt(
|
|
4397
|
+
e,
|
|
4398
|
+
(o) => {
|
|
4399
|
+
s.value !== o.data.message && (s.value = o.data.message);
|
|
4400
|
+
}
|
|
4401
|
+
);
|
|
4402
|
+
return g(s, (o) => n.post({ message: o })), it[e] = s, s;
|
|
3753
4403
|
}
|
|
3754
|
-
const
|
|
3755
|
-
|
|
3756
|
-
(
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
if (i in tt)
|
|
3760
|
-
return tt[i];
|
|
3761
|
-
const s = new rt(i), n = oe(
|
|
4404
|
+
const it = {};
|
|
4405
|
+
function Te(i, t, e) {
|
|
4406
|
+
if (i in st)
|
|
4407
|
+
return st[i];
|
|
4408
|
+
const s = new at(i), n = De(
|
|
3762
4409
|
`__cookie:${i}`,
|
|
3763
4410
|
s.get(t, e)
|
|
3764
4411
|
);
|
|
3765
|
-
return
|
|
3766
|
-
s.set(
|
|
3767
|
-
}),
|
|
4412
|
+
return g(n, (o) => {
|
|
4413
|
+
s.set(o, e);
|
|
4414
|
+
}), st[i] = n, n;
|
|
3768
4415
|
}
|
|
3769
|
-
const
|
|
3770
|
-
function
|
|
3771
|
-
return new
|
|
4416
|
+
const st = {};
|
|
4417
|
+
function Ge() {
|
|
4418
|
+
return new Se();
|
|
3772
4419
|
}
|
|
3773
|
-
function
|
|
3774
|
-
if (i in
|
|
3775
|
-
return
|
|
3776
|
-
const e =
|
|
3777
|
-
return
|
|
4420
|
+
function ti(i, t) {
|
|
4421
|
+
if (i in rt)
|
|
4422
|
+
return rt[i];
|
|
4423
|
+
const e = Z(_.get(i, t));
|
|
4424
|
+
return g(e, (s) => _.set(i, s)), _.addWatch(i, (s) => {
|
|
3778
4425
|
e.value = s;
|
|
3779
|
-
}),
|
|
4426
|
+
}), rt[i] = e, e;
|
|
3780
4427
|
}
|
|
3781
|
-
const
|
|
3782
|
-
let
|
|
3783
|
-
function
|
|
3784
|
-
const e =
|
|
3785
|
-
return e ? (
|
|
4428
|
+
const rt = {};
|
|
4429
|
+
let St = z(1e5, 9e5);
|
|
4430
|
+
function Y(i, t) {
|
|
4431
|
+
const e = M(i);
|
|
4432
|
+
return e ? (F(e.id) || e.setAttribute("id", `id-${St++}`), t ? `#${e.id}${t}`.trim() : e.id) : `id-${St++}`;
|
|
3786
4433
|
}
|
|
3787
|
-
const
|
|
4434
|
+
const ei = () => {
|
|
3788
4435
|
const i = {}, t = "IntersectionObserver" in window ? new IntersectionObserver(
|
|
3789
4436
|
(s) => {
|
|
3790
4437
|
s.forEach((n) => {
|
|
3791
|
-
const
|
|
3792
|
-
|
|
4438
|
+
const o = Y(n.target);
|
|
4439
|
+
o in i && (i[o].status.value = n.isIntersecting);
|
|
3793
4440
|
});
|
|
3794
4441
|
},
|
|
3795
4442
|
{
|
|
@@ -3797,7 +4444,7 @@ const Oe = () => {
|
|
|
3797
4444
|
}
|
|
3798
4445
|
) : void 0, e = (s) => {
|
|
3799
4446
|
if (s) {
|
|
3800
|
-
const n =
|
|
4447
|
+
const n = Y(s);
|
|
3801
4448
|
n in i && (t?.unobserve(s), i[n]?.stopWatch(), delete i[n]);
|
|
3802
4449
|
}
|
|
3803
4450
|
};
|
|
@@ -3810,14 +4457,14 @@ const Oe = () => {
|
|
|
3810
4457
|
* @param element element for tracking/ элемента для отслеживания
|
|
3811
4458
|
*/
|
|
3812
4459
|
addLazyItem(s) {
|
|
3813
|
-
const n =
|
|
4460
|
+
const n = Z(!t);
|
|
3814
4461
|
if (t) {
|
|
3815
|
-
const
|
|
4462
|
+
const o = g(s, (a, u) => {
|
|
3816
4463
|
if (u && t.unobserve(u), s.value) {
|
|
3817
|
-
const
|
|
3818
|
-
i[
|
|
4464
|
+
const l = Y(s.value);
|
|
4465
|
+
i[l] = {
|
|
3819
4466
|
status: n,
|
|
3820
|
-
stopWatch:
|
|
4467
|
+
stopWatch: o
|
|
3821
4468
|
}, t.observe(s.value);
|
|
3822
4469
|
} else
|
|
3823
4470
|
e(s.value);
|
|
@@ -3839,24 +4486,79 @@ const Oe = () => {
|
|
|
3839
4486
|
disconnectLazy: () => t?.disconnect()
|
|
3840
4487
|
};
|
|
3841
4488
|
};
|
|
3842
|
-
function
|
|
3843
|
-
const i =
|
|
3844
|
-
return
|
|
4489
|
+
function ii() {
|
|
4490
|
+
const i = Z($t.is());
|
|
4491
|
+
return $t.registrationEvent(({ detail: t }) => {
|
|
3845
4492
|
i.value = t.loading;
|
|
3846
4493
|
}), i;
|
|
3847
4494
|
}
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
const
|
|
3852
|
-
|
|
4495
|
+
const Ft = [], Le = z(1e5, 999999);
|
|
4496
|
+
function Ce(i, t = !0, e = !1, s = !0) {
|
|
4497
|
+
let n;
|
|
4498
|
+
const o = `__execute_use${Le}::${Y()}`, a = (...u) => {
|
|
4499
|
+
if (!e && s) {
|
|
4500
|
+
const l = Yt(o, void 0);
|
|
4501
|
+
if (l)
|
|
4502
|
+
return l;
|
|
4503
|
+
{
|
|
4504
|
+
let h = Object.freeze(i(...u));
|
|
4505
|
+
return qt(o, h), t && ot(() => {
|
|
4506
|
+
h = void 0;
|
|
4507
|
+
}), h;
|
|
4508
|
+
}
|
|
4509
|
+
} else n || (n = Object.freeze(i(...u)), t && ot(() => {
|
|
4510
|
+
n = void 0;
|
|
4511
|
+
}));
|
|
4512
|
+
return n;
|
|
4513
|
+
};
|
|
4514
|
+
return e && Ft.push(a), a;
|
|
3853
4515
|
}
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
4516
|
+
function si() {
|
|
4517
|
+
Ft.forEach((i) => i());
|
|
4518
|
+
}
|
|
4519
|
+
const Ie = Ce(() => {
|
|
4520
|
+
const i = new ge(), t = y(i.getTitle()), e = y(i.getKeywords()), s = y(i.getDescription()), n = y(i.getImage()), o = y(i.getCanonical()), a = y(i.getRobots()), u = y(i.getAuthor()), l = y(i.getSiteName()), h = () => i.html();
|
|
4521
|
+
return g(t, () => {
|
|
4522
|
+
i.setTitle(t.value);
|
|
4523
|
+
}), g(e, () => {
|
|
4524
|
+
i.setKeywords(e.value);
|
|
4525
|
+
}), g(s, () => {
|
|
4526
|
+
i.setDescription(s.value);
|
|
4527
|
+
}), g(n, () => {
|
|
4528
|
+
i.setImage(n.value);
|
|
4529
|
+
}), g(o, () => {
|
|
4530
|
+
i.setCanonical(o.value);
|
|
4531
|
+
}), g(a, () => {
|
|
4532
|
+
i.setRobots(a.value);
|
|
4533
|
+
}), g(u, () => {
|
|
4534
|
+
i.setAuthor(u.value);
|
|
4535
|
+
}), g(l, () => {
|
|
4536
|
+
i.setSiteName(l.value);
|
|
4537
|
+
}), {
|
|
4538
|
+
meta: i,
|
|
4539
|
+
title: t,
|
|
4540
|
+
keyword: e,
|
|
4541
|
+
description: s,
|
|
4542
|
+
author: u,
|
|
4543
|
+
image: n,
|
|
4544
|
+
canonical: o,
|
|
4545
|
+
robots: a,
|
|
4546
|
+
siteName: l,
|
|
4547
|
+
getHtmlMeta: h
|
|
3858
4548
|
};
|
|
3859
|
-
|
|
4549
|
+
}, !1, !0), ri = () => Ie();
|
|
4550
|
+
function ni(i, t) {
|
|
4551
|
+
if (i in nt)
|
|
4552
|
+
return nt[i];
|
|
4553
|
+
const e = new X(i, !0), s = y(e.get(t));
|
|
4554
|
+
return g(s, (n) => e.set(n)), nt[i] = s, s;
|
|
4555
|
+
}
|
|
4556
|
+
const nt = {};
|
|
4557
|
+
function Ne(i) {
|
|
4558
|
+
const t = Z(q.getListSync(i, !0)), e = async () => {
|
|
4559
|
+
t.value = { ...await q.getList(i) };
|
|
4560
|
+
};
|
|
4561
|
+
g(At.getLanguage(), e);
|
|
3860
4562
|
for (const s in t.value)
|
|
3861
4563
|
if (t.value[s] === s || t.value[s] === " ") {
|
|
3862
4564
|
e().then();
|
|
@@ -3864,155 +4566,131 @@ function ue(i) {
|
|
|
3864
4566
|
}
|
|
3865
4567
|
return t;
|
|
3866
4568
|
}
|
|
3867
|
-
const
|
|
3868
|
-
function
|
|
3869
|
-
return
|
|
4569
|
+
const oi = (i) => Ne(i);
|
|
4570
|
+
function ai(i) {
|
|
4571
|
+
return ht(i) ? i.trim() : mt(i) && i.findIndex((t) => p(t)) === -1 ? i.join(",") : p(i) ? JSON.stringify(i) : i === !0 ? "1" : i === !1 ? "0" : i?.toString() ?? "";
|
|
3870
4572
|
}
|
|
3871
|
-
function
|
|
4573
|
+
function Ae(i, t) {
|
|
3872
4574
|
return Array(t).fill(i);
|
|
3873
4575
|
}
|
|
3874
|
-
function
|
|
4576
|
+
function ci(i) {
|
|
3875
4577
|
if (d())
|
|
3876
4578
|
return document.querySelector(i) ?? void 0;
|
|
3877
4579
|
}
|
|
3878
|
-
function
|
|
4580
|
+
function ui(i) {
|
|
3879
4581
|
if (d())
|
|
3880
4582
|
return document.querySelectorAll(i);
|
|
3881
4583
|
}
|
|
3882
|
-
function
|
|
4584
|
+
function li(i) {
|
|
3883
4585
|
i.preventDefault(), i.stopPropagation();
|
|
3884
4586
|
}
|
|
3885
|
-
|
|
3886
|
-
function Ze(i, t = !0, e = !1, s = !0) {
|
|
3887
|
-
let n;
|
|
3888
|
-
const a = `__execute_use${le}::${G()}`, o = (...u) => {
|
|
3889
|
-
if (!e && s) {
|
|
3890
|
-
const h = Ht(a, void 0);
|
|
3891
|
-
if (h)
|
|
3892
|
-
return h;
|
|
3893
|
-
{
|
|
3894
|
-
let l = Object.freeze(i(...u));
|
|
3895
|
-
return Gt(a, l), t && it(() => {
|
|
3896
|
-
l = void 0;
|
|
3897
|
-
}), l;
|
|
3898
|
-
}
|
|
3899
|
-
} else n || (n = Object.freeze(i(...u)), t && it(() => {
|
|
3900
|
-
n = void 0;
|
|
3901
|
-
}));
|
|
3902
|
-
return n;
|
|
3903
|
-
};
|
|
3904
|
-
return e && At.push(o), o;
|
|
3905
|
-
}
|
|
3906
|
-
function Ye() {
|
|
3907
|
-
At.forEach((i) => i());
|
|
3908
|
-
}
|
|
3909
|
-
function ge(i, t, e) {
|
|
4587
|
+
function xe(i, t, e) {
|
|
3910
4588
|
const s = () => {
|
|
3911
|
-
i(), t?.() ?
|
|
4589
|
+
i(), t?.() ? xe(i, t, e) : e?.();
|
|
3912
4590
|
};
|
|
3913
4591
|
d() ? requestAnimationFrame(s) : s();
|
|
3914
4592
|
}
|
|
3915
|
-
function
|
|
3916
|
-
const t = {}, e =
|
|
4593
|
+
function hi(i) {
|
|
4594
|
+
const t = {}, e = M(i);
|
|
3917
4595
|
if (e)
|
|
3918
4596
|
for (const s of e.attributes)
|
|
3919
4597
|
t[s.name] = (s?.value || s?.textContent) ?? void 0;
|
|
3920
4598
|
return t;
|
|
3921
4599
|
}
|
|
3922
|
-
async function
|
|
4600
|
+
async function di(i) {
|
|
3923
4601
|
return i?.clipboardData?.getData("text") ?? (await navigator.clipboard.readText() || "");
|
|
3924
4602
|
}
|
|
3925
|
-
function
|
|
4603
|
+
function Be(i, t) {
|
|
3926
4604
|
const e = t.split(".", 2), s = e[0];
|
|
3927
|
-
return s && i?.[s] &&
|
|
4605
|
+
return s && i?.[s] && C(i[s]) && e?.[1] ? Be(i[s], e[1]) : (s && i?.[s]) ?? "";
|
|
3928
4606
|
}
|
|
3929
|
-
function
|
|
4607
|
+
function gi(i) {
|
|
3930
4608
|
return i?.key ?? i?.code ?? i?.keyCode?.toString();
|
|
3931
4609
|
}
|
|
3932
|
-
function
|
|
4610
|
+
function Et(i) {
|
|
3933
4611
|
return f(i, (t) => t.length);
|
|
3934
4612
|
}
|
|
3935
|
-
function
|
|
3936
|
-
return Math.max(...
|
|
4613
|
+
function fi(i) {
|
|
4614
|
+
return Math.max(...Et(i));
|
|
3937
4615
|
}
|
|
3938
|
-
function
|
|
3939
|
-
return Math.min(...
|
|
4616
|
+
function mi(i) {
|
|
4617
|
+
return Math.min(...Et(i));
|
|
3940
4618
|
}
|
|
3941
|
-
function
|
|
4619
|
+
function Fe(i) {
|
|
3942
4620
|
return i?.clientX || i?.targetTouches?.[0]?.clientX || i?.touches?.[0]?.clientX || 0;
|
|
3943
4621
|
}
|
|
3944
|
-
function
|
|
4622
|
+
function Ee(i) {
|
|
3945
4623
|
return i?.clientY || i?.targetTouches?.[0]?.clientY || i?.touches?.[0]?.clientY || 0;
|
|
3946
4624
|
}
|
|
3947
|
-
function
|
|
4625
|
+
function yi(i) {
|
|
3948
4626
|
return {
|
|
3949
|
-
x:
|
|
3950
|
-
y:
|
|
4627
|
+
x: Fe(i),
|
|
4628
|
+
y: Ee(i)
|
|
3951
4629
|
};
|
|
3952
4630
|
}
|
|
3953
|
-
function
|
|
4631
|
+
function pi(i, t) {
|
|
3954
4632
|
const e = {};
|
|
3955
4633
|
return t.forEach((s) => {
|
|
3956
4634
|
s in i && i[s] !== void 0 && (e[s] = i[s]);
|
|
3957
4635
|
}), e;
|
|
3958
4636
|
}
|
|
3959
|
-
function
|
|
4637
|
+
function $i(i, t = void 0) {
|
|
3960
4638
|
const e = {};
|
|
3961
4639
|
return f(i, (s, n) => {
|
|
3962
4640
|
s !== t && (e[n] = s);
|
|
3963
4641
|
}), e;
|
|
3964
4642
|
}
|
|
3965
|
-
function
|
|
3966
|
-
return
|
|
4643
|
+
function vi(i) {
|
|
4644
|
+
return C(i) ? i : {};
|
|
3967
4645
|
}
|
|
3968
|
-
function
|
|
3969
|
-
return
|
|
4646
|
+
function Re(i, t) {
|
|
4647
|
+
return Ae(i, t).join("");
|
|
3970
4648
|
}
|
|
3971
|
-
function
|
|
3972
|
-
const
|
|
3973
|
-
for (let u = 0; u <
|
|
3974
|
-
|
|
3975
|
-
return
|
|
4649
|
+
function bi(i, t, e = "#", s = 2, n = 12) {
|
|
4650
|
+
const o = z(i, t), a = [];
|
|
4651
|
+
for (let u = 0; u < o; u++)
|
|
4652
|
+
a.push(Re(e, z(s, n)));
|
|
4653
|
+
return a.join(" ");
|
|
3976
4654
|
}
|
|
3977
|
-
function
|
|
4655
|
+
function wi(i, t) {
|
|
3978
4656
|
const e = i ?? 0;
|
|
3979
4657
|
return t > e ? 100 / (t - e) : 0;
|
|
3980
4658
|
}
|
|
3981
|
-
function
|
|
4659
|
+
function Si(i, t) {
|
|
3982
4660
|
const e = i ?? 0;
|
|
3983
4661
|
return t > e ? (t - e) / 100 : 0;
|
|
3984
4662
|
}
|
|
3985
|
-
const
|
|
3986
|
-
function
|
|
4663
|
+
const kt = 0;
|
|
4664
|
+
function ki(i, t, e) {
|
|
3987
4665
|
const s = t?.closest(i);
|
|
3988
4666
|
if (t && s && s.scrollHeight !== s.offsetHeight)
|
|
3989
4667
|
if (e) {
|
|
3990
|
-
const n = e.getBoundingClientRect(),
|
|
3991
|
-
s.scrollTop = t.offsetTop - (n.top -
|
|
3992
|
-
} else s.scrollTop > t.offsetTop ? s.scrollTop = t.offsetTop -
|
|
4668
|
+
const n = e.getBoundingClientRect(), o = s.getBoundingClientRect(), a = t.getBoundingClientRect();
|
|
4669
|
+
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);
|
|
4670
|
+
} else s.scrollTop > t.offsetTop ? s.scrollTop = t.offsetTop - kt : s.scrollTop + s.offsetHeight < t.offsetTop + t.offsetHeight && (s.scrollTop = t.offsetTop + t.offsetHeight - s.offsetHeight + kt);
|
|
3993
4671
|
}
|
|
3994
|
-
function
|
|
4672
|
+
function Di(i, t) {
|
|
3995
4673
|
return i.indexOf(t) !== -1;
|
|
3996
4674
|
}
|
|
3997
|
-
async function
|
|
4675
|
+
async function Li() {
|
|
3998
4676
|
if (d()) {
|
|
3999
|
-
const i = await
|
|
4677
|
+
const i = await Ct.get();
|
|
4000
4678
|
document.body.style.setProperty("--sys-scrollbar-offset", `${i}px`);
|
|
4001
4679
|
}
|
|
4002
4680
|
}
|
|
4003
|
-
function
|
|
4681
|
+
function Ci(i, t) {
|
|
4004
4682
|
const e = {};
|
|
4005
|
-
return
|
|
4683
|
+
return p(i) && p(t) && f(i, (s, n) => {
|
|
4006
4684
|
n in t && (e[n] = s);
|
|
4007
4685
|
}), e;
|
|
4008
4686
|
}
|
|
4009
|
-
function
|
|
4687
|
+
function Ii(i, t) {
|
|
4010
4688
|
let e = Object.keys(i).length !== Object.keys(t).length;
|
|
4011
4689
|
return e || f(i, (s, n) => {
|
|
4012
4690
|
s !== t?.[n] && (e = !0);
|
|
4013
4691
|
}), e;
|
|
4014
4692
|
}
|
|
4015
|
-
function
|
|
4693
|
+
function Ni(i) {
|
|
4016
4694
|
switch (typeof i) {
|
|
4017
4695
|
case "number":
|
|
4018
4696
|
return !0;
|
|
@@ -4022,115 +4700,115 @@ function hs(i) {
|
|
|
4022
4700
|
return !1;
|
|
4023
4701
|
}
|
|
4024
4702
|
}
|
|
4025
|
-
function
|
|
4703
|
+
function Ai(i, t) {
|
|
4026
4704
|
const e = Math.floor(t);
|
|
4027
4705
|
return i >= e && i < e + 1;
|
|
4028
4706
|
}
|
|
4029
|
-
function
|
|
4030
|
-
return Array.isArray(i) ? i.every((e) =>
|
|
4707
|
+
function xi(i, t) {
|
|
4708
|
+
return Array.isArray(i) ? i.every((e) => j(e, t)) : j(i, t);
|
|
4031
4709
|
}
|
|
4032
|
-
function
|
|
4033
|
-
const n = typeof t == "string",
|
|
4034
|
-
return i ? i &&
|
|
4710
|
+
function We(i, t = {}, e = "value", s = !1) {
|
|
4711
|
+
const n = typeof t == "string", o = n ? t : e, a = n ? {} : t;
|
|
4712
|
+
return i ? i && C(i) && (o in i || s) ? lt(a, i) : lt(a, { [o]: i }) : n ? {} : { ...a };
|
|
4035
4713
|
}
|
|
4036
|
-
function
|
|
4037
|
-
return c(() =>
|
|
4714
|
+
function Bi(i, t = {}, e = "value") {
|
|
4715
|
+
return c(() => We(m(i), m(t), e));
|
|
4038
4716
|
}
|
|
4039
|
-
const
|
|
4040
|
-
const e =
|
|
4717
|
+
const Fi = (i, t) => {
|
|
4718
|
+
const e = y();
|
|
4041
4719
|
let s = !0;
|
|
4042
4720
|
const n = () => {
|
|
4043
|
-
s && (
|
|
4044
|
-
const
|
|
4045
|
-
|
|
4721
|
+
s && (Jt(async () => {
|
|
4722
|
+
const o = m(await i());
|
|
4723
|
+
o !== t && (e.value = o);
|
|
4046
4724
|
}), s = !1);
|
|
4047
4725
|
};
|
|
4048
4726
|
return c(() => (n(), e.value));
|
|
4049
4727
|
};
|
|
4050
|
-
function
|
|
4728
|
+
function Ei(i, t) {
|
|
4051
4729
|
i.value !== t && (i.value = t);
|
|
4052
4730
|
}
|
|
4053
|
-
function
|
|
4731
|
+
function Ri(i) {
|
|
4054
4732
|
let t;
|
|
4055
4733
|
return c(() => (t || (t = i()), t.value));
|
|
4056
4734
|
}
|
|
4057
|
-
function
|
|
4735
|
+
function Pe(i) {
|
|
4058
4736
|
return [...new Set(i)];
|
|
4059
4737
|
}
|
|
4060
|
-
function
|
|
4061
|
-
const s =
|
|
4062
|
-
return
|
|
4738
|
+
function P(i, t, e = !0) {
|
|
4739
|
+
const s = H(i);
|
|
4740
|
+
return p(i) && p(t) && f(
|
|
4063
4741
|
t,
|
|
4064
|
-
(n,
|
|
4065
|
-
const
|
|
4066
|
-
|
|
4067
|
-
Array.isArray(
|
|
4742
|
+
(n, o) => {
|
|
4743
|
+
const a = i?.[o];
|
|
4744
|
+
p(a) && p(n) ? e && Array.isArray(a) && Array.isArray(n) ? s[o] = H(Pe([...a, ...n])) : s[o] = P(
|
|
4745
|
+
Array.isArray(a) ? { ...a } : a,
|
|
4068
4746
|
n,
|
|
4069
4747
|
e
|
|
4070
|
-
) : s[
|
|
4748
|
+
) : s[o] = p(n) ? H(n) : n;
|
|
4071
4749
|
}
|
|
4072
4750
|
), s;
|
|
4073
4751
|
}
|
|
4074
|
-
function
|
|
4752
|
+
function Wi(i, t) {
|
|
4075
4753
|
let e = i;
|
|
4076
4754
|
return f(t, (s, n) => {
|
|
4077
|
-
e = e.replace(
|
|
4755
|
+
e = e.replace(xt(`[${n}]`), B(s));
|
|
4078
4756
|
}), e;
|
|
4079
4757
|
}
|
|
4080
|
-
function
|
|
4081
|
-
const t =
|
|
4758
|
+
function Pi(i) {
|
|
4759
|
+
const t = k(i);
|
|
4082
4760
|
if (t > 0) {
|
|
4083
4761
|
const e = String(Math.floor(t / 60)).padStart(2, "0"), s = String(t % 60).padStart(2, "0");
|
|
4084
4762
|
return `${e}:${s}`;
|
|
4085
4763
|
}
|
|
4086
4764
|
return "00:00";
|
|
4087
4765
|
}
|
|
4088
|
-
function
|
|
4766
|
+
function ji(i, t, {
|
|
4089
4767
|
multiple: e = !1,
|
|
4090
4768
|
maxlength: s = 0,
|
|
4091
4769
|
alwaysChange: n = !0,
|
|
4092
|
-
notEmpty:
|
|
4770
|
+
notEmpty: o = !1
|
|
4093
4771
|
}) {
|
|
4094
4772
|
if (e) {
|
|
4095
|
-
if (
|
|
4096
|
-
const
|
|
4097
|
-
return
|
|
4773
|
+
if (mt(i)) {
|
|
4774
|
+
const a = i.indexOf(t), u = [...i];
|
|
4775
|
+
return a !== -1 ? (!o || u.length > 1) && u.splice(a, 1) : (!s || i.length < s) && u.push(t), u;
|
|
4098
4776
|
}
|
|
4099
4777
|
return i === t ? [] : i ? [i, t] : [t];
|
|
4100
4778
|
}
|
|
4101
4779
|
return n || i !== t ? t : i;
|
|
4102
4780
|
}
|
|
4103
|
-
function
|
|
4104
|
-
if (
|
|
4781
|
+
function Hi(i, t, e) {
|
|
4782
|
+
if (p(i) && p(t)) {
|
|
4105
4783
|
if (e) {
|
|
4106
4784
|
let s = {}, n = !1;
|
|
4107
|
-
return f(i, (
|
|
4108
|
-
!n && (e ===
|
|
4109
|
-
}), n ? s :
|
|
4785
|
+
return f(i, (o, a) => {
|
|
4786
|
+
!n && (e === a || e === o) ? (n = !0, s = P(s, t)) : n ? s = P(s, { [a]: o }) : s[a] = p(o) ? H(o) : o;
|
|
4787
|
+
}), n ? s : P(i, t);
|
|
4110
4788
|
}
|
|
4111
|
-
if (
|
|
4112
|
-
return
|
|
4789
|
+
if (p(t))
|
|
4790
|
+
return P(i, t);
|
|
4113
4791
|
}
|
|
4114
|
-
return
|
|
4792
|
+
return H(i);
|
|
4115
4793
|
}
|
|
4116
|
-
function
|
|
4117
|
-
return
|
|
4794
|
+
function Ui(i) {
|
|
4795
|
+
return Nt(i).replace(/^([a-z])/, (t) => `${t.toUpperCase()}`);
|
|
4118
4796
|
}
|
|
4119
|
-
function
|
|
4797
|
+
function _i(i) {
|
|
4120
4798
|
return i.toString().trim().replace(/[^\w- ]+/g, "").replace(/ +/g, "-").replace(new RegExp("(?<=[A-Z])([A-Z])", "g"), (t) => `${t.toLowerCase()}`).replace(/^[A-Z]/, (t) => t.toLowerCase()).replace(new RegExp("(?<=[\\w ])[A-Z]", "g"), (t) => `-${t.toLowerCase()}`).replace(/[A-Z]/g, (t) => t.toLowerCase());
|
|
4121
4799
|
}
|
|
4122
|
-
function
|
|
4123
|
-
const n =
|
|
4124
|
-
return t &&
|
|
4800
|
+
function zi(i, t, e, s) {
|
|
4801
|
+
const n = k(i), o = k(t);
|
|
4802
|
+
return t && o < n ? `${Dt(o, e, s)}+` : Dt(n, e, s);
|
|
4125
4803
|
}
|
|
4126
|
-
const
|
|
4127
|
-
function
|
|
4804
|
+
const Dt = (i, t, e) => t ? new W(e).number(i) : i;
|
|
4805
|
+
function je(i, t) {
|
|
4128
4806
|
return 1 / i * t;
|
|
4129
4807
|
}
|
|
4130
|
-
function
|
|
4131
|
-
return
|
|
4808
|
+
function Zi(i, t) {
|
|
4809
|
+
return je(i, t) * 100;
|
|
4132
4810
|
}
|
|
4133
|
-
async function
|
|
4811
|
+
async function Ki(i) {
|
|
4134
4812
|
if (d())
|
|
4135
4813
|
try {
|
|
4136
4814
|
await navigator.clipboard.writeText(i);
|
|
@@ -4139,140 +4817,157 @@ async function Cs(i) {
|
|
|
4139
4817
|
}
|
|
4140
4818
|
}
|
|
4141
4819
|
export {
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4820
|
+
V as Api,
|
|
4821
|
+
qi as ApiMethodItem,
|
|
4822
|
+
Xt as BroadcastMessage,
|
|
4823
|
+
Tt as Cache,
|
|
4824
|
+
Ot as CacheItem,
|
|
4825
|
+
vt as CacheStatic,
|
|
4826
|
+
at as Cookie,
|
|
4827
|
+
te as CookieBlock,
|
|
4828
|
+
X as DataStorage,
|
|
4829
|
+
gt as Datetime,
|
|
4830
|
+
Ye as DatetimeRef,
|
|
4831
|
+
pe as DesignAbstract,
|
|
4832
|
+
Ze as DesignAsyncAbstract,
|
|
4833
|
+
ye as DesignChanged,
|
|
4834
|
+
Ke as DesignComp,
|
|
4835
|
+
It as DesignComponents,
|
|
4836
|
+
Ve as DesignConstructorAbstract,
|
|
4837
|
+
Ut as EventItem,
|
|
4838
|
+
qe as EventRef,
|
|
4160
4839
|
r as GEO_FLAG_ICON_NAME,
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4840
|
+
b as Geo,
|
|
4841
|
+
U as GeoFlag,
|
|
4842
|
+
Je as GeoFlagRef,
|
|
4843
|
+
W as GeoIntl,
|
|
4844
|
+
Se as GeoIntlRef,
|
|
4845
|
+
wt as GeoPhone,
|
|
4846
|
+
At as GeoRef,
|
|
4847
|
+
ze as Global,
|
|
4848
|
+
_ as Hash,
|
|
4849
|
+
Ji as Icons,
|
|
4850
|
+
Bt as ListDataRef,
|
|
4851
|
+
$t as Loading,
|
|
4852
|
+
ge as Meta,
|
|
4853
|
+
ft as MetaManager,
|
|
4854
|
+
he as MetaOg,
|
|
4855
|
+
ce as MetaOpenGraphAge,
|
|
4856
|
+
oe as MetaOpenGraphAvailability,
|
|
4857
|
+
ae as MetaOpenGraphCondition,
|
|
4858
|
+
ue as MetaOpenGraphGender,
|
|
4859
|
+
$ as MetaOpenGraphTag,
|
|
4860
|
+
ne as MetaOpenGraphType,
|
|
4861
|
+
re as MetaRobots,
|
|
4862
|
+
w as MetaTag,
|
|
4863
|
+
de as MetaTwitter,
|
|
4864
|
+
le as MetaTwitterCard,
|
|
4865
|
+
v as MetaTwitterTag,
|
|
4866
|
+
Qe as RouterItemRef,
|
|
4867
|
+
Ct as ScrollbarWidth,
|
|
4868
|
+
Xe as ScrollbarWidthRef,
|
|
4869
|
+
q as Translate,
|
|
4870
|
+
ai as anyToString,
|
|
4871
|
+
me as applyTemplate,
|
|
4872
|
+
Ae as arrFill,
|
|
4873
|
+
H as copyObject,
|
|
4874
|
+
ut as createElement,
|
|
4875
|
+
ci as domQuerySelector,
|
|
4876
|
+
ui as domQuerySelectorAll,
|
|
4877
|
+
se as encodeAttribute,
|
|
4878
|
+
li as eventStopPropagation,
|
|
4879
|
+
B as executeFunction,
|
|
4880
|
+
Qi as executePromise,
|
|
4881
|
+
Ce as executeUse,
|
|
4882
|
+
si as executeUseGlobalInit,
|
|
4189
4883
|
f as forEach,
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4884
|
+
xe as frame,
|
|
4885
|
+
hi as getAttributes,
|
|
4886
|
+
We as getBind,
|
|
4887
|
+
Bi as getBindRef,
|
|
4888
|
+
$e as getClassName,
|
|
4889
|
+
di as getClipboardData,
|
|
4890
|
+
ct as getColumn,
|
|
4891
|
+
Fi as getComputedAsync,
|
|
4892
|
+
M as getElement,
|
|
4893
|
+
Y as getElementId,
|
|
4894
|
+
ee as getElementItem,
|
|
4895
|
+
Xi as getElementOrWindow,
|
|
4896
|
+
xt as getExp,
|
|
4897
|
+
ve as getIndexForRender,
|
|
4898
|
+
Be as getItemByPath,
|
|
4899
|
+
gi as getKey,
|
|
4900
|
+
Et as getLengthOfAllArray,
|
|
4901
|
+
fi as getMaxLengthAllArray,
|
|
4902
|
+
mi as getMinLengthAllArray,
|
|
4903
|
+
yi as getMouseClient,
|
|
4904
|
+
Fe as getMouseClientX,
|
|
4905
|
+
Ee as getMouseClientY,
|
|
4906
|
+
pi as getObjectByKeys,
|
|
4907
|
+
$i as getObjectNoUndefined,
|
|
4908
|
+
vi as getObjectOrNone,
|
|
4909
|
+
bi as getRandomText,
|
|
4910
|
+
m as getRef,
|
|
4911
|
+
Ht as getRequestString,
|
|
4912
|
+
wi as getStepPercent,
|
|
4913
|
+
Si as getStepValue,
|
|
4914
|
+
ki as goScroll,
|
|
4915
|
+
Di as inArray,
|
|
4916
|
+
Li as initScrollbarOffset,
|
|
4917
|
+
Ci as intersectKey,
|
|
4918
|
+
mt as isArray,
|
|
4919
|
+
Ii as isDifferent,
|
|
4226
4920
|
d as isDomRuntime,
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4921
|
+
F as isFilled,
|
|
4922
|
+
Ni as isFloat,
|
|
4923
|
+
Mi as isFunction,
|
|
4924
|
+
Oi as isInDom,
|
|
4925
|
+
Ai as isIntegerBetween,
|
|
4926
|
+
jt as isNull,
|
|
4927
|
+
Ti as isNumber,
|
|
4928
|
+
p as isObject,
|
|
4929
|
+
C as isObjectNotArray,
|
|
4930
|
+
j as isSelected,
|
|
4931
|
+
xi as isSelectedByList,
|
|
4932
|
+
ht as isString,
|
|
4933
|
+
Gi as isWindow,
|
|
4934
|
+
z as random,
|
|
4935
|
+
be as render,
|
|
4936
|
+
P as replaceRecursive,
|
|
4937
|
+
Wi as replaceTemplate,
|
|
4938
|
+
Pi as secondToTime,
|
|
4939
|
+
Oe as setApiRefGlobalConditions,
|
|
4940
|
+
ie as setElementItem,
|
|
4941
|
+
Ei as setRef,
|
|
4942
|
+
ji as setValues,
|
|
4943
|
+
Hi as splice,
|
|
4944
|
+
Re as strFill,
|
|
4945
|
+
oi as t,
|
|
4946
|
+
R as toArray,
|
|
4947
|
+
lt as toBind,
|
|
4948
|
+
we as toBinds,
|
|
4949
|
+
Nt as toCamelCase,
|
|
4950
|
+
Ui as toCamelCaseFirst,
|
|
4951
|
+
Ri as toComputed,
|
|
4952
|
+
D as toDate,
|
|
4953
|
+
_i as toKebabCase,
|
|
4954
|
+
k as toNumber,
|
|
4955
|
+
zi as toNumberByMax,
|
|
4956
|
+
je as toPercent,
|
|
4957
|
+
Zi as toPercentBy100,
|
|
4958
|
+
L as toRefItem,
|
|
4959
|
+
Lt as transformation,
|
|
4960
|
+
Pe as uniqueArray,
|
|
4961
|
+
Me as useApiRef,
|
|
4962
|
+
De as useBroadcastValueRef,
|
|
4963
|
+
Te as useCookieRef,
|
|
4964
|
+
Ge as useGeoIntlRef,
|
|
4965
|
+
ti as useHashRef,
|
|
4966
|
+
ei as useLazyRef,
|
|
4967
|
+
ii as useLoadingRef,
|
|
4968
|
+
ri as useMeta,
|
|
4969
|
+
ni as useSessionRef,
|
|
4970
|
+
Qt as useStorageRef,
|
|
4971
|
+
Ne as useTranslateRef,
|
|
4972
|
+
Ki as writeClipboardData
|
|
4278
4973
|
};
|