@dxtmisha/functional 1.9.1 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/library.d.ts +170 -14
  2. package/dist/library.js +1175 -2486
  3. package/package.json +3 -2
package/dist/library.js CHANGED
@@ -1,2531 +1,1220 @@
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";
1
+ import { Api as e, ApiMethodItem as t, BroadcastMessage as n, Cookie as r, DataStorage as i, Datetime as a, ErrorCenter as o, EventItem as s, Formatters as c, Geo as l, GeoFlag as u, GeoIntl as d, Hash as f, Icons as p, Loading as m, Meta as h, ScrollbarWidth as g, SearchList as _, Translate as v, executeFunction as y, executePromise as b, forEach as x, getColumn as S, getElementId as C, getExp as w, isApiSuccess as ee, isArray as te, isDomRuntime as ne, isFunction as re, isObject as T, isObjectNotArray as E, isSelected as D, isString as O, random as ie, toArray as k, toCamelCase as ae, toDate as oe } from "@dxtmisha/functional-basic";
2
+ import { computed as A, customRef as se, effectScope as ce, getCurrentInstance as le, h as ue, inject as de, isRef as j, onUnmounted as fe, provide as pe, ref as M, shallowRef as N, toRefs as me, triggerRef as he, useAttrs as ge, useSlots as _e, watch as P, watchEffect as ve } from "vue";
5
3
  export * from "@dxtmisha/functional-basic";
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
- /**
9
- * Constructor
10
- * @param props base data/ базовые данные
11
- * @param watch data for tracking/ данные для слежения
12
- */
13
- constructor(t, e = Object.keys(t)) {
14
- l(this, "cache", {});
15
- this.props = t, this.watch = e;
16
- }
17
- /**
18
- * Checks if the value has been updated.
19
- *
20
- * Проверяет, обновлено ли значение.
21
- * @param name property name/ название свойства
22
- */
23
- is(t) {
24
- return xt(t) ? !!t.find((e) => this.isDifferent(e)) : this.isDifferent(t);
25
- }
26
- /**
27
- * Checks if there are changes in the data.
28
- *
29
- * Проверяет, есть ли изменения в данных.
30
- */
31
- isChanged() {
32
- const t = this.props;
33
- return !!this.watch.find((e) => e in t && this.isDifferent(e));
34
- }
35
- /**
36
- * Updates all values.
37
- *
38
- * Обновляет все значения.
39
- */
40
- update() {
41
- const t = this.props;
42
- this.watch.forEach((e) => {
43
- e in t && this.isDifferent(e) && (this.cache[e] = t[e]);
44
- });
45
- }
46
- /**
47
- * Checking additional data.
48
- *
49
- * Проверка дополнительных данных.
50
- * @param name property name/ название свойства
51
- */
52
- isDifferent(t) {
53
- var e, i;
54
- return ((e = this.cache) == null ? void 0 : e[t]) !== ((i = this.props) == null ? void 0 : i[t]);
55
- }
4
+ //#endregion
5
+ //#region \0@oxc-project+runtime@0.120.0/helpers/typeof.js
6
+ function F(e) {
7
+ "@babel/helpers - typeof";
8
+ return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
9
+ return typeof e;
10
+ } : function(e) {
11
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
12
+ }, F(e);
56
13
  }
