hrenpack_js 3.1.5 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,928 +1,1954 @@
1
- // @ts-nocheck
2
-
3
- // ===== File: arraywork.js =====
4
- "use strict";
5
- function arrayIsEmpty(arr) {
6
- return arr.length === 0 || !arr[0];
7
- }
8
- function arraysIsEqual(array1, array2, strict = true) {
9
- if (array1.length !== array2.length)
10
- return false;
11
- if (strict)
12
- return array1.every((value, index) => value === array2[index]);
13
- else {
14
- array1.forEach(element => {
15
- if (!array2.includes(element))
16
- return false;
17
- });
18
- return true;
19
- }
20
- }
21
- //# sourceMappingURL=arraywork.js.map
22
-
23
- // ===== File: auto.js =====
24
- "use strict";
25
- const stylesRoot = getComputedStyle(document.documentElement);
26
- //# sourceMappingURL=auto.js.map
27
-
28
- // ===== File: classes.js =====
29
- "use strict";
30
- class ClickableLinksFactory {
31
- constructor() {
32
- Object.defineProperty(this, "urlRegex", {
33
- enumerable: true,
34
- configurable: true,
35
- writable: true,
36
- value: /(https?:\/\/[^\s]+)/g
37
- });
38
- }
39
- walk(node, isClickToCopy) {
40
- if (node.nodeType === Node.TEXT_NODE) {
41
- const text = node.textContent || '';
42
- const func = isClickToCopy ? this.get_clickToCopy : this.get_anchor;
43
- if (this.urlRegex.test(text)) {
44
- const parent = node.parentNode;
45
- const newContent = text.replace(this.urlRegex, url => {
46
- return func(url);
47
- });
48
- if (!parent)
49
- return;
50
- const tempDiv = document.createElement('div');
51
- tempDiv.innerHTML = newContent;
52
- while (tempDiv.firstChild) {
53
- parent.insertBefore(tempDiv.firstChild, node);
54
- }
55
- parent.removeChild(node);
56
- }
57
- }
58
- else {
59
- node.childNodes.forEach(child => {
60
- this.walk(child, isClickToCopy);
61
- });
62
- }
63
- }
64
- get_anchor(url) {
65
- return `<a href="${url}" target="_blank" rel="noopener noreferrer" data-clf-generated>${url}</a>`;
66
- }
67
- get_clickToCopy(url) {
68
- return `<click-to-copy data-clf-generated>${url}</click-to-copy>`;
69
- }
70
- clickableLinks(element) {
71
- this.walk(element, false);
72
- }
73
- clickToCopyLinks(element) {
74
- this.walk(element, true);
75
- }
76
- get generatedElements() {
77
- return document.querySelectorAll('[data-clf-generated]');
78
- }
79
- }
80
- class GETParamsManager {
81
- constructor() {
82
- Object.defineProperty(this, "params", {
83
- enumerable: true,
84
- configurable: true,
85
- writable: true,
86
- value: void 0
87
- });
88
- this.params = new URLSearchParams(window.location.search);
89
- }
90
- get(key, defaultValue) {
91
- const value = this.params.get(key);
92
- if (value === null)
93
- return defaultValue || null;
94
- if (defaultValue !== undefined) {
95
- switch (typeof defaultValue) {
96
- case 'number':
97
- return Number(value);
98
- case 'boolean':
99
- return (value === 'true');
100
- default:
101
- return value;
102
- }
103
- }
104
- return value;
105
- }
106
- set(key, value) {
107
- this.params.set(key, String(value));
108
- this.updateURL();
109
- }
110
- delete(key) {
111
- this.params.delete(key);
112
- this.updateURL();
113
- }
114
- all() {
115
- const result = {};
116
- for (const [key, value] of this.params.entries()) {
117
- result[key] = value;
118
- }
119
- return result;
120
- }
121
- clear() {
122
- const keys = Array.from(this.params.keys());
123
- keys.forEach(key => this.params.delete(key));
124
- this.updateURL();
125
- }
126
- updateURL() {
127
- const newUrl = `${window.location.pathname}?${this.params.toString()}`;
128
- window.history.pushState({}, '', newUrl);
129
- }
130
- }
131
- //# sourceMappingURL=classes.js.map
132
-
133
- // ===== File: compiler.js =====
134
- "use strict";
135
- function downloadTextAsFile(filename, text) {
136
- const blob = new Blob([text], { type: 'text/plain' });
137
- const url = URL.createObjectURL(blob);
138
- console.log(url);
139
- const a = document.createElement('a');
140
- a.href = url;
141
- a.download = filename;
142
- a.click();
143
- URL.revokeObjectURL(url);
144
- }
145
- //# sourceMappingURL=compiler.js.map
146
-
147
- // ===== File: cookie.js =====
148
- "use strict";
149
- function getCookie(name) {
150
- const nameEQ = `${name}=`;
151
- const cookiesArray = document.cookie.split(';');
152
- cookiesArray.forEach(cookie => {
153
- cookie = cookie.trim();
154
- if (cookie.indexOf(nameEQ) === 0) {
155
- return cookie.substring(nameEQ.length, cookie.length);
156
- }
157
- });
158
- return null;
159
- }
160
- function setCookie(name, value, days = null, path = '/') {
161
- let expires;
162
- if (!days) {
163
- expires = '; expires=Fri, 31 Dec 9999 23:59:59 GMT';
164
- }
165
- else {
166
- const date = new Date();
167
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
168
- expires = `; expires=${date.toUTCString()}`;
169
- }
170
- document.cookie = `${name}=${value || ''}${expires}; path=${path}`;
171
- }
172
- function hasCookie(name) {
173
- return getCookie(name) != null;
174
- }
175
- //# sourceMappingURL=cookie.js.map
176
-
177
- // ===== File: exceptions.js =====
178
- "use strict";
179
- class NotAuthorizedError extends Error {
180
- constructor() {
181
- super("Пользователь не авторизован");
182
- this.name = 'NotAuthorizedError';
183
- }
184
- }
185
- //# sourceMappingURL=exceptions.js.map
186
-
187
- // ===== File: get_element_types.js =====
188
- "use strict";
189
- function button_submit(parent) {
190
- const buttons = parent.querySelectorAll('button');
191
- let submit = null;
192
- buttons.forEach(button => {
193
- if (button.type === 'submit')
194
- submit = button;
195
- });
196
- return submit;
197
- }
198
- //# sourceMappingURL=get_element_types.js.map
199
-
200
- // ===== File: html.js =====
201
- "use strict";
202
- const escapeChars = {
203
- '<': '&lt;',
204
- '>': '&gt;',
205
- '&': '&amp;',
206
- '"': '&quot;',
207
- "'": '&#39;'
208
- };
209
- function togglePassword(passwordInput) {
210
- const passwordType = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
211
- passwordInput.setAttribute('type', passwordType);
212
- }
213
- function isTextWrapped(element) {
214
- const elementHeight = element.clientHeight;
215
- const scrollHeight = element.scrollHeight;
216
- return scrollHeight > elementHeight;
217
- }
218
- function notArrayEmpty(array) {
219
- return array.length > 0;
220
- }
221
- function get_tagName(element) {
222
- return element.tagName.toLowerCase();
223
- }
224
- function element_toHTMLText(element) {
225
- const tag = get_tagName(element);
226
- const attrs = element.attributes;
227
- let text = `<${tag}`;
228
- if (attrs.length > 0) {
229
- for (let attr of attrs) {
230
- text += ` ${attr.name}="${attr.value}"`;
231
- }
232
- }
233
- text += `>${element.innerHTML}</${tag}>`;
234
- return text;
235
- }
236
- function element_to_div(element) {
237
- const div = document.createElement('div');
238
- div.innerHTML = element.outerHTML;
239
- return div;
240
- }
241
- function password_format(shownPasswordHTML, hiddenPasswordHTML) {
242
- document.addEventListener('DOMContentLoaded', () => {
243
- const forms = document.querySelectorAll('form');
244
- forms.forEach(form => {
245
- const inputs = form.querySelectorAll('input[type="password"]');
246
- inputs.forEach(input => {
247
- const wrapper = document.createElement('div');
248
- wrapper.style.position = 'relative';
249
- wrapper.style.display = 'inline-block';
250
- wrapper.style.width = '100%';
251
- input.parentNode.insertBefore(wrapper, input);
252
- wrapper.appendChild(input);
253
- const toggleBtn = document.createElement('button');
254
- toggleBtn.type = 'button';
255
- toggleBtn.className = 'show-password-btn';
256
- toggleBtn.innerHTML = hiddenPasswordHTML;
257
- toggleBtn.style.cssText = `
258
- position: absolute;
259
- left: 45%;
260
- top: 50%;
261
- transform: translateY(-50%);
262
- cursor: pointer;
263
- user-select: none;
264
- background: none;
265
- border: none;
266
- padding: 0;
267
- `;
268
- toggleBtn.addEventListener('click', () => {
269
- const isShowing = input.type === 'text';
270
- input.type = isShowing ? 'password' : 'text';
271
- toggleBtn.innerHTML = isShowing ? hiddenPasswordHTML : shownPasswordHTML;
272
- });
273
- wrapper.appendChild(toggleBtn);
274
- });
275
- });
276
- });
277
- }
278
- function escapeHTML(html) {
279
- return html.replace(/[<>"']/g, function (i) {
280
- return escapeChars[i] || i;
281
- });
282
- }
283
- function strFormat(template, ...args) {
284
- return template.replace(/{(\w+)}/g, (match, key) => {
285
- if (args.length > 0 && typeof args[0] === 'object' && args[0][key] !== undefined) {
286
- return args[0][key];
287
- }
288
- const index = parseInt(key);
289
- if (!isNaN(index) && args[index] !== undefined) {
290
- return args[index];
291
- }
292
- return match;
293
- });
294
- }
295
- function elementToHyperlink(element, href, cursorPointer = true, preventDefault = false) {
296
- element.addEventListener('click', function (elem) {
297
- if (elem.button === 0)
298
- window.location.href = href;
299
- else if (elem.button === 1)
300
- window.open(href, '_blank');
301
- });
302
- if (preventDefault) {
303
- element.addEventListener('auxclick', function (elem) {
304
- if (elem.button === 1)
305
- elem.preventDefault();
306
- });
307
- }
308
- if (cursorPointer)
309
- element.style.cursor = 'pointer';
310
- return element;
311
- }
312
- //# sourceMappingURL=html.js.map
313
-
314
- // ===== File: input.js =====
315
- "use strict";
316
- function getInputCursorPosition(input) {
317
- const start = input.selectionStart;
318
- if (start == null)
319
- throw new Error("Incorrect input type");
320
- return start - 1;
321
- }
322
- function copyInputToClipboard(input) {
323
- const disabled = input.hasAttribute("disabled");
324
- if (disabled)
325
- input.removeAttribute('disabled');
326
- navigator.clipboard.writeText(input.value)
327
- .then(() => { })
328
- .catch(err => {
329
- console.error('Не удалось скопировать текст: ', err);
330
- })
331
- .finally(() => {
332
- if (disabled)
333
- input.setAttribute('disabled', '');
334
- });
335
- }
336
- function clearInput_and_addLastSymbol(input) {
337
- input.value = input.value[getInputCursorPosition(input)] || '';
338
- }
339
- function getInputLabel(input) {
340
- const label = document.querySelector(`label[for="${input.id}"]`);
341
- if (!label)
342
- throw new Error("Label не найден. Возможно, вы не использовали атрибут for в нем");
343
- return label;
344
- }
345
- //# sourceMappingURL=input.js.map
346
-
347
- // ===== File: link.js =====
348
- "use strict";
349
- function loadCSS(href) {
350
- const link = document.createElement('link');
351
- link.rel = 'stylesheet';
352
- link.type = 'text/css';
353
- link.href = href;
354
- document.head.appendChild(link);
355
- }
356
- //# sourceMappingURL=link.js.map
357
-
358
- // ===== File: notifications.js =====
359
- "use strict";
360
- function pushNotification(title = "Уведомление", body = "Текст уведомления", icon = null) {
361
- if (Notification.permission !== "granted") {
362
- Notification.requestPermission().then(permission => {
363
- if (permission === "granted") {
364
- if (icon)
365
- new Notification(title, { body: body, icon: icon });
366
- else
367
- new Notification(title, { body: body });
368
- }
369
- });
370
- }
371
- else {
372
- if (icon)
373
- new Notification(title, { body: body, icon: icon });
374
- else
375
- new Notification(title, { body: body });
376
- }
377
- }
378
- class HyperTextNotification {
379
- constructor({ bottom = '20', right = '20', backgroundColor = '#121212', color = '#ededed', padding = '15', borderRadius = '5', timeout = 3 } = {}) {
380
- Object.defineProperty(this, "bottom", {
381
- enumerable: true,
382
- configurable: true,
383
- writable: true,
384
- value: void 0
385
- });
386
- Object.defineProperty(this, "right", {
387
- enumerable: true,
388
- configurable: true,
389
- writable: true,
390
- value: void 0
391
- });
392
- Object.defineProperty(this, "backgroundColor", {
393
- enumerable: true,
394
- configurable: true,
395
- writable: true,
396
- value: void 0
397
- });
398
- Object.defineProperty(this, "color", {
399
- enumerable: true,
400
- configurable: true,
401
- writable: true,
402
- value: void 0
403
- });
404
- Object.defineProperty(this, "padding", {
405
- enumerable: true,
406
- configurable: true,
407
- writable: true,
408
- value: void 0
409
- });
410
- Object.defineProperty(this, "borderRadius", {
411
- enumerable: true,
412
- configurable: true,
413
- writable: true,
414
- value: void 0
415
- });
416
- Object.defineProperty(this, "timeout", {
417
- enumerable: true,
418
- configurable: true,
419
- writable: true,
420
- value: void 0
421
- });
422
- this.bottom = intToPixel(bottom);
423
- this.right = intToPixel(right);
424
- this.backgroundColor = backgroundColor;
425
- this.color = color;
426
- this.padding = intToPixel(padding);
427
- this.borderRadius = intToPixel(borderRadius);
428
- this.timeout = timeout;
429
- }
430
- show(message, timeout = 0) {
431
- const notification = document.createElement("div");
432
- notification.textContent = message;
433
- notification.style.position = "fixed";
434
- notification.style.bottom = this.bottom;
435
- notification.style.right = this.right;
436
- notification.style.backgroundColor = this.backgroundColor;
437
- notification.style.color = this.color;
438
- notification.style.padding = this.padding;
439
- notification.style.borderRadius = this.borderRadius;
440
- notification.style.zIndex = "1000";
441
- const actualTimeout = timeout === 0 ? this.timeout : timeout;
442
- document.body.appendChild(notification);
443
- setTimeout(() => {
444
- if (document.body.contains(notification)) {
445
- document.body.removeChild(notification);
446
- }
447
- }, actualTimeout * 1000);
448
- }
449
- }
450
- //# sourceMappingURL=notifications.js.map
451
-
452
- // ===== File: styles.js =====
453
- "use strict";
454
- function input_type_fc(input) {
455
- return input.type !== 'hidden' && input.type !== 'reset' && input.type !== 'checkbox' && input.type !== 'radio';
456
- }
457
- function input_form_control(form) {
458
- const inputs = form.querySelectorAll('input');
459
- const selects = form.querySelectorAll('select');
460
- const areas = form.querySelectorAll('textarea');
461
- inputs.forEach(input => {
462
- if (input_type_fc(input))
463
- input.classList.add('form-control');
464
- });
465
- selects.forEach(select => {
466
- select.classList.add('form-control');
467
- });
468
- areas.forEach(textarea => {
469
- textarea.classList.add('form-control');
470
- });
471
- }
472
- function input_form_control_unline(form) {
473
- console.log(form.id);
474
- const inputs = form.querySelectorAll('input');
475
- const selects = form.querySelectorAll('select');
476
- const areas = form.querySelectorAll('textarea');
477
- inputs.forEach(input => {
478
- if (input_type_fc(input))
479
- input.classList.add('form-control-unline');
480
- });
481
- selects.forEach(select => {
482
- select.classList.add('form-control-unline');
483
- });
484
- areas.forEach(textarea => {
485
- textarea.classList.add('form-control-unline');
486
- });
487
- }
488
- function intToPixel(number = '0') {
489
- number = number.toString();
490
- if (parseInt(number) === 0)
491
- return '0';
492
- return !isNaN(parseInt(number)) ? number + 'px' : number;
493
- }
494
- //# sourceMappingURL=styles.js.map
495
-
496
- // ===== File: system.js =====
497
- "use strict";
498
- function getSystemTheme() {
499
- if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').media !== 'not all') {
500
- const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
501
- return isDark ? 'dark' : 'light';
502
- }
503
- return null;
504
- }
505
- function copyTextToClipboard(text) {
506
- navigator.clipboard.writeText(text)
507
- .then(() => { })
508
- .catch(err => {
509
- console.error('Не удалось скопировать текст: ', err);
510
- });
511
- }
512
- function redirectBackOrClose(default_url = '/') {
513
- if (document.referrer && document.referrer !== window.location.href) {
514
- window.history.back();
515
- }
516
- else {
517
- window.close();
518
- setTimeout(() => {
519
- if (!window.closed) {
520
- window.location.href = default_url;
521
- }
522
- }, 100);
523
- }
524
- }
525
- function getHost() {
526
- return window.location.protocol + '//' + window.location.host;
527
- }
528
- //# sourceMappingURL=system.js.map
529
-
530
- // ===== File: tags.js =====
531
- "use strict";
532
- class AbbreviatedNumber extends HTMLElement {
533
- constructor() {
534
- super();
535
- Object.defineProperty(this, "isShortened", {
536
- enumerable: true,
537
- configurable: true,
538
- writable: true,
539
- value: void 0
540
- });
541
- Object.defineProperty(this, "originalNumber", {
542
- enumerable: true,
543
- configurable: true,
544
- writable: true,
545
- value: void 0
546
- });
547
- this.isShortened = true;
548
- this.originalNumber = parseFloat(this.textContent?.trim() || '0');
549
- this.render();
550
- this.addEventListener('click', this.toggle.bind(this));
551
- if (isNaN(this.originalNumber))
552
- throw new TypeError('The value must be a number');
553
- }
554
- static get observedAttributes() {
555
- return ['lang', 'use_comma'];
556
- }
557
- toggle() {
558
- this.isShortened = !this.isShortened;
559
- this.render();
560
- }
561
- getCurrentLang() {
562
- return this.getAttribute('lang') || document.documentElement.getAttribute('lang') || 'en';
563
- }
564
- formatNumber(num, lang) {
565
- num = parseFloat(num.toString().replace(/[^\d.-]/g, ''));
566
- if (isNaN(num))
567
- return this.originalNumber.toString();
568
- const useComma = this.hasAttribute('use_comma');
569
- const separator = useComma ? ',' : '.';
570
- const round = (value, digits) => {
571
- if (digits === 0)
572
- return Math.round(value);
573
- const factor = Math.pow(10, digits);
574
- return Math.round(value * factor) / factor;
575
- };
576
- const format = (value, digits) => {
577
- const rounded = round(value, digits);
578
- let str = rounded.toString();
579
- if (digits > 0 && str.includes('.')) {
580
- str = str.replace(/\.?0+$/, '');
581
- }
582
- return str.replace('.', separator);
583
- };
584
- const getFractionDigits = (value) => {
585
- if (value < 10)
586
- return 2;
587
- if (value < 100)
588
- return 1;
589
- return 0;
590
- };
591
- if (lang.startsWith('ru')) {
592
- if (num >= 1000000000000) {
593
- const value = num / 1000000000000;
594
- return format(value, getFractionDigits(value)) + ' трлн.';
595
- }
596
- if (num >= 1000000000) {
597
- const value = num / 1000000000;
598
- return format(value, getFractionDigits(value)) + ' млрд.';
599
- }
600
- if (num >= 1000000) {
601
- const value = num / 1000000;
602
- return format(value, getFractionDigits(value)) + ' млн.';
603
- }
604
- if (num >= 1000) {
605
- const value = num / 1000;
606
- return format(value, getFractionDigits(value)) + ' тыс.';
607
- }
608
- }
609
- else {
610
- if (num >= 1000000000000) {
611
- const value = num / 1000000000000;
612
- return format(value, getFractionDigits(value)) + 'T';
613
- }
614
- if (num >= 1000000000) {
615
- const value = num / 1000000000;
616
- return format(value, getFractionDigits(value)) + 'B';
617
- }
618
- if (num >= 1000000) {
619
- const value = num / 1000000;
620
- return format(value, getFractionDigits(value)) + 'M';
621
- }
622
- if (num >= 1000) {
623
- const value = num / 1000;
624
- return format(value, getFractionDigits(value)) + 'K';
625
- }
626
- }
627
- return format(num, 0);
628
- }
629
- render() {
630
- const lang = this.getCurrentLang();
631
- this.textContent = this.isShortened
632
- ? this.formatNumber(this.originalNumber, lang)
633
- : this.originalNumber.toString();
634
- }
635
- }
636
- class StepElement extends HTMLElement {
637
- constructor() {
638
- super();
639
- if (this.textContent)
640
- this.label = this.textContent;
641
- this.innerHTML = `
642
- <div data-sb-generated="circle"></div>
643
- <div data-sb-generated="label"><slot></slot></div>
644
- `;
645
- }
646
- static get observedAttributes() {
647
- return ['active', 'completed', 'label'];
648
- }
649
- get index() {
650
- return Array.from(this.parentNode.children).indexOf(this) + 1;
651
- }
652
- get active() {
653
- return this.hasAttribute('active');
654
- }
655
- set active(force) {
656
- this.toggleAttribute('active', force);
657
- }
658
- get completed() {
659
- return this.hasAttribute('completed');
660
- }
661
- set completed(force) {
662
- this.toggleAttribute('completed', force);
663
- }
664
- get label() {
665
- return this.getAttribute('label') || "";
666
- }
667
- set label(value) {
668
- this.setAttribute('label', value);
669
- }
670
- reset() {
671
- this.active = false;
672
- this.completed = false;
673
- }
674
- get status() {
675
- if (this.active)
676
- return 'active';
677
- else if (this.completed)
678
- return 'complete';
679
- else
680
- return 'uncomplete';
681
- }
682
- set status(value) {
683
- this.reset();
684
- switch (value) {
685
- case 'complete':
686
- this.completed = true;
687
- break;
688
- case 'active':
689
- this.active = true;
690
- break;
691
- case 'uncomplete':
692
- break;
693
- default:
694
- throw new TypeError(`Unknown status: ${value}`);
695
- }
696
- }
697
- connectedCallback() {
698
- this.querySelector('[data-sb-generated="circle"]').textContent = this.index.toString();
699
- this.querySelector('[data-sb-generated="label"]').textContent = this.label;
700
- const parent = this.parentElement;
701
- const currentStep = parent.currentStep || 1;
702
- if (this.index === currentStep)
703
- this.active = true;
704
- else if (this.index < currentStep)
705
- this.completed = true;
706
- }
707
- }
708
- class Stepbar extends HTMLElement {
709
- constructor() {
710
- super();
711
- Object.defineProperty(this, "_observer", {
712
- enumerable: true,
713
- configurable: true,
714
- writable: true,
715
- value: void 0
716
- });
717
- this.attachShadow({ mode: 'open' });
718
- this.shadowRoot.innerHTML = `
719
- <slot></slot>
720
- `;
721
- }
722
- static get observedAttributes() {
723
- return ['current'];
724
- }
725
- attributeChangedCallback(name, oldValue, newValue) {
726
- if (name === 'current') {
727
- this.updateSteps();
728
- }
729
- }
730
- connectedCallback() {
731
- if (!this._observer) {
732
- this._observer = new MutationObserver(() => this.updateSteps());
733
- this._observer.observe(this, { childList: true });
734
- }
735
- this.updateSteps();
736
- }
737
- disconnectedCallback() {
738
- if (this._observer) {
739
- this._observer.disconnect();
740
- }
741
- }
742
- updateSteps() {
743
- const currentStep = parseInt(this.getAttribute('current') || '1');
744
- const elements = Array.from(this.children).filter((el) => el.tagName === 'SB-ELEMENT');
745
- elements.forEach((element, index) => {
746
- const stepNumber = index + 1;
747
- element.status = 'uncomplete';
748
- if (stepNumber < currentStep) {
749
- element.status = 'complete';
750
- }
751
- else if (stepNumber === currentStep) {
752
- element.status = 'active';
753
- }
754
- });
755
- }
756
- get currentStep() {
757
- return parseInt(this.getAttribute('current') || '1');
758
- }
759
- set currentStep(step) {
760
- this.setAttribute('current', step.toString());
761
- }
762
- }
763
- class HTMLFile extends HTMLElement {
764
- constructor() {
765
- super();
766
- }
767
- get src() {
768
- return this.getAttribute('src') || '';
769
- }
770
- set src(value) {
771
- if (value) {
772
- this.setAttribute('src', value);
773
- }
774
- else {
775
- this.removeAttribute('src');
776
- }
777
- }
778
- static get observedAttributes() {
779
- return ['src'];
780
- }
781
- connectedCallback() {
782
- this.loadContent();
783
- }
784
- attributeChangedCallback(name, oldValue, newValue) {
785
- if (name === 'src' && oldValue !== newValue && this.isConnected) {
786
- this.loadContent();
787
- }
788
- }
789
- async loadContent() {
790
- const src = this.src;
791
- if (!src)
792
- return;
793
- try {
794
- const response = await fetch(src);
795
- const content = await response.text();
796
- this.innerHTML = content;
797
- await this.executeScripts();
798
- }
799
- catch (error) {
800
- this.innerHTML = `Ошибка загрузки: ${error.message}`;
801
- }
802
- }
803
- async executeScripts() {
804
- const scripts = this.querySelectorAll('script');
805
- for (const script of scripts) {
806
- if (script.src) {
807
- await this.loadExternalScript(script.src);
808
- }
809
- else {
810
- this.executeInlineScript(script.textContent || '');
811
- }
812
- script.remove();
813
- }
814
- }
815
- loadExternalScript(src) {
816
- return new Promise((resolve, reject) => {
817
- const newScript = document.createElement('script');
818
- newScript.src = src;
819
- newScript.onload = resolve;
820
- newScript.onerror = reject;
821
- document.head.appendChild(newScript);
822
- });
823
- }
824
- executeInlineScript(code) {
825
- try {
826
- const newScript = document.createElement('script');
827
- newScript.textContent = code;
828
- document.head.appendChild(newScript);
829
- document.head.removeChild(newScript);
830
- }
831
- catch (error) {
832
- console.error('Ошибка выполнения скрипта:', error);
833
- }
834
- }
835
- get loaded() {
836
- return this.hasAttribute('data-loaded');
837
- }
838
- reload() {
839
- return this.loadContent();
840
- }
841
- get content() {
842
- return this.innerHTML;
843
- }
844
- }
845
- class ClickToCopy extends HTMLElement {
846
- constructor() {
847
- super();
848
- Object.defineProperty(this, "notification", {
849
- enumerable: true,
850
- configurable: true,
851
- writable: true,
852
- value: void 0
853
- });
854
- this.notification = new HyperTextNotification({ backgroundColor: 'rgba(192,0,192,0.8)' });
855
- }
856
- get notificationText() {
857
- return this.getAttribute('text') || "Скопировано";
858
- }
859
- set notificationText(value) {
860
- if (value)
861
- this.setAttribute('text', value);
862
- else
863
- this.removeAttribute('text');
864
- }
865
- get isNotified() {
866
- return this.hasAttribute('notified');
867
- }
868
- set isNotified(value) {
869
- if (value)
870
- this.setAttribute('notified', '');
871
- else
872
- this.removeAttribute('notified');
873
- }
874
- connectedCallback() {
875
- this.addEventListener('click', () => {
876
- navigator.clipboard.writeText(this.textContent || '');
877
- if (this.isNotified)
878
- this.notification.show(this.notificationText);
879
- });
880
- }
881
- }
882
- customElements.define('sb-element', StepElement);
883
- customElements.define('step-bar', Stepbar);
884
- customElements.define('ab-num', AbbreviatedNumber);
885
- customElements.define('include-html', HTMLFile);
886
- customElements.define('click-to-copy', ClickToCopy);
887
- //# sourceMappingURL=tags.js.map
888
-
889
- // ===== File: url.js =====
890
- "use strict";
891
- function isAbsoluteUrl(url) {
892
- try {
893
- new URL(url);
894
- return true;
895
- }
896
- catch (e) {
897
- return url[0] === '/' || url[0] === '\\';
898
- }
899
- }
900
- function combineUrls(baseUrl, relativeUrl) {
901
- try {
902
- if (!baseUrl) {
903
- if (relativeUrl.startsWith('/'))
904
- return relativeUrl;
905
- return '/' + relativeUrl;
906
- }
907
- return new URL(relativeUrl, baseUrl).toString();
908
- }
909
- catch (error) {
910
- throw new Error(`Invalid URL combination: ${baseUrl}, ${relativeUrl}`);
911
- }
912
- }
913
- function getScriptSite(script) {
914
- return new URL(script.src).origin;
915
- }
916
- //# sourceMappingURL=url.js.map
917
-
918
- // ===== File: uuid.js =====
919
- "use strict";
920
- function generateUUIDv4() {
921
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
922
- const r = Math.random() * 16 | 0;
923
- const v = c === 'x' ? r : (r & 0x3 | 0x8);
924
- return v.toString(16);
925
- });
926
- }
927
- //# sourceMappingURL=uuid.js.map
928
-
1
+ // @ts-nocheck
2
+
3
+ // ===== File: arraywork.js =====
4
+ "use strict";
5
+ function arrayIsEmpty(arr) {
6
+ return arr.length === 0 || !arr[0];
7
+ }
8
+ function arraysIsEqual(array1, array2, strict = true) {
9
+ if (array1.length !== array2.length)
10
+ return false;
11
+ if (strict)
12
+ return array1.every((value, index) => value === array2[index]);
13
+ else {
14
+ array1.forEach(element => {
15
+ if (!array2.includes(element))
16
+ return false;
17
+ });
18
+ return true;
19
+ }
20
+ }
21
+ //# sourceMappingURL=arraywork.js.map
22
+
23
+ // ===== File: auto.js =====
24
+ "use strict";
25
+ const stylesRoot = getComputedStyle(document.documentElement);
26
+ //# sourceMappingURL=auto.js.map
27
+
28
+ // ===== File: classes.js =====
29
+ "use strict";
30
+ class ClickableLinksFactory {
31
+ constructor() {
32
+ Object.defineProperty(this, "urlRegex", {
33
+ enumerable: true,
34
+ configurable: true,
35
+ writable: true,
36
+ value: /(https?:\/\/[^\s]+)/g
37
+ });
38
+ }
39
+ walk(node, isClickToCopy) {
40
+ if (node.nodeType === Node.TEXT_NODE) {
41
+ const text = node.textContent || '';
42
+ const func = isClickToCopy ? this.get_clickToCopy : this.get_anchor;
43
+ if (this.urlRegex.test(text)) {
44
+ const parent = node.parentNode;
45
+ const newContent = text.replace(this.urlRegex, url => {
46
+ return func(url);
47
+ });
48
+ if (!parent)
49
+ return;
50
+ const tempDiv = document.createElement('div');
51
+ tempDiv.innerHTML = newContent;
52
+ while (tempDiv.firstChild) {
53
+ parent.insertBefore(tempDiv.firstChild, node);
54
+ }
55
+ parent.removeChild(node);
56
+ }
57
+ }
58
+ else {
59
+ node.childNodes.forEach(child => {
60
+ this.walk(child, isClickToCopy);
61
+ });
62
+ }
63
+ }
64
+ get_anchor(url) {
65
+ return `<a href="${url}" target="_blank" rel="noopener noreferrer" data-clf-generated>${url}</a>`;
66
+ }
67
+ get_clickToCopy(url) {
68
+ return `<click-to-copy data-clf-generated>${url}</click-to-copy>`;
69
+ }
70
+ clickableLinks(element) {
71
+ this.walk(element, false);
72
+ }
73
+ clickToCopyLinks(element) {
74
+ this.walk(element, true);
75
+ }
76
+ get generatedElements() {
77
+ return document.querySelectorAll('[data-clf-generated]');
78
+ }
79
+ }
80
+ class GETParamsManager {
81
+ constructor() {
82
+ Object.defineProperty(this, "params", {
83
+ enumerable: true,
84
+ configurable: true,
85
+ writable: true,
86
+ value: void 0
87
+ });
88
+ this.params = new URLSearchParams(window.location.search);
89
+ }
90
+ get(key, defaultValue) {
91
+ const value = this.params.get(key);
92
+ if (value === null)
93
+ return defaultValue || null;
94
+ if (defaultValue !== undefined) {
95
+ switch (typeof defaultValue) {
96
+ case 'number':
97
+ return Number(value);
98
+ case 'boolean':
99
+ return (value === 'true');
100
+ default:
101
+ return value;
102
+ }
103
+ }
104
+ return value;
105
+ }
106
+ set(key, value) {
107
+ this.params.set(key, String(value));
108
+ this.updateURL();
109
+ }
110
+ delete(key) {
111
+ this.params.delete(key);
112
+ this.updateURL();
113
+ }
114
+ all() {
115
+ const result = {};
116
+ for (const [key, value] of this.params.entries()) {
117
+ result[key] = value;
118
+ }
119
+ return result;
120
+ }
121
+ clear() {
122
+ const keys = Array.from(this.params.keys());
123
+ keys.forEach(key => this.params.delete(key));
124
+ this.updateURL();
125
+ }
126
+ updateURL() {
127
+ const newUrl = `${window.location.pathname}?${this.params.toString()}`;
128
+ window.history.pushState({}, '', newUrl);
129
+ }
130
+ }
131
+ //# sourceMappingURL=classes.js.map
132
+
133
+ // ===== File: compiler.js =====
134
+ "use strict";
135
+ function downloadTextAsFile(filename, text) {
136
+ const blob = new Blob([text], { type: 'text/plain' });
137
+ const url = URL.createObjectURL(blob);
138
+ console.log(url);
139
+ const a = document.createElement('a');
140
+ a.href = url;
141
+ a.download = filename;
142
+ a.click();
143
+ URL.revokeObjectURL(url);
144
+ }
145
+ //# sourceMappingURL=compiler.js.map
146
+
147
+ // ===== File: cookie.js =====
148
+ "use strict";
149
+ function getCookie(name) {
150
+ const nameEQ = `${name}=`;
151
+ const cookiesArray = document.cookie.split(';');
152
+ cookiesArray.forEach(cookie => {
153
+ cookie = cookie.trim();
154
+ if (cookie.indexOf(nameEQ) === 0) {
155
+ return cookie.substring(nameEQ.length, cookie.length);
156
+ }
157
+ });
158
+ return null;
159
+ }
160
+ function setCookie(name, value, days = null, path = '/') {
161
+ let expires;
162
+ if (!days) {
163
+ expires = '; expires=Fri, 31 Dec 9999 23:59:59 GMT';
164
+ }
165
+ else {
166
+ const date = new Date();
167
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
168
+ expires = `; expires=${date.toUTCString()}`;
169
+ }
170
+ document.cookie = `${name}=${value || ''}${expires}; path=${path}`;
171
+ }
172
+ function hasCookie(name) {
173
+ return getCookie(name) != null;
174
+ }
175
+ //# sourceMappingURL=cookie.js.map
176
+
177
+ // ===== File: datework.js =====
178
+ "use strict";
179
+ class datetime {
180
+ constructor(_year, _month, _days, _hours, _minutes, _seconds) {
181
+ Object.defineProperty(this, "_year", {
182
+ enumerable: true,
183
+ configurable: true,
184
+ writable: true,
185
+ value: _year
186
+ });
187
+ Object.defineProperty(this, "_month", {
188
+ enumerable: true,
189
+ configurable: true,
190
+ writable: true,
191
+ value: _month
192
+ });
193
+ Object.defineProperty(this, "_days", {
194
+ enumerable: true,
195
+ configurable: true,
196
+ writable: true,
197
+ value: _days
198
+ });
199
+ Object.defineProperty(this, "_hours", {
200
+ enumerable: true,
201
+ configurable: true,
202
+ writable: true,
203
+ value: _hours
204
+ });
205
+ Object.defineProperty(this, "_minutes", {
206
+ enumerable: true,
207
+ configurable: true,
208
+ writable: true,
209
+ value: _minutes
210
+ });
211
+ Object.defineProperty(this, "_seconds", {
212
+ enumerable: true,
213
+ configurable: true,
214
+ writable: true,
215
+ value: _seconds
216
+ });
217
+ Object.defineProperty(this, "date", {
218
+ enumerable: true,
219
+ configurable: true,
220
+ writable: true,
221
+ value: void 0
222
+ });
223
+ this.date = new Date(this._year, this._month, this._days, this._hours, this._minutes, this._seconds);
224
+ }
225
+ static newObject(dateObject) {
226
+ return new datetime(dateObject.getFullYear(), dateObject.getMonth(), dateObject.getDate(), dateObject.getHours(), dateObject.getMinutes(), dateObject.getSeconds());
227
+ }
228
+ static now() {
229
+ return datetime.newObject(new Date());
230
+ }
231
+ static fromTimestamp(timestamp) {
232
+ return datetime.newObject(new Date(timestamp));
233
+ }
234
+ get year() { return this._year; }
235
+ get month() { return this._month; }
236
+ get days() { return this._days; }
237
+ get hours() { return this._hours; }
238
+ get minutes() { return this._minutes; }
239
+ get seconds() { return this._seconds; }
240
+ set year(year) { this._year = year; }
241
+ set month(month) { this._month = month; }
242
+ set days(days) { this._days = days; }
243
+ set hours(hours) { this._hours = hours; }
244
+ set minutes(minutes) { this._minutes = minutes; }
245
+ set seconds(seconds) { this._seconds = seconds; }
246
+ timestamp() {
247
+ return this.date.getTime();
248
+ }
249
+ }
250
+ //# sourceMappingURL=datework.js.map
251
+
252
+ // ===== File: exceptions.js =====
253
+ "use strict";
254
+ class NotAuthorizedError extends Error {
255
+ constructor() {
256
+ super("Пользователь не авторизован");
257
+ this.name = 'NotAuthorizedError';
258
+ }
259
+ }
260
+ //# sourceMappingURL=exceptions.js.map
261
+
262
+ // ===== File: get_element_types.js =====
263
+ "use strict";
264
+ function button_submit(parent) {
265
+ const buttons = parent.querySelectorAll('button');
266
+ let submit = null;
267
+ buttons.forEach(button => {
268
+ if (button.type === 'submit')
269
+ submit = button;
270
+ });
271
+ return submit;
272
+ }
273
+ //# sourceMappingURL=get_element_types.js.map
274
+
275
+ // ===== File: html.js =====
276
+ "use strict";
277
+ const escapeChars = {
278
+ '<': '&lt;',
279
+ '>': '&gt;',
280
+ '&': '&amp;',
281
+ '"': '&quot;',
282
+ "'": '&#39;'
283
+ };
284
+ function togglePassword(passwordInput) {
285
+ const passwordType = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
286
+ passwordInput.setAttribute('type', passwordType);
287
+ }
288
+ function isTextWrapped(element) {
289
+ const elementHeight = element.clientHeight;
290
+ const scrollHeight = element.scrollHeight;
291
+ return scrollHeight > elementHeight;
292
+ }
293
+ function notArrayEmpty(array) {
294
+ return array.length > 0;
295
+ }
296
+ function get_tagName(element) {
297
+ return element.tagName.toLowerCase();
298
+ }
299
+ function element_toHTMLText(element) {
300
+ const tag = get_tagName(element);
301
+ const attrs = element.attributes;
302
+ let text = `<${tag}`;
303
+ if (attrs.length > 0) {
304
+ for (let attr of attrs) {
305
+ text += ` ${attr.name}="${attr.value}"`;
306
+ }
307
+ }
308
+ text += `>${element.innerHTML}</${tag}>`;
309
+ return text;
310
+ }
311
+ function element_to_div(element) {
312
+ const div = document.createElement('div');
313
+ div.innerHTML = element.outerHTML;
314
+ return div;
315
+ }
316
+ function password_format(shownPasswordHTML, hiddenPasswordHTML) {
317
+ document.addEventListener('DOMContentLoaded', () => {
318
+ const forms = document.querySelectorAll('form');
319
+ forms.forEach(form => {
320
+ const inputs = form.querySelectorAll('input[type="password"]');
321
+ inputs.forEach(input => {
322
+ const wrapper = document.createElement('div');
323
+ wrapper.style.position = 'relative';
324
+ wrapper.style.display = 'inline-block';
325
+ wrapper.style.width = '100%';
326
+ input.parentNode.insertBefore(wrapper, input);
327
+ wrapper.appendChild(input);
328
+ const toggleBtn = document.createElement('button');
329
+ toggleBtn.type = 'button';
330
+ toggleBtn.className = 'show-password-btn';
331
+ toggleBtn.innerHTML = hiddenPasswordHTML;
332
+ toggleBtn.style.cssText = `
333
+ position: absolute;
334
+ left: 45%;
335
+ top: 50%;
336
+ transform: translateY(-50%);
337
+ cursor: pointer;
338
+ user-select: none;
339
+ background: none;
340
+ border: none;
341
+ padding: 0;
342
+ `;
343
+ toggleBtn.addEventListener('click', () => {
344
+ const isShowing = input.type === 'text';
345
+ input.type = isShowing ? 'password' : 'text';
346
+ toggleBtn.innerHTML = isShowing ? hiddenPasswordHTML : shownPasswordHTML;
347
+ });
348
+ wrapper.appendChild(toggleBtn);
349
+ });
350
+ });
351
+ });
352
+ }
353
+ function escapeHTML(html) {
354
+ return html.replace(/[<>"']/g, function (i) {
355
+ return escapeChars[i] || i;
356
+ });
357
+ }
358
+ function strFormat(template, ...args) {
359
+ return template.replace(/{(\w+)}/g, (match, key) => {
360
+ if (args.length > 0 && typeof args[0] === 'object' && args[0][key] !== undefined) {
361
+ return args[0][key];
362
+ }
363
+ const index = parseInt(key);
364
+ if (!isNaN(index) && args[index] !== undefined) {
365
+ return args[index];
366
+ }
367
+ return match;
368
+ });
369
+ }
370
+ function elementToHyperlink(element, href, cursorPointer = true, preventDefault = false) {
371
+ element.addEventListener('click', function (elem) {
372
+ if (elem.button === 0)
373
+ window.location.href = href;
374
+ else if (elem.button === 1)
375
+ window.open(href, '_blank');
376
+ });
377
+ if (preventDefault) {
378
+ element.addEventListener('auxclick', function (elem) {
379
+ if (elem.button === 1)
380
+ elem.preventDefault();
381
+ });
382
+ }
383
+ if (cursorPointer)
384
+ element.style.cursor = 'pointer';
385
+ return element;
386
+ }
387
+ //# sourceMappingURL=html.js.map
388
+
389
+ // ===== File: index.js =====
390
+ // @ts-nocheck
391
+
392
+ // ===== File: arraywork.js =====
393
+ "use strict";
394
+ function arrayIsEmpty(arr) {
395
+ return arr.length === 0 || !arr[0];
396
+ }
397
+ function arraysIsEqual(array1, array2, strict = true) {
398
+ if (array1.length !== array2.length)
399
+ return false;
400
+ if (strict)
401
+ return array1.every((value, index) => value === array2[index]);
402
+ else {
403
+ array1.forEach(element => {
404
+ if (!array2.includes(element))
405
+ return false;
406
+ });
407
+ return true;
408
+ }
409
+ }
410
+ //# sourceMappingURL=arraywork.js.map
411
+
412
+ // ===== File: auto.js =====
413
+ "use strict";
414
+ const stylesRoot = getComputedStyle(document.documentElement);
415
+ //# sourceMappingURL=auto.js.map
416
+
417
+ // ===== File: classes.js =====
418
+ "use strict";
419
+ class ClickableLinksFactory {
420
+ constructor() {
421
+ Object.defineProperty(this, "urlRegex", {
422
+ enumerable: true,
423
+ configurable: true,
424
+ writable: true,
425
+ value: /(https?:\/\/[^\s]+)/g
426
+ });
427
+ }
428
+ walk(node, isClickToCopy) {
429
+ if (node.nodeType === Node.TEXT_NODE) {
430
+ const text = node.textContent || '';
431
+ const func = isClickToCopy ? this.get_clickToCopy : this.get_anchor;
432
+ if (this.urlRegex.test(text)) {
433
+ const parent = node.parentNode;
434
+ const newContent = text.replace(this.urlRegex, url => {
435
+ return func(url);
436
+ });
437
+ if (!parent)
438
+ return;
439
+ const tempDiv = document.createElement('div');
440
+ tempDiv.innerHTML = newContent;
441
+ while (tempDiv.firstChild) {
442
+ parent.insertBefore(tempDiv.firstChild, node);
443
+ }
444
+ parent.removeChild(node);
445
+ }
446
+ }
447
+ else {
448
+ node.childNodes.forEach(child => {
449
+ this.walk(child, isClickToCopy);
450
+ });
451
+ }
452
+ }
453
+ get_anchor(url) {
454
+ return `<a href="${url}" target="_blank" rel="noopener noreferrer" data-clf-generated>${url}</a>`;
455
+ }
456
+ get_clickToCopy(url) {
457
+ return `<click-to-copy data-clf-generated>${url}</click-to-copy>`;
458
+ }
459
+ clickableLinks(element) {
460
+ this.walk(element, false);
461
+ }
462
+ clickToCopyLinks(element) {
463
+ this.walk(element, true);
464
+ }
465
+ get generatedElements() {
466
+ return document.querySelectorAll('[data-clf-generated]');
467
+ }
468
+ }
469
+ class GETParamsManager {
470
+ constructor() {
471
+ Object.defineProperty(this, "params", {
472
+ enumerable: true,
473
+ configurable: true,
474
+ writable: true,
475
+ value: void 0
476
+ });
477
+ this.params = new URLSearchParams(window.location.search);
478
+ }
479
+ get(key, defaultValue) {
480
+ const value = this.params.get(key);
481
+ if (value === null)
482
+ return defaultValue || null;
483
+ if (defaultValue !== undefined) {
484
+ switch (typeof defaultValue) {
485
+ case 'number':
486
+ return Number(value);
487
+ case 'boolean':
488
+ return (value === 'true');
489
+ default:
490
+ return value;
491
+ }
492
+ }
493
+ return value;
494
+ }
495
+ set(key, value) {
496
+ this.params.set(key, String(value));
497
+ this.updateURL();
498
+ }
499
+ delete(key) {
500
+ this.params.delete(key);
501
+ this.updateURL();
502
+ }
503
+ all() {
504
+ const result = {};
505
+ for (const [key, value] of this.params.entries()) {
506
+ result[key] = value;
507
+ }
508
+ return result;
509
+ }
510
+ clear() {
511
+ const keys = Array.from(this.params.keys());
512
+ keys.forEach(key => this.params.delete(key));
513
+ this.updateURL();
514
+ }
515
+ updateURL() {
516
+ const newUrl = `${window.location.pathname}?${this.params.toString()}`;
517
+ window.history.pushState({}, '', newUrl);
518
+ }
519
+ }
520
+ //# sourceMappingURL=classes.js.map
521
+
522
+ // ===== File: compiler.js =====
523
+ "use strict";
524
+ function downloadTextAsFile(filename, text) {
525
+ const blob = new Blob([text], { type: 'text/plain' });
526
+ const url = URL.createObjectURL(blob);
527
+ console.log(url);
528
+ const a = document.createElement('a');
529
+ a.href = url;
530
+ a.download = filename;
531
+ a.click();
532
+ URL.revokeObjectURL(url);
533
+ }
534
+ //# sourceMappingURL=compiler.js.map
535
+
536
+ // ===== File: cookie.js =====
537
+ "use strict";
538
+ function getCookie(name) {
539
+ const nameEQ = `${name}=`;
540
+ const cookiesArray = document.cookie.split(';');
541
+ cookiesArray.forEach(cookie => {
542
+ cookie = cookie.trim();
543
+ if (cookie.indexOf(nameEQ) === 0) {
544
+ return cookie.substring(nameEQ.length, cookie.length);
545
+ }
546
+ });
547
+ return null;
548
+ }
549
+ function setCookie(name, value, days = null, path = '/') {
550
+ let expires;
551
+ if (!days) {
552
+ expires = '; expires=Fri, 31 Dec 9999 23:59:59 GMT';
553
+ }
554
+ else {
555
+ const date = new Date();
556
+ date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
557
+ expires = `; expires=${date.toUTCString()}`;
558
+ }
559
+ document.cookie = `${name}=${value || ''}${expires}; path=${path}`;
560
+ }
561
+ function hasCookie(name) {
562
+ return getCookie(name) != null;
563
+ }
564
+ //# sourceMappingURL=cookie.js.map
565
+
566
+ // ===== File: exceptions.js =====
567
+ "use strict";
568
+ class NotAuthorizedError extends Error {
569
+ constructor() {
570
+ super("Пользователь не авторизован");
571
+ this.name = 'NotAuthorizedError';
572
+ }
573
+ }
574
+ //# sourceMappingURL=exceptions.js.map
575
+
576
+ // ===== File: get_element_types.js =====
577
+ "use strict";
578
+ function button_submit(parent) {
579
+ const buttons = parent.querySelectorAll('button');
580
+ let submit = null;
581
+ buttons.forEach(button => {
582
+ if (button.type === 'submit')
583
+ submit = button;
584
+ });
585
+ return submit;
586
+ }
587
+ //# sourceMappingURL=get_element_types.js.map
588
+
589
+ // ===== File: html.js =====
590
+ "use strict";
591
+ const escapeChars = {
592
+ '<': '&lt;',
593
+ '>': '&gt;',
594
+ '&': '&amp;',
595
+ '"': '&quot;',
596
+ "'": '&#39;'
597
+ };
598
+ function togglePassword(passwordInput) {
599
+ const passwordType = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
600
+ passwordInput.setAttribute('type', passwordType);
601
+ }
602
+ function isTextWrapped(element) {
603
+ const elementHeight = element.clientHeight;
604
+ const scrollHeight = element.scrollHeight;
605
+ return scrollHeight > elementHeight;
606
+ }
607
+ function notArrayEmpty(array) {
608
+ return array.length > 0;
609
+ }
610
+ function get_tagName(element) {
611
+ return element.tagName.toLowerCase();
612
+ }
613
+ function element_toHTMLText(element) {
614
+ const tag = get_tagName(element);
615
+ const attrs = element.attributes;
616
+ let text = `<${tag}`;
617
+ if (attrs.length > 0) {
618
+ for (let attr of attrs) {
619
+ text += ` ${attr.name}="${attr.value}"`;
620
+ }
621
+ }
622
+ text += `>${element.innerHTML}</${tag}>`;
623
+ return text;
624
+ }
625
+ function element_to_div(element) {
626
+ const div = document.createElement('div');
627
+ div.innerHTML = element.outerHTML;
628
+ return div;
629
+ }
630
+ function password_format(shownPasswordHTML, hiddenPasswordHTML) {
631
+ document.addEventListener('DOMContentLoaded', () => {
632
+ const forms = document.querySelectorAll('form');
633
+ forms.forEach(form => {
634
+ const inputs = form.querySelectorAll('input[type="password"]');
635
+ inputs.forEach(input => {
636
+ const wrapper = document.createElement('div');
637
+ wrapper.style.position = 'relative';
638
+ wrapper.style.display = 'inline-block';
639
+ wrapper.style.width = '100%';
640
+ input.parentNode.insertBefore(wrapper, input);
641
+ wrapper.appendChild(input);
642
+ const toggleBtn = document.createElement('button');
643
+ toggleBtn.type = 'button';
644
+ toggleBtn.className = 'show-password-btn';
645
+ toggleBtn.innerHTML = hiddenPasswordHTML;
646
+ toggleBtn.style.cssText = `
647
+ position: absolute;
648
+ left: 45%;
649
+ top: 50%;
650
+ transform: translateY(-50%);
651
+ cursor: pointer;
652
+ user-select: none;
653
+ background: none;
654
+ border: none;
655
+ padding: 0;
656
+ `;
657
+ toggleBtn.addEventListener('click', () => {
658
+ const isShowing = input.type === 'text';
659
+ input.type = isShowing ? 'password' : 'text';
660
+ toggleBtn.innerHTML = isShowing ? hiddenPasswordHTML : shownPasswordHTML;
661
+ });
662
+ wrapper.appendChild(toggleBtn);
663
+ });
664
+ });
665
+ });
666
+ }
667
+ function escapeHTML(html) {
668
+ return html.replace(/[<>"']/g, function (i) {
669
+ return escapeChars[i] || i;
670
+ });
671
+ }
672
+ function strFormat(template, ...args) {
673
+ return template.replace(/{(\w+)}/g, (match, key) => {
674
+ if (args.length > 0 && typeof args[0] === 'object' && args[0][key] !== undefined) {
675
+ return args[0][key];
676
+ }
677
+ const index = parseInt(key);
678
+ if (!isNaN(index) && args[index] !== undefined) {
679
+ return args[index];
680
+ }
681
+ return match;
682
+ });
683
+ }
684
+ function elementToHyperlink(element, href, cursorPointer = true, preventDefault = false) {
685
+ element.addEventListener('click', function (elem) {
686
+ if (elem.button === 0)
687
+ window.location.href = href;
688
+ else if (elem.button === 1)
689
+ window.open(href, '_blank');
690
+ });
691
+ if (preventDefault) {
692
+ element.addEventListener('auxclick', function (elem) {
693
+ if (elem.button === 1)
694
+ elem.preventDefault();
695
+ });
696
+ }
697
+ if (cursorPointer)
698
+ element.style.cursor = 'pointer';
699
+ return element;
700
+ }
701
+ //# sourceMappingURL=html.js.map
702
+
703
+ // ===== File: input.js =====
704
+ "use strict";
705
+ function getInputCursorPosition(input) {
706
+ const start = input.selectionStart;
707
+ if (start == null)
708
+ throw new Error("Incorrect input type");
709
+ return start - 1;
710
+ }
711
+ function copyInputToClipboard(input) {
712
+ const disabled = input.hasAttribute("disabled");
713
+ if (disabled)
714
+ input.removeAttribute('disabled');
715
+ navigator.clipboard.writeText(input.value)
716
+ .then(() => { })
717
+ .catch(err => {
718
+ console.error('Не удалось скопировать текст: ', err);
719
+ })
720
+ .finally(() => {
721
+ if (disabled)
722
+ input.setAttribute('disabled', '');
723
+ });
724
+ }
725
+ function clearInput_and_addLastSymbol(input) {
726
+ input.value = input.value[getInputCursorPosition(input)] || '';
727
+ }
728
+ function getInputLabel(input) {
729
+ const label = document.querySelector(`label[for="${input.id}"]`);
730
+ if (!label)
731
+ throw new Error("Label не найден. Возможно, вы не использовали атрибут for в нем");
732
+ return label;
733
+ }
734
+ //# sourceMappingURL=input.js.map
735
+
736
+ // ===== File: link.js =====
737
+ "use strict";
738
+ function loadCSS(href) {
739
+ const link = document.createElement('link');
740
+ link.rel = 'stylesheet';
741
+ link.type = 'text/css';
742
+ link.href = href;
743
+ document.head.appendChild(link);
744
+ }
745
+ //# sourceMappingURL=link.js.map
746
+
747
+ // ===== File: notifications.js =====
748
+ "use strict";
749
+ function pushNotification(title = "Уведомление", body = "Текст уведомления", icon = null) {
750
+ if (Notification.permission !== "granted") {
751
+ Notification.requestPermission().then(permission => {
752
+ if (permission === "granted") {
753
+ if (icon)
754
+ new Notification(title, { body: body, icon: icon });
755
+ else
756
+ new Notification(title, { body: body });
757
+ }
758
+ });
759
+ }
760
+ else {
761
+ if (icon)
762
+ new Notification(title, { body: body, icon: icon });
763
+ else
764
+ new Notification(title, { body: body });
765
+ }
766
+ }
767
+ class HyperTextNotification {
768
+ constructor({ bottom = '20', right = '20', backgroundColor = '#121212', color = '#ededed', padding = '15', borderRadius = '5', timeout = 3 } = {}) {
769
+ Object.defineProperty(this, "bottom", {
770
+ enumerable: true,
771
+ configurable: true,
772
+ writable: true,
773
+ value: void 0
774
+ });
775
+ Object.defineProperty(this, "right", {
776
+ enumerable: true,
777
+ configurable: true,
778
+ writable: true,
779
+ value: void 0
780
+ });
781
+ Object.defineProperty(this, "backgroundColor", {
782
+ enumerable: true,
783
+ configurable: true,
784
+ writable: true,
785
+ value: void 0
786
+ });
787
+ Object.defineProperty(this, "color", {
788
+ enumerable: true,
789
+ configurable: true,
790
+ writable: true,
791
+ value: void 0
792
+ });
793
+ Object.defineProperty(this, "padding", {
794
+ enumerable: true,
795
+ configurable: true,
796
+ writable: true,
797
+ value: void 0
798
+ });
799
+ Object.defineProperty(this, "borderRadius", {
800
+ enumerable: true,
801
+ configurable: true,
802
+ writable: true,
803
+ value: void 0
804
+ });
805
+ Object.defineProperty(this, "timeout", {
806
+ enumerable: true,
807
+ configurable: true,
808
+ writable: true,
809
+ value: void 0
810
+ });
811
+ this.bottom = intToPixel(bottom);
812
+ this.right = intToPixel(right);
813
+ this.backgroundColor = backgroundColor;
814
+ this.color = color;
815
+ this.padding = intToPixel(padding);
816
+ this.borderRadius = intToPixel(borderRadius);
817
+ this.timeout = timeout;
818
+ }
819
+ show(message, timeout = 0) {
820
+ const notification = document.createElement("div");
821
+ notification.textContent = message;
822
+ notification.style.position = "fixed";
823
+ notification.style.bottom = this.bottom;
824
+ notification.style.right = this.right;
825
+ notification.style.backgroundColor = this.backgroundColor;
826
+ notification.style.color = this.color;
827
+ notification.style.padding = this.padding;
828
+ notification.style.borderRadius = this.borderRadius;
829
+ notification.style.zIndex = "1000";
830
+ const actualTimeout = timeout === 0 ? this.timeout : timeout;
831
+ document.body.appendChild(notification);
832
+ setTimeout(() => {
833
+ if (document.body.contains(notification)) {
834
+ document.body.removeChild(notification);
835
+ }
836
+ }, actualTimeout * 1000);
837
+ }
838
+ }
839
+ //# sourceMappingURL=notifications.js.map
840
+
841
+ // ===== File: styles.js =====
842
+ "use strict";
843
+ function input_type_fc(input) {
844
+ return input.type !== 'hidden' && input.type !== 'reset' && input.type !== 'checkbox' && input.type !== 'radio';
845
+ }
846
+ function input_form_control(form) {
847
+ const inputs = form.querySelectorAll('input');
848
+ const selects = form.querySelectorAll('select');
849
+ const areas = form.querySelectorAll('textarea');
850
+ inputs.forEach(input => {
851
+ if (input_type_fc(input))
852
+ input.classList.add('form-control');
853
+ });
854
+ selects.forEach(select => {
855
+ select.classList.add('form-control');
856
+ });
857
+ areas.forEach(textarea => {
858
+ textarea.classList.add('form-control');
859
+ });
860
+ }
861
+ function input_form_control_unline(form) {
862
+ console.log(form.id);
863
+ const inputs = form.querySelectorAll('input');
864
+ const selects = form.querySelectorAll('select');
865
+ const areas = form.querySelectorAll('textarea');
866
+ inputs.forEach(input => {
867
+ if (input_type_fc(input))
868
+ input.classList.add('form-control-unline');
869
+ });
870
+ selects.forEach(select => {
871
+ select.classList.add('form-control-unline');
872
+ });
873
+ areas.forEach(textarea => {
874
+ textarea.classList.add('form-control-unline');
875
+ });
876
+ }
877
+ function intToPixel(number = '0') {
878
+ number = number.toString();
879
+ if (parseInt(number) === 0)
880
+ return '0';
881
+ return !isNaN(parseInt(number)) ? number + 'px' : number;
882
+ }
883
+ //# sourceMappingURL=styles.js.map
884
+
885
+ // ===== File: system.js =====
886
+ "use strict";
887
+ function getSystemTheme() {
888
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').media !== 'not all') {
889
+ const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
890
+ return isDark ? 'dark' : 'light';
891
+ }
892
+ return null;
893
+ }
894
+ function copyTextToClipboard(text) {
895
+ navigator.clipboard.writeText(text)
896
+ .then(() => { })
897
+ .catch(err => {
898
+ console.error('Не удалось скопировать текст: ', err);
899
+ });
900
+ }
901
+ function redirectBackOrClose(default_url = '/') {
902
+ if (document.referrer && document.referrer !== window.location.href) {
903
+ window.history.back();
904
+ }
905
+ else {
906
+ window.close();
907
+ setTimeout(() => {
908
+ if (!window.closed) {
909
+ window.location.href = default_url;
910
+ }
911
+ }, 100);
912
+ }
913
+ }
914
+ function getHost() {
915
+ return window.location.protocol + '//' + window.location.host;
916
+ }
917
+ //# sourceMappingURL=system.js.map
918
+
919
+ // ===== File: tags.js =====
920
+ "use strict";
921
+ class AbbreviatedNumber extends HTMLElement {
922
+ constructor() {
923
+ super();
924
+ Object.defineProperty(this, "isShortened", {
925
+ enumerable: true,
926
+ configurable: true,
927
+ writable: true,
928
+ value: void 0
929
+ });
930
+ Object.defineProperty(this, "originalNumber", {
931
+ enumerable: true,
932
+ configurable: true,
933
+ writable: true,
934
+ value: void 0
935
+ });
936
+ this.isShortened = true;
937
+ this.originalNumber = parseFloat(this.textContent?.trim() || '0');
938
+ this.render();
939
+ this.addEventListener('click', this.toggle.bind(this));
940
+ if (isNaN(this.originalNumber))
941
+ throw new TypeError('The value must be a number');
942
+ }
943
+ static get observedAttributes() {
944
+ return ['lang', 'use_comma'];
945
+ }
946
+ toggle() {
947
+ this.isShortened = !this.isShortened;
948
+ this.render();
949
+ }
950
+ getCurrentLang() {
951
+ return this.getAttribute('lang') || document.documentElement.getAttribute('lang') || 'en';
952
+ }
953
+ formatNumber(num, lang) {
954
+ num = parseFloat(num.toString().replace(/[^\d.-]/g, ''));
955
+ if (isNaN(num))
956
+ return this.originalNumber.toString();
957
+ const useComma = this.hasAttribute('use_comma');
958
+ const separator = useComma ? ',' : '.';
959
+ const round = (value, digits) => {
960
+ if (digits === 0)
961
+ return Math.round(value);
962
+ const factor = Math.pow(10, digits);
963
+ return Math.round(value * factor) / factor;
964
+ };
965
+ const format = (value, digits) => {
966
+ const rounded = round(value, digits);
967
+ let str = rounded.toString();
968
+ if (digits > 0 && str.includes('.')) {
969
+ str = str.replace(/\.?0+$/, '');
970
+ }
971
+ return str.replace('.', separator);
972
+ };
973
+ const getFractionDigits = (value) => {
974
+ if (value < 10)
975
+ return 2;
976
+ if (value < 100)
977
+ return 1;
978
+ return 0;
979
+ };
980
+ if (lang.startsWith('ru')) {
981
+ if (num >= 1000000000000) {
982
+ const value = num / 1000000000000;
983
+ return format(value, getFractionDigits(value)) + ' трлн.';
984
+ }
985
+ if (num >= 1000000000) {
986
+ const value = num / 1000000000;
987
+ return format(value, getFractionDigits(value)) + ' млрд.';
988
+ }
989
+ if (num >= 1000000) {
990
+ const value = num / 1000000;
991
+ return format(value, getFractionDigits(value)) + ' млн.';
992
+ }
993
+ if (num >= 1000) {
994
+ const value = num / 1000;
995
+ return format(value, getFractionDigits(value)) + ' тыс.';
996
+ }
997
+ }
998
+ else {
999
+ if (num >= 1000000000000) {
1000
+ const value = num / 1000000000000;
1001
+ return format(value, getFractionDigits(value)) + 'T';
1002
+ }
1003
+ if (num >= 1000000000) {
1004
+ const value = num / 1000000000;
1005
+ return format(value, getFractionDigits(value)) + 'B';
1006
+ }
1007
+ if (num >= 1000000) {
1008
+ const value = num / 1000000;
1009
+ return format(value, getFractionDigits(value)) + 'M';
1010
+ }
1011
+ if (num >= 1000) {
1012
+ const value = num / 1000;
1013
+ return format(value, getFractionDigits(value)) + 'K';
1014
+ }
1015
+ }
1016
+ return format(num, 0);
1017
+ }
1018
+ render() {
1019
+ const lang = this.getCurrentLang();
1020
+ this.textContent = this.isShortened
1021
+ ? this.formatNumber(this.originalNumber, lang)
1022
+ : this.originalNumber.toString();
1023
+ }
1024
+ }
1025
+ class StepElement extends HTMLElement {
1026
+ constructor() {
1027
+ super();
1028
+ if (this.textContent)
1029
+ this.label = this.textContent;
1030
+ this.innerHTML = `
1031
+ <div data-sb-generated="circle"></div>
1032
+ <div data-sb-generated="label"><slot></slot></div>
1033
+ `;
1034
+ }
1035
+ static get observedAttributes() {
1036
+ return ['active', 'completed', 'label'];
1037
+ }
1038
+ get index() {
1039
+ return Array.from(this.parentNode.children).indexOf(this) + 1;
1040
+ }
1041
+ get active() {
1042
+ return this.hasAttribute('active');
1043
+ }
1044
+ set active(force) {
1045
+ this.toggleAttribute('active', force);
1046
+ }
1047
+ get completed() {
1048
+ return this.hasAttribute('completed');
1049
+ }
1050
+ set completed(force) {
1051
+ this.toggleAttribute('completed', force);
1052
+ }
1053
+ get label() {
1054
+ return this.getAttribute('label') || "";
1055
+ }
1056
+ set label(value) {
1057
+ this.setAttribute('label', value);
1058
+ }
1059
+ reset() {
1060
+ this.active = false;
1061
+ this.completed = false;
1062
+ }
1063
+ get status() {
1064
+ if (this.active)
1065
+ return 'active';
1066
+ else if (this.completed)
1067
+ return 'complete';
1068
+ else
1069
+ return 'uncomplete';
1070
+ }
1071
+ set status(value) {
1072
+ this.reset();
1073
+ switch (value) {
1074
+ case 'complete':
1075
+ this.completed = true;
1076
+ break;
1077
+ case 'active':
1078
+ this.active = true;
1079
+ break;
1080
+ case 'uncomplete':
1081
+ break;
1082
+ default:
1083
+ throw new TypeError(`Unknown status: ${value}`);
1084
+ }
1085
+ }
1086
+ connectedCallback() {
1087
+ this.querySelector('[data-sb-generated="circle"]').textContent = this.index.toString();
1088
+ this.querySelector('[data-sb-generated="label"]').textContent = this.label;
1089
+ const parent = this.parentElement;
1090
+ const currentStep = parent.currentStep || 1;
1091
+ if (this.index === currentStep)
1092
+ this.active = true;
1093
+ else if (this.index < currentStep)
1094
+ this.completed = true;
1095
+ }
1096
+ }
1097
+ class Stepbar extends HTMLElement {
1098
+ constructor() {
1099
+ super();
1100
+ Object.defineProperty(this, "_observer", {
1101
+ enumerable: true,
1102
+ configurable: true,
1103
+ writable: true,
1104
+ value: void 0
1105
+ });
1106
+ this.attachShadow({ mode: 'open' });
1107
+ this.shadowRoot.innerHTML = `
1108
+ <slot></slot>
1109
+ `;
1110
+ }
1111
+ static get observedAttributes() {
1112
+ return ['current'];
1113
+ }
1114
+ attributeChangedCallback(name, oldValue, newValue) {
1115
+ if (name === 'current') {
1116
+ this.updateSteps();
1117
+ }
1118
+ }
1119
+ connectedCallback() {
1120
+ if (!this._observer) {
1121
+ this._observer = new MutationObserver(() => this.updateSteps());
1122
+ this._observer.observe(this, { childList: true });
1123
+ }
1124
+ this.updateSteps();
1125
+ }
1126
+ disconnectedCallback() {
1127
+ if (this._observer) {
1128
+ this._observer.disconnect();
1129
+ }
1130
+ }
1131
+ updateSteps() {
1132
+ const currentStep = parseInt(this.getAttribute('current') || '1');
1133
+ const elements = Array.from(this.children).filter((el) => el.tagName === 'SB-ELEMENT');
1134
+ elements.forEach((element, index) => {
1135
+ const stepNumber = index + 1;
1136
+ element.status = 'uncomplete';
1137
+ if (stepNumber < currentStep) {
1138
+ element.status = 'complete';
1139
+ }
1140
+ else if (stepNumber === currentStep) {
1141
+ element.status = 'active';
1142
+ }
1143
+ });
1144
+ }
1145
+ get currentStep() {
1146
+ return parseInt(this.getAttribute('current') || '1');
1147
+ }
1148
+ set currentStep(step) {
1149
+ this.setAttribute('current', step.toString());
1150
+ }
1151
+ }
1152
+ class HTMLFile extends HTMLElement {
1153
+ constructor() {
1154
+ super();
1155
+ }
1156
+ get src() {
1157
+ return this.getAttribute('src') || '';
1158
+ }
1159
+ set src(value) {
1160
+ if (value) {
1161
+ this.setAttribute('src', value);
1162
+ }
1163
+ else {
1164
+ this.removeAttribute('src');
1165
+ }
1166
+ }
1167
+ static get observedAttributes() {
1168
+ return ['src'];
1169
+ }
1170
+ connectedCallback() {
1171
+ this.loadContent();
1172
+ }
1173
+ attributeChangedCallback(name, oldValue, newValue) {
1174
+ if (name === 'src' && oldValue !== newValue && this.isConnected) {
1175
+ this.loadContent();
1176
+ }
1177
+ }
1178
+ async loadContent() {
1179
+ const src = this.src;
1180
+ if (!src)
1181
+ return;
1182
+ try {
1183
+ const response = await fetch(src);
1184
+ const content = await response.text();
1185
+ this.innerHTML = content;
1186
+ await this.executeScripts();
1187
+ }
1188
+ catch (error) {
1189
+ this.innerHTML = `Ошибка загрузки: ${error.message}`;
1190
+ }
1191
+ }
1192
+ async executeScripts() {
1193
+ const scripts = this.querySelectorAll('script');
1194
+ for (const script of scripts) {
1195
+ if (script.src) {
1196
+ await this.loadExternalScript(script.src);
1197
+ }
1198
+ else {
1199
+ this.executeInlineScript(script.textContent || '');
1200
+ }
1201
+ script.remove();
1202
+ }
1203
+ }
1204
+ loadExternalScript(src) {
1205
+ return new Promise((resolve, reject) => {
1206
+ const newScript = document.createElement('script');
1207
+ newScript.src = src;
1208
+ newScript.onload = resolve;
1209
+ newScript.onerror = reject;
1210
+ document.head.appendChild(newScript);
1211
+ });
1212
+ }
1213
+ executeInlineScript(code) {
1214
+ try {
1215
+ const newScript = document.createElement('script');
1216
+ newScript.textContent = code;
1217
+ document.head.appendChild(newScript);
1218
+ document.head.removeChild(newScript);
1219
+ }
1220
+ catch (error) {
1221
+ console.error('Ошибка выполнения скрипта:', error);
1222
+ }
1223
+ }
1224
+ get loaded() {
1225
+ return this.hasAttribute('data-loaded');
1226
+ }
1227
+ reload() {
1228
+ return this.loadContent();
1229
+ }
1230
+ get content() {
1231
+ return this.innerHTML;
1232
+ }
1233
+ }
1234
+ class ClickToCopy extends HTMLElement {
1235
+ constructor() {
1236
+ super();
1237
+ Object.defineProperty(this, "notification", {
1238
+ enumerable: true,
1239
+ configurable: true,
1240
+ writable: true,
1241
+ value: void 0
1242
+ });
1243
+ this.notification = new HyperTextNotification({ backgroundColor: 'rgba(192,0,192,0.8)' });
1244
+ }
1245
+ get notificationText() {
1246
+ return this.getAttribute('text') || "Скопировано";
1247
+ }
1248
+ set notificationText(value) {
1249
+ if (value)
1250
+ this.setAttribute('text', value);
1251
+ else
1252
+ this.removeAttribute('text');
1253
+ }
1254
+ get isNotified() {
1255
+ return this.hasAttribute('notified');
1256
+ }
1257
+ set isNotified(value) {
1258
+ if (value)
1259
+ this.setAttribute('notified', '');
1260
+ else
1261
+ this.removeAttribute('notified');
1262
+ }
1263
+ connectedCallback() {
1264
+ this.addEventListener('click', () => {
1265
+ navigator.clipboard.writeText(this.textContent || '');
1266
+ if (this.isNotified)
1267
+ this.notification.show(this.notificationText);
1268
+ });
1269
+ }
1270
+ }
1271
+ customElements.define('sb-element', StepElement);
1272
+ customElements.define('step-bar', Stepbar);
1273
+ customElements.define('ab-num', AbbreviatedNumber);
1274
+ customElements.define('include-html', HTMLFile);
1275
+ customElements.define('click-to-copy', ClickToCopy);
1276
+ //# sourceMappingURL=tags.js.map
1277
+
1278
+ // ===== File: url.js =====
1279
+ "use strict";
1280
+ function isAbsoluteUrl(url) {
1281
+ try {
1282
+ new URL(url);
1283
+ return true;
1284
+ }
1285
+ catch (e) {
1286
+ return url[0] === '/' || url[0] === '\\';
1287
+ }
1288
+ }
1289
+ function combineUrls(baseUrl, relativeUrl) {
1290
+ try {
1291
+ if (!baseUrl) {
1292
+ if (relativeUrl.startsWith('/'))
1293
+ return relativeUrl;
1294
+ return '/' + relativeUrl;
1295
+ }
1296
+ return new URL(relativeUrl, baseUrl).toString();
1297
+ }
1298
+ catch (error) {
1299
+ throw new Error(`Invalid URL combination: ${baseUrl}, ${relativeUrl}`);
1300
+ }
1301
+ }
1302
+ function getScriptSite(script) {
1303
+ return new URL(script.src).origin;
1304
+ }
1305
+ //# sourceMappingURL=url.js.map
1306
+
1307
+ // ===== File: uuid.js =====
1308
+ "use strict";
1309
+ function generateUUIDv4() {
1310
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
1311
+ const r = Math.random() * 16 | 0;
1312
+ const v = c === 'x' ? r : (r & 0x3 | 0x8);
1313
+ return v.toString(16);
1314
+ });
1315
+ }
1316
+ //# sourceMappingURL=uuid.js.map
1317
+
1318
+
1319
+ // string.js
1320
+ function stringToBoolean(input) {
1321
+ if (input.toLowerCase() === "true")
1322
+ return true;
1323
+ if (input.toLowerCase() === "false")
1324
+ return false;
1325
+ return null;
1326
+ }
1327
+
1328
+
1329
+ // ===== File: input.js =====
1330
+ "use strict";
1331
+ function getInputCursorPosition(input) {
1332
+ const start = input.selectionStart;
1333
+ if (start == null)
1334
+ throw new Error("Incorrect input type");
1335
+ return start - 1;
1336
+ }
1337
+ function copyInputToClipboard(input) {
1338
+ const disabled = input.hasAttribute("disabled");
1339
+ if (disabled)
1340
+ input.removeAttribute('disabled');
1341
+ navigator.clipboard.writeText(input.value)
1342
+ .then(() => { })
1343
+ .catch(err => {
1344
+ console.error('Не удалось скопировать текст: ', err);
1345
+ })
1346
+ .finally(() => {
1347
+ if (disabled)
1348
+ input.setAttribute('disabled', '');
1349
+ });
1350
+ }
1351
+ function clearInput_and_addLastSymbol(input) {
1352
+ input.value = input.value[getInputCursorPosition(input)] || '';
1353
+ }
1354
+ function getInputLabel(input) {
1355
+ const label = document.querySelector(`label[for="${input.id}"]`);
1356
+ if (!label)
1357
+ throw new Error("Label не найден. Возможно, вы не использовали атрибут for в нем");
1358
+ return label;
1359
+ }
1360
+ //# sourceMappingURL=input.js.map
1361
+
1362
+ // ===== File: link.js =====
1363
+ "use strict";
1364
+ function loadCSS(href) {
1365
+ const link = document.createElement('link');
1366
+ link.rel = 'stylesheet';
1367
+ link.type = 'text/css';
1368
+ link.href = href;
1369
+ document.head.appendChild(link);
1370
+ }
1371
+ //# sourceMappingURL=link.js.map
1372
+
1373
+ // ===== File: notifications.js =====
1374
+ "use strict";
1375
+ function pushNotification(title = "Уведомление", body = "Текст уведомления", icon = null) {
1376
+ if (Notification.permission !== "granted") {
1377
+ Notification.requestPermission().then(permission => {
1378
+ if (permission === "granted") {
1379
+ if (icon)
1380
+ new Notification(title, { body: body, icon: icon });
1381
+ else
1382
+ new Notification(title, { body: body });
1383
+ }
1384
+ });
1385
+ }
1386
+ else {
1387
+ if (icon)
1388
+ new Notification(title, { body: body, icon: icon });
1389
+ else
1390
+ new Notification(title, { body: body });
1391
+ }
1392
+ }
1393
+ class HyperTextNotification {
1394
+ constructor({ bottom = '20', right = '20', backgroundColor = '#121212', color = '#ededed', padding = '15', borderRadius = '5', timeout = 3 } = {}) {
1395
+ Object.defineProperty(this, "bottom", {
1396
+ enumerable: true,
1397
+ configurable: true,
1398
+ writable: true,
1399
+ value: void 0
1400
+ });
1401
+ Object.defineProperty(this, "right", {
1402
+ enumerable: true,
1403
+ configurable: true,
1404
+ writable: true,
1405
+ value: void 0
1406
+ });
1407
+ Object.defineProperty(this, "backgroundColor", {
1408
+ enumerable: true,
1409
+ configurable: true,
1410
+ writable: true,
1411
+ value: void 0
1412
+ });
1413
+ Object.defineProperty(this, "color", {
1414
+ enumerable: true,
1415
+ configurable: true,
1416
+ writable: true,
1417
+ value: void 0
1418
+ });
1419
+ Object.defineProperty(this, "padding", {
1420
+ enumerable: true,
1421
+ configurable: true,
1422
+ writable: true,
1423
+ value: void 0
1424
+ });
1425
+ Object.defineProperty(this, "borderRadius", {
1426
+ enumerable: true,
1427
+ configurable: true,
1428
+ writable: true,
1429
+ value: void 0
1430
+ });
1431
+ Object.defineProperty(this, "timeout", {
1432
+ enumerable: true,
1433
+ configurable: true,
1434
+ writable: true,
1435
+ value: void 0
1436
+ });
1437
+ this.bottom = intToPixel(bottom);
1438
+ this.right = intToPixel(right);
1439
+ this.backgroundColor = backgroundColor;
1440
+ this.color = color;
1441
+ this.padding = intToPixel(padding);
1442
+ this.borderRadius = intToPixel(borderRadius);
1443
+ this.timeout = timeout;
1444
+ }
1445
+ show(message, timeout = 0) {
1446
+ const notification = document.createElement("div");
1447
+ notification.textContent = message;
1448
+ notification.style.position = "fixed";
1449
+ notification.style.bottom = this.bottom;
1450
+ notification.style.right = this.right;
1451
+ notification.style.backgroundColor = this.backgroundColor;
1452
+ notification.style.color = this.color;
1453
+ notification.style.padding = this.padding;
1454
+ notification.style.borderRadius = this.borderRadius;
1455
+ notification.style.zIndex = "1000";
1456
+ const actualTimeout = timeout === 0 ? this.timeout : timeout;
1457
+ document.body.appendChild(notification);
1458
+ setTimeout(() => {
1459
+ if (document.body.contains(notification)) {
1460
+ document.body.removeChild(notification);
1461
+ }
1462
+ }, actualTimeout * 1000);
1463
+ }
1464
+ }
1465
+ //# sourceMappingURL=notifications.js.map
1466
+
1467
+ // ===== File: string.js =====
1468
+ "use strict";
1469
+ function stringToBoolean(input) {
1470
+ if (input.toLowerCase() === "true")
1471
+ return true;
1472
+ if (input.toLowerCase() === "false")
1473
+ return false;
1474
+ return null;
1475
+ }
1476
+ //# sourceMappingURL=string.js.map
1477
+
1478
+ // ===== File: styles.js =====
1479
+ "use strict";
1480
+ function input_type_fc(input) {
1481
+ return input.type !== 'hidden' && input.type !== 'reset' && input.type !== 'checkbox' && input.type !== 'radio';
1482
+ }
1483
+ function input_form_control(form) {
1484
+ const inputs = form.querySelectorAll('input');
1485
+ const selects = form.querySelectorAll('select');
1486
+ const areas = form.querySelectorAll('textarea');
1487
+ inputs.forEach(input => {
1488
+ if (input_type_fc(input))
1489
+ input.classList.add('form-control');
1490
+ });
1491
+ selects.forEach(select => {
1492
+ select.classList.add('form-control');
1493
+ });
1494
+ areas.forEach(textarea => {
1495
+ textarea.classList.add('form-control');
1496
+ });
1497
+ }
1498
+ function input_form_control_unline(form) {
1499
+ console.log(form.id);
1500
+ const inputs = form.querySelectorAll('input');
1501
+ const selects = form.querySelectorAll('select');
1502
+ const areas = form.querySelectorAll('textarea');
1503
+ inputs.forEach(input => {
1504
+ if (input_type_fc(input))
1505
+ input.classList.add('form-control-unline');
1506
+ });
1507
+ selects.forEach(select => {
1508
+ select.classList.add('form-control-unline');
1509
+ });
1510
+ areas.forEach(textarea => {
1511
+ textarea.classList.add('form-control-unline');
1512
+ });
1513
+ }
1514
+ function intToPixel(number = '0') {
1515
+ number = number.toString();
1516
+ if (parseInt(number) === 0)
1517
+ return '0';
1518
+ return !isNaN(parseInt(number)) ? number + 'px' : number;
1519
+ }
1520
+ //# sourceMappingURL=styles.js.map
1521
+
1522
+ // ===== File: system.js =====
1523
+ "use strict";
1524
+ function getSystemTheme() {
1525
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').media !== 'not all') {
1526
+ const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
1527
+ return isDark ? 'dark' : 'light';
1528
+ }
1529
+ return null;
1530
+ }
1531
+ function copyTextToClipboard(text) {
1532
+ navigator.clipboard.writeText(text)
1533
+ .then(() => { })
1534
+ .catch(err => {
1535
+ console.error('Не удалось скопировать текст: ', err);
1536
+ });
1537
+ }
1538
+ function redirectBackOrClose(default_url = '/') {
1539
+ if (document.referrer && document.referrer !== window.location.href) {
1540
+ window.history.back();
1541
+ }
1542
+ else {
1543
+ window.close();
1544
+ setTimeout(() => {
1545
+ if (!window.closed) {
1546
+ window.location.href = default_url;
1547
+ }
1548
+ }, 100);
1549
+ }
1550
+ }
1551
+ function getHost() {
1552
+ return window.location.protocol + '//' + window.location.host;
1553
+ }
1554
+ //# sourceMappingURL=system.js.map
1555
+
1556
+ // ===== File: tags.js =====
1557
+ "use strict";
1558
+ class AbbreviatedNumber extends HTMLElement {
1559
+ constructor() {
1560
+ super();
1561
+ Object.defineProperty(this, "isShortened", {
1562
+ enumerable: true,
1563
+ configurable: true,
1564
+ writable: true,
1565
+ value: void 0
1566
+ });
1567
+ Object.defineProperty(this, "originalNumber", {
1568
+ enumerable: true,
1569
+ configurable: true,
1570
+ writable: true,
1571
+ value: void 0
1572
+ });
1573
+ this.isShortened = true;
1574
+ this.originalNumber = parseFloat(this.textContent?.trim() || '0');
1575
+ this.render();
1576
+ this.addEventListener('click', this.toggle.bind(this));
1577
+ if (isNaN(this.originalNumber))
1578
+ throw new TypeError('The value must be a number');
1579
+ }
1580
+ static get observedAttributes() {
1581
+ return ['lang', 'use_comma'];
1582
+ }
1583
+ toggle() {
1584
+ this.isShortened = !this.isShortened;
1585
+ this.render();
1586
+ }
1587
+ getCurrentLang() {
1588
+ return this.getAttribute('lang') || document.documentElement.getAttribute('lang') || 'en';
1589
+ }
1590
+ formatNumber(num, lang) {
1591
+ num = parseFloat(num.toString().replace(/[^\d.-]/g, ''));
1592
+ if (isNaN(num))
1593
+ return this.originalNumber.toString();
1594
+ const useComma = this.hasAttribute('use_comma');
1595
+ const separator = useComma ? ',' : '.';
1596
+ const round = (value, digits) => {
1597
+ if (digits === 0)
1598
+ return Math.round(value);
1599
+ const factor = Math.pow(10, digits);
1600
+ return Math.round(value * factor) / factor;
1601
+ };
1602
+ const format = (value, digits) => {
1603
+ const rounded = round(value, digits);
1604
+ let str = rounded.toString();
1605
+ if (digits > 0 && str.includes('.')) {
1606
+ str = str.replace(/\.?0+$/, '');
1607
+ }
1608
+ return str.replace('.', separator);
1609
+ };
1610
+ const getFractionDigits = (value) => {
1611
+ if (value < 10)
1612
+ return 2;
1613
+ if (value < 100)
1614
+ return 1;
1615
+ return 0;
1616
+ };
1617
+ if (lang.startsWith('ru')) {
1618
+ if (num >= 1000000000000) {
1619
+ const value = num / 1000000000000;
1620
+ return format(value, getFractionDigits(value)) + ' трлн.';
1621
+ }
1622
+ if (num >= 1000000000) {
1623
+ const value = num / 1000000000;
1624
+ return format(value, getFractionDigits(value)) + ' млрд.';
1625
+ }
1626
+ if (num >= 1000000) {
1627
+ const value = num / 1000000;
1628
+ return format(value, getFractionDigits(value)) + ' млн.';
1629
+ }
1630
+ if (num >= 1000) {
1631
+ const value = num / 1000;
1632
+ return format(value, getFractionDigits(value)) + ' тыс.';
1633
+ }
1634
+ }
1635
+ else {
1636
+ if (num >= 1000000000000) {
1637
+ const value = num / 1000000000000;
1638
+ return format(value, getFractionDigits(value)) + 'T';
1639
+ }
1640
+ if (num >= 1000000000) {
1641
+ const value = num / 1000000000;
1642
+ return format(value, getFractionDigits(value)) + 'B';
1643
+ }
1644
+ if (num >= 1000000) {
1645
+ const value = num / 1000000;
1646
+ return format(value, getFractionDigits(value)) + 'M';
1647
+ }
1648
+ if (num >= 1000) {
1649
+ const value = num / 1000;
1650
+ return format(value, getFractionDigits(value)) + 'K';
1651
+ }
1652
+ }
1653
+ return format(num, 0);
1654
+ }
1655
+ render() {
1656
+ const lang = this.getCurrentLang();
1657
+ this.textContent = this.isShortened
1658
+ ? this.formatNumber(this.originalNumber, lang)
1659
+ : this.originalNumber.toString();
1660
+ }
1661
+ }
1662
+ class StepElement extends HTMLElement {
1663
+ constructor() {
1664
+ super();
1665
+ if (this.textContent)
1666
+ this.label = this.textContent;
1667
+ this.innerHTML = `
1668
+ <div data-sb-generated="circle"></div>
1669
+ <div data-sb-generated="label"><slot></slot></div>
1670
+ `;
1671
+ }
1672
+ static get observedAttributes() {
1673
+ return ['active', 'completed', 'label'];
1674
+ }
1675
+ get index() {
1676
+ return Array.from(this.parentNode.children).indexOf(this) + 1;
1677
+ }
1678
+ get active() {
1679
+ return this.hasAttribute('active');
1680
+ }
1681
+ set active(force) {
1682
+ this.toggleAttribute('active', force);
1683
+ }
1684
+ get completed() {
1685
+ return this.hasAttribute('completed');
1686
+ }
1687
+ set completed(force) {
1688
+ this.toggleAttribute('completed', force);
1689
+ }
1690
+ get label() {
1691
+ return this.getAttribute('label') || "";
1692
+ }
1693
+ set label(value) {
1694
+ this.setAttribute('label', value);
1695
+ }
1696
+ reset() {
1697
+ this.active = false;
1698
+ this.completed = false;
1699
+ }
1700
+ get status() {
1701
+ if (this.active)
1702
+ return 'active';
1703
+ else if (this.completed)
1704
+ return 'complete';
1705
+ else
1706
+ return 'uncomplete';
1707
+ }
1708
+ set status(value) {
1709
+ this.reset();
1710
+ switch (value) {
1711
+ case 'complete':
1712
+ this.completed = true;
1713
+ break;
1714
+ case 'active':
1715
+ this.active = true;
1716
+ break;
1717
+ case 'uncomplete':
1718
+ break;
1719
+ default:
1720
+ throw new TypeError(`Unknown status: ${value}`);
1721
+ }
1722
+ }
1723
+ connectedCallback() {
1724
+ this.querySelector('[data-sb-generated="circle"]').textContent = this.index.toString();
1725
+ this.querySelector('[data-sb-generated="label"]').textContent = this.label;
1726
+ const parent = this.parentElement;
1727
+ const currentStep = parent.currentStep || 1;
1728
+ if (this.index === currentStep)
1729
+ this.active = true;
1730
+ else if (this.index < currentStep)
1731
+ this.completed = true;
1732
+ }
1733
+ }
1734
+ class Stepbar extends HTMLElement {
1735
+ constructor() {
1736
+ super();
1737
+ Object.defineProperty(this, "_observer", {
1738
+ enumerable: true,
1739
+ configurable: true,
1740
+ writable: true,
1741
+ value: void 0
1742
+ });
1743
+ this.attachShadow({ mode: 'open' });
1744
+ this.shadowRoot.innerHTML = `
1745
+ <slot></slot>
1746
+ `;
1747
+ }
1748
+ static get observedAttributes() {
1749
+ return ['current'];
1750
+ }
1751
+ attributeChangedCallback(name, oldValue, newValue) {
1752
+ if (name === 'current') {
1753
+ this.updateSteps();
1754
+ }
1755
+ }
1756
+ connectedCallback() {
1757
+ if (!this._observer) {
1758
+ this._observer = new MutationObserver(() => this.updateSteps());
1759
+ this._observer.observe(this, { childList: true });
1760
+ }
1761
+ this.updateSteps();
1762
+ }
1763
+ disconnectedCallback() {
1764
+ if (this._observer) {
1765
+ this._observer.disconnect();
1766
+ }
1767
+ }
1768
+ updateSteps() {
1769
+ const currentStep = parseInt(this.getAttribute('current') || '1');
1770
+ const elements = Array.from(this.children).filter((el) => el.tagName === 'SB-ELEMENT');
1771
+ elements.forEach((element, index) => {
1772
+ const stepNumber = index + 1;
1773
+ element.status = 'uncomplete';
1774
+ if (stepNumber < currentStep) {
1775
+ element.status = 'complete';
1776
+ }
1777
+ else if (stepNumber === currentStep) {
1778
+ element.status = 'active';
1779
+ }
1780
+ });
1781
+ }
1782
+ get currentStep() {
1783
+ return parseInt(this.getAttribute('current') || '1');
1784
+ }
1785
+ set currentStep(step) {
1786
+ this.setAttribute('current', step.toString());
1787
+ }
1788
+ }
1789
+ class HTMLFile extends HTMLElement {
1790
+ constructor() {
1791
+ super();
1792
+ }
1793
+ get src() {
1794
+ return this.getAttribute('src') || '';
1795
+ }
1796
+ set src(value) {
1797
+ if (value) {
1798
+ this.setAttribute('src', value);
1799
+ }
1800
+ else {
1801
+ this.removeAttribute('src');
1802
+ }
1803
+ }
1804
+ static get observedAttributes() {
1805
+ return ['src'];
1806
+ }
1807
+ connectedCallback() {
1808
+ this.loadContent();
1809
+ }
1810
+ attributeChangedCallback(name, oldValue, newValue) {
1811
+ if (name === 'src' && oldValue !== newValue && this.isConnected) {
1812
+ this.loadContent();
1813
+ }
1814
+ }
1815
+ async loadContent() {
1816
+ const src = this.src;
1817
+ if (!src)
1818
+ return;
1819
+ try {
1820
+ const response = await fetch(src);
1821
+ const content = await response.text();
1822
+ this.innerHTML = content;
1823
+ await this.executeScripts();
1824
+ }
1825
+ catch (error) {
1826
+ this.innerHTML = `Ошибка загрузки: ${error.message}`;
1827
+ }
1828
+ }
1829
+ async executeScripts() {
1830
+ const scripts = this.querySelectorAll('script');
1831
+ for (const script of scripts) {
1832
+ if (script.src) {
1833
+ await this.loadExternalScript(script.src);
1834
+ }
1835
+ else {
1836
+ this.executeInlineScript(script.textContent || '');
1837
+ }
1838
+ script.remove();
1839
+ }
1840
+ }
1841
+ loadExternalScript(src) {
1842
+ return new Promise((resolve, reject) => {
1843
+ const newScript = document.createElement('script');
1844
+ newScript.src = src;
1845
+ newScript.onload = resolve;
1846
+ newScript.onerror = reject;
1847
+ document.head.appendChild(newScript);
1848
+ });
1849
+ }
1850
+ executeInlineScript(code) {
1851
+ try {
1852
+ const newScript = document.createElement('script');
1853
+ newScript.textContent = code;
1854
+ document.head.appendChild(newScript);
1855
+ document.head.removeChild(newScript);
1856
+ }
1857
+ catch (error) {
1858
+ console.error('Ошибка выполнения скрипта:', error);
1859
+ }
1860
+ }
1861
+ get loaded() {
1862
+ return this.hasAttribute('data-loaded');
1863
+ }
1864
+ reload() {
1865
+ return this.loadContent();
1866
+ }
1867
+ get content() {
1868
+ return this.innerHTML;
1869
+ }
1870
+ }
1871
+ class ClickToCopy extends HTMLElement {
1872
+ constructor() {
1873
+ super();
1874
+ Object.defineProperty(this, "notification", {
1875
+ enumerable: true,
1876
+ configurable: true,
1877
+ writable: true,
1878
+ value: void 0
1879
+ });
1880
+ this.notification = new HyperTextNotification({ backgroundColor: 'rgba(192,0,192,0.8)' });
1881
+ }
1882
+ get notificationText() {
1883
+ return this.getAttribute('text') || "Скопировано";
1884
+ }
1885
+ set notificationText(value) {
1886
+ if (value)
1887
+ this.setAttribute('text', value);
1888
+ else
1889
+ this.removeAttribute('text');
1890
+ }
1891
+ get isNotified() {
1892
+ return this.hasAttribute('notified');
1893
+ }
1894
+ set isNotified(value) {
1895
+ if (value)
1896
+ this.setAttribute('notified', '');
1897
+ else
1898
+ this.removeAttribute('notified');
1899
+ }
1900
+ connectedCallback() {
1901
+ this.addEventListener('click', () => {
1902
+ navigator.clipboard.writeText(this.textContent || '');
1903
+ if (this.isNotified)
1904
+ this.notification.show(this.notificationText);
1905
+ });
1906
+ }
1907
+ }
1908
+ customElements.define('sb-element', StepElement);
1909
+ customElements.define('step-bar', Stepbar);
1910
+ customElements.define('ab-num', AbbreviatedNumber);
1911
+ customElements.define('include-html', HTMLFile);
1912
+ customElements.define('click-to-copy', ClickToCopy);
1913
+ //# sourceMappingURL=tags.js.map
1914
+
1915
+ // ===== File: url.js =====
1916
+ "use strict";
1917
+ function isAbsoluteUrl(url) {
1918
+ try {
1919
+ new URL(url);
1920
+ return true;
1921
+ }
1922
+ catch (e) {
1923
+ return url[0] === '/' || url[0] === '\\';
1924
+ }
1925
+ }
1926
+ function combineUrls(baseUrl, relativeUrl) {
1927
+ try {
1928
+ if (!baseUrl) {
1929
+ if (relativeUrl.startsWith('/'))
1930
+ return relativeUrl;
1931
+ return '/' + relativeUrl;
1932
+ }
1933
+ return new URL(relativeUrl, baseUrl).toString();
1934
+ }
1935
+ catch (error) {
1936
+ throw new Error(`Invalid URL combination: ${baseUrl}, ${relativeUrl}`);
1937
+ }
1938
+ }
1939
+ function getScriptSite(script) {
1940
+ return new URL(script.src).origin;
1941
+ }
1942
+ //# sourceMappingURL=url.js.map
1943
+
1944
+ // ===== File: uuid.js =====
1945
+ "use strict";
1946
+ function generateUUIDv4() {
1947
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
1948
+ const r = Math.random() * 16 | 0;
1949
+ const v = c === 'x' ? r : (r & 0x3 | 0x8);
1950
+ return v.toString(16);
1951
+ });
1952
+ }
1953
+ //# sourceMappingURL=uuid.js.map
1954
+