@phillips/seldon 1.80.0 → 1.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/assets/search.svg.js +2 -2
  2. package/dist/components/Countdown/Countdown.d.ts +36 -0
  3. package/dist/components/Countdown/Countdown.js +50 -0
  4. package/dist/components/Countdown/Countdown.stories.d.ts +19 -0
  5. package/dist/components/Countdown/Countdown.test.d.ts +1 -0
  6. package/dist/components/Countdown/Duration.d.ts +7 -0
  7. package/dist/components/Countdown/Duration.js +14 -0
  8. package/dist/components/Countdown/Duration.test.d.ts +1 -0
  9. package/dist/components/Countdown/index.d.ts +1 -0
  10. package/dist/components/Countdown/types.d.ts +4 -0
  11. package/dist/components/Countdown/types.js +4 -0
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.js +146 -144
  14. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  15. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +9 -0
  16. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
  17. package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  18. package/dist/node_modules/date-fns/constants.js +7 -0
  19. package/dist/node_modules/date-fns/constructFrom.js +8 -0
  20. package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
  21. package/dist/node_modules/date-fns/differenceInDays.js +22 -0
  22. package/dist/node_modules/date-fns/differenceInHours.js +15 -0
  23. package/dist/node_modules/date-fns/differenceInMilliseconds.js +8 -0
  24. package/dist/node_modules/date-fns/differenceInMinutes.js +11 -0
  25. package/dist/node_modules/date-fns/differenceInSeconds.js +10 -0
  26. package/dist/node_modules/date-fns/formatDuration.js +23 -0
  27. package/dist/node_modules/date-fns/isSameWeek.js +14 -0
  28. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  29. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
  30. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
  31. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
  32. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
  33. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
  34. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  35. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
  36. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
  37. package/dist/node_modules/date-fns/locale/en-US.js +21 -0
  38. package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +70 -0
  39. package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +33 -0
  40. package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +21 -0
  41. package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +162 -0
  42. package/dist/node_modules/date-fns/locale/zh-CN/_lib/match.js +108 -0
  43. package/dist/node_modules/date-fns/locale/zh-CN.js +21 -0
  44. package/dist/node_modules/date-fns/startOfDay.js +9 -0
  45. package/dist/node_modules/date-fns/startOfWeek.js +11 -0
  46. package/dist/node_modules/date-fns/toDate.js +8 -0
  47. package/dist/node_modules/exenv/index.js +1 -1
  48. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  49. package/dist/patterns/HeroBanner/HeroBanner.d.ts +1 -5
  50. package/dist/patterns/HeroBanner/HeroBanner.js +19 -20
  51. package/dist/patterns/HeroBanner/HeroBanner.stories.d.ts +1 -1
  52. package/dist/patterns/SaleHeaderBanner/index.d.ts +0 -1
  53. package/dist/scss/_vars.scss +8 -3
  54. package/dist/scss/componentStyles.scss +2 -0
  55. package/dist/scss/components/Countdown/_countdown.scss +25 -0
  56. package/dist/scss/components/Countdown/_duration.scss +13 -0
  57. package/dist/scss/patterns/HeroBanner/_heroBanner.scss +7 -2
  58. package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +0 -11
  59. package/dist/scss/patterns/UserManagement/_userManagement.scss +2 -2
  60. package/dist/scss/site-furniture/Header/_header.scss +15 -6
  61. package/package.json +2 -1
  62. package/dist/patterns/SaleHeaderBanner/SaleHeaderCountdown.d.ts +0 -8
  63. package/dist/patterns/SaleHeaderBanner/SaleHeaderCountdown.js +0 -35