57
- class Qt {
58
- /**
59
- * Constructor
60
- * @param props base data/ базовые данные
61
- * @param callback callback function when the value changes/
62
- * функция обратного вызова при изменении значения
63
- * @param changed base data/ данный для слежения
64
- */
65
- constructor(t, e, i) {
66
- l(this, "event", {});
67
- l(this, "changed");
68
- this.props = t, this.callback = e, this.changed = new Jt(t, i);
69
- }
70
- /**
71
- * Calls the callback function.
72
- *
73
- * Вызывает функцию обратного вызова.
74
- * @param compelled forces data to update/ вынуждает обновлять данные
75
- */
76
- make(t) {
77
- return this.makeCallback(t), this;
78
- }
79
- /**
80
- * Checks if there are values in the property.
81
- *
82
- * Проверяет, есть ли значения в свойстве.
83
- * @param name property names/ названия свойств
84
- */
85
- is(t) {
86
- return t in this.props;
87
- }
88
- /**
89
- * Checks if the value has been changed by the property name.
90
- *
91
- * Проверяет, было ли изменено значение по названию свойства.
92
- * @param name property names/ названия свойств
93
- * @param nameProp names of properties of the input variable/ названия свойств входной переменной
94
- */
95
- isChanged(t, e) {
96
- return !(t in this.event) || this.changed.is(e || t);
97
- }
98
- /**
99
- * Calls the callback function.
100
- *
101
- * Вызывает функцию обратного вызова.
102
- * @param compelled forces data to update/ вынуждает обновлять данные
103
- */
104
- makeCallback(t = !1) {
105
- (t || this.changed.isChanged()) && (this.initEvent(), this.makeCallbackItem(), this.changed.update());
106
- }
107
- /**
108
- * The function calls an image call.
109
- *
110
- * Функция вызывает образный вызов.
111
- */
112
- makeCallbackItem() {
113
- this.callback && this.callback(this.event);
114
- }
14
+ //#endregion
15
+ //#region \0@oxc-project+runtime@0.120.0/helpers/toPrimitive.js
16
+ function ye(e, t) {
17
+ if (F(e) != "object" || !e) return e;
18
+ var n = e[Symbol.toPrimitive];
19
+ if (n !== void 0) {
20
+ var r = n.call(e, t || "default");
21
+ if (F(r) != "object") return r;
22
+ throw TypeError("@@toPrimitive must return a primitive value.");
23
+ }
24
+ return (t === "string" ? String : Number)(e);
115
25
  }
116
- class xe extends Qt {
117
- /**
118
- * Calls the callback function.
119
- *
120
- * Вызывает функцию обратного вызова.
121
- * @param compelled forces data to update/ вынуждает обновлять данные
122
- */
123
- make(t) {
124
- return this.makeCallback(t).then(), this;
125
- }
126
- /**
127
- * Calls the callback function.
128
- *
129
- * Вызывает функцию обратного вызова.
130
- * @param compelled forces data to update/ вынуждает обновлять данные
131
- */
132
- async makeCallback(t) {
133
- (t || this.changed.isChanged()) && (await this.initEvent(), this.makeCallbackItem(), this.changed.update());
134
- }
26
+ //#endregion
27
+ //#region \0@oxc-project+runtime@0.120.0/helpers/toPropertyKey.js
28
+ function be(e) {
29
+ var t = ye(e, "string");
30
+ return F(t) == "symbol" ? t : t + "";
135
31
  }
136
- function g(s) {
137
- return V(s) ? s.value : s;
32
+ //#endregion
33
+ //#region \0@oxc-project+runtime@0.120.0/helpers/defineProperty.js
34
+ function I(e, t, n) {
35
+ return (t = be(t)) in e ? Object.defineProperty(e, t, {
36
+ value: n,
37
+ enumerable: !0,
38
+ configurable: !0,
39
+ writable: !0
40
+ }) : e[t] = n, e;
138
41
  }
139
- function Xt(s) {
140
- return s && "class" in s && typeof s.class == "string" ? s.class : void 0;
141
- }
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;
147
- }
148
- function qt(s, t, e, i) {
149
- let n = t;
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);
155
- }
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 = {
158
- ...s,
159
- ...t
160
- };
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;
162
- }
163
- function te(...s) {
164
- let t = {};
165
- return s.forEach((e) => {
166
- e && (t = q(t, e));
167
- }), t;
168
- }
169
- class yt {
170
- /**
171
- * Constructor
172
- * @param components list of connected components/ список подключенных компонентов
173
- * @param modification data for modification/ данные для модификации
174
- */
175
- constructor(t = {}, e) {
176
- /** Cache for computed properties/ Кэш для вычисляемых свойств */
177
- l(this, "caching", {});
178
- this.components = t, this.modification = e;
179
- }
180
- /**
181
- * Check the presence of the component.
182
- *
183
- * Проверить наличие компонента.
184
- * @param name name of the component/ названия компонента
185
- */
186
- is(t) {
187
- return t in this.components;
188
- }
189
- /**
190
- * Getting the object of the component.
191
- *
192
- * Получение объекта компонента.
193
- * @param name name of the component/ названия компонента
194
- */
195
- get(t) {
196
- var e;
197
- return (e = this.components) == null ? void 0 : e[t];
198
- }
199
- /**
200
- * Returns the modified input data of the connected components.
201
- *
202
- * Возвращает модифицированные входные данные у подключенных компонентов.
203
- * @param index the name of this/ название данного
204
- * @param props basic data/ базовые данные
205
- */
206
- getModification(t, e) {
207
- if (t) {
208
- t in this.caching || (this.caching[t] = u(() => this.computeModification(t)));
209
- const i = this.caching[t];
210
- if (i)
211
- return e ? te(i.value, e) : i.value;
212
- }
213
- return e;
214
- }
215
- /**
216
- * Rendering a component by its name and returning an array with one component.
217
- *
218
- * Рендеринг компонента по его имени и возвращение массива с одним компонентом.
219
- * @param name name of the component/ названия компонента
220
- * @param props property of the component/ свойство компонента
221
- * @param children sub-elements of the component/ под элементы компонента
222
- * @param index the name of the key/ названия ключа
223
- */
224
- render(t, e, i, n) {
225
- const r = this.renderOne(
226
- t,
227
- e,
228
- i,
229
- n
230
- );
231
- return r ? [r] : [];
232
- }
233
- /**
234
- * Rendering a component by its name.
235
- *
236
- * Рендеринг компонента по его имени.
237
- * @param name name of the component/ названия компонента
238
- * @param props property of the component/ свойство компонента
239
- * @param children sub-elements of the component/ под элементы компонента
240
- * @param index the name of the key/ названия ключа
241
- */
242
- renderOne(t, e, i, n) {
243
- if (this.is(t)) {
244
- const r = n != null ? n : t;
245
- return qt(
246
- this.get(t),
247
- this.getModification(r, e),
248
- i,
249
- r
250
- );
251
- }
252
- }
253
- /**
254
- * Rendering the component by its name.
255
- *
256
- * Рендеринг компонента по его имени.
257
- * @param item an array to which the rendered object will be added/
258
- * массив, по которому будет добавлять объект
259
- * @param name name of the component/ названия компонента
260
- * @param props property of the component/ свойство компонента
261
- * @param children sub-elements of the component/ под элементы компонента
262
- * @param index the name of the key/ названия ключа
263
- */
264
- renderAdd(t, e, i, n, r) {
265
- return t.push(...this.render(e, i, n, r)), this;
266
- }
267
- /**
268
- * Calculates modified input data for connected components.
269
- *
270
- * Вычисляет модифицированные входные данные для подключенных компонентов.
271
- * @param index the name of this/ название данного
272
- */
273
- computeModification(t) {
274
- var i;
275
- const e = g((i = this.modification) == null ? void 0 : i[t]);
276
- if (e && j(e)) {
277
- const n = {};
278
- return E(e, (r, a) => {
279
- n[a] = g(r);
280
- }), n;
281
- }
282
- return {};
283
- }
284
- }
285
- class Ce extends yt {
286
- }
287
- class ke {
288
- /**
289
- * Constructor
290
- * @param name class name/ название класса
291
- * @param props properties/ свойства
292
- * @param options list of additional parameters/ список дополнительных параметров
293
- */
294
- constructor(t, e, i) {
295
- l(this, "name");
296
- l(this, "element", f());
297
- l(this, "refs");
298
- l(this, "components");
299
- l(this, "emits");
300
- l(this, "classes");
301
- l(this, "classesSub");
302
- l(this, "styles");
303
- l(this, "stylesSub");
304
- l(this, "attrs");
305
- l(this, "slots");
306
- l(this, "dataExpose");
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();
308
- }
309
- init() {
310
- return this.classesSub = u(() => this.initClasses()), this.stylesSub = u(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
311
- }
312
- /**
313
- * Getting the class name.
314
- *
315
- * Получение названия класса.
316
- */
317
- getName() {
318
- return this.name.join("-");
319
- }
320
- /**
321
- * Getting the class name.
322
- *
323
- * Получение названия дизайна.
324
- */
325
- getDesign() {
326
- return String(this.name[0]);
327
- }
328
- /**
329
- * Getting the class name.
330
- *
331
- * Получение названия класса.
332
- * @param name list of class names by levels/ список названий классов по уровням
333
- */
334
- getSubClass(t) {
335
- return `${this.getName()}__${U(t).join("__")}`;
336
- }
337
- /**
338
- * Getting the class name for the status.
339
- *
340
- * Получение названия класса для статуса.
341
- * @param name list of class names by levels/ список названий классов по уровням
342
- */
343
- getStatusClass(t) {
344
- return `${this.getName()}--${U(t).join("--")}`;
345
- }
346
- /**
347
- * Getting the property name for the style.
348
- *
349
- * Получение названия свойства для стиля.
350
- * @param name list of class names by levels/ список названий классов по уровням
351
- */
352
- getStyle(t) {
353
- return `--${this.getName()}-sys-${U(t).join("-")}`;
354
- }
355
- /**
356
- * Getting additional parameters.
357
- *
358
- * Получение дополнительных параметров.
359
- */
360
- getAttrs() {
361
- var e;
362
- const t = { ...(e = this.attrs) != null ? e : {} };
363
- return "class" in t && delete t.class, "style" in t && delete t.style, t;
364
- }
365
- /**
366
- * List of available external variables.
367
- *
368
- * Список доступных переменных извне.
369
- */
370
- expose() {
371
- var t;
372
- return {
373
- ...(t = this.dataExpose) != null ? t : {},
374
- elementHtml: this.element
375
- };
376
- }
377
- /**
378
- * The rendering method for the setup method.
379
- *
380
- * Метод рендеринга для метода настройки.
381
- */
382
- render() {
383
- return () => this.initRender();
384
- }
385
- /**
386
- * Initializes the slot.
387
- *
388
- * Инициализирует слот.
389
- * @param name slot name/ название слота
390
- * @param children if you pass this element, the slot will be added to it/
391
- * если передать этот элемент, то слот добавится в него
392
- * @param props property for the slot/ свойство для слота
393
- */
394
- initSlot(t, e, i = {}) {
395
- var n;
396
- if (this.slots && ((n = this.slots) != null && n[t]) && typeof this.slots[t] == "function") {
397
- const r = this.slots[t](i);
398
- return e && e.push(r), r;
399
- }
400
- }
401
- /**
402
- * Transformation of the class value into an object.
403
- *
404
- * Преобразование значения класса в объект.
405
- * @param classes list of classes for transformation/ список классов для преобразования
406
- */
407
- toClass(t) {
408
- return j(t) ? t : Array.isArray(t) ? { [t.filter((i) => typeof i == "string" && i.trim() !== "").join(" ")]: !0 } : typeof t == "string" ? { [t]: !0 } : {};
409
- }
410
- /**
411
- * Converts the class name to standard for the current component.
412
- *
413
- * Преобразовывает название класса в стандартное для текущего компонента.
414
- * @param classes list of classes/ список классов
415
- */
416
- toClassName(t) {
417
- if (Z(t)) {
418
- const e = {};
419
- return E(t, (i, n) => {
420
- n.match(/\?\?/) ? e[n.replace(/\?\?/, this.getName())] = i : n.match(/\?/) ? e[n.replace(/\?/, this.getDesign())] = i : e[n] = i;
421
- }), e;
422
- }
423
- return {};
424
- }
425
- /**
426
- * Getting component names as an array.
427
- *
428
- * Получение названий компонентов в виде массива.
429
- * @param name component name for transformation/ название компонента для преобразования
430
- */
431
- initName(t) {
432
- return E(t.split(".", 2), (e) => Ct(e));
433
- }
434
- /**
435
- * Updating data about the class.
436
- *
437
- * Обновление данных об классе.
438
- */
439
- updateClasses() {
440
- var i, n, r, a;
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;
442
- return t && e ? {
443
- ...t,
444
- ...e,
445
- main: {
446
- ...this.toClass(t == null ? void 0 : t.main),
447
- ...this.toClass(e == null ? void 0 : e.main)
448
- // ...this.toClass(this.attrs?.class)
449
- }
450
- } : (a = e != null ? e : t) != null ? a : {
451
- main: {}
452
- };
453
- }
454
- /**
455
- * Refinement of the received list of styles.
456
- *
457
- * Доработка полученного списка стилей.
458
- */
459
- updateStyles() {
460
- var i, n, r, a;
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;
462
- return t && e ? {
463
- ...t,
464
- ...e
465
- } : (a = e != null ? e : t) != null ? a : {};
466
- }
42
+ //#endregion
43
+ //#region src/classes/design/DesignChanged.ts
44
+ var xe = class {
45
+ constructor(e, t = Object.keys(e)) {
46
+ I(this, "cache", {}), this.props = e, this.watch = t;
47
+ }
48
+ is(e) {
49
+ return te(e) ? !!e.find((e) => this.isDifferent(e)) : this.isDifferent(e);
50
+ }
51
+ isChanged() {
52
+ let e = this.props;
53
+ return !!this.watch.find((t) => t in e && this.isDifferent(t));
54
+ }
55
+ update() {
56
+ let e = this.props;
57
+ this.watch.forEach((t) => {
58
+ t in e && this.isDifferent(t) && (this.cache[t] = e[t]);
59
+ });
60
+ }
61
+ isDifferent(e) {
62
+ var t, n;
63
+ return ((t = this.cache) == null ? void 0 : t[e]) !== ((n = this.props) == null ? void 0 : n[e]);
64
+ }
65
+ }, Se = class {
66
+ constructor(e, t, n) {
67
+ I(this, "event", {}), I(this, "changed", void 0), this.props = e, this.callback = t, this.changed = new xe(e, n);
68
+ }
69
+ make(e) {
70
+ return this.makeCallback(e), this;
71
+ }
72
+ is(e) {
73
+ return e in this.props;
74
+ }
75
+ isChanged(e, t) {
76
+ return !(e in this.event) || this.changed.is(t || e);
77
+ }
78
+ makeCallback(e = !1) {
79
+ (e || this.changed.isChanged()) && (this.initEvent(), this.makeCallbackItem(), this.changed.update());
80
+ }
81
+ makeCallbackItem() {
82
+ this.callback && this.callback(this.event);
83
+ }
84
+ }, Ce = class extends Se {
85
+ make(e) {
86
+ return this.makeCallback(e).then(), this;
87
+ }
88
+ async makeCallback(e) {
89
+ (e || this.changed.isChanged()) && (await this.initEvent(), this.makeCallbackItem(), this.changed.update());
90
+ }
91
+ };
92
+ //#endregion
93
+ //#region src/functions/ref/getRef.ts
94
+ function L(e) {
95
+ return j(e) ? e.value : e;
467
96
  }
468
- function D(s) {
469
- return V(s) ? s : f(s);
97
+ //#endregion
98
+ //#region src/functions/render/getClassName.ts
99
+ function we(e) {
100
+ return e && "class" in e && typeof e.class == "string" ? e.class : void 0;
470
101
  }
471
- class De {
472
- /**
473
- * Constructor
474
- * @param date date for processing. дата для обработки
475
- * @param type type of date format for output. тип формата даты вывода
476
- * @param code country and language code. код страны и языка
477
- */
478
- constructor(t, e = "date", i = R.getLocation()) {
479
- l(this, "item");
480
- l(this, "type");
481
- l(this, "code");
482
- l(this, "date");
483
- l(this, "datetime");
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(
491
- this.date.value,
492
- this.type.value,
493
- this.code.value
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();
499
- }
500
- /**
501
- * Returns the basic data for the date.
502
- *
503
- * Возвращает основные данные для даты.
504
- */
505
- getItem() {
506
- return this.item;
507
- }
508
- /**
509
- * Returns a Date object.
510
- *
511
- * Возвращает объект Date.
512
- */
513
- getDate() {
514
- return this.date;
515
- }
516
- /**
517
- * Obtaining an object of the basic Datetime class.
518
- *
519
- * Получение объекта основного класса Datetime.
520
- */
521
- getDatetime() {
522
- return this.datetime;
523
- }
524
- /**
525
- * Returns the format of hours.
526
- *
527
- * Возвращает формат часов.
528
- */
529
- getHoursType() {
530
- return u(() => this.date.value && this.datetime.getHoursType());
531
- }
532
- /**
533
- * Returns the code of the first day of the week.
534
- *
535
- * Возвращает код первого дня недели.
536
- */
537
- getFirstDayCode() {
538
- return u(() => this.date.value && this.datetime.getFirstDayCode());
539
- }
540
- /**
541
- * The method returns the year of the specified date according to local time.
542
- *
543
- * Метод возвращает год указанной даты по местному времени.
544
- */
545
- getYear() {
546
- return u(() => this.year.value);
547
- }
548
- /**
549
- * The method returns the month in the specified date according to local time,
550
- * as a zero-based value.
551
- *
552
- * Метод возвращает месяц указанной даты по местному времени, нумерация
553
- * месяцев начинается с нуля для первого месяца в году.
554
- */
555
- getMonth() {
556
- return u(() => this.month.value);
557
- }
558
- /**
559
- * The method returns the day of the month for the specified date according to local time.
560
- *
561
- * Метод возвращает день месяца указанной даты по местному времени.
562
- */
563
- getDay() {
564
- return u(() => this.day.value);
565
- }
566
- /**
567
- * The method returns the hour for the specified date, according to local time.
568
- *
569
- * Метод возвращает часы указанной даты по местному времени.
570
- */
571
- getHour() {
572
- return u(() => this.hour.value);
573
- }
574
- /**
575
- * The method returns the minutes in the specified date according to local time.
576
- *
577
- * Метод возвращает минуты указанной даты по местному времени.
578
- */
579
- getMinute() {
580
- return u(() => this.minute.value);
581
- }
582
- /**
583
- * The method returns the seconds in the specified date according to local time.
584
- *
585
- * Метод возвращает секунды указанной даты по местному времени.
586
- */
587
- getSecond() {
588
- return u(() => this.second.value);
589
- }
590
- /**
591
- * Returns the last day of the week.
592
- *
593
- * Возвращает последний день недели.
594
- */
595
- getMaxDay() {
596
- return u(() => this.date.value && this.datetime.getMaxDay());
597
- }
598
- /**
599
- * Enables language-sensitive date and time formatting.
600
- *
601
- * Конструктором объектов, включающих языка-зависимое форматирование даты и времени.
602
- * @param type type of date format for output. тип формата даты вывода
603
- * @param styleOptions the representation of the month. представление месяца
604
- */
605
- locale(t = this.type.value, e) {
606
- return u(() => this.date.value && this.datetime.locale(t, e));
607
- }
608
- /**
609
- * Output of standard data.
610
- *
611
- * Вывод стандартных данных.
612
- * @param timeZone add time zone. добавить временную зону
613
- */
614
- standard(t = !0) {
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;
624
- }
102
+ //#endregion
103
+ //#region src/functions/render/getIndexForRender.ts
104
+ function Te(e, t, n) {
105
+ let r = t == null ? void 0 : t.id, i = t == null ? void 0 : t.index, a = we(t), o = "";
106
+ if (O(e) && (o += e), n && (o += `.${n}`), i && O(i) && (o += `.${i}`), a && (o += `.${a}`), r && (o += `.${r}`), o !== "") return o;
625
107
  }
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
- }
108
+ //#endregion
109
+ //#region src/functions/ref/render.ts
110
+ function Ee(e, t, n, r) {
111
+ let i = t, a = t && "key" in t;
112
+ return (!t || !a) && (i = {
113
+ ...t,
114
+ key: Te(e, t, r)
115
+ }), ue(e, i, n);
646
116
  }
647
- /**
648
- * Effect scope instance.
649
- *
650
- * Экземпляр области действия эффекта.
651
- */
652
- l(F, "scope");
653
- class Ae extends Dt {
654
- /**
655
- * Classes Constructor
656
- * @param elementSelector element/ элемент
657
- * @param elementSelectorControl control element/ элемент управления
658
- * @param type type/ тип
659
- * @param listener the object that receives a notification (an object that implements the
660
- * Event interface) when an event of the specified type occurs/ объект, который принимает
661
- * уведомление, когда событие указанного типа произошло
662
- * @param options object that specifies characteristics/ объект options
663
- * @param detail an event-dependent value associated with the event/ зависимое от события
664
- * значение, связанное с событием
665
- */
666
- constructor(t, e, i = ["click"], n, r, a) {
667
- const h = D(t), c = D(e);
668
- super(
669
- h.value,
670
- i,
671
- n,
672
- r,
673
- a
674
- ), c.value && this.setElementControl(c.value), y(h, (o) => this.setElement(o)), y(c, (o) => this.setElementControl(o));
675
- }
117
+ //#endregion
118
+ //#region src/functions/toBind.ts
119
+ function R(e, t) {
120
+ let n = e == null ? void 0 : e.class, r = t == null ? void 0 : t.class, i = e == null ? void 0 : e.style, a = t == null ? void 0 : t.style, o = {
121
+ ...e,
122
+ ...t
123
+ };
124
+ return n && r && (o.class = [], n && o.class.push(n), r && o.class.push(r)), i && a && (o.style = [], i && o.style.push(i), a && o.style.push(a)), o;
676
125
  }
677
- class Be {
678
- /**
679
- * Constructor
680
- * @param code country and language code/ код страны и языка
681
- */
682
- constructor(t = R.getLocation()) {
683
- l(this, "code");
684
- l(this, "flag");
685
- this.code = D(t), this.flag = new At(this.code.value), y(this.code, (e) => this.flag.setCode(e));
686
- }
687
- /**
688
- * Obtaining a reactive object with the country code.
689
- *
690
- * Получение реактивного объекта с кодом страны.
691
- */
692
- getCode() {
693
- return this.code;
694
- }
695
- /**
696
- * Returns information about the country and its flag.
697
- *
698
- * Возвращает информацию о стране и её флаге.
699
- * @param code country code/ код страны
700
- */
701
- get(t = this.code.value) {
702
- return u(() => this.flag.get(t));
703
- }
704
- /**
705
- * Getting a link to the flag.
706
- *
707
- * Получение ссылки на флаг.
708
- * @param code country code/ код страны
709
- */
710
- getFlag(t = this.code.value) {
711
- return u(() => {
712
- var e;
713
- return (e = this.flag.get(t)) == null ? void 0 : e.icon;
714
- });
715
- }
716
- /**
717
- * Getting a list of countries by an array of codes.
718
- *
719
- * Получение списка стран по массиву с кодами.
720
- * @param codes country code/ код страны
721
- */
722
- getList(t) {
723
- return u(() => this.flag.getList(t));
724
- }
725
- /**
726
- * Getting a list of countries by an array of codes in national language.
727
- *
728
- * Получение списка стран по массиву с кодами на национальный язык.
729
- * @param codes country code/ код страны.
730
- */
731
- getNational(t) {
732
- return u(() => this.flag.getNational(t));
733
- }
126
+ //#endregion
127
+ //#region src/functions/toBinds.ts
128
+ function De(...e) {
129
+ let t = {};
130
+ return e.forEach((e) => {
131
+ e && (t = R(t, e));
132
+ }), t;
734
133
  }
735
- const I = class I {
736
- /**
737
- * Information about the current country.
738
- *
739
- * Информация об текущей стране.
740
- * @returns reactive object with full geographic information/ реактивный объект с полной географической информацией
741
- */
742
- static get() {
743
- return this.item;
744
- }
745
- /**
746
- * Current country.
747
- *
748
- * Текущая страна.
749
- * @returns reactive string with the current country code/ реактивная строка с кодом текущей страны
750
- */
751
- static getCountry() {
752
- return this.country;
753
- }
754
- /**
755
- * Current language.
756
- *
757
- * Текущий язык.
758
- * @returns reactive string with the current language code/ реактивная строка с кодом текущего языка
759
- */
760
- static getLanguage() {
761
- return this.language;
762
- }
763
- /**
764
- * Full format according to the standard.
765
- *
766
- * Полный формат согласно стандарту.
767
- * @returns reactive string with the full standard locale format/
768
- * реактивная строка с полным форматом стандарта локали
769
- */
770
- static getStandard() {
771
- return this.standard;
772
- }
773
- /**
774
- * Returns the first day of the week.
775
- *
776
- * Возвращает первый день недели.
777
- * @returns reactive string representing the first day of the week/
778
- * реактивная строка, представляющая первый день недели
779
- */
780
- static getFirstDay() {
781
- return this.firstDay;
782
- }
783
- /**
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
- */
790
- static set(t) {
791
- R.set(t, !0), this.item.value = R.getItem();
792
- }
134
+ //#endregion
135
+ //#region src/classes/design/DesignComponents.ts
136
+ var z = class {
137
+ constructor(e = {}, t) {
138
+ I(this, "caching", {}), this.components = e, this.modification = t;
139
+ }
140
+ is(e) {
141
+ return e in this.components;
142
+ }
143
+ get(e) {
144
+ var t;
145
+ return (t = this.components) == null ? void 0 : t[e];
146
+ }
147
+ getModification(e, t) {
148
+ if (e) {
149
+ e in this.caching || (this.caching[e] = A(() => this.computeModification(e)));
150
+ let n = this.caching[e];
151
+ if (n) return t ? De(n.value, t) : n.value;
152
+ }
153
+ return t;
154
+ }
155
+ render(e, t, n, r) {
156
+ let i = this.renderOne(e, t, n, r);
157
+ return i ? [i] : [];
158
+ }
159
+ renderOne(e, t, n, r) {
160
+ if (this.is(e)) {
161
+ let i = r == null ? e : r;
162
+ return Ee(this.get(e), this.getModification(i, t), n, i);
163
+ }
164
+ }
165
+ renderAdd(e, t, n, r, i) {
166
+ return e.push(...this.render(t, n, r, i)), this;
167
+ }
168
+ computeModification(e) {
169
+ var t;
170
+ let n = L((t = this.modification) == null ? void 0 : t[e]);
171
+ if (n && E(n)) {
172
+ let e = {};
173
+ return x(n, (t, n) => {
174
+ e[n] = L(t);
175
+ }), e;
176
+ }
177
+ return {};
178
+ }
179
+ }, Oe = class extends z {}, ke = class {
180
+ constructor(e, t, n) {
181
+ I(this, "name", void 0), I(this, "element", M()), I(this, "refs", void 0), I(this, "components", void 0), I(this, "emits", void 0), I(this, "classes", void 0), I(this, "classesSub", void 0), I(this, "styles", void 0), I(this, "stylesSub", void 0), I(this, "attrs", void 0), I(this, "slots", void 0), I(this, "dataExpose", void 0), this.props = t, this.options = n, this.name = this.initName(e), this.refs = this.props ? me(this.props) : {}, this.components = new z(n == null ? void 0 : n.components, n == null ? void 0 : n.compMod), this.emits = n == null ? void 0 : n.emits, this.classes = A(() => this.updateClasses()), this.styles = A(() => this.updateStyles()), this.attrs = ge(), this.slots = _e();
182
+ }
183
+ init() {
184
+ return this.classesSub = A(() => this.initClasses()), this.stylesSub = A(() => this.initStyles()), this.dataExpose = this.initExpose(), this;
185
+ }
186
+ getName() {
187
+ return this.name.join("-");
188
+ }
189
+ getDesign() {
190
+ return String(this.name[0]);
191
+ }
192
+ getSubClass(e) {
193
+ return `${this.getName()}__${k(e).join("__")}`;
194
+ }
195
+ getStatusClass(e) {
196
+ return `${this.getName()}--${k(e).join("--")}`;
197
+ }
198
+ getStyle(e) {
199
+ return `--${this.getName()}-sys-${k(e).join("-")}`;
200
+ }
201
+ getAttrs() {
202
+ var e;
203
+ let t = { ...(e = this.attrs) == null ? {} : e };
204
+ return "class" in t && delete t.class, "style" in t && delete t.style, t;
205
+ }
206
+ expose() {
207
+ var e;
208
+ return {
209
+ ...(e = this.dataExpose) == null ? {} : e,
210
+ elementHtml: this.element
211
+ };
212
+ }
213
+ render() {
214
+ return () => this.initRender();
215
+ }
216
+ initSlot(e, t, n = {}) {
217
+ var r;
218
+ if (this.slots && (r = this.slots) != null && r[e] && typeof this.slots[e] == "function") {
219
+ let r = this.slots[e](n);
220
+ return t && t.push(r), r;
221
+ }
222
+ }
223
+ toClass(e) {
224
+ return E(e) ? e : Array.isArray(e) ? { [e.filter((e) => typeof e == "string" && e.trim() !== "").join(" ")]: !0 } : typeof e == "string" ? { [e]: !0 } : {};
225
+ }
226
+ toClassName(e) {
227
+ if (T(e)) {
228
+ let t = {};
229
+ return x(e, (e, n) => {
230
+ n.match(/\?\?/) ? t[n.replace(/\?\?/, this.getName())] = e : n.match(/\?/) ? t[n.replace(/\?/, this.getDesign())] = e : t[n] = e;
231
+ }), t;
232
+ }
233
+ return {};
234
+ }
235
+ initName(e) {
236
+ return x(e.split(".", 2), (e) => ae(e));
237
+ }
238
+ updateClasses() {
239
+ var e, t, n;
240
+ let r = (e = this.classesSub) == null ? void 0 : e.value, i = (t = this.options) == null || (t = t.classes) == null ? void 0 : t.value;
241
+ if (r && i) {
242
+ var a;
243
+ return {
244
+ ...r,
245
+ ...i,
246
+ main: {
247
+ ...this.toClass(r == null ? void 0 : r.main),
248
+ ...this.toClass(i == null ? void 0 : i.main),
249
+ ...this.toClass((a = this.attrs) == null ? void 0 : a.class)
250
+ }
251
+ };
252
+ }
253
+ return (n = i == null ? r : i) == null ? { main: {} } : n;
254
+ }
255
+ updateStyles() {
256
+ var e, t, n;
257
+ let r = (e = this.stylesSub) == null ? void 0 : e.value, i = (t = this.options) == null || (t = t.styles) == null ? void 0 : t.value;
258
+ return r && i ? {
259
+ ...r,
260
+ ...i
261
+ } : (n = i == null ? r : i) == null ? {} : n;
262
+ }
793
263
  };
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 {
797
- /**
798
- * Constructor
799
- * @param code country code, full form language-country or one of them/
800
- * код страны, полный вид язык-страна или один из них
801
- */
802
- constructor(t) {
803
- l(this, "location");
804
- l(this, "intl");
805
- this.location = D(t), this.intl = u(() => {
806
- var e;
807
- return new Bt((e = this.location.value) != null ? e : P.getLanguage().value);
808
- });
809
- }
810
- /**
811
- * The consistent translation of language, region and script display names.
812
- *
813
- * Последовательный перевод отображаемых названий языка, региона и скрипта.
814
- * @param value the code to provide depends on the type/ предоставляемый код зависит от типа
815
- * @param typeOptions an object with some or all of the following properties/
816
- * объект с некоторыми или всеми из следующих свойств
817
- */
818
- display(t, e) {
819
- return u(() => this.intl.value.display(g(t), e));
820
- }
821
- /**
822
- * Get display names of language.
823
- *
824
- * Получить отображаемые имена языка.
825
- * @param value the code to provide depends on the type/ предоставляемый код зависит от типа
826
- * @param style the formatting style to use/ используемый стиль форматирования
827
- */
828
- languageName(t, e) {
829
- return u(() => this.intl.value.languageName(g(t), e));
830
- }
831
- /**
832
- * Get display names of region.
833
- *
834
- * Получить отображаемые имена региона.
835
- * @param value the code to provide depends on the type/ предоставляемый код зависит от типа
836
- * @param style the formatting style to use/ используемый стиль форматирования
837
- */
838
- countryName(t, e) {
839
- return u(() => this.intl.value.countryName(g(t), e));
840
- }
841
- /**
842
- * In basic use without specifying a locale, a formatted string.
843
- *
844
- * При обычном использовании без указания локали форматированная строка
845
- *
846
- * @param value a number, bigint, or string, to format/ число для форматирования
847
- * @param options an object with some or all properties/ объект с некоторыми
848
- * или всеми свойствами
849
- */
850
- number(t, e) {
851
- return u(() => this.intl.value.number(g(t), e));
852
- }
853
- /**
854
- * Decimal point symbol.
855
- *
856
- * Символ десятичной точки.
857
- */
858
- decimal() {
859
- return u(() => this.intl.value.decimal());
860
- }
861
- /**
862
- * Currency formatting.
863
- *
864
- * Форматирование валюты.
865
- * @param value a number, bigint, or string, to format/ число для форматирования
866
- * @param currencyOptions the currency to use in currency formatting/
867
- * валюта для использования в форматировании валюты
868
- * @param numberOnly do not display the currency symbol/ не выводить значок валюты
869
- */
870
- currency(t, e, i = !1) {
871
- return u(
872
- () => this.intl.value.currency(
873
- g(t),
874
- g(e),
875
- i
876
- )
877
- );
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
- }
891
- /**
892
- * Unit formatting.
893
- * If the style is 'unit', a unit property must be provided.
894
- *
895
- * Форматирование юнитов.
896
- * @param value a number, bigint, or string, to format/ число для форматирования
897
- * @param unitOptions the unit to use in unit formatting/ блок для использования
898
- * в форматировании блока
899
- */
900
- unit(t, e) {
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));
911
- }
912
- /**
913
- * Number as a percentage.
914
- *
915
- * Число в виде процента.
916
- * @param value a number, bigint, or string, to format/ число для форматирования
917
- * @param options an object with some or all properties/ объект с некоторыми или всеми свойствами
918
- */
919
- percent(t, e) {
920
- return u(() => this.intl.value.percent(g(t), e));
921
- }
922
- /**
923
- * Number as a percentage (unit).
924
- *
925
- * Число в виде процента (единица).
926
- * @param value a number, bigint, or string, to format/ число для форматирования
927
- * @param options an object with some or all properties/
928
- * объект с некоторыми или всеми свойствами
929
- */
930
- percentBy100(t, e) {
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));
943
- }
944
- /**
945
- * Enables language-sensitive date and time formatting.
946
- *
947
- * Конструктором объектов, включающих языка-зависимое форматирование даты и времени.
948
- * @param value the date to format/ дата для форматирования
949
- * @param type type of data format/ тип формата data
950
- * @param styleOptions the representation of the month/ представление месяца
951
- * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
952
- */
953
- date(t, e, i, n) {
954
- return u(() => this.intl.value.date(g(t), e, i, n));
955
- }
956
- /**
957
- * Enables language-sensitive relative time formatting.
958
- *
959
- * Включает форматирование относительного времени с учетом языка.
960
- * @param value a number, bigint, or string, to format/ число для форматирования
961
- * @param styleOptions the length of the internationalized message/
962
- * длина интернационализированного сообщения
963
- * @param todayValue current day/ текущий день
964
- */
965
- relative(t, e, i) {
966
- return u(() => this.intl.value.relative(g(t), e, i));
967
- }
968
- /**
969
- * Enables language-sensitive relative time formatting
970
- * Including the ability to add a limit to output the standard time format if the value
971
- * exceeds the allowable limit.
972
- *
973
- * Включает форматирование относительного времени с учетом языка.
974
- * Включая возможность добавления лимита, чтобы выводить уже стандартный формат времени,
975
- * если значение вышло за пределы допустимого.
976
- * @param value a number, bigint, or string, to format/ число для форматирования
977
- * @param limit values that determine the output limit (values per day)/
978
- * значения, по которым определяем предел вывода (значения в день)
979
- * @param todayValue current day/ текущий день
980
- * @param relativeOptions the length of the internationalized message/
981
- * длина интернационализированного сообщения
982
- * @param dateOptions the representation of the month/ представление месяца
983
- * @param type type of data format/ тип формата data
984
- * @param hour24 whether to use 12-hour time/ использовать ли 12-часовое время
985
- */
986
- relativeLimit(t, e, i, n, r, a, h) {
987
- return u(() => this.intl.value.relativeLimit(
988
- g(t),
989
- e,
990
- i,
991
- n,
992
- r,
993
- a,
994
- h
995
- ));
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
- }
1006
- /**
1007
- * Names of months.
1008
- *
1009
- * Названия месяцев.
1010
- * @param value the date to format/ дата для форматирования
1011
- * @param style the representation of the month/ представление месяца
1012
- */
1013
- month(t, e) {
1014
- return u(() => this.intl.value.month(g(t), e));
1015
- }
1016
- /**
1017
- * Array to list of months.
1018
- *
1019
- * Массив в список месяцев.
1020
- * @param style the representation of the month/ представление месяца
1021
- */
1022
- months(t) {
1023
- return u(() => this.intl.value.months(t));
1024
- }
1025
- /**
1026
- * Returns names of days of the week.
1027
- *
1028
- * Возвращает названия дней недели.
1029
- * @param value the date to format/ дата для форматирования
1030
- * @param style the representation of the weekday/ представление о дне недели
1031
- */
1032
- weekday(t, e) {
1033
- return u(() => this.intl.value.weekday(g(t), e));
1034
- }
1035
- /**
1036
- * An array of the list of names of the days of the week.
1037
- *
1038
- * Массив из списка названий дней недели.
1039
- * @param style the representation of the weekday/ представление о дне недели
1040
- */
1041
- weekdays(t) {
1042
- return u(() => this.intl.value.weekdays(t));
1043
- }
1044
- /**
1045
- * Time.
1046
- *
1047
- * Время.
1048
- * @param value the date to format/ дата для форматирования
1049
- */
1050
- time(t) {
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));
1062
- }
264
+ //#endregion
265
+ //#region src/functions/ref/toRefItem.ts
266
+ function B(e) {
267
+ return j(e) ? e : M(e);
1063
268
  }
1064
- class pt {
1065
- /**
1066
- * Creates an instance of ListData for managing list data.
1067
- *
1068
- * Создает экземпляр ListData для управления данными списка.
1069
- * @param list List data / данные списка
1070
- * @param focus Focused item / элемент в фокусе
1071
- * @param highlight Search text for highlighting / текст поиска для выделения
1072
- * @param highlightLengthStart Minimum length to start highlighting / минимальная длина для начала выделения
1073
- * @param filterMode Filter mode / режим фильтрации
1074
- * @param selected Selected items / выбранные элементы
1075
- * @param keyValue Key for getting item value / ключ для получения значения элемента
1076
- * @param keyLabel Key for getting item label / ключ для получения метки элемента
1077
- * @param lite Threshold for lite mode / порог для облегченного режима
1078
- * @param min Minimum number of selections / минимальное количество выделений
1079
- * @param max Maximum number of selections / максимальное количество выделений
1080
- * @param parent Parent identifier / идентификатор родителя
1081
- */
1082
- constructor(t, e, i, n, r, a, h, c, o, m = 0, S = 9999999, d) {
1083
- l(this, "subList", {});
1084
- /**
1085
- * Returns a list for forming a list.
1086
- *
1087
- * Возвращает список для формирования списка.
1088
- * @returns reactive list of items/ реактивный список элементов
1089
- */
1090
- l(this, "data", u(
1091
- () => E(
1092
- g(this.list) || [],
1093
- (t, e) => this.initItem(e, t)
1094
- )
1095
- ));
1096
- /**
1097
- * Returns a simplified list for quick loading.
1098
- *
1099
- * Возвращает упрощенный список для быстрой загрузки.
1100
- * @returns simplified reactive list/ упрощенный реактивный список
1101
- */
1102
- l(this, "liteData", u(() => {
1103
- if (this.isLite()) {
1104
- const t = [];
1105
- for (const e of this.data.value) {
1106
- const i = {
1107
- parent: this.parent,
1108
- index: e.index,
1109
- type: e.type,
1110
- label: e.label,
1111
- description: e.description,
1112
- value: e.value
1113
- };
1114
- "description" in e && (i.description = e.description), t.push(i);
1115
- }
1116
- return t;
1117
- }
1118
- return this.data.value;
1119
- }));
1120
- /**
1121
- * Returns a list of records with all additional data (focus, selection, disabled status).
1122
- *
1123
- * Возвращает список записей со всеми дополнительными данными (фокус, выделение, статус активности).
1124
- * @returns full reactive list/ полный реактивный список
1125
- */
1126
- l(this, "fullData", u(() => {
1127
- const t = this.getFocus(), e = this.getHighlight(), i = this.getSelected();
1128
- return E(
1129
- this.data.value,
1130
- (n) => {
1131
- var a, h;
1132
- const r = T(n.index, i);
1133
- return {
1134
- ...n,
1135
- focus: t === n.index,
1136
- highlight: e,
1137
- filterMode: (a = this.filterMode) == null ? void 0 : a.value,
1138
- selected: r,
1139
- disabled: (h = n.disabled) != null ? h : !r && n.type === "item" && this.isSelectedMax.value
1140
- };
1141
- }
1142
- );
1143
- }));
1144
- /**
1145
- * Returns a flat map of all entries including sublists.
1146
- *
1147
- * Возвращает плоскую карту всех записей, включая подсписки.
1148
- * @returns reactive flat list/ реактивный плоский список
1149
- */
1150
- l(this, "map", u(() => {
1151
- const t = [];
1152
- return this.data.value.forEach((e) => {
1153
- switch (e.type) {
1154
- case "item":
1155
- t.push(e);
1156
- break;
1157
- case "group":
1158
- case "menu":
1159
- t.push(
1160
- e,
1161
- ...this.getSubList(e).map.value
1162
- );
1163
- break;
1164
- }
1165
- }), t;
1166
- }));
1167
- /** Returns a list consisting only of items/ Возвращает список, состоящий только из элементов. */
1168
- l(this, "mapItems", u(() => this.map.value.filter((t) => t.type === "item")));
1169
- /**
1170
- * Returns a list consisting only of values for selection (item, group, menu).
1171
- *
1172
- * Возвращает список, состоящий только из значений для выбора (item, group, menu).
1173
- * @returns reactive list/ реактивный список
1174
- */
1175
- l(this, "items", u(() => this.map.value.filter(
1176
- (t) => t.type === "item" || t.type === "group" || t.type === "menu"
1177
- )));
1178
- /**
1179
- * Finds the first element that meets the search conditions.
1180
- *
1181
- * Находит первый элемент, соответствующий условиям поиска.
1182
- * @returns first found index/ первый найденный индекс
1183
- */
1184
- l(this, "highlightFirstItem", u(() => {
1185
- const t = this.getHighlight();
1186
- if (t && t.length >= this.getHighlightLengthStart()) {
1187
- const e = Mt(t, "i");
1188
- if (e)
1189
- return this.map.value.findIndex(
1190
- (i) => {
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));
1193
- }
1194
- );
1195
- }
1196
- return -1;
1197
- }));
1198
- /**
1199
- * Is there a selected item.
1200
- *
1201
- * Есть ли выбранный элемент.
1202
- * @returns true if selection exists/ true, если есть выбор
1203
- */
1204
- l(this, "isSelected", u(() => {
1205
- const t = this.getSelected();
1206
- return !!t && this.mapItems.value.findIndex((e) => T(e.index, t)) !== -1;
1207
- }));
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;
1217
- }));
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;
1227
- }));
1228
- /**
1229
- * Returns a list of selected items on the map.
1230
- *
1231
- * Возвращает список выделенных элементов на карте.
1232
- * @returns reactive list of selected items/ реактивный список выделенных элементов
1233
- */
1234
- l(this, "selectedList", u(() => {
1235
- const t = this.getSelected();
1236
- return t && this.isSelected.value ? this.mapItems.value.filter((e) => T(e.index, t)) : [];
1237
- }));
1238
- /**
1239
- * Returns a list of selected items in the current group.
1240
- *
1241
- * Возвращает список выделенных элементов в текущей группе.
1242
- * @returns reactive list of selected items in group/ реактивный список выделенных элементов в группе
1243
- */
1244
- l(this, "selectedListInGroup", u(() => {
1245
- const t = this.getSelected();
1246
- return t && this.isSelected.value ? this.data.value.filter((e) => T(e.index, t)) : [];
1247
- }));
1248
- /**
1249
- * Returns a list of selected labels on the map.
1250
- *
1251
- * Возвращает список названий выделенных элементов на карте.
1252
- * @returns reactive list of labels/ реактивный список названий
1253
- */
1254
- l(this, "selectedNames", u(() => lt(this.selectedList.value, "label")));
1255
- /**
1256
- * Returns a list of selected values on the map.
1257
- *
1258
- * Возвращает список значений выделенных элементов на карте.
1259
- * @returns reactive list of values/ реактивный список значений
1260
- */
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, () => {
1263
- this.subList = {};
1264
- });
1265
- }
1266
- /**
1267
- * Checks whether it is necessary to first display a simplified version.
1268
- *
1269
- * Проверяет, надо ли сначала вывести упрощенную версию.
1270
- * @returns true if lite mode is active/ true, если активен облегченный режим
1271
- */
1272
- isLite() {
1273
- var t;
1274
- return !!((t = this.lite) != null && t.value && this.data.value.length > this.lite.value);
1275
- }
1276
- /**
1277
- * Checks if an element is in focus.
1278
- *
1279
- * Проверяет, есть ли элемент в фокусе.
1280
- * @returns true if focus exists/ true, если есть фокус
1281
- */
1282
- isFocus() {
1283
- const t = this.getFocus();
1284
- return !!(t && this.map.value.findIndex((e) => e.index === t) !== -1);
1285
- }
1286
- /**
1287
- * Checks if there is a highlighted item (search results).
1288
- *
1289
- * Проверяет, есть ли найденный элемент (результаты поиска).
1290
- * @returns true if highlight exists/ true, если есть совпадения
1291
- */
1292
- isHighlight() {
1293
- return this.highlightFirstItem.value !== -1;
1294
- }
1295
- /**
1296
- * Checks if highlighting is active (minimum length reached).
1297
- *
1298
- * Проверяет, активно ли выделение (достигнута минимальная длина).
1299
- * @returns true if active/ true, если активно
1300
- */
1301
- isHighlightActive() {
1302
- var t, e;
1303
- return ((e = (t = this.getHighlight()) == null ? void 0 : t.length) != null ? e : 0) < this.getHighlightLengthStart() || this.isHighlight();
1304
- }
1305
- /**
1306
- * Returns the number of records in the current list.
1307
- *
1308
- * Возвращает количество записей в текущем списке.
1309
- * @returns length/ количество
1310
- */
1311
- getLength() {
1312
- return this.data.value.length;
1313
- }
1314
- /**
1315
- * Returns the number of all available records in the map.
1316
- *
1317
- * Возвращает количество всех доступных записей в карте.
1318
- * @returns length/ количество
1319
- */
1320
- getLengthByMap() {
1321
- return this.map.value.length;
1322
- }
1323
- /**
1324
- * Returns the number of all available records (items).
1325
- *
1326
- * Возвращает количество всех доступных записей (элементы).
1327
- * @returns length/ количество
1328
- */
1329
- getLengthByItems() {
1330
- return this.items.value.length;
1331
- }
1332
- /**
1333
- * Returns the identifier in focus.
1334
- *
1335
- * Возвращает идентификатор в фокусе.
1336
- * @returns focus identifier/ идентификатор в фокусе
1337
- */
1338
- getFocus() {
1339
- var t;
1340
- return (t = this.focus) == null ? void 0 : t.value;
1341
- }
1342
- /**
1343
- * Returns the highlight text.
1344
- *
1345
- * Возвращает текст для выделения.
1346
- * @returns text/ текст
1347
- */
1348
- getHighlight() {
1349
- var t;
1350
- return (t = this.highlight) == null ? void 0 : t.value;
1351
- }
1352
- /**
1353
- * Returns the minimum length for highlight to start.
1354
- *
1355
- * Возвращает минимальную длину для начала выделения.
1356
- * @returns length/ длина
1357
- */
1358
- getHighlightLengthStart() {
1359
- var t, e;
1360
- return (e = (t = this.highlightLengthStart) == null ? void 0 : t.value) != null ? e : 2;
1361
- }
1362
- /**
1363
- * Returns the selected identifiers list.
1364
- *
1365
- * Возвращает список выбранных идентификаторов.
1366
- * @returns list/ список
1367
- */
1368
- getSelected() {
1369
- var t;
1370
- return (t = this.selected) == null ? void 0 : t.value;
1371
- }
1372
- /**
1373
- * Returns an item by moving a certain number of steps from the selected item.
1374
- *
1375
- * Возвращает элемент, перемещаясь на определенное количество шагов от выбранного элемента.
1376
- * @param step number of steps/ количество шагов
1377
- * @returns target item index/ индекс целевого элемента
1378
- */
1379
- getSelectedByStep(t) {
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);
1474
- }
1475
- /**
1476
- * Returns an item by its index.
1477
- *
1478
- * Возвращает элемент по его индексу.
1479
- * @param index item index/ индекс элемента
1480
- * @returns found item details/ информация о найденном элементе
1481
- */
1482
- getItemByIndex(t) {
1483
- const e = this.map.value.findIndex((i) => i.index === t);
1484
- if (e !== -1)
1485
- return {
1486
- key: e,
1487
- item: this.map.value[e]
1488
- };
1489
- }
1490
- /**
1491
- * Returns an item by its key.
1492
- *
1493
- * Возвращает элемент по его ключу.
1494
- * @param key item key/ ключ элемента
1495
- * @returns found item/ найденный элемент
1496
- */
1497
- getItemByKey(t) {
1498
- var e;
1499
- return (e = this.map.value) == null ? void 0 : e[t];
1500
- }
1501
- /**
1502
- * Returns the first item with the specified parent.
1503
- *
1504
- * Возвращает первый элемент с указанным родителем.
1505
- * @param parent parent identifier to search for / идентификатор родителя для поиска
1506
- * @returns first item/ первый элемент
1507
- */
1508
- getFirstItemByParent(t) {
1509
- return this.map.value.find((e) => this.isInParent(t, e));
1510
- }
1511
- /**
1512
- * Returns the last item with the specified parent.
1513
- *
1514
- * Возвращает последний элемент с указанным родителем.
1515
- * @param parent parent identifier to search for / идентификатор родителя для поиска
1516
- * @returns last item/ последний элемент
1517
- */
1518
- getLastItemByParent(t) {
1519
- return this.map.value.filter((e) => this.isInParent(t, e)).pop();
1520
- }
1521
- /**
1522
- * Returns a sublist object for a group item.
1523
- *
1524
- * Возвращает объект подсписка для группового элемента.
1525
- * @param item List item data/ данные элемента списка
1526
- * @returns sublist instance/ экземпляр подсписка
1527
- */
1528
- getSubList(t) {
1529
- return t.index in this.subList || (this.subList[t.index] = new pt(
1530
- t.value,
1531
- this.focus,
1532
- this.highlight,
1533
- this.highlightLengthStart,
1534
- this.filterMode,
1535
- this.selected,
1536
- this.keyValue,
1537
- this.keyLabel,
1538
- this.lite,
1539
- this.min,
1540
- this.max,
1541
- t.index
1542
- )), this.subList[t.index];
1543
- }
1544
- /**
1545
- * Checks if the item is an item, group, or menu.
1546
- *
1547
- * Проверяет, является ли элемент элементом, группой или меню.
1548
- * @param item List item data/ данные элемента списка
1549
- */
1550
- isItem(t) {
1551
- return t.type === "item" || t.type === "group" || t.type === "menu";
1552
- }
1553
- /**
1554
- * Checks if the item is in the specified parent.
1555
- *
1556
- * Проверяет, находится ли элемент в указанном родителе.
1557
- * @param parent parent identifier to search for / идентификатор родителя для поиска
1558
- * @param item List item data/ данные элемента списка
1559
- */
1560
- isInParent(t, e) {
1561
- return e.parent === t && this.isItem(e);
1562
- }
1563
- /**
1564
- * Returns the index for the list item.
1565
- *
1566
- * Возвращает индекс для элемента списка.
1567
- * @param index current index / текущий индекс
1568
- * @param value item value / значение элемента
1569
- * @param key item key / ключ элемента
1570
- * @param label item label / метка элемента
1571
- */
1572
- getIndex(t, e, i, n) {
1573
- return t && !Z(t) ? t : e && !Z(e) ? e : i && n;
1574
- }
1575
- /**
1576
- * Creates an object of the record element.
1577
- *
1578
- * Создает объект элемента записи.
1579
- * @param key the value of the key in the element/ значения ключа у элемента
1580
- * @param item selected element/ выбранный элемент
1581
- */
1582
- initItem(t, 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(
1586
- e == null ? void 0 : e.index,
1587
- o,
1588
- t,
1589
- m
1590
- );
1591
- return {
1592
- ...e,
1593
- parent: this.parent,
1594
- index: S,
1595
- type: (c = e == null ? void 0 : e.type) != null ? c : "item",
1596
- label: m,
1597
- value: o
1598
- };
1599
- }
1600
- return {
1601
- parent: this.parent,
1602
- index: t.toString(),
1603
- type: "item",
1604
- label: e,
1605
- value: t
1606
- };
1607
- }
1608
- }
1609
- class St {
1610
- /**
1611
- * Get router instance.
1612
- *
1613
- * Получить экземпляр роутера.
1614
- */
1615
- static get() {
1616
- return this.router;
1617
- }
1618
- /**
1619
- * Returns the link by name.
1620
- *
1621
- * Возвращает ссылку по имени.
1622
- * @param name route name/ имя маршрута
1623
- * @param params route parameters/ параметры маршрута
1624
- * @param query route query/ запрос маршрута
1625
- */
1626
- static getLink(t, e, i) {
1627
- var n;
1628
- return (n = this.router) == null ? void 0 : n.resolve({ name: t, params: e, query: i }).href;
1629
- }
1630
- /**
1631
- * Returns the link property by name.
1632
- *
1633
- * Возвращает свойство ссылки по имени.
1634
- * @param name route name/ имя маршрута
1635
- * @param params route parameters/ параметры маршрута
1636
- * @param query route query/ запрос маршрута
1637
- */
1638
- static getHref(t, e, i) {
1639
- if (t) {
1640
- const n = this.getLink(t, e, i);
1641
- if (n)
1642
- return { href: n };
1643
- }
1644
- return {};
1645
- }
1646
- /**
1647
- * Site path change.
1648
- *
1649
- * Изменение пути сайта.
1650
- * @param to new path/ новый путь
1651
- */
1652
- static push(t) {
1653
- this.router && this.router.push(t).then();
1654
- }
1655
- /**
1656
- * Set router instance.
1657
- *
1658
- * Установить экземпляр роутера.
1659
- * @param router router instance/ экземпляр роутера
1660
- */
1661
- static set(t) {
1662
- this.router = t;
1663
- }
1664
- /**
1665
- * Set router instance only once.
1666
- *
1667
- * Установить экземпляр роутера только один раз.
1668
- * @param router router instance/ экземпляр роутера
1669
- */
1670
- static setOneTime(t) {
1671
- this.router || this.set(t);
1672
- }
1673
- /**
1674
- * Converts the raw route location to href properties.
1675
- *
1676
- * Преобразует необработанное местоположение маршрута в свойства href.
1677
- * @param to raw route location/ необработанное местоположение маршрута
1678
- */
1679
- static rawToHref(t) {
1680
- return j(t) && "name" in t && X(t == null ? void 0 : t.name) ? this.getHref(t.name) : {};
1681
- }
1682
- }
1683
- l(St, "router");
1684
- class Me {
1685
- /**
1686
- * Constructor
1687
- */
1688
- constructor() {
1689
- /**
1690
- * Reactive item.
1691
- *
1692
- * Реактивный элемент.
1693
- */
1694
- l(this, "item", f());
1695
- /**
1696
- * Checks whether the scroll width is defined.
1697
- *
1698
- * Проверяет, определена ли ширина скролла.
1699
- */
1700
- l(this, "is", u(() => this.item.value !== void 0));
1701
- Nt.is().then((t) => {
1702
- this.item.value = t;
1703
- });
1704
- }
1705
- }
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
- };
269
+ //#endregion
270
+ //#region src/classes/ref/DatetimeRef.ts
271
+ var Ae = class {
272
+ constructor(e, t = "date", n = l.getLocation()) {
273
+ I(this, "item", void 0), I(this, "type", void 0), I(this, "code", void 0), I(this, "date", void 0), I(this, "datetime", void 0), I(this, "year", M(2e3)), I(this, "month", M(1)), I(this, "day", M(1)), I(this, "hour", M(1)), I(this, "minute", M(1)), I(this, "second", M(1)), this.item = B(e), this.type = B(t), this.code = B(n), this.date = M(oe(this.item.value)), this.datetime = new a(this.date.value, this.type.value, this.code.value), P(this.item, (e) => {
274
+ this.date.value = oe(e);
275
+ }), P(this.type, (e) => this.datetime.setType(e)), P(this.code, (e) => this.datetime.setCode(e)), P(this.date, (e) => {
276
+ this.datetime.setDate(e), this.updateDate();
277
+ }), this.datetime.setWatch(() => he(this.date)), this.updateDate();
278
+ }
279
+ getItem() {
280
+ return this.item;
281
+ }
282
+ getDate() {
283
+ return this.date;
284
+ }
285
+ getDatetime() {
286
+ return this.datetime;
287
+ }
288
+ getHoursType() {
289
+ return A(() => this.date.value && this.datetime.getHoursType());
290
+ }
291
+ getFirstDayCode() {
292
+ return A(() => this.date.value && this.datetime.getFirstDayCode());
293
+ }
294
+ getYear() {
295
+ return A(() => this.year.value);
296
+ }
297
+ getMonth() {
298
+ return A(() => this.month.value);
299
+ }
300
+ getDay() {
301
+ return A(() => this.day.value);
302
+ }
303
+ getHour() {
304
+ return A(() => this.hour.value);
305
+ }
306
+ getMinute() {
307
+ return A(() => this.minute.value);
308
+ }
309
+ getSecond() {
310
+ return A(() => this.second.value);
311
+ }
312
+ getMaxDay() {
313
+ return A(() => this.date.value && this.datetime.getMaxDay());
314
+ }
315
+ locale(e = this.type.value, t) {
316
+ return A(() => this.date.value && this.datetime.locale(e, t));
317
+ }
318
+ standard(e = !0) {
319
+ return A(() => this.date.value && this.datetime.standard(e));
320
+ }
321
+ updateDate() {
322
+ 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;
323
+ }
324
+ }, V = class {
325
+ static run(e) {
326
+ return this.getScope().run(e);
327
+ }
328
+ static getScope() {
329
+ return this.scope || (this.scope = ce(!0)), this.scope;
330
+ }
331
+ };
332
+ I(V, "scope", void 0);
333
+ //#endregion
334
+ //#region src/classes/ref/EventRef.ts
335
+ var je = class extends s {
336
+ constructor(e, t, n = ["click"], r, i, a) {
337
+ let o = B(e), s = B(t);
338
+ super(o.value, n, r, i, a), s.value && this.setElementControl(s.value), P(o, (e) => this.setElement(e)), P(s, (e) => this.setElementControl(e));
339
+ }
340
+ }, Me = class {
341
+ constructor(e = l.getLocation()) {
342
+ I(this, "code", void 0), I(this, "flag", void 0), this.code = B(e), this.flag = new u(this.code.value), P(this.code, (e) => this.flag.setCode(e));
343
+ }
344
+ getCode() {
345
+ return this.code;
346
+ }
347
+ get(e = this.code.value) {
348
+ return A(() => this.flag.get(e));
349
+ }
350
+ getFlag(e = this.code.value) {
351
+ return A(() => {
352
+ var t;
353
+ return (t = this.flag.get(e)) == null ? void 0 : t.icon;
354
+ });
355
+ }
356
+ getList(e) {
357
+ return A(() => this.flag.getList(e));
358
+ }
359
+ getNational(e) {
360
+ return A(() => this.flag.getNational(e));
361
+ }
362
+ }, H, U = class {
363
+ static get() {
364
+ return this.item;
365
+ }
366
+ static getCountry() {
367
+ return this.country;
368
+ }
369
+ static getLanguage() {
370
+ return this.language;
371
+ }
372
+ static getStandard() {
373
+ return this.standard;
374
+ }
375
+ static getFirstDay() {
376
+ return this.firstDay;
377
+ }
378
+ static set(e) {
379
+ l.set(e, !0), this.item.value = l.getItem();
380
+ }
381
+ };
382
+ H = U, I(U, "item", N(l.get())), I(U, "country", A(() => H.item.value.country)), I(U, "language", A(() => H.item.value.language)), I(U, "standard", A(() => H.item.value.standard)), I(U, "firstDay", A(() => H.item.value.firstDay));
383
+ //#endregion
384
+ //#region src/classes/ref/GeoIntlRef.ts
385
+ var Ne = class {
386
+ constructor(e) {
387
+ I(this, "location", void 0), I(this, "intl", void 0), this.location = B(e), this.intl = A(() => {
388
+ var e;
389
+ return new d((e = this.location.value) == null ? U.getLanguage().value : e);
390
+ });
391
+ }
392
+ display(e, t) {
393
+ return A(() => this.intl.value.display(L(e), t));
394
+ }
395
+ languageName(e, t) {
396
+ return A(() => this.intl.value.languageName(L(e), t));
397
+ }
398
+ countryName(e, t) {
399
+ return A(() => this.intl.value.countryName(L(e), t));
400
+ }
401
+ number(e, t) {
402
+ return A(() => this.intl.value.number(L(e), t));
403
+ }
404
+ decimal() {
405
+ return A(() => this.intl.value.decimal());
406
+ }
407
+ currency(e, t, n = !1) {
408
+ return A(() => this.intl.value.currency(L(e), L(t), n));
409
+ }
410
+ currencySymbol(e, t = "symbol") {
411
+ return A(() => this.intl.value.currencySymbol(L(e), t));
412
+ }
413
+ unit(e, t) {
414
+ return A(() => this.intl.value.unit(L(e), t));
415
+ }
416
+ sizeFile(e, t = "byte") {
417
+ return A(() => this.intl.value.sizeFile(L(e), t));
418
+ }
419
+ percent(e, t) {
420
+ return A(() => this.intl.value.percent(L(e), t));
421
+ }
422
+ percentBy100(e, t) {
423
+ return A(() => this.intl.value.percentBy100(L(e), t));
424
+ }
425
+ plural(e, t, n, r) {
426
+ return A(() => this.intl.value.plural(L(e), t, n, r));
427
+ }
428
+ date(e, t, n, r) {
429
+ return A(() => this.intl.value.date(L(e), t, n, r));
430
+ }
431
+ relative(e, t, n) {
432
+ return A(() => this.intl.value.relative(L(e), t, n));
433
+ }
434
+ relativeLimit(e, t, n, r, i, a, o) {
435
+ return A(() => this.intl.value.relativeLimit(L(e), t, n, r, i, a, o));
436
+ }
437
+ relativeByValue(e, t, n) {
438
+ return A(() => this.intl.value.relativeByValue(L(e), t, n));
439
+ }
440
+ month(e, t) {
441
+ return A(() => this.intl.value.month(L(e), t));
442
+ }
443
+ months(e) {
444
+ return A(() => this.intl.value.months(e));
445
+ }
446
+ weekday(e, t) {
447
+ return A(() => this.intl.value.weekday(L(e), t));
448
+ }
449
+ weekdays(e) {
450
+ return A(() => this.intl.value.weekdays(e));
451
+ }
452
+ time(e) {
453
+ return A(() => this.intl.value.time(L(e)));
454
+ }
455
+ sort(e, t = (e, t) => [e, t]) {
456
+ return A(() => this.intl.value.sort([...L(e)], t));
457
+ }
458
+ }, Pe = class e {
459
+ constructor(e, t, n, r, i, a, o, s, c, l = 0, u = 9999999, d) {
460
+ I(this, "subList", {}), I(this, "data", A(() => x(L(this.list) || [], (e, t) => this.initItem(t, e)))), I(this, "liteData", A(() => {
461
+ if (this.isLite()) {
462
+ let e = [];
463
+ for (let t of this.data.value) {
464
+ let n = {
465
+ parent: this.parent,
466
+ index: t.index,
467
+ type: t.type,
468
+ label: t.label,
469
+ description: t.description,
470
+ value: t.value
471
+ };
472
+ "description" in t && (n.description = t.description), e.push(n);
473
+ }
474
+ return e;
475
+ }
476
+ return this.data.value;
477
+ })), I(this, "fullData", A(() => {
478
+ let e = this.getFocus(), t = this.getHighlight(), n = this.getSelected();
479
+ return x(this.data.value, (r) => {
480
+ var i, a;
481
+ let o = D(r.index, n);
482
+ return {
483
+ ...r,
484
+ focus: e === r.index,
485
+ highlight: t,
486
+ filterMode: (i = this.filterMode) == null ? void 0 : i.value,
487
+ selected: o,
488
+ disabled: (a = r.disabled) == null ? !o && r.type === "item" && this.isSelectedMax.value : a
489
+ };
490
+ });
491
+ })), I(this, "map", A(() => {
492
+ let e = [];
493
+ return this.data.value.forEach((t) => {
494
+ switch (t.type) {
495
+ case "item":
496
+ e.push(t);
497
+ break;
498
+ case "group":
499
+ case "menu":
500
+ e.push(t, ...this.getSubList(t).map.value);
501
+ break;
502
+ }
503
+ }), e;
504
+ })), I(this, "mapItems", A(() => this.map.value.filter((e) => e.type === "item"))), I(this, "items", A(() => this.map.value.filter((e) => e.type === "item" || e.type === "group" || e.type === "menu"))), I(this, "highlightFirstItem", A(() => {
505
+ let e = this.getHighlight();
506
+ if (e && e.length >= this.getHighlightLengthStart()) {
507
+ let t = w(e, "i");
508
+ if (t) return this.map.value.findIndex((e) => {
509
+ var n, r, i;
510
+ return ((n = e.label) == null ? void 0 : n.toString().match(t)) || ((r = e.index) == null ? void 0 : r.toString().match(t)) || ((i = e.search) == null ? void 0 : i.toString().match(t));
511
+ });
512
+ }
513
+ return -1;
514
+ })), I(this, "isSelected", A(() => {
515
+ let e = this.getSelected();
516
+ return !!e && this.mapItems.value.findIndex((t) => D(t.index, e)) !== -1;
517
+ })), I(this, "isSelectedMin", A(() => {
518
+ let e = Number(L(this.min) || 0);
519
+ return e > 0 ? this.selectedListInGroup.value.length >= e : !1;
520
+ })), I(this, "isSelectedMax", A(() => {
521
+ let e = Number(L(this.max) || 9999999);
522
+ return e > 0 ? this.selectedListInGroup.value.length >= e : !1;
523
+ })), I(this, "selectedList", A(() => {
524
+ let e = this.getSelected();
525
+ return e && this.isSelected.value ? this.mapItems.value.filter((t) => D(t.index, e)) : [];
526
+ })), I(this, "selectedListInGroup", A(() => {
527
+ let e = this.getSelected();
528
+ return e && this.isSelected.value ? this.data.value.filter((t) => D(t.index, e)) : [];
529
+ })), I(this, "selectedNames", A(() => S(this.selectedList.value, "label"))), I(this, "selectedValues", A(() => S(this.selectedList.value, "value"))), this.list = e, this.focus = t, this.highlight = n, this.highlightLengthStart = r, this.filterMode = i, this.selected = a, this.keyValue = o, this.keyLabel = s, this.lite = c, this.min = l, this.max = u, this.parent = d, j(e) && P(e, () => {
530
+ this.subList = {};
531
+ });
532
+ }
533
+ isLite() {
534
+ var e;
535
+ return !!((e = this.lite) != null && e.value && this.data.value.length > this.lite.value);
536
+ }
537
+ isFocus() {
538
+ let e = this.getFocus();
539
+ return !!(e && this.map.value.findIndex((t) => t.index === e) !== -1);
540
+ }
541
+ isHighlight() {
542
+ return this.highlightFirstItem.value !== -1;
543
+ }
544
+ isHighlightActive() {
545
+ var e, t;
546
+ return ((e = (t = this.getHighlight()) == null ? void 0 : t.length) == null ? 0 : e) < this.getHighlightLengthStart() || this.isHighlight();
547
+ }
548
+ getLength() {
549
+ return this.data.value.length;
550
+ }
551
+ getLengthByMap() {
552
+ return this.map.value.length;
553
+ }
554
+ getLengthByItems() {
555
+ return this.items.value.length;
556
+ }
557
+ getFocus() {
558
+ var e;
559
+ return (e = this.focus) == null ? void 0 : e.value;
560
+ }
561
+ getHighlight() {
562
+ var e;
563
+ return (e = this.highlight) == null ? void 0 : e.value;
564
+ }
565
+ getHighlightLengthStart() {
566
+ var e, t;
567
+ return (e = (t = this.highlightLengthStart) == null ? void 0 : t.value) == null ? 2 : e;
568
+ }
569
+ getSelected() {
570
+ var e;
571
+ return (e = this.selected) == null ? void 0 : e.value;
572
+ }
573
+ getSelectedByStep(e) {
574
+ var t, n;
575
+ let r = (t = this.selectedList.value) == null ? void 0 : t[0];
576
+ if (r) {
577
+ var i;
578
+ return (i = this.getItemByStep(r, e)) == null ? void 0 : i.index;
579
+ }
580
+ return (n = this.mapItems.value[0]) == null ? void 0 : n.index;
581
+ }
582
+ getSelectedNext() {
583
+ return this.getSelectedByStep(1);
584
+ }
585
+ getSelectedPrev() {
586
+ return this.getSelectedByStep(-1);
587
+ }
588
+ getItemByStep(e, t) {
589
+ let n = this.mapItems.value, r = n.findIndex((t) => t.index === e.index);
590
+ if (r !== -1) {
591
+ let e = r + t;
592
+ if (e in n) return n[e];
593
+ }
594
+ if (t > 0) return n[0];
595
+ if (t < 0) return n[n.length - 1];
596
+ }
597
+ getItemNext(e) {
598
+ return this.getItemByStep(e, 1);
599
+ }
600
+ getItemPrev(e) {
601
+ return this.getItemByStep(e, -1);
602
+ }
603
+ getIndexByStep(e, t) {
604
+ let n = this.getItemByIndex(e);
605
+ if (n) return this.getItemByStep(n.item, t);
606
+ }
607
+ getIndexNext(e) {
608
+ return this.getIndexByStep(e, 1);
609
+ }
610
+ getIndexPrev(e) {
611
+ return this.getIndexByStep(e, -1);
612
+ }
613
+ getItemByIndex(e) {
614
+ let t = this.map.value.findIndex((t) => t.index === e);
615
+ if (t !== -1) return {
616
+ key: t,
617
+ item: this.map.value[t]
618
+ };
619
+ }
620
+ getItemByKey(e) {
621
+ var t;
622
+ return (t = this.map.value) == null ? void 0 : t[e];
623
+ }
624
+ getFirstItemByParent(e) {
625
+ return this.map.value.find((t) => this.isInParent(e, t));
626
+ }
627
+ getLastItemByParent(e) {
628
+ return this.map.value.filter((t) => this.isInParent(e, t)).pop();
629
+ }
630
+ getSubList(t) {
631
+ return t.index in this.subList || (this.subList[t.index] = new e(t.value, this.focus, this.highlight, this.highlightLengthStart, this.filterMode, this.selected, this.keyValue, this.keyLabel, this.lite, this.min, this.max, t.index)), this.subList[t.index];
632
+ }
633
+ isItem(e) {
634
+ return e.type === "item" || e.type === "group" || e.type === "menu";
635
+ }
636
+ isInParent(e, t) {
637
+ return t.parent === e && this.isItem(t);
638
+ }
639
+ getIndex(e, t, n, r) {
640
+ return e && !T(e) ? e : t && !T(t) ? t : n && r;
641
+ }
642
+ initItem(e, t) {
643
+ if (E(t)) {
644
+ var n, r, i, a, o, s;
645
+ let c = t == null ? void 0 : t[(n = (r = this.keyValue) == null ? void 0 : r.value) == null ? "value" : n], l = (i = t == null ? void 0 : t[(a = (o = this.keyLabel) == null ? void 0 : o.value) == null ? "label" : a]) == null ? c : i, u = this.getIndex(t == null ? void 0 : t.index, c, e, l);
646
+ return {
647
+ ...t,
648
+ parent: this.parent,
649
+ index: u,
650
+ type: (s = t == null ? void 0 : t.type) == null ? "item" : s,
651
+ label: l,
652
+ value: c
653
+ };
654
+ }
655
+ return {
656
+ parent: this.parent,
657
+ index: e.toString(),
658
+ type: "item",
659
+ label: t,
660
+ value: e
661
+ };
662
+ }
663
+ }, W = class {
664
+ static get() {
665
+ return this.router;
666
+ }
667
+ static getLink(e, t, n) {
668
+ var r;
669
+ return (r = this.router) == null ? void 0 : r.resolve({
670
+ name: e,
671
+ params: t,
672
+ query: n
673
+ }).href;
674
+ }
675
+ static getHref(e, t, n) {
676
+ if (e) {
677
+ let r = this.getLink(e, t, n);
678
+ if (r) return { href: r };
679
+ }
680
+ return {};
681
+ }
682
+ static push(e) {
683
+ this.router && this.router.push(e).then();
684
+ }
685
+ static set(e) {
686
+ this.router = e;
687
+ }
688
+ static setOneTime(e) {
689
+ this.router || this.set(e);
690
+ }
691
+ static rawToHref(e) {
692
+ return E(e) && "name" in e && O(e == null ? void 0 : e.name) ? this.getHref(e.name) : {};
693
+ }
694
+ };
695
+ I(W, "router", void 0);
696
+ //#endregion
697
+ //#region src/classes/ref/ScrollbarWidthRef.ts
698
+ var Fe = class {
699
+ constructor() {
700
+ I(this, "item", M()), I(this, "width", M(0)), I(this, "is", A(() => this.item.value !== void 0)), g.is().then((e) => {
701
+ this.item.value = e;
702
+ }), g.get().then((e) => {
703
+ this.width.value = e;
704
+ });
705
+ }
706
+ }, G = (e) => typeof e == "string" ? { method: e } : e || {};
707
+ //#endregion
708
+ //#region src/composables/ref/useApiRequest.ts
709
+ function K(n, r = t.post, i, a, o = !0, s, c = e.getItem()) {
710
+ let l = M(!1), u = B(G(s));
711
+ return {
712
+ loading: l,
713
+ async send(e) {
714
+ l.value = !0;
715
+ let t;
716
+ try {
717
+ if (t = await c.request({
718
+ path: L(n),
719
+ method: r,
720
+ request: e,
721
+ toData: o,
722
+ ...u.value
723
+ }), t && (a && (t = a(t)), i)) {
724
+ let e = i(t);
725
+ e instanceof Promise && await e;
726
+ }
727
+ } catch (e) {
728
+ t = void 0;
729
+ }
730
+ return l.value = !1, t;
731
+ }
732
+ };
1738
733
  }
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
- );
734
+ //#endregion
735
+ //#region src/composables/ref/useApiDelete.ts
736
+ function Ie(e, n, r, i = !0, a, o) {
737
+ return K(e, t.delete, n, r, i, a, o);
1748
738
  }
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
- );
739
+ //#endregion
740
+ //#region src/composables/ref/useApiGet.ts
741
+ function Le(e, n, r, i = !0, a, o) {
742
+ return K(e, t.get, n, r, i, a, o);
1758
743
  }
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)
1765
- return;
1766
- m && m.abort(), m = h.value.controller || new AbortController();
1767
- const v = g(s);
1768
- if ((!i || i.value) && v) {
1769
- c.value = !0, o.value = !0;
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);
1792
- return {
1793
- /** Reactive data (Computed) / Реактивные данные (Computed) */
1794
- data: w,
1795
- /** Item (Ref) / Элемент (Ref) */
1796
- get item() {
1797
- return L(), a;
1798
- },
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;
1817
- },
1818
- /**
1819
- * Checks if the request is currently loading.
1820
- *
1821
- * Проверяет, загружается ли запрос в данный момент.
1822
- */
1823
- isLoading() {
1824
- return c.value;
1825
- },
1826
- /**
1827
- * Checks if the request is currently reading.
1828
- *
1829
- * Проверяет, читается ли запрос в данный момент.
1830
- */
1831
- isReading() {
1832
- return o.value;
1833
- },
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()
1866
- };
744
+ //#endregion
745
+ //#region src/composables/ref/useApiRef.ts
746
+ var q;
747
+ function Re(t, n, r = !0, i, a, o = !0, s = e.getItem()) {
748
+ let c = M(), l = B(G(n)), u = M(!1), d = M(!1), f, p = !0, m, h = async () => {
749
+ if (p) return;
750
+ f && f.abort(), f = l.value.controller || new AbortController();
751
+ let e = L(t);
752
+ if ((!i || i.value) && e) {
753
+ u.value = !0, d.value = !0;
754
+ try {
755
+ let t = await s.request({
756
+ path: e,
757
+ controller: f,
758
+ ...l.value
759
+ });
760
+ t && (a ? c.value = a(t) : c.value = t);
761
+ } catch (e) {
762
+ c.value = void 0;
763
+ }
764
+ u.value = !1;
765
+ } else c.value !== void 0 && (c.value = void 0);
766
+ }, g = () => {
767
+ m == null || m(), c.value = void 0, p = !0;
768
+ }, _ = () => {
769
+ p && (p = !1, h().then(), o ? (v(), le() && fe(() => g())) : V.run(() => v()));
770
+ }, v = () => {
771
+ let e = [];
772
+ r && e.push(l), j(t) && e.push(t), i && e.push(i), q && e.push(q), e.length > 0 && (m = P(e, async () => {
773
+ u.value || await h();
774
+ }));
775
+ };
776
+ return {
777
+ data: A(() => (_(), c.value)),
778
+ get item() {
779
+ return _(), c;
780
+ },
781
+ length: A(() => Array.isArray(c.value) ? c.value.length : c.value ? 1 : 0),
782
+ starting: A(() => c.value === void 0),
783
+ loading: u,
784
+ reading: d,
785
+ isStarting() {
786
+ return c.value === void 0;
787
+ },
788
+ isLoading() {
789
+ return u.value;
790
+ },
791
+ isReading() {
792
+ return d.value;
793
+ },
794
+ getItem() {
795
+ return c.value;
796
+ },
797
+ init: _,
798
+ reset: h,
799
+ stop: g,
800
+ abort: () => f == null ? void 0 : f.abort()
801
+ };
1867
802
  }
