@retailcrm/embed-ui-v1-components 0.5.14 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/host.cjs CHANGED
@@ -5,6 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
6
  const vue = require("vue");
7
7
  const imagePreview = require("@retailcrm/image-preview");
8
+ const dateFns = require("date-fns");
8
9
  const _hoisted_1$f = {
9
10
  xmlns: "http://www.w3.org/2000/svg",
10
11
  viewBox: "0 0 24 24"
@@ -46,7 +47,7 @@ function render$5(_ctx, _cache) {
46
47
  const SpriteVIP = { render: render$5 };
47
48
  const ImageWorkersKey = Symbol("$image.workers");
48
49
  const _hoisted_1$c = ["alt", "src"];
49
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
50
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
50
51
  __name: "UiImage",
51
52
  props: {
52
53
  alt: {
@@ -136,7 +137,7 @@ const _hoisted_5$1 = {
136
137
  key: 1,
137
138
  class: "ui-v1-avatar__label ui-v1-avatar__label_bad"
138
139
  };
139
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
140
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
140
141
  __name: "UiAvatar",
141
142
  props: {
142
143
  /** Путь к изображению */
@@ -223,7 +224,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
223
224
  }
224
225
  }, _ctx.$attrs), {
225
226
  default: vue.withCtx(() => [
226
- __props.src ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
227
+ __props.src ? (vue.openBlock(), vue.createBlock(_sfc_main$j, {
227
228
  key: 0,
228
229
  src: __props.src,
229
230
  resize: optimization.value.resize,
@@ -262,7 +263,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
262
263
  };
263
264
  }
264
265
  });
265
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
266
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
266
267
  __name: "UiAvatarList",
267
268
  props: {
268
269
  /** Список аватарок пользователей */
@@ -289,7 +290,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
289
290
  key: index,
290
291
  class: "ui-v1-avatar-list__item"
291
292
  }, [
292
- vue.createVNode(_sfc_main$h, {
293
+ vue.createVNode(_sfc_main$i, {
293
294
  src: avatar.src,
294
295
  name: avatar.name
295
296
  }, null, 8, ["src", "name"])
@@ -348,7 +349,7 @@ var VARIANT = /* @__PURE__ */ ((VARIANT2) => {
348
349
  VARIANT2["DANGER"] = "danger";
349
350
  return VARIANT2;
350
351
  })(VARIANT || {});
351
- const _sfc_main$f = vue.defineComponent({
352
+ const _sfc_main$g = vue.defineComponent({
352
353
  props: {
353
354
  /** Устанавливает тип кнопки */
354
355
  type: {
@@ -483,7 +484,7 @@ const _hoisted_1$9 = ["id", "value", "name", "disabled", "checked"];
483
484
  const _hoisted_2$3 = { class: "ui-v1-checkbox__checkmark" };
484
485
  let counter$2 = 0;
485
486
  const __default__$1 = {};
486
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
487
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
487
488
  ...__default__$1,
488
489
  __name: "UiCheckbox",
489
490
  props: {
@@ -610,6 +611,1653 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
610
611
  };
611
612
  }
612
613
  });
614
+ function buildFormatLongFn(args) {
615
+ return (options = {}) => {
616
+ const width = options.width ? String(options.width) : args.defaultWidth;
617
+ const format = args.formats[width] || args.formats[args.defaultWidth];
618
+ return format;
619
+ };
620
+ }
621
+ function buildLocalizeFn(args) {
622
+ return (value, options) => {
623
+ const context = (options == null ? void 0 : options.context) ? String(options.context) : "standalone";
624
+ let valuesArray;
625
+ if (context === "formatting" && args.formattingValues) {
626
+ const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
627
+ const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
628
+ valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
629
+ } else {
630
+ const defaultWidth = args.defaultWidth;
631
+ const width = (options == null ? void 0 : options.width) ? String(options.width) : args.defaultWidth;
632
+ valuesArray = args.values[width] || args.values[defaultWidth];
633
+ }
634
+ const index = args.argumentCallback ? args.argumentCallback(value) : value;
635
+ return valuesArray[index];
636
+ };
637
+ }
638
+ function buildMatchFn(args) {
639
+ return (string, options = {}) => {
640
+ const width = options.width;
641
+ const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
642
+ const matchResult = string.match(matchPattern);
643
+ if (!matchResult) {
644
+ return null;
645
+ }
646
+ const matchedString = matchResult[0];
647
+ const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
648
+ const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
649
+ // [TODO] -- I challenge you to fix the type
650
+ findKey(parsePatterns, (pattern) => pattern.test(matchedString))
651
+ );
652
+ let value;
653
+ value = args.valueCallback ? args.valueCallback(key) : key;
654
+ value = options.valueCallback ? (
655
+ // [TODO] -- I challenge you to fix the type
656
+ options.valueCallback(value)
657
+ ) : value;
658
+ const rest = string.slice(matchedString.length);
659
+ return { value, rest };
660
+ };
661
+ }
662
+ function findKey(object, predicate) {
663
+ for (const key in object) {
664
+ if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
665
+ return key;
666
+ }
667
+ }
668
+ return void 0;
669
+ }
670
+ function findIndex(array, predicate) {
671
+ for (let key = 0; key < array.length; key++) {
672
+ if (predicate(array[key])) {
673
+ return key;
674
+ }
675
+ }
676
+ return void 0;
677
+ }
678
+ function buildMatchPatternFn(args) {
679
+ return (string, options = {}) => {
680
+ const matchResult = string.match(args.matchPattern);
681
+ if (!matchResult) return null;
682
+ const matchedString = matchResult[0];
683
+ const parseResult = string.match(args.parsePattern);
684
+ if (!parseResult) return null;
685
+ let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
686
+ value = options.valueCallback ? options.valueCallback(value) : value;
687
+ const rest = string.slice(matchedString.length);
688
+ return { value, rest };
689
+ };
690
+ }
691
+ const constructFromSymbol = Symbol.for("constructDateFrom");
692
+ function constructFrom(date, value) {
693
+ if (typeof date === "function") return date(value);
694
+ if (date && typeof date === "object" && constructFromSymbol in date)
695
+ return date[constructFromSymbol](value);
696
+ if (date instanceof Date) return new date.constructor(value);
697
+ return new Date(value);
698
+ }
699
+ function normalizeDates(context, ...dates) {
700
+ const normalize2 = constructFrom.bind(
701
+ null,
702
+ context || dates.find((date) => typeof date === "object")
703
+ );
704
+ return dates.map(normalize2);
705
+ }
706
+ let defaultOptions = {};
707
+ function getDefaultOptions() {
708
+ return defaultOptions;
709
+ }
710
+ function toDate(argument, context) {
711
+ return constructFrom(context || argument, argument);
712
+ }
713
+ function startOfWeek(date, options) {
714
+ var _a, _b, _c, _d;
715
+ const defaultOptions2 = getDefaultOptions();
716
+ const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.weekStartsOn) ?? 0;
717
+ const _date = toDate(date, options == null ? void 0 : options.in);
718
+ const day = _date.getDay();
719
+ const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
720
+ _date.setDate(_date.getDate() - diff);
721
+ _date.setHours(0, 0, 0, 0);
722
+ return _date;
723
+ }
724
+ function isSameWeek(laterDate, earlierDate, options) {
725
+ const [laterDate_, earlierDate_] = normalizeDates(
726
+ options == null ? void 0 : options.in,
727
+ laterDate,
728
+ earlierDate
729
+ );
730
+ return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
731
+ }
732
+ const formatDistanceLocale$2 = {
733
+ lessThanXSeconds: {
734
+ one: "less than a second",
735
+ other: "less than {{count}} seconds"
736
+ },
737
+ xSeconds: {
738
+ one: "1 second",
739
+ other: "{{count}} seconds"
740
+ },
741
+ halfAMinute: "half a minute",
742
+ lessThanXMinutes: {
743
+ one: "less than a minute",
744
+ other: "less than {{count}} minutes"
745
+ },
746
+ xMinutes: {
747
+ one: "1 minute",
748
+ other: "{{count}} minutes"
749
+ },
750
+ aboutXHours: {
751
+ one: "about 1 hour",
752
+ other: "about {{count}} hours"
753
+ },
754
+ xHours: {
755
+ one: "1 hour",
756
+ other: "{{count}} hours"
757
+ },
758
+ xDays: {
759
+ one: "1 day",
760
+ other: "{{count}} days"
761
+ },
762
+ aboutXWeeks: {
763
+ one: "about 1 week",
764
+ other: "about {{count}} weeks"
765
+ },
766
+ xWeeks: {
767
+ one: "1 week",
768
+ other: "{{count}} weeks"
769
+ },
770
+ aboutXMonths: {
771
+ one: "about 1 month",
772
+ other: "about {{count}} months"
773
+ },
774
+ xMonths: {
775
+ one: "1 month",
776
+ other: "{{count}} months"
777
+ },
778
+ aboutXYears: {
779
+ one: "about 1 year",
780
+ other: "about {{count}} years"
781
+ },
782
+ xYears: {
783
+ one: "1 year",
784
+ other: "{{count}} years"
785
+ },
786
+ overXYears: {
787
+ one: "over 1 year",
788
+ other: "over {{count}} years"
789
+ },
790
+ almostXYears: {
791
+ one: "almost 1 year",
792
+ other: "almost {{count}} years"
793
+ }
794
+ };
795
+ const formatDistance$2 = (token, count, options) => {
796
+ let result;
797
+ const tokenValue = formatDistanceLocale$2[token];
798
+ if (typeof tokenValue === "string") {
799
+ result = tokenValue;
800
+ } else if (count === 1) {
801
+ result = tokenValue.one;
802
+ } else {
803
+ result = tokenValue.other.replace("{{count}}", count.toString());
804
+ }
805
+ if (options == null ? void 0 : options.addSuffix) {
806
+ if (options.comparison && options.comparison > 0) {
807
+ return "in " + result;
808
+ } else {
809
+ return result + " ago";
810
+ }
811
+ }
812
+ return result;
813
+ };
814
+ const formatRelativeLocale$2 = {
815
+ lastWeek: "'last' eeee 'at' p",
816
+ yesterday: "'yesterday at' p",
817
+ today: "'today at' p",
818
+ tomorrow: "'tomorrow at' p",
819
+ nextWeek: "eeee 'at' p",
820
+ other: "P"
821
+ };
822
+ const formatRelative$2 = (token, _date, _baseDate, _options) => formatRelativeLocale$2[token];
823
+ const eraValues$2 = {
824
+ narrow: ["B", "A"],
825
+ abbreviated: ["BC", "AD"],
826
+ wide: ["Before Christ", "Anno Domini"]
827
+ };
828
+ const quarterValues$2 = {
829
+ narrow: ["1", "2", "3", "4"],
830
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
831
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
832
+ };
833
+ const monthValues$2 = {
834
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
835
+ abbreviated: [
836
+ "Jan",
837
+ "Feb",
838
+ "Mar",
839
+ "Apr",
840
+ "May",
841
+ "Jun",
842
+ "Jul",
843
+ "Aug",
844
+ "Sep",
845
+ "Oct",
846
+ "Nov",
847
+ "Dec"
848
+ ],
849
+ wide: [
850
+ "January",
851
+ "February",
852
+ "March",
853
+ "April",
854
+ "May",
855
+ "June",
856
+ "July",
857
+ "August",
858
+ "September",
859
+ "October",
860
+ "November",
861
+ "December"
862
+ ]
863
+ };
864
+ const dayValues$2 = {
865
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
866
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
867
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
868
+ wide: [
869
+ "Sunday",
870
+ "Monday",
871
+ "Tuesday",
872
+ "Wednesday",
873
+ "Thursday",
874
+ "Friday",
875
+ "Saturday"
876
+ ]
877
+ };
878
+ const dayPeriodValues$2 = {
879
+ narrow: {
880
+ am: "a",
881
+ pm: "p",
882
+ midnight: "mi",
883
+ noon: "n",
884
+ morning: "morning",
885
+ afternoon: "afternoon",
886
+ evening: "evening",
887
+ night: "night"
888
+ },
889
+ abbreviated: {
890
+ am: "AM",
891
+ pm: "PM",
892
+ midnight: "midnight",
893
+ noon: "noon",
894
+ morning: "morning",
895
+ afternoon: "afternoon",
896
+ evening: "evening",
897
+ night: "night"
898
+ },
899
+ wide: {
900
+ am: "a.m.",
901
+ pm: "p.m.",
902
+ midnight: "midnight",
903
+ noon: "noon",
904
+ morning: "morning",
905
+ afternoon: "afternoon",
906
+ evening: "evening",
907
+ night: "night"
908
+ }
909
+ };
910
+ const formattingDayPeriodValues$2 = {
911
+ narrow: {
912
+ am: "a",
913
+ pm: "p",
914
+ midnight: "mi",
915
+ noon: "n",
916
+ morning: "in the morning",
917
+ afternoon: "in the afternoon",
918
+ evening: "in the evening",
919
+ night: "at night"
920
+ },
921
+ abbreviated: {
922
+ am: "AM",
923
+ pm: "PM",
924
+ midnight: "midnight",
925
+ noon: "noon",
926
+ morning: "in the morning",
927
+ afternoon: "in the afternoon",
928
+ evening: "in the evening",
929
+ night: "at night"
930
+ },
931
+ wide: {
932
+ am: "a.m.",
933
+ pm: "p.m.",
934
+ midnight: "midnight",
935
+ noon: "noon",
936
+ morning: "in the morning",
937
+ afternoon: "in the afternoon",
938
+ evening: "in the evening",
939
+ night: "at night"
940
+ }
941
+ };
942
+ const ordinalNumber$2 = (dirtyNumber, _options) => {
943
+ const number = Number(dirtyNumber);
944
+ const rem100 = number % 100;
945
+ if (rem100 > 20 || rem100 < 10) {
946
+ switch (rem100 % 10) {
947
+ case 1:
948
+ return number + "st";
949
+ case 2:
950
+ return number + "nd";
951
+ case 3:
952
+ return number + "rd";
953
+ }
954
+ }
955
+ return number + "th";
956
+ };
957
+ const localize$3 = {
958
+ ordinalNumber: ordinalNumber$2,
959
+ era: buildLocalizeFn({
960
+ values: eraValues$2,
961
+ defaultWidth: "wide"
962
+ }),
963
+ quarter: buildLocalizeFn({
964
+ values: quarterValues$2,
965
+ defaultWidth: "wide",
966
+ argumentCallback: (quarter) => quarter - 1
967
+ }),
968
+ month: buildLocalizeFn({
969
+ values: monthValues$2,
970
+ defaultWidth: "wide"
971
+ }),
972
+ day: buildLocalizeFn({
973
+ values: dayValues$2,
974
+ defaultWidth: "wide"
975
+ }),
976
+ dayPeriod: buildLocalizeFn({
977
+ values: dayPeriodValues$2,
978
+ defaultWidth: "wide",
979
+ formattingValues: formattingDayPeriodValues$2,
980
+ defaultFormattingWidth: "wide"
981
+ })
982
+ };
983
+ const matchOrdinalNumberPattern$2 = /^(\d+)(th|st|nd|rd)?/i;
984
+ const parseOrdinalNumberPattern$2 = /\d+/i;
985
+ const matchEraPatterns$2 = {
986
+ narrow: /^(b|a)/i,
987
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
988
+ wide: /^(before christ|before common era|anno domini|common era)/i
989
+ };
990
+ const parseEraPatterns$2 = {
991
+ any: [/^b/i, /^(a|c)/i]
992
+ };
993
+ const matchQuarterPatterns$2 = {
994
+ narrow: /^[1234]/i,
995
+ abbreviated: /^q[1234]/i,
996
+ wide: /^[1234](th|st|nd|rd)? quarter/i
997
+ };
998
+ const parseQuarterPatterns$2 = {
999
+ any: [/1/i, /2/i, /3/i, /4/i]
1000
+ };
1001
+ const matchMonthPatterns$2 = {
1002
+ narrow: /^[jfmasond]/i,
1003
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1004
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1005
+ };
1006
+ const parseMonthPatterns$2 = {
1007
+ narrow: [
1008
+ /^j/i,
1009
+ /^f/i,
1010
+ /^m/i,
1011
+ /^a/i,
1012
+ /^m/i,
1013
+ /^j/i,
1014
+ /^j/i,
1015
+ /^a/i,
1016
+ /^s/i,
1017
+ /^o/i,
1018
+ /^n/i,
1019
+ /^d/i
1020
+ ],
1021
+ any: [
1022
+ /^ja/i,
1023
+ /^f/i,
1024
+ /^mar/i,
1025
+ /^ap/i,
1026
+ /^may/i,
1027
+ /^jun/i,
1028
+ /^jul/i,
1029
+ /^au/i,
1030
+ /^s/i,
1031
+ /^o/i,
1032
+ /^n/i,
1033
+ /^d/i
1034
+ ]
1035
+ };
1036
+ const matchDayPatterns$2 = {
1037
+ narrow: /^[smtwf]/i,
1038
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
1039
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1040
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1041
+ };
1042
+ const parseDayPatterns$2 = {
1043
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1044
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1045
+ };
1046
+ const matchDayPeriodPatterns$2 = {
1047
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1048
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1049
+ };
1050
+ const parseDayPeriodPatterns$2 = {
1051
+ any: {
1052
+ am: /^a/i,
1053
+ pm: /^p/i,
1054
+ midnight: /^mi/i,
1055
+ noon: /^no/i,
1056
+ morning: /morning/i,
1057
+ afternoon: /afternoon/i,
1058
+ evening: /evening/i,
1059
+ night: /night/i
1060
+ }
1061
+ };
1062
+ const match$2 = {
1063
+ ordinalNumber: buildMatchPatternFn({
1064
+ matchPattern: matchOrdinalNumberPattern$2,
1065
+ parsePattern: parseOrdinalNumberPattern$2,
1066
+ valueCallback: (value) => parseInt(value, 10)
1067
+ }),
1068
+ era: buildMatchFn({
1069
+ matchPatterns: matchEraPatterns$2,
1070
+ defaultMatchWidth: "wide",
1071
+ parsePatterns: parseEraPatterns$2,
1072
+ defaultParseWidth: "any"
1073
+ }),
1074
+ quarter: buildMatchFn({
1075
+ matchPatterns: matchQuarterPatterns$2,
1076
+ defaultMatchWidth: "wide",
1077
+ parsePatterns: parseQuarterPatterns$2,
1078
+ defaultParseWidth: "any",
1079
+ valueCallback: (index) => index + 1
1080
+ }),
1081
+ month: buildMatchFn({
1082
+ matchPatterns: matchMonthPatterns$2,
1083
+ defaultMatchWidth: "wide",
1084
+ parsePatterns: parseMonthPatterns$2,
1085
+ defaultParseWidth: "any"
1086
+ }),
1087
+ day: buildMatchFn({
1088
+ matchPatterns: matchDayPatterns$2,
1089
+ defaultMatchWidth: "wide",
1090
+ parsePatterns: parseDayPatterns$2,
1091
+ defaultParseWidth: "any"
1092
+ }),
1093
+ dayPeriod: buildMatchFn({
1094
+ matchPatterns: matchDayPeriodPatterns$2,
1095
+ defaultMatchWidth: "any",
1096
+ parsePatterns: parseDayPeriodPatterns$2,
1097
+ defaultParseWidth: "any"
1098
+ })
1099
+ };
1100
+ const dateFormats$2 = {
1101
+ full: "EEEE, d MMMM yyyy",
1102
+ long: "d MMMM yyyy",
1103
+ medium: "d MMM yyyy",
1104
+ short: "dd/MM/yyyy"
1105
+ };
1106
+ const timeFormats$2 = {
1107
+ full: "HH:mm:ss zzzz",
1108
+ long: "HH:mm:ss z",
1109
+ medium: "HH:mm:ss",
1110
+ short: "HH:mm"
1111
+ };
1112
+ const dateTimeFormats$2 = {
1113
+ full: "{{date}} 'at' {{time}}",
1114
+ long: "{{date}} 'at' {{time}}",
1115
+ medium: "{{date}}, {{time}}",
1116
+ short: "{{date}}, {{time}}"
1117
+ };
1118
+ const formatLong$2 = {
1119
+ date: buildFormatLongFn({
1120
+ formats: dateFormats$2,
1121
+ defaultWidth: "full"
1122
+ }),
1123
+ time: buildFormatLongFn({
1124
+ formats: timeFormats$2,
1125
+ defaultWidth: "full"
1126
+ }),
1127
+ dateTime: buildFormatLongFn({
1128
+ formats: dateTimeFormats$2,
1129
+ defaultWidth: "full"
1130
+ })
1131
+ };
1132
+ const enGB = {
1133
+ code: "en-GB",
1134
+ formatDistance: formatDistance$2,
1135
+ formatLong: formatLong$2,
1136
+ formatRelative: formatRelative$2,
1137
+ localize: localize$3,
1138
+ match: match$2,
1139
+ options: {
1140
+ weekStartsOn: 1,
1141
+ firstWeekContainsDate: 4
1142
+ }
1143
+ };
1144
+ const formatDistanceLocale$1 = {
1145
+ lessThanXSeconds: {
1146
+ one: "menos de un segundo",
1147
+ other: "menos de {{count}} segundos"
1148
+ },
1149
+ xSeconds: {
1150
+ one: "1 segundo",
1151
+ other: "{{count}} segundos"
1152
+ },
1153
+ halfAMinute: "medio minuto",
1154
+ lessThanXMinutes: {
1155
+ one: "menos de un minuto",
1156
+ other: "menos de {{count}} minutos"
1157
+ },
1158
+ xMinutes: {
1159
+ one: "1 minuto",
1160
+ other: "{{count}} minutos"
1161
+ },
1162
+ aboutXHours: {
1163
+ one: "alrededor de 1 hora",
1164
+ other: "alrededor de {{count}} horas"
1165
+ },
1166
+ xHours: {
1167
+ one: "1 hora",
1168
+ other: "{{count}} horas"
1169
+ },
1170
+ xDays: {
1171
+ one: "1 día",
1172
+ other: "{{count}} días"
1173
+ },
1174
+ aboutXWeeks: {
1175
+ one: "alrededor de 1 semana",
1176
+ other: "alrededor de {{count}} semanas"
1177
+ },
1178
+ xWeeks: {
1179
+ one: "1 semana",
1180
+ other: "{{count}} semanas"
1181
+ },
1182
+ aboutXMonths: {
1183
+ one: "alrededor de 1 mes",
1184
+ other: "alrededor de {{count}} meses"
1185
+ },
1186
+ xMonths: {
1187
+ one: "1 mes",
1188
+ other: "{{count}} meses"
1189
+ },
1190
+ aboutXYears: {
1191
+ one: "alrededor de 1 año",
1192
+ other: "alrededor de {{count}} años"
1193
+ },
1194
+ xYears: {
1195
+ one: "1 año",
1196
+ other: "{{count}} años"
1197
+ },
1198
+ overXYears: {
1199
+ one: "más de 1 año",
1200
+ other: "más de {{count}} años"
1201
+ },
1202
+ almostXYears: {
1203
+ one: "casi 1 año",
1204
+ other: "casi {{count}} años"
1205
+ }
1206
+ };
1207
+ const formatDistance$1 = (token, count, options) => {
1208
+ let result;
1209
+ const tokenValue = formatDistanceLocale$1[token];
1210
+ if (typeof tokenValue === "string") {
1211
+ result = tokenValue;
1212
+ } else if (count === 1) {
1213
+ result = tokenValue.one;
1214
+ } else {
1215
+ result = tokenValue.other.replace("{{count}}", count.toString());
1216
+ }
1217
+ if (options == null ? void 0 : options.addSuffix) {
1218
+ if (options.comparison && options.comparison > 0) {
1219
+ return "en " + result;
1220
+ } else {
1221
+ return "hace " + result;
1222
+ }
1223
+ }
1224
+ return result;
1225
+ };
1226
+ const dateFormats$1 = {
1227
+ full: "EEEE, d 'de' MMMM 'de' y",
1228
+ long: "d 'de' MMMM 'de' y",
1229
+ medium: "d MMM y",
1230
+ short: "dd/MM/y"
1231
+ };
1232
+ const timeFormats$1 = {
1233
+ full: "HH:mm:ss zzzz",
1234
+ long: "HH:mm:ss z",
1235
+ medium: "HH:mm:ss",
1236
+ short: "HH:mm"
1237
+ };
1238
+ const dateTimeFormats$1 = {
1239
+ full: "{{date}} 'a las' {{time}}",
1240
+ long: "{{date}} 'a las' {{time}}",
1241
+ medium: "{{date}}, {{time}}",
1242
+ short: "{{date}}, {{time}}"
1243
+ };
1244
+ const formatLong$1 = {
1245
+ date: buildFormatLongFn({
1246
+ formats: dateFormats$1,
1247
+ defaultWidth: "full"
1248
+ }),
1249
+ time: buildFormatLongFn({
1250
+ formats: timeFormats$1,
1251
+ defaultWidth: "full"
1252
+ }),
1253
+ dateTime: buildFormatLongFn({
1254
+ formats: dateTimeFormats$1,
1255
+ defaultWidth: "full"
1256
+ })
1257
+ };
1258
+ const formatRelativeLocale$1 = {
1259
+ lastWeek: "'el' eeee 'pasado a la' p",
1260
+ yesterday: "'ayer a la' p",
1261
+ today: "'hoy a la' p",
1262
+ tomorrow: "'mañana a la' p",
1263
+ nextWeek: "eeee 'a la' p",
1264
+ other: "P"
1265
+ };
1266
+ const formatRelativeLocalePlural = {
1267
+ lastWeek: "'el' eeee 'pasado a las' p",
1268
+ yesterday: "'ayer a las' p",
1269
+ today: "'hoy a las' p",
1270
+ tomorrow: "'mañana a las' p",
1271
+ nextWeek: "eeee 'a las' p",
1272
+ other: "P"
1273
+ };
1274
+ const formatRelative$1 = (token, date, _baseDate, _options) => {
1275
+ if (date.getHours() !== 1) {
1276
+ return formatRelativeLocalePlural[token];
1277
+ } else {
1278
+ return formatRelativeLocale$1[token];
1279
+ }
1280
+ };
1281
+ const eraValues$1 = {
1282
+ narrow: ["AC", "DC"],
1283
+ abbreviated: ["AC", "DC"],
1284
+ wide: ["antes de cristo", "después de cristo"]
1285
+ };
1286
+ const quarterValues$1 = {
1287
+ narrow: ["1", "2", "3", "4"],
1288
+ abbreviated: ["T1", "T2", "T3", "T4"],
1289
+ wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
1290
+ };
1291
+ const monthValues$1 = {
1292
+ narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
1293
+ abbreviated: [
1294
+ "ene",
1295
+ "feb",
1296
+ "mar",
1297
+ "abr",
1298
+ "may",
1299
+ "jun",
1300
+ "jul",
1301
+ "ago",
1302
+ "sep",
1303
+ "oct",
1304
+ "nov",
1305
+ "dic"
1306
+ ],
1307
+ wide: [
1308
+ "enero",
1309
+ "febrero",
1310
+ "marzo",
1311
+ "abril",
1312
+ "mayo",
1313
+ "junio",
1314
+ "julio",
1315
+ "agosto",
1316
+ "septiembre",
1317
+ "octubre",
1318
+ "noviembre",
1319
+ "diciembre"
1320
+ ]
1321
+ };
1322
+ const dayValues$1 = {
1323
+ narrow: ["d", "l", "m", "m", "j", "v", "s"],
1324
+ short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
1325
+ abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
1326
+ wide: [
1327
+ "domingo",
1328
+ "lunes",
1329
+ "martes",
1330
+ "miércoles",
1331
+ "jueves",
1332
+ "viernes",
1333
+ "sábado"
1334
+ ]
1335
+ };
1336
+ const dayPeriodValues$1 = {
1337
+ narrow: {
1338
+ am: "a",
1339
+ pm: "p",
1340
+ midnight: "mn",
1341
+ noon: "md",
1342
+ morning: "mañana",
1343
+ afternoon: "tarde",
1344
+ evening: "tarde",
1345
+ night: "noche"
1346
+ },
1347
+ abbreviated: {
1348
+ am: "AM",
1349
+ pm: "PM",
1350
+ midnight: "medianoche",
1351
+ noon: "mediodia",
1352
+ morning: "mañana",
1353
+ afternoon: "tarde",
1354
+ evening: "tarde",
1355
+ night: "noche"
1356
+ },
1357
+ wide: {
1358
+ am: "a.m.",
1359
+ pm: "p.m.",
1360
+ midnight: "medianoche",
1361
+ noon: "mediodia",
1362
+ morning: "mañana",
1363
+ afternoon: "tarde",
1364
+ evening: "tarde",
1365
+ night: "noche"
1366
+ }
1367
+ };
1368
+ const formattingDayPeriodValues$1 = {
1369
+ narrow: {
1370
+ am: "a",
1371
+ pm: "p",
1372
+ midnight: "mn",
1373
+ noon: "md",
1374
+ morning: "de la mañana",
1375
+ afternoon: "de la tarde",
1376
+ evening: "de la tarde",
1377
+ night: "de la noche"
1378
+ },
1379
+ abbreviated: {
1380
+ am: "AM",
1381
+ pm: "PM",
1382
+ midnight: "medianoche",
1383
+ noon: "mediodia",
1384
+ morning: "de la mañana",
1385
+ afternoon: "de la tarde",
1386
+ evening: "de la tarde",
1387
+ night: "de la noche"
1388
+ },
1389
+ wide: {
1390
+ am: "a.m.",
1391
+ pm: "p.m.",
1392
+ midnight: "medianoche",
1393
+ noon: "mediodia",
1394
+ morning: "de la mañana",
1395
+ afternoon: "de la tarde",
1396
+ evening: "de la tarde",
1397
+ night: "de la noche"
1398
+ }
1399
+ };
1400
+ const ordinalNumber$1 = (dirtyNumber, _options) => {
1401
+ const number = Number(dirtyNumber);
1402
+ return number + "º";
1403
+ };
1404
+ const localize$2 = {
1405
+ ordinalNumber: ordinalNumber$1,
1406
+ era: buildLocalizeFn({
1407
+ values: eraValues$1,
1408
+ defaultWidth: "wide"
1409
+ }),
1410
+ quarter: buildLocalizeFn({
1411
+ values: quarterValues$1,
1412
+ defaultWidth: "wide",
1413
+ argumentCallback: (quarter) => Number(quarter) - 1
1414
+ }),
1415
+ month: buildLocalizeFn({
1416
+ values: monthValues$1,
1417
+ defaultWidth: "wide"
1418
+ }),
1419
+ day: buildLocalizeFn({
1420
+ values: dayValues$1,
1421
+ defaultWidth: "wide"
1422
+ }),
1423
+ dayPeriod: buildLocalizeFn({
1424
+ values: dayPeriodValues$1,
1425
+ defaultWidth: "wide",
1426
+ formattingValues: formattingDayPeriodValues$1,
1427
+ defaultFormattingWidth: "wide"
1428
+ })
1429
+ };
1430
+ const matchOrdinalNumberPattern$1 = /^(\d+)(º)?/i;
1431
+ const parseOrdinalNumberPattern$1 = /\d+/i;
1432
+ const matchEraPatterns$1 = {
1433
+ narrow: /^(ac|dc|a|d)/i,
1434
+ abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
1435
+ wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i
1436
+ };
1437
+ const parseEraPatterns$1 = {
1438
+ any: [/^ac/i, /^dc/i],
1439
+ wide: [
1440
+ /^(antes de cristo|antes de la era com[uú]n)/i,
1441
+ /^(despu[eé]s de cristo|era com[uú]n)/i
1442
+ ]
1443
+ };
1444
+ const matchQuarterPatterns$1 = {
1445
+ narrow: /^[1234]/i,
1446
+ abbreviated: /^T[1234]/i,
1447
+ wide: /^[1234](º)? trimestre/i
1448
+ };
1449
+ const parseQuarterPatterns$1 = {
1450
+ any: [/1/i, /2/i, /3/i, /4/i]
1451
+ };
1452
+ const matchMonthPatterns$1 = {
1453
+ narrow: /^[efmajsond]/i,
1454
+ abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
1455
+ wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i
1456
+ };
1457
+ const parseMonthPatterns$1 = {
1458
+ narrow: [
1459
+ /^e/i,
1460
+ /^f/i,
1461
+ /^m/i,
1462
+ /^a/i,
1463
+ /^m/i,
1464
+ /^j/i,
1465
+ /^j/i,
1466
+ /^a/i,
1467
+ /^s/i,
1468
+ /^o/i,
1469
+ /^n/i,
1470
+ /^d/i
1471
+ ],
1472
+ any: [
1473
+ /^en/i,
1474
+ /^feb/i,
1475
+ /^mar/i,
1476
+ /^abr/i,
1477
+ /^may/i,
1478
+ /^jun/i,
1479
+ /^jul/i,
1480
+ /^ago/i,
1481
+ /^sep/i,
1482
+ /^oct/i,
1483
+ /^nov/i,
1484
+ /^dic/i
1485
+ ]
1486
+ };
1487
+ const matchDayPatterns$1 = {
1488
+ narrow: /^[dlmjvs]/i,
1489
+ short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
1490
+ abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
1491
+ wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i
1492
+ };
1493
+ const parseDayPatterns$1 = {
1494
+ narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
1495
+ any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i]
1496
+ };
1497
+ const matchDayPeriodPatterns$1 = {
1498
+ narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
1499
+ any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i
1500
+ };
1501
+ const parseDayPeriodPatterns$1 = {
1502
+ any: {
1503
+ am: /^a/i,
1504
+ pm: /^p/i,
1505
+ midnight: /^mn/i,
1506
+ noon: /^md/i,
1507
+ morning: /mañana/i,
1508
+ afternoon: /tarde/i,
1509
+ evening: /tarde/i,
1510
+ night: /noche/i
1511
+ }
1512
+ };
1513
+ const match$1 = {
1514
+ ordinalNumber: buildMatchPatternFn({
1515
+ matchPattern: matchOrdinalNumberPattern$1,
1516
+ parsePattern: parseOrdinalNumberPattern$1,
1517
+ valueCallback: function(value) {
1518
+ return parseInt(value, 10);
1519
+ }
1520
+ }),
1521
+ era: buildMatchFn({
1522
+ matchPatterns: matchEraPatterns$1,
1523
+ defaultMatchWidth: "wide",
1524
+ parsePatterns: parseEraPatterns$1,
1525
+ defaultParseWidth: "any"
1526
+ }),
1527
+ quarter: buildMatchFn({
1528
+ matchPatterns: matchQuarterPatterns$1,
1529
+ defaultMatchWidth: "wide",
1530
+ parsePatterns: parseQuarterPatterns$1,
1531
+ defaultParseWidth: "any",
1532
+ valueCallback: (index) => index + 1
1533
+ }),
1534
+ month: buildMatchFn({
1535
+ matchPatterns: matchMonthPatterns$1,
1536
+ defaultMatchWidth: "wide",
1537
+ parsePatterns: parseMonthPatterns$1,
1538
+ defaultParseWidth: "any"
1539
+ }),
1540
+ day: buildMatchFn({
1541
+ matchPatterns: matchDayPatterns$1,
1542
+ defaultMatchWidth: "wide",
1543
+ parsePatterns: parseDayPatterns$1,
1544
+ defaultParseWidth: "any"
1545
+ }),
1546
+ dayPeriod: buildMatchFn({
1547
+ matchPatterns: matchDayPeriodPatterns$1,
1548
+ defaultMatchWidth: "any",
1549
+ parsePatterns: parseDayPeriodPatterns$1,
1550
+ defaultParseWidth: "any"
1551
+ })
1552
+ };
1553
+ const es = {
1554
+ code: "es",
1555
+ formatDistance: formatDistance$1,
1556
+ formatLong: formatLong$1,
1557
+ formatRelative: formatRelative$1,
1558
+ localize: localize$2,
1559
+ match: match$1,
1560
+ options: {
1561
+ weekStartsOn: 1,
1562
+ firstWeekContainsDate: 1
1563
+ }
1564
+ };
1565
+ function declension(scheme, count) {
1566
+ if (scheme.one !== void 0 && count === 1) {
1567
+ return scheme.one;
1568
+ }
1569
+ const rem10 = count % 10;
1570
+ const rem100 = count % 100;
1571
+ if (rem10 === 1 && rem100 !== 11) {
1572
+ return scheme.singularNominative.replace("{{count}}", String(count));
1573
+ } else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) {
1574
+ return scheme.singularGenitive.replace("{{count}}", String(count));
1575
+ } else {
1576
+ return scheme.pluralGenitive.replace("{{count}}", String(count));
1577
+ }
1578
+ }
1579
+ function buildLocalizeTokenFn(scheme) {
1580
+ return (count, options) => {
1581
+ if (options == null ? void 0 : options.addSuffix) {
1582
+ if (options.comparison && options.comparison > 0) {
1583
+ if (scheme.future) {
1584
+ return declension(scheme.future, count);
1585
+ } else {
1586
+ return "через " + declension(scheme.regular, count);
1587
+ }
1588
+ } else {
1589
+ if (scheme.past) {
1590
+ return declension(scheme.past, count);
1591
+ } else {
1592
+ return declension(scheme.regular, count) + " назад";
1593
+ }
1594
+ }
1595
+ } else {
1596
+ return declension(scheme.regular, count);
1597
+ }
1598
+ };
1599
+ }
1600
+ const formatDistanceLocale = {
1601
+ lessThanXSeconds: buildLocalizeTokenFn({
1602
+ regular: {
1603
+ one: "меньше секунды",
1604
+ singularNominative: "меньше {{count}} секунды",
1605
+ singularGenitive: "меньше {{count}} секунд",
1606
+ pluralGenitive: "меньше {{count}} секунд"
1607
+ },
1608
+ future: {
1609
+ one: "меньше, чем через секунду",
1610
+ singularNominative: "меньше, чем через {{count}} секунду",
1611
+ singularGenitive: "меньше, чем через {{count}} секунды",
1612
+ pluralGenitive: "меньше, чем через {{count}} секунд"
1613
+ }
1614
+ }),
1615
+ xSeconds: buildLocalizeTokenFn({
1616
+ regular: {
1617
+ singularNominative: "{{count}} секунда",
1618
+ singularGenitive: "{{count}} секунды",
1619
+ pluralGenitive: "{{count}} секунд"
1620
+ },
1621
+ past: {
1622
+ singularNominative: "{{count}} секунду назад",
1623
+ singularGenitive: "{{count}} секунды назад",
1624
+ pluralGenitive: "{{count}} секунд назад"
1625
+ },
1626
+ future: {
1627
+ singularNominative: "через {{count}} секунду",
1628
+ singularGenitive: "через {{count}} секунды",
1629
+ pluralGenitive: "через {{count}} секунд"
1630
+ }
1631
+ }),
1632
+ halfAMinute: (_count, options) => {
1633
+ if (options == null ? void 0 : options.addSuffix) {
1634
+ if (options.comparison && options.comparison > 0) {
1635
+ return "через полминуты";
1636
+ } else {
1637
+ return "полминуты назад";
1638
+ }
1639
+ }
1640
+ return "полминуты";
1641
+ },
1642
+ lessThanXMinutes: buildLocalizeTokenFn({
1643
+ regular: {
1644
+ one: "меньше минуты",
1645
+ singularNominative: "меньше {{count}} минуты",
1646
+ singularGenitive: "меньше {{count}} минут",
1647
+ pluralGenitive: "меньше {{count}} минут"
1648
+ },
1649
+ future: {
1650
+ one: "меньше, чем через минуту",
1651
+ singularNominative: "меньше, чем через {{count}} минуту",
1652
+ singularGenitive: "меньше, чем через {{count}} минуты",
1653
+ pluralGenitive: "меньше, чем через {{count}} минут"
1654
+ }
1655
+ }),
1656
+ xMinutes: buildLocalizeTokenFn({
1657
+ regular: {
1658
+ singularNominative: "{{count}} минута",
1659
+ singularGenitive: "{{count}} минуты",
1660
+ pluralGenitive: "{{count}} минут"
1661
+ },
1662
+ past: {
1663
+ singularNominative: "{{count}} минуту назад",
1664
+ singularGenitive: "{{count}} минуты назад",
1665
+ pluralGenitive: "{{count}} минут назад"
1666
+ },
1667
+ future: {
1668
+ singularNominative: "через {{count}} минуту",
1669
+ singularGenitive: "через {{count}} минуты",
1670
+ pluralGenitive: "через {{count}} минут"
1671
+ }
1672
+ }),
1673
+ aboutXHours: buildLocalizeTokenFn({
1674
+ regular: {
1675
+ singularNominative: "около {{count}} часа",
1676
+ singularGenitive: "около {{count}} часов",
1677
+ pluralGenitive: "около {{count}} часов"
1678
+ },
1679
+ future: {
1680
+ singularNominative: "приблизительно через {{count}} час",
1681
+ singularGenitive: "приблизительно через {{count}} часа",
1682
+ pluralGenitive: "приблизительно через {{count}} часов"
1683
+ }
1684
+ }),
1685
+ xHours: buildLocalizeTokenFn({
1686
+ regular: {
1687
+ singularNominative: "{{count}} час",
1688
+ singularGenitive: "{{count}} часа",
1689
+ pluralGenitive: "{{count}} часов"
1690
+ }
1691
+ }),
1692
+ xDays: buildLocalizeTokenFn({
1693
+ regular: {
1694
+ singularNominative: "{{count}} день",
1695
+ singularGenitive: "{{count}} дня",
1696
+ pluralGenitive: "{{count}} дней"
1697
+ }
1698
+ }),
1699
+ aboutXWeeks: buildLocalizeTokenFn({
1700
+ regular: {
1701
+ singularNominative: "около {{count}} недели",
1702
+ singularGenitive: "около {{count}} недель",
1703
+ pluralGenitive: "около {{count}} недель"
1704
+ },
1705
+ future: {
1706
+ singularNominative: "приблизительно через {{count}} неделю",
1707
+ singularGenitive: "приблизительно через {{count}} недели",
1708
+ pluralGenitive: "приблизительно через {{count}} недель"
1709
+ }
1710
+ }),
1711
+ xWeeks: buildLocalizeTokenFn({
1712
+ regular: {
1713
+ singularNominative: "{{count}} неделя",
1714
+ singularGenitive: "{{count}} недели",
1715
+ pluralGenitive: "{{count}} недель"
1716
+ }
1717
+ }),
1718
+ aboutXMonths: buildLocalizeTokenFn({
1719
+ regular: {
1720
+ singularNominative: "около {{count}} месяца",
1721
+ singularGenitive: "около {{count}} месяцев",
1722
+ pluralGenitive: "около {{count}} месяцев"
1723
+ },
1724
+ future: {
1725
+ singularNominative: "приблизительно через {{count}} месяц",
1726
+ singularGenitive: "приблизительно через {{count}} месяца",
1727
+ pluralGenitive: "приблизительно через {{count}} месяцев"
1728
+ }
1729
+ }),
1730
+ xMonths: buildLocalizeTokenFn({
1731
+ regular: {
1732
+ singularNominative: "{{count}} месяц",
1733
+ singularGenitive: "{{count}} месяца",
1734
+ pluralGenitive: "{{count}} месяцев"
1735
+ }
1736
+ }),
1737
+ aboutXYears: buildLocalizeTokenFn({
1738
+ regular: {
1739
+ singularNominative: "около {{count}} года",
1740
+ singularGenitive: "около {{count}} лет",
1741
+ pluralGenitive: "около {{count}} лет"
1742
+ },
1743
+ future: {
1744
+ singularNominative: "приблизительно через {{count}} год",
1745
+ singularGenitive: "приблизительно через {{count}} года",
1746
+ pluralGenitive: "приблизительно через {{count}} лет"
1747
+ }
1748
+ }),
1749
+ xYears: buildLocalizeTokenFn({
1750
+ regular: {
1751
+ singularNominative: "{{count}} год",
1752
+ singularGenitive: "{{count}} года",
1753
+ pluralGenitive: "{{count}} лет"
1754
+ }
1755
+ }),
1756
+ overXYears: buildLocalizeTokenFn({
1757
+ regular: {
1758
+ singularNominative: "больше {{count}} года",
1759
+ singularGenitive: "больше {{count}} лет",
1760
+ pluralGenitive: "больше {{count}} лет"
1761
+ },
1762
+ future: {
1763
+ singularNominative: "больше, чем через {{count}} год",
1764
+ singularGenitive: "больше, чем через {{count}} года",
1765
+ pluralGenitive: "больше, чем через {{count}} лет"
1766
+ }
1767
+ }),
1768
+ almostXYears: buildLocalizeTokenFn({
1769
+ regular: {
1770
+ singularNominative: "почти {{count}} год",
1771
+ singularGenitive: "почти {{count}} года",
1772
+ pluralGenitive: "почти {{count}} лет"
1773
+ },
1774
+ future: {
1775
+ singularNominative: "почти через {{count}} год",
1776
+ singularGenitive: "почти через {{count}} года",
1777
+ pluralGenitive: "почти через {{count}} лет"
1778
+ }
1779
+ })
1780
+ };
1781
+ const formatDistance = (token, count, options) => {
1782
+ return formatDistanceLocale[token](count, options);
1783
+ };
1784
+ const dateFormats = {
1785
+ full: "EEEE, d MMMM y 'г.'",
1786
+ long: "d MMMM y 'г.'",
1787
+ medium: "d MMM y 'г.'",
1788
+ short: "dd.MM.y"
1789
+ };
1790
+ const timeFormats = {
1791
+ full: "H:mm:ss zzzz",
1792
+ long: "H:mm:ss z",
1793
+ medium: "H:mm:ss",
1794
+ short: "H:mm"
1795
+ };
1796
+ const dateTimeFormats = {
1797
+ any: "{{date}}, {{time}}"
1798
+ };
1799
+ const formatLong = {
1800
+ date: buildFormatLongFn({
1801
+ formats: dateFormats,
1802
+ defaultWidth: "full"
1803
+ }),
1804
+ time: buildFormatLongFn({
1805
+ formats: timeFormats,
1806
+ defaultWidth: "full"
1807
+ }),
1808
+ dateTime: buildFormatLongFn({
1809
+ formats: dateTimeFormats,
1810
+ defaultWidth: "any"
1811
+ })
1812
+ };
1813
+ const accusativeWeekdays = [
1814
+ "воскресенье",
1815
+ "понедельник",
1816
+ "вторник",
1817
+ "среду",
1818
+ "четверг",
1819
+ "пятницу",
1820
+ "субботу"
1821
+ ];
1822
+ function lastWeek(day) {
1823
+ const weekday = accusativeWeekdays[day];
1824
+ switch (day) {
1825
+ case 0:
1826
+ return "'в прошлое " + weekday + " в' p";
1827
+ case 1:
1828
+ case 2:
1829
+ case 4:
1830
+ return "'в прошлый " + weekday + " в' p";
1831
+ case 3:
1832
+ case 5:
1833
+ case 6:
1834
+ return "'в прошлую " + weekday + " в' p";
1835
+ }
1836
+ }
1837
+ function thisWeek(day) {
1838
+ const weekday = accusativeWeekdays[day];
1839
+ if (day === 2) {
1840
+ return "'во " + weekday + " в' p";
1841
+ } else {
1842
+ return "'в " + weekday + " в' p";
1843
+ }
1844
+ }
1845
+ function nextWeek(day) {
1846
+ const weekday = accusativeWeekdays[day];
1847
+ switch (day) {
1848
+ case 0:
1849
+ return "'в следующее " + weekday + " в' p";
1850
+ case 1:
1851
+ case 2:
1852
+ case 4:
1853
+ return "'в следующий " + weekday + " в' p";
1854
+ case 3:
1855
+ case 5:
1856
+ case 6:
1857
+ return "'в следующую " + weekday + " в' p";
1858
+ }
1859
+ }
1860
+ const formatRelativeLocale = {
1861
+ lastWeek: (date, baseDate, options) => {
1862
+ const day = date.getDay();
1863
+ if (isSameWeek(date, baseDate, options)) {
1864
+ return thisWeek(day);
1865
+ } else {
1866
+ return lastWeek(day);
1867
+ }
1868
+ },
1869
+ yesterday: "'вчера в' p",
1870
+ today: "'сегодня в' p",
1871
+ tomorrow: "'завтра в' p",
1872
+ nextWeek: (date, baseDate, options) => {
1873
+ const day = date.getDay();
1874
+ if (isSameWeek(date, baseDate, options)) {
1875
+ return thisWeek(day);
1876
+ } else {
1877
+ return nextWeek(day);
1878
+ }
1879
+ },
1880
+ other: "P"
1881
+ };
1882
+ const formatRelative = (token, date, baseDate, options) => {
1883
+ const format = formatRelativeLocale[token];
1884
+ if (typeof format === "function") {
1885
+ return format(date, baseDate, options);
1886
+ }
1887
+ return format;
1888
+ };
1889
+ const eraValues = {
1890
+ narrow: ["до н.э.", "н.э."],
1891
+ abbreviated: ["до н. э.", "н. э."],
1892
+ wide: ["до нашей эры", "нашей эры"]
1893
+ };
1894
+ const quarterValues = {
1895
+ narrow: ["1", "2", "3", "4"],
1896
+ abbreviated: ["1-й кв.", "2-й кв.", "3-й кв.", "4-й кв."],
1897
+ wide: ["1-й квартал", "2-й квартал", "3-й квартал", "4-й квартал"]
1898
+ };
1899
+ const monthValues = {
1900
+ narrow: ["Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"],
1901
+ abbreviated: [
1902
+ "янв.",
1903
+ "фев.",
1904
+ "март",
1905
+ "апр.",
1906
+ "май",
1907
+ "июнь",
1908
+ "июль",
1909
+ "авг.",
1910
+ "сент.",
1911
+ "окт.",
1912
+ "нояб.",
1913
+ "дек."
1914
+ ],
1915
+ wide: [
1916
+ "январь",
1917
+ "февраль",
1918
+ "март",
1919
+ "апрель",
1920
+ "май",
1921
+ "июнь",
1922
+ "июль",
1923
+ "август",
1924
+ "сентябрь",
1925
+ "октябрь",
1926
+ "ноябрь",
1927
+ "декабрь"
1928
+ ]
1929
+ };
1930
+ const formattingMonthValues = {
1931
+ narrow: ["Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"],
1932
+ abbreviated: [
1933
+ "янв.",
1934
+ "фев.",
1935
+ "мар.",
1936
+ "апр.",
1937
+ "мая",
1938
+ "июн.",
1939
+ "июл.",
1940
+ "авг.",
1941
+ "сент.",
1942
+ "окт.",
1943
+ "нояб.",
1944
+ "дек."
1945
+ ],
1946
+ wide: [
1947
+ "января",
1948
+ "февраля",
1949
+ "марта",
1950
+ "апреля",
1951
+ "мая",
1952
+ "июня",
1953
+ "июля",
1954
+ "августа",
1955
+ "сентября",
1956
+ "октября",
1957
+ "ноября",
1958
+ "декабря"
1959
+ ]
1960
+ };
1961
+ const dayValues = {
1962
+ narrow: ["В", "П", "В", "С", "Ч", "П", "С"],
1963
+ short: ["вс", "пн", "вт", "ср", "чт", "пт", "сб"],
1964
+ abbreviated: ["вск", "пнд", "втр", "срд", "чтв", "птн", "суб"],
1965
+ wide: [
1966
+ "воскресенье",
1967
+ "понедельник",
1968
+ "вторник",
1969
+ "среда",
1970
+ "четверг",
1971
+ "пятница",
1972
+ "суббота"
1973
+ ]
1974
+ };
1975
+ const dayPeriodValues = {
1976
+ narrow: {
1977
+ am: "ДП",
1978
+ pm: "ПП",
1979
+ midnight: "полн.",
1980
+ noon: "полд.",
1981
+ morning: "утро",
1982
+ afternoon: "день",
1983
+ evening: "веч.",
1984
+ night: "ночь"
1985
+ },
1986
+ abbreviated: {
1987
+ am: "ДП",
1988
+ pm: "ПП",
1989
+ midnight: "полн.",
1990
+ noon: "полд.",
1991
+ morning: "утро",
1992
+ afternoon: "день",
1993
+ evening: "веч.",
1994
+ night: "ночь"
1995
+ },
1996
+ wide: {
1997
+ am: "ДП",
1998
+ pm: "ПП",
1999
+ midnight: "полночь",
2000
+ noon: "полдень",
2001
+ morning: "утро",
2002
+ afternoon: "день",
2003
+ evening: "вечер",
2004
+ night: "ночь"
2005
+ }
2006
+ };
2007
+ const formattingDayPeriodValues = {
2008
+ narrow: {
2009
+ am: "ДП",
2010
+ pm: "ПП",
2011
+ midnight: "полн.",
2012
+ noon: "полд.",
2013
+ morning: "утра",
2014
+ afternoon: "дня",
2015
+ evening: "веч.",
2016
+ night: "ночи"
2017
+ },
2018
+ abbreviated: {
2019
+ am: "ДП",
2020
+ pm: "ПП",
2021
+ midnight: "полн.",
2022
+ noon: "полд.",
2023
+ morning: "утра",
2024
+ afternoon: "дня",
2025
+ evening: "веч.",
2026
+ night: "ночи"
2027
+ },
2028
+ wide: {
2029
+ am: "ДП",
2030
+ pm: "ПП",
2031
+ midnight: "полночь",
2032
+ noon: "полдень",
2033
+ morning: "утра",
2034
+ afternoon: "дня",
2035
+ evening: "вечера",
2036
+ night: "ночи"
2037
+ }
2038
+ };
2039
+ const ordinalNumber = (dirtyNumber, options) => {
2040
+ const number = Number(dirtyNumber);
2041
+ const unit = options == null ? void 0 : options.unit;
2042
+ let suffix;
2043
+ if (unit === "date") {
2044
+ suffix = "-е";
2045
+ } else if (unit === "week" || unit === "minute" || unit === "second") {
2046
+ suffix = "-я";
2047
+ } else {
2048
+ suffix = "-й";
2049
+ }
2050
+ return number + suffix;
2051
+ };
2052
+ const localize$1 = {
2053
+ ordinalNumber,
2054
+ era: buildLocalizeFn({
2055
+ values: eraValues,
2056
+ defaultWidth: "wide"
2057
+ }),
2058
+ quarter: buildLocalizeFn({
2059
+ values: quarterValues,
2060
+ defaultWidth: "wide",
2061
+ argumentCallback: (quarter) => quarter - 1
2062
+ }),
2063
+ month: buildLocalizeFn({
2064
+ values: monthValues,
2065
+ defaultWidth: "wide",
2066
+ formattingValues: formattingMonthValues,
2067
+ defaultFormattingWidth: "wide"
2068
+ }),
2069
+ day: buildLocalizeFn({
2070
+ values: dayValues,
2071
+ defaultWidth: "wide"
2072
+ }),
2073
+ dayPeriod: buildLocalizeFn({
2074
+ values: dayPeriodValues,
2075
+ defaultWidth: "any",
2076
+ formattingValues: formattingDayPeriodValues,
2077
+ defaultFormattingWidth: "wide"
2078
+ })
2079
+ };
2080
+ const matchOrdinalNumberPattern = /^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i;
2081
+ const parseOrdinalNumberPattern = /\d+/i;
2082
+ const matchEraPatterns = {
2083
+ narrow: /^((до )?н\.?\s?э\.?)/i,
2084
+ abbreviated: /^((до )?н\.?\s?э\.?)/i,
2085
+ wide: /^(до нашей эры|нашей эры|наша эра)/i
2086
+ };
2087
+ const parseEraPatterns = {
2088
+ any: [/^д/i, /^н/i]
2089
+ };
2090
+ const matchQuarterPatterns = {
2091
+ narrow: /^[1234]/i,
2092
+ abbreviated: /^[1234](-?[ыои]?й?)? кв.?/i,
2093
+ wide: /^[1234](-?[ыои]?й?)? квартал/i
2094
+ };
2095
+ const parseQuarterPatterns = {
2096
+ any: [/1/i, /2/i, /3/i, /4/i]
2097
+ };
2098
+ const matchMonthPatterns = {
2099
+ narrow: /^[яфмаисонд]/i,
2100
+ abbreviated: /^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,
2101
+ wide: /^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i
2102
+ };
2103
+ const parseMonthPatterns = {
2104
+ narrow: [
2105
+ /^я/i,
2106
+ /^ф/i,
2107
+ /^м/i,
2108
+ /^а/i,
2109
+ /^м/i,
2110
+ /^и/i,
2111
+ /^и/i,
2112
+ /^а/i,
2113
+ /^с/i,
2114
+ /^о/i,
2115
+ /^н/i,
2116
+ /^я/i
2117
+ ],
2118
+ any: [
2119
+ /^я/i,
2120
+ /^ф/i,
2121
+ /^мар/i,
2122
+ /^ап/i,
2123
+ /^ма[йя]/i,
2124
+ /^июн/i,
2125
+ /^июл/i,
2126
+ /^ав/i,
2127
+ /^с/i,
2128
+ /^о/i,
2129
+ /^н/i,
2130
+ /^д/i
2131
+ ]
2132
+ };
2133
+ const matchDayPatterns = {
2134
+ narrow: /^[впсч]/i,
2135
+ short: /^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,
2136
+ abbreviated: /^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,
2137
+ wide: /^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i
2138
+ };
2139
+ const parseDayPatterns = {
2140
+ narrow: [/^в/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i],
2141
+ any: [/^в[ос]/i, /^п[он]/i, /^в/i, /^ср/i, /^ч/i, /^п[ят]/i, /^с[уб]/i]
2142
+ };
2143
+ const matchDayPeriodPatterns = {
2144
+ narrow: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
2145
+ abbreviated: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
2146
+ wide: /^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i
2147
+ };
2148
+ const parseDayPeriodPatterns = {
2149
+ any: {
2150
+ am: /^дп/i,
2151
+ pm: /^пп/i,
2152
+ midnight: /^полн/i,
2153
+ noon: /^полд/i,
2154
+ morning: /^у/i,
2155
+ afternoon: /^д[ен]/i,
2156
+ evening: /^в/i,
2157
+ night: /^н/i
2158
+ }
2159
+ };
2160
+ const match = {
2161
+ ordinalNumber: buildMatchPatternFn({
2162
+ matchPattern: matchOrdinalNumberPattern,
2163
+ parsePattern: parseOrdinalNumberPattern,
2164
+ valueCallback: (value) => parseInt(value, 10)
2165
+ }),
2166
+ era: buildMatchFn({
2167
+ matchPatterns: matchEraPatterns,
2168
+ defaultMatchWidth: "wide",
2169
+ parsePatterns: parseEraPatterns,
2170
+ defaultParseWidth: "any"
2171
+ }),
2172
+ quarter: buildMatchFn({
2173
+ matchPatterns: matchQuarterPatterns,
2174
+ defaultMatchWidth: "wide",
2175
+ parsePatterns: parseQuarterPatterns,
2176
+ defaultParseWidth: "any",
2177
+ valueCallback: (index) => index + 1
2178
+ }),
2179
+ month: buildMatchFn({
2180
+ matchPatterns: matchMonthPatterns,
2181
+ defaultMatchWidth: "wide",
2182
+ parsePatterns: parseMonthPatterns,
2183
+ defaultParseWidth: "any"
2184
+ }),
2185
+ day: buildMatchFn({
2186
+ matchPatterns: matchDayPatterns,
2187
+ defaultMatchWidth: "wide",
2188
+ parsePatterns: parseDayPatterns,
2189
+ defaultParseWidth: "any"
2190
+ }),
2191
+ dayPeriod: buildMatchFn({
2192
+ matchPatterns: matchDayPeriodPatterns,
2193
+ defaultMatchWidth: "wide",
2194
+ parsePatterns: parseDayPeriodPatterns,
2195
+ defaultParseWidth: "any"
2196
+ })
2197
+ };
2198
+ const ru = {
2199
+ code: "ru",
2200
+ formatDistance,
2201
+ formatLong,
2202
+ formatRelative,
2203
+ localize: localize$1,
2204
+ match,
2205
+ options: {
2206
+ weekStartsOn: 1,
2207
+ firstWeekContainsDate: 1
2208
+ }
2209
+ };
2210
+ const formatDateLat = (date) => dateFns.format(date, "dd/MM/yyyy", { locale: enGB });
2211
+ const formatDateRu = (date) => dateFns.format(date, "dd.MM.yyyy", { locale: ru });
2212
+ const formatDate = (date, locale = void 0) => {
2213
+ return (locale ?? detectLocale()) === "ru-RU" ? formatDateRu(date) : formatDateLat(date);
2214
+ };
2215
+ const formatDateTime = (date, locale = void 0) => dateFns.format(date, "Pp", {
2216
+ locale: {
2217
+ "en-GB": enGB,
2218
+ "es-ES": es,
2219
+ "ru-RU": ru
2220
+ }[locale ?? detectLocale()] ?? enGB
2221
+ });
2222
+ function detectLocale() {
2223
+ var _a, _b, _c, _d;
2224
+ const instance = vue.getCurrentInstance();
2225
+ const i18n2 = (_d = (_c = (_b = (_a = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a.app) == null ? void 0 : _b.config) == null ? void 0 : _c.globalProperties) == null ? void 0 : _d.$i18n;
2226
+ if (i18n2) {
2227
+ try {
2228
+ const locale = (typeof i18n2.locale === "object" ? i18n2.locale.value : i18n2.locale) ?? "en-GB";
2229
+ if (locale.startsWith("en")) return "en-GB";
2230
+ if (locale.startsWith("es")) return "es-ES";
2231
+ if (locale.startsWith("ru")) return "ru-RU";
2232
+ } catch (error) {
2233
+ console.warn("Error detecting locale:", error);
2234
+ }
2235
+ }
2236
+ return "en-GB";
2237
+ }
2238
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
2239
+ __name: "UiDate",
2240
+ props: {
2241
+ date: {
2242
+ type: [Date, String],
2243
+ required: true
2244
+ },
2245
+ locale: {
2246
+ type: null,
2247
+ validator: (value) => typeof value === "undefined" || ["en-GB", "es-ES", "ru-RU"].includes(value),
2248
+ default: void 0
2249
+ },
2250
+ withTime: {
2251
+ type: Boolean,
2252
+ default: false
2253
+ }
2254
+ },
2255
+ setup(__props) {
2256
+ return (_ctx, _cache) => {
2257
+ return vue.openBlock(), vue.createElementBlock("time", vue.normalizeProps(vue.guardReactiveProps({ datetime: vue.unref(dateFns.formatISO)(__props.date), ..._ctx.$attrs })), vue.toDisplayString(__props.withTime ? vue.unref(formatDateTime)(__props.date, __props.locale) : vue.unref(formatDate)(__props.date, __props.locale)), 17);
2258
+ };
2259
+ }
2260
+ });
613
2261
  var ALIGN = /* @__PURE__ */ ((ALIGN2) => {
614
2262
  ALIGN2["LEFT"] = "left";
615
2263
  ALIGN2["RIGHT"] = "right";
@@ -3497,7 +5145,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
3497
5145
  return SIZE$4.SM;
3498
5146
  });
3499
5147
  return (_ctx, _cache) => {
3500
- return vue.openBlock(), vue.createBlock(_sfc_main$f, vue.mergeProps({
5148
+ return vue.openBlock(), vue.createBlock(_sfc_main$g, vue.mergeProps({
3501
5149
  ref_key: "root",
3502
5150
  ref: root,
3503
5151
  href: __props.href,
@@ -3769,12 +5417,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
3769
5417
  exports.I18nPlugin = plugin;
3770
5418
  exports.ImageWorkersKey = ImageWorkersKey;
3771
5419
  exports.ModalPlugin = plugin$1;
3772
- exports.UiAvatar = _sfc_main$h;
3773
- exports.UiAvatarList = _sfc_main$g;
3774
- exports.UiButton = _sfc_main$f;
3775
- exports.UiCheckbox = _sfc_main$e;
5420
+ exports.UiAvatar = _sfc_main$i;
5421
+ exports.UiAvatarList = _sfc_main$h;
5422
+ exports.UiButton = _sfc_main$g;
5423
+ exports.UiCheckbox = _sfc_main$f;
5424
+ exports.UiDate = _sfc_main$e;
3776
5425
  exports.UiError = _sfc_main$d;
3777
- exports.UiImage = _sfc_main$i;
5426
+ exports.UiImage = _sfc_main$j;
3778
5427
  exports.UiLink = _sfc_main$c;
3779
5428
  exports.UiLoader = _sfc_main$a;
3780
5429
  exports.UiModalSidebar = _sfc_main$8;