@efficiency-point/design-system 0.11.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/dist/components/DSAccordion/DSAccordion.d.ts +2 -1
- package/dist/components/DSAccordion/DSAccordion.d.ts.map +1 -1
- package/dist/components/DSIcon/source/IconVideoAnalytics.d.ts +3 -0
- package/dist/components/DSIcon/source/IconVideoAnalytics.d.ts.map +1 -1
- package/dist/components/DSIcon/source/index.d.ts +3 -0
- package/dist/components/DSIcon/source/index.d.ts.map +1 -1
- package/dist/components/VideoNavigationWidget/VideoNavigationWidget.d.ts +29 -0
- package/dist/components/VideoNavigationWidget/VideoNavigationWidget.d.ts.map +1 -0
- package/dist/components/VideoStatisticsModal/VideoStatisticsModal.d.ts +42 -0
- package/dist/components/VideoStatisticsModal/VideoStatisticsModal.d.ts.map +1 -0
- package/dist/components/VideoViolationWidget/VideoViolationWidget.d.ts +18 -0
- package/dist/components/VideoViolationWidget/VideoViolationWidget.d.ts.map +1 -0
- package/dist/components/VideoWidget/VideoWidget.d.ts +18 -0
- package/dist/components/VideoWidget/VideoWidget.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1267 -776
- package/dist/style.css +1 -1
- package/package.json +3 -1
package/dist/index.es.js
CHANGED
|
@@ -522,265 +522,324 @@ var U = {
|
|
|
522
522
|
...t,
|
|
523
523
|
key: t.key ?? `${e}-${n}`
|
|
524
524
|
}))
|
|
525
|
-
}), Ye = {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}]
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}]
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
]
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
key: "
|
|
667
|
-
}]
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
["path", {
|
|
682
|
-
d: "m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",
|
|
683
|
-
key: "1fw8x9"
|
|
684
|
-
}],
|
|
685
|
-
["path", {
|
|
686
|
-
d: "M4 18.463V21",
|
|
687
|
-
key: "1otddq"
|
|
688
|
-
}],
|
|
689
|
-
["path", {
|
|
690
|
-
d: "M8 14.656V21",
|
|
691
|
-
key: "1t2idw"
|
|
692
|
-
}]
|
|
693
|
-
]),
|
|
694
|
-
IconChevronRight: J([["path", {
|
|
695
|
-
d: "m9 18 6-6-6-6",
|
|
696
|
-
key: "mthhwq"
|
|
697
|
-
}]]),
|
|
698
|
-
IconCircleAlert: J([
|
|
699
|
-
["circle", {
|
|
700
|
-
cx: "12",
|
|
701
|
-
cy: "12",
|
|
702
|
-
r: "10",
|
|
703
|
-
key: "1mglay"
|
|
704
|
-
}],
|
|
705
|
-
["line", {
|
|
706
|
-
x1: "12",
|
|
707
|
-
x2: "12",
|
|
708
|
-
y1: "8",
|
|
709
|
-
y2: "12",
|
|
710
|
-
key: "1pkeuh"
|
|
711
|
-
}],
|
|
712
|
-
["line", {
|
|
713
|
-
x1: "12",
|
|
714
|
-
x2: "12.01",
|
|
715
|
-
y1: "16",
|
|
716
|
-
y2: "16",
|
|
717
|
-
key: "4dfq90"
|
|
718
|
-
}]
|
|
719
|
-
]),
|
|
720
|
-
IconClock3: J([["circle", {
|
|
525
|
+
}), Ye = J([["path", {
|
|
526
|
+
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
527
|
+
key: "169zse"
|
|
528
|
+
}]]), Xe = J([
|
|
529
|
+
["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
|
|
530
|
+
["path", { d: "M12 9v4" }],
|
|
531
|
+
["path", { d: "M12 17h.01" }]
|
|
532
|
+
]), Ze = J([["path", {
|
|
533
|
+
d: "M12 5v14",
|
|
534
|
+
key: "s699le"
|
|
535
|
+
}], ["path", {
|
|
536
|
+
d: "m19 12-7 7-7-7",
|
|
537
|
+
key: "1idqje"
|
|
538
|
+
}]]), Qe = J([["path", {
|
|
539
|
+
d: "m12 19-7-7 7-7",
|
|
540
|
+
key: "1l729n"
|
|
541
|
+
}], ["path", {
|
|
542
|
+
d: "M19 12H5",
|
|
543
|
+
key: "x3x0zl"
|
|
544
|
+
}]]), $e = J([["path", {
|
|
545
|
+
d: "M5 12h14",
|
|
546
|
+
key: "1ays0h"
|
|
547
|
+
}], ["path", {
|
|
548
|
+
d: "m12 5 7 7-7 7",
|
|
549
|
+
key: "xquz4c"
|
|
550
|
+
}]]), et = J([["path", {
|
|
551
|
+
d: "m5 12 7-7 7 7",
|
|
552
|
+
key: "hav0vg"
|
|
553
|
+
}], ["path", {
|
|
554
|
+
d: "M12 19V5",
|
|
555
|
+
key: "x0mq9r"
|
|
556
|
+
}]]), tt = J([["path", {
|
|
557
|
+
d: "M7 7h10v10",
|
|
558
|
+
key: "1tivn9"
|
|
559
|
+
}], ["path", {
|
|
560
|
+
d: "M7 17 17 7",
|
|
561
|
+
key: "1vkiza"
|
|
562
|
+
}]]), nt = J([
|
|
563
|
+
["path", { d: "M3 3v18h18" }],
|
|
564
|
+
["path", { d: "M18 17V9" }],
|
|
565
|
+
["path", { d: "M13 17V5" }],
|
|
566
|
+
["path", { d: "M8 17v-3" }]
|
|
567
|
+
]), rt = J([["path", {
|
|
568
|
+
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
569
|
+
key: "vwvbt9"
|
|
570
|
+
}], ["path", {
|
|
571
|
+
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
|
|
572
|
+
key: "11g9vi"
|
|
573
|
+
}]]), it = J([
|
|
574
|
+
["path", {
|
|
575
|
+
d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
|
|
576
|
+
key: "lc1i9w"
|
|
577
|
+
}],
|
|
578
|
+
["path", {
|
|
579
|
+
d: "m7 16.5-4.74-2.85",
|
|
580
|
+
key: "1o9zyk"
|
|
581
|
+
}],
|
|
582
|
+
["path", {
|
|
583
|
+
d: "m7 16.5 5-3",
|
|
584
|
+
key: "va8pkn"
|
|
585
|
+
}],
|
|
586
|
+
["path", {
|
|
587
|
+
d: "M7 16.5v5.17",
|
|
588
|
+
key: "jnp8gn"
|
|
589
|
+
}],
|
|
590
|
+
["path", {
|
|
591
|
+
d: "M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",
|
|
592
|
+
key: "8zsnat"
|
|
593
|
+
}],
|
|
594
|
+
["path", {
|
|
595
|
+
d: "m17 16.5-5-3",
|
|
596
|
+
key: "8arw3v"
|
|
597
|
+
}],
|
|
598
|
+
["path", {
|
|
599
|
+
d: "m17 16.5 4.74-2.85",
|
|
600
|
+
key: "8rfmw"
|
|
601
|
+
}],
|
|
602
|
+
["path", {
|
|
603
|
+
d: "M17 16.5v5.17",
|
|
604
|
+
key: "k6z78m"
|
|
605
|
+
}],
|
|
606
|
+
["path", {
|
|
607
|
+
d: "M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",
|
|
608
|
+
key: "1xygjf"
|
|
609
|
+
}],
|
|
610
|
+
["path", {
|
|
611
|
+
d: "M12 8 7.26 5.15",
|
|
612
|
+
key: "1vbdud"
|
|
613
|
+
}],
|
|
614
|
+
["path", {
|
|
615
|
+
d: "m12 8 4.74-2.85",
|
|
616
|
+
key: "3rx089"
|
|
617
|
+
}],
|
|
618
|
+
["path", {
|
|
619
|
+
d: "M12 13.5V8",
|
|
620
|
+
key: "1io7kd"
|
|
621
|
+
}]
|
|
622
|
+
]), at = J([
|
|
623
|
+
["path", {
|
|
624
|
+
d: "M10 12h4",
|
|
625
|
+
key: "a56b0p"
|
|
626
|
+
}],
|
|
627
|
+
["path", {
|
|
628
|
+
d: "M10 8h4",
|
|
629
|
+
key: "1sr2af"
|
|
630
|
+
}],
|
|
631
|
+
["path", {
|
|
632
|
+
d: "M14 21v-3a2 2 0 0 0-4 0v3",
|
|
633
|
+
key: "1rgiei"
|
|
634
|
+
}],
|
|
635
|
+
["path", {
|
|
636
|
+
d: "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",
|
|
637
|
+
key: "secmi2"
|
|
638
|
+
}],
|
|
639
|
+
["path", {
|
|
640
|
+
d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",
|
|
641
|
+
key: "16ra0t"
|
|
642
|
+
}]
|
|
643
|
+
]), ot = J([["path", {
|
|
644
|
+
d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
|
|
645
|
+
key: "18u6gg"
|
|
646
|
+
}], ["circle", {
|
|
647
|
+
cx: "12",
|
|
648
|
+
cy: "13",
|
|
649
|
+
r: "3",
|
|
650
|
+
key: "1vg3eu"
|
|
651
|
+
}]]), st = J([
|
|
652
|
+
["path", {
|
|
653
|
+
d: "M12 16v5",
|
|
654
|
+
key: "zza2cw"
|
|
655
|
+
}],
|
|
656
|
+
["path", {
|
|
657
|
+
d: "M16 14.639V21",
|
|
658
|
+
key: "1s85h0"
|
|
659
|
+
}],
|
|
660
|
+
["path", {
|
|
661
|
+
d: "M20 10.656V21",
|
|
662
|
+
key: "q45596"
|
|
663
|
+
}],
|
|
664
|
+
["path", {
|
|
665
|
+
d: "m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15",
|
|
666
|
+
key: "1fw8x9"
|
|
667
|
+
}],
|
|
668
|
+
["path", {
|
|
669
|
+
d: "M4 18.463V21",
|
|
670
|
+
key: "1otddq"
|
|
671
|
+
}],
|
|
672
|
+
["path", {
|
|
673
|
+
d: "M8 14.656V21",
|
|
674
|
+
key: "1t2idw"
|
|
675
|
+
}]
|
|
676
|
+
]), ct = J([["path", {
|
|
677
|
+
d: "m9 18 6-6-6-6",
|
|
678
|
+
key: "mthhwq"
|
|
679
|
+
}]]), lt = J([
|
|
680
|
+
["circle", {
|
|
721
681
|
cx: "12",
|
|
722
682
|
cy: "12",
|
|
723
683
|
r: "10",
|
|
724
684
|
key: "1mglay"
|
|
725
|
-
}],
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
685
|
+
}],
|
|
686
|
+
["line", {
|
|
687
|
+
x1: "12",
|
|
688
|
+
x2: "12",
|
|
689
|
+
y1: "8",
|
|
690
|
+
y2: "12",
|
|
691
|
+
key: "1pkeuh"
|
|
692
|
+
}],
|
|
693
|
+
["line", {
|
|
694
|
+
x1: "12",
|
|
695
|
+
x2: "12.01",
|
|
696
|
+
y1: "16",
|
|
697
|
+
y2: "16",
|
|
698
|
+
key: "4dfq90"
|
|
699
|
+
}]
|
|
700
|
+
]), ut = J([["circle", {
|
|
701
|
+
cx: "12",
|
|
702
|
+
cy: "12",
|
|
703
|
+
r: "10",
|
|
704
|
+
key: "1mglay"
|
|
705
|
+
}], ["path", {
|
|
706
|
+
d: "m9 12 2 2 4-4",
|
|
707
|
+
key: "dzmm74"
|
|
708
|
+
}]]), dt = J([["circle", {
|
|
709
|
+
cx: "12",
|
|
710
|
+
cy: "12",
|
|
711
|
+
r: "10",
|
|
712
|
+
key: "1mglay"
|
|
713
|
+
}], ["path", {
|
|
714
|
+
d: "M12 6v6h4",
|
|
715
|
+
key: "135r8i"
|
|
716
|
+
}]]), ft = J([
|
|
717
|
+
["ellipse", {
|
|
718
|
+
cx: "8",
|
|
719
|
+
cy: "5",
|
|
720
|
+
rx: "6",
|
|
721
|
+
ry: "3",
|
|
722
|
+
key: "1d3l9k"
|
|
723
|
+
}],
|
|
724
|
+
["path", {
|
|
725
|
+
d: "M2 5v4c0 1.66 2.69 3 6 3s6-1.34 6-3V5",
|
|
726
|
+
key: "vmut4y"
|
|
727
|
+
}],
|
|
728
|
+
["path", {
|
|
729
|
+
d: "M2 9v4c0 1.66 2.69 3 6 3 1.46 0 2.8-.26 3.84-.7",
|
|
730
|
+
key: "1vjswr"
|
|
731
|
+
}],
|
|
732
|
+
["path", {
|
|
733
|
+
d: "M14 8.5c.61-.31 1.3-.5 2-.5 3.31 0 6 1.34 6 3s-2.69 3-6 3c-.7 0-1.39-.06-2-.18",
|
|
734
|
+
key: "1xm6sh"
|
|
735
|
+
}],
|
|
736
|
+
["path", {
|
|
737
|
+
d: "M10 12v4c0 1.66 2.69 3 6 3s6-1.34 6-3v-5",
|
|
738
|
+
key: "1k39er"
|
|
739
|
+
}]
|
|
740
|
+
]), pt = J([
|
|
741
|
+
["path", {
|
|
742
|
+
d: "M12 15V3",
|
|
743
|
+
key: "m9g1x1"
|
|
744
|
+
}],
|
|
745
|
+
["path", {
|
|
746
|
+
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
747
|
+
key: "ih7n3h"
|
|
748
|
+
}],
|
|
749
|
+
["path", {
|
|
750
|
+
d: "m7 10 5 5 5-5",
|
|
751
|
+
key: "brsn70"
|
|
752
|
+
}]
|
|
753
|
+
]), mt = J([
|
|
754
|
+
["path", {
|
|
755
|
+
d: "M15 3h6v6",
|
|
756
|
+
key: "1q9fwt"
|
|
757
|
+
}],
|
|
758
|
+
["path", {
|
|
759
|
+
d: "M10 14 21 3",
|
|
760
|
+
key: "gplh6r"
|
|
761
|
+
}],
|
|
762
|
+
["path", {
|
|
763
|
+
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
|
|
764
|
+
key: "a6xqqp"
|
|
765
|
+
}]
|
|
766
|
+
]), ht = J([
|
|
767
|
+
["path", {
|
|
768
|
+
d: "M12 16h.01",
|
|
769
|
+
key: "1drbdi"
|
|
770
|
+
}],
|
|
771
|
+
["path", {
|
|
772
|
+
d: "M16 16h.01",
|
|
773
|
+
key: "1f9h7w"
|
|
774
|
+
}],
|
|
775
|
+
["path", {
|
|
776
|
+
d: "M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z",
|
|
777
|
+
key: "1iv0i2"
|
|
778
|
+
}],
|
|
779
|
+
["path", {
|
|
780
|
+
d: "M8 16h.01",
|
|
781
|
+
key: "18s6g9"
|
|
782
|
+
}]
|
|
783
|
+
]), gt = J([["path", {
|
|
784
|
+
d: "m12 14 4-4",
|
|
785
|
+
key: "9kzdfg"
|
|
786
|
+
}], ["path", {
|
|
787
|
+
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
788
|
+
key: "19p75a"
|
|
789
|
+
}]]), _t = J([
|
|
790
|
+
["path", {
|
|
791
|
+
d: "m11 17-2 2a2 2 0 0 1-3 0l-4-4",
|
|
792
|
+
key: "1tczb8"
|
|
793
|
+
}],
|
|
794
|
+
["path", {
|
|
795
|
+
d: "m16 3-5 5a2 2 0 0 0 3 3l1-1a3 3 0 0 1 4 0l3 3",
|
|
796
|
+
key: "1xg9v4"
|
|
797
|
+
}],
|
|
798
|
+
["path", {
|
|
799
|
+
d: "m8 7 2-2a3 3 0 0 1 4 0l2 2",
|
|
800
|
+
key: "1q0v8x"
|
|
801
|
+
}],
|
|
802
|
+
["path", {
|
|
803
|
+
d: "m2 8 5 5",
|
|
804
|
+
key: "1p5b7q"
|
|
805
|
+
}],
|
|
806
|
+
["path", {
|
|
807
|
+
d: "m22 8-5 5",
|
|
808
|
+
key: "1v6m9k"
|
|
809
|
+
}],
|
|
810
|
+
["path", {
|
|
811
|
+
d: "m18 15-3 3a2 2 0 0 1-3 0l-1-1",
|
|
812
|
+
key: "1g5x8p"
|
|
813
|
+
}]
|
|
814
|
+
]), vt = {
|
|
815
|
+
IconAppsGrid: Je,
|
|
816
|
+
IconActivity: Ye,
|
|
817
|
+
IconArchive: se,
|
|
818
|
+
IconAlertTriangle: Xe,
|
|
819
|
+
IconArrowDown: Ze,
|
|
820
|
+
IconArrowLeft: Qe,
|
|
821
|
+
IconArrowRight: $e,
|
|
822
|
+
IconArrowUp: et,
|
|
823
|
+
IconArrowUpRight: tt,
|
|
824
|
+
IconBarChart3: nt,
|
|
825
|
+
IconBedDouble: ae,
|
|
826
|
+
IconBookText: oe,
|
|
827
|
+
IconBell: rt,
|
|
828
|
+
IconBoxes: it,
|
|
829
|
+
IconBuilding2: at,
|
|
830
|
+
IconCamera: ot,
|
|
831
|
+
IconChartNoAxesCombined: st,
|
|
832
|
+
IconChevronRight: ct,
|
|
833
|
+
IconCircleAlert: lt,
|
|
834
|
+
IconCircleCheck: ut,
|
|
835
|
+
IconClock3: dt,
|
|
836
|
+
IconCoins: ft,
|
|
729
837
|
IconCopy: ue,
|
|
730
|
-
IconDownload:
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
key: "m9g1x1"
|
|
734
|
-
}],
|
|
735
|
-
["path", {
|
|
736
|
-
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
737
|
-
key: "ih7n3h"
|
|
738
|
-
}],
|
|
739
|
-
["path", {
|
|
740
|
-
d: "m7 10 5 5 5-5",
|
|
741
|
-
key: "brsn70"
|
|
742
|
-
}]
|
|
743
|
-
]),
|
|
744
|
-
IconExternalLink: J([
|
|
745
|
-
["path", {
|
|
746
|
-
d: "M15 3h6v6",
|
|
747
|
-
key: "1q9fwt"
|
|
748
|
-
}],
|
|
749
|
-
["path", {
|
|
750
|
-
d: "M10 14 21 3",
|
|
751
|
-
key: "gplh6r"
|
|
752
|
-
}],
|
|
753
|
-
["path", {
|
|
754
|
-
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
|
|
755
|
-
key: "a6xqqp"
|
|
756
|
-
}]
|
|
757
|
-
]),
|
|
758
|
-
IconFactory: J([
|
|
759
|
-
["path", {
|
|
760
|
-
d: "M12 16h.01",
|
|
761
|
-
key: "1drbdi"
|
|
762
|
-
}],
|
|
763
|
-
["path", {
|
|
764
|
-
d: "M16 16h.01",
|
|
765
|
-
key: "1f9h7w"
|
|
766
|
-
}],
|
|
767
|
-
["path", {
|
|
768
|
-
d: "M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z",
|
|
769
|
-
key: "1iv0i2"
|
|
770
|
-
}],
|
|
771
|
-
["path", {
|
|
772
|
-
d: "M8 16h.01",
|
|
773
|
-
key: "18s6g9"
|
|
774
|
-
}]
|
|
775
|
-
]),
|
|
838
|
+
IconDownload: pt,
|
|
839
|
+
IconExternalLink: mt,
|
|
840
|
+
IconFactory: ht,
|
|
776
841
|
IconFileText: ge,
|
|
777
|
-
IconGauge:
|
|
778
|
-
d: "m12 14 4-4",
|
|
779
|
-
key: "9kzdfg"
|
|
780
|
-
}], ["path", {
|
|
781
|
-
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
782
|
-
key: "19p75a"
|
|
783
|
-
}]]),
|
|
842
|
+
IconGauge: gt,
|
|
784
843
|
IconGripVertical: J([
|
|
785
844
|
["circle", {
|
|
786
845
|
cx: "9",
|
|
@@ -819,6 +878,7 @@ var U = {
|
|
|
819
878
|
key: "f4zoj3"
|
|
820
879
|
}]
|
|
821
880
|
]),
|
|
881
|
+
IconHandshake: _t,
|
|
822
882
|
IconLayoutDashboard: J([
|
|
823
883
|
["rect", {
|
|
824
884
|
width: "7",
|
|
@@ -1223,25 +1283,25 @@ var U = {
|
|
|
1223
1283
|
IconUpload: Ie,
|
|
1224
1284
|
IconWarning: Le,
|
|
1225
1285
|
IconTrash2: Re
|
|
1226
|
-
},
|
|
1227
|
-
let r =
|
|
1286
|
+
}, yt = Object.freeze(Object.keys(vt)), Y = ({ name: e, ...n }) => {
|
|
1287
|
+
let r = vt[e];
|
|
1228
1288
|
return /* @__PURE__ */ t(r, { ...n });
|
|
1229
|
-
},
|
|
1289
|
+
}, bt = {
|
|
1230
1290
|
wrapper: "_wrapper_1seon_1",
|
|
1231
1291
|
label: "_label_1seon_13",
|
|
1232
1292
|
input: "_input_1seon_35",
|
|
1233
1293
|
control: "_control_1seon_49",
|
|
1234
1294
|
disabled: "_disabled_1seon_95",
|
|
1235
1295
|
controlError: "_controlError_1seon_121"
|
|
1236
|
-
},
|
|
1296
|
+
}, xt = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, readOnly: c = !1, className: l = "", name: u, id: p, indeterminate: m = !1, ariaLabel: g, ..._ }) => {
|
|
1237
1297
|
let v = f(), y = p ?? `ds-checkbox-${u ?? v}`, b = h(null), x = a ? `${y}-hint` : void 0, S = o ? `${y}-error` : void 0;
|
|
1238
1298
|
return d(() => {
|
|
1239
1299
|
b.current && (b.current.indeterminate = m && !e);
|
|
1240
1300
|
}, [e, m]), /* @__PURE__ */ n("div", {
|
|
1241
|
-
className: `${
|
|
1301
|
+
className: `${bt.wrapper} ${l}`,
|
|
1242
1302
|
children: [
|
|
1243
1303
|
/* @__PURE__ */ n("label", {
|
|
1244
|
-
className: `${
|
|
1304
|
+
className: `${bt.label} ${s ? bt.disabled : ""}`,
|
|
1245
1305
|
htmlFor: y,
|
|
1246
1306
|
children: [
|
|
1247
1307
|
/* @__PURE__ */ t("input", {
|
|
@@ -1255,14 +1315,14 @@ var U = {
|
|
|
1255
1315
|
"aria-invalid": !!o,
|
|
1256
1316
|
"aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
|
|
1257
1317
|
"aria-label": g,
|
|
1258
|
-
className:
|
|
1318
|
+
className: bt.input,
|
|
1259
1319
|
onChange: (e) => {
|
|
1260
1320
|
c || r?.(e.target.checked, e);
|
|
1261
1321
|
},
|
|
1262
1322
|
..._
|
|
1263
1323
|
}),
|
|
1264
1324
|
/* @__PURE__ */ n("span", {
|
|
1265
|
-
className: `${
|
|
1325
|
+
className: `${bt.control} ${o ? bt.controlError : ""}`,
|
|
1266
1326
|
"aria-hidden": "true",
|
|
1267
1327
|
children: [m && !e && /* @__PURE__ */ t(Y, {
|
|
1268
1328
|
name: "IconMinus",
|
|
@@ -1319,7 +1379,7 @@ var U = {
|
|
|
1319
1379
|
timeLabel: "_timeLabel_su17c_533",
|
|
1320
1380
|
previousMonth: "_previousMonth_su17c_593",
|
|
1321
1381
|
nextMonth: "_nextMonth_su17c_601"
|
|
1322
|
-
},
|
|
1382
|
+
}, St = [
|
|
1323
1383
|
"Пн",
|
|
1324
1384
|
"Вт",
|
|
1325
1385
|
"Ср",
|
|
@@ -1327,7 +1387,7 @@ var U = {
|
|
|
1327
1387
|
"Пт",
|
|
1328
1388
|
"Сб",
|
|
1329
1389
|
"Вс"
|
|
1330
|
-
],
|
|
1390
|
+
], Ct = [
|
|
1331
1391
|
"Январь",
|
|
1332
1392
|
"Февраль",
|
|
1333
1393
|
"Март",
|
|
@@ -1340,33 +1400,33 @@ var U = {
|
|
|
1340
1400
|
"Октябрь",
|
|
1341
1401
|
"Ноябрь",
|
|
1342
1402
|
"Декабрь"
|
|
1343
|
-
],
|
|
1344
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1403
|
+
], wt = (e) => String(e).padStart(2, "0"), Tt = 8, Et = "Некорректная дата", Dt = (e) => e ? `${wt(e.getDate())}.${wt(e.getMonth() + 1)}.${e.getFullYear()}` : "", Ot = (e) => {
|
|
1404
|
+
let t = e.replace(/\D/g, "").slice(0, Tt);
|
|
1345
1405
|
return [
|
|
1346
1406
|
t.slice(0, 2),
|
|
1347
1407
|
t.slice(2, 4),
|
|
1348
1408
|
t.slice(4, 8)
|
|
1349
1409
|
].filter(Boolean).join(".");
|
|
1350
|
-
},
|
|
1410
|
+
}, kt = (e) => {
|
|
1351
1411
|
if (!e) return !0;
|
|
1352
1412
|
let t = Number(e.padEnd(4, "0"));
|
|
1353
1413
|
return Number(e.padEnd(4, "9")) >= 1800 && t <= 2500;
|
|
1354
|
-
},
|
|
1414
|
+
}, At = (e) => {
|
|
1355
1415
|
if (!/^\d{0,8}$/.test(e)) return !1;
|
|
1356
1416
|
let t = e.slice(0, 2), n = e.slice(2, 4), r = e.slice(4, 8);
|
|
1357
|
-
return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 :
|
|
1358
|
-
},
|
|
1417
|
+
return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 : kt(r);
|
|
1418
|
+
}, jt = (e) => {
|
|
1359
1419
|
let t = /^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);
|
|
1360
1420
|
if (!t) return null;
|
|
1361
1421
|
let n = Number(t[1]), r = Number(t[2]) - 1, i = Number(t[3]);
|
|
1362
1422
|
if (i < 1800 || i > 2500) return null;
|
|
1363
1423
|
let a = new Date(i, r, n, 12);
|
|
1364
1424
|
return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
|
|
1365
|
-
},
|
|
1425
|
+
}, Mt = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Nt = (e, t) => {
|
|
1366
1426
|
if (!e) return "";
|
|
1367
|
-
let n = `${e.getFullYear()}-${
|
|
1427
|
+
let n = `${e.getFullYear()}-${wt(e.getMonth() + 1)}-${wt(e.getDate())}`, r = `${wt(e.getHours())}:${wt(e.getMinutes())}`;
|
|
1368
1428
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
1369
|
-
},
|
|
1429
|
+
}, Pt = (e, t) => {
|
|
1370
1430
|
if (!e) return null;
|
|
1371
1431
|
if (t === "time") {
|
|
1372
1432
|
let t = /^(\d{2}):(\d{2})$/.exec(e);
|
|
@@ -1384,33 +1444,33 @@ var U = {
|
|
|
1384
1444
|
}
|
|
1385
1445
|
let n = new Date(e);
|
|
1386
1446
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
1387
|
-
},
|
|
1447
|
+
}, Ft = (e, t) => {
|
|
1388
1448
|
if (!e) return "";
|
|
1389
|
-
let n = `${
|
|
1449
|
+
let n = `${wt(e.getDate())}.${wt(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${wt(e.getHours())}:${wt(e.getMinutes())}`;
|
|
1390
1450
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
1391
|
-
},
|
|
1451
|
+
}, It = (e) => {
|
|
1392
1452
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
1393
1453
|
return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
|
|
1394
1454
|
let n = new Date(r);
|
|
1395
1455
|
return n.setDate(r.getDate() + t), n;
|
|
1396
1456
|
});
|
|
1397
|
-
},
|
|
1398
|
-
let r =
|
|
1399
|
-
return !!(t && r <
|
|
1400
|
-
},
|
|
1401
|
-
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, ee] = g(
|
|
1457
|
+
}, Lt = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), Rt = (e, t, n) => {
|
|
1458
|
+
let r = Mt(e).getTime();
|
|
1459
|
+
return !!(t && r < Mt(t).getTime() || n && r > Mt(n).getTime());
|
|
1460
|
+
}, zt = 8, Bt = 6, Vt = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: E = "" }) => {
|
|
1461
|
+
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, ee] = g(Nt(r, "time")), [te, B] = g(Dt(r)), [V, ne] = g(""), [H, U] = g(0), [G, ie] = g(null), ae = m(() => It(L), [L]), oe = a !== "time", se = a !== "date";
|
|
1402
1462
|
d(() => {
|
|
1403
|
-
r && R(r), ee(
|
|
1463
|
+
r && R(r), ee(Nt(r, "time")), B(Dt(r));
|
|
1404
1464
|
}, [r]), d(() => () => {
|
|
1405
1465
|
P.current && clearTimeout(P.current);
|
|
1406
1466
|
}, []);
|
|
1407
1467
|
let K = l(() => {
|
|
1408
1468
|
let e = M.current, t = N.current;
|
|
1409
1469
|
if (!e || !t) return;
|
|
1410
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
1470
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - zt, o = n.top - zt, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(zt, n.top - r.height - Bt) : n.bottom + Bt, u = n.left, d = i - r.width - zt;
|
|
1411
1471
|
ie({
|
|
1412
1472
|
top: l,
|
|
1413
|
-
left: Math.max(
|
|
1473
|
+
left: Math.max(zt, Math.min(u, d)),
|
|
1414
1474
|
maxHeight: c
|
|
1415
1475
|
});
|
|
1416
1476
|
}, []);
|
|
@@ -1440,27 +1500,27 @@ var U = {
|
|
|
1440
1500
|
};
|
|
1441
1501
|
}, [F]);
|
|
1442
1502
|
let ce = (e) => {
|
|
1443
|
-
if (
|
|
1444
|
-
let t = a === "date" ?
|
|
1445
|
-
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), B(
|
|
1503
|
+
if (Rt(e, x, S)) return;
|
|
1504
|
+
let t = a === "date" ? Pt(Nt(e, "date"), "date") : new Date(e);
|
|
1505
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), B(Dt(t)), a === "date" && I(!1));
|
|
1446
1506
|
}, le = () => {
|
|
1447
|
-
ne(
|
|
1507
|
+
ne(Et), U((e) => e + 1), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
|
|
1448
1508
|
ne(""), P.current = null;
|
|
1449
1509
|
}, 3e3);
|
|
1450
1510
|
}, ue = (e) => {
|
|
1451
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1452
|
-
if (!
|
|
1511
|
+
let t = e.replace(/\D/g, "").slice(0, Tt);
|
|
1512
|
+
if (!At(t)) {
|
|
1453
1513
|
le();
|
|
1454
1514
|
return;
|
|
1455
1515
|
}
|
|
1456
|
-
let n =
|
|
1516
|
+
let n = Ot(t);
|
|
1457
1517
|
if (B(n), !t) {
|
|
1458
1518
|
i?.(null);
|
|
1459
1519
|
return;
|
|
1460
1520
|
}
|
|
1461
|
-
if (t.length <
|
|
1462
|
-
let o =
|
|
1463
|
-
if (!o ||
|
|
1521
|
+
if (t.length < Tt) return;
|
|
1522
|
+
let o = jt(n);
|
|
1523
|
+
if (!o || Rt(o, x, S)) {
|
|
1464
1524
|
le();
|
|
1465
1525
|
return;
|
|
1466
1526
|
}
|
|
@@ -1470,7 +1530,7 @@ var U = {
|
|
|
1470
1530
|
i?.(null);
|
|
1471
1531
|
return;
|
|
1472
1532
|
}
|
|
1473
|
-
let t =
|
|
1533
|
+
let t = Pt(e, "time");
|
|
1474
1534
|
if (!t) return;
|
|
1475
1535
|
let n = new Date(a === "datetime" ? r ?? L : /* @__PURE__ */ new Date());
|
|
1476
1536
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
@@ -1513,7 +1573,7 @@ var U = {
|
|
|
1513
1573
|
"aria-label": "Месяц",
|
|
1514
1574
|
value: L.getMonth(),
|
|
1515
1575
|
onChange: (e) => R(new Date(L.getFullYear(), Number(e.target.value), 1)),
|
|
1516
|
-
children:
|
|
1576
|
+
children: Ct.map((e, n) => /* @__PURE__ */ t("option", {
|
|
1517
1577
|
value: n,
|
|
1518
1578
|
children: e
|
|
1519
1579
|
}, e))
|
|
@@ -1541,16 +1601,16 @@ var U = {
|
|
|
1541
1601
|
}),
|
|
1542
1602
|
/* @__PURE__ */ t("div", {
|
|
1543
1603
|
className: X.weekdays,
|
|
1544
|
-
children:
|
|
1604
|
+
children: St.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1545
1605
|
}),
|
|
1546
1606
|
/* @__PURE__ */ t("div", {
|
|
1547
1607
|
className: X.days,
|
|
1548
1608
|
children: ae.map((e) => {
|
|
1549
|
-
let n =
|
|
1609
|
+
let n = Lt(r, e);
|
|
1550
1610
|
return /* @__PURE__ */ t("button", {
|
|
1551
1611
|
type: "button",
|
|
1552
1612
|
className: `${X.day} ${e.getMonth() === L.getMonth() ? "" : X.outside} ${n ? X.selected : ""}`,
|
|
1553
|
-
disabled:
|
|
1613
|
+
disabled: Rt(e, x, S),
|
|
1554
1614
|
"aria-pressed": n,
|
|
1555
1615
|
onClick: () => ce(e),
|
|
1556
1616
|
children: e.getDate()
|
|
@@ -1645,7 +1705,7 @@ var U = {
|
|
|
1645
1705
|
},
|
|
1646
1706
|
children: [/* @__PURE__ */ t("span", {
|
|
1647
1707
|
className: r ? X.value : X.placeholder,
|
|
1648
|
-
children:
|
|
1708
|
+
children: Ft(r, a) || fe
|
|
1649
1709
|
}), /* @__PURE__ */ t("span", {
|
|
1650
1710
|
className: `${X.chevron} ${he ? X.chevronOpen : ""}`,
|
|
1651
1711
|
"aria-hidden": "true",
|
|
@@ -1675,19 +1735,19 @@ var U = {
|
|
|
1675
1735
|
})
|
|
1676
1736
|
]
|
|
1677
1737
|
});
|
|
1678
|
-
},
|
|
1738
|
+
}, Ht = {
|
|
1679
1739
|
root: "_root_19vq2_1",
|
|
1680
1740
|
range: "_range_19vq2_21"
|
|
1681
|
-
},
|
|
1741
|
+
}, Ut = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), Wt = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
|
|
1682
1742
|
let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
|
|
1683
|
-
i?.(e),
|
|
1743
|
+
i?.(e), Ut(e) && r?.(e);
|
|
1684
1744
|
};
|
|
1685
1745
|
return /* @__PURE__ */ n("fieldset", {
|
|
1686
|
-
className: `${
|
|
1746
|
+
className: `${Ht.root} ${h}`,
|
|
1687
1747
|
disabled: f,
|
|
1688
1748
|
children: [/* @__PURE__ */ n("div", {
|
|
1689
|
-
className:
|
|
1690
|
-
children: [/* @__PURE__ */ t(
|
|
1749
|
+
className: Ht.range,
|
|
1750
|
+
children: [/* @__PURE__ */ t(Vt, {
|
|
1691
1751
|
value: e.from,
|
|
1692
1752
|
mode: a === "datetime" ? "datetime" : a,
|
|
1693
1753
|
label: o,
|
|
@@ -1701,7 +1761,7 @@ var U = {
|
|
|
1701
1761
|
...e,
|
|
1702
1762
|
from: t
|
|
1703
1763
|
})
|
|
1704
|
-
}), /* @__PURE__ */ t(
|
|
1764
|
+
}), /* @__PURE__ */ t(Vt, {
|
|
1705
1765
|
value: e.to,
|
|
1706
1766
|
mode: a === "datetime" ? "datetime" : a,
|
|
1707
1767
|
label: s,
|
|
@@ -1718,7 +1778,7 @@ var U = {
|
|
|
1718
1778
|
})]
|
|
1719
1779
|
}), c && !g && /* @__PURE__ */ t(re, { children: c })]
|
|
1720
1780
|
});
|
|
1721
|
-
},
|
|
1781
|
+
}, Gt = {
|
|
1722
1782
|
group: "_group_ey6uk_1",
|
|
1723
1783
|
skeleton: "_skeleton_ey6uk_15",
|
|
1724
1784
|
text: "_text_ey6uk_27",
|
|
@@ -1726,11 +1786,11 @@ var U = {
|
|
|
1726
1786
|
circular: "_circular_ey6uk_47",
|
|
1727
1787
|
animated: "_animated_ey6uk_59",
|
|
1728
1788
|
"ds-skeleton": "_ds-skeleton_ey6uk_1"
|
|
1729
|
-
},
|
|
1730
|
-
className: `${
|
|
1789
|
+
}, Kt = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
|
|
1790
|
+
className: `${Gt.group} ${o}`,
|
|
1731
1791
|
"aria-hidden": "true",
|
|
1732
1792
|
children: Array.from({ length: Math.max(1, i) }, (i, o) => /* @__PURE__ */ t("span", {
|
|
1733
|
-
className: `${
|
|
1793
|
+
className: `${Gt.skeleton} ${Gt[e]} ${a ? Gt.animated : ""}`,
|
|
1734
1794
|
style: {
|
|
1735
1795
|
width: n,
|
|
1736
1796
|
height: r
|
|
@@ -1755,25 +1815,25 @@ var U = {
|
|
|
1755
1815
|
message: "_message_1l9o2_391",
|
|
1756
1816
|
error: "_error_1l9o2_393",
|
|
1757
1817
|
errorState: "_errorState_1l9o2_419"
|
|
1758
|
-
},
|
|
1818
|
+
}, qt = 8, Jt = 6, Yt = 120, Xt = (e, t, n) => {
|
|
1759
1819
|
if (!e.length) return -1;
|
|
1760
1820
|
for (let r = 0; r < e.length; r += 1) {
|
|
1761
1821
|
let i = (t + r * n + e.length) % e.length;
|
|
1762
1822
|
if (!e[i]?.disabled) return i;
|
|
1763
1823
|
}
|
|
1764
1824
|
return -1;
|
|
1765
|
-
},
|
|
1825
|
+
}, Zt = (e) => {
|
|
1766
1826
|
if (typeof e == "number") return e;
|
|
1767
1827
|
if (typeof e == "string") {
|
|
1768
1828
|
let t = Number.parseFloat(e);
|
|
1769
1829
|
if (Number.isFinite(t)) return t;
|
|
1770
1830
|
}
|
|
1771
1831
|
return Infinity;
|
|
1772
|
-
},
|
|
1832
|
+
}, Qt = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
|
|
1773
1833
|
let E = f(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, ee = [R, z].filter(Boolean).join(" ") || void 0, te = o && s, B = l(() => {
|
|
1774
1834
|
let e = P.current, t = F.current;
|
|
1775
1835
|
if (!e || !t) return;
|
|
1776
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom -
|
|
1836
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - qt, o = n.top - qt, s = a < r.height && o > a, c = Math.max(Yt, s ? o : a), l = Zt(T), u = Math.min(c, l), d = n.left, f = i - n.width - qt, p = Math.max(qt, Math.min(d, f)), m = s ? Math.max(qt, n.top - r.height - Jt) : n.bottom + Jt;
|
|
1777
1837
|
M({
|
|
1778
1838
|
top: m,
|
|
1779
1839
|
left: p,
|
|
@@ -1806,7 +1866,7 @@ var U = {
|
|
|
1806
1866
|
};
|
|
1807
1867
|
}, [k]);
|
|
1808
1868
|
let V = (t, n) => {
|
|
1809
|
-
let r =
|
|
1869
|
+
let r = Xt(e, t, n);
|
|
1810
1870
|
if (r === -1) return;
|
|
1811
1871
|
let i = I.current[r];
|
|
1812
1872
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
@@ -1949,25 +2009,25 @@ var U = {
|
|
|
1949
2009
|
})
|
|
1950
2010
|
]
|
|
1951
2011
|
});
|
|
1952
|
-
},
|
|
2012
|
+
}, $t = (e) => `${e.id}:${e.direction}`, en = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
|
|
1953
2013
|
let c = e.flatMap((e) => [{
|
|
1954
|
-
value:
|
|
2014
|
+
value: $t({
|
|
1955
2015
|
id: e.id,
|
|
1956
2016
|
direction: "asc"
|
|
1957
2017
|
}),
|
|
1958
2018
|
label: e.ascLabel ?? `${e.label} · по возрастанию`,
|
|
1959
2019
|
disabled: e.disabled
|
|
1960
2020
|
}, {
|
|
1961
|
-
value:
|
|
2021
|
+
value: $t({
|
|
1962
2022
|
id: e.id,
|
|
1963
2023
|
direction: "desc"
|
|
1964
2024
|
}),
|
|
1965
2025
|
label: e.descLabel ?? `${e.label} · по убыванию`,
|
|
1966
2026
|
disabled: e.disabled
|
|
1967
2027
|
}]);
|
|
1968
|
-
return /* @__PURE__ */ t(
|
|
2028
|
+
return /* @__PURE__ */ t(Qt, {
|
|
1969
2029
|
options: c,
|
|
1970
|
-
value: n ?
|
|
2030
|
+
value: n ? $t(n) : "",
|
|
1971
2031
|
label: i,
|
|
1972
2032
|
placeholder: a,
|
|
1973
2033
|
disabled: o,
|
|
@@ -1980,7 +2040,7 @@ var U = {
|
|
|
1980
2040
|
});
|
|
1981
2041
|
}
|
|
1982
2042
|
});
|
|
1983
|
-
},
|
|
2043
|
+
}, tn = {
|
|
1984
2044
|
wrapper: "_wrapper_1qpd5_1",
|
|
1985
2045
|
control: "_control_1qpd5_15",
|
|
1986
2046
|
input: "_input_1qpd5_25",
|
|
@@ -1990,12 +2050,12 @@ var U = {
|
|
|
1990
2050
|
lg: "_lg_1qpd5_139",
|
|
1991
2051
|
inputError: "_inputError_1qpd5_155",
|
|
1992
2052
|
trailingAction: "_trailingAction_1qpd5_163"
|
|
1993
|
-
},
|
|
2053
|
+
}, nn = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: l, error: u, hint: p, className: m = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: E, ...D }) => {
|
|
1994
2054
|
let O = f(), k = v ?? `ds-input-${_ ?? O}`, A = h(null), [j, M] = g(!1), N = p ? `${k}-hint` : void 0, P = u ? `${k}-error` : void 0, F = String(e ?? ""), I = [N, P].filter(Boolean).join(" ") || void 0, L = C ? j ? "text" : "password" : i;
|
|
1995
2055
|
return d(() => {
|
|
1996
2056
|
C || M(!1);
|
|
1997
2057
|
}, [C]), /* @__PURE__ */ n("div", {
|
|
1998
|
-
className: `${
|
|
2058
|
+
className: `${tn.wrapper} ${m}`,
|
|
1999
2059
|
children: [
|
|
2000
2060
|
l && /* @__PURE__ */ t(W, {
|
|
2001
2061
|
htmlFor: k,
|
|
@@ -2005,11 +2065,11 @@ var U = {
|
|
|
2005
2065
|
}),
|
|
2006
2066
|
o && c ? /* @__PURE__ */ t("div", {
|
|
2007
2067
|
id: k,
|
|
2008
|
-
className:
|
|
2068
|
+
className: tn.disabledText,
|
|
2009
2069
|
"aria-describedby": I,
|
|
2010
2070
|
children: F || a
|
|
2011
2071
|
}) : /* @__PURE__ */ n("div", {
|
|
2012
|
-
className:
|
|
2072
|
+
className: tn.control,
|
|
2013
2073
|
children: [
|
|
2014
2074
|
/* @__PURE__ */ t("input", {
|
|
2015
2075
|
ref: A,
|
|
@@ -2023,7 +2083,7 @@ var U = {
|
|
|
2023
2083
|
required: x,
|
|
2024
2084
|
"aria-invalid": !!u,
|
|
2025
2085
|
"aria-describedby": I,
|
|
2026
|
-
className: `${
|
|
2086
|
+
className: `${tn.input} ${tn[y]} ${u ? tn.inputError : ""}`,
|
|
2027
2087
|
onChange: (e) => {
|
|
2028
2088
|
if (i === "number" && !C) {
|
|
2029
2089
|
let t = e.target.value === "" ? "" : Number(e.target.value);
|
|
@@ -2039,7 +2099,7 @@ var U = {
|
|
|
2039
2099
|
}),
|
|
2040
2100
|
C && /* @__PURE__ */ t("button", {
|
|
2041
2101
|
type: "button",
|
|
2042
|
-
className:
|
|
2102
|
+
className: tn.trailingAction,
|
|
2043
2103
|
disabled: o,
|
|
2044
2104
|
"aria-label": j ? w : T,
|
|
2045
2105
|
"aria-pressed": j,
|
|
@@ -2052,7 +2112,7 @@ var U = {
|
|
|
2052
2112
|
}),
|
|
2053
2113
|
!C && b && F && !o && !s && /* @__PURE__ */ t("button", {
|
|
2054
2114
|
type: "button",
|
|
2055
|
-
className:
|
|
2115
|
+
className: tn.trailingAction,
|
|
2056
2116
|
"aria-label": "Очистить поле",
|
|
2057
2117
|
onClick: () => {
|
|
2058
2118
|
let e = A.current;
|
|
@@ -2077,23 +2137,23 @@ var U = {
|
|
|
2077
2137
|
})
|
|
2078
2138
|
]
|
|
2079
2139
|
});
|
|
2080
|
-
},
|
|
2140
|
+
}, rn = 8, an = 6, on = 120, sn = (e) => {
|
|
2081
2141
|
if (typeof e == "number") return e;
|
|
2082
2142
|
if (typeof e == "string") {
|
|
2083
2143
|
let t = Number.parseFloat(e);
|
|
2084
2144
|
if (Number.isFinite(t)) return t;
|
|
2085
2145
|
}
|
|
2086
2146
|
return Infinity;
|
|
2087
|
-
},
|
|
2147
|
+
}, cn = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
|
|
2088
2148
|
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, ee = u ? `${O}-error` : void 0, te = [z, ee].filter(Boolean).join(" ") || void 0, B = o && s, V = l(() => {
|
|
2089
2149
|
let e = F.current, t = I.current;
|
|
2090
2150
|
if (!e || !t) return;
|
|
2091
|
-
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom -
|
|
2151
|
+
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - rn, a = n.top - rn, o = i < r.height && a > i, s = Math.max(on, o ? a : i), c = window.innerWidth - n.width - rn;
|
|
2092
2152
|
N({
|
|
2093
|
-
top: o ? Math.max(
|
|
2094
|
-
left: Math.max(
|
|
2153
|
+
top: o ? Math.max(rn, n.top - r.height - an) : n.bottom + an,
|
|
2154
|
+
left: Math.max(rn, Math.min(n.left, c)),
|
|
2095
2155
|
width: n.width,
|
|
2096
|
-
maxHeight: Math.min(s,
|
|
2156
|
+
maxHeight: Math.min(s, sn(E))
|
|
2097
2157
|
});
|
|
2098
2158
|
}, [E]);
|
|
2099
2159
|
p(() => {
|
|
@@ -2121,7 +2181,7 @@ var U = {
|
|
|
2121
2181
|
};
|
|
2122
2182
|
}, [A]);
|
|
2123
2183
|
let ne = (t, n) => {
|
|
2124
|
-
let r =
|
|
2184
|
+
let r = Xt(e, t, n);
|
|
2125
2185
|
r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
|
|
2126
2186
|
}, H = (t) => {
|
|
2127
2187
|
if (t.disabled) return;
|
|
@@ -2257,22 +2317,22 @@ var U = {
|
|
|
2257
2317
|
})
|
|
2258
2318
|
]
|
|
2259
2319
|
});
|
|
2260
|
-
},
|
|
2320
|
+
}, ln = {
|
|
2261
2321
|
wrapper: "_wrapper_1tjtn_1",
|
|
2262
2322
|
input: "_input_1tjtn_21",
|
|
2263
2323
|
switch: "_switch_1tjtn_35",
|
|
2264
2324
|
thumb: "_thumb_1tjtn_67",
|
|
2265
2325
|
label: "_label_1tjtn_113",
|
|
2266
2326
|
disabled: "_disabled_1tjtn_125"
|
|
2267
|
-
},
|
|
2327
|
+
}, un = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
|
|
2268
2328
|
let d = f(), p = l ?? `ds-radio-button-${c ?? d}`;
|
|
2269
2329
|
return /* @__PURE__ */ n("label", {
|
|
2270
2330
|
htmlFor: p,
|
|
2271
|
-
className: `${
|
|
2331
|
+
className: `${ln.wrapper} ${a ? ln.disabled : ""} ${s}`,
|
|
2272
2332
|
children: [
|
|
2273
2333
|
/* @__PURE__ */ t("input", {
|
|
2274
2334
|
id: p,
|
|
2275
|
-
className:
|
|
2335
|
+
className: ln.input,
|
|
2276
2336
|
type: "checkbox",
|
|
2277
2337
|
role: "switch",
|
|
2278
2338
|
name: c,
|
|
@@ -2285,28 +2345,28 @@ var U = {
|
|
|
2285
2345
|
}
|
|
2286
2346
|
}),
|
|
2287
2347
|
/* @__PURE__ */ t("span", {
|
|
2288
|
-
className:
|
|
2348
|
+
className: ln.switch,
|
|
2289
2349
|
"aria-hidden": "true",
|
|
2290
|
-
children: /* @__PURE__ */ t("span", { className:
|
|
2350
|
+
children: /* @__PURE__ */ t("span", { className: ln.thumb })
|
|
2291
2351
|
}),
|
|
2292
2352
|
i && /* @__PURE__ */ t("span", {
|
|
2293
|
-
className:
|
|
2353
|
+
className: ln.label,
|
|
2294
2354
|
children: i
|
|
2295
2355
|
})
|
|
2296
2356
|
]
|
|
2297
2357
|
});
|
|
2298
|
-
},
|
|
2299
|
-
root: "
|
|
2300
|
-
surface: "
|
|
2301
|
-
trigger: "
|
|
2302
|
-
heading: "
|
|
2303
|
-
title: "
|
|
2304
|
-
subtitle: "
|
|
2305
|
-
icon: "
|
|
2306
|
-
open: "
|
|
2307
|
-
content: "
|
|
2308
|
-
contentInner: "
|
|
2309
|
-
},
|
|
2358
|
+
}, dn = {
|
|
2359
|
+
root: "_root_1c0rf_1",
|
|
2360
|
+
surface: "_surface_1c0rf_15",
|
|
2361
|
+
trigger: "_trigger_1c0rf_25",
|
|
2362
|
+
heading: "_heading_1c0rf_95",
|
|
2363
|
+
title: "_title_1c0rf_105",
|
|
2364
|
+
subtitle: "_subtitle_1c0rf_117",
|
|
2365
|
+
icon: "_icon_1c0rf_129",
|
|
2366
|
+
open: "_open_1c0rf_151",
|
|
2367
|
+
content: "_content_1c0rf_159",
|
|
2368
|
+
contentInner: "_contentInner_1c0rf_179"
|
|
2369
|
+
}, fn = (e, t, n, r = 16) => {
|
|
2310
2370
|
if (t > Math.max(0, n - r * 2)) {
|
|
2311
2371
|
let t = e - r;
|
|
2312
2372
|
return Math.abs(t) <= 1 ? {
|
|
@@ -2328,17 +2388,17 @@ var U = {
|
|
|
2328
2388
|
alignment: "none",
|
|
2329
2389
|
delta: 0
|
|
2330
2390
|
};
|
|
2331
|
-
},
|
|
2332
|
-
let
|
|
2391
|
+
}, pn = ({ title: e, subtitle: r, children: i, variant: a = "outlined", defaultOpen: o = !1, open: s, onOpenChange: c, autoScrollOnOpen: l = !0, scrollOffset: u = 16, disabled: p = !1, className: m = "" }) => {
|
|
2392
|
+
let _ = f(), [v, y] = g(o), b = s ?? v, x = h(null), S = h(null), C = h(b);
|
|
2333
2393
|
return d(() => {
|
|
2334
|
-
let e =
|
|
2335
|
-
if (
|
|
2336
|
-
let t =
|
|
2394
|
+
let e = C.current;
|
|
2395
|
+
if (C.current = b, !b || e || !l) return;
|
|
2396
|
+
let t = x.current, n = S.current;
|
|
2337
2397
|
if (!t || !n || typeof window > "u") return;
|
|
2338
2398
|
let r = !1, i = () => {
|
|
2339
2399
|
if (r) return;
|
|
2340
2400
|
r = !0;
|
|
2341
|
-
let e = t.getBoundingClientRect(), n =
|
|
2401
|
+
let e = t.getBoundingClientRect(), n = fn(e.top, e.height, window.innerHeight, u);
|
|
2342
2402
|
if (n.alignment === "none") return;
|
|
2343
2403
|
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
2344
2404
|
window.scrollBy({
|
|
@@ -2355,32 +2415,34 @@ var U = {
|
|
|
2355
2415
|
};
|
|
2356
2416
|
}, [
|
|
2357
2417
|
l,
|
|
2358
|
-
|
|
2418
|
+
b,
|
|
2359
2419
|
u
|
|
2360
2420
|
]), /* @__PURE__ */ n("section", {
|
|
2361
|
-
ref:
|
|
2362
|
-
className: `${
|
|
2421
|
+
ref: x,
|
|
2422
|
+
className: `${dn.root} ${dn[a]} ${b ? dn.open : ""} ${m}`,
|
|
2363
2423
|
"data-variant": a,
|
|
2364
2424
|
children: [/* @__PURE__ */ n("button", {
|
|
2365
2425
|
type: "button",
|
|
2366
|
-
className:
|
|
2367
|
-
"aria-expanded":
|
|
2368
|
-
"aria-controls":
|
|
2426
|
+
className: dn.trigger,
|
|
2427
|
+
"aria-expanded": b,
|
|
2428
|
+
"aria-controls": _,
|
|
2429
|
+
disabled: p,
|
|
2369
2430
|
onClick: () => {
|
|
2370
|
-
|
|
2371
|
-
|
|
2431
|
+
if (p) return;
|
|
2432
|
+
let e = !b;
|
|
2433
|
+
s === void 0 && y(e), c?.(e);
|
|
2372
2434
|
},
|
|
2373
2435
|
children: [/* @__PURE__ */ n("span", {
|
|
2374
|
-
className:
|
|
2436
|
+
className: dn.heading,
|
|
2375
2437
|
children: [/* @__PURE__ */ t("span", {
|
|
2376
|
-
className:
|
|
2438
|
+
className: dn.title,
|
|
2377
2439
|
children: e
|
|
2378
2440
|
}), r && /* @__PURE__ */ t("span", {
|
|
2379
|
-
className:
|
|
2441
|
+
className: dn.subtitle,
|
|
2380
2442
|
children: r
|
|
2381
2443
|
})]
|
|
2382
2444
|
}), /* @__PURE__ */ t("span", {
|
|
2383
|
-
className:
|
|
2445
|
+
className: dn.icon,
|
|
2384
2446
|
"aria-hidden": "true",
|
|
2385
2447
|
children: /* @__PURE__ */ t(Y, {
|
|
2386
2448
|
name: "IconChevron",
|
|
@@ -2389,18 +2451,18 @@ var U = {
|
|
|
2389
2451
|
})
|
|
2390
2452
|
})]
|
|
2391
2453
|
}), /* @__PURE__ */ t("div", {
|
|
2392
|
-
ref:
|
|
2393
|
-
id:
|
|
2394
|
-
className:
|
|
2395
|
-
"aria-hidden": !
|
|
2396
|
-
inert: !
|
|
2454
|
+
ref: S,
|
|
2455
|
+
id: _,
|
|
2456
|
+
className: dn.content,
|
|
2457
|
+
"aria-hidden": !b,
|
|
2458
|
+
inert: !b,
|
|
2397
2459
|
children: /* @__PURE__ */ t("div", {
|
|
2398
|
-
className:
|
|
2460
|
+
className: dn.contentInner,
|
|
2399
2461
|
children: i
|
|
2400
2462
|
})
|
|
2401
2463
|
})]
|
|
2402
2464
|
});
|
|
2403
|
-
},
|
|
2465
|
+
}, mn = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
2404
2466
|
let [n, r] = g(null);
|
|
2405
2467
|
return d(() => {
|
|
2406
2468
|
let e = document.getElementById(t);
|
|
@@ -2413,35 +2475,35 @@ var U = {
|
|
|
2413
2475
|
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
2414
2476
|
};
|
|
2415
2477
|
}, [t]), n ? _(e, n) : null;
|
|
2416
|
-
},
|
|
2478
|
+
}, hn = 8, gn = 16, _n = 8, vn = 8, yn = 16, bn = {
|
|
2417
2479
|
top: "bottom",
|
|
2418
2480
|
right: "left",
|
|
2419
2481
|
bottom: "top",
|
|
2420
2482
|
left: "right"
|
|
2421
|
-
},
|
|
2422
|
-
top: t.y -
|
|
2423
|
-
right: t.x +
|
|
2424
|
-
bottom: t.y +
|
|
2425
|
-
left: t.x -
|
|
2483
|
+
}, xn = (e, t, n, r) => e === "top" ? t.top >= n.height + hn + gn : e === "bottom" ? r.height - t.bottom >= n.height + hn + gn : e === "left" ? t.left >= n.width + hn + gn : r.width - t.right >= n.width + hn + gn, Sn = (e, t, n) => n && t ? {
|
|
2484
|
+
top: t.y - vn,
|
|
2485
|
+
right: t.x + _n,
|
|
2486
|
+
bottom: t.y + yn,
|
|
2487
|
+
left: t.x - _n,
|
|
2426
2488
|
width: 16,
|
|
2427
2489
|
height: 24
|
|
2428
|
-
} : e,
|
|
2490
|
+
} : e, Cn = (e, t, n, r) => {
|
|
2429
2491
|
if (!(t.bottom > 0 && t.right > 0 && t.top < r.height && t.left < r.width)) return null;
|
|
2430
|
-
let i =
|
|
2431
|
-
return i === "top" && (o = t.top - n.height -
|
|
2492
|
+
let i = xn(e, t, n, r) ? e : xn(bn[e], t, n, r) ? bn[e] : e, a = t.left + (t.width - n.width) / 2, o = t.top + (t.height - n.height) / 2;
|
|
2493
|
+
return i === "top" && (o = t.top - n.height - hn), i === "bottom" && (o = t.bottom + hn), i === "left" && (a = t.left - n.width - hn), i === "right" && (a = t.right + hn), a = Math.min(Math.max(a, gn), Math.max(gn, r.width - n.width - gn)), o = Math.min(Math.max(o, gn), Math.max(gn, r.height - n.height - gn)), {
|
|
2432
2494
|
left: a,
|
|
2433
2495
|
top: o,
|
|
2434
2496
|
visibility: "visible"
|
|
2435
2497
|
};
|
|
2436
|
-
},
|
|
2498
|
+
}, wn = {
|
|
2437
2499
|
root: "_root_1pa4z_1",
|
|
2438
2500
|
tooltip: "_tooltip_1pa4z_11",
|
|
2439
2501
|
"ds-tooltip-in": "_ds-tooltip-in_1pa4z_1"
|
|
2440
|
-
},
|
|
2502
|
+
}, Tn = (e, t) => (n) => {
|
|
2441
2503
|
e?.(n), n.defaultPrevented || t(n);
|
|
2442
|
-
},
|
|
2504
|
+
}, En = (e, t) => {
|
|
2443
2505
|
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2444
|
-
},
|
|
2506
|
+
}, Dn = ({ content: e, children: a, placement: o = "top", followCursor: s = !1, delay: u = 450, disabled: p = !1, maxWidth: m = 280, className: _ = "", asChild: v = !1 }) => {
|
|
2445
2507
|
let y = f(), [b, x] = g(!1), [S, C] = g({ visibility: "hidden" }), [w, T] = g(null), E = h(null), D = h(null), O = h(null), k = h(() => void 0), A = l(() => {
|
|
2446
2508
|
E.current && clearTimeout(E.current), E.current = null, x(!1);
|
|
2447
2509
|
}, []), j = l(() => {
|
|
@@ -2465,7 +2527,7 @@ var U = {
|
|
|
2465
2527
|
let e = () => {
|
|
2466
2528
|
let e = D.current;
|
|
2467
2529
|
if (!e || !w) return;
|
|
2468
|
-
let t =
|
|
2530
|
+
let t = Cn(o, Sn(e.getBoundingClientRect(), O.current, s), w.getBoundingClientRect(), {
|
|
2469
2531
|
width: window.innerWidth,
|
|
2470
2532
|
height: window.innerHeight
|
|
2471
2533
|
});
|
|
@@ -2513,28 +2575,28 @@ var U = {
|
|
|
2513
2575
|
}, b && k.current());
|
|
2514
2576
|
}, R = i(a, {
|
|
2515
2577
|
"aria-describedby": b ? y : void 0,
|
|
2516
|
-
onMouseEnter:
|
|
2517
|
-
onMouseLeave:
|
|
2518
|
-
onFocus:
|
|
2519
|
-
onBlur:
|
|
2578
|
+
onMouseEnter: Tn(N.onMouseEnter, P),
|
|
2579
|
+
onMouseLeave: Tn(N.onMouseLeave, F),
|
|
2580
|
+
onFocus: Tn(N.onFocus, I),
|
|
2581
|
+
onBlur: Tn(N.onBlur, A),
|
|
2520
2582
|
...v ? {
|
|
2521
2583
|
ref: (e) => {
|
|
2522
|
-
D.current = e,
|
|
2584
|
+
D.current = e, En(N.ref, e);
|
|
2523
2585
|
},
|
|
2524
|
-
onPointerDown:
|
|
2525
|
-
onPointerMove:
|
|
2586
|
+
onPointerDown: Tn(N.onPointerDown, b ? A : j),
|
|
2587
|
+
onPointerMove: Tn(N.onPointerMove, L)
|
|
2526
2588
|
} : {}
|
|
2527
|
-
}), z = b && /* @__PURE__ */ t(
|
|
2589
|
+
}), z = b && /* @__PURE__ */ t(mn, { children: /* @__PURE__ */ t("span", {
|
|
2528
2590
|
ref: T,
|
|
2529
2591
|
id: y,
|
|
2530
2592
|
role: "tooltip",
|
|
2531
|
-
className:
|
|
2593
|
+
className: wn.tooltip,
|
|
2532
2594
|
style: M,
|
|
2533
2595
|
children: e
|
|
2534
2596
|
}) });
|
|
2535
2597
|
return v ? /* @__PURE__ */ n(r, { children: [R, z] }) : /* @__PURE__ */ n("span", {
|
|
2536
2598
|
ref: D,
|
|
2537
|
-
className: `${
|
|
2599
|
+
className: `${wn.root} ${_}`,
|
|
2538
2600
|
onPointerDown: b ? A : j,
|
|
2539
2601
|
onPointerMove: L,
|
|
2540
2602
|
children: [R, z]
|
|
@@ -2603,25 +2665,25 @@ var U = {
|
|
|
2603
2665
|
default: "_default_h5fab_1183",
|
|
2604
2666
|
tableOnMobile: "_tableOnMobile_h5fab_1183",
|
|
2605
2667
|
wide: "_wide_h5fab_1213"
|
|
2606
|
-
},
|
|
2668
|
+
}, On = b({
|
|
2607
2669
|
rowSortingFeature: y,
|
|
2608
2670
|
sortedRowModel: v()
|
|
2609
|
-
}),
|
|
2671
|
+
}), kn = [
|
|
2610
2672
|
10,
|
|
2611
2673
|
30,
|
|
2612
2674
|
50,
|
|
2613
2675
|
-1
|
|
2614
|
-
],
|
|
2615
|
-
function
|
|
2676
|
+
], An = 30, jn = 8;
|
|
2677
|
+
function Mn(e, t) {
|
|
2616
2678
|
return t.includes(e) ? e : t.includes(30) ? 30 : t.find((e) => Number.isSafeInteger(e) && e > 0) ?? 30;
|
|
2617
2679
|
}
|
|
2618
|
-
function
|
|
2619
|
-
return e === void 0 || !Number.isFinite(e) || e <= 0 ?
|
|
2680
|
+
function Nn(e) {
|
|
2681
|
+
return e === void 0 || !Number.isFinite(e) || e <= 0 ? An : Math.max(1, Math.floor(e));
|
|
2620
2682
|
}
|
|
2621
|
-
var
|
|
2683
|
+
var Pn = ({ config: e, row: n, children: r }) => {
|
|
2622
2684
|
if (!e) return r;
|
|
2623
2685
|
let i = e.content(n);
|
|
2624
|
-
return i ? /* @__PURE__ */ t(
|
|
2686
|
+
return i ? /* @__PURE__ */ t(Dn, {
|
|
2625
2687
|
asChild: !0,
|
|
2626
2688
|
content: i,
|
|
2627
2689
|
placement: e.placement ?? "bottom",
|
|
@@ -2630,7 +2692,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2630
2692
|
maxWidth: e.maxWidth,
|
|
2631
2693
|
children: r
|
|
2632
2694
|
}) : r;
|
|
2633
|
-
},
|
|
2695
|
+
}, Fn = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2634
2696
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2635
2697
|
return d(() => {
|
|
2636
2698
|
if (o === void 0) return;
|
|
@@ -2646,7 +2708,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2646
2708
|
}), () => {
|
|
2647
2709
|
e = !1;
|
|
2648
2710
|
};
|
|
2649
|
-
}, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(
|
|
2711
|
+
}, [o]), e.type === "multi-select" ? /* @__PURE__ */ t(cn, {
|
|
2650
2712
|
label: e.label,
|
|
2651
2713
|
options: s,
|
|
2652
2714
|
value: Array.isArray(n) ? n.map(String) : [],
|
|
@@ -2654,7 +2716,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2654
2716
|
placeholder: l ? "Загрузка…" : e.placeholder,
|
|
2655
2717
|
error: a,
|
|
2656
2718
|
onChange: (e) => r(e)
|
|
2657
|
-
}) : e.type === "switch" ? /* @__PURE__ */ t(
|
|
2719
|
+
}) : e.type === "switch" ? /* @__PURE__ */ t(un, {
|
|
2658
2720
|
label: e.label,
|
|
2659
2721
|
checked: !!n,
|
|
2660
2722
|
disabled: i,
|
|
@@ -2664,7 +2726,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2664
2726
|
setValue: r,
|
|
2665
2727
|
disabled: i,
|
|
2666
2728
|
error: a
|
|
2667
|
-
}) : /* @__PURE__ */ t(
|
|
2729
|
+
}) : /* @__PURE__ */ t(nn, {
|
|
2668
2730
|
label: e.label,
|
|
2669
2731
|
type: "text",
|
|
2670
2732
|
value: String(n ?? ""),
|
|
@@ -2673,20 +2735,20 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2673
2735
|
error: a,
|
|
2674
2736
|
onChange: (e) => r(e)
|
|
2675
2737
|
});
|
|
2676
|
-
},
|
|
2738
|
+
}, In = (e, t, n) => {
|
|
2677
2739
|
let r = new Set(e);
|
|
2678
2740
|
return t.forEach((e) => {
|
|
2679
2741
|
n ? r.add(e) : r.delete(e);
|
|
2680
2742
|
}), Array.from(r);
|
|
2681
|
-
},
|
|
2743
|
+
}, Ln = (e) => {
|
|
2682
2744
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2683
2745
|
width: e.width,
|
|
2684
2746
|
minWidth: e.minWidth,
|
|
2685
2747
|
maxWidth: e.maxWidth
|
|
2686
2748
|
};
|
|
2687
|
-
},
|
|
2749
|
+
}, Rn = (e) => {
|
|
2688
2750
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2689
|
-
},
|
|
2751
|
+
}, zn = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2690
2752
|
0,
|
|
2691
2753
|
1,
|
|
2692
2754
|
2,
|
|
@@ -2710,7 +2772,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2710
2772
|
e + 1,
|
|
2711
2773
|
"ellipsis-end",
|
|
2712
2774
|
t - 1
|
|
2713
|
-
],
|
|
2775
|
+
], Bn = (e, t) => {
|
|
2714
2776
|
let n = /* @__PURE__ */ new Set();
|
|
2715
2777
|
for (let t of e) {
|
|
2716
2778
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2722,36 +2784,36 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2722
2784
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2723
2785
|
}
|
|
2724
2786
|
return null;
|
|
2725
|
-
},
|
|
2787
|
+
}, Vn = (e, t) => typeof e == "function" ? e(t) : t[e], Hn = (e) => {
|
|
2726
2788
|
if (e == null || e === "") return null;
|
|
2727
2789
|
let t = Date.parse(String(e));
|
|
2728
2790
|
return Number.isNaN(t) ? null : t;
|
|
2729
|
-
},
|
|
2730
|
-
let r =
|
|
2791
|
+
}, Un = (e, t, n) => {
|
|
2792
|
+
let r = Hn(e.getValue(n)), i = Hn(t.getValue(n));
|
|
2731
2793
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2732
|
-
},
|
|
2794
|
+
}, Wn = (e, t, n) => {
|
|
2733
2795
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2734
2796
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2735
|
-
},
|
|
2797
|
+
}, Gn = (e, t, n) => {
|
|
2736
2798
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2737
2799
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2738
|
-
},
|
|
2800
|
+
}, Kn = (e, t, n) => {
|
|
2739
2801
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2740
2802
|
return r.localeCompare(i, void 0, {
|
|
2741
2803
|
numeric: !0,
|
|
2742
2804
|
sensitivity: "base"
|
|
2743
2805
|
});
|
|
2744
|
-
},
|
|
2806
|
+
}, qn = (e) => {
|
|
2745
2807
|
switch (e) {
|
|
2746
|
-
case "date": return
|
|
2747
|
-
case "number": return
|
|
2748
|
-
case "boolean": return
|
|
2808
|
+
case "date": return Un;
|
|
2809
|
+
case "number": return Wn;
|
|
2810
|
+
case "boolean": return Gn;
|
|
2749
2811
|
case "text":
|
|
2750
|
-
case void 0: return
|
|
2812
|
+
case void 0: return Kn;
|
|
2751
2813
|
case "custom": return;
|
|
2752
2814
|
}
|
|
2753
|
-
},
|
|
2754
|
-
let t = (t) =>
|
|
2815
|
+
}, Jn = (e) => {
|
|
2816
|
+
let t = (t) => Vn(e.accessor, t), n = e.sortFn ?? qn(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2755
2817
|
id: e.id,
|
|
2756
2818
|
accessorFn: t,
|
|
2757
2819
|
header: () => e.header,
|
|
@@ -2763,13 +2825,13 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2763
2825
|
sortDescFirst: e.sortDescFirst
|
|
2764
2826
|
};
|
|
2765
2827
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2766
|
-
},
|
|
2767
|
-
let [ge, _e] = g([]), [ve, ye] = g([]), [be, xe] = g([]), [Se, Ce] = g(0), [we, Te] = g(() =>
|
|
2828
|
+
}, Yn = ({ columns: i, data: a, virtualizationThreshold: o = An, tableOnMobile: s = !1, mobileView: c, breakpoint: l = "default", sorting: u, onSortingChange: f, renderMobileCard: p, getRowId: _, getRowClassName: v, getRowStyle: y, toolbarContent: b, totalCountVariant: S = "default", totalCountLabel: C = "Всего", caption: w, ariaLabel: T, loading: E = !1, error: D, emptyState: O = "Нет данных", stickyHeader: k = !1, maxHeight: A, className: j = "", onRowClick: M, selectable: N = !1, selectedRowIds: P, onSelectedRowIdsChange: F, onRowDoubleClick: I, getRowSelectionLabel: L, selectAllRowsLabel: R = "Выбрать все строки на этой странице", resetSelectionLabel: z = "Сбросить выбор", showResetSelectionControl: ee = !0, openRowLabel: te = "Открыть строку", rowTooltip: B, pagination: V = !1, paginationMode: ne = "client", page: U = 1, pageSize: W = 30, onPageSizeChange: re, pageSizeOptions: G = kn, pageSizeDraft: ie, onPageSizeDraftChange: ae, pageSizeApplyMode: oe = "table", totalCount: se, onPageChange: K, visibleColumnIds: ce, density: le = "comfortable", renderBulkActions: ue, renderExpandedRow: de, expandedRowIds: fe, onExpandedRowIdsChange: pe, getRowExpansionLabel: me, resultsAnnouncement: he, filterBar: q }) => {
|
|
2829
|
+
let [ge, _e] = g([]), [ve, ye] = g([]), [be, xe] = g([]), [Se, Ce] = g(0), [we, Te] = g(() => Mn(W, G)), Ee = Nn(o), De = u ?? ge, Oe = De.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), ke = W === -1, Ae = ke ? Math.max(1, (ne === "server" ? Number(se) : a.length) || a.length || 1) : Number.isFinite(W) && W > 0 ? Math.floor(W) : 30, je = V && ne === "server", Me = m(() => {
|
|
2768
2830
|
if (ce === void 0) return i;
|
|
2769
2831
|
let e = new Set(ce);
|
|
2770
2832
|
return i.filter((t) => e.has(t.id));
|
|
2771
|
-
}, [i, ce]), Ne = m(() => Me.length === 0 ? "Должна быть видима хотя бы одна колонка" :
|
|
2772
|
-
features:
|
|
2833
|
+
}, [i, ce]), Ne = m(() => Me.length === 0 ? "Должна быть видима хотя бы одна колонка" : Bn(Me, a), [a, Me]), Pe = m(() => Me.map(Jn), [Me]), Fe = Me.some((e) => Ln(e) !== void 0), Ie = x({
|
|
2834
|
+
features: On,
|
|
2773
2835
|
columns: Pe,
|
|
2774
2836
|
data: a,
|
|
2775
2837
|
state: { sorting: De },
|
|
@@ -2808,7 +2870,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2808
2870
|
context: We,
|
|
2809
2871
|
count: Ee
|
|
2810
2872
|
});
|
|
2811
|
-
let Je = m(() => He.slice(0, qe), [He, qe]), J = Ue && qe < He.length, Ye = J ? Math.max(0, Je.length -
|
|
2873
|
+
let Je = m(() => He.slice(0, qe), [He, qe]), J = Ue && qe < He.length, Ye = J ? Math.max(0, Je.length - jn) : -1, Xe = h(/* @__PURE__ */ new Map()), Ze = h(/* @__PURE__ */ new Map());
|
|
2812
2874
|
d(() => {
|
|
2813
2875
|
if (!J || E || Ne || D) return;
|
|
2814
2876
|
let e = [...Xe.current.values(), ...Ze.current.values()], t = !0, n = new IntersectionObserver((e) => {
|
|
@@ -2838,10 +2900,10 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2838
2900
|
s,
|
|
2839
2901
|
p
|
|
2840
2902
|
]);
|
|
2841
|
-
let
|
|
2903
|
+
let Qe = P ?? ve, $e = m(() => new Set(Qe), [Qe]), et = fe ?? be, tt = m(() => new Set(et), [et]), nt = m(() => He.map((e) => e.id), [He]), rt = nt.filter((e) => $e.has(e)).length, it = nt.length > 0 && rt === nt.length, at = rt > 0 && !it, ot = m(() => Me.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2842
2904
|
id: e.id,
|
|
2843
2905
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2844
|
-
})), [Me]), st = m(() =>
|
|
2906
|
+
})), [Me]), st = m(() => zn(Ve, ze), [ze, Ve]), ct = c === void 0 ? s : c === "table", lt = [
|
|
2845
2907
|
Q.root,
|
|
2846
2908
|
l === "wide" ? Q.wide : Q.default,
|
|
2847
2909
|
ct ? Q.tableOnMobile : "",
|
|
@@ -2916,7 +2978,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2916
2978
|
})
|
|
2917
2979
|
]
|
|
2918
2980
|
});
|
|
2919
|
-
},
|
|
2981
|
+
}, X = (e) => {
|
|
2920
2982
|
let t = Math.max(0, Math.min(ze - 1, e));
|
|
2921
2983
|
if (je) {
|
|
2922
2984
|
t !== Ve && K?.(t + 1);
|
|
@@ -2926,11 +2988,11 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2926
2988
|
}, St = (e) => {
|
|
2927
2989
|
let t = Array.from(e);
|
|
2928
2990
|
P === void 0 && ye(t), F?.(t);
|
|
2929
|
-
},
|
|
2991
|
+
}, Ct = (e) => {
|
|
2930
2992
|
let t = new Set($e);
|
|
2931
2993
|
t.has(e) ? t.delete(e) : t.add(e), St(t);
|
|
2932
2994
|
}, wt = () => {
|
|
2933
|
-
let e =
|
|
2995
|
+
let e = In($e, nt, !it);
|
|
2934
2996
|
P === void 0 && ye(e), F?.(e);
|
|
2935
2997
|
}, Tt = () => St(/* @__PURE__ */ new Set()), Et = (e) => {
|
|
2936
2998
|
let t = new Set(tt);
|
|
@@ -2957,7 +3019,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2957
3019
|
ze,
|
|
2958
3020
|
Se
|
|
2959
3021
|
]), d(() => {
|
|
2960
|
-
Te(
|
|
3022
|
+
Te(Mn(W, G));
|
|
2961
3023
|
}, [W, G]);
|
|
2962
3024
|
let kt = q && ft ? bt("top", !0, q.footerLayout === "inline") : null, At = q ? /* @__PURE__ */ n("div", {
|
|
2963
3025
|
className: Q.filterActions,
|
|
@@ -2980,7 +3042,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2980
3042
|
disabled: !ht || gt || E,
|
|
2981
3043
|
children: q.applyLabel ?? "Применить"
|
|
2982
3044
|
})]
|
|
2983
|
-
}) : null,
|
|
3045
|
+
}) : null, jt = q ? /* @__PURE__ */ n("form", {
|
|
2984
3046
|
className: `${Q.filterBar} ${q.collapsible ? Q.filterBarEmbedded : ""}`,
|
|
2985
3047
|
role: "search",
|
|
2986
3048
|
"aria-label": "Фильтры таблицы",
|
|
@@ -2992,7 +3054,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
2992
3054
|
},
|
|
2993
3055
|
children: [/* @__PURE__ */ t("div", {
|
|
2994
3056
|
className: Q.filterFields,
|
|
2995
|
-
children: q.fields.map((e) => /* @__PURE__ */ t(
|
|
3057
|
+
children: q.fields.map((e) => /* @__PURE__ */ t(Fn, {
|
|
2996
3058
|
field: e,
|
|
2997
3059
|
value: q.draftValues[e.key],
|
|
2998
3060
|
disabled: !!(e.disabled || q.applying || E),
|
|
@@ -3006,14 +3068,14 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3006
3068
|
className: Q.filterFooter,
|
|
3007
3069
|
children: [kt, At]
|
|
3008
3070
|
}) : /* @__PURE__ */ n(e, { children: [kt, At] })]
|
|
3009
|
-
}) : null,
|
|
3071
|
+
}) : null, Mt = q?.collapsible ? /* @__PURE__ */ t(pn, {
|
|
3010
3072
|
title: q.collapsible.title ?? "Фильтры",
|
|
3011
3073
|
defaultOpen: q.collapsible.defaultOpen,
|
|
3012
3074
|
autoScrollOnOpen: q.collapsible.autoScrollOnOpen,
|
|
3013
3075
|
scrollOffset: q.collapsible.scrollOffset,
|
|
3014
3076
|
className: Q.filterAccordion,
|
|
3015
|
-
children:
|
|
3016
|
-
}) :
|
|
3077
|
+
children: jt
|
|
3078
|
+
}) : jt;
|
|
3017
3079
|
return /* @__PURE__ */ n("section", {
|
|
3018
3080
|
className: lt,
|
|
3019
3081
|
"aria-busy": E,
|
|
@@ -3034,7 +3096,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3034
3096
|
clearSelection: Tt
|
|
3035
3097
|
})
|
|
3036
3098
|
}),
|
|
3037
|
-
|
|
3099
|
+
Mt,
|
|
3038
3100
|
ft && !q && bt("top"),
|
|
3039
3101
|
(S === "highlighted" || b != null) && /* @__PURE__ */ n("div", {
|
|
3040
3102
|
className: Q.toolbar,
|
|
@@ -3050,7 +3112,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3050
3112
|
})]
|
|
3051
3113
|
}), b]
|
|
3052
3114
|
}),
|
|
3053
|
-
!ct && !E && !ut && He.length > 0 && ot.length > 0 && /* @__PURE__ */ t(
|
|
3115
|
+
!ct && !E && !ut && He.length > 0 && ot.length > 0 && /* @__PURE__ */ t(en, {
|
|
3054
3116
|
className: Q.mobileSort,
|
|
3055
3117
|
options: ot,
|
|
3056
3118
|
value: De[0] ? {
|
|
@@ -3073,7 +3135,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3073
3135
|
(Fe || N || !!de) && /* @__PURE__ */ n("colgroup", { children: [
|
|
3074
3136
|
de && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
|
|
3075
3137
|
N && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
|
|
3076
|
-
Me.map((e) => /* @__PURE__ */ t("col", { style:
|
|
3138
|
+
Me.map((e) => /* @__PURE__ */ t("col", { style: Ln(e) }, e.id))
|
|
3077
3139
|
] }),
|
|
3078
3140
|
/* @__PURE__ */ t("thead", {
|
|
3079
3141
|
className: k ? Q.sticky : "",
|
|
@@ -3091,7 +3153,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3091
3153
|
scope: "col",
|
|
3092
3154
|
children: /* @__PURE__ */ n("div", {
|
|
3093
3155
|
className: Q.selectionHeaderControls,
|
|
3094
|
-
children: [/* @__PURE__ */ t(
|
|
3156
|
+
children: [/* @__PURE__ */ t(xt, {
|
|
3095
3157
|
checked: it,
|
|
3096
3158
|
indeterminate: at,
|
|
3097
3159
|
disabled: E || nt.length === 0,
|
|
@@ -3119,8 +3181,8 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3119
3181
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
3120
3182
|
className: o?.sticky ? Q.stickyColumn : void 0,
|
|
3121
3183
|
style: {
|
|
3122
|
-
...
|
|
3123
|
-
...
|
|
3184
|
+
...Ln(o),
|
|
3185
|
+
...Rn(o)
|
|
3124
3186
|
},
|
|
3125
3187
|
children: /* @__PURE__ */ n("button", {
|
|
3126
3188
|
type: "button",
|
|
@@ -3139,7 +3201,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3139
3201
|
}),
|
|
3140
3202
|
/* @__PURE__ */ t("tbody", { children: E ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
3141
3203
|
colSpan: Me.length + +!!N + +!!de,
|
|
3142
|
-
children: /* @__PURE__ */ t(
|
|
3204
|
+
children: /* @__PURE__ */ t(Kt, {
|
|
3143
3205
|
lines: 3,
|
|
3144
3206
|
height: 65
|
|
3145
3207
|
})
|
|
@@ -3153,7 +3215,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3153
3215
|
children: O
|
|
3154
3216
|
}) }) : /* @__PURE__ */ t(e, { children: Je.map((e, i) => {
|
|
3155
3217
|
let a = $e.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = tt.has(e.id);
|
|
3156
|
-
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ t(
|
|
3218
|
+
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ t(Pn, {
|
|
3157
3219
|
config: B,
|
|
3158
3220
|
row: e.original,
|
|
3159
3221
|
children: /* @__PURE__ */ n("tr", {
|
|
@@ -3168,13 +3230,13 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3168
3230
|
style: y?.(e.original),
|
|
3169
3231
|
"aria-selected": N ? a : void 0,
|
|
3170
3232
|
onClick: () => {
|
|
3171
|
-
N ?
|
|
3233
|
+
N ? Ct(e.id) : M?.(e.original);
|
|
3172
3234
|
},
|
|
3173
3235
|
onDoubleClick: () => {
|
|
3174
3236
|
N && I?.(e.original);
|
|
3175
3237
|
},
|
|
3176
3238
|
onKeyDown: (t) => {
|
|
3177
|
-
t.key === "Enter" ? (t.preventDefault(), N ? I?.(e.original) : M?.(e.original)) : t.key === " " && N && (t.preventDefault(),
|
|
3239
|
+
t.key === "Enter" ? (t.preventDefault(), N ? I?.(e.original) : M?.(e.original)) : t.key === " " && N && (t.preventDefault(), Ct(e.id));
|
|
3178
3240
|
},
|
|
3179
3241
|
tabIndex: M || N || I || B ? 0 : void 0,
|
|
3180
3242
|
role: !N && M ? "button" : void 0,
|
|
@@ -3200,10 +3262,10 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3200
3262
|
className: Q.selectionCell,
|
|
3201
3263
|
children: /* @__PURE__ */ t("div", {
|
|
3202
3264
|
onClick: (e) => e.stopPropagation(),
|
|
3203
|
-
children: /* @__PURE__ */ t(
|
|
3265
|
+
children: /* @__PURE__ */ t(xt, {
|
|
3204
3266
|
checked: a,
|
|
3205
3267
|
ariaLabel: o,
|
|
3206
|
-
onChange: () =>
|
|
3268
|
+
onChange: () => Ct(e.id)
|
|
3207
3269
|
})
|
|
3208
3270
|
})
|
|
3209
3271
|
}),
|
|
@@ -3212,8 +3274,8 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3212
3274
|
return /* @__PURE__ */ t("td", {
|
|
3213
3275
|
className: n?.sticky ? Q.stickyColumn : void 0,
|
|
3214
3276
|
style: {
|
|
3215
|
-
...
|
|
3216
|
-
...
|
|
3277
|
+
...Ln(n),
|
|
3278
|
+
...Rn(n)
|
|
3217
3279
|
},
|
|
3218
3280
|
children: /* @__PURE__ */ t(Ie.FlexRender, { cell: e })
|
|
3219
3281
|
}, e.id);
|
|
@@ -3241,7 +3303,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3241
3303
|
"aria-label": T ?? w,
|
|
3242
3304
|
children: [N && !E && !ut && He.length > 0 && /* @__PURE__ */ n("div", {
|
|
3243
3305
|
className: Q.mobileSelectionControls,
|
|
3244
|
-
children: [/* @__PURE__ */ t(
|
|
3306
|
+
children: [/* @__PURE__ */ t(xt, {
|
|
3245
3307
|
checked: it,
|
|
3246
3308
|
indeterminate: at,
|
|
3247
3309
|
ariaLabel: R,
|
|
@@ -3254,7 +3316,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3254
3316
|
onClick: Tt,
|
|
3255
3317
|
children: z
|
|
3256
3318
|
})]
|
|
3257
|
-
}), E ? /* @__PURE__ */ t(
|
|
3319
|
+
}), E ? /* @__PURE__ */ t(Kt, {
|
|
3258
3320
|
lines: 4,
|
|
3259
3321
|
height: 65
|
|
3260
3322
|
}) : ut ? /* @__PURE__ */ t("div", {
|
|
@@ -3267,10 +3329,10 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3267
3329
|
let i = $e.has(e.id), a = tt.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = N && /* @__PURE__ */ n("div", {
|
|
3268
3330
|
className: Q.cardSelectionControls,
|
|
3269
3331
|
onClick: (e) => e.stopPropagation(),
|
|
3270
|
-
children: [/* @__PURE__ */ t(
|
|
3332
|
+
children: [/* @__PURE__ */ t(xt, {
|
|
3271
3333
|
checked: i,
|
|
3272
3334
|
ariaLabel: o,
|
|
3273
|
-
onChange: () =>
|
|
3335
|
+
onChange: () => Ct(e.id)
|
|
3274
3336
|
}), I && /* @__PURE__ */ t(H, {
|
|
3275
3337
|
size: "sm",
|
|
3276
3338
|
variant: "empty",
|
|
@@ -3305,7 +3367,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3305
3367
|
style: y?.(e.original),
|
|
3306
3368
|
"aria-selected": N ? i : void 0,
|
|
3307
3369
|
onClick: () => {
|
|
3308
|
-
N &&
|
|
3370
|
+
N && Ct(e.id);
|
|
3309
3371
|
},
|
|
3310
3372
|
children: [
|
|
3311
3373
|
s,
|
|
@@ -3324,7 +3386,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3324
3386
|
})
|
|
3325
3387
|
]
|
|
3326
3388
|
}, e.id);
|
|
3327
|
-
let l = Me.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), u = l.find((e) => e.mobile?.primary) ?? l.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) =>
|
|
3389
|
+
let l = Me.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), u = l.find((e) => e.mobile?.primary) ?? l.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => Vn(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
3328
3390
|
return /* @__PURE__ */ n("article", {
|
|
3329
3391
|
ref: Ye >= 0 && r >= Ye ? (e) => {
|
|
3330
3392
|
e ? Ze.current.set(r, e) : Ze.current.delete(r);
|
|
@@ -3338,7 +3400,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3338
3400
|
style: y?.(e.original),
|
|
3339
3401
|
"aria-selected": N ? i : void 0,
|
|
3340
3402
|
onClick: () => {
|
|
3341
|
-
N &&
|
|
3403
|
+
N && Ct(e.id);
|
|
3342
3404
|
},
|
|
3343
3405
|
children: [
|
|
3344
3406
|
s,
|
|
@@ -3384,7 +3446,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3384
3446
|
disabled: E || Ve === 0,
|
|
3385
3447
|
"aria-label": "Предыдущая страница",
|
|
3386
3448
|
onClick: () => {
|
|
3387
|
-
|
|
3449
|
+
X(Ve - 1);
|
|
3388
3450
|
},
|
|
3389
3451
|
children: [/* @__PURE__ */ t(Y, {
|
|
3390
3452
|
name: "IconChevron",
|
|
@@ -3406,7 +3468,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3406
3468
|
"aria-current": e === Ve ? "page" : void 0,
|
|
3407
3469
|
disabled: E,
|
|
3408
3470
|
onClick: () => {
|
|
3409
|
-
|
|
3471
|
+
X(e);
|
|
3410
3472
|
},
|
|
3411
3473
|
children: e + 1
|
|
3412
3474
|
}, e) : /* @__PURE__ */ t("span", {
|
|
@@ -3421,7 +3483,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3421
3483
|
disabled: E || Ve === ze - 1,
|
|
3422
3484
|
"aria-label": "Следующая страница",
|
|
3423
3485
|
onClick: () => {
|
|
3424
|
-
|
|
3486
|
+
X(Ve + 1);
|
|
3425
3487
|
},
|
|
3426
3488
|
children: [/* @__PURE__ */ t("span", {
|
|
3427
3489
|
className: Q.paginationButtonLabel,
|
|
@@ -3438,17 +3500,17 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3438
3500
|
})
|
|
3439
3501
|
]
|
|
3440
3502
|
});
|
|
3441
|
-
},
|
|
3503
|
+
}, Xn = (e, t) => {
|
|
3442
3504
|
let n = t.trim().toLocaleLowerCase();
|
|
3443
3505
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
3444
|
-
},
|
|
3506
|
+
}, Zn = (e, t, n) => {
|
|
3445
3507
|
if (!e.length) return -1;
|
|
3446
3508
|
for (let r = 0; r < e.length; r += 1) {
|
|
3447
3509
|
let i = (t + r * n + e.length) % e.length;
|
|
3448
3510
|
if (!e[i]?.disabled) return i;
|
|
3449
3511
|
}
|
|
3450
3512
|
return -1;
|
|
3451
|
-
},
|
|
3513
|
+
}, Qn = {
|
|
3452
3514
|
wrapper: "_wrapper_1os84_1",
|
|
3453
3515
|
control: "_control_1os84_17",
|
|
3454
3516
|
inputHost: "_inputHost_1os84_25",
|
|
@@ -3467,23 +3529,23 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3467
3529
|
active: "_active_1os84_321",
|
|
3468
3530
|
actionOption: "_actionOption_1os84_341",
|
|
3469
3531
|
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
3470
|
-
},
|
|
3532
|
+
}, $n = 8, er = 6, tr = 5, nr = 10, rr = {
|
|
3471
3533
|
sm: 30,
|
|
3472
3534
|
md: 40,
|
|
3473
3535
|
lg: 50
|
|
3474
|
-
},
|
|
3536
|
+
}, ir = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: E = !0 }) => {
|
|
3475
3537
|
let D = f(), O = T ?? `ds-search-dropdown-${w ?? D}`, k = `${O}-listbox`, A = `${O}-status`, j = b ? `${O}-hint` : void 0, M = y ? `${O}-error` : void 0, N = [
|
|
3476
3538
|
A,
|
|
3477
3539
|
j,
|
|
3478
3540
|
M
|
|
3479
|
-
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, ee] = g(""), [te, B] = g(-1), [V, ne] = g(null), H = m(() => e.find((e) => e.value === r), [e, r]), U = m(() =>
|
|
3541
|
+
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, ee] = g(""), [te, B] = g(-1), [V, ne] = g(null), H = m(() => e.find((e) => e.value === r), [e, r]), U = m(() => Xn(e, z), [e, z]), G = s && u, ie = te >= 0 ? U[te] : void 0;
|
|
3480
3542
|
d(() => ee(H?.label ?? ""), [H?.label, r]);
|
|
3481
|
-
let ae = l(() => P.current?.querySelector("input") ?? null, []), oe = l((e, t) =>
|
|
3543
|
+
let ae = l(() => P.current?.querySelector("input") ?? null, []), oe = l((e, t) => Zn(U, e, t), [U]), se = l((e) => {
|
|
3482
3544
|
B(e), !(e < 0) && requestAnimationFrame(() => I.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
3483
3545
|
}, []), K = l(() => {
|
|
3484
3546
|
let e = ae();
|
|
3485
3547
|
if (!e) return;
|
|
3486
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(U.length,
|
|
3548
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(U.length, tr)) * rr[x] + nr, r = window.innerHeight - t.bottom - $n, i = t.top - $n, a = r < n && i > r, o = a ? i : r, s = Math.max(rr[x] + nr, Math.min(n, o)), c = window.innerWidth - t.width - $n, l = Math.max($n, Math.min(t.left, c)), u = a ? Math.max($n, t.top - s - er) : t.bottom + er;
|
|
3487
3549
|
ne({
|
|
3488
3550
|
top: u,
|
|
3489
3551
|
left: l,
|
|
@@ -3518,7 +3580,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3518
3580
|
}, ue = L ? /* @__PURE__ */ t("ul", {
|
|
3519
3581
|
ref: F,
|
|
3520
3582
|
id: k,
|
|
3521
|
-
className: `${
|
|
3583
|
+
className: `${Qn.menu} ${U.length === 0 ? Qn.menuEmpty : ""}`,
|
|
3522
3584
|
role: "listbox",
|
|
3523
3585
|
"aria-label": v,
|
|
3524
3586
|
style: V ? {
|
|
@@ -3533,7 +3595,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3533
3595
|
maxHeight: 0
|
|
3534
3596
|
},
|
|
3535
3597
|
children: U.length === 0 ? /* @__PURE__ */ t("li", {
|
|
3536
|
-
className: `${
|
|
3598
|
+
className: `${Qn.empty} ${Qn[x]}`,
|
|
3537
3599
|
children: o
|
|
3538
3600
|
}) : U.map((e, i) => {
|
|
3539
3601
|
let a = e.value === r, o = i === te;
|
|
@@ -3552,11 +3614,11 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3552
3614
|
"aria-selected": a,
|
|
3553
3615
|
"data-option-variant": e.variant ?? "default",
|
|
3554
3616
|
className: [
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
e.variant === "action" ?
|
|
3558
|
-
a ?
|
|
3559
|
-
o ?
|
|
3617
|
+
Qn.option,
|
|
3618
|
+
Qn[x],
|
|
3619
|
+
e.variant === "action" ? Qn.actionOption : "",
|
|
3620
|
+
a ? Qn.selected : "",
|
|
3621
|
+
o ? Qn.active : ""
|
|
3560
3622
|
].filter(Boolean).join(" "),
|
|
3561
3623
|
onPointerMove: () => {
|
|
3562
3624
|
e.disabled || B(i);
|
|
@@ -3574,8 +3636,8 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3574
3636
|
return /* @__PURE__ */ n("div", {
|
|
3575
3637
|
ref: P,
|
|
3576
3638
|
className: [
|
|
3577
|
-
|
|
3578
|
-
y ?
|
|
3639
|
+
Qn.wrapper,
|
|
3640
|
+
y ? Qn.errorState : "",
|
|
3579
3641
|
C
|
|
3580
3642
|
].filter(Boolean).join(" "),
|
|
3581
3643
|
children: [
|
|
@@ -3586,11 +3648,11 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3586
3648
|
children: v
|
|
3587
3649
|
}),
|
|
3588
3650
|
G ? /* @__PURE__ */ t("div", {
|
|
3589
|
-
className: `${
|
|
3651
|
+
className: `${Qn.disabledText} ${Qn[x]}`,
|
|
3590
3652
|
children: H?.label ?? a
|
|
3591
3653
|
}) : /* @__PURE__ */ n("div", {
|
|
3592
|
-
className:
|
|
3593
|
-
children: [/* @__PURE__ */ t(
|
|
3654
|
+
className: Qn.control,
|
|
3655
|
+
children: [/* @__PURE__ */ t(nn, {
|
|
3594
3656
|
id: O,
|
|
3595
3657
|
name: w,
|
|
3596
3658
|
value: z,
|
|
@@ -3601,11 +3663,11 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3601
3663
|
size: x,
|
|
3602
3664
|
clearable: !1,
|
|
3603
3665
|
autoComplete: "off",
|
|
3604
|
-
className: `${
|
|
3666
|
+
className: `${Qn.inputHost} ${Qn[x]}`,
|
|
3605
3667
|
onFocus: ce,
|
|
3606
3668
|
onChange: (t) => {
|
|
3607
|
-
let n = String(t), r =
|
|
3608
|
-
ee(n), R(!0), B(
|
|
3669
|
+
let n = String(t), r = Xn(e, n);
|
|
3670
|
+
ee(n), R(!0), B(Zn(r, 0, 1));
|
|
3609
3671
|
},
|
|
3610
3672
|
role: "combobox",
|
|
3611
3673
|
"aria-autocomplete": "list",
|
|
@@ -3630,7 +3692,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3630
3692
|
}
|
|
3631
3693
|
}
|
|
3632
3694
|
}), /* @__PURE__ */ t("span", {
|
|
3633
|
-
className: `${
|
|
3695
|
+
className: `${Qn.chevron} ${L ? Qn.chevronOpen : ""}`,
|
|
3634
3696
|
"aria-hidden": "true",
|
|
3635
3697
|
children: /* @__PURE__ */ t(Y, {
|
|
3636
3698
|
name: "IconChevron",
|
|
@@ -3642,7 +3704,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3642
3704
|
L && typeof document < "u" && _(ue, document.body),
|
|
3643
3705
|
/* @__PURE__ */ n("span", {
|
|
3644
3706
|
id: A,
|
|
3645
|
-
className:
|
|
3707
|
+
className: Qn.visuallyHidden,
|
|
3646
3708
|
"aria-live": "polite",
|
|
3647
3709
|
children: ["Найдено вариантов: ", U.length]
|
|
3648
3710
|
}),
|
|
@@ -3657,25 +3719,25 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3657
3719
|
})
|
|
3658
3720
|
]
|
|
3659
3721
|
});
|
|
3660
|
-
},
|
|
3722
|
+
}, ar = {
|
|
3661
3723
|
root: "_root_11adi_1",
|
|
3662
3724
|
header: "_header_11adi_21",
|
|
3663
3725
|
title: "_title_11adi_41",
|
|
3664
3726
|
dismiss: "_dismiss_11adi_55",
|
|
3665
3727
|
content: "_content_11adi_65"
|
|
3666
|
-
},
|
|
3728
|
+
}, or = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
3667
3729
|
let l = `ds-info-block-${f()}`;
|
|
3668
3730
|
return /* @__PURE__ */ n("section", {
|
|
3669
|
-
className: `${
|
|
3731
|
+
className: `${ar.root} ${c}`,
|
|
3670
3732
|
"aria-labelledby": l,
|
|
3671
3733
|
children: [/* @__PURE__ */ n("header", {
|
|
3672
|
-
className:
|
|
3734
|
+
className: ar.header,
|
|
3673
3735
|
children: [/* @__PURE__ */ t(s, {
|
|
3674
3736
|
id: l,
|
|
3675
|
-
className:
|
|
3737
|
+
className: ar.title,
|
|
3676
3738
|
children: e
|
|
3677
3739
|
}), i && /* @__PURE__ */ t(H, {
|
|
3678
|
-
className:
|
|
3740
|
+
className: ar.dismiss,
|
|
3679
3741
|
variant: "empty",
|
|
3680
3742
|
onClick: a,
|
|
3681
3743
|
"aria-label": o,
|
|
@@ -3686,15 +3748,15 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3686
3748
|
})
|
|
3687
3749
|
})]
|
|
3688
3750
|
}), /* @__PURE__ */ t("div", {
|
|
3689
|
-
className:
|
|
3751
|
+
className: ar.content,
|
|
3690
3752
|
children: r
|
|
3691
3753
|
})]
|
|
3692
3754
|
});
|
|
3693
|
-
},
|
|
3755
|
+
}, sr = {
|
|
3694
3756
|
root: "_root_1ecm3_1",
|
|
3695
3757
|
grid: "_grid_1ecm3_13",
|
|
3696
3758
|
actions: "_actions_1ecm3_27"
|
|
3697
|
-
},
|
|
3759
|
+
}, cr = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
3698
3760
|
let d = (e, t) => {
|
|
3699
3761
|
let n = {
|
|
3700
3762
|
...r,
|
|
@@ -3703,11 +3765,11 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3703
3765
|
i?.(n, e), s === "instant" && a?.(n);
|
|
3704
3766
|
};
|
|
3705
3767
|
return /* @__PURE__ */ n("section", {
|
|
3706
|
-
className: `${
|
|
3768
|
+
className: `${sr.root} ${u}`,
|
|
3707
3769
|
"aria-label": "Фильтры",
|
|
3708
3770
|
"aria-busy": c,
|
|
3709
3771
|
children: [/* @__PURE__ */ t("div", {
|
|
3710
|
-
className:
|
|
3772
|
+
className: sr.grid,
|
|
3711
3773
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
3712
3774
|
let n = l || c || e.disabled, i = r[e.id];
|
|
3713
3775
|
if (e.type === "input") {
|
|
@@ -3717,19 +3779,19 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3717
3779
|
placeholder: e.placeholder,
|
|
3718
3780
|
disabled: n
|
|
3719
3781
|
};
|
|
3720
|
-
return e.inputType === "number" ? /* @__PURE__ */ t(
|
|
3782
|
+
return e.inputType === "number" ? /* @__PURE__ */ t(nn, {
|
|
3721
3783
|
...r,
|
|
3722
3784
|
type: "number",
|
|
3723
3785
|
value: i ?? "",
|
|
3724
3786
|
onChange: (t) => d(e.id, t)
|
|
3725
|
-
}, e.id) : /* @__PURE__ */ t(
|
|
3787
|
+
}, e.id) : /* @__PURE__ */ t(nn, {
|
|
3726
3788
|
...r,
|
|
3727
3789
|
type: "text",
|
|
3728
3790
|
value: String(i ?? ""),
|
|
3729
3791
|
onChange: (t) => d(e.id, t)
|
|
3730
3792
|
}, e.id);
|
|
3731
3793
|
}
|
|
3732
|
-
if (e.type === "dropdown") return /* @__PURE__ */ t(
|
|
3794
|
+
if (e.type === "dropdown") return /* @__PURE__ */ t(Qt, {
|
|
3733
3795
|
label: e.label,
|
|
3734
3796
|
hint: e.hint,
|
|
3735
3797
|
placeholder: e.placeholder,
|
|
@@ -3738,7 +3800,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3738
3800
|
disabled: n,
|
|
3739
3801
|
onChange: (t) => d(e.id, t)
|
|
3740
3802
|
}, e.id);
|
|
3741
|
-
if (e.type === "multiple") return /* @__PURE__ */ t(
|
|
3803
|
+
if (e.type === "multiple") return /* @__PURE__ */ t(cn, {
|
|
3742
3804
|
label: e.label,
|
|
3743
3805
|
hint: e.hint,
|
|
3744
3806
|
placeholder: e.placeholder,
|
|
@@ -3747,14 +3809,14 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3747
3809
|
disabled: n,
|
|
3748
3810
|
onChange: (t) => d(e.id, t)
|
|
3749
3811
|
}, e.id);
|
|
3750
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3812
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(xt, {
|
|
3751
3813
|
label: e.label,
|
|
3752
3814
|
hint: e.hint,
|
|
3753
3815
|
checked: !!i,
|
|
3754
3816
|
disabled: n,
|
|
3755
3817
|
onChange: (t) => d(e.id, t)
|
|
3756
3818
|
}, e.id);
|
|
3757
|
-
if (e.type === "radio") return /* @__PURE__ */ t(
|
|
3819
|
+
if (e.type === "radio") return /* @__PURE__ */ t(un, {
|
|
3758
3820
|
label: e.label,
|
|
3759
3821
|
checked: !!i,
|
|
3760
3822
|
disabled: n,
|
|
@@ -3764,7 +3826,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3764
3826
|
from: null,
|
|
3765
3827
|
to: null
|
|
3766
3828
|
};
|
|
3767
|
-
return /* @__PURE__ */ t(
|
|
3829
|
+
return /* @__PURE__ */ t(Wt, {
|
|
3768
3830
|
hint: e.hint,
|
|
3769
3831
|
mode: e.mode,
|
|
3770
3832
|
min: e.min,
|
|
@@ -3775,7 +3837,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3775
3837
|
}, e.id);
|
|
3776
3838
|
})
|
|
3777
3839
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3778
|
-
className:
|
|
3840
|
+
className: sr.actions,
|
|
3779
3841
|
children: [o && /* @__PURE__ */ t(H, {
|
|
3780
3842
|
variant: "destructiveOutline",
|
|
3781
3843
|
disabled: l || c,
|
|
@@ -3789,7 +3851,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3789
3851
|
})]
|
|
3790
3852
|
})]
|
|
3791
3853
|
});
|
|
3792
|
-
},
|
|
3854
|
+
}, lr = {
|
|
3793
3855
|
grid: "_grid_1q540_1",
|
|
3794
3856
|
comfortable: "_comfortable_1q540_11",
|
|
3795
3857
|
compact: "_compact_1q540_19",
|
|
@@ -3806,23 +3868,23 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3806
3868
|
summary: "_summary_1q540_101",
|
|
3807
3869
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
3808
3870
|
summaryList: "_summaryList_1q540_145"
|
|
3809
|
-
},
|
|
3871
|
+
}, ur = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
3810
3872
|
...i,
|
|
3811
|
-
className: `${
|
|
3812
|
-
}),
|
|
3873
|
+
className: `${lr.grid} ${lr[`columns${e}`]} ${lr[n]} ${r}`
|
|
3874
|
+
}), dr = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
3813
3875
|
...r,
|
|
3814
|
-
className: `${
|
|
3815
|
-
}),
|
|
3876
|
+
className: `${lr.item} ${lr[`span${e}`]} ${n}`
|
|
3877
|
+
}), fr = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
3816
3878
|
...o,
|
|
3817
|
-
className: `${
|
|
3879
|
+
className: `${lr.summary} ${a}`,
|
|
3818
3880
|
role: "alert",
|
|
3819
3881
|
"aria-atomic": "true",
|
|
3820
3882
|
tabIndex: -1,
|
|
3821
3883
|
children: [/* @__PURE__ */ t("strong", {
|
|
3822
|
-
className:
|
|
3884
|
+
className: lr.summaryTitle,
|
|
3823
3885
|
children: e
|
|
3824
3886
|
}), /* @__PURE__ */ t("ul", {
|
|
3825
|
-
className:
|
|
3887
|
+
className: lr.summaryList,
|
|
3826
3888
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
3827
3889
|
href: `#${e.fieldId}`,
|
|
3828
3890
|
onClick: (t) => {
|
|
@@ -3831,7 +3893,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3831
3893
|
children: e.message
|
|
3832
3894
|
}) : e.message }, e.id))
|
|
3833
3895
|
})]
|
|
3834
|
-
}),
|
|
3896
|
+
}), pr = {
|
|
3835
3897
|
wrapper: "_wrapper_yxnr3_1",
|
|
3836
3898
|
dropzone: "_dropzone_yxnr3_15",
|
|
3837
3899
|
dragActive: "_dragActive_yxnr3_45",
|
|
@@ -3844,12 +3906,12 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3844
3906
|
file: "_file_yxnr3_133",
|
|
3845
3907
|
fileName: "_fileName_yxnr3_175",
|
|
3846
3908
|
fileSize: "_fileSize_yxnr3_187"
|
|
3847
|
-
},
|
|
3909
|
+
}, mr = (e) => `${e.name}:${e.size}:${e.lastModified}`, hr = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, gr = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), _r = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
|
|
3848
3910
|
let T = f(), E = y ?? `ds-file-input-${v ?? T}`, D = h(null), O = h(0), [k, A] = g(!1), j = u ? `${E}-hint` : void 0, M = d ? `${E}-error` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = !m && !_, F = (e) => {
|
|
3849
|
-
let t = [], n = new Set(r.map(
|
|
3911
|
+
let t = [], n = new Set(r.map(mr)), l = e.filter((e) => gr(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3850
3912
|
file: e,
|
|
3851
3913
|
reason: "maxSize"
|
|
3852
|
-
}), !1) : !n.has(
|
|
3914
|
+
}), !1) : !n.has(mr(e)) && (n.add(mr(e)), !0) : (t.push({
|
|
3853
3915
|
file: e,
|
|
3854
3916
|
reason: "accept"
|
|
3855
3917
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3859,7 +3921,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3859
3921
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3860
3922
|
};
|
|
3861
3923
|
return /* @__PURE__ */ n("div", {
|
|
3862
|
-
className: `${
|
|
3924
|
+
className: `${pr.wrapper} ${b}`,
|
|
3863
3925
|
children: [
|
|
3864
3926
|
l && /* @__PURE__ */ t(W, {
|
|
3865
3927
|
htmlFor: E,
|
|
@@ -3868,7 +3930,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3868
3930
|
children: l
|
|
3869
3931
|
}),
|
|
3870
3932
|
/* @__PURE__ */ n("div", {
|
|
3871
|
-
className: `${
|
|
3933
|
+
className: `${pr.dropzone} ${k ? pr.dragActive : ""} ${m ? pr.disabled : ""} ${d ? pr.error : ""}`,
|
|
3872
3934
|
onDragEnter: (e) => {
|
|
3873
3935
|
e.preventDefault(), P && ++O.current === 1 && A(!0);
|
|
3874
3936
|
},
|
|
@@ -3883,7 +3945,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3883
3945
|
ref: D,
|
|
3884
3946
|
id: E,
|
|
3885
3947
|
name: v,
|
|
3886
|
-
className:
|
|
3948
|
+
className: pr.nativeInput,
|
|
3887
3949
|
type: "file",
|
|
3888
3950
|
multiple: a,
|
|
3889
3951
|
accept: o,
|
|
@@ -3894,19 +3956,19 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3894
3956
|
onChange: (e) => F(Array.from(e.target.files ?? []))
|
|
3895
3957
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3896
3958
|
/* @__PURE__ */ t("ul", {
|
|
3897
|
-
className:
|
|
3959
|
+
className: pr.files,
|
|
3898
3960
|
"aria-live": "polite",
|
|
3899
3961
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3900
|
-
className:
|
|
3962
|
+
className: pr.file,
|
|
3901
3963
|
children: [
|
|
3902
3964
|
/* @__PURE__ */ t("span", {
|
|
3903
|
-
className:
|
|
3965
|
+
className: pr.fileName,
|
|
3904
3966
|
title: e.name,
|
|
3905
3967
|
children: e.name
|
|
3906
3968
|
}),
|
|
3907
3969
|
/* @__PURE__ */ t("span", {
|
|
3908
|
-
className:
|
|
3909
|
-
children:
|
|
3970
|
+
className: pr.fileSize,
|
|
3971
|
+
children: hr(e.size)
|
|
3910
3972
|
}),
|
|
3911
3973
|
P && /* @__PURE__ */ t(H, {
|
|
3912
3974
|
variant: "empty",
|
|
@@ -3920,25 +3982,25 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3920
3982
|
})
|
|
3921
3983
|
})
|
|
3922
3984
|
]
|
|
3923
|
-
},
|
|
3985
|
+
}, mr(e)))
|
|
3924
3986
|
}),
|
|
3925
3987
|
P && (a || r.length === 0) && /* @__PURE__ */ t(H, {
|
|
3926
|
-
className:
|
|
3988
|
+
className: pr.browseButton,
|
|
3927
3989
|
size: "sm",
|
|
3928
3990
|
onClick: () => D.current?.click(),
|
|
3929
3991
|
children: C
|
|
3930
3992
|
}),
|
|
3931
3993
|
P && !a && /* @__PURE__ */ t(H, {
|
|
3932
|
-
className:
|
|
3994
|
+
className: pr.browseButton,
|
|
3933
3995
|
size: "sm",
|
|
3934
3996
|
onClick: () => D.current?.click(),
|
|
3935
3997
|
children: S
|
|
3936
3998
|
})
|
|
3937
3999
|
] }) : /* @__PURE__ */ n("div", {
|
|
3938
|
-
className:
|
|
4000
|
+
className: pr.empty,
|
|
3939
4001
|
children: [
|
|
3940
4002
|
/* @__PURE__ */ t("span", {
|
|
3941
|
-
className:
|
|
4003
|
+
className: pr.uploadIcon,
|
|
3942
4004
|
"aria-hidden": "true",
|
|
3943
4005
|
children: /* @__PURE__ */ t(Y, {
|
|
3944
4006
|
name: "IconUpload",
|
|
@@ -3966,7 +4028,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3966
4028
|
})
|
|
3967
4029
|
]
|
|
3968
4030
|
});
|
|
3969
|
-
},
|
|
4031
|
+
}, vr = typeof window > "u" ? d : p, yr = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3970
4032
|
let [o, s] = g(null), [c, u] = g({
|
|
3971
4033
|
position: "fixed",
|
|
3972
4034
|
visibility: "hidden",
|
|
@@ -3989,7 +4051,7 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
3989
4051
|
o,
|
|
3990
4052
|
i
|
|
3991
4053
|
]);
|
|
3992
|
-
return
|
|
4054
|
+
return vr(() => {
|
|
3993
4055
|
if (!o) return;
|
|
3994
4056
|
d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
3995
4057
|
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
@@ -4000,13 +4062,13 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
4000
4062
|
e,
|
|
4001
4063
|
o,
|
|
4002
4064
|
d
|
|
4003
|
-
]), /* @__PURE__ */ t(
|
|
4065
|
+
]), /* @__PURE__ */ t(mn, { children: /* @__PURE__ */ t("div", {
|
|
4004
4066
|
ref: s,
|
|
4005
4067
|
className: a,
|
|
4006
4068
|
style: c,
|
|
4007
4069
|
children: n
|
|
4008
4070
|
}) });
|
|
4009
|
-
},
|
|
4071
|
+
}, br = {
|
|
4010
4072
|
wrapper: "_wrapper_1tid7_1",
|
|
4011
4073
|
control: "_control_1tid7_15",
|
|
4012
4074
|
textarea: "_textarea_1tid7_25",
|
|
@@ -4020,12 +4082,12 @@ var dn = ({ config: e, row: n, children: r }) => {
|
|
|
4020
4082
|
clearAction: "_clearAction_1tid7_171",
|
|
4021
4083
|
messages: "_messages_1tid7_251",
|
|
4022
4084
|
counter: "_counter_1tid7_265"
|
|
4023
|
-
},
|
|
4024
|
-
function
|
|
4085
|
+
}, xr = 2;
|
|
4086
|
+
function Sr(e) {
|
|
4025
4087
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
4026
4088
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
4027
4089
|
}
|
|
4028
|
-
function
|
|
4090
|
+
function Cr({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = xr, maxRows: w, autoResize: T = !0, ...E }) {
|
|
4029
4091
|
let D = f(), O = _ ?? `ds-textarea-${g ?? D}`, k = h(null), A = p ? `${O}-hint` : void 0, j = u ? `${O}-error` : void 0, M = S && x ? `${O}-count` : void 0, N = [
|
|
4030
4092
|
A,
|
|
4031
4093
|
j,
|
|
@@ -4033,7 +4095,7 @@ function er({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
4033
4095
|
].filter(Boolean).join(" ") || void 0, P = Math.max(1, C), F = w === void 0 ? void 0 : Math.max(P, w), I = l(() => {
|
|
4034
4096
|
let e = k.current;
|
|
4035
4097
|
if (!e || !T) return;
|
|
4036
|
-
let t = window.getComputedStyle(e), n =
|
|
4098
|
+
let t = window.getComputedStyle(e), n = Sr(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * P + r, a = F === void 0 ? Infinity : n * F + r;
|
|
4037
4099
|
e.style.height = "auto";
|
|
4038
4100
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
4039
4101
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -4065,7 +4127,7 @@ function er({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
4065
4127
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), I());
|
|
4066
4128
|
}, z = { "--ds-textarea-min-rows": P };
|
|
4067
4129
|
return /* @__PURE__ */ n("div", {
|
|
4068
|
-
className: `${
|
|
4130
|
+
className: `${br.wrapper} ${m}`,
|
|
4069
4131
|
children: [
|
|
4070
4132
|
c && /* @__PURE__ */ t(W, {
|
|
4071
4133
|
htmlFor: O,
|
|
@@ -4075,12 +4137,12 @@ function er({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
4075
4137
|
}),
|
|
4076
4138
|
a && s ? /* @__PURE__ */ t("div", {
|
|
4077
4139
|
id: O,
|
|
4078
|
-
className: `${
|
|
4140
|
+
className: `${br.disabledText} ${br[v]}`,
|
|
4079
4141
|
style: z,
|
|
4080
4142
|
"aria-describedby": N,
|
|
4081
4143
|
children: e || i
|
|
4082
4144
|
}) : /* @__PURE__ */ n("div", {
|
|
4083
|
-
className:
|
|
4145
|
+
className: br.control,
|
|
4084
4146
|
children: [/* @__PURE__ */ t("textarea", {
|
|
4085
4147
|
ref: k,
|
|
4086
4148
|
id: O,
|
|
@@ -4095,12 +4157,12 @@ function er({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
4095
4157
|
style: z,
|
|
4096
4158
|
"aria-invalid": !!u,
|
|
4097
4159
|
"aria-describedby": N,
|
|
4098
|
-
className: `${
|
|
4160
|
+
className: `${br.textarea} ${br[v]} ${T ? br.autoResize : br.manualResize} ${u ? br.textareaError : ""}`,
|
|
4099
4161
|
onChange: L,
|
|
4100
4162
|
...E
|
|
4101
4163
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
4102
4164
|
type: "button",
|
|
4103
|
-
className:
|
|
4165
|
+
className: br.clearAction,
|
|
4104
4166
|
"aria-label": "Очистить поле",
|
|
4105
4167
|
onClick: R,
|
|
4106
4168
|
children: /* @__PURE__ */ t(Y, {
|
|
@@ -4111,7 +4173,7 @@ function er({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
4111
4173
|
})]
|
|
4112
4174
|
}),
|
|
4113
4175
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
4114
|
-
className:
|
|
4176
|
+
className: br.messages,
|
|
4115
4177
|
children: [
|
|
4116
4178
|
p && !u && /* @__PURE__ */ t(re, {
|
|
4117
4179
|
id: A,
|
|
@@ -4124,7 +4186,7 @@ function er({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
4124
4186
|
}),
|
|
4125
4187
|
M && /* @__PURE__ */ n("span", {
|
|
4126
4188
|
id: M,
|
|
4127
|
-
className:
|
|
4189
|
+
className: br.counter,
|
|
4128
4190
|
children: [
|
|
4129
4191
|
e.length,
|
|
4130
4192
|
" / ",
|
|
@@ -4138,11 +4200,11 @@ function er({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
4138
4200
|
}
|
|
4139
4201
|
//#endregion
|
|
4140
4202
|
//#region src/components/DSModal/modal.store.ts
|
|
4141
|
-
var
|
|
4203
|
+
var wr = 0, Tr = S((e, t) => ({
|
|
4142
4204
|
modals: [],
|
|
4143
4205
|
openModal: (t, n = {}, r = {}) => {
|
|
4144
|
-
|
|
4145
|
-
let i = `ds-modal-${
|
|
4206
|
+
wr += 1;
|
|
4207
|
+
let i = `ds-modal-${wr}`;
|
|
4146
4208
|
return e((e) => ({ modals: [...e.modals, {
|
|
4147
4209
|
id: i,
|
|
4148
4210
|
name: t,
|
|
@@ -4166,10 +4228,10 @@ var tr = 0, nr = S((e, t) => ({
|
|
|
4166
4228
|
let n = t().modals;
|
|
4167
4229
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
4168
4230
|
}
|
|
4169
|
-
})),
|
|
4170
|
-
|
|
4171
|
-
},
|
|
4172
|
-
function
|
|
4231
|
+
})), Er = () => {
|
|
4232
|
+
Tr.getState().closeAllModals(), wr = 0;
|
|
4233
|
+
}, Dr = 8, Or = 96, kr = .55;
|
|
4234
|
+
function Ar(e, t, n) {
|
|
4173
4235
|
return {
|
|
4174
4236
|
startX: e,
|
|
4175
4237
|
startY: t,
|
|
@@ -4177,16 +4239,16 @@ function sr(e, t, n) {
|
|
|
4177
4239
|
intent: "pending"
|
|
4178
4240
|
};
|
|
4179
4241
|
}
|
|
4180
|
-
function
|
|
4242
|
+
function jr(e, t, n) {
|
|
4181
4243
|
let r = t - e.startX, i = n - e.startY;
|
|
4182
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
4244
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= Dr && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
4183
4245
|
}
|
|
4184
|
-
function
|
|
4246
|
+
function Mr(e, t, n) {
|
|
4185
4247
|
if (e.intent !== "vertical") return !1;
|
|
4186
4248
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
4187
|
-
return r >=
|
|
4249
|
+
return r >= Or || r >= 32 && r / i >= kr;
|
|
4188
4250
|
}
|
|
4189
|
-
var
|
|
4251
|
+
var Nr = {
|
|
4190
4252
|
layer: "_layer_tnds0_1",
|
|
4191
4253
|
backdrop: "_backdrop_tnds0_15",
|
|
4192
4254
|
"backdrop-enter": "_backdrop-enter_tnds0_1",
|
|
@@ -4199,10 +4261,10 @@ var ur = {
|
|
|
4199
4261
|
close: "_close_tnds0_141",
|
|
4200
4262
|
dragHandle: "_dragHandle_tnds0_149",
|
|
4201
4263
|
"sheet-enter": "_sheet-enter_tnds0_1"
|
|
4202
|
-
},
|
|
4203
|
-
function
|
|
4264
|
+
}, Pr = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Fr = a({});
|
|
4265
|
+
function Ir(e) {
|
|
4204
4266
|
if (e.key !== "Tab") return;
|
|
4205
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4267
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Pr));
|
|
4206
4268
|
if (!t.length) {
|
|
4207
4269
|
e.preventDefault();
|
|
4208
4270
|
return;
|
|
@@ -4210,18 +4272,18 @@ function pr(e) {
|
|
|
4210
4272
|
let n = t[0], r = t.at(-1);
|
|
4211
4273
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
4212
4274
|
}
|
|
4213
|
-
var
|
|
4214
|
-
let l = u(
|
|
4275
|
+
var Lr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
4276
|
+
let l = u(Fr), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = Tr((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
4215
4277
|
d(() => {
|
|
4216
4278
|
let e = document.activeElement, t = y.current;
|
|
4217
|
-
return (t?.querySelector(
|
|
4279
|
+
return (t?.querySelector(Pr) ?? t)?.focus(), () => e?.focus();
|
|
4218
4280
|
}, []);
|
|
4219
4281
|
let A = (e) => {
|
|
4220
4282
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
4221
4283
|
};
|
|
4222
4284
|
return /* @__PURE__ */ n("div", {
|
|
4223
4285
|
ref: y,
|
|
4224
|
-
className: `${
|
|
4286
|
+
className: `${Nr.panel} ${s}`,
|
|
4225
4287
|
"data-closing": l.closing || void 0,
|
|
4226
4288
|
"data-dragging": w || void 0,
|
|
4227
4289
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -4230,36 +4292,36 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4230
4292
|
"aria-labelledby": O ? _ : void 0,
|
|
4231
4293
|
"aria-describedby": k ? v : void 0,
|
|
4232
4294
|
tabIndex: -1,
|
|
4233
|
-
onKeyDown:
|
|
4295
|
+
onKeyDown: Ir,
|
|
4234
4296
|
children: [
|
|
4235
4297
|
/* @__PURE__ */ t("button", {
|
|
4236
4298
|
type: "button",
|
|
4237
|
-
className:
|
|
4299
|
+
className: Nr.dragHandle,
|
|
4238
4300
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
4239
4301
|
onPointerDown: (e) => {
|
|
4240
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
4302
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = Ar(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
4241
4303
|
},
|
|
4242
4304
|
onPointerMove: (e) => {
|
|
4243
4305
|
if (e.pointerId !== x.current || !b.current) return;
|
|
4244
|
-
let t =
|
|
4306
|
+
let t = jr(b.current, e.clientX, e.clientY);
|
|
4245
4307
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
4246
4308
|
},
|
|
4247
4309
|
onPointerUp: (e) => {
|
|
4248
4310
|
if (e.pointerId !== x.current || !b.current) return;
|
|
4249
|
-
let t =
|
|
4311
|
+
let t = Mr(b.current, e.clientY, e.timeStamp);
|
|
4250
4312
|
A(e.currentTarget), t && D();
|
|
4251
4313
|
},
|
|
4252
4314
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
4253
4315
|
children: /* @__PURE__ */ t("span", {})
|
|
4254
4316
|
}),
|
|
4255
4317
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
4256
|
-
className:
|
|
4318
|
+
className: Nr.header,
|
|
4257
4319
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
4258
4320
|
id: _,
|
|
4259
|
-
className:
|
|
4321
|
+
className: Nr.title,
|
|
4260
4322
|
children: p
|
|
4261
4323
|
}), /* @__PURE__ */ t(H, {
|
|
4262
|
-
className:
|
|
4324
|
+
className: Nr.close,
|
|
4263
4325
|
variant: "empty",
|
|
4264
4326
|
size: "sm",
|
|
4265
4327
|
"aria-label": o,
|
|
@@ -4273,17 +4335,17 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4273
4335
|
}),
|
|
4274
4336
|
k && /* @__PURE__ */ t("p", {
|
|
4275
4337
|
id: v,
|
|
4276
|
-
className:
|
|
4338
|
+
className: Nr.description,
|
|
4277
4339
|
children: m
|
|
4278
4340
|
}),
|
|
4279
4341
|
/* @__PURE__ */ t("div", {
|
|
4280
|
-
className:
|
|
4342
|
+
className: Nr.content,
|
|
4281
4343
|
children: e
|
|
4282
4344
|
})
|
|
4283
4345
|
]
|
|
4284
4346
|
});
|
|
4285
|
-
},
|
|
4286
|
-
let n =
|
|
4347
|
+
}, Rr = ({ registry: e }) => {
|
|
4348
|
+
let n = Tr((e) => e.modals), r = Tr((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
4287
4349
|
if (o.current.has(e)) return;
|
|
4288
4350
|
a((t) => new Set(t).add(e));
|
|
4289
4351
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -4299,7 +4361,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4299
4361
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
4300
4362
|
}, []), d(() => {
|
|
4301
4363
|
let e = (e) => {
|
|
4302
|
-
let t =
|
|
4364
|
+
let t = Tr.getState().modals.at(-1);
|
|
4303
4365
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
4304
4366
|
};
|
|
4305
4367
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -4312,21 +4374,21 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4312
4374
|
n,
|
|
4313
4375
|
e
|
|
4314
4376
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4315
|
-
className:
|
|
4377
|
+
className: Nr.layer,
|
|
4316
4378
|
"aria-label": "Модальные окна",
|
|
4317
4379
|
children: n.map((r, a) => {
|
|
4318
4380
|
let o = e[r.name];
|
|
4319
4381
|
if (!o) return null;
|
|
4320
4382
|
let c = i.has(r.id);
|
|
4321
4383
|
return /* @__PURE__ */ t("div", {
|
|
4322
|
-
className:
|
|
4384
|
+
className: Nr.backdrop,
|
|
4323
4385
|
"data-closing": c || void 0,
|
|
4324
4386
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
4325
4387
|
inert: a !== n.length - 1 || void 0,
|
|
4326
4388
|
onMouseDown: (e) => {
|
|
4327
4389
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
4328
4390
|
},
|
|
4329
|
-
children: /* @__PURE__ */ t(
|
|
4391
|
+
children: /* @__PURE__ */ t(Fr.Provider, {
|
|
4330
4392
|
value: {
|
|
4331
4393
|
title: r.title ?? r.payload.title,
|
|
4332
4394
|
description: r.description ?? r.payload.description,
|
|
@@ -4343,31 +4405,31 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4343
4405
|
}, r.id);
|
|
4344
4406
|
})
|
|
4345
4407
|
}), document.body);
|
|
4346
|
-
},
|
|
4347
|
-
let o =
|
|
4408
|
+
}, zr = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
4409
|
+
let o = Tr((e) => e.modals.length);
|
|
4348
4410
|
return d(() => {
|
|
4349
4411
|
if (!a || o === 0) return;
|
|
4350
4412
|
let e = document.body.style.overflow;
|
|
4351
4413
|
return document.body.style.overflow = "hidden", () => {
|
|
4352
4414
|
document.body.style.overflow = e;
|
|
4353
4415
|
};
|
|
4354
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
4355
|
-
},
|
|
4416
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Rr, { registry: r })] });
|
|
4417
|
+
}, Br = (e) => e, Vr = {
|
|
4356
4418
|
message: "_message_c23ie_1",
|
|
4357
4419
|
actions: "_actions_c23ie_13"
|
|
4358
|
-
},
|
|
4420
|
+
}, Hr = /* @__PURE__ */ new Map(), Ur = 0, Wr = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
4359
4421
|
let u = (e) => {
|
|
4360
|
-
|
|
4422
|
+
Hr.get(l)?.(e), Hr.delete(l), r();
|
|
4361
4423
|
};
|
|
4362
|
-
return /* @__PURE__ */ n(
|
|
4424
|
+
return /* @__PURE__ */ n(Lr, {
|
|
4363
4425
|
modalId: e,
|
|
4364
4426
|
title: i,
|
|
4365
4427
|
role: "alertdialog",
|
|
4366
4428
|
children: [/* @__PURE__ */ t("p", {
|
|
4367
|
-
className:
|
|
4429
|
+
className: Vr.message,
|
|
4368
4430
|
children: a
|
|
4369
4431
|
}), /* @__PURE__ */ n("div", {
|
|
4370
|
-
className:
|
|
4432
|
+
className: Vr.actions,
|
|
4371
4433
|
children: [/* @__PURE__ */ t(H, {
|
|
4372
4434
|
variant: "outline",
|
|
4373
4435
|
onClick: () => u(!1),
|
|
@@ -4379,46 +4441,46 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4379
4441
|
})]
|
|
4380
4442
|
})]
|
|
4381
4443
|
});
|
|
4382
|
-
},
|
|
4444
|
+
}, Gr = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Lr, {
|
|
4383
4445
|
modalId: e,
|
|
4384
4446
|
title: i,
|
|
4385
4447
|
role: "alertdialog",
|
|
4386
4448
|
children: [/* @__PURE__ */ t("p", {
|
|
4387
|
-
className:
|
|
4449
|
+
className: Vr.message,
|
|
4388
4450
|
children: a
|
|
4389
4451
|
}), /* @__PURE__ */ t("div", {
|
|
4390
|
-
className:
|
|
4452
|
+
className: Vr.actions,
|
|
4391
4453
|
children: /* @__PURE__ */ t(H, {
|
|
4392
4454
|
onClick: r,
|
|
4393
4455
|
children: o
|
|
4394
4456
|
})
|
|
4395
4457
|
})]
|
|
4396
|
-
}),
|
|
4397
|
-
ConfirmModal:
|
|
4398
|
-
ErrorModal:
|
|
4399
|
-
}),
|
|
4400
|
-
let e =
|
|
4458
|
+
}), Kr = Br({
|
|
4459
|
+
ConfirmModal: Wr,
|
|
4460
|
+
ErrorModal: Gr
|
|
4461
|
+
}), qr = () => {
|
|
4462
|
+
let e = Tr((e) => e.openModal);
|
|
4401
4463
|
return (t = {}) => new Promise((n) => {
|
|
4402
|
-
|
|
4403
|
-
let r = `confirm-${
|
|
4404
|
-
|
|
4464
|
+
Ur += 1;
|
|
4465
|
+
let r = `confirm-${Ur}`;
|
|
4466
|
+
Hr.set(r, n), e("ConfirmModal", {
|
|
4405
4467
|
...t,
|
|
4406
4468
|
requestId: r
|
|
4407
4469
|
}, {
|
|
4408
4470
|
closeOnEscape: !1,
|
|
4409
4471
|
onClose: () => {
|
|
4410
|
-
|
|
4472
|
+
Hr.get(r)?.(!1), Hr.delete(r);
|
|
4411
4473
|
}
|
|
4412
4474
|
});
|
|
4413
4475
|
});
|
|
4414
|
-
},
|
|
4415
|
-
let e =
|
|
4476
|
+
}, Jr = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Yr = () => {
|
|
4477
|
+
let e = Tr((e) => e.openModal);
|
|
4416
4478
|
return { showError: (t, n) => e("ErrorModal", {
|
|
4417
4479
|
title: n,
|
|
4418
|
-
message:
|
|
4480
|
+
message: Jr(t)
|
|
4419
4481
|
}) };
|
|
4420
|
-
},
|
|
4421
|
-
let e =
|
|
4482
|
+
}, Xr = S(() => ({})), Zr = S(() => ({})), Qr = () => {
|
|
4483
|
+
let e = Tr((e) => e.modals), t = Tr((e) => e.openModal), n = Tr((e) => e.closeModal), r = Tr((e) => e.closeTopModal), i = Tr((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
4422
4484
|
return m(() => ({
|
|
4423
4485
|
openModal: a,
|
|
4424
4486
|
closeModal: n,
|
|
@@ -4434,7 +4496,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4434
4496
|
e.length,
|
|
4435
4497
|
a
|
|
4436
4498
|
]);
|
|
4437
|
-
},
|
|
4499
|
+
}, $r = {
|
|
4438
4500
|
layer: "_layer_npyhl_1",
|
|
4439
4501
|
backdrop: "_backdrop_npyhl_21",
|
|
4440
4502
|
panel: "_panel_npyhl_47",
|
|
@@ -4456,16 +4518,16 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4456
4518
|
"enter-left": "_enter-left_npyhl_1",
|
|
4457
4519
|
"enter-bottom": "_enter-bottom_npyhl_1",
|
|
4458
4520
|
"enter-fullscreen": "_enter-fullscreen_npyhl_1"
|
|
4459
|
-
},
|
|
4521
|
+
}, ei = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ti = a(null), ni = 200, ri = (e) => {
|
|
4460
4522
|
if (e.key !== "Tab") return;
|
|
4461
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4523
|
+
let t = Array.from(e.currentTarget.querySelectorAll(ei));
|
|
4462
4524
|
if (!t.length) {
|
|
4463
4525
|
e.preventDefault();
|
|
4464
4526
|
return;
|
|
4465
4527
|
}
|
|
4466
4528
|
let n = t[0], r = t.at(-1);
|
|
4467
4529
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
4468
|
-
},
|
|
4530
|
+
}, ii = () => u(ti), ai = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: v = !1, closeLabel: y = "Закрыть", initialFocusRef: b, returnFocusRef: x, className: S = "" }) => {
|
|
4469
4531
|
let C = h(null), w = h(null), T = h(r), E = h(p), D = h(v), O = h(e), [k, A] = g(e), [j, M] = g(!1), N = f(), P = f();
|
|
4470
4532
|
T.current = r, E.current = p, D.current = v, O.current = e;
|
|
4471
4533
|
let F = (e) => {
|
|
@@ -4484,7 +4546,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4484
4546
|
t();
|
|
4485
4547
|
return;
|
|
4486
4548
|
}
|
|
4487
|
-
return w.current = window.setTimeout(t,
|
|
4549
|
+
return w.current = window.setTimeout(t, ni), () => {
|
|
4488
4550
|
w.current !== null && (window.clearTimeout(w.current), w.current = null);
|
|
4489
4551
|
};
|
|
4490
4552
|
}, [e, k]), d(() => {
|
|
@@ -4492,7 +4554,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4492
4554
|
let e = document.activeElement, t = x?.current, n = document.body.style.overflow;
|
|
4493
4555
|
document.body.style.overflow = "hidden";
|
|
4494
4556
|
let r = C.current;
|
|
4495
|
-
(b?.current ?? r?.querySelector(
|
|
4557
|
+
(b?.current ?? r?.querySelector(ei) ?? r)?.focus();
|
|
4496
4558
|
let i = (e) => {
|
|
4497
4559
|
e.key === "Escape" && O.current && E.current && !D.current && T.current("escape");
|
|
4498
4560
|
};
|
|
@@ -4504,32 +4566,32 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4504
4566
|
k,
|
|
4505
4567
|
x
|
|
4506
4568
|
]), !k || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4507
|
-
className:
|
|
4569
|
+
className: $r.layer,
|
|
4508
4570
|
"data-closing": j || void 0,
|
|
4509
4571
|
children: /* @__PURE__ */ t("div", {
|
|
4510
|
-
className:
|
|
4572
|
+
className: $r.backdrop,
|
|
4511
4573
|
"data-closing": j || void 0,
|
|
4512
4574
|
onMouseDown: (e) => {
|
|
4513
4575
|
e.target === e.currentTarget && m && F("backdrop");
|
|
4514
4576
|
},
|
|
4515
|
-
children: /* @__PURE__ */ t(
|
|
4577
|
+
children: /* @__PURE__ */ t(ti.Provider, {
|
|
4516
4578
|
value: { requestClose: F },
|
|
4517
4579
|
children: /* @__PURE__ */ n("section", {
|
|
4518
4580
|
ref: C,
|
|
4519
|
-
className: `${
|
|
4581
|
+
className: `${$r.panel} ${$r[l]} ${$r[u]} ${S}`,
|
|
4520
4582
|
"data-closing": j || void 0,
|
|
4521
4583
|
role: "dialog",
|
|
4522
4584
|
"aria-modal": "true",
|
|
4523
4585
|
"aria-labelledby": a ? N : void 0,
|
|
4524
4586
|
"aria-describedby": o ? P : void 0,
|
|
4525
4587
|
tabIndex: -1,
|
|
4526
|
-
onKeyDown:
|
|
4588
|
+
onKeyDown: ri,
|
|
4527
4589
|
children: [
|
|
4528
4590
|
/* @__PURE__ */ n("header", {
|
|
4529
|
-
className:
|
|
4591
|
+
className: $r.header,
|
|
4530
4592
|
children: [
|
|
4531
4593
|
/* @__PURE__ */ n("div", {
|
|
4532
|
-
className:
|
|
4594
|
+
className: $r.heading,
|
|
4533
4595
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
4534
4596
|
id: N,
|
|
4535
4597
|
children: a
|
|
@@ -4539,7 +4601,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4539
4601
|
})]
|
|
4540
4602
|
}),
|
|
4541
4603
|
s && /* @__PURE__ */ t("div", {
|
|
4542
|
-
className:
|
|
4604
|
+
className: $r.headerActions,
|
|
4543
4605
|
children: s
|
|
4544
4606
|
}),
|
|
4545
4607
|
/* @__PURE__ */ t(H, {
|
|
@@ -4557,11 +4619,11 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4557
4619
|
]
|
|
4558
4620
|
}),
|
|
4559
4621
|
/* @__PURE__ */ t("div", {
|
|
4560
|
-
className:
|
|
4622
|
+
className: $r.content,
|
|
4561
4623
|
children: i
|
|
4562
4624
|
}),
|
|
4563
4625
|
c && /* @__PURE__ */ t("footer", {
|
|
4564
|
-
className:
|
|
4626
|
+
className: $r.footer,
|
|
4565
4627
|
children: c
|
|
4566
4628
|
})
|
|
4567
4629
|
]
|
|
@@ -4569,17 +4631,17 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4569
4631
|
})
|
|
4570
4632
|
})
|
|
4571
4633
|
}), document.body);
|
|
4572
|
-
},
|
|
4634
|
+
}, oi = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(ai, {
|
|
4573
4635
|
...n,
|
|
4574
4636
|
placement: e
|
|
4575
|
-
}),
|
|
4637
|
+
}), si = (e) => /* @__PURE__ */ t(ai, {
|
|
4576
4638
|
...e,
|
|
4577
4639
|
placement: "bottom"
|
|
4578
|
-
}),
|
|
4640
|
+
}), ci = (e) => /* @__PURE__ */ t(ai, {
|
|
4579
4641
|
...e,
|
|
4580
4642
|
placement: "fullscreen",
|
|
4581
4643
|
size: "xl"
|
|
4582
|
-
}),
|
|
4644
|
+
}), li = {
|
|
4583
4645
|
wrapper: "_wrapper_hpk6i_1",
|
|
4584
4646
|
container: "_container_hpk6i_15",
|
|
4585
4647
|
inner: "_inner_hpk6i_35",
|
|
@@ -4594,29 +4656,29 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4594
4656
|
empty: "_empty_hpk6i_153",
|
|
4595
4657
|
destructive: "_destructive_hpk6i_161",
|
|
4596
4658
|
destructiveOutline: "_destructiveOutline_hpk6i_169"
|
|
4597
|
-
},
|
|
4598
|
-
className:
|
|
4659
|
+
}, ui = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4660
|
+
className: li.wrapper,
|
|
4599
4661
|
children: /* @__PURE__ */ t("div", {
|
|
4600
|
-
className:
|
|
4662
|
+
className: li.container,
|
|
4601
4663
|
children: /* @__PURE__ */ n("div", {
|
|
4602
|
-
className:
|
|
4664
|
+
className: li.inner,
|
|
4603
4665
|
children: [
|
|
4604
4666
|
/* @__PURE__ */ t("div", {
|
|
4605
|
-
className:
|
|
4606
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4667
|
+
className: li.cube,
|
|
4668
|
+
children: /* @__PURE__ */ t("div", { className: `${li.cube__inner} ${li[e]}` })
|
|
4607
4669
|
}),
|
|
4608
4670
|
/* @__PURE__ */ t("div", {
|
|
4609
|
-
className:
|
|
4610
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4671
|
+
className: li.cube,
|
|
4672
|
+
children: /* @__PURE__ */ t("div", { className: `${li.cube__inner} ${li[e]}` })
|
|
4611
4673
|
}),
|
|
4612
4674
|
/* @__PURE__ */ t("div", {
|
|
4613
|
-
className:
|
|
4614
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4675
|
+
className: li.cube,
|
|
4676
|
+
children: /* @__PURE__ */ t("div", { className: `${li.cube__inner} ${li[e]}` })
|
|
4615
4677
|
})
|
|
4616
4678
|
]
|
|
4617
4679
|
})
|
|
4618
4680
|
})
|
|
4619
|
-
}),
|
|
4681
|
+
}), di = {
|
|
4620
4682
|
viewport: "_viewport_22b73_1",
|
|
4621
4683
|
"top-right": "_top-right_22b73_21",
|
|
4622
4684
|
"top-left": "_top-left_22b73_31",
|
|
@@ -4632,12 +4694,12 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4632
4694
|
success: "_success_22b73_195",
|
|
4633
4695
|
warning: "_warning_22b73_203",
|
|
4634
4696
|
error: "_error_22b73_211"
|
|
4635
|
-
},
|
|
4697
|
+
}, fi = {
|
|
4636
4698
|
info: "IconInfoCircle",
|
|
4637
4699
|
success: "IconSuccessCircle",
|
|
4638
4700
|
warning: "IconWarning",
|
|
4639
4701
|
error: "IconWarning"
|
|
4640
|
-
},
|
|
4702
|
+
}, pi = ({ toast: e, onClose: r }) => {
|
|
4641
4703
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4642
4704
|
return d(() => {
|
|
4643
4705
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4657,7 +4719,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4657
4719
|
let e = () => s(document.hidden);
|
|
4658
4720
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4659
4721
|
}, []), /* @__PURE__ */ n("article", {
|
|
4660
|
-
className: `${
|
|
4722
|
+
className: `${di.toast} ${di[e.variant]}`,
|
|
4661
4723
|
role: e.variant === "error" ? "alert" : "status",
|
|
4662
4724
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4663
4725
|
onMouseEnter: () => a(!0),
|
|
@@ -4666,24 +4728,24 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4666
4728
|
onBlur: () => a(!1),
|
|
4667
4729
|
children: [
|
|
4668
4730
|
/* @__PURE__ */ t("div", {
|
|
4669
|
-
className:
|
|
4731
|
+
className: di.icon,
|
|
4670
4732
|
"aria-hidden": "true",
|
|
4671
4733
|
children: /* @__PURE__ */ t(Y, {
|
|
4672
|
-
name:
|
|
4734
|
+
name: fi[e.variant],
|
|
4673
4735
|
color: "var(--ds-toast-accent)",
|
|
4674
4736
|
width: 20,
|
|
4675
4737
|
height: 20
|
|
4676
4738
|
})
|
|
4677
4739
|
}),
|
|
4678
4740
|
/* @__PURE__ */ n("div", {
|
|
4679
|
-
className:
|
|
4741
|
+
className: di.body,
|
|
4680
4742
|
children: [
|
|
4681
4743
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4682
|
-
className:
|
|
4744
|
+
className: di.title,
|
|
4683
4745
|
children: e.title
|
|
4684
4746
|
}),
|
|
4685
4747
|
/* @__PURE__ */ t("div", {
|
|
4686
|
-
className:
|
|
4748
|
+
className: di.message,
|
|
4687
4749
|
children: e.message
|
|
4688
4750
|
}),
|
|
4689
4751
|
e.action && /* @__PURE__ */ t(H, {
|
|
@@ -4709,15 +4771,15 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4709
4771
|
})
|
|
4710
4772
|
]
|
|
4711
4773
|
});
|
|
4712
|
-
},
|
|
4774
|
+
}, mi = 0, hi = S((e, t) => ({
|
|
4713
4775
|
toasts: [],
|
|
4714
4776
|
showToast: (n) => {
|
|
4715
4777
|
if (n.dedupeKey) {
|
|
4716
4778
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4717
4779
|
if (e) return e.id;
|
|
4718
4780
|
}
|
|
4719
|
-
|
|
4720
|
-
let r = `ds-toast-${
|
|
4781
|
+
mi += 1;
|
|
4782
|
+
let r = `ds-toast-${mi}`;
|
|
4721
4783
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4722
4784
|
variant: "info",
|
|
4723
4785
|
duration: 5e3,
|
|
@@ -4728,18 +4790,18 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4728
4790
|
},
|
|
4729
4791
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4730
4792
|
clearToasts: () => e({ toasts: [] })
|
|
4731
|
-
})),
|
|
4732
|
-
let r =
|
|
4793
|
+
})), gi = () => hi.setState({ toasts: [] }), _i = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4794
|
+
let r = hi((e) => e.toasts), i = hi((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4733
4795
|
return /* @__PURE__ */ t("div", {
|
|
4734
|
-
className: `${
|
|
4796
|
+
className: `${di.viewport} ${di[e]}`,
|
|
4735
4797
|
"aria-label": "Уведомления",
|
|
4736
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4798
|
+
children: a.map((e) => /* @__PURE__ */ t(pi, {
|
|
4737
4799
|
toast: e,
|
|
4738
4800
|
onClose: i
|
|
4739
4801
|
}, e.id))
|
|
4740
4802
|
});
|
|
4741
|
-
},
|
|
4742
|
-
let e =
|
|
4803
|
+
}, vi = () => {
|
|
4804
|
+
let e = hi((e) => e.showToast), t = hi((e) => e.removeToast), n = hi((e) => e.clearToasts), r = l((t) => e({
|
|
4743
4805
|
...t,
|
|
4744
4806
|
variant: "info"
|
|
4745
4807
|
}), [e]), i = l((t) => e({
|
|
@@ -4769,13 +4831,13 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4769
4831
|
i,
|
|
4770
4832
|
a
|
|
4771
4833
|
]);
|
|
4772
|
-
},
|
|
4834
|
+
}, yi = {
|
|
4773
4835
|
root: "_root_bs28m_1",
|
|
4774
4836
|
tabList: "_tabList_bs28m_11",
|
|
4775
4837
|
tab: "_tab_bs28m_11",
|
|
4776
4838
|
panels: "_panels_bs28m_127",
|
|
4777
4839
|
panel: "_panel_bs28m_127"
|
|
4778
|
-
},
|
|
4840
|
+
}, bi = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4779
4841
|
let l = `ds-tabs-${f().replace(/:/g, "")}`, u = h([]), d = o || s, p = e.findIndex((e) => e.id === r), m = e.findIndex((e) => !e.disabled), g = p >= 0 && !e[p]?.disabled ? p : m, _ = (t) => {
|
|
4780
4842
|
let n = e[t];
|
|
4781
4843
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4805,10 +4867,10 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4805
4867
|
t.preventDefault(), _(a);
|
|
4806
4868
|
};
|
|
4807
4869
|
return /* @__PURE__ */ n("div", {
|
|
4808
|
-
className: `${
|
|
4870
|
+
className: `${yi.root} ${c}`,
|
|
4809
4871
|
"aria-busy": s || void 0,
|
|
4810
4872
|
children: [/* @__PURE__ */ t("div", {
|
|
4811
|
-
className:
|
|
4873
|
+
className: yi.tabList,
|
|
4812
4874
|
role: "tablist",
|
|
4813
4875
|
"aria-label": a,
|
|
4814
4876
|
"aria-orientation": "horizontal",
|
|
@@ -4820,7 +4882,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4820
4882
|
u.current[n] = e;
|
|
4821
4883
|
},
|
|
4822
4884
|
id: a,
|
|
4823
|
-
className:
|
|
4885
|
+
className: yi.tab,
|
|
4824
4886
|
type: "button",
|
|
4825
4887
|
role: "tab",
|
|
4826
4888
|
"aria-selected": i,
|
|
@@ -4833,12 +4895,12 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4833
4895
|
}, e.id);
|
|
4834
4896
|
})
|
|
4835
4897
|
}), /* @__PURE__ */ t("div", {
|
|
4836
|
-
className:
|
|
4898
|
+
className: yi.panels,
|
|
4837
4899
|
children: e.map((e, n) => {
|
|
4838
4900
|
let i = e.id === r;
|
|
4839
4901
|
return /* @__PURE__ */ t("div", {
|
|
4840
4902
|
id: `${l}-panel-${n}`,
|
|
4841
|
-
className:
|
|
4903
|
+
className: yi.panel,
|
|
4842
4904
|
role: "tabpanel",
|
|
4843
4905
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4844
4906
|
tabIndex: 0,
|
|
@@ -4848,7 +4910,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4848
4910
|
})
|
|
4849
4911
|
})]
|
|
4850
4912
|
});
|
|
4851
|
-
},
|
|
4913
|
+
}, xi = (e) => {
|
|
4852
4914
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4853
4915
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
4854
4916
|
return n ? `${n}:${a}` : a;
|
|
@@ -4881,19 +4943,19 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4881
4943
|
settingsActionLabel: "_settingsActionLabel_m0ykf_693",
|
|
4882
4944
|
caption: "_caption_m0ykf_705",
|
|
4883
4945
|
fullscreen: "_fullscreen_m0ykf_719"
|
|
4884
|
-
},
|
|
4946
|
+
}, Si = 2500, Ci = 5, wi = .05, Ti = [
|
|
4885
4947
|
.5,
|
|
4886
4948
|
.75,
|
|
4887
4949
|
1,
|
|
4888
4950
|
1.25,
|
|
4889
4951
|
1.5,
|
|
4890
4952
|
2
|
|
4891
|
-
],
|
|
4953
|
+
], Ei = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
|
|
4892
4954
|
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [k, A] = g(!1), [j, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, ee] = g(1), [te, B] = g(!!v.muted), [ne, U] = g(1), [W, re] = g(!!v.loop), [G, ie] = g(-1), [ae, oe] = g(!1), [se, K] = g(!0), [ce, le] = g(!1), [ue, de] = g(!1), fe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), pe = i.map((e, t) => ({
|
|
4893
4955
|
track: e,
|
|
4894
4956
|
index: t
|
|
4895
4957
|
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), me = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !me && r.length > 0, q = !he && !me && r.length === 0, ge = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, _e = l(() => {
|
|
4896
|
-
K(!0), window.clearTimeout(S.current), k && !ae && (S.current = window.setTimeout(() => K(!1),
|
|
4958
|
+
K(!0), window.clearTimeout(S.current), k && !ae && (S.current = window.setTimeout(() => K(!1), Si));
|
|
4897
4959
|
}, [k, ae]);
|
|
4898
4960
|
d(() => {
|
|
4899
4961
|
w(!1), E(r.length > 0), O(!1), A(!1), M(!1), P(0), I(0), R(0);
|
|
@@ -4952,7 +5014,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4952
5014
|
let t = e.target;
|
|
4953
5015
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4954
5016
|
let n = e.key.toLowerCase();
|
|
4955
|
-
n === " " || n === "k" ? (e.preventDefault(), ve()) : n === "m" ? (e.preventDefault(), ye()) : n === "f" ? (e.preventDefault(), Se()) : n === "c" && pe.length ? (e.preventDefault(), we(G === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), xe(N + (e.key === "ArrowRight" ?
|
|
5017
|
+
n === " " || n === "k" ? (e.preventDefault(), ve()) : n === "m" ? (e.preventDefault(), ye()) : n === "f" ? (e.preventDefault(), Se()) : n === "c" && pe.length ? (e.preventDefault(), we(G === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), xe(N + (e.key === "ArrowRight" ? Ci : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), be(z + (e.key === "ArrowUp" ? wi : -.05))) : e.key === "Escape" && oe(!1), _e();
|
|
4956
5018
|
}, Ee = () => {
|
|
4957
5019
|
let e = x.current;
|
|
4958
5020
|
w(!1), E(!0), e?.load();
|
|
@@ -5051,7 +5113,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5051
5113
|
"aria-hidden": "true",
|
|
5052
5114
|
children: /* @__PURE__ */ t("div", {
|
|
5053
5115
|
className: $.loaderScale,
|
|
5054
|
-
children: /* @__PURE__ */ t(
|
|
5116
|
+
children: /* @__PURE__ */ t(ui, {})
|
|
5055
5117
|
})
|
|
5056
5118
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
5057
5119
|
}),
|
|
@@ -5119,7 +5181,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5119
5181
|
let t = Number(e.target.value);
|
|
5120
5182
|
x.current && (x.current.playbackRate = t);
|
|
5121
5183
|
},
|
|
5122
|
-
children:
|
|
5184
|
+
children: Ti.map((e) => /* @__PURE__ */ n("option", {
|
|
5123
5185
|
value: e,
|
|
5124
5186
|
children: [e, "×"]
|
|
5125
5187
|
}, e))
|
|
@@ -5206,7 +5268,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5206
5268
|
children: [
|
|
5207
5269
|
/* @__PURE__ */ t("span", {
|
|
5208
5270
|
className: $.time,
|
|
5209
|
-
children:
|
|
5271
|
+
children: xi(N)
|
|
5210
5272
|
}),
|
|
5211
5273
|
/* @__PURE__ */ t("input", {
|
|
5212
5274
|
className: $.timeline,
|
|
@@ -5217,12 +5279,12 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5217
5279
|
step: .01,
|
|
5218
5280
|
value: Math.min(N, F || 0),
|
|
5219
5281
|
"aria-label": "Позиция воспроизведения",
|
|
5220
|
-
"aria-valuetext": `${
|
|
5282
|
+
"aria-valuetext": `${xi(N)} из ${xi(F)}`,
|
|
5221
5283
|
onChange: (e) => xe(Number(e.target.value))
|
|
5222
5284
|
}),
|
|
5223
5285
|
/* @__PURE__ */ t("span", {
|
|
5224
5286
|
className: $.time,
|
|
5225
|
-
children:
|
|
5287
|
+
children: xi(F)
|
|
5226
5288
|
})
|
|
5227
5289
|
]
|
|
5228
5290
|
}),
|
|
@@ -5262,7 +5324,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5262
5324
|
children: a
|
|
5263
5325
|
})]
|
|
5264
5326
|
});
|
|
5265
|
-
},
|
|
5327
|
+
}, Di = {
|
|
5266
5328
|
root: "_root_14ewt_1",
|
|
5267
5329
|
topSlot: "_topSlot_14ewt_29",
|
|
5268
5330
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -5280,14 +5342,14 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5280
5342
|
description: "_description_14ewt_235",
|
|
5281
5343
|
badge: "_badge_14ewt_269",
|
|
5282
5344
|
empty: "_empty_14ewt_281"
|
|
5283
|
-
},
|
|
5345
|
+
}, Oi = (e, t, n) => {
|
|
5284
5346
|
if (e.length === 0) return -1;
|
|
5285
5347
|
for (let r = 1; r <= e.length; r += 1) {
|
|
5286
5348
|
let i = (t + n * r + e.length) % e.length;
|
|
5287
5349
|
if (!e[i]?.disabled) return i;
|
|
5288
5350
|
}
|
|
5289
5351
|
return -1;
|
|
5290
|
-
},
|
|
5352
|
+
}, ki = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
5291
5353
|
let m = f(), g = h(null), _ = h({
|
|
5292
5354
|
value: "",
|
|
5293
5355
|
time: 0
|
|
@@ -5299,7 +5361,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5299
5361
|
let n = v.findIndex((e) => e.id === t.id);
|
|
5300
5362
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
5301
5363
|
e.preventDefault();
|
|
5302
|
-
let t =
|
|
5364
|
+
let t = Oi(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
5303
5365
|
x(v[t]);
|
|
5304
5366
|
return;
|
|
5305
5367
|
}
|
|
@@ -5319,26 +5381,26 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5319
5381
|
let a = r.id === i, o = {
|
|
5320
5382
|
children: /* @__PURE__ */ n(e, { children: [
|
|
5321
5383
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5322
|
-
className:
|
|
5384
|
+
className: Di.icon,
|
|
5323
5385
|
"aria-hidden": "true",
|
|
5324
5386
|
children: r.icon
|
|
5325
5387
|
}),
|
|
5326
5388
|
/* @__PURE__ */ n("span", {
|
|
5327
|
-
className:
|
|
5389
|
+
className: Di.copy,
|
|
5328
5390
|
children: [/* @__PURE__ */ t("span", {
|
|
5329
|
-
className:
|
|
5391
|
+
className: Di.label,
|
|
5330
5392
|
children: r.label
|
|
5331
5393
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
5332
|
-
className:
|
|
5394
|
+
className: Di.description,
|
|
5333
5395
|
children: r.description
|
|
5334
5396
|
})]
|
|
5335
5397
|
}),
|
|
5336
5398
|
r.badge && /* @__PURE__ */ t("span", {
|
|
5337
|
-
className:
|
|
5399
|
+
className: Di.badge,
|
|
5338
5400
|
children: r.badge
|
|
5339
5401
|
})
|
|
5340
5402
|
] }),
|
|
5341
|
-
className: `${
|
|
5403
|
+
className: `${Di.link} ${a ? Di.current : ""}`,
|
|
5342
5404
|
tabIndex: r.id === b ? 0 : -1,
|
|
5343
5405
|
"aria-current": a ? "page" : void 0,
|
|
5344
5406
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5354,7 +5416,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5354
5416
|
onKeyDown: (e) => S(e, r)
|
|
5355
5417
|
};
|
|
5356
5418
|
return /* @__PURE__ */ t("li", {
|
|
5357
|
-
className:
|
|
5419
|
+
className: Di.item,
|
|
5358
5420
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
5359
5421
|
href: r.href,
|
|
5360
5422
|
...o,
|
|
@@ -5369,45 +5431,45 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5369
5431
|
};
|
|
5370
5432
|
return /* @__PURE__ */ n("nav", {
|
|
5371
5433
|
ref: g,
|
|
5372
|
-
className: `${
|
|
5434
|
+
className: `${Di.root} ${p}`,
|
|
5373
5435
|
"aria-label": a,
|
|
5374
5436
|
children: [
|
|
5375
5437
|
s && /* @__PURE__ */ t("div", {
|
|
5376
|
-
className:
|
|
5438
|
+
className: Di.topSlot,
|
|
5377
5439
|
children: s
|
|
5378
5440
|
}),
|
|
5379
5441
|
o && /* @__PURE__ */ t("div", {
|
|
5380
|
-
className:
|
|
5442
|
+
className: Di.searchSlot,
|
|
5381
5443
|
children: o
|
|
5382
5444
|
}),
|
|
5383
5445
|
/* @__PURE__ */ n("div", {
|
|
5384
|
-
className:
|
|
5446
|
+
className: Di.groups,
|
|
5385
5447
|
children: [r.map((e) => {
|
|
5386
5448
|
let r = `${m}-${e.id}`;
|
|
5387
5449
|
return /* @__PURE__ */ n("section", {
|
|
5388
|
-
className:
|
|
5450
|
+
className: Di.group,
|
|
5389
5451
|
"aria-labelledby": e.label ? r : void 0,
|
|
5390
5452
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5391
5453
|
id: r,
|
|
5392
|
-
className:
|
|
5454
|
+
className: Di.groupLabel,
|
|
5393
5455
|
children: e.label
|
|
5394
5456
|
}), /* @__PURE__ */ t("ul", {
|
|
5395
|
-
className:
|
|
5457
|
+
className: Di.list,
|
|
5396
5458
|
children: e.items.map(C)
|
|
5397
5459
|
})]
|
|
5398
5460
|
}, e.id);
|
|
5399
5461
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5400
|
-
className:
|
|
5462
|
+
className: Di.empty,
|
|
5401
5463
|
children: l
|
|
5402
5464
|
})]
|
|
5403
5465
|
}),
|
|
5404
5466
|
c && /* @__PURE__ */ t("div", {
|
|
5405
|
-
className:
|
|
5467
|
+
className: Di.bottomSlot,
|
|
5406
5468
|
children: c
|
|
5407
5469
|
})
|
|
5408
5470
|
]
|
|
5409
5471
|
});
|
|
5410
|
-
},
|
|
5472
|
+
}, Ai = {
|
|
5411
5473
|
root: "_root_2mdgb_1",
|
|
5412
5474
|
list: "_list_2mdgb_19",
|
|
5413
5475
|
item: "_item_2mdgb_37",
|
|
@@ -5417,7 +5479,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5417
5479
|
icon: "_icon_2mdgb_141",
|
|
5418
5480
|
badge: "_badge_2mdgb_149",
|
|
5419
5481
|
label: "_label_2mdgb_163"
|
|
5420
|
-
},
|
|
5482
|
+
}, ji = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5421
5483
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5422
5484
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5423
5485
|
}, p = (e, t) => {
|
|
@@ -5434,27 +5496,27 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5434
5496
|
};
|
|
5435
5497
|
return /* @__PURE__ */ t("nav", {
|
|
5436
5498
|
ref: l,
|
|
5437
|
-
className: `${
|
|
5499
|
+
className: `${Ai.root} ${c}`,
|
|
5438
5500
|
"aria-label": a,
|
|
5439
5501
|
children: /* @__PURE__ */ t("ul", {
|
|
5440
|
-
className:
|
|
5502
|
+
className: Ai.list,
|
|
5441
5503
|
children: r.map((r) => {
|
|
5442
5504
|
let a = r.id === i, c = {
|
|
5443
5505
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5444
|
-
className:
|
|
5506
|
+
className: Ai.visual,
|
|
5445
5507
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5446
|
-
className:
|
|
5508
|
+
className: Ai.icon,
|
|
5447
5509
|
"aria-hidden": "true",
|
|
5448
5510
|
children: r.icon
|
|
5449
5511
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5450
|
-
className:
|
|
5512
|
+
className: Ai.badge,
|
|
5451
5513
|
children: r.badge
|
|
5452
5514
|
})]
|
|
5453
5515
|
}), /* @__PURE__ */ t("span", {
|
|
5454
|
-
className:
|
|
5516
|
+
className: Ai.label,
|
|
5455
5517
|
children: r.label
|
|
5456
5518
|
})] }),
|
|
5457
|
-
className: `${
|
|
5519
|
+
className: `${Ai.link} ${a ? Ai.current : ""}`,
|
|
5458
5520
|
tabIndex: r.id === d ? 0 : -1,
|
|
5459
5521
|
"aria-current": a ? "page" : void 0,
|
|
5460
5522
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5470,7 +5532,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5470
5532
|
onKeyDown: (e) => p(e, r)
|
|
5471
5533
|
};
|
|
5472
5534
|
return /* @__PURE__ */ t("li", {
|
|
5473
|
-
className:
|
|
5535
|
+
className: Ai.item,
|
|
5474
5536
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5475
5537
|
href: r.href,
|
|
5476
5538
|
...c,
|
|
@@ -5485,7 +5547,7 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5485
5547
|
})
|
|
5486
5548
|
})
|
|
5487
5549
|
});
|
|
5488
|
-
},
|
|
5550
|
+
}, Mi = {
|
|
5489
5551
|
logo: "_logo_1kw5e_17",
|
|
5490
5552
|
edgeStart: "_edgeStart_1kw5e_33",
|
|
5491
5553
|
edgeMiddle: "_edgeMiddle_1kw5e_41",
|
|
@@ -5500,19 +5562,19 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5500
5562
|
wordmark: "_wordmark_1kw5e_127",
|
|
5501
5563
|
edge: "_edge_1kw5e_33",
|
|
5502
5564
|
pane: "_pane_1kw5e_57"
|
|
5503
|
-
},
|
|
5565
|
+
}, Ni = {
|
|
5504
5566
|
sm: 24,
|
|
5505
5567
|
md: 40,
|
|
5506
5568
|
lg: 56
|
|
5507
|
-
},
|
|
5569
|
+
}, Pi = {
|
|
5508
5570
|
icon: "0 0 128 224",
|
|
5509
5571
|
wordmark: "0 0 600 160",
|
|
5510
5572
|
lockup: "0 0 675 200"
|
|
5511
|
-
},
|
|
5573
|
+
}, Fi = {
|
|
5512
5574
|
icon: 128 / 224,
|
|
5513
5575
|
wordmark: 600 / 160,
|
|
5514
5576
|
lockup: 675 / 200
|
|
5515
|
-
},
|
|
5577
|
+
}, Ii = ({ id: e, transform: r }) => /* @__PURE__ */ n("g", {
|
|
5516
5578
|
transform: r,
|
|
5517
5579
|
children: [
|
|
5518
5580
|
/* @__PURE__ */ n("defs", { children: [
|
|
@@ -5524,14 +5586,14 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5524
5586
|
y2: "216",
|
|
5525
5587
|
gradientUnits: "userSpaceOnUse",
|
|
5526
5588
|
children: [
|
|
5527
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5589
|
+
/* @__PURE__ */ t("stop", { className: Mi.edgeStart }),
|
|
5528
5590
|
/* @__PURE__ */ t("stop", {
|
|
5529
5591
|
offset: "0.52",
|
|
5530
|
-
className:
|
|
5592
|
+
className: Mi.edgeMiddle
|
|
5531
5593
|
}),
|
|
5532
5594
|
/* @__PURE__ */ t("stop", {
|
|
5533
5595
|
offset: "1",
|
|
5534
|
-
className:
|
|
5596
|
+
className: Mi.edgeEnd
|
|
5535
5597
|
})
|
|
5536
5598
|
]
|
|
5537
5599
|
}),
|
|
@@ -5543,14 +5605,14 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5543
5605
|
y2: "199",
|
|
5544
5606
|
gradientUnits: "userSpaceOnUse",
|
|
5545
5607
|
children: [
|
|
5546
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5608
|
+
/* @__PURE__ */ t("stop", { className: Mi.paneStart }),
|
|
5547
5609
|
/* @__PURE__ */ t("stop", {
|
|
5548
5610
|
offset: "0.52",
|
|
5549
|
-
className:
|
|
5611
|
+
className: Mi.paneMiddle
|
|
5550
5612
|
}),
|
|
5551
5613
|
/* @__PURE__ */ t("stop", {
|
|
5552
5614
|
offset: "1",
|
|
5553
|
-
className:
|
|
5615
|
+
className: Mi.paneEnd
|
|
5554
5616
|
})
|
|
5555
5617
|
]
|
|
5556
5618
|
}),
|
|
@@ -5562,25 +5624,25 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5562
5624
|
y2: "176",
|
|
5563
5625
|
gradientUnits: "userSpaceOnUse",
|
|
5564
5626
|
children: [
|
|
5565
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5627
|
+
/* @__PURE__ */ t("stop", { className: Mi.sheenStart }),
|
|
5566
5628
|
/* @__PURE__ */ t("stop", {
|
|
5567
5629
|
offset: "0.42",
|
|
5568
|
-
className:
|
|
5630
|
+
className: Mi.sheenMiddle
|
|
5569
5631
|
}),
|
|
5570
5632
|
/* @__PURE__ */ t("stop", {
|
|
5571
5633
|
offset: "1",
|
|
5572
|
-
className:
|
|
5634
|
+
className: Mi.sheenEnd
|
|
5573
5635
|
})
|
|
5574
5636
|
]
|
|
5575
5637
|
})
|
|
5576
5638
|
] }),
|
|
5577
5639
|
/* @__PURE__ */ t("path", {
|
|
5578
|
-
className:
|
|
5640
|
+
className: Mi.edge,
|
|
5579
5641
|
d: "M12 13.5 28 8v208l-16-5.5z",
|
|
5580
5642
|
fill: `url(#${e}-edge)`
|
|
5581
5643
|
}),
|
|
5582
5644
|
/* @__PURE__ */ t("path", {
|
|
5583
|
-
className:
|
|
5645
|
+
className: Mi.pane,
|
|
5584
5646
|
d: "M28 8 116 51.5v121L28 216z",
|
|
5585
5647
|
fill: `url(#${e}-pane)`
|
|
5586
5648
|
}),
|
|
@@ -5589,22 +5651,22 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5589
5651
|
fill: `url(#${e}-sheen)`
|
|
5590
5652
|
}),
|
|
5591
5653
|
/* @__PURE__ */ t("path", {
|
|
5592
|
-
className:
|
|
5654
|
+
className: Mi.rim,
|
|
5593
5655
|
d: "M115 53v118.5l-4.5 2.5V55.2z"
|
|
5594
5656
|
})
|
|
5595
5657
|
]
|
|
5596
|
-
}),
|
|
5597
|
-
className:
|
|
5658
|
+
}), Li = ({ transform: e }) => /* @__PURE__ */ t("text", {
|
|
5659
|
+
className: Mi.wordmark,
|
|
5598
5660
|
x: "8",
|
|
5599
5661
|
y: "128",
|
|
5600
5662
|
transform: e,
|
|
5601
5663
|
children: "Стекло"
|
|
5602
|
-
}),
|
|
5603
|
-
let p = `ds-logo-${f().replaceAll(":", "")}`, m = l ?? (typeof i == "number" ? Math.max(1, i) :
|
|
5664
|
+
}), Ri = ({ variant: r = "lockup", size: i = "md", decorative: a = !1, className: o = "", title: s = "Стекло", width: c, height: l, "aria-label": u, ...d }) => {
|
|
5665
|
+
let p = `ds-logo-${f().replaceAll(":", "")}`, m = l ?? (typeof i == "number" ? Math.max(1, i) : Ni[i]), h = typeof m == "number" ? m : Ni.md, g = c ?? Number((h * Fi[r]).toFixed(2)), _ = `${p}-title`;
|
|
5604
5666
|
return /* @__PURE__ */ n("svg", {
|
|
5605
5667
|
...d,
|
|
5606
|
-
className: `${
|
|
5607
|
-
viewBox:
|
|
5668
|
+
className: `${Mi.logo} ${o}`,
|
|
5669
|
+
viewBox: Pi[r],
|
|
5608
5670
|
width: g,
|
|
5609
5671
|
height: m,
|
|
5610
5672
|
role: a ? void 0 : "img",
|
|
@@ -5617,101 +5679,530 @@ var mr = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5617
5679
|
id: _,
|
|
5618
5680
|
children: s
|
|
5619
5681
|
}),
|
|
5620
|
-
r === "icon" && /* @__PURE__ */ t(
|
|
5621
|
-
r === "wordmark" && /* @__PURE__ */ t(
|
|
5622
|
-
r === "lockup" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
5682
|
+
r === "icon" && /* @__PURE__ */ t(Ii, { id: p }),
|
|
5683
|
+
r === "wordmark" && /* @__PURE__ */ t(Li, {}),
|
|
5684
|
+
r === "lockup" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(Ii, {
|
|
5623
5685
|
id: p,
|
|
5624
5686
|
transform: "translate(16 0) scale(.86)"
|
|
5625
|
-
}), /* @__PURE__ */ t(
|
|
5687
|
+
}), /* @__PURE__ */ t(Li, { transform: "translate(156 36) scale(.84)" })] })
|
|
5626
5688
|
]
|
|
5627
5689
|
});
|
|
5628
|
-
},
|
|
5690
|
+
}, zi = {
|
|
5629
5691
|
brand: "_brand_uueok_1",
|
|
5630
5692
|
symbol: "_symbol_uueok_25",
|
|
5631
5693
|
identity: "_identity_uueok_33",
|
|
5632
5694
|
collapsed: "_collapsed_uueok_55",
|
|
5633
5695
|
wordmark: "_wordmark_uueok_63",
|
|
5634
5696
|
serviceName: "_serviceName_uueok_71"
|
|
5635
|
-
},
|
|
5697
|
+
}, Bi = ({ serviceName: e, collapsed: r = !1, logoSize: i, className: a = "", "aria-label": o, ...s }) => {
|
|
5636
5698
|
let c = o ?? `Стекло. ${e}`;
|
|
5637
5699
|
return /* @__PURE__ */ n("div", {
|
|
5638
5700
|
...s,
|
|
5639
|
-
className: `${
|
|
5701
|
+
className: `${zi.brand} ${r ? zi.collapsed : ""} ${a}`,
|
|
5640
5702
|
"data-collapsed": r || void 0,
|
|
5641
5703
|
"aria-label": c,
|
|
5642
5704
|
title: r ? c : s.title,
|
|
5643
|
-
children: [/* @__PURE__ */ t(
|
|
5644
|
-
className:
|
|
5705
|
+
children: [/* @__PURE__ */ t(Ri, {
|
|
5706
|
+
className: zi.symbol,
|
|
5645
5707
|
variant: "icon",
|
|
5646
5708
|
size: i ?? 44,
|
|
5647
5709
|
decorative: !0
|
|
5648
5710
|
}), /* @__PURE__ */ n("span", {
|
|
5649
|
-
className:
|
|
5711
|
+
className: zi.identity,
|
|
5650
5712
|
"aria-hidden": "true",
|
|
5651
|
-
children: [/* @__PURE__ */ t(
|
|
5652
|
-
className:
|
|
5713
|
+
children: [/* @__PURE__ */ t(Ri, {
|
|
5714
|
+
className: zi.wordmark,
|
|
5653
5715
|
variant: "wordmark",
|
|
5654
5716
|
size: 32,
|
|
5655
5717
|
decorative: !0
|
|
5656
5718
|
}), /* @__PURE__ */ t("span", {
|
|
5657
|
-
className:
|
|
5719
|
+
className: zi.serviceName,
|
|
5658
5720
|
title: e,
|
|
5659
5721
|
children: e
|
|
5660
5722
|
})]
|
|
5661
5723
|
})]
|
|
5662
5724
|
});
|
|
5663
|
-
},
|
|
5725
|
+
}, Vi = {
|
|
5726
|
+
root: "_root_og7ux_1",
|
|
5727
|
+
default: "_default_og7ux_33",
|
|
5728
|
+
compact: "_compact_og7ux_41",
|
|
5729
|
+
header: "_header_og7ux_67",
|
|
5730
|
+
content: "_content_og7ux_69",
|
|
5731
|
+
footer: "_footer_og7ux_71",
|
|
5732
|
+
activation: "_activation_og7ux_79",
|
|
5733
|
+
heading: "_heading_og7ux_119",
|
|
5734
|
+
actions: "_actions_og7ux_121",
|
|
5735
|
+
icon: "_icon_og7ux_151",
|
|
5736
|
+
title: "_title_og7ux_163",
|
|
5737
|
+
loading: "_loading_og7ux_219",
|
|
5738
|
+
spinner: "_spinner_og7ux_239",
|
|
5739
|
+
"video-widget-spin": "_video-widget-spin_og7ux_1",
|
|
5740
|
+
visuallyHidden: "_visuallyHidden_og7ux_257"
|
|
5741
|
+
}, Hi = ({ children: e, title: r, icon: i, actions: a, footer: o, className: s = "", density: c = "default", selected: l = !1, disabled: u = !1, loading: d = !1, loadingLabel: p = "Загрузка виджета", onActivate: m, activationLabel: h = "Открыть детализацию виджета" }) => {
|
|
5742
|
+
let g = f(), _ = !!m;
|
|
5743
|
+
return /* @__PURE__ */ n("section", {
|
|
5744
|
+
className: `${Vi.root} ${Vi[c]} ${s}`,
|
|
5745
|
+
"aria-labelledby": r ? g : void 0,
|
|
5746
|
+
"aria-busy": d || void 0,
|
|
5747
|
+
"data-selected": l || void 0,
|
|
5748
|
+
"data-disabled": u || void 0,
|
|
5749
|
+
"data-interactive": _ || void 0,
|
|
5750
|
+
children: [
|
|
5751
|
+
_ && /* @__PURE__ */ t("button", {
|
|
5752
|
+
type: "button",
|
|
5753
|
+
className: Vi.activation,
|
|
5754
|
+
"aria-label": h,
|
|
5755
|
+
disabled: u || d,
|
|
5756
|
+
onClick: m
|
|
5757
|
+
}),
|
|
5758
|
+
(r || i || a) && /* @__PURE__ */ n("header", {
|
|
5759
|
+
className: Vi.header,
|
|
5760
|
+
children: [/* @__PURE__ */ n("div", {
|
|
5761
|
+
className: Vi.heading,
|
|
5762
|
+
children: [i && /* @__PURE__ */ t("span", {
|
|
5763
|
+
className: Vi.icon,
|
|
5764
|
+
"aria-hidden": "true",
|
|
5765
|
+
children: i
|
|
5766
|
+
}), r && /* @__PURE__ */ t("h3", {
|
|
5767
|
+
id: g,
|
|
5768
|
+
className: Vi.title,
|
|
5769
|
+
children: r
|
|
5770
|
+
})]
|
|
5771
|
+
}), a && /* @__PURE__ */ t("div", {
|
|
5772
|
+
className: Vi.actions,
|
|
5773
|
+
children: a
|
|
5774
|
+
})]
|
|
5775
|
+
}),
|
|
5776
|
+
/* @__PURE__ */ t("div", {
|
|
5777
|
+
className: Vi.content,
|
|
5778
|
+
children: e
|
|
5779
|
+
}),
|
|
5780
|
+
o && /* @__PURE__ */ t("footer", {
|
|
5781
|
+
className: Vi.footer,
|
|
5782
|
+
children: o
|
|
5783
|
+
}),
|
|
5784
|
+
d && /* @__PURE__ */ n("span", {
|
|
5785
|
+
className: Vi.loading,
|
|
5786
|
+
role: "status",
|
|
5787
|
+
children: [/* @__PURE__ */ t("span", {
|
|
5788
|
+
className: Vi.spinner,
|
|
5789
|
+
"aria-hidden": "true"
|
|
5790
|
+
}), /* @__PURE__ */ t("span", {
|
|
5791
|
+
className: Vi.visuallyHidden,
|
|
5792
|
+
children: p
|
|
5793
|
+
})]
|
|
5794
|
+
})
|
|
5795
|
+
]
|
|
5796
|
+
});
|
|
5797
|
+
}, Ui = {
|
|
5798
|
+
root: "_root_pga9d_1",
|
|
5799
|
+
muted: "_muted_pga9d_19",
|
|
5800
|
+
layout: "_layout_pga9d_29",
|
|
5801
|
+
camera: "_camera_pga9d_43",
|
|
5802
|
+
copy: "_copy_pga9d_65",
|
|
5803
|
+
title: "_title_pga9d_73",
|
|
5804
|
+
metadata: "_metadata_pga9d_75",
|
|
5805
|
+
severity: "_severity_pga9d_111",
|
|
5806
|
+
neutral: "_neutral_pga9d_131",
|
|
5807
|
+
info: "_info_pga9d_139",
|
|
5808
|
+
success: "_success_pga9d_147",
|
|
5809
|
+
warning: "_warning_pga9d_155",
|
|
5810
|
+
error: "_error_pga9d_163"
|
|
5811
|
+
}, Wi = {
|
|
5812
|
+
neutral: "IconInfoCircle",
|
|
5813
|
+
info: "IconInfoCircle",
|
|
5814
|
+
success: "IconCircleCheck",
|
|
5815
|
+
warning: "IconCircleAlert",
|
|
5816
|
+
error: "IconErrorCircle"
|
|
5817
|
+
}, Gi = ({ title: e, metadata: r = [], severity: i = "neutral", severityLabel: a, cameraLabel: o = "Открыть видео нарушения", cameraIcon: s = "IconVideo", onCameraClick: c, selected: l = !1, muted: u = !1, disabled: d = !1, className: f = "" }) => /* @__PURE__ */ t(Hi, {
|
|
5818
|
+
className: `${Ui.root} ${u ? Ui.muted : ""} ${f}`,
|
|
5819
|
+
density: "compact",
|
|
5820
|
+
selected: l,
|
|
5821
|
+
disabled: d,
|
|
5822
|
+
children: /* @__PURE__ */ n("div", {
|
|
5823
|
+
className: Ui.layout,
|
|
5824
|
+
children: [
|
|
5825
|
+
/* @__PURE__ */ t(H, {
|
|
5826
|
+
className: Ui.camera,
|
|
5827
|
+
variant: "empty",
|
|
5828
|
+
size: "sm",
|
|
5829
|
+
"aria-label": o,
|
|
5830
|
+
disabled: d || !c,
|
|
5831
|
+
onClick: c,
|
|
5832
|
+
children: /* @__PURE__ */ t(Y, {
|
|
5833
|
+
name: s,
|
|
5834
|
+
width: 18,
|
|
5835
|
+
height: 18
|
|
5836
|
+
})
|
|
5837
|
+
}),
|
|
5838
|
+
/* @__PURE__ */ n("div", {
|
|
5839
|
+
className: Ui.copy,
|
|
5840
|
+
children: [/* @__PURE__ */ t("div", {
|
|
5841
|
+
className: Ui.title,
|
|
5842
|
+
children: e
|
|
5843
|
+
}), r.map((e, n) => /* @__PURE__ */ t("div", {
|
|
5844
|
+
className: Ui.metadata,
|
|
5845
|
+
children: e
|
|
5846
|
+
}, n))]
|
|
5847
|
+
}),
|
|
5848
|
+
/* @__PURE__ */ t("span", {
|
|
5849
|
+
className: `${Ui.severity} ${Ui[i]}`,
|
|
5850
|
+
role: "img",
|
|
5851
|
+
"aria-label": a,
|
|
5852
|
+
title: a,
|
|
5853
|
+
children: /* @__PURE__ */ t(Y, {
|
|
5854
|
+
name: Wi[i],
|
|
5855
|
+
width: 18,
|
|
5856
|
+
height: 18
|
|
5857
|
+
})
|
|
5858
|
+
})
|
|
5859
|
+
]
|
|
5860
|
+
})
|
|
5861
|
+
}), Ki = {
|
|
5862
|
+
root: "_root_1gtns_1",
|
|
5863
|
+
list: "_list_1gtns_27",
|
|
5864
|
+
scrollable: "_scrollable_1gtns_41",
|
|
5865
|
+
branch: "_branch_1gtns_59",
|
|
5866
|
+
leaf: "_leaf_1gtns_61",
|
|
5867
|
+
selected: "_selected_1gtns_157",
|
|
5868
|
+
itemHeading: "_itemHeading_1gtns_167",
|
|
5869
|
+
status: "_status_1gtns_185",
|
|
5870
|
+
neutral: "_neutral_1gtns_201",
|
|
5871
|
+
info: "_info_1gtns_209",
|
|
5872
|
+
success: "_success_1gtns_217",
|
|
5873
|
+
warning: "_warning_1gtns_225",
|
|
5874
|
+
error: "_error_1gtns_233",
|
|
5875
|
+
itemIcon: "_itemIcon_1gtns_241",
|
|
5876
|
+
itemCopy: "_itemCopy_1gtns_275",
|
|
5877
|
+
itemLabel: "_itemLabel_1gtns_285",
|
|
5878
|
+
itemMetadata: "_itemMetadata_1gtns_287",
|
|
5879
|
+
count: "_count_1gtns_323",
|
|
5880
|
+
leafChevron: "_leafChevron_1gtns_349",
|
|
5881
|
+
empty: "_empty_1gtns_361"
|
|
5882
|
+
}, qi = ({ items: e, depth: r, expanded: i, selectedId: a, scrollDepth: o, visibleRows: s, onToggle: c, onSelect: l }) => {
|
|
5883
|
+
let u = o === r, d = {
|
|
5884
|
+
"--video-navigation-visible-rows": s,
|
|
5885
|
+
"--video-navigation-depth": r
|
|
5886
|
+
};
|
|
5887
|
+
return /* @__PURE__ */ t("div", {
|
|
5888
|
+
className: `${Ki.list} ${u ? Ki.scrollable : ""}`,
|
|
5889
|
+
style: d,
|
|
5890
|
+
"data-depth": r,
|
|
5891
|
+
children: e.map((e) => {
|
|
5892
|
+
let u = !!e.children?.length, d = e.id === a, f = /* @__PURE__ */ n("span", {
|
|
5893
|
+
className: Ki.itemHeading,
|
|
5894
|
+
children: [
|
|
5895
|
+
e.status && /* @__PURE__ */ t("span", {
|
|
5896
|
+
className: `${Ki.status} ${Ki[e.status]}`,
|
|
5897
|
+
"aria-hidden": "true"
|
|
5898
|
+
}),
|
|
5899
|
+
e.icon && /* @__PURE__ */ t("span", {
|
|
5900
|
+
className: Ki.itemIcon,
|
|
5901
|
+
"aria-hidden": "true",
|
|
5902
|
+
children: e.icon
|
|
5903
|
+
}),
|
|
5904
|
+
/* @__PURE__ */ n("span", {
|
|
5905
|
+
className: Ki.itemCopy,
|
|
5906
|
+
children: [/* @__PURE__ */ t("span", {
|
|
5907
|
+
className: Ki.itemLabel,
|
|
5908
|
+
children: e.label
|
|
5909
|
+
}), e.metadata && /* @__PURE__ */ t("span", {
|
|
5910
|
+
className: Ki.itemMetadata,
|
|
5911
|
+
children: e.metadata
|
|
5912
|
+
})]
|
|
5913
|
+
}),
|
|
5914
|
+
e.count !== void 0 && /* @__PURE__ */ t("span", {
|
|
5915
|
+
className: Ki.count,
|
|
5916
|
+
children: e.count
|
|
5917
|
+
})
|
|
5918
|
+
]
|
|
5919
|
+
});
|
|
5920
|
+
return u ? /* @__PURE__ */ t(pn, {
|
|
5921
|
+
className: `${Ki.branch} ${d ? Ki.selected : ""}`,
|
|
5922
|
+
title: f,
|
|
5923
|
+
variant: "surface",
|
|
5924
|
+
open: i.has(e.id),
|
|
5925
|
+
disabled: e.disabled,
|
|
5926
|
+
autoScrollOnOpen: !1,
|
|
5927
|
+
onOpenChange: (t) => {
|
|
5928
|
+
l(e), c(e.id, t);
|
|
5929
|
+
},
|
|
5930
|
+
children: /* @__PURE__ */ t(qi, {
|
|
5931
|
+
items: e.children ?? [],
|
|
5932
|
+
depth: r + 1,
|
|
5933
|
+
expanded: i,
|
|
5934
|
+
selectedId: a,
|
|
5935
|
+
scrollDepth: o,
|
|
5936
|
+
visibleRows: s,
|
|
5937
|
+
onToggle: c,
|
|
5938
|
+
onSelect: l
|
|
5939
|
+
})
|
|
5940
|
+
}, e.id) : /* @__PURE__ */ n("button", {
|
|
5941
|
+
type: "button",
|
|
5942
|
+
className: `${Ki.leaf} ${d ? Ki.selected : ""}`,
|
|
5943
|
+
disabled: e.disabled,
|
|
5944
|
+
"aria-current": d ? "true" : void 0,
|
|
5945
|
+
onClick: () => l(e),
|
|
5946
|
+
children: [f, /* @__PURE__ */ t(Y, {
|
|
5947
|
+
className: Ki.leafChevron,
|
|
5948
|
+
name: "IconChevronRight",
|
|
5949
|
+
width: 18,
|
|
5950
|
+
height: 18
|
|
5951
|
+
})]
|
|
5952
|
+
}, e.id);
|
|
5953
|
+
})
|
|
5954
|
+
});
|
|
5955
|
+
}, Ji = ({ items: e, title: n, ariaLabel: r = "Навигация по объектам видеоаналитики", expandedIds: i, defaultExpandedIds: a = [], onExpandedIdsChange: o, selectedId: s, defaultSelectedId: c, onSelectedIdChange: l, scrollDepth: u, visibleRows: d = 3, emptyContent: f = "Нет доступных элементов", className: p = "" }) => {
|
|
5956
|
+
let [h, _] = g(a), [v, y] = g(c), b = i ?? h, x = s ?? v, S = m(() => new Set(b), [b]);
|
|
5957
|
+
return /* @__PURE__ */ t(Hi, {
|
|
5958
|
+
className: `${Ki.root} ${p}`,
|
|
5959
|
+
title: n,
|
|
5960
|
+
children: /* @__PURE__ */ t("nav", {
|
|
5961
|
+
"aria-label": r,
|
|
5962
|
+
children: e.length ? /* @__PURE__ */ t(qi, {
|
|
5963
|
+
items: e,
|
|
5964
|
+
depth: 0,
|
|
5965
|
+
expanded: S,
|
|
5966
|
+
selectedId: x,
|
|
5967
|
+
scrollDepth: u,
|
|
5968
|
+
visibleRows: Math.max(1, d),
|
|
5969
|
+
onToggle: (e, t) => {
|
|
5970
|
+
let n = t ? [.../* @__PURE__ */ new Set([...b, e])] : b.filter((t) => t !== e);
|
|
5971
|
+
i === void 0 && _(n), o?.(n);
|
|
5972
|
+
},
|
|
5973
|
+
onSelect: (e) => {
|
|
5974
|
+
e.disabled || (s === void 0 && y(e.id), l?.(e.id));
|
|
5975
|
+
}
|
|
5976
|
+
}) : /* @__PURE__ */ t("div", {
|
|
5977
|
+
className: Ki.empty,
|
|
5978
|
+
children: f
|
|
5979
|
+
})
|
|
5980
|
+
})
|
|
5981
|
+
});
|
|
5982
|
+
}, Yi = {
|
|
5983
|
+
layer: "_layer_a6v3r_1",
|
|
5984
|
+
panel: "_panel_a6v3r_23",
|
|
5985
|
+
"video-statistics-enter": "_video-statistics-enter_a6v3r_1",
|
|
5986
|
+
header: "_header_a6v3r_59",
|
|
5987
|
+
hasBack: "_hasBack_a6v3r_77",
|
|
5988
|
+
heading: "_heading_a6v3r_85",
|
|
5989
|
+
title: "_title_a6v3r_93",
|
|
5990
|
+
subtitle: "_subtitle_a6v3r_95",
|
|
5991
|
+
actions: "_actions_a6v3r_131",
|
|
5992
|
+
summary: "_summary_a6v3r_143",
|
|
5993
|
+
toolbar: "_toolbar_a6v3r_155",
|
|
5994
|
+
content: "_content_a6v3r_171",
|
|
5995
|
+
footer: "_footer_a6v3r_179",
|
|
5996
|
+
back: "_back_a6v3r_229"
|
|
5997
|
+
}, Xi = (e, t, n) => Math.min(Math.max(e, t), Math.max(t, n)), Zi = ({ anchor: e, placement: t, strategy: n, viewportWidth: r, viewportHeight: i, scrollX: a, scrollY: o, offset: s, viewportPadding: c, maxWidth: l }) => {
|
|
5998
|
+
let u = Math.min(l, r - c * 2), d = n === "absolute" ? a : 0, f = n === "absolute" ? o : 0;
|
|
5999
|
+
if (t === "center" || !e) return {
|
|
6000
|
+
top: f + c,
|
|
6001
|
+
left: d + (r - u) / 2,
|
|
6002
|
+
width: u,
|
|
6003
|
+
maxHeight: i - c * 2
|
|
6004
|
+
};
|
|
6005
|
+
if (t === "above") {
|
|
6006
|
+
let t = Math.max(160, e.top - s - c);
|
|
6007
|
+
return {
|
|
6008
|
+
bottom: n === "absolute" ? void 0 : i - e.top + s,
|
|
6009
|
+
top: n === "absolute" ? f + c : void 0,
|
|
6010
|
+
left: d + Xi(e.left, c, r - u - c),
|
|
6011
|
+
width: u,
|
|
6012
|
+
maxHeight: t
|
|
6013
|
+
};
|
|
6014
|
+
}
|
|
6015
|
+
if (t === "left" || t === "right") {
|
|
6016
|
+
let n = t === "left" ? e.left - s - c : r - e.right - s - c, a = Math.min(u, Math.max(240, n)), o = t === "left" ? e.left - s - a : e.right + s;
|
|
6017
|
+
return {
|
|
6018
|
+
top: f + Xi(e.top, c, i - c - 160),
|
|
6019
|
+
left: d + Xi(o, c, r - a - c),
|
|
6020
|
+
width: a,
|
|
6021
|
+
maxHeight: i - c * 2
|
|
6022
|
+
};
|
|
6023
|
+
}
|
|
6024
|
+
let p = e.bottom + s;
|
|
6025
|
+
return {
|
|
6026
|
+
top: f + p,
|
|
6027
|
+
left: d + Xi(e.left, c, r - u - c),
|
|
6028
|
+
width: u,
|
|
6029
|
+
maxHeight: Math.max(160, i - p - c)
|
|
6030
|
+
};
|
|
6031
|
+
}, Qi = ({ open: e, anchorRef: r, title: i, subtitle: a, summary: o, toolbar: s, actions: c, children: l, footer: u, placement: m = "below", strategy: v = "fixed", position: y, offset: b = 12, viewportPadding: x = 12, maxWidth: S = 840, canGoBack: C = !1, onBack: w, onClose: T, backLabel: E = "Назад", closeLabel: D = "Закрыть", closeOnEscape: O = !1, className: k = "" }) => {
|
|
6032
|
+
let A = f(), j = f(), M = h(null), N = h(null), [P, F] = g({});
|
|
6033
|
+
return p(() => {
|
|
6034
|
+
if (!e || typeof window > "u") return;
|
|
6035
|
+
let t = () => {
|
|
6036
|
+
let e = r?.current?.getBoundingClientRect(), t = Zi({
|
|
6037
|
+
anchor: e,
|
|
6038
|
+
placement: m,
|
|
6039
|
+
strategy: v,
|
|
6040
|
+
viewportWidth: window.innerWidth,
|
|
6041
|
+
viewportHeight: window.innerHeight,
|
|
6042
|
+
scrollX: window.scrollX,
|
|
6043
|
+
scrollY: window.scrollY,
|
|
6044
|
+
offset: b,
|
|
6045
|
+
viewportPadding: x,
|
|
6046
|
+
maxWidth: S
|
|
6047
|
+
});
|
|
6048
|
+
F({
|
|
6049
|
+
...t,
|
|
6050
|
+
...y
|
|
6051
|
+
});
|
|
6052
|
+
};
|
|
6053
|
+
t();
|
|
6054
|
+
let n = typeof ResizeObserver > "u" ? null : new ResizeObserver(t);
|
|
6055
|
+
return r?.current && n?.observe(r.current), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
|
|
6056
|
+
n?.disconnect(), window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
6057
|
+
};
|
|
6058
|
+
}, [
|
|
6059
|
+
r,
|
|
6060
|
+
S,
|
|
6061
|
+
b,
|
|
6062
|
+
e,
|
|
6063
|
+
m,
|
|
6064
|
+
y,
|
|
6065
|
+
v,
|
|
6066
|
+
x
|
|
6067
|
+
]), d(() => {
|
|
6068
|
+
if (!e) return;
|
|
6069
|
+
let t = document.activeElement;
|
|
6070
|
+
return N.current?.focus(), () => t?.focus();
|
|
6071
|
+
}, [e]), d(() => {
|
|
6072
|
+
if (!e || !O) return;
|
|
6073
|
+
let t = (e) => {
|
|
6074
|
+
e.key === "Escape" && T();
|
|
6075
|
+
};
|
|
6076
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
6077
|
+
}, [
|
|
6078
|
+
O,
|
|
6079
|
+
T,
|
|
6080
|
+
e
|
|
6081
|
+
]), d(() => {
|
|
6082
|
+
e && M.current?.scrollTo({ top: 0 });
|
|
6083
|
+
}, [l, e]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
6084
|
+
className: Yi.layer,
|
|
6085
|
+
"data-strategy": v,
|
|
6086
|
+
children: /* @__PURE__ */ n("section", {
|
|
6087
|
+
ref: M,
|
|
6088
|
+
className: `${Yi.panel} ${k}`,
|
|
6089
|
+
style: {
|
|
6090
|
+
...P,
|
|
6091
|
+
position: v
|
|
6092
|
+
},
|
|
6093
|
+
role: "dialog",
|
|
6094
|
+
"aria-labelledby": A,
|
|
6095
|
+
"aria-describedby": a ? j : void 0,
|
|
6096
|
+
children: [
|
|
6097
|
+
/* @__PURE__ */ n("header", {
|
|
6098
|
+
className: `${Yi.header} ${C ? Yi.hasBack : ""}`,
|
|
6099
|
+
children: [
|
|
6100
|
+
C && w && /* @__PURE__ */ n(H, {
|
|
6101
|
+
className: Yi.back,
|
|
6102
|
+
variant: "outline",
|
|
6103
|
+
size: "sm",
|
|
6104
|
+
onClick: w,
|
|
6105
|
+
children: [/* @__PURE__ */ t(Y, {
|
|
6106
|
+
name: "IconArrowLeft",
|
|
6107
|
+
width: 16,
|
|
6108
|
+
height: 16
|
|
6109
|
+
}), E]
|
|
6110
|
+
}),
|
|
6111
|
+
/* @__PURE__ */ n("div", {
|
|
6112
|
+
className: Yi.heading,
|
|
6113
|
+
children: [/* @__PURE__ */ t("h2", {
|
|
6114
|
+
id: A,
|
|
6115
|
+
className: Yi.title,
|
|
6116
|
+
children: i
|
|
6117
|
+
}), a && /* @__PURE__ */ t("p", {
|
|
6118
|
+
id: j,
|
|
6119
|
+
className: Yi.subtitle,
|
|
6120
|
+
children: a
|
|
6121
|
+
})]
|
|
6122
|
+
}),
|
|
6123
|
+
/* @__PURE__ */ n("div", {
|
|
6124
|
+
className: Yi.actions,
|
|
6125
|
+
children: [c, /* @__PURE__ */ t(H, {
|
|
6126
|
+
ref: N,
|
|
6127
|
+
variant: "primary",
|
|
6128
|
+
size: "sm",
|
|
6129
|
+
onClick: T,
|
|
6130
|
+
children: D
|
|
6131
|
+
})]
|
|
6132
|
+
})
|
|
6133
|
+
]
|
|
6134
|
+
}),
|
|
6135
|
+
o && /* @__PURE__ */ t("div", {
|
|
6136
|
+
className: Yi.summary,
|
|
6137
|
+
children: o
|
|
6138
|
+
}),
|
|
6139
|
+
s && /* @__PURE__ */ t("div", {
|
|
6140
|
+
className: Yi.toolbar,
|
|
6141
|
+
children: s
|
|
6142
|
+
}),
|
|
6143
|
+
/* @__PURE__ */ t("div", {
|
|
6144
|
+
className: Yi.content,
|
|
6145
|
+
children: l
|
|
6146
|
+
}),
|
|
6147
|
+
u && /* @__PURE__ */ t("footer", {
|
|
6148
|
+
className: Yi.footer,
|
|
6149
|
+
children: u
|
|
6150
|
+
})
|
|
6151
|
+
]
|
|
6152
|
+
})
|
|
6153
|
+
}), document.body);
|
|
6154
|
+
}, $i = {
|
|
5664
6155
|
steklo: !0,
|
|
5665
6156
|
reft: !0,
|
|
5666
6157
|
ravis: !1
|
|
5667
|
-
},
|
|
5668
|
-
if (
|
|
6158
|
+
}, ea = "efficiency-point.design-system.all-themes-active", ta = "efficiency-point:theme-availability-change", na = !1, ra = () => {
|
|
6159
|
+
if (na) return !0;
|
|
5669
6160
|
try {
|
|
5670
6161
|
return typeof window < "u" && window.sessionStorage.getItem("efficiency-point.design-system.all-themes-active") === "true";
|
|
5671
6162
|
} catch {
|
|
5672
6163
|
return !1;
|
|
5673
6164
|
}
|
|
5674
|
-
},
|
|
5675
|
-
|
|
6165
|
+
}, ia = (e = $i) => ra() ? C : C.filter((t) => e[t] ?? $i[t]), aa = () => {
|
|
6166
|
+
na = !0;
|
|
5676
6167
|
try {
|
|
5677
|
-
typeof window < "u" && window.sessionStorage.setItem(
|
|
6168
|
+
typeof window < "u" && window.sessionStorage.setItem(ea, "true");
|
|
5678
6169
|
} catch {}
|
|
5679
|
-
return typeof window < "u" && window.dispatchEvent(new Event(
|
|
5680
|
-
},
|
|
6170
|
+
return typeof window < "u" && window.dispatchEvent(new Event(ta)), C;
|
|
6171
|
+
}, oa = (e) => typeof window > "u" ? () => void 0 : (window.addEventListener(ta, e), () => window.removeEventListener(ta, e)), sa = (e) => {
|
|
5681
6172
|
if (typeof window > "u") return;
|
|
5682
6173
|
let t = e ?? window;
|
|
5683
6174
|
try {
|
|
5684
6175
|
Object.defineProperty(t, "activate_themes", {
|
|
5685
6176
|
configurable: !0,
|
|
5686
|
-
value:
|
|
6177
|
+
value: aa
|
|
5687
6178
|
});
|
|
5688
6179
|
} catch {
|
|
5689
6180
|
try {
|
|
5690
|
-
t.activate_themes =
|
|
6181
|
+
t.activate_themes = aa;
|
|
5691
6182
|
} catch {}
|
|
5692
6183
|
}
|
|
5693
6184
|
};
|
|
5694
|
-
|
|
6185
|
+
sa();
|
|
5695
6186
|
try {
|
|
5696
|
-
typeof window < "u" && window.parent !== window &&
|
|
6187
|
+
typeof window < "u" && window.parent !== window && sa(window.parent);
|
|
5697
6188
|
} catch {}
|
|
5698
|
-
var
|
|
6189
|
+
var ca = {
|
|
5699
6190
|
sample: "_sample_15jad_1",
|
|
5700
6191
|
menu: "_menu_15jad_59",
|
|
5701
6192
|
options: "_options_15jad_81",
|
|
5702
6193
|
legend: "_legend_15jad_93",
|
|
5703
6194
|
option: "_option_15jad_81"
|
|
5704
|
-
},
|
|
6195
|
+
}, la = ({ value: r, onChange: i, compact: a = !1, disabled: o = !1, availability: s }) => {
|
|
5705
6196
|
let c = O(r) ?? "reft", [l, u] = g(!1), [, p] = g(0), m = h(null), [_, v] = g(null), y = f();
|
|
5706
|
-
return d(() =>
|
|
6197
|
+
return d(() => oa(() => p((e) => e + 1)), []), d(() => {
|
|
5707
6198
|
if (!l) return;
|
|
5708
6199
|
let e = (e) => {
|
|
5709
6200
|
e.target instanceof Node && !m.current?.contains(e.target) && !_?.contains(e.target) && u(!1);
|
|
5710
6201
|
}, t = (e) => {
|
|
5711
6202
|
e.key === "Escape" && (u(!1), m.current?.focus());
|
|
5712
6203
|
};
|
|
5713
|
-
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
5714
|
-
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
6204
|
+
return document.addEventListener("pointerdown", e, !0), document.addEventListener("keydown", t), () => {
|
|
6205
|
+
document.removeEventListener("pointerdown", e, !0), document.removeEventListener("keydown", t);
|
|
5715
6206
|
};
|
|
5716
6207
|
}, [l, _]), d(() => {
|
|
5717
6208
|
if (!_) return;
|
|
@@ -5729,7 +6220,7 @@ var Di = {
|
|
|
5729
6220
|
children: [
|
|
5730
6221
|
/* @__PURE__ */ t("span", {
|
|
5731
6222
|
"data-ds-theme": c,
|
|
5732
|
-
className:
|
|
6223
|
+
className: ca.sample,
|
|
5733
6224
|
"aria-hidden": "true"
|
|
5734
6225
|
}),
|
|
5735
6226
|
!a && T[c],
|
|
@@ -5740,22 +6231,22 @@ var Di = {
|
|
|
5740
6231
|
"aria-hidden": "true"
|
|
5741
6232
|
})
|
|
5742
6233
|
]
|
|
5743
|
-
}), l && !o && /* @__PURE__ */ t(
|
|
6234
|
+
}), l && !o && /* @__PURE__ */ t(yr, {
|
|
5744
6235
|
anchorRef: m,
|
|
5745
6236
|
children: /* @__PURE__ */ t("div", {
|
|
5746
6237
|
ref: v,
|
|
5747
6238
|
id: y,
|
|
5748
|
-
className:
|
|
6239
|
+
className: ca.menu,
|
|
5749
6240
|
onBlur: (e) => {
|
|
5750
6241
|
e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && !m.current?.contains(e.relatedTarget) && u(!1);
|
|
5751
6242
|
},
|
|
5752
6243
|
children: /* @__PURE__ */ n("fieldset", {
|
|
5753
|
-
className:
|
|
6244
|
+
className: ca.options,
|
|
5754
6245
|
children: [/* @__PURE__ */ t("legend", {
|
|
5755
|
-
className:
|
|
6246
|
+
className: ca.legend,
|
|
5756
6247
|
children: "Цветовая тема"
|
|
5757
|
-
}),
|
|
5758
|
-
className:
|
|
6248
|
+
}), ia(s).map((e) => /* @__PURE__ */ n("label", {
|
|
6249
|
+
className: ca.option,
|
|
5759
6250
|
children: [
|
|
5760
6251
|
/* @__PURE__ */ t("input", {
|
|
5761
6252
|
type: "radio",
|
|
@@ -5766,7 +6257,7 @@ var Di = {
|
|
|
5766
6257
|
}),
|
|
5767
6258
|
/* @__PURE__ */ t("span", {
|
|
5768
6259
|
"data-ds-theme": e,
|
|
5769
|
-
className:
|
|
6260
|
+
className: ca.sample,
|
|
5770
6261
|
"aria-hidden": "true"
|
|
5771
6262
|
}),
|
|
5772
6263
|
/* @__PURE__ */ t("span", { children: T[e] }),
|
|
@@ -5783,4 +6274,4 @@ var Di = {
|
|
|
5783
6274
|
})] });
|
|
5784
6275
|
};
|
|
5785
6276
|
//#endregion
|
|
5786
|
-
export {
|
|
6277
|
+
export { Wr as ConfirmModal, j as DEFAULT_DS_FAVICON_THEME, $i as DEFAULT_DS_THEME_AVAILABILITY, pn as DSAccordion, R as DSBadge, ji as DSBottomNavigation, si as DSBottomSheet, H as DSButton, xt as DSCheckbox, te as DSCounterBadge, Yn as DSDataTable, Wt as DSDateRange, Vt as DSDateTimePicker, oi as DSDrawer, Qt as DSDropDown, cn as DSDropDownMultiple, W as DSFieldLabel, re as DSFieldMessage, _r as DSFileInput, cr as DSFilters, yr as DSFloatingMenu, ur as DSFormGrid, dr as DSFormGridItem, ci as DSFullscreenDialog, Y as DSIcon, yt as DSIconNames, or as DSInfoBlock, nn as DSInput, V as DSLoader, Ri as DSLogo, Rr as DSModal, Lr as DSModalFrame, ki as DSNavigationSurface, ai as DSOverlay, ui as DSPageLoader, mn as DSPortal, un as DSRadioButton, ir as DSSearchDropDown, Bi as DSServiceBrand, Kt as DSSkeleton, en as DSSort, bi as DSTabs, Cr as DSTextarea, la as DSThemeSwitcher, pi as DSToast, _i as DSToastProvider, Dn as DSTooltip, fr as DSValidationSummary, Ei as DSVideoPlayerFrame, M as DS_FAVICON_THEMES, C as DS_THEMES, ea as DS_THEME_ACTIVATION_SESSION_KEY, T as DS_THEME_NAMES, w as DS_THEME_STORAGE_KEY, Gr as ErrorModal, zr as ModalSystemProvider, Ji as VideoNavigationWidget, Qi as VideoStatisticsModal, Gi as VideoViolationWidget, Hi as VideoWidget, aa as activateThemesForSession, I as applyDSBrandTheme, F as applyDSFavicon, A as applyDSTheme, ra as areAllDSThemesActiveForSession, Kr as builtInModalRegistry, Br as defineModalRegistry, ee as formatDSCounterValue, Dt as formatDateInputValue, Nt as formatDateTimeLocalValue, ia as getAvailableDSThemes, fn as getDSAccordionScrollTarget, Ln as getDSDataTableColumnStyle, zn as getDSDataTablePaginationItems, Rn as getDSDataTableStickyColumnStyle, P as getDSFaviconHref, Jr as getErrorMessage, In as getNextDSDataTablePageSelection, Xt as getNextEnabledOptionIndex, k as getStoredDSTheme, Zi as getVideoStatisticsModalPosition, D as isDSTheme, At as isValidDateInputPrefix, Ut as isValidDateRange, Ot as maskDateInputValue, O as normalizeDSTheme, jt as parseDateInputValue, Pt as parseDateTimeLocalValue, sa as registerActivateThemesCommand, Er as resetModalStore, gi as resetToastStore, oa as subscribeDSThemeAvailability, qr as useConfirmModal, Xr as useConfirmModalStore, ii as useDSOverlay, Yr as useErrorModal, Zr as useErrorModalStore, Qr as useModals, Tr as useModalsStore, vi as useToast, hi as useToastStore, Bn as validateDSDataTableData };
|