1868
- const Fe = (s) => {
1869
- O || (O = s);
803
+ var ze = (e) => {
804
+ q || (q = e);
1870
805
  };
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
- );
806
+ //#endregion
807
+ //#region src/composables/ref/useApiPost.ts
808
+ function Be(e, n, r, i = !0, a, o) {
809
+ return K(e, t.post, n, r, i, a, o);
1880
810
  }
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
- );
811
+ //#endregion
812
+ //#region src/composables/ref/useApiPut.ts
813
+ function Ve(e, n, r, i = !0, a, o) {
814
+ return K(e, t.put, n, r, i, a, o);
1890
815
  }
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
- };
816
+ //#endregion
817
+ //#region src/composables/ref/useFormattersRef.ts
818
+ function He(e, t) {
819
+ let n = new c(t);
820
+ return {
821
+ listFormat: A(() => n.setList(e.value).to()),
822
+ length: A(() => n.setList(e.value).length())
823
+ };
1905
824
  }
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
- };
825
+ //#endregion
826
+ //#region src/composables/ref/useSearchValueRef.ts
827
+ function Ue(e, t) {
828
+ let n = t == null ? M("") : t, r = M(n.value), i = M(!1), a;
829
+ return P(n, (t, o, s) => {
830
+ let c = e.getOptions().getDelay();
831
+ c ? (i.value = !0, a = setTimeout(() => {
832
+ a = void 0, r.value = n.value, i.value = !1;
833
+ }, c), s(() => {
834
+ a && clearTimeout(a);
835
+ })) : r.value = n.value;
836
+ }), {
837
+ search: n,
838
+ searchDelay: r,
839
+ loading: i
840
+ };
1924
841
  }
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
- };
842
+ //#endregion
843
+ //#region src/composables/ref/useSearchRef.ts
844
+ function We(e, t, n, r) {
845
+ let i = new _(void 0, t, void 0, r), { search: a, searchDelay: o, loading: s } = Ue(i, n), c = () => L(y(e)) || [], l = A(() => i.setValue(o.value).getItem().isSearch()), u = A(() => i.setList(c()).setValue(o.value).to());
846
+ return {
847
+ isSearch: l,
848
+ search: a,
849
+ loading: s,
850
+ listSearch: u,
851
+ length: A(() => u.value.length)
852
+ };
1965
853
  }
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
- };
854
+ //#endregion
855
+ //#region src/composables/ref/useApiManagementRef.ts
856
+ function Ge(e, t, n, r, i, a, o, s) {
857
+ let { path: c, options: l, reactivity: u, conditions: d, transformation: f, typeData: p, unmounted: m, skeleton: h } = e, g, _, v, y, x, S = Re(c, l, u, d, f, m, s), C = A(() => p === void 0 ? !0 : S.isStarting() ? !1 : re(p) ? p(S.data.value) : S.data.value instanceof p), w = A(() => S.isStarting() && h ? h() : S.data.value);
858
+ if (t && (g = He(w, t)), n && (_ = We(A(() => {
859
+ var e;
860
+ let t = (e = g == null ? void 0 : g.listFormat.value) == null ? S.data.value : e;
861
+ if (Array.isArray(t)) return t;
862
+ }), n.columns, n.value, n.options)), r || i || a) {
863
+ let e = (e) => {
864
+ o == null || o(), ee(e) && S.reset();
865
+ }, t = (t) => async (n) => {
866
+ re(t) && await b(t(n)), e(n);
867
+ };
868
+ r && (v = Be(r.path, t(r.action), r.transformation, r.toData, r.options, s)), i && (y = Ve(i.path, t(i.action), i.transformation, i.toData, i.options, s)), a && (x = Ie(a.path, t(a.action), a.transformation, a.toData, a.options, s));
869
+ }
870
+ return {
871
+ isValid: C,
872
+ list: A(() => {
873
+ if (C.value) {
874
+ if (_ && Array.isArray(S.data.value)) return _.listSearch.value;
875
+ if (g) return g.listFormat.value;
876
+ }
877
+ return w.value;
878
+ }),
879
+ get data() {
880
+ return S.data;
881
+ },
882
+ get length() {
883
+ return _ ? _.length : S.length;
884
+ },
885
+ lengthData: S.length,
886
+ starting: S.starting,
887
+ reading: S.reading,
888
+ loading: S.loading,
889
+ loadingSearch: _ == null ? void 0 : _.loading,
890
+ loadingPost: v == null ? void 0 : v.loading,
891
+ loadingPut: y == null ? void 0 : y.loading,
892
+ loadingDelete: x == null ? void 0 : x.loading,
893
+ isSearch: _ == null ? void 0 : _.isSearch,
894
+ search: _ == null ? void 0 : _.search,
895
+ reset: S.reset,
896
+ abort: S.abort,
897
+ sendPost: async (e) => await (v == null ? void 0 : v.send(e)),
898
+ sendPut: async (e) => await (y == null ? void 0 : y.send(e)),
899
+ sendDelete: async (e) => await (x == null ? void 0 : x.send(e))
900
+ };
2105
901
  }
