@dxtmisha/functional 1.6.8 → 1.9.1
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/README.md +36 -727
- package/dist/library.d.ts +723 -82
- package/dist/library.js +1127 -439
- package/package.json +12 -7
package/dist/library.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (s, t, e) =>
|
|
4
|
-
import { isArray as
|
|
1
|
+
var Lt = Object.defineProperty;
|
|
2
|
+
var wt = (s, t, e) => t in s ? Lt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var l = (s, t, e) => wt(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { isArray as xt, isString as X, isObjectNotArray as j, forEach as E, toArray as U, isObject as Z, toCamelCase as Ct, toDate as ut, Datetime as kt, Geo as R, EventItem as Dt, GeoFlag as At, GeoIntl as Bt, isSelected as T, getExp as Mt, getColumn as lt, ScrollbarWidth as Nt, ApiMethodItem as z, Api as gt, Formatters as Ft, SearchList as Ht, executeFunction as et, isFunction as ot, executePromise as it, isApiSuccess as Et, BroadcastMessage as $t, Cookie as Rt, Hash as _, isDomRuntime as ft, getElementId as $, Loading as ct, random as Pt, Meta as jt, DataStorage as vt, Translate as ht } from "@dxtmisha/functional-basic";
|
|
5
5
|
export * from "@dxtmisha/functional-basic";
|
|
6
|
-
import { isRef as
|
|
7
|
-
class
|
|
6
|
+
import { isRef as V, h as zt, computed as u, toRefs as Vt, useAttrs as Tt, useSlots as Ot, ref as f, watch as y, triggerRef as Wt, effectScope as st, shallowRef as N, getCurrentInstance as Ut, onUnmounted as _t, inject as Gt, provide as Kt, watchEffect as mt, customRef as Yt } from "vue";
|
|
7
|
+
class Jt {
|
|
8
8
|
/**
|
|
9
9
|
* Constructor
|
|
10
10
|
* @param props base data/ базовые данные
|
|
@@ -21,7 +21,7 @@ class wt {
|
|
|
21
21
|
* @param name property name/ название свойства
|
|
22
22
|
*/
|
|
23
23
|
is(t) {
|
|
24
|
-
return
|
|
24
|
+
return xt(t) ? !!t.find((e) => this.isDifferent(e)) : this.isDifferent(t);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Checks if there are changes in the data.
|
|
@@ -54,7 +54,7 @@ class wt {
|
|
|
54
54
|
return ((e = this.cache) == null ? void 0 : e[t]) !== ((i = this.props) == null ? void 0 : i[t]);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
class
|
|
57
|
+
class Qt {
|
|
58
58
|
/**
|
|
59
59
|
* Constructor
|
|
60
60
|
* @param props base data/ базовые данные
|
|
@@ -65,7 +65,7 @@ class Dt {
|
|
|
65
65
|
constructor(t, e, i) {
|
|
66
66
|
l(this, "event", {});
|
|
67
67
|
l(this, "changed");
|
|
68
|
-
this.props = t, this.callback = e, this.changed = new
|
|
68
|
+
this.props = t, this.callback = e, this.changed = new Jt(t, i);
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Calls the callback function.
|
|
@@ -113,7 +113,7 @@ class Dt {
|
|
|
113
113
|
this.callback && this.callback(this.event);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
class
|
|
116
|
+
class xe extends Qt {
|
|
117
117
|
/**
|
|
118
118
|
* Calls the callback function.
|
|
119
119
|
*
|
|
@@ -133,37 +133,40 @@ class Ut extends Dt {
|
|
|
133
133
|
(t || this.changed.isChanged()) && (await this.initEvent(), this.makeCallbackItem(), this.changed.update());
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
136
|
+
function g(s) {
|
|
137
|
+
return V(s) ? s.value : s;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Xt(s) {
|
|
140
140
|
return s && "class" in s && typeof s.class == "string" ? s.class : void 0;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const i =
|
|
144
|
-
|
|
142
|
+
function Zt(s, t, e) {
|
|
143
|
+
const i = t == null ? void 0 : t.id, n = t == null ? void 0 : t.index, r = Xt(t);
|
|
144
|
+
let a = "";
|
|
145
|
+
if (X(s) && (a += s), e && (a += `.${e}`), n && X(n) && (a += `.${n}`), r && (a += `.${r}`), i && (a += `.${i}`), a !== "")
|
|
146
|
+
return a;
|
|
145
147
|
}
|
|
146
|
-
function
|
|
148
|
+
function qt(s, t, e, i) {
|
|
147
149
|
let n = t;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
...t
|
|
151
|
-
|
|
150
|
+
const r = t && "key" in t;
|
|
151
|
+
return (!t || !r) && (n = {
|
|
152
|
+
...t,
|
|
153
|
+
key: Zt(s, t, i)
|
|
154
|
+
}), zt(s, n, e);
|
|
152
155
|
}
|
|
153
|
-
function
|
|
154
|
-
const e = s == null ? void 0 : s.class, i = t == null ? void 0 : t.class, n = s == null ? void 0 : s.style, r = t == null ? void 0 : t.style,
|
|
156
|
+
function q(s, t) {
|
|
157
|
+
const e = s == null ? void 0 : s.class, i = t == null ? void 0 : t.class, n = s == null ? void 0 : s.style, r = t == null ? void 0 : t.style, a = {
|
|
155
158
|
...s,
|
|
156
159
|
...t
|
|
157
160
|
};
|
|
158
|
-
return e && i && (
|
|
161
|
+
return e && i && (a.class = [], e && a.class.push(e), i && a.class.push(i)), n && r && (a.style = [], n && a.style.push(n), r && a.style.push(r)), a;
|
|
159
162
|
}
|
|
160
|
-
function
|
|
163
|
+
function te(...s) {
|
|
161
164
|
let t = {};
|
|
162
165
|
return s.forEach((e) => {
|
|
163
|
-
e && (t =
|
|
166
|
+
e && (t = q(t, e));
|
|
164
167
|
}), t;
|
|
165
168
|
}
|
|
166
|
-
class
|
|
169
|
+
class yt {
|
|
167
170
|
/**
|
|
168
171
|
* Constructor
|
|
169
172
|
* @param components list of connected components/ список подключенных компонентов
|
|
@@ -202,10 +205,10 @@ class X {
|
|
|
202
205
|
*/
|
|
203
206
|
getModification(t, e) {
|
|
204
207
|
if (t) {
|
|
205
|
-
t in this.caching || (this.caching[t] =
|
|
208
|
+
t in this.caching || (this.caching[t] = u(() => this.computeModification(t)));
|
|
206
209
|
const i = this.caching[t];
|
|
207
210
|
if (i)
|
|
208
|
-
return e ?
|
|
211
|
+
return e ? te(i.value, e) : i.value;
|
|
209
212
|
}
|
|
210
213
|
return e;
|
|
211
214
|
}
|
|
@@ -239,7 +242,7 @@ class X {
|
|
|
239
242
|
renderOne(t, e, i, n) {
|
|
240
243
|
if (this.is(t)) {
|
|
241
244
|
const r = n != null ? n : t;
|
|
242
|
-
return
|
|
245
|
+
return qt(
|
|
243
246
|
this.get(t),
|
|
244
247
|
this.getModification(r, e),
|
|
245
248
|
i,
|
|
@@ -269,19 +272,19 @@ class X {
|
|
|
269
272
|
*/
|
|
270
273
|
computeModification(t) {
|
|
271
274
|
var i;
|
|
272
|
-
const e =
|
|
273
|
-
if (e &&
|
|
275
|
+
const e = g((i = this.modification) == null ? void 0 : i[t]);
|
|
276
|
+
if (e && j(e)) {
|
|
274
277
|
const n = {};
|
|
275
|
-
return
|
|
276
|
-
n[
|
|
278
|
+
return E(e, (r, a) => {
|
|
279
|
+
n[a] = g(r);
|
|
277
280
|
}), n;
|
|
278
281
|
}
|
|
279
282
|
return {};
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
|
-
class
|
|
285
|
+
class Ce extends yt {
|
|
283
286
|
}
|
|
284
|
-
class
|
|
287
|
+
class ke {
|
|
285
288
|
/**
|
|
286
289
|
* Constructor
|
|
287
290
|
* @param name class name/ название класса
|
|
@@ -301,10 +304,10 @@ class Yt {
|
|
|
301
304
|
l(this, "attrs");
|
|
302
305
|
l(this, "slots");
|
|
303
306
|
l(this, "dataExpose");
|
|
304
|
-
this.props = e, this.options = i, this.name = this.initName(t), this.refs = this.props ?
|
|
307
|
+
this.props = e, this.options = i, this.name = this.initName(t), this.refs = this.props ? Vt(this.props) : {}, this.components = new yt(i == null ? void 0 : i.components, i == null ? void 0 : i.compMod), this.emits = i == null ? void 0 : i.emits, this.classes = u(() => this.updateClasses()), this.styles = u(() => this.updateStyles()), this.attrs = Tt(), this.slots = Ot();
|
|
305
308
|
}
|
|
306
309
|
init() {
|
|
307
|
-
return this.classesSub =
|
|
310
|
+
return this.classesSub = u(() => this.initClasses()), this.stylesSub = u(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
|
|
308
311
|
}
|
|
309
312
|
/**
|
|
310
313
|
* Getting the class name.
|
|
@@ -329,7 +332,7 @@ class Yt {
|
|
|
329
332
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
330
333
|
*/
|
|
331
334
|
getSubClass(t) {
|
|
332
|
-
return `${this.getName()}__${
|
|
335
|
+
return `${this.getName()}__${U(t).join("__")}`;
|
|
333
336
|
}
|
|
334
337
|
/**
|
|
335
338
|
* Getting the class name for the status.
|
|
@@ -338,7 +341,7 @@ class Yt {
|
|
|
338
341
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
339
342
|
*/
|
|
340
343
|
getStatusClass(t) {
|
|
341
|
-
return `${this.getName()}--${
|
|
344
|
+
return `${this.getName()}--${U(t).join("--")}`;
|
|
342
345
|
}
|
|
343
346
|
/**
|
|
344
347
|
* Getting the property name for the style.
|
|
@@ -347,7 +350,7 @@ class Yt {
|
|
|
347
350
|
* @param name list of class names by levels/ список названий классов по уровням
|
|
348
351
|
*/
|
|
349
352
|
getStyle(t) {
|
|
350
|
-
return `--${this.getName()}-sys-${
|
|
353
|
+
return `--${this.getName()}-sys-${U(t).join("-")}`;
|
|
351
354
|
}
|
|
352
355
|
/**
|
|
353
356
|
* Getting additional parameters.
|
|
@@ -366,7 +369,10 @@ class Yt {
|
|
|
366
369
|
*/
|
|
367
370
|
expose() {
|
|
368
371
|
var t;
|
|
369
|
-
return
|
|
372
|
+
return {
|
|
373
|
+
...(t = this.dataExpose) != null ? t : {},
|
|
374
|
+
elementHtml: this.element
|
|
375
|
+
};
|
|
370
376
|
}
|
|
371
377
|
/**
|
|
372
378
|
* The rendering method for the setup method.
|
|
@@ -399,7 +405,7 @@ class Yt {
|
|
|
399
405
|
* @param classes list of classes for transformation/ список классов для преобразования
|
|
400
406
|
*/
|
|
401
407
|
toClass(t) {
|
|
402
|
-
return
|
|
408
|
+
return j(t) ? t : Array.isArray(t) ? { [t.filter((i) => typeof i == "string" && i.trim() !== "").join(" ")]: !0 } : typeof t == "string" ? { [t]: !0 } : {};
|
|
403
409
|
}
|
|
404
410
|
/**
|
|
405
411
|
* Converts the class name to standard for the current component.
|
|
@@ -408,9 +414,9 @@ class Yt {
|
|
|
408
414
|
* @param classes list of classes/ список классов
|
|
409
415
|
*/
|
|
410
416
|
toClassName(t) {
|
|
411
|
-
if (
|
|
417
|
+
if (Z(t)) {
|
|
412
418
|
const e = {};
|
|
413
|
-
return
|
|
419
|
+
return E(t, (i, n) => {
|
|
414
420
|
n.match(/\?\?/) ? e[n.replace(/\?\?/, this.getName())] = i : n.match(/\?/) ? e[n.replace(/\?/, this.getDesign())] = i : e[n] = i;
|
|
415
421
|
}), e;
|
|
416
422
|
}
|
|
@@ -423,7 +429,7 @@ class Yt {
|
|
|
423
429
|
* @param name component name for transformation/ название компонента для преобразования
|
|
424
430
|
*/
|
|
425
431
|
initName(t) {
|
|
426
|
-
return
|
|
432
|
+
return E(t.split(".", 2), (e) => Ct(e));
|
|
427
433
|
}
|
|
428
434
|
/**
|
|
429
435
|
* Updating data about the class.
|
|
@@ -431,17 +437,17 @@ class Yt {
|
|
|
431
437
|
* Обновление данных об классе.
|
|
432
438
|
*/
|
|
433
439
|
updateClasses() {
|
|
434
|
-
var i, n, r,
|
|
440
|
+
var i, n, r, a;
|
|
435
441
|
const t = (i = this.classesSub) == null ? void 0 : i.value, e = (r = (n = this.options) == null ? void 0 : n.classes) == null ? void 0 : r.value;
|
|
436
442
|
return t && e ? {
|
|
437
443
|
...t,
|
|
438
444
|
...e,
|
|
439
445
|
main: {
|
|
440
446
|
...this.toClass(t == null ? void 0 : t.main),
|
|
441
|
-
...this.toClass(e == null ? void 0 : e.main)
|
|
442
|
-
...this.toClass(
|
|
447
|
+
...this.toClass(e == null ? void 0 : e.main)
|
|
448
|
+
// ...this.toClass(this.attrs?.class)
|
|
443
449
|
}
|
|
444
|
-
} : e != null ? e : {
|
|
450
|
+
} : (a = e != null ? e : t) != null ? a : {
|
|
445
451
|
main: {}
|
|
446
452
|
};
|
|
447
453
|
}
|
|
@@ -451,43 +457,45 @@ class Yt {
|
|
|
451
457
|
* Доработка полученного списка стилей.
|
|
452
458
|
*/
|
|
453
459
|
updateStyles() {
|
|
454
|
-
var i, n, r;
|
|
460
|
+
var i, n, r, a;
|
|
455
461
|
const t = (i = this.stylesSub) == null ? void 0 : i.value, e = (r = (n = this.options) == null ? void 0 : n.styles) == null ? void 0 : r.value;
|
|
456
462
|
return t && e ? {
|
|
457
463
|
...t,
|
|
458
464
|
...e
|
|
459
|
-
} : e != null ? e : {};
|
|
465
|
+
} : (a = e != null ? e : t) != null ? a : {};
|
|
460
466
|
}
|
|
461
467
|
}
|
|
462
|
-
function
|
|
463
|
-
return
|
|
468
|
+
function D(s) {
|
|
469
|
+
return V(s) ? s : f(s);
|
|
464
470
|
}
|
|
465
|
-
class
|
|
471
|
+
class De {
|
|
466
472
|
/**
|
|
467
473
|
* Constructor
|
|
468
474
|
* @param date date for processing. дата для обработки
|
|
469
475
|
* @param type type of date format for output. тип формата даты вывода
|
|
470
476
|
* @param code country and language code. код страны и языка
|
|
471
477
|
*/
|
|
472
|
-
constructor(t, e = "date", i =
|
|
478
|
+
constructor(t, e = "date", i = R.getLocation()) {
|
|
473
479
|
l(this, "item");
|
|
474
480
|
l(this, "type");
|
|
475
481
|
l(this, "code");
|
|
476
482
|
l(this, "date");
|
|
477
483
|
l(this, "datetime");
|
|
478
|
-
l(this, "year",
|
|
479
|
-
l(this, "month",
|
|
480
|
-
l(this, "day",
|
|
481
|
-
l(this, "hour",
|
|
482
|
-
l(this, "minute",
|
|
483
|
-
l(this, "second",
|
|
484
|
-
this.item =
|
|
484
|
+
l(this, "year", f(2e3));
|
|
485
|
+
l(this, "month", f(1));
|
|
486
|
+
l(this, "day", f(1));
|
|
487
|
+
l(this, "hour", f(1));
|
|
488
|
+
l(this, "minute", f(1));
|
|
489
|
+
l(this, "second", f(1));
|
|
490
|
+
this.item = D(t), this.type = D(e), this.code = D(i), this.date = f(ut(this.item.value)), this.datetime = new kt(
|
|
485
491
|
this.date.value,
|
|
486
492
|
this.type.value,
|
|
487
493
|
this.code.value
|
|
488
|
-
),
|
|
489
|
-
this.date.value =
|
|
490
|
-
}),
|
|
494
|
+
), y(this.item, (n) => {
|
|
495
|
+
this.date.value = ut(n);
|
|
496
|
+
}), y(this.type, (n) => this.datetime.setType(n)), y(this.code, (n) => this.datetime.setCode(n)), y(this.date, (n) => {
|
|
497
|
+
this.datetime.setDate(n), this.updateDate();
|
|
498
|
+
}), this.datetime.setWatch(() => Wt(this.date)), this.updateDate();
|
|
491
499
|
}
|
|
492
500
|
/**
|
|
493
501
|
* Returns the basic data for the date.
|
|
@@ -519,7 +527,7 @@ class Gt {
|
|
|
519
527
|
* Возвращает формат часов.
|
|
520
528
|
*/
|
|
521
529
|
getHoursType() {
|
|
522
|
-
return
|
|
530
|
+
return u(() => this.date.value && this.datetime.getHoursType());
|
|
523
531
|
}
|
|
524
532
|
/**
|
|
525
533
|
* Returns the code of the first day of the week.
|
|
@@ -527,7 +535,7 @@ class Gt {
|
|
|
527
535
|
* Возвращает код первого дня недели.
|
|
528
536
|
*/
|
|
529
537
|
getFirstDayCode() {
|
|
530
|
-
return
|
|
538
|
+
return u(() => this.date.value && this.datetime.getFirstDayCode());
|
|
531
539
|
}
|
|
532
540
|
/**
|
|
533
541
|
* The method returns the year of the specified date according to local time.
|
|
@@ -535,7 +543,7 @@ class Gt {
|
|
|
535
543
|
* Метод возвращает год указанной даты по местному времени.
|
|
536
544
|
*/
|
|
537
545
|
getYear() {
|
|
538
|
-
return this.year;
|
|
546
|
+
return u(() => this.year.value);
|
|
539
547
|
}
|
|
540
548
|
/**
|
|
541
549
|
* The method returns the month in the specified date according to local time,
|
|
@@ -545,7 +553,7 @@ class Gt {
|
|
|
545
553
|
* месяцев начинается с нуля для первого месяца в году.
|
|
546
554
|
*/
|
|
547
555
|
getMonth() {
|
|
548
|
-
return this.month;
|
|
556
|
+
return u(() => this.month.value);
|
|
549
557
|
}
|
|
550
558
|
/**
|
|
551
559
|
* The method returns the day of the month for the specified date according to local time.
|
|
@@ -553,7 +561,7 @@ class Gt {
|
|
|
553
561
|
* Метод возвращает день месяца указанной даты по местному времени.
|
|
554
562
|
*/
|
|
555
563
|
getDay() {
|
|
556
|
-
return this.day;
|
|
564
|
+
return u(() => this.day.value);
|
|
557
565
|
}
|
|
558
566
|
/**
|
|
559
567
|
* The method returns the hour for the specified date, according to local time.
|
|
@@ -561,7 +569,7 @@ class Gt {
|
|
|
561
569
|
* Метод возвращает часы указанной даты по местному времени.
|
|
562
570
|
*/
|
|
563
571
|
getHour() {
|
|
564
|
-
return this.hour;
|
|
572
|
+
return u(() => this.hour.value);
|
|
565
573
|
}
|
|
566
574
|
/**
|
|
567
575
|
* The method returns the minutes in the specified date according to local time.
|
|
@@ -569,7 +577,7 @@ class Gt {
|
|
|
569
577
|
* Метод возвращает минуты указанной даты по местному времени.
|
|
570
578
|
*/
|
|
571
579
|
getMinute() {
|
|
572
|
-
return this.minute;
|
|
580
|
+
return u(() => this.minute.value);
|
|
573
581
|
}
|
|
574
582
|
/**
|
|
575
583
|
* The method returns the seconds in the specified date according to local time.
|
|
@@ -577,7 +585,7 @@ class Gt {
|
|
|
577
585
|
* Метод возвращает секунды указанной даты по местному времени.
|
|
578
586
|
*/
|
|
579
587
|
getSecond() {
|
|
580
|
-
return this.second;
|
|
588
|
+
return u(() => this.second.value);
|
|
581
589
|
}
|
|
582
590
|
/**
|
|
583
591
|
* Returns the last day of the week.
|
|
@@ -585,7 +593,7 @@ class Gt {
|
|
|
585
593
|
* Возвращает последний день недели.
|
|
586
594
|
*/
|
|
587
595
|
getMaxDay() {
|
|
588
|
-
return
|
|
596
|
+
return u(() => this.date.value && this.datetime.getMaxDay());
|
|
589
597
|
}
|
|
590
598
|
/**
|
|
591
599
|
* Enables language-sensitive date and time formatting.
|
|
@@ -595,7 +603,7 @@ class Gt {
|
|
|
595
603
|
* @param styleOptions the representation of the month. представление месяца
|
|
596
604
|
*/
|
|
597
605
|
locale(t = this.type.value, e) {
|
|
598
|
-
return
|
|
606
|
+
return u(() => this.date.value && this.datetime.locale(t, e));
|
|
599
607
|
}
|
|
600
608
|
/**
|
|
601
609
|
* Output of standard data.
|
|
@@ -604,10 +612,45 @@ class Gt {
|
|
|
604
612
|
* @param timeZone add time zone. добавить временную зону
|
|
605
613
|
*/
|
|
606
614
|
standard(t = !0) {
|
|
607
|
-
return
|
|
615
|
+
return u(() => this.date.value && this.datetime.standard(t));
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Updates all reactive date values.
|
|
619
|
+
*
|
|
620
|
+
* Обновляет все реактивные значения даты.
|
|
621
|
+
*/
|
|
622
|
+
updateDate() {
|
|
623
|
+
return this.year.value = this.datetime.getYear(), this.month.value = this.datetime.getMonth(), this.day.value = this.datetime.getDay(), this.hour.value = this.datetime.getHour(), this.minute.value = this.datetime.getMinute(), this.second.value = this.datetime.getSecond(), this;
|
|
608
624
|
}
|
|
609
625
|
}
|
|
610
|
-
class
|
|
626
|
+
class F {
|
|
627
|
+
/**
|
|
628
|
+
* Runs a function within the global scope.
|
|
629
|
+
*
|
|
630
|
+
* Запускает функцию в глобальной области.
|
|
631
|
+
* @param fn function/ функция
|
|
632
|
+
* @returns the return value of the function/ возвращаемое значение функции
|
|
633
|
+
*/
|
|
634
|
+
static run(t) {
|
|
635
|
+
return this.getScope().run(t);
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Gets the global effect scope instance.
|
|
639
|
+
*
|
|
640
|
+
* Получает экземпляр глобальной области действия эффекта.
|
|
641
|
+
* @returns the global effect scope instance/ экземпляр глобальной области действия эффекта
|
|
642
|
+
*/
|
|
643
|
+
static getScope() {
|
|
644
|
+
return this.scope || (this.scope = st(!0)), this.scope;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Effect scope instance.
|
|
649
|
+
*
|
|
650
|
+
* Экземпляр области действия эффекта.
|
|
651
|
+
*/
|
|
652
|
+
l(F, "scope");
|
|
653
|
+
class Ae extends Dt {
|
|
611
654
|
/**
|
|
612
655
|
* Classes Constructor
|
|
613
656
|
* @param elementSelector element/ элемент
|
|
@@ -620,26 +663,26 @@ class Jt extends at {
|
|
|
620
663
|
* @param detail an event-dependent value associated with the event/ зависимое от события
|
|
621
664
|
* значение, связанное с событием
|
|
622
665
|
*/
|
|
623
|
-
constructor(t, e, i = ["click"], n, r,
|
|
624
|
-
const h =
|
|
666
|
+
constructor(t, e, i = ["click"], n, r, a) {
|
|
667
|
+
const h = D(t), c = D(e);
|
|
625
668
|
super(
|
|
626
669
|
h.value,
|
|
627
670
|
i,
|
|
628
671
|
n,
|
|
629
672
|
r,
|
|
630
|
-
|
|
631
|
-
), c.value && this.setElementControl(c.value),
|
|
673
|
+
a
|
|
674
|
+
), c.value && this.setElementControl(c.value), y(h, (o) => this.setElement(o)), y(c, (o) => this.setElementControl(o));
|
|
632
675
|
}
|
|
633
676
|
}
|
|
634
|
-
class
|
|
677
|
+
class Be {
|
|
635
678
|
/**
|
|
636
679
|
* Constructor
|
|
637
680
|
* @param code country and language code/ код страны и языка
|
|
638
681
|
*/
|
|
639
|
-
constructor(t =
|
|
682
|
+
constructor(t = R.getLocation()) {
|
|
640
683
|
l(this, "code");
|
|
641
684
|
l(this, "flag");
|
|
642
|
-
this.code =
|
|
685
|
+
this.code = D(t), this.flag = new At(this.code.value), y(this.code, (e) => this.flag.setCode(e));
|
|
643
686
|
}
|
|
644
687
|
/**
|
|
645
688
|
* Obtaining a reactive object with the country code.
|
|
@@ -656,7 +699,7 @@ class Qt {
|
|
|
656
699
|
* @param code country code/ код страны
|
|
657
700
|
*/
|
|
658
701
|
get(t = this.code.value) {
|
|
659
|
-
return
|
|
702
|
+
return u(() => this.flag.get(t));
|
|
660
703
|
}
|
|
661
704
|
/**
|
|
662
705
|
* Getting a link to the flag.
|
|
@@ -665,7 +708,7 @@ class Qt {
|
|
|
665
708
|
* @param code country code/ код страны
|
|
666
709
|
*/
|
|
667
710
|
getFlag(t = this.code.value) {
|
|
668
|
-
return
|
|
711
|
+
return u(() => {
|
|
669
712
|
var e;
|
|
670
713
|
return (e = this.flag.get(t)) == null ? void 0 : e.icon;
|
|
671
714
|
});
|
|
@@ -677,7 +720,7 @@ class Qt {
|
|
|
677
720
|
* @param codes country code/ код страны
|
|
678
721
|
*/
|
|
679
722
|
getList(t) {
|
|
680
|
-
return
|
|
723
|
+
return u(() => this.flag.getList(t));
|
|
681
724
|
}
|
|
682
725
|
/**
|
|
683
726
|
* Getting a list of countries by an array of codes in national language.
|
|
@@ -686,64 +729,71 @@ class Qt {
|
|
|
686
729
|
* @param codes country code/ код страны.
|
|
687
730
|
*/
|
|
688
731
|
getNational(t) {
|
|
689
|
-
return
|
|
732
|
+
return u(() => this.flag.getNational(t));
|
|
690
733
|
}
|
|
691
734
|
}
|
|
692
|
-
const
|
|
735
|
+
const I = class I {
|
|
693
736
|
/**
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
737
|
+
* Information about the current country.
|
|
738
|
+
*
|
|
739
|
+
* Информация об текущей стране.
|
|
740
|
+
* @returns reactive object with full geographic information/ реактивный объект с полной географической информацией
|
|
741
|
+
*/
|
|
698
742
|
static get() {
|
|
699
743
|
return this.item;
|
|
700
744
|
}
|
|
701
745
|
/**
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
746
|
+
* Current country.
|
|
747
|
+
*
|
|
748
|
+
* Текущая страна.
|
|
749
|
+
* @returns reactive string with the current country code/ реактивная строка с кодом текущей страны
|
|
750
|
+
*/
|
|
706
751
|
static getCountry() {
|
|
707
752
|
return this.country;
|
|
708
753
|
}
|
|
709
754
|
/**
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
755
|
+
* Current language.
|
|
756
|
+
*
|
|
757
|
+
* Текущий язык.
|
|
758
|
+
* @returns reactive string with the current language code/ реактивная строка с кодом текущего языка
|
|
759
|
+
*/
|
|
714
760
|
static getLanguage() {
|
|
715
761
|
return this.language;
|
|
716
762
|
}
|
|
717
763
|
/**
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
764
|
+
* Full format according to the standard.
|
|
765
|
+
*
|
|
766
|
+
* Полный формат согласно стандарту.
|
|
767
|
+
* @returns reactive string with the full standard locale format/
|
|
768
|
+
* реактивная строка с полным форматом стандарта локали
|
|
769
|
+
*/
|
|
722
770
|
static getStandard() {
|
|
723
771
|
return this.standard;
|
|
724
772
|
}
|
|
725
773
|
/**
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
774
|
+
* Returns the first day of the week.
|
|
775
|
+
*
|
|
776
|
+
* Возвращает первый день недели.
|
|
777
|
+
* @returns reactive string representing the first day of the week/
|
|
778
|
+
* реактивная строка, представляющая первый день недели
|
|
779
|
+
*/
|
|
730
780
|
static getFirstDay() {
|
|
731
781
|
return this.firstDay;
|
|
732
782
|
}
|
|
733
783
|
/**
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
784
|
+
* Changes the data by the full code.
|
|
785
|
+
*
|
|
786
|
+
* Изменяет данные по полному коду.
|
|
787
|
+
* @param code country code, full form language-country or one of them/
|
|
788
|
+
* код страны, полный вид язык-страна или один из них
|
|
789
|
+
*/
|
|
740
790
|
static set(t) {
|
|
741
|
-
|
|
791
|
+
R.set(t, !0), this.item.value = R.getItem();
|
|
742
792
|
}
|
|
743
793
|
};
|
|
744
|
-
l(
|
|
745
|
-
let
|
|
746
|
-
class
|
|
794
|
+
l(I, "item", N(R.get())), l(I, "country", u(() => I.item.value.country)), l(I, "language", u(() => I.item.value.language)), l(I, "standard", u(() => I.item.value.standard)), l(I, "firstDay", u(() => I.item.value.firstDay));
|
|
795
|
+
let P = I;
|
|
796
|
+
class ee {
|
|
747
797
|
/**
|
|
748
798
|
* Constructor
|
|
749
799
|
* @param code country code, full form language-country or one of them/
|
|
@@ -752,9 +802,9 @@ class Rt {
|
|
|
752
802
|
constructor(t) {
|
|
753
803
|
l(this, "location");
|
|
754
804
|
l(this, "intl");
|
|
755
|
-
this.location =
|
|
805
|
+
this.location = D(t), this.intl = u(() => {
|
|
756
806
|
var e;
|
|
757
|
-
return new
|
|
807
|
+
return new Bt((e = this.location.value) != null ? e : P.getLanguage().value);
|
|
758
808
|
});
|
|
759
809
|
}
|
|
760
810
|
/**
|
|
@@ -766,7 +816,7 @@ class Rt {
|
|
|
766
816
|
* объект с некоторыми или всеми из следующих свойств
|
|
767
817
|
*/
|
|
768
818
|
display(t, e) {
|
|
769
|
-
return
|
|
819
|
+
return u(() => this.intl.value.display(g(t), e));
|
|
770
820
|
}
|
|
771
821
|
/**
|
|
772
822
|
* Get display names of language.
|
|
@@ -776,7 +826,7 @@ class Rt {
|
|
|
776
826
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
777
827
|
*/
|
|
778
828
|
languageName(t, e) {
|
|
779
|
-
return
|
|
829
|
+
return u(() => this.intl.value.languageName(g(t), e));
|
|
780
830
|
}
|
|
781
831
|
/**
|
|
782
832
|
* Get display names of region.
|
|
@@ -786,7 +836,7 @@ class Rt {
|
|
|
786
836
|
* @param style the formatting style to use/ используемый стиль форматирования
|
|
787
837
|
*/
|
|
788
838
|
countryName(t, e) {
|
|
789
|
-
return
|
|
839
|
+
return u(() => this.intl.value.countryName(g(t), e));
|
|
790
840
|
}
|
|
791
841
|
/**
|
|
792
842
|
* In basic use without specifying a locale, a formatted string.
|
|
@@ -798,7 +848,7 @@ class Rt {
|
|
|
798
848
|
* или всеми свойствами
|
|
799
849
|
*/
|
|
800
850
|
number(t, e) {
|
|
801
|
-
return
|
|
851
|
+
return u(() => this.intl.value.number(g(t), e));
|
|
802
852
|
}
|
|
803
853
|
/**
|
|
804
854
|
* Decimal point symbol.
|
|
@@ -806,7 +856,7 @@ class Rt {
|
|
|
806
856
|
* Символ десятичной точки.
|
|
807
857
|
*/
|
|
808
858
|
decimal() {
|
|
809
|
-
return
|
|
859
|
+
return u(() => this.intl.value.decimal());
|
|
810
860
|
}
|
|
811
861
|
/**
|
|
812
862
|
* Currency formatting.
|
|
@@ -818,14 +868,26 @@ class Rt {
|
|
|
818
868
|
* @param numberOnly do not display the currency symbol/ не выводить значок валюты
|
|
819
869
|
*/
|
|
820
870
|
currency(t, e, i = !1) {
|
|
821
|
-
return
|
|
871
|
+
return u(
|
|
822
872
|
() => this.intl.value.currency(
|
|
823
|
-
|
|
824
|
-
|
|
873
|
+
g(t),
|
|
874
|
+
g(e),
|
|
825
875
|
i
|
|
826
876
|
)
|
|
827
877
|
);
|
|
828
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* Returns the currency symbol if it exists, otherwise the currency code.
|
|
881
|
+
*
|
|
882
|
+
* Возвращает символ для валюты, если он есть, или сам код валюты.
|
|
883
|
+
* @param currency the currency to use in currency formatting/
|
|
884
|
+
* валюта для использования в форматировании валюты
|
|
885
|
+
* @param currencyDisplay how to display the currency in currency formatting/
|
|
886
|
+
* как отобразить валюту в формате валюты
|
|
887
|
+
*/
|
|
888
|
+
currencySymbol(t, e = "symbol") {
|
|
889
|
+
return u(() => this.intl.value.currencySymbol(g(t), e));
|
|
890
|
+
}
|
|
829
891
|
/**
|
|
830
892
|
* Unit formatting.
|
|
831
893
|
* If the style is 'unit', a unit property must be provided.
|
|
@@ -836,7 +898,16 @@ class Rt {
|
|
|
836
898
|
* в форматировании блока
|
|
837
899
|
*/
|
|
838
900
|
unit(t, e) {
|
|
839
|
-
return
|
|
901
|
+
return u(() => this.intl.value.unit(g(t), e));
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Возвращает отформатированный размер файла
|
|
905
|
+
* @param value a number, bigint, or string, to format /<br>число для форматирования
|
|
906
|
+
* @param unitOptions the unit to use in unit formatting /<br>блок для использования
|
|
907
|
+
* в форматировании блока
|
|
908
|
+
*/
|
|
909
|
+
sizeFile(t, e = "byte") {
|
|
910
|
+
return u(() => this.intl.value.sizeFile(g(t), e));
|
|
840
911
|
}
|
|
841
912
|
/**
|
|
842
913
|
* Number as a percentage.
|
|
@@ -846,7 +917,7 @@ class Rt {
|
|
|
846
917
|
* @param options an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
847
918
|
*/
|
|
848
919
|
percent(t, e) {
|
|
849
|
-
return
|
|
920
|
+
return u(() => this.intl.value.percent(g(t), e));
|
|
850
921
|
}
|
|
851
922
|
/**
|
|
852
923
|
* Number as a percentage (unit).
|
|
@@ -857,7 +928,18 @@ class Rt {
|
|
|
857
928
|
* объект с некоторыми или всеми свойствами
|
|
858
929
|
*/
|
|
859
930
|
percentBy100(t, e) {
|
|
860
|
-
return
|
|
931
|
+
return u(() => this.intl.value.percentBy100(g(t), e));
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Применять форматирование, учитывающее множественное число, и языковые правила, связанные с множественным числом
|
|
935
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
936
|
+
* @param words list of words for formatting (in the format one|two|few|many|other|zero)/
|
|
937
|
+
* список слов для форматирования (в формате `one|two|few|many|other|zero`)
|
|
938
|
+
* @param options Property for PluralRules/ свойство для PluralRules
|
|
939
|
+
* @param optionsNumber an object with some or all properties/ объект с некоторыми или всеми свойствами
|
|
940
|
+
*/
|
|
941
|
+
plural(t, e, i, n) {
|
|
942
|
+
return u(() => this.intl.value.plural(g(t), e, i, n));
|
|
861
943
|
}
|
|
862
944
|
/**
|
|
863
945
|
* Enables language-sensitive date and time formatting.
|
|
@@ -869,7 +951,7 @@ class Rt {
|
|
|
869
951
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
870
952
|
*/
|
|
871
953
|
date(t, e, i, n) {
|
|
872
|
-
return
|
|
954
|
+
return u(() => this.intl.value.date(g(t), e, i, n));
|
|
873
955
|
}
|
|
874
956
|
/**
|
|
875
957
|
* Enables language-sensitive relative time formatting.
|
|
@@ -881,7 +963,7 @@ class Rt {
|
|
|
881
963
|
* @param todayValue current day/ текущий день
|
|
882
964
|
*/
|
|
883
965
|
relative(t, e, i) {
|
|
884
|
-
return
|
|
966
|
+
return u(() => this.intl.value.relative(g(t), e, i));
|
|
885
967
|
}
|
|
886
968
|
/**
|
|
887
969
|
* Enables language-sensitive relative time formatting
|
|
@@ -901,17 +983,26 @@ class Rt {
|
|
|
901
983
|
* @param type type of data format/ тип формата data
|
|
902
984
|
* @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
|
|
903
985
|
*/
|
|
904
|
-
relativeLimit(t, e, i, n, r,
|
|
905
|
-
return
|
|
906
|
-
|
|
986
|
+
relativeLimit(t, e, i, n, r, a, h) {
|
|
987
|
+
return u(() => this.intl.value.relativeLimit(
|
|
988
|
+
g(t),
|
|
907
989
|
e,
|
|
908
990
|
i,
|
|
909
991
|
n,
|
|
910
992
|
r,
|
|
911
|
-
|
|
993
|
+
a,
|
|
912
994
|
h
|
|
913
995
|
));
|
|
914
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* Возвращает отформатированное значение времени, прошедшего с момента события
|
|
999
|
+
* @param value a number, bigint, or string, to format/ число для форматирования
|
|
1000
|
+
* @param unit time unit/ единица времени
|
|
1001
|
+
* @param styleOptions additional option or formatting style/ дополнительная опция или стиль форматирования
|
|
1002
|
+
*/
|
|
1003
|
+
relativeByValue(t, e, i) {
|
|
1004
|
+
return u(() => this.intl.value.relativeByValue(g(t), e, i));
|
|
1005
|
+
}
|
|
915
1006
|
/**
|
|
916
1007
|
* Names of months.
|
|
917
1008
|
*
|
|
@@ -920,7 +1011,7 @@ class Rt {
|
|
|
920
1011
|
* @param style the representation of the month/ представление месяца
|
|
921
1012
|
*/
|
|
922
1013
|
month(t, e) {
|
|
923
|
-
return
|
|
1014
|
+
return u(() => this.intl.value.month(g(t), e));
|
|
924
1015
|
}
|
|
925
1016
|
/**
|
|
926
1017
|
* Array to list of months.
|
|
@@ -929,7 +1020,7 @@ class Rt {
|
|
|
929
1020
|
* @param style the representation of the month/ представление месяца
|
|
930
1021
|
*/
|
|
931
1022
|
months(t) {
|
|
932
|
-
return
|
|
1023
|
+
return u(() => this.intl.value.months(t));
|
|
933
1024
|
}
|
|
934
1025
|
/**
|
|
935
1026
|
* Returns names of days of the week.
|
|
@@ -939,7 +1030,7 @@ class Rt {
|
|
|
939
1030
|
* @param style the representation of the weekday/ представление о дне недели
|
|
940
1031
|
*/
|
|
941
1032
|
weekday(t, e) {
|
|
942
|
-
return
|
|
1033
|
+
return u(() => this.intl.value.weekday(g(t), e));
|
|
943
1034
|
}
|
|
944
1035
|
/**
|
|
945
1036
|
* An array of the list of names of the days of the week.
|
|
@@ -948,7 +1039,7 @@ class Rt {
|
|
|
948
1039
|
* @param style the representation of the weekday/ представление о дне недели
|
|
949
1040
|
*/
|
|
950
1041
|
weekdays(t) {
|
|
951
|
-
return
|
|
1042
|
+
return u(() => this.intl.value.weekdays(t));
|
|
952
1043
|
}
|
|
953
1044
|
/**
|
|
954
1045
|
* Time.
|
|
@@ -957,10 +1048,20 @@ class Rt {
|
|
|
957
1048
|
* @param value the date to format/ дата для форматирования
|
|
958
1049
|
*/
|
|
959
1050
|
time(t) {
|
|
960
|
-
return
|
|
1051
|
+
return u(() => this.intl.value.time(g(t)));
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Sorts strings taking into account the characteristics of countries.
|
|
1055
|
+
*
|
|
1056
|
+
* Сортирует строки с учетом особенностей стран.
|
|
1057
|
+
* @param data an array with data/ массив с данными
|
|
1058
|
+
* @param compareFn a function for sorting/ функция для сортировки
|
|
1059
|
+
*/
|
|
1060
|
+
sort(t, e = (i, n) => [i, n]) {
|
|
1061
|
+
return u(() => this.intl.value.sort([...g(t)], e));
|
|
961
1062
|
}
|
|
962
1063
|
}
|
|
963
|
-
class
|
|
1064
|
+
class pt {
|
|
964
1065
|
/**
|
|
965
1066
|
* Creates an instance of ListData for managing list data.
|
|
966
1067
|
*
|
|
@@ -978,16 +1079,17 @@ class Z {
|
|
|
978
1079
|
* @param max Maximum number of selections / максимальное количество выделений
|
|
979
1080
|
* @param parent Parent identifier / идентификатор родителя
|
|
980
1081
|
*/
|
|
981
|
-
constructor(t, e, i, n, r,
|
|
1082
|
+
constructor(t, e, i, n, r, a, h, c, o, m = 0, S = 9999999, d) {
|
|
982
1083
|
l(this, "subList", {});
|
|
983
1084
|
/**
|
|
984
1085
|
* Returns a list for forming a list.
|
|
985
1086
|
*
|
|
986
1087
|
* Возвращает список для формирования списка.
|
|
1088
|
+
* @returns reactive list of items/ реактивный список элементов
|
|
987
1089
|
*/
|
|
988
|
-
l(this, "data",
|
|
989
|
-
() =>
|
|
990
|
-
|
|
1090
|
+
l(this, "data", u(
|
|
1091
|
+
() => E(
|
|
1092
|
+
g(this.list) || [],
|
|
991
1093
|
(t, e) => this.initItem(e, t)
|
|
992
1094
|
)
|
|
993
1095
|
));
|
|
@@ -995,8 +1097,9 @@ class Z {
|
|
|
995
1097
|
* Returns a simplified list for quick loading.
|
|
996
1098
|
*
|
|
997
1099
|
* Возвращает упрощенный список для быстрой загрузки.
|
|
1100
|
+
* @returns simplified reactive list/ упрощенный реактивный список
|
|
998
1101
|
*/
|
|
999
|
-
l(this, "liteData",
|
|
1102
|
+
l(this, "liteData", u(() => {
|
|
1000
1103
|
if (this.isLite()) {
|
|
1001
1104
|
const t = [];
|
|
1002
1105
|
for (const e of this.data.value) {
|
|
@@ -1015,22 +1118,23 @@ class Z {
|
|
|
1015
1118
|
return this.data.value;
|
|
1016
1119
|
}));
|
|
1017
1120
|
/**
|
|
1018
|
-
* Returns a list of records with all additional data.
|
|
1121
|
+
* Returns a list of records with all additional data (focus, selection, disabled status).
|
|
1019
1122
|
*
|
|
1020
|
-
* Возвращает список записей со всеми дополнительными
|
|
1123
|
+
* Возвращает список записей со всеми дополнительными данными (фокус, выделение, статус активности).
|
|
1124
|
+
* @returns full reactive list/ полный реактивный список
|
|
1021
1125
|
*/
|
|
1022
|
-
l(this, "fullData",
|
|
1126
|
+
l(this, "fullData", u(() => {
|
|
1023
1127
|
const t = this.getFocus(), e = this.getHighlight(), i = this.getSelected();
|
|
1024
|
-
return
|
|
1128
|
+
return E(
|
|
1025
1129
|
this.data.value,
|
|
1026
1130
|
(n) => {
|
|
1027
|
-
var
|
|
1028
|
-
const r =
|
|
1131
|
+
var a, h;
|
|
1132
|
+
const r = T(n.index, i);
|
|
1029
1133
|
return {
|
|
1030
1134
|
...n,
|
|
1031
1135
|
focus: t === n.index,
|
|
1032
1136
|
highlight: e,
|
|
1033
|
-
filterMode: (
|
|
1137
|
+
filterMode: (a = this.filterMode) == null ? void 0 : a.value,
|
|
1034
1138
|
selected: r,
|
|
1035
1139
|
disabled: (h = n.disabled) != null ? h : !r && n.type === "item" && this.isSelectedMax.value
|
|
1036
1140
|
};
|
|
@@ -1038,11 +1142,12 @@ class Z {
|
|
|
1038
1142
|
);
|
|
1039
1143
|
}));
|
|
1040
1144
|
/**
|
|
1041
|
-
* Returns a map of all entries.
|
|
1145
|
+
* Returns a flat map of all entries including sublists.
|
|
1042
1146
|
*
|
|
1043
|
-
* Возвращает карту всех
|
|
1147
|
+
* Возвращает плоскую карту всех записей, включая подсписки.
|
|
1148
|
+
* @returns reactive flat list/ реактивный плоский список
|
|
1044
1149
|
*/
|
|
1045
|
-
l(this, "map",
|
|
1150
|
+
l(this, "map", u(() => {
|
|
1046
1151
|
const t = [];
|
|
1047
1152
|
return this.data.value.forEach((e) => {
|
|
1048
1153
|
switch (e.type) {
|
|
@@ -1060,29 +1165,31 @@ class Z {
|
|
|
1060
1165
|
}), t;
|
|
1061
1166
|
}));
|
|
1062
1167
|
/** Returns a list consisting only of items/ Возвращает список, состоящий только из элементов. */
|
|
1063
|
-
l(this, "mapItems",
|
|
1168
|
+
l(this, "mapItems", u(() => this.map.value.filter((t) => t.type === "item")));
|
|
1064
1169
|
/**
|
|
1065
|
-
* Returns a list consisting only of values for selection.
|
|
1170
|
+
* Returns a list consisting only of values for selection (item, group, menu).
|
|
1066
1171
|
*
|
|
1067
|
-
* Возвращает список, состоящий только из значений для
|
|
1172
|
+
* Возвращает список, состоящий только из значений для выбора (item, group, menu).
|
|
1173
|
+
* @returns reactive list/ реактивный список
|
|
1068
1174
|
*/
|
|
1069
|
-
l(this, "items",
|
|
1175
|
+
l(this, "items", u(() => this.map.value.filter(
|
|
1070
1176
|
(t) => t.type === "item" || t.type === "group" || t.type === "menu"
|
|
1071
1177
|
)));
|
|
1072
1178
|
/**
|
|
1073
1179
|
* Finds the first element that meets the search conditions.
|
|
1074
1180
|
*
|
|
1075
1181
|
* Находит первый элемент, соответствующий условиям поиска.
|
|
1182
|
+
* @returns first found index/ первый найденный индекс
|
|
1076
1183
|
*/
|
|
1077
|
-
l(this, "highlightFirstItem",
|
|
1184
|
+
l(this, "highlightFirstItem", u(() => {
|
|
1078
1185
|
const t = this.getHighlight();
|
|
1079
1186
|
if (t && t.length >= this.getHighlightLengthStart()) {
|
|
1080
|
-
const e =
|
|
1187
|
+
const e = Mt(t, "i");
|
|
1081
1188
|
if (e)
|
|
1082
1189
|
return this.map.value.findIndex(
|
|
1083
1190
|
(i) => {
|
|
1084
|
-
var n, r,
|
|
1085
|
-
return ((n = i.label) == null ? void 0 : n.toString().match(e)) || ((r = i.index) == null ? void 0 : r.toString().match(e)) || ((
|
|
1191
|
+
var n, r, a;
|
|
1192
|
+
return ((n = i.label) == null ? void 0 : n.toString().match(e)) || ((r = i.index) == null ? void 0 : r.toString().match(e)) || ((a = i.search) == null ? void 0 : a.toString().match(e));
|
|
1086
1193
|
}
|
|
1087
1194
|
);
|
|
1088
1195
|
}
|
|
@@ -1092,50 +1199,67 @@ class Z {
|
|
|
1092
1199
|
* Is there a selected item.
|
|
1093
1200
|
*
|
|
1094
1201
|
* Есть ли выбранный элемент.
|
|
1202
|
+
* @returns true if selection exists/ true, если есть выбор
|
|
1095
1203
|
*/
|
|
1096
|
-
l(this, "isSelected",
|
|
1204
|
+
l(this, "isSelected", u(() => {
|
|
1097
1205
|
const t = this.getSelected();
|
|
1098
|
-
return !!t && this.mapItems.value.findIndex((e) =>
|
|
1206
|
+
return !!t && this.mapItems.value.findIndex((e) => T(e.index, t)) !== -1;
|
|
1099
1207
|
}));
|
|
1100
|
-
/**
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1208
|
+
/**
|
|
1209
|
+
* Is the minimum selection reached.
|
|
1210
|
+
*
|
|
1211
|
+
* Достигнуто ли минимальное выделение.
|
|
1212
|
+
* @returns true if minimum reached/ true, если минимум достигнут
|
|
1213
|
+
*/
|
|
1214
|
+
l(this, "isSelectedMin", u(() => {
|
|
1215
|
+
const t = Number(g(this.min) || 0);
|
|
1216
|
+
return t > 0 ? this.selectedListInGroup.value.length >= t : !1;
|
|
1104
1217
|
}));
|
|
1105
|
-
/**
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1218
|
+
/**
|
|
1219
|
+
* Is the maximum selection reached.
|
|
1220
|
+
*
|
|
1221
|
+
* Достигнуто ли максимальное выделение.
|
|
1222
|
+
* @returns true if maximum reached/ true, если максимум достигнут
|
|
1223
|
+
*/
|
|
1224
|
+
l(this, "isSelectedMax", u(() => {
|
|
1225
|
+
const t = Number(g(this.max) || 9999999);
|
|
1226
|
+
return t > 0 ? this.selectedListInGroup.value.length >= t : !1;
|
|
1109
1227
|
}));
|
|
1110
1228
|
/**
|
|
1111
|
-
* Returns a list of selected items on the map
|
|
1112
|
-
*
|
|
1229
|
+
* Returns a list of selected items on the map.
|
|
1230
|
+
*
|
|
1231
|
+
* Возвращает список выделенных элементов на карте.
|
|
1232
|
+
* @returns reactive list of selected items/ реактивный список выделенных элементов
|
|
1113
1233
|
*/
|
|
1114
|
-
l(this, "selectedList",
|
|
1234
|
+
l(this, "selectedList", u(() => {
|
|
1115
1235
|
const t = this.getSelected();
|
|
1116
|
-
return t && this.isSelected.value ? this.mapItems.value.filter((e) =>
|
|
1236
|
+
return t && this.isSelected.value ? this.mapItems.value.filter((e) => T(e.index, t)) : [];
|
|
1117
1237
|
}));
|
|
1118
1238
|
/**
|
|
1119
|
-
* Returns a list of selected items in the current group
|
|
1120
|
-
*
|
|
1239
|
+
* Returns a list of selected items in the current group.
|
|
1240
|
+
*
|
|
1241
|
+
* Возвращает список выделенных элементов в текущей группе.
|
|
1242
|
+
* @returns reactive list of selected items in group/ реактивный список выделенных элементов в группе
|
|
1121
1243
|
*/
|
|
1122
|
-
l(this, "selectedListInGroup",
|
|
1244
|
+
l(this, "selectedListInGroup", u(() => {
|
|
1123
1245
|
const t = this.getSelected();
|
|
1124
|
-
return t && this.isSelected.value ? this.data.value.filter((e) =>
|
|
1246
|
+
return t && this.isSelected.value ? this.data.value.filter((e) => T(e.index, t)) : [];
|
|
1125
1247
|
}));
|
|
1126
1248
|
/**
|
|
1127
|
-
* Returns a list of selected
|
|
1249
|
+
* Returns a list of selected labels on the map.
|
|
1128
1250
|
*
|
|
1129
|
-
* Возвращает список выделенных элементов на карте.
|
|
1251
|
+
* Возвращает список названий выделенных элементов на карте.
|
|
1252
|
+
* @returns reactive list of labels/ реактивный список названий
|
|
1130
1253
|
*/
|
|
1131
|
-
l(this, "selectedNames",
|
|
1254
|
+
l(this, "selectedNames", u(() => lt(this.selectedList.value, "label")));
|
|
1132
1255
|
/**
|
|
1133
|
-
* Returns a list of selected
|
|
1256
|
+
* Returns a list of selected values on the map.
|
|
1134
1257
|
*
|
|
1135
1258
|
* Возвращает список значений выделенных элементов на карте.
|
|
1259
|
+
* @returns reactive list of values/ реактивный список значений
|
|
1136
1260
|
*/
|
|
1137
|
-
l(this, "selectedValues",
|
|
1138
|
-
this.list = t, this.focus = e, this.highlight = i, this.highlightLengthStart = n, this.filterMode = r, this.selected =
|
|
1261
|
+
l(this, "selectedValues", u(() => lt(this.selectedList.value, "value")));
|
|
1262
|
+
this.list = t, this.focus = e, this.highlight = i, this.highlightLengthStart = n, this.filterMode = r, this.selected = a, this.keyValue = h, this.keyLabel = c, this.lite = o, this.min = m, this.max = S, this.parent = d, V(t) && y(t, () => {
|
|
1139
1263
|
this.subList = {};
|
|
1140
1264
|
});
|
|
1141
1265
|
}
|
|
@@ -1143,6 +1267,7 @@ class Z {
|
|
|
1143
1267
|
* Checks whether it is necessary to first display a simplified version.
|
|
1144
1268
|
*
|
|
1145
1269
|
* Проверяет, надо ли сначала вывести упрощенную версию.
|
|
1270
|
+
* @returns true if lite mode is active/ true, если активен облегченный режим
|
|
1146
1271
|
*/
|
|
1147
1272
|
isLite() {
|
|
1148
1273
|
var t;
|
|
@@ -1152,65 +1277,73 @@ class Z {
|
|
|
1152
1277
|
* Checks if an element is in focus.
|
|
1153
1278
|
*
|
|
1154
1279
|
* Проверяет, есть ли элемент в фокусе.
|
|
1280
|
+
* @returns true if focus exists/ true, если есть фокус
|
|
1155
1281
|
*/
|
|
1156
1282
|
isFocus() {
|
|
1157
1283
|
const t = this.getFocus();
|
|
1158
1284
|
return !!(t && this.map.value.findIndex((e) => e.index === t) !== -1);
|
|
1159
1285
|
}
|
|
1160
1286
|
/**
|
|
1161
|
-
* Checks if there is a
|
|
1287
|
+
* Checks if there is a highlighted item (search results).
|
|
1162
1288
|
*
|
|
1163
|
-
* Проверяет, есть ли
|
|
1289
|
+
* Проверяет, есть ли найденный элемент (результаты поиска).
|
|
1290
|
+
* @returns true if highlight exists/ true, если есть совпадения
|
|
1164
1291
|
*/
|
|
1165
1292
|
isHighlight() {
|
|
1166
1293
|
return this.highlightFirstItem.value !== -1;
|
|
1167
1294
|
}
|
|
1168
1295
|
/**
|
|
1169
|
-
* Checks if highlighting is active.
|
|
1296
|
+
* Checks if highlighting is active (minimum length reached).
|
|
1170
1297
|
*
|
|
1171
|
-
* Проверяет, активно ли
|
|
1298
|
+
* Проверяет, активно ли выделение (достигнута минимальная длина).
|
|
1299
|
+
* @returns true if active/ true, если активно
|
|
1172
1300
|
*/
|
|
1173
1301
|
isHighlightActive() {
|
|
1174
1302
|
var t, e;
|
|
1175
1303
|
return ((e = (t = this.getHighlight()) == null ? void 0 : t.length) != null ? e : 0) < this.getHighlightLengthStart() || this.isHighlight();
|
|
1176
1304
|
}
|
|
1177
1305
|
/**
|
|
1178
|
-
* Returns the number of records.
|
|
1306
|
+
* Returns the number of records in the current list.
|
|
1179
1307
|
*
|
|
1180
|
-
* Возвращает количество
|
|
1308
|
+
* Возвращает количество записей в текущем списке.
|
|
1309
|
+
* @returns length/ количество
|
|
1181
1310
|
*/
|
|
1182
1311
|
getLength() {
|
|
1183
1312
|
return this.data.value.length;
|
|
1184
1313
|
}
|
|
1185
1314
|
/**
|
|
1186
|
-
* Returns the number of all available records.
|
|
1315
|
+
* Returns the number of all available records in the map.
|
|
1187
1316
|
*
|
|
1188
|
-
* Возвращает количество всех доступных
|
|
1317
|
+
* Возвращает количество всех доступных записей в карте.
|
|
1318
|
+
* @returns length/ количество
|
|
1189
1319
|
*/
|
|
1190
1320
|
getLengthByMap() {
|
|
1191
1321
|
return this.map.value.length;
|
|
1192
1322
|
}
|
|
1193
1323
|
/**
|
|
1194
|
-
* Returns the number of all available records.
|
|
1324
|
+
* Returns the number of all available records (items).
|
|
1195
1325
|
*
|
|
1196
|
-
* Возвращает количество всех доступных
|
|
1326
|
+
* Возвращает количество всех доступных записей (элементы).
|
|
1327
|
+
* @returns length/ количество
|
|
1197
1328
|
*/
|
|
1198
1329
|
getLengthByItems() {
|
|
1199
1330
|
return this.items.value.length;
|
|
1200
1331
|
}
|
|
1201
1332
|
/**
|
|
1202
|
-
* Returns the
|
|
1333
|
+
* Returns the identifier in focus.
|
|
1203
1334
|
*
|
|
1204
|
-
* Возвращает
|
|
1335
|
+
* Возвращает идентификатор в фокусе.
|
|
1336
|
+
* @returns focus identifier/ идентификатор в фокусе
|
|
1205
1337
|
*/
|
|
1206
1338
|
getFocus() {
|
|
1207
1339
|
var t;
|
|
1208
1340
|
return (t = this.focus) == null ? void 0 : t.value;
|
|
1209
1341
|
}
|
|
1210
1342
|
/**
|
|
1211
|
-
* Returns the
|
|
1343
|
+
* Returns the highlight text.
|
|
1212
1344
|
*
|
|
1213
|
-
* Возвращает
|
|
1345
|
+
* Возвращает текст для выделения.
|
|
1346
|
+
* @returns text/ текст
|
|
1214
1347
|
*/
|
|
1215
1348
|
getHighlight() {
|
|
1216
1349
|
var t;
|
|
@@ -1220,15 +1353,17 @@ class Z {
|
|
|
1220
1353
|
* Returns the minimum length for highlight to start.
|
|
1221
1354
|
*
|
|
1222
1355
|
* Возвращает минимальную длину для начала выделения.
|
|
1356
|
+
* @returns length/ длина
|
|
1223
1357
|
*/
|
|
1224
1358
|
getHighlightLengthStart() {
|
|
1225
1359
|
var t, e;
|
|
1226
1360
|
return (e = (t = this.highlightLengthStart) == null ? void 0 : t.value) != null ? e : 2;
|
|
1227
1361
|
}
|
|
1228
1362
|
/**
|
|
1229
|
-
* Returns the selected
|
|
1363
|
+
* Returns the selected identifiers list.
|
|
1230
1364
|
*
|
|
1231
|
-
* Возвращает
|
|
1365
|
+
* Возвращает список выбранных идентификаторов.
|
|
1366
|
+
* @returns list/ список
|
|
1232
1367
|
*/
|
|
1233
1368
|
getSelected() {
|
|
1234
1369
|
var t;
|
|
@@ -1239,25 +1374,110 @@ class Z {
|
|
|
1239
1374
|
*
|
|
1240
1375
|
* Возвращает элемент, перемещаясь на определенное количество шагов от выбранного элемента.
|
|
1241
1376
|
* @param step number of steps/ количество шагов
|
|
1377
|
+
* @returns target item index/ индекс целевого элемента
|
|
1242
1378
|
*/
|
|
1243
1379
|
getSelectedByStep(t) {
|
|
1244
|
-
var
|
|
1245
|
-
const e = (
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1380
|
+
var i, n, r;
|
|
1381
|
+
const e = (i = this.selectedList.value) == null ? void 0 : i[0];
|
|
1382
|
+
return e ? (n = this.getItemByStep(e, t)) == null ? void 0 : n.index : (r = this.mapItems.value[0]) == null ? void 0 : r.index;
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Returns the next item from the selected one.
|
|
1386
|
+
*
|
|
1387
|
+
* Возвращает следующий элемент от выбранного.
|
|
1388
|
+
* @returns next item index/ индекс следующего элемента
|
|
1389
|
+
*/
|
|
1390
|
+
getSelectedNext() {
|
|
1391
|
+
return this.getSelectedByStep(1);
|
|
1392
|
+
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Returns the previous item from the selected one.
|
|
1395
|
+
*
|
|
1396
|
+
* Возвращает предыдущий элемент от выбранного.
|
|
1397
|
+
* @returns previous item index/ индекс предыдущего элемента
|
|
1398
|
+
*/
|
|
1399
|
+
getSelectedPrev() {
|
|
1400
|
+
return this.getSelectedByStep(-1);
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* Returns an item by moving a certain number of steps from the specified item.
|
|
1404
|
+
*
|
|
1405
|
+
* Возвращает элемент, перемещаясь на определенное количество шагов от указанного элемента.
|
|
1406
|
+
* @param item item/ элемент
|
|
1407
|
+
* @param step number of steps/ количество шагов
|
|
1408
|
+
* @returns target item/ целевой элемент
|
|
1409
|
+
*/
|
|
1410
|
+
getItemByStep(t, e) {
|
|
1411
|
+
const i = this.mapItems.value, n = i.findIndex((r) => r.index === t.index);
|
|
1412
|
+
if (n !== -1) {
|
|
1413
|
+
const r = n + e;
|
|
1414
|
+
if (r in i)
|
|
1415
|
+
return i[r];
|
|
1416
|
+
}
|
|
1417
|
+
if (e > 0)
|
|
1418
|
+
return i[0];
|
|
1419
|
+
if (e < 0)
|
|
1420
|
+
return i[i.length - 1];
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Returns the next item from the specified one.
|
|
1424
|
+
*
|
|
1425
|
+
* Возвращает следующий элемент от указанного.
|
|
1426
|
+
* @param item item/ элемент
|
|
1427
|
+
* @returns next item/ следующий элемент
|
|
1428
|
+
*/
|
|
1429
|
+
getItemNext(t) {
|
|
1430
|
+
return this.getItemByStep(t, 1);
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Returns the previous item from the specified one.
|
|
1434
|
+
*
|
|
1435
|
+
* Возвращает предыдущий элемент от указанного.
|
|
1436
|
+
* @param item item/ элемент
|
|
1437
|
+
* @returns previous item/ предыдущий элемент
|
|
1438
|
+
*/
|
|
1439
|
+
getItemPrev(t) {
|
|
1440
|
+
return this.getItemByStep(t, -1);
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Returns an item by moving a certain number of steps from the specified index.
|
|
1444
|
+
*
|
|
1445
|
+
* Возвращает элемент, перемещаясь на определенное количество шагов от указанного индекса.
|
|
1446
|
+
* @param index item index/ индекс элемента
|
|
1447
|
+
* @param step number of steps/ количество шагов
|
|
1448
|
+
* @returns target item/ целевой элемент
|
|
1449
|
+
*/
|
|
1450
|
+
getIndexByStep(t, e) {
|
|
1451
|
+
const i = this.getItemByIndex(t);
|
|
1452
|
+
if (i)
|
|
1453
|
+
return this.getItemByStep(i.item, e);
|
|
1454
|
+
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Returns the next item from the specified index.
|
|
1457
|
+
*
|
|
1458
|
+
* Возвращает следующий элемент от указанного индекса.
|
|
1459
|
+
* @param index item index/ индекс элемента
|
|
1460
|
+
* @returns next item/ следующий элемент
|
|
1461
|
+
*/
|
|
1462
|
+
getIndexNext(t) {
|
|
1463
|
+
return this.getIndexByStep(t, 1);
|
|
1464
|
+
}
|
|
1465
|
+
/**
|
|
1466
|
+
* Returns the previous item from the specified index.
|
|
1467
|
+
*
|
|
1468
|
+
* Возвращает предыдущий элемент от указанного индекса.
|
|
1469
|
+
* @param index item index/ индекс элемента
|
|
1470
|
+
* @returns previous item/ предыдущий элемент
|
|
1471
|
+
*/
|
|
1472
|
+
getIndexPrev(t) {
|
|
1473
|
+
return this.getIndexByStep(t, -1);
|
|
1255
1474
|
}
|
|
1256
1475
|
/**
|
|
1257
1476
|
* Returns an item by its index.
|
|
1258
1477
|
*
|
|
1259
1478
|
* Возвращает элемент по его индексу.
|
|
1260
1479
|
* @param index item index/ индекс элемента
|
|
1480
|
+
* @returns found item details/ информация о найденном элементе
|
|
1261
1481
|
*/
|
|
1262
1482
|
getItemByIndex(t) {
|
|
1263
1483
|
const e = this.map.value.findIndex((i) => i.index === t);
|
|
@@ -1272,6 +1492,7 @@ class Z {
|
|
|
1272
1492
|
*
|
|
1273
1493
|
* Возвращает элемент по его ключу.
|
|
1274
1494
|
* @param key item key/ ключ элемента
|
|
1495
|
+
* @returns found item/ найденный элемент
|
|
1275
1496
|
*/
|
|
1276
1497
|
getItemByKey(t) {
|
|
1277
1498
|
var e;
|
|
@@ -1282,6 +1503,7 @@ class Z {
|
|
|
1282
1503
|
*
|
|
1283
1504
|
* Возвращает первый элемент с указанным родителем.
|
|
1284
1505
|
* @param parent parent identifier to search for / идентификатор родителя для поиска
|
|
1506
|
+
* @returns first item/ первый элемент
|
|
1285
1507
|
*/
|
|
1286
1508
|
getFirstItemByParent(t) {
|
|
1287
1509
|
return this.map.value.find((e) => this.isInParent(t, e));
|
|
@@ -1291,6 +1513,7 @@ class Z {
|
|
|
1291
1513
|
*
|
|
1292
1514
|
* Возвращает последний элемент с указанным родителем.
|
|
1293
1515
|
* @param parent parent identifier to search for / идентификатор родителя для поиска
|
|
1516
|
+
* @returns last item/ последний элемент
|
|
1294
1517
|
*/
|
|
1295
1518
|
getLastItemByParent(t) {
|
|
1296
1519
|
return this.map.value.filter((e) => this.isInParent(t, e)).pop();
|
|
@@ -1300,9 +1523,10 @@ class Z {
|
|
|
1300
1523
|
*
|
|
1301
1524
|
* Возвращает объект подсписка для группового элемента.
|
|
1302
1525
|
* @param item List item data/ данные элемента списка
|
|
1526
|
+
* @returns sublist instance/ экземпляр подсписка
|
|
1303
1527
|
*/
|
|
1304
1528
|
getSubList(t) {
|
|
1305
|
-
return t.index in this.subList || (this.subList[t.index] = new
|
|
1529
|
+
return t.index in this.subList || (this.subList[t.index] = new pt(
|
|
1306
1530
|
t.value,
|
|
1307
1531
|
this.focus,
|
|
1308
1532
|
this.highlight,
|
|
@@ -1346,7 +1570,7 @@ class Z {
|
|
|
1346
1570
|
* @param label item label / метка элемента
|
|
1347
1571
|
*/
|
|
1348
1572
|
getIndex(t, e, i, n) {
|
|
1349
|
-
return t && !
|
|
1573
|
+
return t && !Z(t) ? t : e && !Z(e) ? e : i && n;
|
|
1350
1574
|
}
|
|
1351
1575
|
/**
|
|
1352
1576
|
* Creates an object of the record element.
|
|
@@ -1356,9 +1580,9 @@ class Z {
|
|
|
1356
1580
|
* @param item selected element/ выбранный элемент
|
|
1357
1581
|
*/
|
|
1358
1582
|
initItem(t, e) {
|
|
1359
|
-
var i, n, r,
|
|
1360
|
-
if (
|
|
1361
|
-
const o = e == null ? void 0 : e[(n = (i = this.keyValue) == null ? void 0 : i.value) != null ? n : "value"], m = (h = e == null ? void 0 : e[(
|
|
1583
|
+
var i, n, r, a, h, c;
|
|
1584
|
+
if (j(e)) {
|
|
1585
|
+
const o = e == null ? void 0 : e[(n = (i = this.keyValue) == null ? void 0 : i.value) != null ? n : "value"], m = (h = e == null ? void 0 : e[(a = (r = this.keyLabel) == null ? void 0 : r.value) != null ? a : "label"]) != null ? h : o, S = this.getIndex(
|
|
1362
1586
|
e == null ? void 0 : e.index,
|
|
1363
1587
|
o,
|
|
1364
1588
|
t,
|
|
@@ -1367,7 +1591,7 @@ class Z {
|
|
|
1367
1591
|
return {
|
|
1368
1592
|
...e,
|
|
1369
1593
|
parent: this.parent,
|
|
1370
|
-
index:
|
|
1594
|
+
index: S,
|
|
1371
1595
|
type: (c = e == null ? void 0 : e.type) != null ? c : "item",
|
|
1372
1596
|
label: m,
|
|
1373
1597
|
value: o
|
|
@@ -1382,7 +1606,7 @@ class Z {
|
|
|
1382
1606
|
};
|
|
1383
1607
|
}
|
|
1384
1608
|
}
|
|
1385
|
-
class
|
|
1609
|
+
class St {
|
|
1386
1610
|
/**
|
|
1387
1611
|
* Get router instance.
|
|
1388
1612
|
*
|
|
@@ -1453,11 +1677,11 @@ class At {
|
|
|
1453
1677
|
* @param to raw route location/ необработанное местоположение маршрута
|
|
1454
1678
|
*/
|
|
1455
1679
|
static rawToHref(t) {
|
|
1456
|
-
return
|
|
1680
|
+
return j(t) && "name" in t && X(t == null ? void 0 : t.name) ? this.getHref(t.name) : {};
|
|
1457
1681
|
}
|
|
1458
1682
|
}
|
|
1459
|
-
l(
|
|
1460
|
-
class
|
|
1683
|
+
l(St, "router");
|
|
1684
|
+
class Me {
|
|
1461
1685
|
/**
|
|
1462
1686
|
* Constructor
|
|
1463
1687
|
*/
|
|
@@ -1473,102 +1697,463 @@ class Xt {
|
|
|
1473
1697
|
*
|
|
1474
1698
|
* Проверяет, определена ли ширина скролла.
|
|
1475
1699
|
*/
|
|
1476
|
-
l(this, "is",
|
|
1477
|
-
|
|
1700
|
+
l(this, "is", u(() => this.item.value !== void 0));
|
|
1701
|
+
Nt.is().then((t) => {
|
|
1478
1702
|
this.item.value = t;
|
|
1479
1703
|
});
|
|
1480
1704
|
}
|
|
1481
1705
|
}
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1706
|
+
const bt = (s) => typeof s == "string" ? { method: s } : s || {};
|
|
1707
|
+
function W(s, t = z.post, e, i, n = !0, r) {
|
|
1708
|
+
const a = f(!1), h = D(bt(r));
|
|
1709
|
+
return {
|
|
1710
|
+
loading: a,
|
|
1711
|
+
/**
|
|
1712
|
+
* Send request.
|
|
1713
|
+
*
|
|
1714
|
+
* Отправка запроса.
|
|
1715
|
+
* @param request Request data / Данные запроса
|
|
1716
|
+
* @returns Response data / Данные ответа
|
|
1717
|
+
*/
|
|
1718
|
+
async send(c) {
|
|
1719
|
+
a.value = !0;
|
|
1720
|
+
let o;
|
|
1721
|
+
try {
|
|
1722
|
+
if (o = await gt.request({
|
|
1723
|
+
path: g(s),
|
|
1724
|
+
method: t,
|
|
1725
|
+
request: c,
|
|
1726
|
+
toData: n,
|
|
1727
|
+
...h.value
|
|
1728
|
+
}), o && (i && (o = i(o)), e)) {
|
|
1729
|
+
const m = e(o);
|
|
1730
|
+
m instanceof Promise && await m;
|
|
1731
|
+
}
|
|
1732
|
+
} catch (m) {
|
|
1733
|
+
console.error("useApiRequest: error", g(s), m);
|
|
1734
|
+
}
|
|
1735
|
+
return a.value = !1, o;
|
|
1736
|
+
}
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
function ie(s, t, e, i = !0, n) {
|
|
1740
|
+
return W(
|
|
1741
|
+
s,
|
|
1742
|
+
z.delete,
|
|
1743
|
+
t,
|
|
1744
|
+
e,
|
|
1745
|
+
i,
|
|
1746
|
+
n
|
|
1747
|
+
);
|
|
1748
|
+
}
|
|
1749
|
+
function Ne(s, t, e, i = !0, n) {
|
|
1750
|
+
return W(
|
|
1751
|
+
s,
|
|
1752
|
+
z.get,
|
|
1753
|
+
t,
|
|
1754
|
+
e,
|
|
1755
|
+
i,
|
|
1756
|
+
n
|
|
1757
|
+
);
|
|
1758
|
+
}
|
|
1759
|
+
let O;
|
|
1760
|
+
function se(s, t, e = !0, i, n, r = !0) {
|
|
1761
|
+
const a = f(), h = D(bt(t)), c = f(!1), o = f(!1);
|
|
1762
|
+
let m, S = !0, d;
|
|
1763
|
+
const b = async () => {
|
|
1764
|
+
if (S)
|
|
1489
1765
|
return;
|
|
1490
|
-
|
|
1491
|
-
|
|
1766
|
+
m && m.abort(), m = h.value.controller || new AbortController();
|
|
1767
|
+
const v = g(s);
|
|
1768
|
+
if ((!i || i.value) && v) {
|
|
1492
1769
|
c.value = !0, o.value = !0;
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
c.value
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1770
|
+
try {
|
|
1771
|
+
const A = await gt.request({
|
|
1772
|
+
path: v,
|
|
1773
|
+
controller: m,
|
|
1774
|
+
...h.value
|
|
1775
|
+
});
|
|
1776
|
+
A && (n ? a.value = n(A) : a.value = A);
|
|
1777
|
+
} catch (A) {
|
|
1778
|
+
console.error("useApiRef: error", v, A), a.value = void 0;
|
|
1779
|
+
}
|
|
1780
|
+
c.value = !1;
|
|
1781
|
+
} else a.value !== void 0 && (a.value = void 0);
|
|
1782
|
+
}, B = () => {
|
|
1783
|
+
console.warn("useApiRef: stop", g(s)), d == null || d(), a.value = void 0, S = !0;
|
|
1784
|
+
}, L = () => {
|
|
1785
|
+
S && (S = !1, b().then(), r ? (p(), Ut() && _t(() => B())) : F.run(() => p()));
|
|
1786
|
+
}, p = () => {
|
|
1787
|
+
const v = [];
|
|
1788
|
+
e && v.push(h), V(s) && v.push(s), i && v.push(i), O && v.push(O), v.length > 0 && (d = y(v, async () => {
|
|
1789
|
+
c.value || await b();
|
|
1790
|
+
}));
|
|
1791
|
+
}, w = u(() => (L(), a.value)), x = u(() => Array.isArray(a.value) ? a.value.length : a.value ? 1 : 0), C = u(() => a.value === void 0);
|
|
1506
1792
|
return {
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1793
|
+
/** Reactive data (Computed) / Реактивные данные (Computed) */
|
|
1794
|
+
data: w,
|
|
1795
|
+
/** Item (Ref) / Элемент (Ref) */
|
|
1796
|
+
get item() {
|
|
1797
|
+
return L(), a;
|
|
1511
1798
|
},
|
|
1512
|
-
|
|
1513
|
-
|
|
1799
|
+
/**
|
|
1800
|
+
* Returns the count of records in the list (ComputedRef) /
|
|
1801
|
+
* Возвращает количество записей в списке (ComputedRef)
|
|
1802
|
+
*/
|
|
1803
|
+
length: x,
|
|
1804
|
+
/** Start request flag (true if no data yet) / Флаг начала запроса (true если еще нет данных) */
|
|
1805
|
+
starting: C,
|
|
1806
|
+
/** Request load flag / Флаг загрузки запроса */
|
|
1807
|
+
loading: c,
|
|
1808
|
+
/** Active reading flag / Флаг активного чтения */
|
|
1809
|
+
reading: o,
|
|
1810
|
+
/**
|
|
1811
|
+
* Checks if the request is starting (true if no data yet)
|
|
1812
|
+
*
|
|
1813
|
+
* Проверяет, начинается ли запрос (true, если данных еще нет)
|
|
1814
|
+
*/
|
|
1815
|
+
isStarting() {
|
|
1816
|
+
return a.value === void 0;
|
|
1514
1817
|
},
|
|
1515
|
-
|
|
1516
|
-
|
|
1818
|
+
/**
|
|
1819
|
+
* Checks if the request is currently loading.
|
|
1820
|
+
*
|
|
1821
|
+
* Проверяет, загружается ли запрос в данный момент.
|
|
1822
|
+
*/
|
|
1823
|
+
isLoading() {
|
|
1824
|
+
return c.value;
|
|
1517
1825
|
},
|
|
1518
|
-
|
|
1519
|
-
|
|
1826
|
+
/**
|
|
1827
|
+
* Checks if the request is currently reading.
|
|
1828
|
+
*
|
|
1829
|
+
* Проверяет, читается ли запрос в данный момент.
|
|
1830
|
+
*/
|
|
1831
|
+
isReading() {
|
|
1832
|
+
return o.value;
|
|
1520
1833
|
},
|
|
1521
|
-
|
|
1834
|
+
/**
|
|
1835
|
+
* Gets the current item data.
|
|
1836
|
+
*
|
|
1837
|
+
* Получает текущие данные элемента.
|
|
1838
|
+
*/
|
|
1839
|
+
getItem() {
|
|
1840
|
+
return a.value;
|
|
1841
|
+
},
|
|
1842
|
+
/**
|
|
1843
|
+
* Manual initialization
|
|
1844
|
+
*
|
|
1845
|
+
* Ручная инициализация
|
|
1846
|
+
*/
|
|
1847
|
+
init: L,
|
|
1848
|
+
/**
|
|
1849
|
+
* Default reset
|
|
1850
|
+
*
|
|
1851
|
+
* Сброс по умолчанию
|
|
1852
|
+
*/
|
|
1853
|
+
reset: b,
|
|
1854
|
+
/**
|
|
1855
|
+
* Stop request
|
|
1856
|
+
*
|
|
1857
|
+
* Остановка запроса
|
|
1858
|
+
*/
|
|
1859
|
+
stop: B,
|
|
1860
|
+
/**
|
|
1861
|
+
* Abort request
|
|
1862
|
+
*
|
|
1863
|
+
* Отмена запроса
|
|
1864
|
+
*/
|
|
1865
|
+
abort: () => m == null ? void 0 : m.abort()
|
|
1522
1866
|
};
|
|
1523
1867
|
}
|
|
1524
|
-
const
|
|
1525
|
-
|
|
1868
|
+
const Fe = (s) => {
|
|
1869
|
+
O || (O = s);
|
|
1526
1870
|
};
|
|
1527
|
-
function
|
|
1871
|
+
function ne(s, t, e, i = !0, n) {
|
|
1872
|
+
return W(
|
|
1873
|
+
s,
|
|
1874
|
+
z.post,
|
|
1875
|
+
t,
|
|
1876
|
+
e,
|
|
1877
|
+
i,
|
|
1878
|
+
n
|
|
1879
|
+
);
|
|
1880
|
+
}
|
|
1881
|
+
function re(s, t, e, i = !0, n) {
|
|
1882
|
+
return W(
|
|
1883
|
+
s,
|
|
1884
|
+
z.put,
|
|
1885
|
+
t,
|
|
1886
|
+
e,
|
|
1887
|
+
i,
|
|
1888
|
+
n
|
|
1889
|
+
);
|
|
1890
|
+
}
|
|
1891
|
+
function ae(s, t) {
|
|
1892
|
+
const e = new Ft(t), i = u(() => e.setList(s.value).to()), n = u(() => e.setList(s.value).length());
|
|
1893
|
+
return {
|
|
1894
|
+
/**
|
|
1895
|
+
* Formatted data list (ComputedRef) /
|
|
1896
|
+
* Отформатированный список данных (ComputedRef)
|
|
1897
|
+
*/
|
|
1898
|
+
listFormat: i,
|
|
1899
|
+
/**
|
|
1900
|
+
* Returns the count of records in the list (ComputedRef) /
|
|
1901
|
+
* Возвращает количество записей в списке (ComputedRef)
|
|
1902
|
+
*/
|
|
1903
|
+
length: n
|
|
1904
|
+
};
|
|
1905
|
+
}
|
|
1906
|
+
function ue(s, t) {
|
|
1907
|
+
const e = t != null ? t : f(""), i = f(e.value), n = f(!1);
|
|
1908
|
+
let r;
|
|
1909
|
+
return y(e, (a, h, c) => {
|
|
1910
|
+
const o = s.getOptions().getDelay();
|
|
1911
|
+
o ? (n.value = !0, r = setTimeout(() => {
|
|
1912
|
+
r = void 0, i.value = e.value, n.value = !1;
|
|
1913
|
+
}, o), c(() => {
|
|
1914
|
+
r && clearTimeout(r);
|
|
1915
|
+
})) : i.value = e.value;
|
|
1916
|
+
}), {
|
|
1917
|
+
/** Current search value / Текущее значение поиска */
|
|
1918
|
+
search: e,
|
|
1919
|
+
/** Search value with applied delay / Значение поиска с примененной задержкой */
|
|
1920
|
+
searchDelay: i,
|
|
1921
|
+
/** Loading status during delay / Статус загрузки во время задержки */
|
|
1922
|
+
loading: n
|
|
1923
|
+
};
|
|
1924
|
+
}
|
|
1925
|
+
function le(s, t, e, i) {
|
|
1926
|
+
const n = new Ht(
|
|
1927
|
+
void 0,
|
|
1928
|
+
t,
|
|
1929
|
+
void 0,
|
|
1930
|
+
i
|
|
1931
|
+
), {
|
|
1932
|
+
search: r,
|
|
1933
|
+
searchDelay: a,
|
|
1934
|
+
loading: h
|
|
1935
|
+
} = ue(n, e), c = () => {
|
|
1936
|
+
const d = g(et(s));
|
|
1937
|
+
return d || [];
|
|
1938
|
+
}, o = u(
|
|
1939
|
+
() => n.setValue(a.value).getItem().isSearch()
|
|
1940
|
+
), m = u(() => n.setList(c()).setValue(a.value).to()), S = u(() => m.value.length);
|
|
1941
|
+
return {
|
|
1942
|
+
/**
|
|
1943
|
+
* Whether the search is currently active (minimum character limit reached)/
|
|
1944
|
+
* Активен ли поиск в данный момент (достигнут ли лимит символов)
|
|
1945
|
+
*/
|
|
1946
|
+
isSearch: o,
|
|
1947
|
+
/** Search string ref/ Ссылка на строку поиска */
|
|
1948
|
+
search: r,
|
|
1949
|
+
/**
|
|
1950
|
+
* Search loading status (if delay is used) /
|
|
1951
|
+
* Статус загрузки поиска (если используется задержка)
|
|
1952
|
+
*/
|
|
1953
|
+
loading: h,
|
|
1954
|
+
/**
|
|
1955
|
+
* Formatted list of search results with highlights /
|
|
1956
|
+
* Форматированный список результатов поиска с подсветкой совпадений
|
|
1957
|
+
*/
|
|
1958
|
+
listSearch: m,
|
|
1959
|
+
/**
|
|
1960
|
+
* Length of the search results /
|
|
1961
|
+
* Длина списка результатов поиска
|
|
1962
|
+
*/
|
|
1963
|
+
length: S
|
|
1964
|
+
};
|
|
1965
|
+
}
|
|
1966
|
+
function He(s, t, e, i, n, r, a) {
|
|
1967
|
+
const {
|
|
1968
|
+
path: h,
|
|
1969
|
+
options: c,
|
|
1970
|
+
reactivity: o,
|
|
1971
|
+
conditions: m,
|
|
1972
|
+
transformation: S,
|
|
1973
|
+
typeData: d,
|
|
1974
|
+
unmounted: b,
|
|
1975
|
+
skeleton: B
|
|
1976
|
+
} = s;
|
|
1977
|
+
let L, p, w, x, C;
|
|
1978
|
+
const v = se(
|
|
1979
|
+
h,
|
|
1980
|
+
c,
|
|
1981
|
+
o,
|
|
1982
|
+
m,
|
|
1983
|
+
S,
|
|
1984
|
+
b
|
|
1985
|
+
), A = u(() => d === void 0 ? !0 : v.isStarting() ? !1 : ot(d) ? d(v.data.value) : v.data.value instanceof d), rt = u(() => v.isStarting() && B ? B() : v.data.value);
|
|
1986
|
+
if (t && (L = ae(
|
|
1987
|
+
rt,
|
|
1988
|
+
t
|
|
1989
|
+
)), e) {
|
|
1990
|
+
const k = u(() => {
|
|
1991
|
+
var M;
|
|
1992
|
+
const H = (M = L == null ? void 0 : L.listFormat.value) != null ? M : v.data.value;
|
|
1993
|
+
if (Array.isArray(H))
|
|
1994
|
+
return H;
|
|
1995
|
+
});
|
|
1996
|
+
p = le(
|
|
1997
|
+
k,
|
|
1998
|
+
e.columns,
|
|
1999
|
+
e.value,
|
|
2000
|
+
e.options
|
|
2001
|
+
);
|
|
2002
|
+
}
|
|
2003
|
+
if (i || n || r) {
|
|
2004
|
+
const k = (M) => {
|
|
2005
|
+
a == null || a(), Et(M) && v.reset();
|
|
2006
|
+
}, H = (M) => async (at) => {
|
|
2007
|
+
ot(M) && await it(M(at)), k(at);
|
|
2008
|
+
};
|
|
2009
|
+
i && (w = ne(
|
|
2010
|
+
i.path,
|
|
2011
|
+
H(i.action),
|
|
2012
|
+
i.transformation,
|
|
2013
|
+
i.toData,
|
|
2014
|
+
i.options
|
|
2015
|
+
)), n && (x = re(
|
|
2016
|
+
n.path,
|
|
2017
|
+
H(n.action),
|
|
2018
|
+
n.transformation,
|
|
2019
|
+
n.toData,
|
|
2020
|
+
n.options
|
|
2021
|
+
)), r && (C = ie(
|
|
2022
|
+
r.path,
|
|
2023
|
+
H(r.action),
|
|
2024
|
+
r.transformation,
|
|
2025
|
+
r.toData,
|
|
2026
|
+
r.options
|
|
2027
|
+
));
|
|
2028
|
+
}
|
|
2029
|
+
const It = u(() => {
|
|
2030
|
+
if (A.value) {
|
|
2031
|
+
if (p && Array.isArray(v.data.value))
|
|
2032
|
+
return p.listSearch.value;
|
|
2033
|
+
if (L)
|
|
2034
|
+
return L.listFormat.value;
|
|
2035
|
+
}
|
|
2036
|
+
return rt.value;
|
|
2037
|
+
});
|
|
2038
|
+
return {
|
|
2039
|
+
/** Is valid data (Computed) / Валидность данных (Computed) */
|
|
2040
|
+
isValid: A,
|
|
2041
|
+
/** List data (Computed) / Данные списка (Computed) */
|
|
2042
|
+
list: It,
|
|
2043
|
+
/** Raw request data (Computed) / Исходные данные запроса (Computed) */
|
|
2044
|
+
get data() {
|
|
2045
|
+
return v.data;
|
|
2046
|
+
},
|
|
2047
|
+
/** Length of the list (Computed) / Длина списка (Computed) */
|
|
2048
|
+
get length() {
|
|
2049
|
+
return p ? p.length : v.length;
|
|
2050
|
+
},
|
|
2051
|
+
/** Data length (number) / Длина исходных данных */
|
|
2052
|
+
lengthData: v.length,
|
|
2053
|
+
/** Active starting flag (true if no data yet) / Флаг начальной загрузки (true если еще нет данных) */
|
|
2054
|
+
starting: v.starting,
|
|
2055
|
+
/** Active reading flag / Флаг активного чтения */
|
|
2056
|
+
reading: v.reading,
|
|
2057
|
+
/** Request load flag / Флаг загрузки запроса */
|
|
2058
|
+
loading: v.loading,
|
|
2059
|
+
/** Loading search flag / Флаг загрузки поиска */
|
|
2060
|
+
loadingSearch: p == null ? void 0 : p.loading,
|
|
2061
|
+
/** POST request load flag / Флаг загрузки POST запроса */
|
|
2062
|
+
loadingPost: w == null ? void 0 : w.loading,
|
|
2063
|
+
/** PUT request load flag / Флаг загрузки PUT запроса */
|
|
2064
|
+
loadingPut: x == null ? void 0 : x.loading,
|
|
2065
|
+
/** DELETE request load flag / Флаг загрузки DELETE запроса */
|
|
2066
|
+
loadingDelete: C == null ? void 0 : C.loading,
|
|
2067
|
+
/** Is search active / Активен ли поиск */
|
|
2068
|
+
isSearch: p == null ? void 0 : p.isSearch,
|
|
2069
|
+
/** Search function / Функция поиска */
|
|
2070
|
+
search: p == null ? void 0 : p.search,
|
|
2071
|
+
/**
|
|
2072
|
+
* Default reset.
|
|
2073
|
+
*
|
|
2074
|
+
* Сброс по умолчанию.
|
|
2075
|
+
*/
|
|
2076
|
+
reset: v.reset,
|
|
2077
|
+
/**
|
|
2078
|
+
* Abort request.
|
|
2079
|
+
*
|
|
2080
|
+
* Отмена запроса.
|
|
2081
|
+
*/
|
|
2082
|
+
abort: v.abort,
|
|
2083
|
+
/**
|
|
2084
|
+
* Send POST request.
|
|
2085
|
+
*
|
|
2086
|
+
* Выполнить POST запрос.
|
|
2087
|
+
* @param request request data / данные запроса
|
|
2088
|
+
*/
|
|
2089
|
+
sendPost: async (k) => await (w == null ? void 0 : w.send(k)),
|
|
2090
|
+
/**
|
|
2091
|
+
* Send PUT request.
|
|
2092
|
+
*
|
|
2093
|
+
* Выполнить PUT запрос.
|
|
2094
|
+
* @param request request data / данные запроса
|
|
2095
|
+
*/
|
|
2096
|
+
sendPut: async (k) => await (x == null ? void 0 : x.send(k)),
|
|
2097
|
+
/**
|
|
2098
|
+
* Send DELETE request.
|
|
2099
|
+
*
|
|
2100
|
+
* Выполнить DELETE запрос.
|
|
2101
|
+
* @param request request data / данные запроса
|
|
2102
|
+
*/
|
|
2103
|
+
sendDelete: async (k) => await (C == null ? void 0 : C.send(k))
|
|
2104
|
+
};
|
|
2105
|
+
}
|
|
2106
|
+
function oe(s, t) {
|
|
1528
2107
|
const e = `broadcast--${s}`;
|
|
1529
|
-
if (e in
|
|
1530
|
-
return
|
|
1531
|
-
const i = f(
|
|
2108
|
+
if (e in G)
|
|
2109
|
+
return G[e];
|
|
2110
|
+
const i = f(et(t)), n = new $t(
|
|
1532
2111
|
e,
|
|
1533
2112
|
(r) => {
|
|
1534
2113
|
i.value !== r.data.message && (i.value = r.data.message);
|
|
1535
2114
|
}
|
|
1536
2115
|
);
|
|
1537
|
-
return
|
|
2116
|
+
return F.run(() => {
|
|
2117
|
+
y(i, (r) => n.post({ message: r }));
|
|
2118
|
+
}), G[e] = i, i;
|
|
1538
2119
|
}
|
|
1539
|
-
const
|
|
1540
|
-
function
|
|
1541
|
-
if (s in
|
|
1542
|
-
return
|
|
1543
|
-
const i = new
|
|
2120
|
+
const G = {};
|
|
2121
|
+
function Ee(s, t, e) {
|
|
2122
|
+
if (s in K)
|
|
2123
|
+
return K[s];
|
|
2124
|
+
const i = new Rt(s), n = oe(
|
|
1544
2125
|
`__cookie:${s}`,
|
|
1545
2126
|
i.get(t, e)
|
|
1546
2127
|
);
|
|
1547
|
-
return
|
|
1548
|
-
|
|
1549
|
-
|
|
2128
|
+
return F.run(() => {
|
|
2129
|
+
y(n, (r) => {
|
|
2130
|
+
i.set(r, e);
|
|
2131
|
+
});
|
|
2132
|
+
}), K[s] = n, n;
|
|
1550
2133
|
}
|
|
1551
|
-
const
|
|
1552
|
-
function
|
|
1553
|
-
return new
|
|
2134
|
+
const K = {};
|
|
2135
|
+
function $e() {
|
|
2136
|
+
return new ee();
|
|
1554
2137
|
}
|
|
1555
|
-
function
|
|
1556
|
-
if (s in
|
|
1557
|
-
return
|
|
1558
|
-
const e =
|
|
1559
|
-
return
|
|
2138
|
+
function Re(s, t) {
|
|
2139
|
+
if (s in Y)
|
|
2140
|
+
return Y[s];
|
|
2141
|
+
const e = N(_.get(s, t));
|
|
2142
|
+
return F.run(() => {
|
|
2143
|
+
y(e, (i) => _.set(s, i));
|
|
2144
|
+
}), _.addWatch(s, (i) => {
|
|
1560
2145
|
e.value = i;
|
|
1561
|
-
}),
|
|
2146
|
+
}), Y[s] = e, e;
|
|
1562
2147
|
}
|
|
1563
|
-
const
|
|
2148
|
+
const Y = {}, ce = (s = {
|
|
1564
2149
|
rootMargin: "128px 0px"
|
|
1565
2150
|
}) => {
|
|
1566
|
-
const t = {}, e =
|
|
2151
|
+
const t = {}, e = ft() && "IntersectionObserver" in window ? new IntersectionObserver(
|
|
1567
2152
|
(n) => {
|
|
1568
2153
|
n.forEach((r) => {
|
|
1569
|
-
const
|
|
1570
|
-
if (
|
|
1571
|
-
const h = t[
|
|
2154
|
+
const a = $(r.target);
|
|
2155
|
+
if (a in t) {
|
|
2156
|
+
const h = t[a];
|
|
1572
2157
|
h.status.value = r.isIntersecting, h.ratio.value = r.intersectionRatio, h.entry.value = r;
|
|
1573
2158
|
}
|
|
1574
2159
|
});
|
|
@@ -1577,8 +2162,8 @@ const $ = {}, $t = (s = {
|
|
|
1577
2162
|
) : void 0, i = (n) => {
|
|
1578
2163
|
var r;
|
|
1579
2164
|
if (n) {
|
|
1580
|
-
const
|
|
1581
|
-
|
|
2165
|
+
const a = $(n);
|
|
2166
|
+
a in t && (e == null || e.unobserve(n), (r = t[a]) == null || r.stopWatch(), delete t[a]);
|
|
1582
2167
|
}
|
|
1583
2168
|
};
|
|
1584
2169
|
return {
|
|
@@ -1590,7 +2175,7 @@ const $ = {}, $t = (s = {
|
|
|
1590
2175
|
* @param element tracked element/ отслеживаемый элемент
|
|
1591
2176
|
*/
|
|
1592
2177
|
getItem(n) {
|
|
1593
|
-
const r =
|
|
2178
|
+
const r = $(n);
|
|
1594
2179
|
return t[r];
|
|
1595
2180
|
},
|
|
1596
2181
|
/**
|
|
@@ -1600,17 +2185,17 @@ const $ = {}, $t = (s = {
|
|
|
1600
2185
|
* @param element element for tracking/ элемента для отслеживания
|
|
1601
2186
|
*/
|
|
1602
2187
|
addLazyItem(n) {
|
|
1603
|
-
const r =
|
|
2188
|
+
const r = N(!e);
|
|
1604
2189
|
if (e) {
|
|
1605
|
-
let
|
|
1606
|
-
|
|
2190
|
+
let a;
|
|
2191
|
+
a = y(n, (h, c) => {
|
|
1607
2192
|
if (c && i(c), n.value) {
|
|
1608
|
-
const o =
|
|
2193
|
+
const o = $(n.value);
|
|
1609
2194
|
t[o] = {
|
|
1610
2195
|
status: r,
|
|
1611
|
-
ratio:
|
|
1612
|
-
entry:
|
|
1613
|
-
stopWatch: () =>
|
|
2196
|
+
ratio: N(0),
|
|
2197
|
+
entry: N(void 0),
|
|
2198
|
+
stopWatch: () => a == null ? void 0 : a()
|
|
1614
2199
|
}, e.observe(n.value);
|
|
1615
2200
|
} else
|
|
1616
2201
|
i(n.value);
|
|
@@ -1631,14 +2216,14 @@ const $ = {}, $t = (s = {
|
|
|
1631
2216
|
*/
|
|
1632
2217
|
disconnectLazy: () => e == null ? void 0 : e.disconnect()
|
|
1633
2218
|
};
|
|
1634
|
-
},
|
|
1635
|
-
const t =
|
|
2219
|
+
}, dt = [], he = (s) => {
|
|
2220
|
+
const t = dt.find((i) => i.rootMargin === s);
|
|
1636
2221
|
if (t)
|
|
1637
2222
|
return t.item;
|
|
1638
|
-
const e =
|
|
1639
|
-
return
|
|
1640
|
-
},
|
|
1641
|
-
const e =
|
|
2223
|
+
const e = ce({ rootMargin: s });
|
|
2224
|
+
return dt.push({ rootMargin: s, item: e }), e;
|
|
2225
|
+
}, Pe = (s, t) => {
|
|
2226
|
+
const e = he(t);
|
|
1642
2227
|
return {
|
|
1643
2228
|
/** Lazy item status/ Статус ленивого элемента */
|
|
1644
2229
|
lazyItemStatus: e.addLazyItem(s),
|
|
@@ -1652,61 +2237,88 @@ const $ = {}, $t = (s = {
|
|
|
1652
2237
|
}
|
|
1653
2238
|
};
|
|
1654
2239
|
};
|
|
1655
|
-
function
|
|
1656
|
-
const s =
|
|
1657
|
-
return
|
|
2240
|
+
function je() {
|
|
2241
|
+
const s = N(ct.is());
|
|
2242
|
+
return ct.registrationEvent(({ detail: t }) => {
|
|
1658
2243
|
s.value = t.loading;
|
|
1659
2244
|
}), s;
|
|
1660
2245
|
}
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
const
|
|
2246
|
+
var de = /* @__PURE__ */ ((s) => (s.global = "global", s.provide = "provide", s.local = "local", s))(de || {});
|
|
2247
|
+
const ge = () => `__execute_use${fe}::${$()}`, fe = Pt(1e5, 999999), tt = [], ve = st();
|
|
2248
|
+
function nt(s, t = "provide") {
|
|
2249
|
+
const e = ge();
|
|
2250
|
+
let i;
|
|
2251
|
+
const n = (c) => {
|
|
1665
2252
|
const o = Object.freeze(s(...c));
|
|
1666
|
-
return
|
|
2253
|
+
return {
|
|
1667
2254
|
...o,
|
|
1668
2255
|
init() {
|
|
1669
2256
|
return o;
|
|
1670
2257
|
}
|
|
2258
|
+
};
|
|
2259
|
+
}, r = (c) => {
|
|
2260
|
+
const o = Object.freeze(n(c));
|
|
2261
|
+
return Kt(e, o), o;
|
|
2262
|
+
}, a = (c) => {
|
|
2263
|
+
const o = n(c);
|
|
2264
|
+
return Object.freeze({
|
|
2265
|
+
...o,
|
|
2266
|
+
destroyExecute() {
|
|
2267
|
+
i = void 0;
|
|
2268
|
+
}
|
|
1671
2269
|
});
|
|
1672
2270
|
}, h = (...c) => {
|
|
1673
|
-
if (
|
|
1674
|
-
const o =
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
m = void 0;
|
|
1681
|
-
}), m;
|
|
1682
|
-
}
|
|
1683
|
-
} else n || (n = u(c), t && T(() => {
|
|
1684
|
-
n = void 0;
|
|
1685
|
-
}));
|
|
1686
|
-
return n;
|
|
2271
|
+
if (t === "provide") {
|
|
2272
|
+
const o = Gt(e, void 0);
|
|
2273
|
+
return o || r(c);
|
|
2274
|
+
} else i || (t === "local" ? ve.run(() => {
|
|
2275
|
+
i = a(c);
|
|
2276
|
+
}) : i = a(c));
|
|
2277
|
+
return i;
|
|
1687
2278
|
};
|
|
1688
|
-
return
|
|
2279
|
+
return t === "global" && tt.push(h), h;
|
|
1689
2280
|
}
|
|
1690
|
-
function
|
|
1691
|
-
|
|
2281
|
+
function me(s) {
|
|
2282
|
+
return nt(
|
|
2283
|
+
s,
|
|
2284
|
+
"global"
|
|
2285
|
+
/* global */
|
|
2286
|
+
);
|
|
2287
|
+
}
|
|
2288
|
+
function ze(s) {
|
|
2289
|
+
return nt(
|
|
2290
|
+
s,
|
|
2291
|
+
"provide"
|
|
2292
|
+
/* provide */
|
|
2293
|
+
);
|
|
1692
2294
|
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
2295
|
+
function Ve(s) {
|
|
2296
|
+
return nt(
|
|
2297
|
+
s,
|
|
2298
|
+
"local"
|
|
2299
|
+
/* local */
|
|
2300
|
+
);
|
|
2301
|
+
}
|
|
2302
|
+
function Te() {
|
|
2303
|
+
tt.forEach((s) => s()), tt.length = 0;
|
|
2304
|
+
}
|
|
2305
|
+
const ye = me(() => {
|
|
2306
|
+
const s = new jt(), t = f(s.getTitle()), e = f(s.getKeywords()), i = f(s.getDescription()), n = f(s.getImage()), r = f(s.getCanonical()), a = f(s.getRobots()), h = f(s.getAuthor()), c = f(s.getSiteName()), o = () => s.html();
|
|
2307
|
+
return y(t, () => {
|
|
1696
2308
|
s.setTitle(t.value);
|
|
1697
|
-
}),
|
|
2309
|
+
}), y(e, () => {
|
|
1698
2310
|
s.setKeywords(e.value);
|
|
1699
|
-
}),
|
|
2311
|
+
}), y(i, () => {
|
|
1700
2312
|
s.setDescription(i.value);
|
|
1701
|
-
}),
|
|
2313
|
+
}), y(n, () => {
|
|
1702
2314
|
s.setImage(n.value);
|
|
1703
|
-
}),
|
|
2315
|
+
}), y(r, () => {
|
|
1704
2316
|
s.setCanonical(r.value);
|
|
1705
|
-
}),
|
|
1706
|
-
s.setRobots(
|
|
1707
|
-
}),
|
|
2317
|
+
}), y(a, () => {
|
|
2318
|
+
s.setRobots(a.value);
|
|
2319
|
+
}), y(h, () => {
|
|
1708
2320
|
s.setAuthor(h.value);
|
|
1709
|
-
}),
|
|
2321
|
+
}), y(c, () => {
|
|
1710
2322
|
s.setSiteName(c.value);
|
|
1711
2323
|
}), {
|
|
1712
2324
|
meta: s,
|
|
@@ -1716,32 +2328,71 @@ const Tt = zt(() => {
|
|
|
1716
2328
|
author: h,
|
|
1717
2329
|
image: n,
|
|
1718
2330
|
canonical: r,
|
|
1719
|
-
robots:
|
|
2331
|
+
robots: a,
|
|
1720
2332
|
siteName: c,
|
|
1721
2333
|
getHtmlMeta: o
|
|
1722
2334
|
};
|
|
1723
|
-
},
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
2335
|
+
}), Oe = () => ye(), We = (s, t, e = !0) => {
|
|
2336
|
+
var m, S;
|
|
2337
|
+
const i = V(t) ? t : f(t || ((S = (m = s.value) == null ? void 0 : m[0]) == null ? void 0 : S.value) || ""), n = () => r(i.value), r = (d) => {
|
|
2338
|
+
var b;
|
|
2339
|
+
return (b = s.value) == null ? void 0 : b.find((B) => B.value === d);
|
|
2340
|
+
}, a = (d) => {
|
|
2341
|
+
d && d !== i.value && r(d) && (i.value = d, St.push({ name: d }));
|
|
2342
|
+
}, h = u(() => n()), c = u(() => {
|
|
2343
|
+
var d;
|
|
2344
|
+
return ((d = n()) == null ? void 0 : d.label) || "";
|
|
2345
|
+
}), o = u(() => s.value ? E(
|
|
2346
|
+
s.value,
|
|
2347
|
+
(d) => e && !("to" in d) ? {
|
|
2348
|
+
...d,
|
|
2349
|
+
to: { name: d.value }
|
|
2350
|
+
} : d
|
|
2351
|
+
) : []);
|
|
2352
|
+
return {
|
|
2353
|
+
item: h,
|
|
2354
|
+
/** Selected element / Выбранный элемент */
|
|
2355
|
+
selected: i,
|
|
2356
|
+
label: c,
|
|
2357
|
+
/** List of elements / Список элементов */
|
|
2358
|
+
list: o,
|
|
2359
|
+
to: a,
|
|
2360
|
+
/**
|
|
2361
|
+
* Transition to the main element.
|
|
2362
|
+
*
|
|
2363
|
+
* Переход к главному элементу.
|
|
2364
|
+
*/
|
|
2365
|
+
toMain() {
|
|
2366
|
+
var d, b;
|
|
2367
|
+
a((b = (d = s.value) == null ? void 0 : d[0]) == null ? void 0 : b.value);
|
|
2368
|
+
}
|
|
2369
|
+
};
|
|
2370
|
+
};
|
|
2371
|
+
function Ue(s, t) {
|
|
2372
|
+
if (s in J)
|
|
2373
|
+
return J[s];
|
|
2374
|
+
const e = new vt(s, !0), i = f(e.get(t));
|
|
2375
|
+
return F.run(() => {
|
|
2376
|
+
y(i, (n) => e.set(n));
|
|
2377
|
+
}), J[s] = i, i;
|
|
1729
2378
|
}
|
|
1730
|
-
const
|
|
1731
|
-
function
|
|
1732
|
-
if (s in
|
|
1733
|
-
return
|
|
1734
|
-
const i = new
|
|
1735
|
-
return
|
|
2379
|
+
const J = {};
|
|
2380
|
+
function _e(s, t, e) {
|
|
2381
|
+
if (s in Q)
|
|
2382
|
+
return Q[s];
|
|
2383
|
+
const i = new vt(s), n = f(i.get(t, e));
|
|
2384
|
+
return F.run(() => {
|
|
2385
|
+
y(n, (r) => i.set(r));
|
|
2386
|
+
}), ft() && window.addEventListener("storage", () => {
|
|
1736
2387
|
i.update(), n.value = i.get();
|
|
1737
|
-
}),
|
|
2388
|
+
}), Q[s] = n, n;
|
|
1738
2389
|
}
|
|
1739
|
-
const
|
|
1740
|
-
function
|
|
1741
|
-
const t =
|
|
1742
|
-
t.value = { ...await
|
|
2390
|
+
const Q = {};
|
|
2391
|
+
function pe(s) {
|
|
2392
|
+
const t = N(ht.getListSync(s, !0)), e = async () => {
|
|
2393
|
+
t.value = { ...await ht.getList(s) };
|
|
1743
2394
|
};
|
|
1744
|
-
|
|
2395
|
+
y(P.getLanguage(), e);
|
|
1745
2396
|
for (const i in t.value)
|
|
1746
2397
|
if (t.value[i] === i || t.value[i] === " ") {
|
|
1747
2398
|
e().then();
|
|
@@ -1749,95 +2400,132 @@ function Ot(s) {
|
|
|
1749
2400
|
}
|
|
1750
2401
|
return t;
|
|
1751
2402
|
}
|
|
1752
|
-
const
|
|
1753
|
-
function
|
|
1754
|
-
const
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
2403
|
+
const Ge = (s) => pe(s);
|
|
2404
|
+
function Ke(s, t, e) {
|
|
2405
|
+
const i = f();
|
|
2406
|
+
let n = !0;
|
|
2407
|
+
const r = () => {
|
|
2408
|
+
n && (n = !1, mt(async () => {
|
|
2409
|
+
const a = await it(s);
|
|
2410
|
+
a !== t && (i.value = a);
|
|
2411
|
+
}));
|
|
2412
|
+
};
|
|
2413
|
+
return u(() => (r(), i.value), e);
|
|
1758
2414
|
}
|
|
1759
|
-
function
|
|
2415
|
+
function Ye(s, t = () => {
|
|
1760
2416
|
}, e, i) {
|
|
1761
|
-
return
|
|
2417
|
+
return u(
|
|
1762
2418
|
() => {
|
|
1763
|
-
if (
|
|
2419
|
+
if (P.get().value && (e === void 0 || e())) {
|
|
1764
2420
|
const n = s();
|
|
1765
2421
|
if (n !== void 0)
|
|
1766
2422
|
return n;
|
|
1767
2423
|
}
|
|
1768
|
-
return
|
|
2424
|
+
return et(t);
|
|
1769
2425
|
},
|
|
1770
2426
|
i
|
|
1771
2427
|
);
|
|
1772
2428
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
return
|
|
2429
|
+
const Se = st();
|
|
2430
|
+
function Je(s) {
|
|
2431
|
+
return Yt((t, e) => {
|
|
2432
|
+
const i = f();
|
|
2433
|
+
let n = !1;
|
|
2434
|
+
const r = async () => {
|
|
2435
|
+
i.value = await it(s), e();
|
|
2436
|
+
}, a = () => {
|
|
2437
|
+
n || (n = !0, Se.run(() => {
|
|
2438
|
+
mt(async () => await r());
|
|
2439
|
+
}));
|
|
2440
|
+
};
|
|
2441
|
+
return {
|
|
2442
|
+
/**
|
|
2443
|
+
* Gets the computed value.
|
|
2444
|
+
*
|
|
2445
|
+
* Получает вычисляемое значение.
|
|
2446
|
+
*/
|
|
2447
|
+
get() {
|
|
2448
|
+
return a(), t(), i.value;
|
|
2449
|
+
},
|
|
2450
|
+
/**
|
|
2451
|
+
* Displays a warning that the value is read-only.
|
|
2452
|
+
*
|
|
2453
|
+
* Выводит предупреждение о том, что значение доступно только для чтения.
|
|
2454
|
+
*/
|
|
2455
|
+
set(h) {
|
|
2456
|
+
console.warn("computedEternity: value is read-only.");
|
|
2457
|
+
}
|
|
2458
|
+
};
|
|
2459
|
+
});
|
|
1776
2460
|
}
|
|
1777
|
-
function
|
|
1778
|
-
|
|
2461
|
+
function be(s, t = {}, e = "value", i = !1) {
|
|
2462
|
+
const n = typeof t == "string", r = n ? t : e, a = n ? {} : t;
|
|
2463
|
+
return s ? s && j(s) && (r in s || i) ? q(a, s) : q(a, { [r]: s }) : n ? {} : { ...a };
|
|
1779
2464
|
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
let i = !0;
|
|
1783
|
-
const n = () => {
|
|
1784
|
-
i && (Q(async () => {
|
|
1785
|
-
const r = d(await s());
|
|
1786
|
-
r !== t && (e.value = r);
|
|
1787
|
-
}), i = !1);
|
|
1788
|
-
};
|
|
1789
|
-
return a(() => (n(), e.value));
|
|
1790
|
-
};
|
|
1791
|
-
function fe(s, t) {
|
|
1792
|
-
s.value !== t && (s.value = t);
|
|
2465
|
+
function Qe(s, t = {}, e = "value") {
|
|
2466
|
+
return u(() => be(g(s), g(t), e));
|
|
1793
2467
|
}
|
|
1794
|
-
function
|
|
1795
|
-
|
|
1796
|
-
return a(() => (t || (t = s()), t.value));
|
|
2468
|
+
function Xe(s, t) {
|
|
2469
|
+
s.value !== t && (s.value = t);
|
|
1797
2470
|
}
|
|
1798
2471
|
export {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
2472
|
+
De as DatetimeRef,
|
|
2473
|
+
Qt as DesignAbstract,
|
|
2474
|
+
xe as DesignAsyncAbstract,
|
|
2475
|
+
Jt as DesignChanged,
|
|
2476
|
+
Ce as DesignComp,
|
|
2477
|
+
yt as DesignComponents,
|
|
2478
|
+
ke as DesignConstructorAbstract,
|
|
2479
|
+
F as EffectScopeGlobal,
|
|
2480
|
+
Ae as EventRef,
|
|
2481
|
+
de as ExecuteUseType,
|
|
2482
|
+
Be as GeoFlagRef,
|
|
2483
|
+
ee as GeoIntlRef,
|
|
2484
|
+
P as GeoRef,
|
|
2485
|
+
pt as ListDataRef,
|
|
2486
|
+
St as RouterItemRef,
|
|
2487
|
+
Me as ScrollbarWidthRef,
|
|
2488
|
+
Ke as computedAsync,
|
|
2489
|
+
Ye as computedByLanguage,
|
|
2490
|
+
Je as computedEternity,
|
|
2491
|
+
nt as executeUse,
|
|
2492
|
+
me as executeUseGlobal,
|
|
2493
|
+
Te as executeUseGlobalInit,
|
|
2494
|
+
Ve as executeUseLocal,
|
|
2495
|
+
ze as executeUseProvide,
|
|
2496
|
+
be as getBind,
|
|
2497
|
+
Qe as getBindRef,
|
|
2498
|
+
Xt as getClassName,
|
|
2499
|
+
Zt as getIndexForRender,
|
|
2500
|
+
bt as getOptions,
|
|
2501
|
+
g as getRef,
|
|
2502
|
+
qt as render,
|
|
2503
|
+
Fe as setApiRefGlobalConditions,
|
|
2504
|
+
Xe as setRef,
|
|
2505
|
+
Ge as t,
|
|
2506
|
+
q as toBind,
|
|
2507
|
+
te as toBinds,
|
|
2508
|
+
D as toRefItem,
|
|
2509
|
+
ie as useApiDelete,
|
|
2510
|
+
Ne as useApiGet,
|
|
2511
|
+
He as useApiManagementRef,
|
|
2512
|
+
ne as useApiPost,
|
|
2513
|
+
re as useApiPut,
|
|
2514
|
+
se as useApiRef,
|
|
2515
|
+
W as useApiRequest,
|
|
2516
|
+
oe as useBroadcastValueRef,
|
|
2517
|
+
Ee as useCookieRef,
|
|
2518
|
+
ae as useFormattersRef,
|
|
2519
|
+
$e as useGeoIntlRef,
|
|
2520
|
+
Re as useHashRef,
|
|
2521
|
+
Pe as useLazyItemByMarginRef,
|
|
2522
|
+
ce as useLazyRef,
|
|
2523
|
+
je as useLoadingRef,
|
|
2524
|
+
Oe as useMeta,
|
|
2525
|
+
We as useRouterList,
|
|
2526
|
+
le as useSearchRef,
|
|
2527
|
+
ue as useSearchValueRef,
|
|
2528
|
+
Ue as useSessionRef,
|
|
2529
|
+
_e as useStorageRef,
|
|
2530
|
+
pe as useTranslateRef
|
|
1843
2531
|
};
|