@weni/unnnic-system 3.35.2-alpha.2 → 3.35.2-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/components/DateFilter/DateFilter.vue.mjs +25 -29
  2. package/dist/components/InputDatePicker/InputDatePicker.vue.mjs +1 -1
  3. package/dist/components/InputDatePicker/InputDatePicker.vue2.mjs +38 -32
  4. package/dist/components/InputDatePicker/InputDatePicker2.css +1 -1
  5. package/dist/index.d.ts +18 -0
  6. package/dist/node_modules/date-fns/_lib/addLeadingZeros.mjs +7 -0
  7. package/dist/node_modules/date-fns/_lib/defaultOptions.mjs +7 -0
  8. package/dist/node_modules/date-fns/_lib/format/formatters.mjs +515 -0
  9. package/dist/node_modules/date-fns/_lib/format/lightFormatters.mjs +59 -0
  10. package/dist/node_modules/date-fns/_lib/format/longFormatters.mjs +52 -0
  11. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs +18 -0
  12. package/dist/node_modules/date-fns/_lib/normalizeDates.mjs +11 -0
  13. package/dist/node_modules/date-fns/_lib/protectedTokens.mjs +20 -0
  14. package/dist/node_modules/date-fns/addDays.mjs +9 -0
  15. package/dist/node_modules/date-fns/constants.mjs +9 -0
  16. package/dist/node_modules/date-fns/constructFrom.mjs +7 -0
  17. package/dist/node_modules/date-fns/differenceInCalendarDays.mjs +15 -0
  18. package/dist/node_modules/date-fns/format.mjs +58 -0
  19. package/dist/node_modules/date-fns/getDayOfYear.mjs +10 -0
  20. package/dist/node_modules/date-fns/getDefaultOptions.mjs +7 -0
  21. package/dist/node_modules/date-fns/getISODay.mjs +8 -0
  22. package/dist/node_modules/date-fns/getISOWeek.mjs +11 -0
  23. package/dist/node_modules/date-fns/getISOWeekYear.mjs +14 -0
  24. package/dist/node_modules/date-fns/getWeek.mjs +11 -0
  25. package/dist/node_modules/date-fns/getWeekYear.mjs +16 -0
  26. package/dist/node_modules/date-fns/isDate.mjs +6 -0
  27. package/dist/node_modules/date-fns/isValid.mjs +8 -0
  28. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs +9 -0
  29. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs +18 -0
  30. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.mjs +31 -0
  31. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs +15 -0
  32. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs +70 -0
  33. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs +33 -0
  34. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs +11 -0
  35. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.mjs +155 -0
  36. package/dist/node_modules/date-fns/locale/en-US/_lib/match.mjs +110 -0
  37. package/dist/node_modules/date-fns/locale/en-US.mjs +20 -0
  38. package/dist/node_modules/date-fns/parse/_lib/Parser.mjs +22 -0
  39. package/dist/node_modules/date-fns/parse/_lib/Setter.mjs +41 -0
  40. package/dist/node_modules/date-fns/parse/_lib/constants.mjs +49 -0
  41. package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs +49 -0
  42. package/dist/node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs +49 -0
  43. package/dist/node_modules/date-fns/parse/_lib/parsers/DateParser.mjs +61 -0
  44. package/dist/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs +51 -0
  45. package/dist/node_modules/date-fns/parse/_lib/parsers/DayParser.mjs +45 -0
  46. package/dist/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs +49 -0
  47. package/dist/node_modules/date-fns/parse/_lib/parsers/EraParser.mjs +30 -0
  48. package/dist/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs +21 -0
  49. package/dist/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs +22 -0
  50. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs +32 -0
  51. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs +32 -0
  52. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs +33 -0
  53. package/dist/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs +33 -0
  54. package/dist/node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs +99 -0
  55. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs +48 -0
  56. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs +48 -0
  57. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs +49 -0
  58. package/dist/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs +40 -0
  59. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs +74 -0
  60. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs +48 -0
  61. package/dist/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs +69 -0
  62. package/dist/node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs +32 -0
  63. package/dist/node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs +71 -0
  64. package/dist/node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs +70 -0
  65. package/dist/node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs +32 -0
  66. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs +74 -0
  67. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs +71 -0
  68. package/dist/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs +70 -0
  69. package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs +22 -0
  70. package/dist/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs +22 -0
  71. package/dist/node_modules/date-fns/parse/_lib/parsers/YearParser.mjs +49 -0
  72. package/dist/node_modules/date-fns/parse/_lib/parsers.mjs +67 -0
  73. package/dist/node_modules/date-fns/parse/_lib/utils.mjs +103 -0
  74. package/dist/node_modules/date-fns/parse.mjs +88 -0
  75. package/dist/node_modules/date-fns/setDay.mjs +11 -0
  76. package/dist/node_modules/date-fns/setISODay.mjs +10 -0
  77. package/dist/node_modules/date-fns/setISOWeek.mjs +9 -0
  78. package/dist/node_modules/date-fns/setWeek.mjs +9 -0
  79. package/dist/node_modules/date-fns/startOfDay.mjs +8 -0
  80. package/dist/node_modules/date-fns/startOfISOWeek.mjs +7 -0
  81. package/dist/node_modules/date-fns/startOfISOWeekYear.mjs +10 -0
  82. package/dist/node_modules/date-fns/startOfWeek.mjs +10 -0
  83. package/dist/node_modules/date-fns/startOfWeekYear.mjs +12 -0
  84. package/dist/node_modules/date-fns/startOfYear.mjs +8 -0
  85. package/dist/node_modules/date-fns/toDate.mjs +7 -0
  86. package/dist/node_modules/date-fns/transpose.mjs +17 -0
  87. package/dist/style.css +1 -1
  88. package/dist/unnnic.umd.js +19 -19
  89. package/dist/utils/formatDate.mjs +30 -0
  90. package/package.json +2 -1
  91. package/src/components/DateFilter/DateFilter.vue +12 -9
  92. package/src/components/DateFilter/__test__/DateFilter.spec.js +41 -0
  93. package/src/components/InputDatePicker/InputDatePicker.vue +26 -14
  94. package/src/components/InputDatePicker/__test__/InputDatePicker.spec.js +112 -0
  95. package/src/components/InputDatePicker/__test__/formatDate.spec.ts +75 -0
  96. package/src/stories/DateFilter.stories.js +1 -0
  97. package/src/stories/InputDatePicker.stories.js +3 -0
  98. package/src/utils/formatDate.ts +76 -0