2106
- function oe(s, t) {
2107
- const e = `broadcast--${s}`;
2108
- if (e in G)
2109
- return G[e];
2110
- const i = f(et(t)), n = new $t(
2111
- e,
2112
- (r) => {
2113
- i.value !== r.data.message && (i.value = r.data.message);
2114
- }
2115
- );
2116
- return F.run(() => {
2117
- y(i, (r) => n.post({ message: r }));
2118
- }), G[e] = i, i;
902
+ //#endregion
903
+ //#region src/composables/ref/useBroadcastValueRef.ts
904
+ function Ke(e, t) {
905
+ let r = `broadcast--${e}`;
906
+ if (r in J) return J[r];
907
+ let i = M(y(t)), a = new n(r, (e) => {
908
+ i.value !== e.data.message && (i.value = e.data.message);
909
+ });
910
+ return V.run(() => {
911
+ P(i, (e) => a.post({ message: e }));
912
+ }), J[r] = i, i;
2119
913
  }
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(
2125
- `__cookie:${s}`,
2126
- i.get(t, e)
2127
- );
2128
- return F.run(() => {
2129
- y(n, (r) => {
2130
- i.set(r, e);
2131
- });
2132
- }), K[s] = n, n;
914
+ var J = {};
915
+ //#endregion
916
+ //#region src/composables/ref/useCookieRef.ts
917
+ function qe(e, t, n) {
918
+ if (e in Y) return Y[e];
919
+ let i = new r(e), a = Ke(`__cookie:${e}`, i.get(t, n));
920
+ return V.run(() => {
921
+ P(a, (e) => {
922
+ i.set(e, n);
923
+ });
924
+ }), Y[e] = a, a;
2133
925
  }
2134
- const K = {};
2135
- function $e() {
2136
- return new ee();
926
+ var Y = {};
927
+ //#endregion
928
+ //#region src/composables/ref/useGeoIntlRef.ts
929
+ function Je() {
930
+ return new Ne();
2137
931
  }
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) => {
2145
- e.value = i;
2146
- }), Y[s] = e, e;
932
+ //#endregion
933
+ //#region src/composables/ref/useHashRef.ts
934
+ function Ye(e, t) {
935
+ if (e in X) return X[e];
936
+ let n = N(f.get(e, t));
937
+ return V.run(() => {
938
+ P(n, (t) => f.set(e, t));
939
+ }), f.addWatch(e, (e) => {
940
+ n.value = e;
941
+ }), X[e] = n, n;
2147
942
  }