@@ -0,0 +1,22 @@
1
+ import { normalizeDates as d } from "./_lib/normalizeDates.js";
2
+ import { differenceInCalendarDays as r } from "./differenceInCalendarDays.js";
3
+ function l(n, t, e) {
4
+ const [s, c] = d(
5
+ e == null ? void 0 : e.in,
6
+ n,
7
+ t
8
+ ), o = f(s, c), g = Math.abs(
9
+ r(s, c)
10
+ );
11
+ s.setDate(s.getDate() - o * g);
12
+ const i = +(f(s, c) === -o), u = o * (g - i);
13
+ return u === 0 ? 0 : u;
14
+ }
15
+ function f(n, t) {
16
+ const e = n.getFullYear() - t.getFullYear() || n.getMonth() - t.getMonth() || n.getDate() - t.getDate() || n.getHours() - t.getHours() || n.getMinutes() - t.getMinutes() || n.getSeconds() - t.getSeconds() || n.getMilliseconds() - t.getMilliseconds();
17
+ return e < 0 ? -1 : e > 0 ? 1 : e;
18
+ }
19
+ export {
20
+ l as default,
21
+ l as differenceInDays
22
+ };
@@ -0,0 +1,15 @@
1
+ import { getRoundingMethod as t } from "./_lib/getRoundingMethod.js";
2
+ import { normalizeDates as u } from "./_lib/normalizeDates.js";
3
+ import { millisecondsInHour as l } from "./constants.js";
4
+ function g(r, f, e) {
5
+ const [a, d] = u(
6
+ e == null ? void 0 : e.in,
7
+ r,
8
+ f
9
+ ), m = (+a - +d) / l;
10
+ return t(e == null ? void 0 : e.roundingMethod)(m);
11
+ }
12
+ export {
13
+ g as default,
14
+ g as differenceInHours
15
+ };
@@ -0,0 +1,8 @@
1
+ import { toDate as e } from "./toDate.js";
2
+ function r(t, n) {
3
+ return +e(t) - +e(n);
4
+ }
5
+ export {
6
+ r as default,
7
+ r as differenceInMilliseconds
8
+ };
@@ -0,0 +1,11 @@
1
+ import { getRoundingMethod as i } from "./_lib/getRoundingMethod.js";
2
+ import { millisecondsInMinute as d } from "./constants.js";
3
+ import { differenceInMilliseconds as t } from "./differenceInMilliseconds.js";
4
+ function c(n, r, e) {
5
+ const f = t(n, r) / d;
6
+ return i(e == null ? void 0 : e.roundingMethod)(f);
7
+ }
8
+ export {
9
+ c as default,
10
+ c as differenceInMinutes
11
+ };
@@ -0,0 +1,10 @@
1
+ import { getRoundingMethod as r } from "./_lib/getRoundingMethod.js";
2
+ import { differenceInMilliseconds as c } from "./differenceInMilliseconds.js";
3
+ function o(d, f, e) {
4
+ const n = c(d, f) / 1e3;
5
+ return r(e == null ? void 0 : e.roundingMethod)(n);
6
+ }
7
+ export {
8
+ o as default,
9
+ o as differenceInSeconds
10
+ };
@@ -0,0 +1,23 @@
1
+ import { getDefaultOptions as z } from "./_lib/defaultOptions.js";
2
+ import { enUS as O } from "./locale/en-US.js";
3
+ const U = [
4
+ "years",
5
+ "months",
6
+ "weeks",
7
+ "days",
8
+ "hours",
9
+ "minutes",
10
+ "seconds"
11
+ ];
12
+ function w(a, e) {
13
+ var c, l, f, m, u;
14
+ const s = z(), t = (l = (c = e == null ? void 0 : e.locale) != null ? c : s.locale) != null ? l : O, D = (f = e == null ? void 0 : e.format) != null ? f : U, h = (m = e == null ? void 0 : e.zero) != null ? m : !1, k = (u = e == null ? void 0 : e.delimiter) != null ? u : " ";
15
+ return t.formatDistance ? D.reduce((d, r) => {
16
+ const x = `x${r.replace(/(^.)/, (y) => y.toUpperCase())}`, n = a[r];
17
+ return n !== void 0 && (h || a[r]) ? d.concat(t.formatDistance(x, n)) : d;
18
+ }, []).join(k) : "";
19
+ }
20
+ export {
21
+ w as default,
22
+ w as formatDuration
23
+ };
@@ -0,0 +1,14 @@
1
+ import { normalizeDates as l } from "./_lib/normalizeDates.js";
2
+ import { startOfWeek as r } from "./startOfWeek.js";
3
+ function c(a, t, e) {
4
+ const [m, f] = l(
5
+ e == null ? void 0 : e.in,
6
+ a,
7
+ t
8
+ );
9
+ return +r(m, e) == +r(f, e);
10
+ }
11
+ export {
12
+ c as default,
13
+ c as isSameWeek
14
+ };
@@ -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.js";
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.js";
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.js";
2
+ import { buildMatchPatternFn as i } from "../../_lib/buildMatchPatternFn.js";
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,21 @@
1
+ import { formatDistance as o } from "./en-US/_lib/formatDistance.js";
2
+ import { formatLong as t } from "./en-US/_lib/formatLong.js";
3
+ import { formatRelative as a } from "./en-US/_lib/formatRelative.js";
4
+ import { localize as r } from "./en-US/_lib/localize.js";
5
+ import { match as e } from "./en-US/_lib/match.js";
6
+ const s = {
7
+ code: "en-US",
8
+ formatDistance: o,
9
+ formatLong: t,
10
+ formatRelative: a,
11
+ localize: r,
12
+ match: e,
13
+ options: {
14
+ weekStartsOn: 0,
15
+ firstWeekContainsDate: 1
16
+ }
17
+ };
18
+ export {
19
+ s as default,
20
+ s as enUS
21
+ };
@@ -0,0 +1,70 @@
1
+ const u = {
2
+ lessThanXSeconds: {
3
+ one: "不到 1 秒",
4
+ other: "不到 {{count}} 秒"
5
+ },
6
+ xSeconds: {
7
+ one: "1 秒",
8
+ other: "{{count}} 秒"
9
+ },
10
+ halfAMinute: "半分钟",
11
+ lessThanXMinutes: {
12
+ one: "不到 1 分钟",
13
+ other: "不到 {{count}} 分钟"
14
+ },
15
+ xMinutes: {
16
+ one: "1 分钟",
17
+ other: "{{count}} 分钟"
18
+ },
19
+ xHours: {
20
+ one: "1 小时",
21
+ other: "{{count}} 小时"
22
+ },
23
+ aboutXHours: {
24
+ one: "大约 1 小时",
25
+ other: "大约 {{count}} 小时"
26
+ },
27
+ xDays: {
28
+ one: "1 天",
29
+ other: "{{count}} 天"
30
+ },
31
+ aboutXWeeks: {
32
+ one: "大约 1 个星期",
33
+ other: "大约 {{count}} 个星期"
34
+ },
35
+ xWeeks: {
36
+ one: "1 个星期",
37
+ other: "{{count}} 个星期"
38
+ },
39
+ aboutXMonths: {
40
+ one: "大约 1 个月",
41
+ other: "大约 {{count}} 个月"
42
+ },
43
+ xMonths: {
44
+ one: "1 个月",
45
+ other: "{{count}} 个月"
46
+ },
47
+ aboutXYears: {
48
+ one: "大约 1 年",
49
+ other: "大约 {{count}} 年"
50
+ },
51
+ xYears: {
52
+ one: "1 年",
53
+ other: "{{count}} 年"
54
+ },
55
+ overXYears: {
56
+ one: "超过 1 年",
57
+ other: "超过 {{count}} 年"
58
+ },
59
+ almostXYears: {
60
+ one: "将近 1 年",
61
+ other: "将近 {{count}} 年"
62
+ }
63
+ }, c = (r, n, o) => {
64
+ let e;
65
+ const t = u[r];
66
+ return typeof t == "string" ? e = t : n === 1 ? e = t.one : e = t.other.replace("{{count}}", String(n)), o != null && o.addSuffix ? o.comparison && o.comparison > 0 ? e + "内" : e + "前" : e;
67
+ };
68
+ export {
69
+ c as formatDistance
70
+ };