@@ -0,0 +1,15 @@
1
+ import { getTimezoneOffsetInMilliseconds as a } from "./_lib/getTimezoneOffsetInMilliseconds.mjs";
2
+ import { normalizeDates as c } from "./_lib/normalizeDates.mjs";
3
+ import { millisecondsInDay as D } from "./constants.mjs";
4
+ import { startOfDay as m } from "./startOfDay.mjs";
5
+ function u(n, i, e) {
6
+ const [f, l] = c(
7
+ e == null ? void 0 : e.in,
8
+ n,
9
+ i
10
+ ), r = m(f), t = m(l), o = +r - a(r), s = +t - a(t);
11
+ return Math.round((o - s) / D);
12
+ }
13
+ export {
14
+ u as differenceInCalendarDays
15
+ };
@@ -0,0 +1,58 @@
1
+ import { getDefaultOptions as w } from "./_lib/defaultOptions.mjs";
2
+ import { formatters as k } from "./_lib/format/formatters.mjs";
3
+ import { longFormatters as T } from "./_lib/format/longFormatters.mjs";
4
+ import { isProtectedWeekYearToken as D, isProtectedDayOfYearToken as E, warnOrThrowProtectedError as v } from "./_lib/protectedTokens.mjs";
5
+ import { isValid as O } from "./isValid.mjs";
6
+ import { toDate as R } from "./toDate.mjs";
7
+ import { enUS as x } from "./locale/en-US.mjs";
8
+ const C = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, P = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, S = /^'([^]*?)'?$/, z = /''/g, F = /[a-zA-Z]/;
9
+ function q(r, o, i) {
10
+ var f, m, p, u;
11
+ const a = w(), n = a.locale ?? x, g = a.firstWeekContainsDate ?? ((m = (f = a.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, h = a.weekStartsOn ?? ((u = (p = a.locale) == null ? void 0 : p.options) == null ? void 0 : u.weekStartsOn) ?? 0, c = R(r, i == null ? void 0 : i.in);
12
+ if (!O(c))
13
+ throw new RangeError("Invalid time value");
14
+ let s = o.match(P).map((t) => {
15
+ const e = t[0];
16
+ if (e === "p" || e === "P") {
17
+ const l = T[e];
18
+ return l(t, n.formatLong);
19
+ }
20
+ return t;
21
+ }).join("").match(C).map((t) => {
22
+ if (t === "''")
23
+ return { isToken: !1, value: "'" };
24
+ const e = t[0];
25
+ if (e === "'")
26
+ return { isToken: !1, value: W(t) };
27
+ if (k[e])
28
+ return { isToken: !0, value: t };
29
+ if (e.match(F))
30
+ throw new RangeError(
31
+ "Format string contains an unescaped latin alphabet character `" + e + "`"
32
+ );
33
+ return { isToken: !1, value: t };
34
+ });
35
+ n.localize.preprocessor && (s = n.localize.preprocessor(c, s));
36
+ const d = {
37
+ firstWeekContainsDate: g,
38
+ weekStartsOn: h,
39
+ locale: n
40
+ };
41
+ return s.map((t) => {
42
+ if (!t.isToken) return t.value;
43
+ const e = t.value;
44
+ (D(e) || E(e)) && v(e, o, String(r));
45
+ const l = k[e[0]];
46
+ return l(c, e, n.localize, d);
47
+ }).join("");
48
+ }
49
+ function W(r) {
50
+ const o = r.match(S);
51
+ return o ? o[1].replace(z, "'") : r;
52
+ }
53
+ export {
54
+ q as format,
55
+ q as formatDate,
56
+ k as formatters,
57
+ T as longFormatters
58
+ };
@@ -0,0 +1,10 @@
1
+ import { differenceInCalendarDays as e } from "./differenceInCalendarDays.mjs";
2
+ import { startOfYear as t } from "./startOfYear.mjs";
3
+ import { toDate as d } from "./toDate.mjs";
4
+ function y(a, r) {
5
+ const f = d(a, r == null ? void 0 : r.in);
6
+ return e(f, t(f)) + 1;
7
+ }
8
+ export {
9
+ y as getDayOfYear
10
+ };
@@ -0,0 +1,7 @@
1
+ import { getDefaultOptions as t } from "./_lib/defaultOptions.mjs";
2
+ function n() {
3
+ return Object.assign({}, t());
4
+ }
5
+ export {
6
+ n as getDefaultOptions
7
+ };
@@ -0,0 +1,8 @@
1
+ import { toDate as a } from "./toDate.mjs";
2
+ function D(t, e) {
3
+ const r = a(t, e == null ? void 0 : e.in).getDay();
4
+ return r === 0 ? 7 : r;
5
+ }
6
+ export {
7
+ D as getISODay
8
+ };
@@ -0,0 +1,11 @@
1
+ import { millisecondsInWeek as m } from "./constants.mjs";
2
+ import { startOfISOWeek as o } from "./startOfISOWeek.mjs";
3
+ import { startOfISOWeekYear as a } from "./startOfISOWeekYear.mjs";
4
+ import { toDate as i } from "./toDate.mjs";
5
+ function k(t, e) {
6
+ const r = i(t, e == null ? void 0 : e.in), f = +o(r) - +a(r);
7
+ return Math.round(f / m) + 1;
8
+ }
9
+ export {
10
+ k as getISOWeek
11
+ };
@@ -0,0 +1,14 @@
1
+ import { constructFrom as f } from "./constructFrom.mjs";
2
+ import { startOfISOWeek as u } from "./startOfISOWeek.mjs";
3
+ import { toDate as c } from "./toDate.mjs";
4
+ function Y(o, r) {
5
+ const e = c(o, r == null ? void 0 : r.in), t = e.getFullYear(), a = f(e, 0);
6
+ a.setFullYear(t + 1, 0, 4), a.setHours(0, 0, 0, 0);
7
+ const m = u(a), s = f(e, 0);
8
+ s.setFullYear(t, 0, 4), s.setHours(0, 0, 0, 0);
9
+ const n = u(s);
10
+ return e.getTime() >= m.getTime() ? t + 1 : e.getTime() >= n.getTime() ? t : t - 1;
11
+ }
12
+ export {
13
+ Y as getISOWeekYear
14
+ };
@@ -0,0 +1,11 @@
1
+ import { millisecondsInWeek as m } from "./constants.mjs";
2
+ import { startOfWeek as a } from "./startOfWeek.mjs";
3
+ import { startOfWeekYear as c } from "./startOfWeekYear.mjs";
4
+ import { toDate as d } from "./toDate.mjs";
5
+ function o(t, e) {
6
+ const r = d(t, e == null ? void 0 : e.in), f = +a(r, e) - +c(r, e);
7
+ return Math.round(f / m) + 1;
8
+ }
9
+ export {
10
+ o as getWeek
11
+ };
@@ -0,0 +1,16 @@
1
+ import { getDefaultOptions as C } from "./_lib/defaultOptions.mjs";
2
+ import { constructFrom as Y } from "./constructFrom.mjs";
3
+ import { startOfWeek as D } from "./startOfWeek.mjs";
4
+ import { toDate as F } from "./toDate.mjs";
5
+ function H(t, e) {
6
+ var u, k, m, W;
7
+ const a = F(t, e == null ? void 0 : e.in), r = a.getFullYear(), c = C(), s = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((k = (u = e == null ? void 0 : e.locale) == null ? void 0 : u.options) == null ? void 0 : k.firstWeekContainsDate) ?? c.firstWeekContainsDate ?? ((W = (m = c.locale) == null ? void 0 : m.options) == null ? void 0 : W.firstWeekContainsDate) ?? 1, f = Y((e == null ? void 0 : e.in) || t, 0);
8
+ f.setFullYear(r + 1, 0, s), f.setHours(0, 0, 0, 0);
9
+ const O = D(f, e), l = Y((e == null ? void 0 : e.in) || t, 0);
10
+ l.setFullYear(r, 0, s), l.setHours(0, 0, 0, 0);
11
+ const n = D(l, e);
12
+ return +a >= +O ? r + 1 : +a >= +n ? r : r - 1;
13
+ }
14
+ export {
15
+ H as getWeekYear
16
+ };
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t instanceof Date || typeof t == "object" && Object.prototype.toString.call(t) === "[object Date]";
3
+ }
4
+ export {
5
+ e as isDate
6
+ };
@@ -0,0 +1,8 @@
1
+ import { isDate as r } from "./isDate.mjs";
2
+ import { toDate as i } from "./toDate.mjs";
3
+ function e(o) {
4
+ return !(!r(o) && typeof o != "number" || isNaN(+i(o)));
5
+ }
6
+ export {
7
+ e as isValid
8
+ };
@@ -0,0 +1,9 @@
1
+ function r(t) {
2
+ return (d = {}) => {
3
+ const n = d.width ? String(d.width) : t.defaultWidth;
4
+ return t.formats[n] || t.formats[t.defaultWidth];
5
+ };
6
+ }
7
+ export {
8
+ r as buildFormatLongFn
9
+ };
@@ -0,0 +1,18 @@
1
+ function h(e) {
2
+ return (a, t) => {
3
+ const c = t != null && t.context ? String(t.context) : "standalone";
4
+ let l;
5
+ if (c === "formatting" && e.formattingValues) {
6
+ const d = e.defaultFormattingWidth || e.defaultWidth, u = t != null && t.width ? String(t.width) : d;
7
+ l = e.formattingValues[u] || e.formattingValues[d];
8
+ } else {
9
+ const d = e.defaultWidth, u = t != null && t.width ? String(t.width) : e.defaultWidth;
10
+ l = e.values[u] || e.values[d];
11
+ }
12
+ const f = e.argumentCallback ? e.argumentCallback(a) : a;
13
+ return l[f];
14
+ };
15
+ }
16
+ export {
17
+ h as buildLocalizeFn
18
+ };
@@ -0,0 +1,31 @@
1
+ function P(t) {
2
+ return (n, e = {}) => {
3
+ const l = e.width, h = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], i = n.match(h);
4
+ if (!i)
5
+ return null;
6
+ const r = i[0], c = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? o(c, (u) => u.test(r)) : (
7
+ // [TODO] -- I challenge you to fix the type
8
+ s(c, (u) => u.test(r))
9
+ );
10
+ let a;
11
+ a = t.valueCallback ? t.valueCallback(d) : d, a = e.valueCallback ? (
12
+ // [TODO] -- I challenge you to fix the type
13
+ e.valueCallback(a)
14
+ ) : a;
15
+ const f = n.slice(r.length);
16
+ return { value: a, rest: f };
17
+ };
18
+ }
19
+ function s(t, n) {
20
+ for (const e in t)
21
+ if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
22
+ return e;
23
+ }
24
+ function o(t, n) {
25
+ for (let e = 0; e < t.length; e++)
26
+ if (n(t[e]))
27
+ return e;
28
+ }
29
+ export {
30
+ P as buildMatchFn
31
+ };
@@ -0,0 +1,15 @@
1
+ function h(t) {
2
+ return (e, c = {}) => {
3
+ const n = e.match(t.matchPattern);
4
+ if (!n) return null;
5
+ const u = n[0], a = e.match(t.parsePattern);
6
+ if (!a) return null;
7
+ let l = t.valueCallback ? t.valueCallback(a[0]) : a[0];
8
+ l = c.valueCallback ? c.valueCallback(l) : l;
9
+ const r = e.slice(u.length);
10
+ return { value: l, rest: r };
11
+ };
12
+ }
13
+ export {
14
+ h as buildMatchPatternFn
15
+ };
@@ -0,0 +1,70 @@
1
+ const a = {
2
+ lessThanXSeconds: {
3
+ one: "less than a second",
4
+ other: "less than {{count}} seconds"
5
+ },
6
+ xSeconds: {
7
+ one: "1 second",
8
+ other: "{{count}} seconds"
9
+ },
10
+ halfAMinute: "half a minute",
11
+ lessThanXMinutes: {
12
+ one: "less than a minute",
13
+ other: "less than {{count}} minutes"
14
+ },
15
+ xMinutes: {
16
+ one: "1 minute",
17
+ other: "{{count}} minutes"
18
+ },
19
+ aboutXHours: {
20
+ one: "about 1 hour",
21
+ other: "about {{count}} hours"
22
+ },
23
+ xHours: {
24
+ one: "1 hour",
25
+ other: "{{count}} hours"
26
+ },
27
+ xDays: {
28
+ one: "1 day",
29
+ other: "{{count}} days"
30
+ },
31
+ aboutXWeeks: {
32
+ one: "about 1 week",
33
+ other: "about {{count}} weeks"
34
+ },
35
+ xWeeks: {
36
+ one: "1 week",
37
+ other: "{{count}} weeks"
38
+ },
39
+ aboutXMonths: {
40
+ one: "about 1 month",
41
+ other: "about {{count}} months"
42
+ },
43
+ xMonths: {
44
+ one: "1 month",
45
+ other: "{{count}} months"
46
+ },
47
+ aboutXYears: {
48
+ one: "about 1 year",
49
+ other: "about {{count}} years"
50
+ },
51
+ xYears: {
52
+ one: "1 year",
53
+ other: "{{count}} years"
54
+ },
55
+ overXYears: {
56
+ one: "over 1 year",
57
+ other: "over {{count}} years"
58
+ },
59
+ almostXYears: {
60
+ one: "almost 1 year",
61
+ other: "almost {{count}} years"
62
+ }
63
+ }, r = (s, n, o) => {
64
+ let e;
65
+ const t = a[s];
66
+ return typeof t == "string" ? e = t : n === 1 ? e = t.one : e = t.other.replace("{{count}}", n.toString()), o != null && o.addSuffix ? o.comparison && o.comparison > 0 ? "in " + e : e + " ago" : e;
67
+ };
68
+ export {
69
+ r as formatDistance
70
+ };
@@ -0,0 +1,33 @@
1
+ import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.mjs";
2
+ const m = {
3
+ full: "EEEE, MMMM do, y",
4
+ long: "MMMM do, y",
5
+ medium: "MMM d, y",
6
+ short: "MM/dd/yyyy"
7
+ }, a = {
8
+ full: "h:mm:ss a zzzz",
9
+ long: "h:mm:ss a z",
10
+ medium: "h:mm:ss a",
11
+ short: "h:mm a"
12
+ }, o = {
13
+ full: "{{date}} 'at' {{time}}",
14
+ long: "{{date}} 'at' {{time}}",
15
+ medium: "{{date}}, {{time}}",
16
+ short: "{{date}}, {{time}}"
17
+ }, e = {
18
+ date: t({
19
+ formats: m,
20
+ defaultWidth: "full"
21
+ }),
22
+ time: t({
23
+ formats: a,
24
+ defaultWidth: "full"
25
+ }),
26
+ dateTime: t({
27
+ formats: o,
28
+ defaultWidth: "full"
29
+ })
30
+ };
31
+ export {
32
+ e as formatLong
33
+ };
@@ -0,0 +1,11 @@
1
+ const t = {
2
+ lastWeek: "'last' eeee 'at' p",
3
+ yesterday: "'yesterday at' p",
4
+ today: "'today at' p",
5
+ tomorrow: "'tomorrow at' p",
6
+ nextWeek: "eeee 'at' p",
7
+ other: "P"
8
+ }, s = (e, a, o, r) => t[e];
9
+ export {
10
+ s as formatRelative
11
+ };
@@ -0,0 +1,155 @@
1
+ import { buildLocalizeFn as e } from "../../_lib/buildLocalizeFn.mjs";
2
+ const a = {
3
+ narrow: ["B", "A"],
4
+ abbreviated: ["BC", "AD"],
5
+ wide: ["Before Christ", "Anno Domini"]
6
+ }, r = {
7
+ narrow: ["1", "2", "3", "4"],
8
+ abbreviated: ["Q1", "Q2", "Q3", "Q4"],
9
+ wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
10
+ }, o = {
11
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
12
+ abbreviated: [
13
+ "Jan",
14
+ "Feb",
15
+ "Mar",
16
+ "Apr",
17
+ "May",
18
+ "Jun",
19
+ "Jul",
20
+ "Aug",
21
+ "Sep",
22
+ "Oct",
23
+ "Nov",
24
+ "Dec"
25
+ ],
26
+ wide: [
27
+ "January",
28
+ "February",
29
+ "March",
30
+ "April",
31
+ "May",
32
+ "June",
33
+ "July",
34
+ "August",
35
+ "September",
36
+ "October",
37
+ "November",
38
+ "December"
39
+ ]
40
+ }, d = {
41
+ narrow: ["S", "M", "T", "W", "T", "F", "S"],
42
+ short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
43
+ abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
44
+ wide: [
45
+ "Sunday",
46
+ "Monday",
47
+ "Tuesday",
48
+ "Wednesday",
49
+ "Thursday",
50
+ "Friday",
51
+ "Saturday"
52
+ ]
53
+ }, m = {
54
+ narrow: {
55
+ am: "a",
56
+ pm: "p",
57
+ midnight: "mi",
58
+ noon: "n",
59
+ morning: "morning",
60
+ afternoon: "afternoon",
61
+ evening: "evening",
62
+ night: "night"
63
+ },
64
+ abbreviated: {
65
+ am: "AM",
66
+ pm: "PM",
67
+ midnight: "midnight",
68
+ noon: "noon",
69
+ morning: "morning",
70
+ afternoon: "afternoon",
71
+ evening: "evening",
72
+ night: "night"
73
+ },
74
+ wide: {
75
+ am: "a.m.",
76
+ pm: "p.m.",
77
+ midnight: "midnight",
78
+ noon: "noon",
79
+ morning: "morning",
80
+ afternoon: "afternoon",
81
+ evening: "evening",
82
+ night: "night"
83
+ }
84
+ }, g = {
85
+ narrow: {
86
+ am: "a",
87
+ pm: "p",
88
+ midnight: "mi",
89
+ noon: "n",
90
+ morning: "in the morning",
91
+ afternoon: "in the afternoon",
92
+ evening: "in the evening",
93
+ night: "at night"
94
+ },
95
+ abbreviated: {
96
+ am: "AM",
97
+ pm: "PM",
98
+ midnight: "midnight",
99
+ noon: "noon",
100
+ morning: "in the morning",
101
+ afternoon: "in the afternoon",
102
+ evening: "in the evening",
103
+ night: "at night"
104
+ },
105
+ wide: {
106
+ am: "a.m.",
107
+ pm: "p.m.",
108
+ midnight: "midnight",
109
+ noon: "noon",
110
+ morning: "in the morning",
111
+ afternoon: "in the afternoon",
112
+ evening: "in the evening",
113
+ night: "at night"
114
+ }
115
+ }, u = (i, h) => {
116
+ const n = Number(i), t = n % 100;
117
+ if (t > 20 || t < 10)
118
+ switch (t % 10) {
119
+ case 1:
120
+ return n + "st";
121
+ case 2:
122
+ return n + "nd";
123
+ case 3:
124
+ return n + "rd";
125
+ }
126
+ return n + "th";
127
+ }, l = {
128
+ ordinalNumber: u,
129
+ era: e({
130
+ values: a,
131
+ defaultWidth: "wide"
132
+ }),
133
+ quarter: e({
134
+ values: r,
135
+ defaultWidth: "wide",
136
+ argumentCallback: (i) => i - 1
137
+ }),
138
+ month: e({
139
+ values: o,
140
+ defaultWidth: "wide"
141
+ }),
142
+ day: e({
143
+ values: d,
144
+ defaultWidth: "wide"
145
+ }),
146
+ dayPeriod: e({
147
+ values: m,
148
+ defaultWidth: "wide",
149
+ formattingValues: g,
150
+ defaultFormattingWidth: "wide"
151
+ })
152
+ };
153
+ export {
154
+ l as localize
155
+ };
@@ -0,0 +1,110 @@
1
+ import { buildMatchFn as a } from "../../_lib/buildMatchFn.mjs";
2
+ import { buildMatchPatternFn as i } from "../../_lib/buildMatchPatternFn.mjs";
3
+ const n = /^(\d+)(th|st|nd|rd)?/i, e = /\d+/i, r = {
4
+ narrow: /^(b|a)/i,
5
+ abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
6
+ wide: /^(before christ|before common era|anno domini|common era)/i
7
+ }, s = {
8
+ any: [/^b/i, /^(a|c)/i]
9
+ }, o = {
10
+ narrow: /^[1234]/i,
11
+ abbreviated: /^q[1234]/i,
12
+ wide: /^[1234](th|st|nd|rd)? quarter/i
13
+ }, d = {
14
+ any: [/1/i, /2/i, /3/i, /4/i]
15
+ }, m = {
16
+ narrow: /^[jfmasond]/i,
17
+ abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
18
+ wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
19
+ }, h = {
20
+ narrow: [
21
+ /^j/i,
22
+ /^f/i,
23
+ /^m/i,
24
+ /^a/i,
25
+ /^m/i,
26
+ /^j/i,
27
+ /^j/i,
28
+ /^a/i,
29
+ /^s/i,
30
+ /^o/i,
31
+ /^n/i,
32
+ /^d/i
33
+ ],
34
+ any: [
35
+ /^ja/i,
36
+ /^f/i,
37
+ /^mar/i,
38
+ /^ap/i,
39
+ /^may/i,
40
+ /^jun/i,
41
+ /^jul/i,
42
+ /^au/i,
43
+ /^s/i,
44
+ /^o/i,
45
+ /^n/i,
46
+ /^d/i
47
+ ]
48
+ }, c = {
49
+ narrow: /^[smtwf]/i,
50
+ short: /^(su|mo|tu|we|th|fr|sa)/i,
51
+ abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
52
+ wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
53
+ }, u = {
54
+ narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
55
+ any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
56
+ }, P = {
57
+ narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
58
+ any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
59
+ }, y = {
60
+ any: {
61
+ am: /^a/i,
62
+ pm: /^p/i,
63
+ midnight: /^mi/i,
64
+ noon: /^no/i,
65
+ morning: /morning/i,
66
+ afternoon: /afternoon/i,
67
+ evening: /evening/i,
68
+ night: /night/i
69
+ }
70
+ }, l = {
71
+ ordinalNumber: i({
72
+ matchPattern: n,
73
+ parsePattern: e,
74
+ valueCallback: (t) => parseInt(t, 10)
75
+ }),
76
+ era: a({
77
+ matchPatterns: r,
78
+ defaultMatchWidth: "wide",
79
+ parsePatterns: s,
80
+ defaultParseWidth: "any"
81
+ }),
82
+ quarter: a({
83
+ matchPatterns: o,
84
+ defaultMatchWidth: "wide",
85
+ parsePatterns: d,
86
+ defaultParseWidth: "any",
87
+ valueCallback: (t) => t + 1
88
+ }),
89
+ month: a({
90
+ matchPatterns: m,
91
+ defaultMatchWidth: "wide",
92
+ parsePatterns: h,
93
+ defaultParseWidth: "any"
94
+ }),
95
+ day: a({
96
+ matchPatterns: c,
97
+ defaultMatchWidth: "wide",
98
+ parsePatterns: u,
99
+ defaultParseWidth: "any"
100
+ }),
101
+ dayPeriod: a({
102
+ matchPatterns: P,
103
+ defaultMatchWidth: "any",
104
+ parsePatterns: y,
105
+ defaultParseWidth: "any"
106
+ })
107
+ };
108
+ export {
109
+ l as match
110
+ };
@@ -0,0 +1,20 @@
1
+ import { formatDistance as o } from "./en-US/_lib/formatDistance.mjs";
2
+ import { formatLong as t } from "./en-US/_lib/formatLong.mjs";
3
+ import { formatRelative as r } from "./en-US/_lib/formatRelative.mjs";
4
+ import { localize as m } from "./en-US/_lib/localize.mjs";
5
+ import { match as a } from "./en-US/_lib/match.mjs";
6
+ const p = {
7
+ code: "en-US",
8
+ formatDistance: o,
9
+ formatLong: t,
10
+ formatRelative: r,
11
+ localize: m,
12
+ match: a,
13
+ options: {
14
+ weekStartsOn: 0,
15
+ firstWeekContainsDate: 1
16
+ }
17
+ };
18
+ export {
19
+ p as enUS
20
+ };
@@ -0,0 +1,22 @@
1
+ import { ValueSetter as u } from "./Setter.mjs";
2
+ class n {
3
+ run(r, e, s, i) {
4
+ const t = this.parse(r, e, s, i);
5
+ return t ? {
6
+ setter: new u(
7
+ t.value,
8
+ this.validate,
9
+ this.set,
10
+ this.priority,
11
+ this.subPriority
12
+ ),
13
+ rest: t.rest
14
+ } : null;
15
+ }
16
+ validate(r, e, s) {
17
+ return !0;
18
+ }
19
+ }
20
+ export {
21
+ n as Parser
22
+ };