2148
- const Y = {}, ce = (s = {
2149
- rootMargin: "128px 0px"
2150
- }) => {
2151
- const t = {}, e = ft() && "IntersectionObserver" in window ? new IntersectionObserver(
2152
- (n) => {
2153
- n.forEach((r) => {
2154
- const a = $(r.target);
2155
- if (a in t) {
2156
- const h = t[a];
2157
- h.status.value = r.isIntersecting, h.ratio.value = r.intersectionRatio, h.entry.value = r;
2158
- }
2159
- });
2160
- },
2161
- s
2162
- ) : void 0, i = (n) => {
2163
- var r;
2164
- if (n) {
2165
- const a = $(n);
2166
- a in t && (e == null || e.unobserve(n), (r = t[a]) == null || r.stopWatch(), delete t[a]);
2167
- }
2168
- };
2169
- return {
2170
- intersectionObserver: e,
2171
- /**
2172
- * Getting a tracked element.
2173
- *
2174
- * Получение отслеживаемого элемента.
2175
- * @param element tracked element/ отслеживаемый элемент
2176
- */
2177
- getItem(n) {
2178
- const r = $(n);
2179
- return t[r];
2180
- },
2181
- /**
2182
- * Adding an element for tracking.
2183
- *
2184
- * Добавление элемента для отслеживания.
2185
- * @param element element for tracking/ элемента для отслеживания
2186
- */
2187
- addLazyItem(n) {
2188
- const r = N(!e);
2189
- if (e) {
2190
- let a;
2191
- a = y(n, (h, c) => {
2192
- if (c && i(c), n.value) {
2193
- const o = $(n.value);
2194
- t[o] = {
2195
- status: r,
2196
- ratio: N(0),
2197
- entry: N(void 0),
2198
- stopWatch: () => a == null ? void 0 : a()
2199
- }, e.observe(n.value);
2200
- } else
2201
- i(n.value);
2202
- }, { immediate: !0 });
2203
- }
2204
- return r;
2205
- },
2206
- /**
2207
- * Removing an element from tracking.
2208
- *
2209
- * Удаление элемента из отслеживания.
2210
- */
2211
- removeLazyItem: i,
2212
- /**
2213
- * Removing all elements from tracking.
2214
- *
2215
- * Удаление всех элементов из отслеживания.
2216
- */
2217
- disconnectLazy: () => e == null ? void 0 : e.disconnect()
2218
- };
2219
- }, dt = [], he = (s) => {
2220
- const t = dt.find((i) => i.rootMargin === s);
2221
- if (t)
2222
- return t.item;
2223
- const e = ce({ rootMargin: s });
2224
- return dt.push({ rootMargin: s, item: e }), e;
2225
- }, Pe = (s, t) => {
2226
- const e = he(t);
2227
- return {
2228
- /** Lazy item status/ Статус ленивого элемента */
2229
- lazyItemStatus: e.addLazyItem(s),
2230
- /**
2231
- * Getting a tracked lazy item.
2232
- *
2233
- * Получение отслеживаемого ленивого элемента.
2234
- */
2235
- get lazyItem() {
2236
- return e.getItem(s.value);
2237
- }
2238
- };
943
+ var X = {}, Xe = (e = { rootMargin: "128px 0px" }) => {
944
+ let t = {}, n = ne() && "IntersectionObserver" in window ? new IntersectionObserver((e) => {
945
+ e.forEach((e) => {
946
+ let n = C(e.target);
947
+ if (n in t) {
948
+ let r = t[n];
949
+ r.status.value = e.isIntersecting, r.ratio.value = e.intersectionRatio, r.entry.value = e;
950
+ }
951
+ });
952
+ }, e) : void 0, r = (e) => {
953
+ if (e) {
954
+ let i = C(e);
955
+ if (i in t) {
956
+ var r;
957
+ n == null || n.unobserve(e), (r = t[i]) == null || r.stopWatch(), delete t[i];
958
+ }
959
+ }
960
+ };
961
+ return {
962
+ intersectionObserver: n,
963
+ getItem(e) {
964
+ return t[C(e)];
965
+ },
966
+ addLazyItem(e) {
967
+ let i = N(!n);
968
+ if (n) {
969
+ let a;
970
+ a = P(e, (o, s) => {
971
+ if (s && r(s), e.value) {
972
+ let r = C(e.value);
973
+ t[r] = {
974
+ status: i,
975
+ ratio: N(0),
976
+ entry: N(void 0),
977
+ stopWatch: () => a == null ? void 0 : a()
978
+ }, n.observe(e.value);
979
+ } else r(e.value);
980
+ }, { immediate: !0 });
981
+ }
982
+ return i;
983
+ },
984
+ removeLazyItem: r,
985
+ disconnectLazy: () => n == null ? void 0 : n.disconnect()
986
+ };
987
+ }, Ze = [], Qe = (e) => {
988
+ let t = Ze.find((t) => t.rootMargin === e);
989
+ if (t) return t.item;
990
+ let n = Xe({ rootMargin: e });
991
+ return Ze.push({
992
+ rootMargin: e,
993
+ item: n
994
+ }), n;
995
+ }, $e = (e, t) => {
996
+ let n = Qe(t);
997
+ return {
998
+ lazyItemStatus: n.addLazyItem(e),
999
+ get lazyItem() {
1000
+ return n.getItem(e.value);
1001
+ }
1002
+ };
2239
1003
  };
2240
- function je() {
2241
- const s = N(ct.is());
2242
- return ct.registrationEvent(({ detail: t }) => {
2243
- s.value = t.loading;
2244
- }), s;
1004
+ //#endregion
1005
+ //#region src/composables/ref/useLoadingRef.ts
1006
+ function et() {
1007
+ let e = N(m.is());
1008
+ return m.registrationEvent(({ detail: t }) => {
1009
+ e.value = t.loading;
1010
+ }), e;
2245
1011
  }
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) => {
2252
- const o = Object.freeze(s(...c));
2253
- return {
2254
- ...o,
2255
- init() {
2256
- return o;
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
- }
2269
- });
2270
- }, h = (...c) => {
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;
2278
- };
2279
- return t === "global" && tt.push(h), h;
1012
+ //#endregion
1013
+ //#region src/functions/executeUse.ts
1014
+ var Z = /* @__PURE__ */ function(e) {
1015
+ return e.global = "global", e.provide = "provide", e.local = "local", e;
1016
+ }({}), tt = () => `__execute_use${nt}::${C()}`, nt = ie(1e5, 999999), Q = [], rt = ce();
1017
+ function $(e, t = Z.provide) {
1018
+ let n = tt(), r, i = (t) => {
1019
+ let n = Object.freeze(e(...t));
1020
+ return {
1021
+ ...n,
1022
+ init() {
1023
+ return n;
1024
+ }
1025
+ };
1026
+ }, a = (e) => {
1027
+ let t = Object.freeze(i(e));
1028
+ return pe(n, t), t;
1029
+ }, o = (e) => {
1030
+ let t = i(e);
1031
+ return Object.freeze({
1032
+ ...t,
1033
+ destroyExecute() {
1034
+ r = void 0;
1035
+ }
1036
+ });
1037
+ }, s = (...e) => t === Z.provide ? de(n, void 0) || a(e) : (r || (t === Z.local ? rt.run(() => {
1038
+ r = o(e);
1039
+ }) : r = o(e)), r);
1040
+ return t === Z.global && Q.push(s), s;
2280
1041
  }
2281
- function me(s) {
2282
- return nt(
2283
- s,
2284
- "global"
2285
- /* global */
2286
- );
1042
+ function it(e) {
1043
+ return $(e, Z.global);
2287
1044
  }
2288
- function ze(s) {
2289
- return nt(
2290
- s,
2291
- "provide"
2292
- /* provide */
2293
- );
1045
+ function at(e) {
1046
+ return $(e, Z.provide);
2294
1047
  }
2295
- function Ve(s) {
2296
- return nt(
2297
- s,
2298
- "local"
2299
- /* local */
2300
- );
1048
+ function ot(e) {
1049
+ return $(e, Z.local);
2301
1050
  }
2302
- function Te() {
2303
- tt.forEach((s) => s()), tt.length = 0;
1051
+ function st() {
1052
+ Q.forEach((e) => e()), Q.length = 0;
2304
1053
  }
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, () => {
2308
- s.setTitle(t.value);
2309
- }), y(e, () => {
2310
- s.setKeywords(e.value);
2311
- }), y(i, () => {
2312
- s.setDescription(i.value);
2313
- }), y(n, () => {
2314
- s.setImage(n.value);
2315
- }), y(r, () => {
2316
- s.setCanonical(r.value);
2317
- }), y(a, () => {
2318
- s.setRobots(a.value);
2319
- }), y(h, () => {
2320
- s.setAuthor(h.value);
2321
- }), y(c, () => {
2322
- s.setSiteName(c.value);
2323
- }), {
2324
- meta: s,
2325
- title: t,
2326
- keyword: e,
2327
- description: i,
2328
- author: h,
2329
- image: n,
2330
- canonical: r,
2331
- robots: a,
2332
- siteName: c,
2333
- getHtmlMeta: o
2334
- };
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
- };
1054
+ //#endregion
1055
+ //#region src/composables/ref/useMeta.ts
1056
+ var ct = it(() => {
1057
+ let e = new h(), t = M(e.getTitle()), n = M(e.getKeywords()), r = M(e.getDescription()), i = M(e.getImage()), a = M(e.getCanonical()), o = M(e.getRobots()), s = M(e.getAuthor()), c = M(e.getSiteName());
1058
+ return P(t, () => {
1059
+ e.setTitle(t.value);
1060
+ }), P(n, () => {
1061
+ e.setKeywords(n.value);
1062
+ }), P(r, () => {
1063
+ e.setDescription(r.value);
1064
+ }), P(i, () => {
1065
+ e.setImage(i.value);
1066
+ }), P(a, () => {
1067
+ e.setCanonical(a.value);
1068
+ }), P(o, () => {
1069
+ e.setRobots(o.value);
1070
+ }), P(s, () => {
1071
+ e.setAuthor(s.value);
1072
+ }), P(c, () => {
1073
+ e.setSiteName(c.value);
1074
+ }), {
1075
+ meta: e,
1076
+ title: t,
1077
+ keyword: n,
1078
+ description: r,
1079
+ author: s,
1080
+ image: i,
1081
+ canonical: a,
1082
+ robots: o,
1083
+ siteName: c,
1084
+ getHtmlMeta: () => e.html(),
1085
+ setSuffix: (t) => e.setSuffix(t)
1086
+ };
1087
+ }), lt = () => ct(), ut = (e, t, n = !0) => {
1088
+ var r;
1089
+ let i = j(t) ? t : M(t || ((r = e.value) == null || (r = r[0]) == null ? void 0 : r.value) || ""), a = () => o(i.value), o = (t) => {
1090
+ var n;
1091
+ return (n = e.value) == null ? void 0 : n.find((e) => e.value === t);
1092
+ }, s = (e) => {
1093
+ e && e !== i.value && o(e) && (i.value = e, W.push({ name: e }));
1094
+ };
1095
+ return {
1096
+ item: A(() => a()),
1097
+ selected: i,
1098
+ label: A(() => {
1099
+ var e;
1100
+ return ((e = a()) == null ? void 0 : e.label) || "";
1101
+ }),
1102
+ list: A(() => e.value ? x(e.value, (e) => n && !("to" in e) ? {
1103
+ ...e,
1104
+ to: { name: e.value }
1105
+ } : e) : []),
1106
+ to: s,
1107
+ toMain() {
1108
+ var t;
1109
+ s((t = e.value) == null || (t = t[0]) == null ? void 0 : t.value);
1110
+ }
1111
+ };
2370
1112
  };
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;
1113
+ //#endregion
1114
+ //#region src/composables/ref/useSessionRef.ts
1115
+ function dt(e, t) {
1116
+ if (e in ft) return ft[e];
1117
+ let n = new i(e, !0), r = M(n.get(t));
1118
+ return V.run(() => {
1119
+ P(r, (e) => n.set(e));
1120
+ }), ft[e] = r, r;
2378
1121
  }
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", () => {
2387
- i.update(), n.value = i.get();
2388
- }), Q[s] = n, n;
1122
+ var ft = {};
1123
+ //#endregion
1124
+ //#region src/composables/ref/useStorageRef.ts
1125
+ function pt(e, t, n) {
1126
+ if (e in mt) return mt[e];
1127
+ let r = new i(e), a = M(r.get(t, n));
1128
+ return V.run(() => {
1129
+ P(a, (e) => r.set(e));
1130
+ }), ne() && window.addEventListener("storage", () => {
1131
+ r.update(), a.value = r.get();
1132
+ }), mt[e] = a, a;
2389
1133
  }
2390
- const Q = {};
2391
- function pe(s) {
2392
- const t = N(ht.getListSync(s, !0)), e = async () => {
2393
- t.value = { ...await ht.getList(s) };
2394
- };
2395
- y(P.getLanguage(), e);
2396
- for (const i in t.value)
2397
- if (t.value[i] === i || t.value[i] === " ") {
2398
- e().then();
2399
- break;
2400
- }
2401
- return t;
1134
+ var mt = {};
1135
+ //#endregion
1136
+ //#region src/composables/ref/useTranslateRef.ts
1137
+ function ht(e, t = v.getItem()) {
1138
+ let n = N(t.getListSync(e, !0)), r = async () => {
1139
+ n.value = { ...await t.getList(e) };
1140
+ };
1141
+ P(U.getLanguage(), r);
1142
+ for (let e in n.value) if (n.value[e] === e || n.value[e] === " ") {
1143
+ r().then();
1144
+ break;
1145
+ }
1146
+ return n;
2402
1147
  }
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);
1148
+ var gt = (e) => ht(e);
1149
+ //#endregion
1150
+ //#region src/functions/computedAsync.ts
1151
+ function _t(e, t, n) {
1152
+ let r = M(), i = !0, a = () => {
1153
+ i && (i = !1, ve(async () => {
1154
+ let n = await b(e);
1155
+ n !== t && (r.value = n);
1156
+ }));
1157
+ };
1158
+ return A(() => (a(), r.value), n);
2414
1159
  }
2415
- function Ye(s, t = () => {
2416
- }, e, i) {
2417
- return u(
2418
- () => {
2419
- if (P.get().value && (e === void 0 || e())) {
2420
- const n = s();
2421
- if (n !== void 0)
2422
- return n;
2423
- }
2424
- return et(t);
2425
- },
2426
- i
2427
- );
1160
+ //#endregion
1161
+ //#region src/functions/computedByLanguage.ts
1162
+ function vt(e, t = () => void 0, n, r) {
1163
+ return A(() => {
1164
+ if (U.get().value && (n === void 0 || n())) {
1165
+ let t = e();
1166
+ if (t !== void 0) return t;
1167
+ }
1168
+ return y(t);
1169
+ }, r);
2428
1170
  }
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
- });
1171
+ //#endregion
1172
+ //#region src/functions/computedEternity.ts
1173
+ var yt = ce();
1174
+ function bt(e) {
1175
+ return se((t, n) => {
1176
+ let r = M(), i = !1, a = async () => {
1177
+ r.value = await b(e), n();
1178
+ }, o = () => {
1179
+ i || (i = !0, yt.run(() => {
1180
+ ve(async () => await a());
1181
+ }));
1182
+ };
1183
+ return {
1184
+ get() {
1185
+ return o(), t(), r.value;
1186
+ },
1187
+ set(e) {
1188
+ console.warn("computedEternity: value is read-only.");
1189
+ }
1190
+ };
1191
+ });
2460
1192
  }
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 };
1193
+ //#endregion
1194
+ //#region src/functions/dxtFunctionalPlugin.ts
1195
+ var xt = { install(t, n = {}) {
1196
+ if (n.api && e.setConfig(n.api), n.translate && v.setConfig(n.translate), n.icons && p.setConfig(n.icons), n.metaSuffix && lt().setSuffix(n.metaSuffix), n.router) W.set(n.router);
1197
+ else {
1198
+ let e = t.config.globalProperties.$router;
1199
+ e && W.set(e);
1200
+ }
1201
+ n.errorCauses && o.addList(n.errorCauses), st();
1202
+ } };
1203
+ //#endregion
1204
+ //#region src/functions/render/getBind.ts
1205
+ function St(e, t = {}, n = "value", r = !1) {
1206
+ let i = typeof t == "string", a = i ? t : n, o = i ? {} : t;
1207
+ return e ? e && E(e) && (a in e || r) ? R(o, e) : R(o, { [a]: e }) : i ? {} : { ...o };
2464
1208
  }
2465
- function Qe(s, t = {}, e = "value") {
2466
- return u(() => be(g(s), g(t), e));
1209
+ //#endregion
1210
+ //#region src/functions/ref/getBindRef.ts
1211
+ function Ct(e, t = {}, n = "value") {
1212
+ return A(() => St(L(e), L(t), n));
2467
1213
  }
2468
- function Xe(s, t) {
2469
- s.value !== t && (s.value = t);
1214
+ //#endregion
1215
+ //#region src/functions/ref/setRef.ts
1216
+ function wt(e, t) {
1217
+ e.value !== t && (e.value = t);
2470
1218
  }
2471
- export {
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
2531
- };
1219
+ //#endregion
1220
+ export { Ae as DatetimeRef, Se as DesignAbstract, Ce as DesignAsyncAbstract, xe as DesignChanged, Oe as DesignComp, z as DesignComponents, ke as DesignConstructorAbstract, V as EffectScopeGlobal, je as EventRef, Z as ExecuteUseType, Me as GeoFlagRef, Ne as GeoIntlRef, U as GeoRef, Pe as ListDataRef, W as RouterItemRef, Fe as ScrollbarWidthRef, _t as computedAsync, vt as computedByLanguage, bt as computedEternity, xt as dxtFunctionalPlugin, $ as executeUse, it as executeUseGlobal, st as executeUseGlobalInit, ot as executeUseLocal, at as executeUseProvide, St as getBind, Ct as getBindRef, we as getClassName, Te as getIndexForRender, G as getOptions, L as getRef, Ee as render, ze as setApiRefGlobalConditions, wt as setRef, gt as t, R as toBind, De as toBinds, B as toRefItem, Ie as useApiDelete, Le as useApiGet, Ge as useApiManagementRef, Be as useApiPost, Ve as useApiPut, Re as useApiRef, K as useApiRequest, Ke as useBroadcastValueRef, qe as useCookieRef, He as useFormattersRef, Je as useGeoIntlRef, Ye as useHashRef, $e as useLazyItemByMarginRef, Xe as useLazyRef, et as useLoadingRef, lt as useMeta, ut as useRouterList, We as useSearchRef, Ue as useSearchValueRef, dt as useSessionRef, pt as useStorageRef, ht as useTranslateRef };