@vc-shell/framework 1.1.67 → 1.1.69
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/CHANGELOG.md +8 -0
- package/core/services/widget-service.ts +3 -3
- package/dist/core/services/widget-service.d.ts +2 -2
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/framework.js +123 -123
- package/dist/index.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/{vendor-date-fns-CdFbeoHV.js → vendor-date-fns-sZ1zMzTH.js} +1109 -1090
- package/dist/vendor-vuepic-vue-datepicker-Chx5s5I-.js +5116 -0
- package/package.json +5 -5
- package/ui/components/molecules/vc-input/vc-input.vue +8 -0
- package/dist/vendor-vuepic-vue-datepicker-DkHsqyoL.js +0 -4997
|
@@ -1,173 +1,190 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return
|
|
1
|
+
const S = Symbol.for("constructDateFrom");
|
|
2
|
+
function h(r, e) {
|
|
3
|
+
return typeof r == "function" ? r(e) : r && typeof r == "object" && S in r ? r[S](e) : r instanceof Date ? new r.constructor(e) : new Date(e);
|
|
4
4
|
}
|
|
5
|
-
function
|
|
6
|
-
return
|
|
5
|
+
function i(r, e) {
|
|
6
|
+
return h(e || r, r);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
return isNaN(
|
|
8
|
+
function A(r, e, t) {
|
|
9
|
+
const n = i(r, t?.in);
|
|
10
|
+
return isNaN(e) ? h(t?.in || r, NaN) : (e && n.setDate(n.getDate() + e), n);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (isNaN(
|
|
15
|
-
if (!
|
|
16
|
-
return
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
),
|
|
25
|
-
}
|
|
26
|
-
function Mn(r, t) {
|
|
12
|
+
function X(r, e, t) {
|
|
13
|
+
const n = i(r, t?.in);
|
|
14
|
+
if (isNaN(e)) return h(r, NaN);
|
|
15
|
+
if (!e)
|
|
16
|
+
return n;
|
|
17
|
+
const a = n.getDate(), s = h(r, n.getTime());
|
|
18
|
+
s.setMonth(n.getMonth() + e + 1, 0);
|
|
19
|
+
const o = s.getDate();
|
|
20
|
+
return a >= o ? s : (n.setFullYear(
|
|
21
|
+
s.getFullYear(),
|
|
22
|
+
s.getMonth(),
|
|
23
|
+
a
|
|
24
|
+
), n);
|
|
25
|
+
}
|
|
26
|
+
function Mn(r, e, t) {
|
|
27
27
|
const {
|
|
28
|
-
years:
|
|
29
|
-
months:
|
|
30
|
-
weeks:
|
|
31
|
-
days:
|
|
32
|
-
hours:
|
|
33
|
-
minutes:
|
|
34
|
-
seconds:
|
|
35
|
-
} =
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
let xt = {};
|
|
28
|
+
years: n = 0,
|
|
29
|
+
months: a = 0,
|
|
30
|
+
weeks: s = 0,
|
|
31
|
+
days: o = 0,
|
|
32
|
+
hours: u = 0,
|
|
33
|
+
minutes: d = 0,
|
|
34
|
+
seconds: p = 0
|
|
35
|
+
} = e, m = i(r, t?.in), w = a || n ? X(m, a + n * 12) : m, D = o || s ? A(w, o + s * 7) : w, C = d + u * 60, Q = (p + C * 60) * 1e3;
|
|
36
|
+
return h(r, +D + Q);
|
|
37
|
+
}
|
|
38
|
+
function be(r, e, t) {
|
|
39
|
+
return h(r, +i(r) + e);
|
|
40
|
+
}
|
|
41
|
+
function Dn(r, e, t) {
|
|
42
|
+
return be(r, e * 36e5);
|
|
43
|
+
}
|
|
44
|
+
let pe = {};
|
|
47
45
|
function v() {
|
|
48
|
-
return
|
|
46
|
+
return pe;
|
|
49
47
|
}
|
|
50
|
-
function _(r,
|
|
51
|
-
const
|
|
48
|
+
function _(r, e) {
|
|
49
|
+
const t = v(), n = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? t.weekStartsOn ?? t.locale?.options?.weekStartsOn ?? 0, a = i(r, e?.in), s = a.getDay(), o = (s < n ? 7 : 0) + s - n;
|
|
52
50
|
return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
|
|
53
51
|
}
|
|
54
|
-
function
|
|
55
|
-
return _(r, { weekStartsOn: 1 });
|
|
52
|
+
function q(r, e) {
|
|
53
|
+
return _(r, { ...e, weekStartsOn: 1 });
|
|
56
54
|
}
|
|
57
|
-
function
|
|
58
|
-
const t = i(r
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
return t.getTime() >=
|
|
64
|
-
}
|
|
65
|
-
function Z(r) {
|
|
66
|
-
const t = i(r);
|
|
67
|
-
return t.setHours(0, 0, 0, 0), t;
|
|
55
|
+
function oe(r, e) {
|
|
56
|
+
const t = i(r, e?.in), n = t.getFullYear(), a = h(t, 0);
|
|
57
|
+
a.setFullYear(n + 1, 0, 4), a.setHours(0, 0, 0, 0);
|
|
58
|
+
const s = q(a), o = h(t, 0);
|
|
59
|
+
o.setFullYear(n, 0, 4), o.setHours(0, 0, 0, 0);
|
|
60
|
+
const u = q(o);
|
|
61
|
+
return t.getTime() >= s.getTime() ? n + 1 : t.getTime() >= u.getTime() ? n : n - 1;
|
|
68
62
|
}
|
|
69
|
-
function
|
|
70
|
-
const
|
|
63
|
+
function L(r) {
|
|
64
|
+
const e = i(r), t = new Date(
|
|
71
65
|
Date.UTC(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
e.getFullYear(),
|
|
67
|
+
e.getMonth(),
|
|
68
|
+
e.getDate(),
|
|
69
|
+
e.getHours(),
|
|
70
|
+
e.getMinutes(),
|
|
71
|
+
e.getSeconds(),
|
|
72
|
+
e.getMilliseconds()
|
|
79
73
|
)
|
|
80
74
|
);
|
|
81
|
-
return
|
|
75
|
+
return t.setUTCFullYear(e.getFullYear()), +r - +t;
|
|
82
76
|
}
|
|
83
|
-
function
|
|
84
|
-
const
|
|
85
|
-
|
|
77
|
+
function I(r, ...e) {
|
|
78
|
+
const t = h.bind(
|
|
79
|
+
null,
|
|
80
|
+
e.find((n) => typeof n == "object")
|
|
81
|
+
);
|
|
82
|
+
return e.map(t);
|
|
86
83
|
}
|
|
87
|
-
function
|
|
88
|
-
const t =
|
|
89
|
-
return
|
|
84
|
+
function ee(r, e) {
|
|
85
|
+
const t = i(r, e?.in);
|
|
86
|
+
return t.setHours(0, 0, 0, 0), t;
|
|
90
87
|
}
|
|
91
|
-
function
|
|
92
|
-
const
|
|
93
|
-
|
|
88
|
+
function xe(r, e, t) {
|
|
89
|
+
const [n, a] = I(
|
|
90
|
+
t?.in,
|
|
91
|
+
r,
|
|
92
|
+
e
|
|
93
|
+
), s = ee(n), o = ee(a), u = +s - L(s), d = +o - L(o);
|
|
94
|
+
return Math.round((u - d) / 864e5);
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
96
|
+
function Me(r, e) {
|
|
97
|
+
const t = oe(r, e), n = h(r, 0);
|
|
98
|
+
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), q(n);
|
|
97
99
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
-
return a < 0 ? -1 : a > 0 ? 1 : a;
|
|
100
|
+
function De(r, e, t) {
|
|
101
|
+
return X(r, e * 3, t);
|
|
101
102
|
}
|
|
102
|
-
function
|
|
103
|
-
return r
|
|
103
|
+
function ke(r, e, t) {
|
|
104
|
+
return X(r, e * 12, t);
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const t = i(r);
|
|
109
|
-
return !isNaN(Number(t));
|
|
106
|
+
function te(r, e) {
|
|
107
|
+
const t = +i(r) - +i(e);
|
|
108
|
+
return t < 0 ? -1 : t > 0 ? 1 : t;
|
|
110
109
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
113
|
-
return Math.trunc(t.getMonth() / 3) + 1;
|
|
110
|
+
function Pe(r) {
|
|
111
|
+
return r instanceof Date || typeof r == "object" && Object.prototype.toString.call(r) === "[object Date]";
|
|
114
112
|
}
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
return e.getFullYear() - n.getFullYear();
|
|
113
|
+
function Te(r) {
|
|
114
|
+
return !(!Pe(r) && typeof r != "number" || isNaN(+i(r)));
|
|
118
115
|
}
|
|
119
|
-
function kn(r,
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
const o = U(e, n) === -a, u = a * (s - +o);
|
|
123
|
-
return u === 0 ? 0 : u;
|
|
116
|
+
function kn(r, e) {
|
|
117
|
+
const t = i(r, e?.in);
|
|
118
|
+
return Math.trunc(t.getMonth() / 3) + 1;
|
|
124
119
|
}
|
|
125
|
-
function
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
function Oe(r, e, t) {
|
|
121
|
+
const [n, a] = I(
|
|
122
|
+
t?.in,
|
|
123
|
+
r,
|
|
124
|
+
e
|
|
125
|
+
);
|
|
126
|
+
return n.getFullYear() - a.getFullYear();
|
|
127
|
+
}
|
|
128
|
+
function Pn(r, e, t) {
|
|
129
|
+
const [n, a] = I(
|
|
130
|
+
t?.in,
|
|
131
|
+
r,
|
|
132
|
+
e
|
|
133
|
+
), s = te(n, a), o = Math.abs(Oe(n, a));
|
|
134
|
+
n.setFullYear(1584), a.setFullYear(1584);
|
|
135
|
+
const u = te(n, a) === -s, d = s * (o - +u);
|
|
136
|
+
return d === 0 ? 0 : d;
|
|
137
|
+
}
|
|
138
|
+
function ie(r, e) {
|
|
139
|
+
const [t, n] = I(r, e.start, e.end);
|
|
140
|
+
return { start: t, end: n };
|
|
141
|
+
}
|
|
142
|
+
function Tn(r, e) {
|
|
143
|
+
const { start: t, end: n } = ie(e?.in, r);
|
|
144
|
+
let a = +t > +n;
|
|
145
|
+
const s = a ? +t : +n, o = a ? n : t;
|
|
129
146
|
o.setHours(0, 0, 0, 0);
|
|
130
147
|
let u = 1;
|
|
131
|
-
const
|
|
148
|
+
const d = [];
|
|
132
149
|
for (; +o <= s; )
|
|
133
|
-
|
|
134
|
-
return a ?
|
|
135
|
-
}
|
|
136
|
-
function
|
|
137
|
-
const t = i(r
|
|
138
|
-
return t.setMonth(
|
|
139
|
-
}
|
|
140
|
-
function On(r,
|
|
141
|
-
const
|
|
142
|
-
let a = +
|
|
143
|
-
const s = a ? +
|
|
144
|
-
let o =
|
|
145
|
-
const
|
|
150
|
+
d.push(h(t, o)), o.setDate(o.getDate() + u), o.setHours(0, 0, 0, 0);
|
|
151
|
+
return a ? d.reverse() : d;
|
|
152
|
+
}
|
|
153
|
+
function H(r, e) {
|
|
154
|
+
const t = i(r, e?.in), n = t.getMonth(), a = n - n % 3;
|
|
155
|
+
return t.setMonth(a, 1), t.setHours(0, 0, 0, 0), t;
|
|
156
|
+
}
|
|
157
|
+
function On(r, e) {
|
|
158
|
+
const { start: t, end: n } = ie(e?.in, r);
|
|
159
|
+
let a = +t > +n;
|
|
160
|
+
const s = a ? +H(t) : +H(n);
|
|
161
|
+
let o = H(a ? n : t), u = 1;
|
|
162
|
+
const d = [];
|
|
146
163
|
for (; +o <= s; )
|
|
147
|
-
|
|
148
|
-
return a ?
|
|
164
|
+
d.push(h(t, o)), o = De(o, u);
|
|
165
|
+
return a ? d.reverse() : d;
|
|
149
166
|
}
|
|
150
|
-
function Yn(r) {
|
|
151
|
-
const t = i(r);
|
|
167
|
+
function Yn(r, e) {
|
|
168
|
+
const t = i(r, e?.in);
|
|
152
169
|
return t.setDate(1), t.setHours(0, 0, 0, 0), t;
|
|
153
170
|
}
|
|
154
|
-
function _n(r) {
|
|
155
|
-
const t = i(r
|
|
156
|
-
return t.setFullYear(
|
|
171
|
+
function _n(r, e) {
|
|
172
|
+
const t = i(r, e?.in), n = t.getFullYear();
|
|
173
|
+
return t.setFullYear(n + 1, 0, 0), t.setHours(23, 59, 59, 999), t;
|
|
157
174
|
}
|
|
158
|
-
function
|
|
159
|
-
const t = i(r
|
|
160
|
-
return
|
|
175
|
+
function Ye(r, e) {
|
|
176
|
+
const t = i(r, e?.in);
|
|
177
|
+
return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t;
|
|
161
178
|
}
|
|
162
|
-
function Wn(r,
|
|
163
|
-
const
|
|
179
|
+
function Wn(r, e) {
|
|
180
|
+
const t = v(), n = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? t.weekStartsOn ?? t.locale?.options?.weekStartsOn ?? 0, a = i(r, e?.in), s = a.getDay(), o = (s < n ? -7 : 0) + 6 - (s - n);
|
|
164
181
|
return a.setDate(a.getDate() + o), a.setHours(23, 59, 59, 999), a;
|
|
165
182
|
}
|
|
166
|
-
function vn(r) {
|
|
167
|
-
const t = i(r
|
|
168
|
-
return t.setMonth(
|
|
183
|
+
function vn(r, e) {
|
|
184
|
+
const t = i(r, e?.in), n = t.getMonth(), a = n - n % 3 + 3;
|
|
185
|
+
return t.setMonth(a, 0), t.setHours(23, 59, 59, 999), t;
|
|
169
186
|
}
|
|
170
|
-
const
|
|
187
|
+
const _e = {
|
|
171
188
|
lessThanXSeconds: {
|
|
172
189
|
one: "less than a second",
|
|
173
190
|
other: "less than {{count}} seconds"
|
|
@@ -229,77 +246,77 @@ const Wt = {
|
|
|
229
246
|
one: "almost 1 year",
|
|
230
247
|
other: "almost {{count}} years"
|
|
231
248
|
}
|
|
232
|
-
},
|
|
249
|
+
}, We = (r, e, t) => {
|
|
233
250
|
let n;
|
|
234
|
-
const a =
|
|
235
|
-
return typeof a == "string" ? n = a :
|
|
251
|
+
const a = _e[r];
|
|
252
|
+
return typeof a == "string" ? n = a : e === 1 ? n = a.one : n = a.other.replace("{{count}}", e.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
236
253
|
};
|
|
237
|
-
function
|
|
238
|
-
return (
|
|
239
|
-
const
|
|
240
|
-
return r.formats[
|
|
254
|
+
function G(r) {
|
|
255
|
+
return (e = {}) => {
|
|
256
|
+
const t = e.width ? String(e.width) : r.defaultWidth;
|
|
257
|
+
return r.formats[t] || r.formats[r.defaultWidth];
|
|
241
258
|
};
|
|
242
259
|
}
|
|
243
|
-
const
|
|
260
|
+
const ve = {
|
|
244
261
|
full: "EEEE, MMMM do, y",
|
|
245
262
|
long: "MMMM do, y",
|
|
246
263
|
medium: "MMM d, y",
|
|
247
264
|
short: "MM/dd/yyyy"
|
|
248
|
-
},
|
|
265
|
+
}, Ee = {
|
|
249
266
|
full: "h:mm:ss a zzzz",
|
|
250
267
|
long: "h:mm:ss a z",
|
|
251
268
|
medium: "h:mm:ss a",
|
|
252
269
|
short: "h:mm a"
|
|
253
|
-
},
|
|
270
|
+
}, He = {
|
|
254
271
|
full: "{{date}} 'at' {{time}}",
|
|
255
272
|
long: "{{date}} 'at' {{time}}",
|
|
256
273
|
medium: "{{date}}, {{time}}",
|
|
257
274
|
short: "{{date}}, {{time}}"
|
|
258
|
-
},
|
|
259
|
-
date:
|
|
260
|
-
formats:
|
|
275
|
+
}, qe = {
|
|
276
|
+
date: G({
|
|
277
|
+
formats: ve,
|
|
261
278
|
defaultWidth: "full"
|
|
262
279
|
}),
|
|
263
|
-
time:
|
|
264
|
-
formats:
|
|
280
|
+
time: G({
|
|
281
|
+
formats: Ee,
|
|
265
282
|
defaultWidth: "full"
|
|
266
283
|
}),
|
|
267
|
-
dateTime:
|
|
268
|
-
formats:
|
|
284
|
+
dateTime: G({
|
|
285
|
+
formats: He,
|
|
269
286
|
defaultWidth: "full"
|
|
270
287
|
})
|
|
271
|
-
},
|
|
288
|
+
}, Ne = {
|
|
272
289
|
lastWeek: "'last' eeee 'at' p",
|
|
273
290
|
yesterday: "'yesterday at' p",
|
|
274
291
|
today: "'today at' p",
|
|
275
292
|
tomorrow: "'tomorrow at' p",
|
|
276
293
|
nextWeek: "eeee 'at' p",
|
|
277
294
|
other: "P"
|
|
278
|
-
},
|
|
279
|
-
function
|
|
280
|
-
return (
|
|
281
|
-
const n =
|
|
295
|
+
}, Fe = (r, e, t, n) => Ne[r];
|
|
296
|
+
function N(r) {
|
|
297
|
+
return (e, t) => {
|
|
298
|
+
const n = t?.context ? String(t.context) : "standalone";
|
|
282
299
|
let a;
|
|
283
300
|
if (n === "formatting" && r.formattingValues) {
|
|
284
|
-
const o = r.defaultFormattingWidth || r.defaultWidth, u =
|
|
301
|
+
const o = r.defaultFormattingWidth || r.defaultWidth, u = t?.width ? String(t.width) : o;
|
|
285
302
|
a = r.formattingValues[u] || r.formattingValues[o];
|
|
286
303
|
} else {
|
|
287
|
-
const o = r.defaultWidth, u =
|
|
304
|
+
const o = r.defaultWidth, u = t?.width ? String(t.width) : r.defaultWidth;
|
|
288
305
|
a = r.values[u] || r.values[o];
|
|
289
306
|
}
|
|
290
|
-
const s = r.argumentCallback ? r.argumentCallback(
|
|
307
|
+
const s = r.argumentCallback ? r.argumentCallback(e) : e;
|
|
291
308
|
return a[s];
|
|
292
309
|
};
|
|
293
310
|
}
|
|
294
|
-
const
|
|
311
|
+
const Ie = {
|
|
295
312
|
narrow: ["B", "A"],
|
|
296
313
|
abbreviated: ["BC", "AD"],
|
|
297
314
|
wide: ["Before Christ", "Anno Domini"]
|
|
298
|
-
},
|
|
315
|
+
}, Ce = {
|
|
299
316
|
narrow: ["1", "2", "3", "4"],
|
|
300
317
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
301
318
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
302
|
-
},
|
|
319
|
+
}, Qe = {
|
|
303
320
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
304
321
|
abbreviated: [
|
|
305
322
|
"Jan",
|
|
@@ -329,7 +346,7 @@ const Ct = {
|
|
|
329
346
|
"November",
|
|
330
347
|
"December"
|
|
331
348
|
]
|
|
332
|
-
},
|
|
349
|
+
}, Le = {
|
|
333
350
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
334
351
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
335
352
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -342,7 +359,7 @@ const Ct = {
|
|
|
342
359
|
"Friday",
|
|
343
360
|
"Saturday"
|
|
344
361
|
]
|
|
345
|
-
},
|
|
362
|
+
}, Re = {
|
|
346
363
|
narrow: {
|
|
347
364
|
am: "a",
|
|
348
365
|
pm: "p",
|
|
@@ -373,7 +390,7 @@ const Ct = {
|
|
|
373
390
|
evening: "evening",
|
|
374
391
|
night: "night"
|
|
375
392
|
}
|
|
376
|
-
},
|
|
393
|
+
}, Ae = {
|
|
377
394
|
narrow: {
|
|
378
395
|
am: "a",
|
|
379
396
|
pm: "p",
|
|
@@ -404,101 +421,101 @@ const Ct = {
|
|
|
404
421
|
evening: "in the evening",
|
|
405
422
|
night: "at night"
|
|
406
423
|
}
|
|
407
|
-
},
|
|
408
|
-
const
|
|
424
|
+
}, Xe = (r, e) => {
|
|
425
|
+
const t = Number(r), n = t % 100;
|
|
409
426
|
if (n > 20 || n < 10)
|
|
410
427
|
switch (n % 10) {
|
|
411
428
|
case 1:
|
|
412
|
-
return
|
|
429
|
+
return t + "st";
|
|
413
430
|
case 2:
|
|
414
|
-
return
|
|
431
|
+
return t + "nd";
|
|
415
432
|
case 3:
|
|
416
|
-
return
|
|
433
|
+
return t + "rd";
|
|
417
434
|
}
|
|
418
|
-
return
|
|
419
|
-
},
|
|
420
|
-
ordinalNumber:
|
|
421
|
-
era:
|
|
422
|
-
values:
|
|
435
|
+
return t + "th";
|
|
436
|
+
}, Be = {
|
|
437
|
+
ordinalNumber: Xe,
|
|
438
|
+
era: N({
|
|
439
|
+
values: Ie,
|
|
423
440
|
defaultWidth: "wide"
|
|
424
441
|
}),
|
|
425
|
-
quarter:
|
|
426
|
-
values:
|
|
442
|
+
quarter: N({
|
|
443
|
+
values: Ce,
|
|
427
444
|
defaultWidth: "wide",
|
|
428
445
|
argumentCallback: (r) => r - 1
|
|
429
446
|
}),
|
|
430
|
-
month:
|
|
431
|
-
values:
|
|
447
|
+
month: N({
|
|
448
|
+
values: Qe,
|
|
432
449
|
defaultWidth: "wide"
|
|
433
450
|
}),
|
|
434
|
-
day:
|
|
435
|
-
values:
|
|
451
|
+
day: N({
|
|
452
|
+
values: Le,
|
|
436
453
|
defaultWidth: "wide"
|
|
437
454
|
}),
|
|
438
|
-
dayPeriod:
|
|
439
|
-
values:
|
|
455
|
+
dayPeriod: N({
|
|
456
|
+
values: Re,
|
|
440
457
|
defaultWidth: "wide",
|
|
441
|
-
formattingValues:
|
|
458
|
+
formattingValues: Ae,
|
|
442
459
|
defaultFormattingWidth: "wide"
|
|
443
460
|
})
|
|
444
461
|
};
|
|
445
|
-
function
|
|
446
|
-
return (
|
|
447
|
-
const n =
|
|
462
|
+
function F(r) {
|
|
463
|
+
return (e, t = {}) => {
|
|
464
|
+
const n = t.width, a = n && r.matchPatterns[n] || r.matchPatterns[r.defaultMatchWidth], s = e.match(a);
|
|
448
465
|
if (!s)
|
|
449
466
|
return null;
|
|
450
|
-
const o = s[0], u = n && r.parsePatterns[n] || r.parsePatterns[r.defaultParseWidth],
|
|
451
|
-
//
|
|
452
|
-
|
|
467
|
+
const o = s[0], u = n && r.parsePatterns[n] || r.parsePatterns[r.defaultParseWidth], d = Array.isArray(u) ? je(u, (w) => w.test(o)) : (
|
|
468
|
+
// [TODO] -- I challenge you to fix the type
|
|
469
|
+
Ge(u, (w) => w.test(o))
|
|
453
470
|
);
|
|
454
|
-
let
|
|
455
|
-
|
|
456
|
-
//
|
|
457
|
-
|
|
458
|
-
) :
|
|
459
|
-
const
|
|
460
|
-
return { value:
|
|
471
|
+
let p;
|
|
472
|
+
p = r.valueCallback ? r.valueCallback(d) : d, p = t.valueCallback ? (
|
|
473
|
+
// [TODO] -- I challenge you to fix the type
|
|
474
|
+
t.valueCallback(p)
|
|
475
|
+
) : p;
|
|
476
|
+
const m = e.slice(o.length);
|
|
477
|
+
return { value: p, rest: m };
|
|
461
478
|
};
|
|
462
479
|
}
|
|
463
|
-
function
|
|
464
|
-
for (const
|
|
465
|
-
if (Object.prototype.hasOwnProperty.call(r,
|
|
466
|
-
return
|
|
480
|
+
function Ge(r, e) {
|
|
481
|
+
for (const t in r)
|
|
482
|
+
if (Object.prototype.hasOwnProperty.call(r, t) && e(r[t]))
|
|
483
|
+
return t;
|
|
467
484
|
}
|
|
468
|
-
function
|
|
469
|
-
for (let
|
|
470
|
-
if (
|
|
471
|
-
return
|
|
485
|
+
function je(r, e) {
|
|
486
|
+
for (let t = 0; t < r.length; t++)
|
|
487
|
+
if (e(r[t]))
|
|
488
|
+
return t;
|
|
472
489
|
}
|
|
473
|
-
function
|
|
474
|
-
return (
|
|
475
|
-
const n =
|
|
490
|
+
function $e(r) {
|
|
491
|
+
return (e, t = {}) => {
|
|
492
|
+
const n = e.match(r.matchPattern);
|
|
476
493
|
if (!n) return null;
|
|
477
|
-
const a = n[0], s =
|
|
494
|
+
const a = n[0], s = e.match(r.parsePattern);
|
|
478
495
|
if (!s) return null;
|
|
479
496
|
let o = r.valueCallback ? r.valueCallback(s[0]) : s[0];
|
|
480
|
-
o =
|
|
481
|
-
const u =
|
|
497
|
+
o = t.valueCallback ? t.valueCallback(o) : o;
|
|
498
|
+
const u = e.slice(a.length);
|
|
482
499
|
return { value: o, rest: u };
|
|
483
500
|
};
|
|
484
501
|
}
|
|
485
|
-
const
|
|
502
|
+
const Ve = /^(\d+)(th|st|nd|rd)?/i, ze = /\d+/i, Je = {
|
|
486
503
|
narrow: /^(b|a)/i,
|
|
487
504
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
488
505
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
489
|
-
},
|
|
506
|
+
}, Ke = {
|
|
490
507
|
any: [/^b/i, /^(a|c)/i]
|
|
491
|
-
},
|
|
508
|
+
}, Ze = {
|
|
492
509
|
narrow: /^[1234]/i,
|
|
493
510
|
abbreviated: /^q[1234]/i,
|
|
494
511
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
495
|
-
},
|
|
512
|
+
}, Ue = {
|
|
496
513
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
497
|
-
},
|
|
514
|
+
}, Se = {
|
|
498
515
|
narrow: /^[jfmasond]/i,
|
|
499
516
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
500
517
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
501
|
-
},
|
|
518
|
+
}, et = {
|
|
502
519
|
narrow: [
|
|
503
520
|
/^j/i,
|
|
504
521
|
/^f/i,
|
|
@@ -527,18 +544,18 @@ const zt = /^(\d+)(th|st|nd|rd)?/i, Jt = /\d+/i, Kt = {
|
|
|
527
544
|
/^n/i,
|
|
528
545
|
/^d/i
|
|
529
546
|
]
|
|
530
|
-
},
|
|
547
|
+
}, tt = {
|
|
531
548
|
narrow: /^[smtwf]/i,
|
|
532
549
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
533
550
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
534
551
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
535
|
-
},
|
|
552
|
+
}, nt = {
|
|
536
553
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
537
554
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
538
|
-
},
|
|
555
|
+
}, rt = {
|
|
539
556
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
540
557
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
541
|
-
},
|
|
558
|
+
}, at = {
|
|
542
559
|
any: {
|
|
543
560
|
am: /^a/i,
|
|
544
561
|
pm: /^p/i,
|
|
@@ -549,184 +566,184 @@ const zt = /^(\d+)(th|st|nd|rd)?/i, Jt = /\d+/i, Kt = {
|
|
|
549
566
|
evening: /evening/i,
|
|
550
567
|
night: /night/i
|
|
551
568
|
}
|
|
552
|
-
},
|
|
553
|
-
ordinalNumber:
|
|
554
|
-
matchPattern:
|
|
555
|
-
parsePattern:
|
|
569
|
+
}, st = {
|
|
570
|
+
ordinalNumber: $e({
|
|
571
|
+
matchPattern: Ve,
|
|
572
|
+
parsePattern: ze,
|
|
556
573
|
valueCallback: (r) => parseInt(r, 10)
|
|
557
574
|
}),
|
|
558
|
-
era:
|
|
559
|
-
matchPatterns:
|
|
575
|
+
era: F({
|
|
576
|
+
matchPatterns: Je,
|
|
560
577
|
defaultMatchWidth: "wide",
|
|
561
|
-
parsePatterns:
|
|
578
|
+
parsePatterns: Ke,
|
|
562
579
|
defaultParseWidth: "any"
|
|
563
580
|
}),
|
|
564
|
-
quarter:
|
|
565
|
-
matchPatterns:
|
|
581
|
+
quarter: F({
|
|
582
|
+
matchPatterns: Ze,
|
|
566
583
|
defaultMatchWidth: "wide",
|
|
567
|
-
parsePatterns:
|
|
584
|
+
parsePatterns: Ue,
|
|
568
585
|
defaultParseWidth: "any",
|
|
569
586
|
valueCallback: (r) => r + 1
|
|
570
587
|
}),
|
|
571
|
-
month:
|
|
572
|
-
matchPatterns:
|
|
588
|
+
month: F({
|
|
589
|
+
matchPatterns: Se,
|
|
573
590
|
defaultMatchWidth: "wide",
|
|
574
|
-
parsePatterns:
|
|
591
|
+
parsePatterns: et,
|
|
575
592
|
defaultParseWidth: "any"
|
|
576
593
|
}),
|
|
577
|
-
day:
|
|
578
|
-
matchPatterns:
|
|
594
|
+
day: F({
|
|
595
|
+
matchPatterns: tt,
|
|
579
596
|
defaultMatchWidth: "wide",
|
|
580
|
-
parsePatterns:
|
|
597
|
+
parsePatterns: nt,
|
|
581
598
|
defaultParseWidth: "any"
|
|
582
599
|
}),
|
|
583
|
-
dayPeriod:
|
|
584
|
-
matchPatterns:
|
|
600
|
+
dayPeriod: F({
|
|
601
|
+
matchPatterns: rt,
|
|
585
602
|
defaultMatchWidth: "any",
|
|
586
|
-
parsePatterns:
|
|
603
|
+
parsePatterns: at,
|
|
587
604
|
defaultParseWidth: "any"
|
|
588
605
|
})
|
|
589
|
-
},
|
|
606
|
+
}, ue = {
|
|
590
607
|
code: "en-US",
|
|
591
|
-
formatDistance:
|
|
592
|
-
formatLong:
|
|
593
|
-
formatRelative:
|
|
594
|
-
localize:
|
|
595
|
-
match:
|
|
608
|
+
formatDistance: We,
|
|
609
|
+
formatLong: qe,
|
|
610
|
+
formatRelative: Fe,
|
|
611
|
+
localize: Be,
|
|
612
|
+
match: st,
|
|
596
613
|
options: {
|
|
597
614
|
weekStartsOn: 0,
|
|
598
615
|
firstWeekContainsDate: 1
|
|
599
616
|
}
|
|
600
617
|
};
|
|
601
|
-
function
|
|
602
|
-
const t = i(r);
|
|
603
|
-
return
|
|
618
|
+
function ot(r, e) {
|
|
619
|
+
const t = i(r, e?.in);
|
|
620
|
+
return xe(t, Ye(t)) + 1;
|
|
604
621
|
}
|
|
605
|
-
function
|
|
606
|
-
const t = i(r
|
|
607
|
-
return Math.round(
|
|
622
|
+
function ce(r, e) {
|
|
623
|
+
const t = i(r, e?.in), n = +q(t) - +Me(t);
|
|
624
|
+
return Math.round(n / 6048e5) + 1;
|
|
608
625
|
}
|
|
609
|
-
function
|
|
610
|
-
const
|
|
626
|
+
function V(r, e) {
|
|
627
|
+
const t = i(r, e?.in), n = t.getFullYear(), a = v(), s = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, o = h(e?.in || r, 0);
|
|
611
628
|
o.setFullYear(n + 1, 0, s), o.setHours(0, 0, 0, 0);
|
|
612
|
-
const u = _(o,
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
return
|
|
629
|
+
const u = _(o, e), d = h(e?.in || r, 0);
|
|
630
|
+
d.setFullYear(n, 0, s), d.setHours(0, 0, 0, 0);
|
|
631
|
+
const p = _(d, e);
|
|
632
|
+
return +t >= +u ? n + 1 : +t >= +p ? n : n - 1;
|
|
616
633
|
}
|
|
617
|
-
function
|
|
618
|
-
const
|
|
619
|
-
return s.setFullYear(a, 0, n), s.setHours(0, 0, 0, 0), _(s,
|
|
634
|
+
function it(r, e) {
|
|
635
|
+
const t = v(), n = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? t.firstWeekContainsDate ?? t.locale?.options?.firstWeekContainsDate ?? 1, a = V(r, e), s = h(e?.in || r, 0);
|
|
636
|
+
return s.setFullYear(a, 0, n), s.setHours(0, 0, 0, 0), _(s, e);
|
|
620
637
|
}
|
|
621
|
-
function
|
|
622
|
-
const
|
|
623
|
-
return Math.round(n /
|
|
638
|
+
function de(r, e) {
|
|
639
|
+
const t = i(r, e?.in), n = +_(t, e) - +it(t, e);
|
|
640
|
+
return Math.round(n / 6048e5) + 1;
|
|
624
641
|
}
|
|
625
|
-
function f(r,
|
|
626
|
-
const
|
|
627
|
-
return
|
|
642
|
+
function f(r, e) {
|
|
643
|
+
const t = r < 0 ? "-" : "", n = Math.abs(r).toString().padStart(e, "0");
|
|
644
|
+
return t + n;
|
|
628
645
|
}
|
|
629
646
|
const Y = {
|
|
630
647
|
// Year
|
|
631
|
-
y(r,
|
|
632
|
-
const
|
|
633
|
-
return f(
|
|
648
|
+
y(r, e) {
|
|
649
|
+
const t = r.getFullYear(), n = t > 0 ? t : 1 - t;
|
|
650
|
+
return f(e === "yy" ? n % 100 : n, e.length);
|
|
634
651
|
},
|
|
635
652
|
// Month
|
|
636
|
-
M(r,
|
|
637
|
-
const
|
|
638
|
-
return
|
|
653
|
+
M(r, e) {
|
|
654
|
+
const t = r.getMonth();
|
|
655
|
+
return e === "M" ? String(t + 1) : f(t + 1, 2);
|
|
639
656
|
},
|
|
640
657
|
// Day of the month
|
|
641
|
-
d(r,
|
|
642
|
-
return f(r.getDate(),
|
|
658
|
+
d(r, e) {
|
|
659
|
+
return f(r.getDate(), e.length);
|
|
643
660
|
},
|
|
644
661
|
// AM or PM
|
|
645
|
-
a(r,
|
|
646
|
-
const
|
|
647
|
-
switch (
|
|
662
|
+
a(r, e) {
|
|
663
|
+
const t = r.getHours() / 12 >= 1 ? "pm" : "am";
|
|
664
|
+
switch (e) {
|
|
648
665
|
case "a":
|
|
649
666
|
case "aa":
|
|
650
|
-
return
|
|
667
|
+
return t.toUpperCase();
|
|
651
668
|
case "aaa":
|
|
652
|
-
return
|
|
669
|
+
return t;
|
|
653
670
|
case "aaaaa":
|
|
654
|
-
return
|
|
671
|
+
return t[0];
|
|
655
672
|
case "aaaa":
|
|
656
673
|
default:
|
|
657
|
-
return
|
|
674
|
+
return t === "am" ? "a.m." : "p.m.";
|
|
658
675
|
}
|
|
659
676
|
},
|
|
660
677
|
// Hour [1-12]
|
|
661
|
-
h(r,
|
|
662
|
-
return f(r.getHours() % 12 || 12,
|
|
678
|
+
h(r, e) {
|
|
679
|
+
return f(r.getHours() % 12 || 12, e.length);
|
|
663
680
|
},
|
|
664
681
|
// Hour [0-23]
|
|
665
|
-
H(r,
|
|
666
|
-
return f(r.getHours(),
|
|
682
|
+
H(r, e) {
|
|
683
|
+
return f(r.getHours(), e.length);
|
|
667
684
|
},
|
|
668
685
|
// Minute
|
|
669
|
-
m(r,
|
|
670
|
-
return f(r.getMinutes(),
|
|
686
|
+
m(r, e) {
|
|
687
|
+
return f(r.getMinutes(), e.length);
|
|
671
688
|
},
|
|
672
689
|
// Second
|
|
673
|
-
s(r,
|
|
674
|
-
return f(r.getSeconds(),
|
|
690
|
+
s(r, e) {
|
|
691
|
+
return f(r.getSeconds(), e.length);
|
|
675
692
|
},
|
|
676
693
|
// Fraction of second
|
|
677
|
-
S(r,
|
|
678
|
-
const
|
|
679
|
-
n * Math.pow(10,
|
|
694
|
+
S(r, e) {
|
|
695
|
+
const t = e.length, n = r.getMilliseconds(), a = Math.trunc(
|
|
696
|
+
n * Math.pow(10, t - 3)
|
|
680
697
|
);
|
|
681
|
-
return f(a,
|
|
698
|
+
return f(a, e.length);
|
|
682
699
|
}
|
|
683
|
-
},
|
|
700
|
+
}, E = {
|
|
684
701
|
midnight: "midnight",
|
|
685
702
|
noon: "noon",
|
|
686
703
|
morning: "morning",
|
|
687
704
|
afternoon: "afternoon",
|
|
688
705
|
evening: "evening",
|
|
689
706
|
night: "night"
|
|
690
|
-
},
|
|
707
|
+
}, ne = {
|
|
691
708
|
// Era
|
|
692
|
-
G: function(r,
|
|
709
|
+
G: function(r, e, t) {
|
|
693
710
|
const n = r.getFullYear() > 0 ? 1 : 0;
|
|
694
|
-
switch (
|
|
711
|
+
switch (e) {
|
|
695
712
|
// AD, BC
|
|
696
713
|
case "G":
|
|
697
714
|
case "GG":
|
|
698
715
|
case "GGG":
|
|
699
|
-
return
|
|
716
|
+
return t.era(n, { width: "abbreviated" });
|
|
700
717
|
// A, B
|
|
701
718
|
case "GGGGG":
|
|
702
|
-
return
|
|
719
|
+
return t.era(n, { width: "narrow" });
|
|
703
720
|
// Anno Domini, Before Christ
|
|
704
721
|
case "GGGG":
|
|
705
722
|
default:
|
|
706
|
-
return
|
|
723
|
+
return t.era(n, { width: "wide" });
|
|
707
724
|
}
|
|
708
725
|
},
|
|
709
726
|
// Year
|
|
710
|
-
y: function(r,
|
|
711
|
-
if (
|
|
727
|
+
y: function(r, e, t) {
|
|
728
|
+
if (e === "yo") {
|
|
712
729
|
const n = r.getFullYear(), a = n > 0 ? n : 1 - n;
|
|
713
|
-
return
|
|
730
|
+
return t.ordinalNumber(a, { unit: "year" });
|
|
714
731
|
}
|
|
715
|
-
return Y.y(r,
|
|
732
|
+
return Y.y(r, e);
|
|
716
733
|
},
|
|
717
734
|
// Local week-numbering year
|
|
718
|
-
Y: function(r,
|
|
719
|
-
const a =
|
|
720
|
-
if (
|
|
735
|
+
Y: function(r, e, t, n) {
|
|
736
|
+
const a = V(r, n), s = a > 0 ? a : 1 - a;
|
|
737
|
+
if (e === "YY") {
|
|
721
738
|
const o = s % 100;
|
|
722
739
|
return f(o, 2);
|
|
723
740
|
}
|
|
724
|
-
return
|
|
741
|
+
return e === "Yo" ? t.ordinalNumber(s, { unit: "year" }) : f(s, e.length);
|
|
725
742
|
},
|
|
726
743
|
// ISO week-numbering year
|
|
727
|
-
R: function(r,
|
|
728
|
-
const
|
|
729
|
-
return f(
|
|
744
|
+
R: function(r, e) {
|
|
745
|
+
const t = oe(r);
|
|
746
|
+
return f(t, e.length);
|
|
730
747
|
},
|
|
731
748
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
732
749
|
// The main difference between `y` and `u` localizers are B.C. years:
|
|
@@ -737,14 +754,14 @@ const Y = {
|
|
|
737
754
|
// | BC 2 | 2 | -1 |
|
|
738
755
|
// Also `yy` always returns the last two digits of a year,
|
|
739
756
|
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
740
|
-
u: function(r,
|
|
741
|
-
const
|
|
742
|
-
return f(
|
|
757
|
+
u: function(r, e) {
|
|
758
|
+
const t = r.getFullYear();
|
|
759
|
+
return f(t, e.length);
|
|
743
760
|
},
|
|
744
761
|
// Quarter
|
|
745
|
-
Q: function(r,
|
|
762
|
+
Q: function(r, e, t) {
|
|
746
763
|
const n = Math.ceil((r.getMonth() + 1) / 3);
|
|
747
|
-
switch (
|
|
764
|
+
switch (e) {
|
|
748
765
|
// 1, 2, 3, 4
|
|
749
766
|
case "Q":
|
|
750
767
|
return String(n);
|
|
@@ -753,32 +770,32 @@ const Y = {
|
|
|
753
770
|
return f(n, 2);
|
|
754
771
|
// 1st, 2nd, 3rd, 4th
|
|
755
772
|
case "Qo":
|
|
756
|
-
return
|
|
773
|
+
return t.ordinalNumber(n, { unit: "quarter" });
|
|
757
774
|
// Q1, Q2, Q3, Q4
|
|
758
775
|
case "QQQ":
|
|
759
|
-
return
|
|
776
|
+
return t.quarter(n, {
|
|
760
777
|
width: "abbreviated",
|
|
761
778
|
context: "formatting"
|
|
762
779
|
});
|
|
763
780
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
764
781
|
case "QQQQQ":
|
|
765
|
-
return
|
|
782
|
+
return t.quarter(n, {
|
|
766
783
|
width: "narrow",
|
|
767
784
|
context: "formatting"
|
|
768
785
|
});
|
|
769
786
|
// 1st quarter, 2nd quarter, ...
|
|
770
787
|
case "QQQQ":
|
|
771
788
|
default:
|
|
772
|
-
return
|
|
789
|
+
return t.quarter(n, {
|
|
773
790
|
width: "wide",
|
|
774
791
|
context: "formatting"
|
|
775
792
|
});
|
|
776
793
|
}
|
|
777
794
|
},
|
|
778
795
|
// Stand-alone quarter
|
|
779
|
-
q: function(r,
|
|
796
|
+
q: function(r, e, t) {
|
|
780
797
|
const n = Math.ceil((r.getMonth() + 1) / 3);
|
|
781
|
-
switch (
|
|
798
|
+
switch (e) {
|
|
782
799
|
// 1, 2, 3, 4
|
|
783
800
|
case "q":
|
|
784
801
|
return String(n);
|
|
@@ -787,60 +804,60 @@ const Y = {
|
|
|
787
804
|
return f(n, 2);
|
|
788
805
|
// 1st, 2nd, 3rd, 4th
|
|
789
806
|
case "qo":
|
|
790
|
-
return
|
|
807
|
+
return t.ordinalNumber(n, { unit: "quarter" });
|
|
791
808
|
// Q1, Q2, Q3, Q4
|
|
792
809
|
case "qqq":
|
|
793
|
-
return
|
|
810
|
+
return t.quarter(n, {
|
|
794
811
|
width: "abbreviated",
|
|
795
812
|
context: "standalone"
|
|
796
813
|
});
|
|
797
814
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
798
815
|
case "qqqqq":
|
|
799
|
-
return
|
|
816
|
+
return t.quarter(n, {
|
|
800
817
|
width: "narrow",
|
|
801
818
|
context: "standalone"
|
|
802
819
|
});
|
|
803
820
|
// 1st quarter, 2nd quarter, ...
|
|
804
821
|
case "qqqq":
|
|
805
822
|
default:
|
|
806
|
-
return
|
|
823
|
+
return t.quarter(n, {
|
|
807
824
|
width: "wide",
|
|
808
825
|
context: "standalone"
|
|
809
826
|
});
|
|
810
827
|
}
|
|
811
828
|
},
|
|
812
829
|
// Month
|
|
813
|
-
M: function(r,
|
|
830
|
+
M: function(r, e, t) {
|
|
814
831
|
const n = r.getMonth();
|
|
815
|
-
switch (
|
|
832
|
+
switch (e) {
|
|
816
833
|
case "M":
|
|
817
834
|
case "MM":
|
|
818
|
-
return Y.M(r,
|
|
835
|
+
return Y.M(r, e);
|
|
819
836
|
// 1st, 2nd, ..., 12th
|
|
820
837
|
case "Mo":
|
|
821
|
-
return
|
|
838
|
+
return t.ordinalNumber(n + 1, { unit: "month" });
|
|
822
839
|
// Jan, Feb, ..., Dec
|
|
823
840
|
case "MMM":
|
|
824
|
-
return
|
|
841
|
+
return t.month(n, {
|
|
825
842
|
width: "abbreviated",
|
|
826
843
|
context: "formatting"
|
|
827
844
|
});
|
|
828
845
|
// J, F, ..., D
|
|
829
846
|
case "MMMMM":
|
|
830
|
-
return
|
|
847
|
+
return t.month(n, {
|
|
831
848
|
width: "narrow",
|
|
832
849
|
context: "formatting"
|
|
833
850
|
});
|
|
834
851
|
// January, February, ..., December
|
|
835
852
|
case "MMMM":
|
|
836
853
|
default:
|
|
837
|
-
return
|
|
854
|
+
return t.month(n, { width: "wide", context: "formatting" });
|
|
838
855
|
}
|
|
839
856
|
},
|
|
840
857
|
// Stand-alone month
|
|
841
|
-
L: function(r,
|
|
858
|
+
L: function(r, e, t) {
|
|
842
859
|
const n = r.getMonth();
|
|
843
|
-
switch (
|
|
860
|
+
switch (e) {
|
|
844
861
|
// 1, 2, ..., 12
|
|
845
862
|
case "L":
|
|
846
863
|
return String(n + 1);
|
|
@@ -849,81 +866,81 @@ const Y = {
|
|
|
849
866
|
return f(n + 1, 2);
|
|
850
867
|
// 1st, 2nd, ..., 12th
|
|
851
868
|
case "Lo":
|
|
852
|
-
return
|
|
869
|
+
return t.ordinalNumber(n + 1, { unit: "month" });
|
|
853
870
|
// Jan, Feb, ..., Dec
|
|
854
871
|
case "LLL":
|
|
855
|
-
return
|
|
872
|
+
return t.month(n, {
|
|
856
873
|
width: "abbreviated",
|
|
857
874
|
context: "standalone"
|
|
858
875
|
});
|
|
859
876
|
// J, F, ..., D
|
|
860
877
|
case "LLLLL":
|
|
861
|
-
return
|
|
878
|
+
return t.month(n, {
|
|
862
879
|
width: "narrow",
|
|
863
880
|
context: "standalone"
|
|
864
881
|
});
|
|
865
882
|
// January, February, ..., December
|
|
866
883
|
case "LLLL":
|
|
867
884
|
default:
|
|
868
|
-
return
|
|
885
|
+
return t.month(n, { width: "wide", context: "standalone" });
|
|
869
886
|
}
|
|
870
887
|
},
|
|
871
888
|
// Local week of year
|
|
872
|
-
w: function(r,
|
|
873
|
-
const a =
|
|
874
|
-
return
|
|
889
|
+
w: function(r, e, t, n) {
|
|
890
|
+
const a = de(r, n);
|
|
891
|
+
return e === "wo" ? t.ordinalNumber(a, { unit: "week" }) : f(a, e.length);
|
|
875
892
|
},
|
|
876
893
|
// ISO week of year
|
|
877
|
-
I: function(r,
|
|
878
|
-
const n =
|
|
879
|
-
return
|
|
894
|
+
I: function(r, e, t) {
|
|
895
|
+
const n = ce(r);
|
|
896
|
+
return e === "Io" ? t.ordinalNumber(n, { unit: "week" }) : f(n, e.length);
|
|
880
897
|
},
|
|
881
898
|
// Day of the month
|
|
882
|
-
d: function(r,
|
|
883
|
-
return
|
|
899
|
+
d: function(r, e, t) {
|
|
900
|
+
return e === "do" ? t.ordinalNumber(r.getDate(), { unit: "date" }) : Y.d(r, e);
|
|
884
901
|
},
|
|
885
902
|
// Day of year
|
|
886
|
-
D: function(r,
|
|
887
|
-
const n =
|
|
888
|
-
return
|
|
903
|
+
D: function(r, e, t) {
|
|
904
|
+
const n = ot(r);
|
|
905
|
+
return e === "Do" ? t.ordinalNumber(n, { unit: "dayOfYear" }) : f(n, e.length);
|
|
889
906
|
},
|
|
890
907
|
// Day of week
|
|
891
|
-
E: function(r,
|
|
908
|
+
E: function(r, e, t) {
|
|
892
909
|
const n = r.getDay();
|
|
893
|
-
switch (
|
|
910
|
+
switch (e) {
|
|
894
911
|
// Tue
|
|
895
912
|
case "E":
|
|
896
913
|
case "EE":
|
|
897
914
|
case "EEE":
|
|
898
|
-
return
|
|
915
|
+
return t.day(n, {
|
|
899
916
|
width: "abbreviated",
|
|
900
917
|
context: "formatting"
|
|
901
918
|
});
|
|
902
919
|
// T
|
|
903
920
|
case "EEEEE":
|
|
904
|
-
return
|
|
921
|
+
return t.day(n, {
|
|
905
922
|
width: "narrow",
|
|
906
923
|
context: "formatting"
|
|
907
924
|
});
|
|
908
925
|
// Tu
|
|
909
926
|
case "EEEEEE":
|
|
910
|
-
return
|
|
927
|
+
return t.day(n, {
|
|
911
928
|
width: "short",
|
|
912
929
|
context: "formatting"
|
|
913
930
|
});
|
|
914
931
|
// Tuesday
|
|
915
932
|
case "EEEE":
|
|
916
933
|
default:
|
|
917
|
-
return
|
|
934
|
+
return t.day(n, {
|
|
918
935
|
width: "wide",
|
|
919
936
|
context: "formatting"
|
|
920
937
|
});
|
|
921
938
|
}
|
|
922
939
|
},
|
|
923
940
|
// Local day of week
|
|
924
|
-
e: function(r,
|
|
941
|
+
e: function(r, e, t, n) {
|
|
925
942
|
const a = r.getDay(), s = (a - n.weekStartsOn + 8) % 7 || 7;
|
|
926
|
-
switch (
|
|
943
|
+
switch (e) {
|
|
927
944
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
928
945
|
case "e":
|
|
929
946
|
return String(s);
|
|
@@ -932,237 +949,237 @@ const Y = {
|
|
|
932
949
|
return f(s, 2);
|
|
933
950
|
// 1st, 2nd, ..., 7th
|
|
934
951
|
case "eo":
|
|
935
|
-
return
|
|
952
|
+
return t.ordinalNumber(s, { unit: "day" });
|
|
936
953
|
case "eee":
|
|
937
|
-
return
|
|
954
|
+
return t.day(a, {
|
|
938
955
|
width: "abbreviated",
|
|
939
956
|
context: "formatting"
|
|
940
957
|
});
|
|
941
958
|
// T
|
|
942
959
|
case "eeeee":
|
|
943
|
-
return
|
|
960
|
+
return t.day(a, {
|
|
944
961
|
width: "narrow",
|
|
945
962
|
context: "formatting"
|
|
946
963
|
});
|
|
947
964
|
// Tu
|
|
948
965
|
case "eeeeee":
|
|
949
|
-
return
|
|
966
|
+
return t.day(a, {
|
|
950
967
|
width: "short",
|
|
951
968
|
context: "formatting"
|
|
952
969
|
});
|
|
953
970
|
// Tuesday
|
|
954
971
|
case "eeee":
|
|
955
972
|
default:
|
|
956
|
-
return
|
|
973
|
+
return t.day(a, {
|
|
957
974
|
width: "wide",
|
|
958
975
|
context: "formatting"
|
|
959
976
|
});
|
|
960
977
|
}
|
|
961
978
|
},
|
|
962
979
|
// Stand-alone local day of week
|
|
963
|
-
c: function(r,
|
|
980
|
+
c: function(r, e, t, n) {
|
|
964
981
|
const a = r.getDay(), s = (a - n.weekStartsOn + 8) % 7 || 7;
|
|
965
|
-
switch (
|
|
982
|
+
switch (e) {
|
|
966
983
|
// Numerical value (same as in `e`)
|
|
967
984
|
case "c":
|
|
968
985
|
return String(s);
|
|
969
986
|
// Padded numerical value
|
|
970
987
|
case "cc":
|
|
971
|
-
return f(s,
|
|
988
|
+
return f(s, e.length);
|
|
972
989
|
// 1st, 2nd, ..., 7th
|
|
973
990
|
case "co":
|
|
974
|
-
return
|
|
991
|
+
return t.ordinalNumber(s, { unit: "day" });
|
|
975
992
|
case "ccc":
|
|
976
|
-
return
|
|
993
|
+
return t.day(a, {
|
|
977
994
|
width: "abbreviated",
|
|
978
995
|
context: "standalone"
|
|
979
996
|
});
|
|
980
997
|
// T
|
|
981
998
|
case "ccccc":
|
|
982
|
-
return
|
|
999
|
+
return t.day(a, {
|
|
983
1000
|
width: "narrow",
|
|
984
1001
|
context: "standalone"
|
|
985
1002
|
});
|
|
986
1003
|
// Tu
|
|
987
1004
|
case "cccccc":
|
|
988
|
-
return
|
|
1005
|
+
return t.day(a, {
|
|
989
1006
|
width: "short",
|
|
990
1007
|
context: "standalone"
|
|
991
1008
|
});
|
|
992
1009
|
// Tuesday
|
|
993
1010
|
case "cccc":
|
|
994
1011
|
default:
|
|
995
|
-
return
|
|
1012
|
+
return t.day(a, {
|
|
996
1013
|
width: "wide",
|
|
997
1014
|
context: "standalone"
|
|
998
1015
|
});
|
|
999
1016
|
}
|
|
1000
1017
|
},
|
|
1001
1018
|
// ISO day of week
|
|
1002
|
-
i: function(r,
|
|
1019
|
+
i: function(r, e, t) {
|
|
1003
1020
|
const n = r.getDay(), a = n === 0 ? 7 : n;
|
|
1004
|
-
switch (
|
|
1021
|
+
switch (e) {
|
|
1005
1022
|
// 2
|
|
1006
1023
|
case "i":
|
|
1007
1024
|
return String(a);
|
|
1008
1025
|
// 02
|
|
1009
1026
|
case "ii":
|
|
1010
|
-
return f(a,
|
|
1027
|
+
return f(a, e.length);
|
|
1011
1028
|
// 2nd
|
|
1012
1029
|
case "io":
|
|
1013
|
-
return
|
|
1030
|
+
return t.ordinalNumber(a, { unit: "day" });
|
|
1014
1031
|
// Tue
|
|
1015
1032
|
case "iii":
|
|
1016
|
-
return
|
|
1033
|
+
return t.day(n, {
|
|
1017
1034
|
width: "abbreviated",
|
|
1018
1035
|
context: "formatting"
|
|
1019
1036
|
});
|
|
1020
1037
|
// T
|
|
1021
1038
|
case "iiiii":
|
|
1022
|
-
return
|
|
1039
|
+
return t.day(n, {
|
|
1023
1040
|
width: "narrow",
|
|
1024
1041
|
context: "formatting"
|
|
1025
1042
|
});
|
|
1026
1043
|
// Tu
|
|
1027
1044
|
case "iiiiii":
|
|
1028
|
-
return
|
|
1045
|
+
return t.day(n, {
|
|
1029
1046
|
width: "short",
|
|
1030
1047
|
context: "formatting"
|
|
1031
1048
|
});
|
|
1032
1049
|
// Tuesday
|
|
1033
1050
|
case "iiii":
|
|
1034
1051
|
default:
|
|
1035
|
-
return
|
|
1052
|
+
return t.day(n, {
|
|
1036
1053
|
width: "wide",
|
|
1037
1054
|
context: "formatting"
|
|
1038
1055
|
});
|
|
1039
1056
|
}
|
|
1040
1057
|
},
|
|
1041
1058
|
// AM or PM
|
|
1042
|
-
a: function(r,
|
|
1059
|
+
a: function(r, e, t) {
|
|
1043
1060
|
const a = r.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1044
|
-
switch (
|
|
1061
|
+
switch (e) {
|
|
1045
1062
|
case "a":
|
|
1046
1063
|
case "aa":
|
|
1047
|
-
return
|
|
1064
|
+
return t.dayPeriod(a, {
|
|
1048
1065
|
width: "abbreviated",
|
|
1049
1066
|
context: "formatting"
|
|
1050
1067
|
});
|
|
1051
1068
|
case "aaa":
|
|
1052
|
-
return
|
|
1069
|
+
return t.dayPeriod(a, {
|
|
1053
1070
|
width: "abbreviated",
|
|
1054
1071
|
context: "formatting"
|
|
1055
1072
|
}).toLowerCase();
|
|
1056
1073
|
case "aaaaa":
|
|
1057
|
-
return
|
|
1074
|
+
return t.dayPeriod(a, {
|
|
1058
1075
|
width: "narrow",
|
|
1059
1076
|
context: "formatting"
|
|
1060
1077
|
});
|
|
1061
1078
|
case "aaaa":
|
|
1062
1079
|
default:
|
|
1063
|
-
return
|
|
1080
|
+
return t.dayPeriod(a, {
|
|
1064
1081
|
width: "wide",
|
|
1065
1082
|
context: "formatting"
|
|
1066
1083
|
});
|
|
1067
1084
|
}
|
|
1068
1085
|
},
|
|
1069
1086
|
// AM, PM, midnight, noon
|
|
1070
|
-
b: function(r,
|
|
1087
|
+
b: function(r, e, t) {
|
|
1071
1088
|
const n = r.getHours();
|
|
1072
1089
|
let a;
|
|
1073
|
-
switch (n === 12 ? a =
|
|
1090
|
+
switch (n === 12 ? a = E.noon : n === 0 ? a = E.midnight : a = n / 12 >= 1 ? "pm" : "am", e) {
|
|
1074
1091
|
case "b":
|
|
1075
1092
|
case "bb":
|
|
1076
|
-
return
|
|
1093
|
+
return t.dayPeriod(a, {
|
|
1077
1094
|
width: "abbreviated",
|
|
1078
1095
|
context: "formatting"
|
|
1079
1096
|
});
|
|
1080
1097
|
case "bbb":
|
|
1081
|
-
return
|
|
1098
|
+
return t.dayPeriod(a, {
|
|
1082
1099
|
width: "abbreviated",
|
|
1083
1100
|
context: "formatting"
|
|
1084
1101
|
}).toLowerCase();
|
|
1085
1102
|
case "bbbbb":
|
|
1086
|
-
return
|
|
1103
|
+
return t.dayPeriod(a, {
|
|
1087
1104
|
width: "narrow",
|
|
1088
1105
|
context: "formatting"
|
|
1089
1106
|
});
|
|
1090
1107
|
case "bbbb":
|
|
1091
1108
|
default:
|
|
1092
|
-
return
|
|
1109
|
+
return t.dayPeriod(a, {
|
|
1093
1110
|
width: "wide",
|
|
1094
1111
|
context: "formatting"
|
|
1095
1112
|
});
|
|
1096
1113
|
}
|
|
1097
1114
|
},
|
|
1098
1115
|
// in the morning, in the afternoon, in the evening, at night
|
|
1099
|
-
B: function(r,
|
|
1116
|
+
B: function(r, e, t) {
|
|
1100
1117
|
const n = r.getHours();
|
|
1101
1118
|
let a;
|
|
1102
|
-
switch (n >= 17 ? a =
|
|
1119
|
+
switch (n >= 17 ? a = E.evening : n >= 12 ? a = E.afternoon : n >= 4 ? a = E.morning : a = E.night, e) {
|
|
1103
1120
|
case "B":
|
|
1104
1121
|
case "BB":
|
|
1105
1122
|
case "BBB":
|
|
1106
|
-
return
|
|
1123
|
+
return t.dayPeriod(a, {
|
|
1107
1124
|
width: "abbreviated",
|
|
1108
1125
|
context: "formatting"
|
|
1109
1126
|
});
|
|
1110
1127
|
case "BBBBB":
|
|
1111
|
-
return
|
|
1128
|
+
return t.dayPeriod(a, {
|
|
1112
1129
|
width: "narrow",
|
|
1113
1130
|
context: "formatting"
|
|
1114
1131
|
});
|
|
1115
1132
|
case "BBBB":
|
|
1116
1133
|
default:
|
|
1117
|
-
return
|
|
1134
|
+
return t.dayPeriod(a, {
|
|
1118
1135
|
width: "wide",
|
|
1119
1136
|
context: "formatting"
|
|
1120
1137
|
});
|
|
1121
1138
|
}
|
|
1122
1139
|
},
|
|
1123
1140
|
// Hour [1-12]
|
|
1124
|
-
h: function(r,
|
|
1125
|
-
if (
|
|
1141
|
+
h: function(r, e, t) {
|
|
1142
|
+
if (e === "ho") {
|
|
1126
1143
|
let n = r.getHours() % 12;
|
|
1127
|
-
return n === 0 && (n = 12),
|
|
1144
|
+
return n === 0 && (n = 12), t.ordinalNumber(n, { unit: "hour" });
|
|
1128
1145
|
}
|
|
1129
|
-
return Y.h(r,
|
|
1146
|
+
return Y.h(r, e);
|
|
1130
1147
|
},
|
|
1131
1148
|
// Hour [0-23]
|
|
1132
|
-
H: function(r,
|
|
1133
|
-
return
|
|
1149
|
+
H: function(r, e, t) {
|
|
1150
|
+
return e === "Ho" ? t.ordinalNumber(r.getHours(), { unit: "hour" }) : Y.H(r, e);
|
|
1134
1151
|
},
|
|
1135
1152
|
// Hour [0-11]
|
|
1136
|
-
K: function(r,
|
|
1153
|
+
K: function(r, e, t) {
|
|
1137
1154
|
const n = r.getHours() % 12;
|
|
1138
|
-
return
|
|
1155
|
+
return e === "Ko" ? t.ordinalNumber(n, { unit: "hour" }) : f(n, e.length);
|
|
1139
1156
|
},
|
|
1140
1157
|
// Hour [1-24]
|
|
1141
|
-
k: function(r,
|
|
1158
|
+
k: function(r, e, t) {
|
|
1142
1159
|
let n = r.getHours();
|
|
1143
|
-
return n === 0 && (n = 24),
|
|
1160
|
+
return n === 0 && (n = 24), e === "ko" ? t.ordinalNumber(n, { unit: "hour" }) : f(n, e.length);
|
|
1144
1161
|
},
|
|
1145
1162
|
// Minute
|
|
1146
|
-
m: function(r,
|
|
1147
|
-
return
|
|
1163
|
+
m: function(r, e, t) {
|
|
1164
|
+
return e === "mo" ? t.ordinalNumber(r.getMinutes(), { unit: "minute" }) : Y.m(r, e);
|
|
1148
1165
|
},
|
|
1149
1166
|
// Second
|
|
1150
|
-
s: function(r,
|
|
1151
|
-
return
|
|
1167
|
+
s: function(r, e, t) {
|
|
1168
|
+
return e === "so" ? t.ordinalNumber(r.getSeconds(), { unit: "second" }) : Y.s(r, e);
|
|
1152
1169
|
},
|
|
1153
1170
|
// Fraction of second
|
|
1154
|
-
S: function(r,
|
|
1155
|
-
return Y.S(r,
|
|
1171
|
+
S: function(r, e) {
|
|
1172
|
+
return Y.S(r, e);
|
|
1156
1173
|
},
|
|
1157
1174
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1158
|
-
X: function(r,
|
|
1175
|
+
X: function(r, e, t) {
|
|
1159
1176
|
const n = r.getTimezoneOffset();
|
|
1160
1177
|
if (n === 0)
|
|
1161
1178
|
return "Z";
|
|
1162
|
-
switch (
|
|
1179
|
+
switch (e) {
|
|
1163
1180
|
// Hours and optional minutes
|
|
1164
1181
|
case "X":
|
|
1165
|
-
return
|
|
1182
|
+
return ae(n);
|
|
1166
1183
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1167
1184
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1168
1185
|
// so this token always has the same output as `XX`
|
|
@@ -1180,12 +1197,12 @@ const Y = {
|
|
|
1180
1197
|
}
|
|
1181
1198
|
},
|
|
1182
1199
|
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1183
|
-
x: function(r,
|
|
1200
|
+
x: function(r, e, t) {
|
|
1184
1201
|
const n = r.getTimezoneOffset();
|
|
1185
|
-
switch (
|
|
1202
|
+
switch (e) {
|
|
1186
1203
|
// Hours and optional minutes
|
|
1187
1204
|
case "x":
|
|
1188
|
-
return
|
|
1205
|
+
return ae(n);
|
|
1189
1206
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1190
1207
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1191
1208
|
// so this token always has the same output as `xx`
|
|
@@ -1203,14 +1220,14 @@ const Y = {
|
|
|
1203
1220
|
}
|
|
1204
1221
|
},
|
|
1205
1222
|
// Timezone (GMT)
|
|
1206
|
-
O: function(r,
|
|
1223
|
+
O: function(r, e, t) {
|
|
1207
1224
|
const n = r.getTimezoneOffset();
|
|
1208
|
-
switch (
|
|
1225
|
+
switch (e) {
|
|
1209
1226
|
// Short
|
|
1210
1227
|
case "O":
|
|
1211
1228
|
case "OO":
|
|
1212
1229
|
case "OOO":
|
|
1213
|
-
return "GMT" +
|
|
1230
|
+
return "GMT" + re(n, ":");
|
|
1214
1231
|
// Long
|
|
1215
1232
|
case "OOOO":
|
|
1216
1233
|
default:
|
|
@@ -1218,14 +1235,14 @@ const Y = {
|
|
|
1218
1235
|
}
|
|
1219
1236
|
},
|
|
1220
1237
|
// Timezone (specific non-location)
|
|
1221
|
-
z: function(r,
|
|
1238
|
+
z: function(r, e, t) {
|
|
1222
1239
|
const n = r.getTimezoneOffset();
|
|
1223
|
-
switch (
|
|
1240
|
+
switch (e) {
|
|
1224
1241
|
// Short
|
|
1225
1242
|
case "z":
|
|
1226
1243
|
case "zz":
|
|
1227
1244
|
case "zzz":
|
|
1228
|
-
return "GMT" +
|
|
1245
|
+
return "GMT" + re(n, ":");
|
|
1229
1246
|
// Long
|
|
1230
1247
|
case "zzzz":
|
|
1231
1248
|
default:
|
|
@@ -1233,218 +1250,216 @@ const Y = {
|
|
|
1233
1250
|
}
|
|
1234
1251
|
},
|
|
1235
1252
|
// Seconds timestamp
|
|
1236
|
-
t: function(r,
|
|
1237
|
-
const n = Math.trunc(r
|
|
1238
|
-
return f(n,
|
|
1253
|
+
t: function(r, e, t) {
|
|
1254
|
+
const n = Math.trunc(+r / 1e3);
|
|
1255
|
+
return f(n, e.length);
|
|
1239
1256
|
},
|
|
1240
1257
|
// Milliseconds timestamp
|
|
1241
|
-
T: function(r,
|
|
1242
|
-
|
|
1243
|
-
return f(n, t.length);
|
|
1258
|
+
T: function(r, e, t) {
|
|
1259
|
+
return f(+r, e.length);
|
|
1244
1260
|
}
|
|
1245
1261
|
};
|
|
1246
|
-
function
|
|
1247
|
-
const
|
|
1248
|
-
return s === 0 ?
|
|
1262
|
+
function re(r, e = "") {
|
|
1263
|
+
const t = r > 0 ? "-" : "+", n = Math.abs(r), a = Math.trunc(n / 60), s = n % 60;
|
|
1264
|
+
return s === 0 ? t + String(a) : t + String(a) + e + f(s, 2);
|
|
1249
1265
|
}
|
|
1250
|
-
function
|
|
1251
|
-
return r % 60 === 0 ? (r > 0 ? "-" : "+") + f(Math.abs(r) / 60, 2) : W(r,
|
|
1266
|
+
function ae(r, e) {
|
|
1267
|
+
return r % 60 === 0 ? (r > 0 ? "-" : "+") + f(Math.abs(r) / 60, 2) : W(r, e);
|
|
1252
1268
|
}
|
|
1253
|
-
function W(r,
|
|
1254
|
-
const
|
|
1255
|
-
return
|
|
1269
|
+
function W(r, e = "") {
|
|
1270
|
+
const t = r > 0 ? "-" : "+", n = Math.abs(r), a = f(Math.trunc(n / 60), 2), s = f(n % 60, 2);
|
|
1271
|
+
return t + a + e + s;
|
|
1256
1272
|
}
|
|
1257
|
-
const
|
|
1273
|
+
const se = (r, e) => {
|
|
1258
1274
|
switch (r) {
|
|
1259
1275
|
case "P":
|
|
1260
|
-
return
|
|
1276
|
+
return e.date({ width: "short" });
|
|
1261
1277
|
case "PP":
|
|
1262
|
-
return
|
|
1278
|
+
return e.date({ width: "medium" });
|
|
1263
1279
|
case "PPP":
|
|
1264
|
-
return
|
|
1280
|
+
return e.date({ width: "long" });
|
|
1265
1281
|
case "PPPP":
|
|
1266
1282
|
default:
|
|
1267
|
-
return
|
|
1283
|
+
return e.date({ width: "full" });
|
|
1268
1284
|
}
|
|
1269
|
-
},
|
|
1285
|
+
}, le = (r, e) => {
|
|
1270
1286
|
switch (r) {
|
|
1271
1287
|
case "p":
|
|
1272
|
-
return
|
|
1288
|
+
return e.time({ width: "short" });
|
|
1273
1289
|
case "pp":
|
|
1274
|
-
return
|
|
1290
|
+
return e.time({ width: "medium" });
|
|
1275
1291
|
case "ppp":
|
|
1276
|
-
return
|
|
1292
|
+
return e.time({ width: "long" });
|
|
1277
1293
|
case "pppp":
|
|
1278
1294
|
default:
|
|
1279
|
-
return
|
|
1295
|
+
return e.time({ width: "full" });
|
|
1280
1296
|
}
|
|
1281
|
-
},
|
|
1282
|
-
const
|
|
1297
|
+
}, ut = (r, e) => {
|
|
1298
|
+
const t = r.match(/(P+)(p+)?/) || [], n = t[1], a = t[2];
|
|
1283
1299
|
if (!a)
|
|
1284
|
-
return
|
|
1300
|
+
return se(r, e);
|
|
1285
1301
|
let s;
|
|
1286
1302
|
switch (n) {
|
|
1287
1303
|
case "P":
|
|
1288
|
-
s =
|
|
1304
|
+
s = e.dateTime({ width: "short" });
|
|
1289
1305
|
break;
|
|
1290
1306
|
case "PP":
|
|
1291
|
-
s =
|
|
1307
|
+
s = e.dateTime({ width: "medium" });
|
|
1292
1308
|
break;
|
|
1293
1309
|
case "PPP":
|
|
1294
|
-
s =
|
|
1310
|
+
s = e.dateTime({ width: "long" });
|
|
1295
1311
|
break;
|
|
1296
1312
|
case "PPPP":
|
|
1297
1313
|
default:
|
|
1298
|
-
s =
|
|
1314
|
+
s = e.dateTime({ width: "full" });
|
|
1299
1315
|
break;
|
|
1300
1316
|
}
|
|
1301
|
-
return s.replace("{{date}}",
|
|
1302
|
-
},
|
|
1303
|
-
p:
|
|
1304
|
-
P:
|
|
1305
|
-
},
|
|
1306
|
-
function
|
|
1307
|
-
return
|
|
1317
|
+
return s.replace("{{date}}", se(n, e)).replace("{{time}}", le(a, e));
|
|
1318
|
+
}, j = {
|
|
1319
|
+
p: le,
|
|
1320
|
+
P: ut
|
|
1321
|
+
}, ct = /^D+$/, dt = /^Y+$/, lt = ["D", "DD", "YY", "YYYY"];
|
|
1322
|
+
function fe(r) {
|
|
1323
|
+
return ct.test(r);
|
|
1308
1324
|
}
|
|
1309
|
-
function
|
|
1310
|
-
return
|
|
1325
|
+
function he(r) {
|
|
1326
|
+
return dt.test(r);
|
|
1311
1327
|
}
|
|
1312
|
-
function
|
|
1313
|
-
const n =
|
|
1314
|
-
if (console.warn(n),
|
|
1328
|
+
function $(r, e, t) {
|
|
1329
|
+
const n = ft(r, e, t);
|
|
1330
|
+
if (console.warn(n), lt.includes(r)) throw new RangeError(n);
|
|
1315
1331
|
}
|
|
1316
|
-
function
|
|
1332
|
+
function ft(r, e, t) {
|
|
1317
1333
|
const n = r[0] === "Y" ? "years" : "days of the month";
|
|
1318
|
-
return `Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${
|
|
1334
|
+
return `Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1319
1335
|
}
|
|
1320
|
-
const
|
|
1321
|
-
function
|
|
1322
|
-
const n = v(), a =
|
|
1323
|
-
if (!
|
|
1336
|
+
const ht = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, mt = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, wt = /^'([^]*?)'?$/, yt = /''/g, gt = /[a-zA-Z]/;
|
|
1337
|
+
function En(r, e, t) {
|
|
1338
|
+
const n = v(), a = t?.locale ?? n.locale ?? ue, s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, u = i(r, t?.in);
|
|
1339
|
+
if (!Te(u))
|
|
1324
1340
|
throw new RangeError("Invalid time value");
|
|
1325
|
-
let
|
|
1326
|
-
const
|
|
1327
|
-
if (
|
|
1328
|
-
const
|
|
1329
|
-
return
|
|
1341
|
+
let d = e.match(mt).map((m) => {
|
|
1342
|
+
const w = m[0];
|
|
1343
|
+
if (w === "p" || w === "P") {
|
|
1344
|
+
const D = j[w];
|
|
1345
|
+
return D(m, a.formatLong);
|
|
1330
1346
|
}
|
|
1331
|
-
return
|
|
1332
|
-
}).join("").match(
|
|
1333
|
-
if (
|
|
1347
|
+
return m;
|
|
1348
|
+
}).join("").match(ht).map((m) => {
|
|
1349
|
+
if (m === "''")
|
|
1334
1350
|
return { isToken: !1, value: "'" };
|
|
1335
|
-
const
|
|
1336
|
-
if (
|
|
1337
|
-
return { isToken: !1, value:
|
|
1338
|
-
if (
|
|
1339
|
-
return { isToken: !0, value:
|
|
1340
|
-
if (
|
|
1351
|
+
const w = m[0];
|
|
1352
|
+
if (w === "'")
|
|
1353
|
+
return { isToken: !1, value: bt(m) };
|
|
1354
|
+
if (ne[w])
|
|
1355
|
+
return { isToken: !0, value: m };
|
|
1356
|
+
if (w.match(gt))
|
|
1341
1357
|
throw new RangeError(
|
|
1342
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
1358
|
+
"Format string contains an unescaped latin alphabet character `" + w + "`"
|
|
1343
1359
|
);
|
|
1344
|
-
return { isToken: !1, value:
|
|
1360
|
+
return { isToken: !1, value: m };
|
|
1345
1361
|
});
|
|
1346
|
-
a.localize.preprocessor && (
|
|
1347
|
-
const
|
|
1362
|
+
a.localize.preprocessor && (d = a.localize.preprocessor(u, d));
|
|
1363
|
+
const p = {
|
|
1348
1364
|
firstWeekContainsDate: s,
|
|
1349
1365
|
weekStartsOn: o,
|
|
1350
1366
|
locale: a
|
|
1351
1367
|
};
|
|
1352
|
-
return
|
|
1353
|
-
if (!
|
|
1354
|
-
const
|
|
1355
|
-
(!
|
|
1356
|
-
const
|
|
1357
|
-
return
|
|
1368
|
+
return d.map((m) => {
|
|
1369
|
+
if (!m.isToken) return m.value;
|
|
1370
|
+
const w = m.value;
|
|
1371
|
+
(!t?.useAdditionalWeekYearTokens && he(w) || !t?.useAdditionalDayOfYearTokens && fe(w)) && $(w, e, String(r));
|
|
1372
|
+
const D = ne[w[0]];
|
|
1373
|
+
return D(u, w, a.localize, p);
|
|
1358
1374
|
}).join("");
|
|
1359
1375
|
}
|
|
1360
|
-
function
|
|
1361
|
-
const
|
|
1362
|
-
return
|
|
1376
|
+
function bt(r) {
|
|
1377
|
+
const e = r.match(wt);
|
|
1378
|
+
return e ? e[1].replace(yt, "'") : r;
|
|
1363
1379
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return i(r).getDay();
|
|
1380
|
+
function Hn(r, e) {
|
|
1381
|
+
return i(r, e?.in).getDay();
|
|
1366
1382
|
}
|
|
1367
|
-
function
|
|
1368
|
-
const t = i(r
|
|
1369
|
-
return
|
|
1383
|
+
function pt(r, e) {
|
|
1384
|
+
const t = i(r, e?.in), n = t.getFullYear(), a = t.getMonth(), s = h(t, 0);
|
|
1385
|
+
return s.setFullYear(n, a + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
|
|
1370
1386
|
}
|
|
1371
|
-
function
|
|
1387
|
+
function xt() {
|
|
1372
1388
|
return Object.assign({}, v());
|
|
1373
1389
|
}
|
|
1374
|
-
function
|
|
1375
|
-
return i(r).getHours();
|
|
1390
|
+
function qn(r, e) {
|
|
1391
|
+
return i(r, e?.in).getHours();
|
|
1376
1392
|
}
|
|
1377
|
-
function
|
|
1378
|
-
|
|
1379
|
-
return
|
|
1393
|
+
function Mt(r, e) {
|
|
1394
|
+
const t = i(r, e?.in).getDay();
|
|
1395
|
+
return t === 0 ? 7 : t;
|
|
1380
1396
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return i(r).getMinutes();
|
|
1397
|
+
function Nn(r, e) {
|
|
1398
|
+
return i(r, e?.in).getMinutes();
|
|
1383
1399
|
}
|
|
1384
|
-
function Fn(r) {
|
|
1385
|
-
return i(r).getMonth();
|
|
1400
|
+
function Fn(r, e) {
|
|
1401
|
+
return i(r, e?.in).getMonth();
|
|
1386
1402
|
}
|
|
1387
|
-
function
|
|
1403
|
+
function In(r) {
|
|
1388
1404
|
return i(r).getSeconds();
|
|
1389
1405
|
}
|
|
1390
|
-
function Cn(r) {
|
|
1391
|
-
return i(r).getFullYear();
|
|
1406
|
+
function Cn(r, e) {
|
|
1407
|
+
return i(r, e?.in).getFullYear();
|
|
1392
1408
|
}
|
|
1393
|
-
function
|
|
1394
|
-
|
|
1395
|
-
return e.getTime() > n.getTime();
|
|
1409
|
+
function Qn(r, e) {
|
|
1410
|
+
return +i(r) > +i(e);
|
|
1396
1411
|
}
|
|
1397
|
-
function
|
|
1398
|
-
|
|
1399
|
-
return +e < +n;
|
|
1412
|
+
function Ln(r, e) {
|
|
1413
|
+
return +i(r) < +i(e);
|
|
1400
1414
|
}
|
|
1401
|
-
function Rn(r,
|
|
1402
|
-
|
|
1403
|
-
return +e == +n;
|
|
1415
|
+
function Rn(r, e) {
|
|
1416
|
+
return +i(r) == +i(e);
|
|
1404
1417
|
}
|
|
1405
|
-
function
|
|
1406
|
-
const
|
|
1407
|
-
return
|
|
1408
|
-
r.getFullYear(),
|
|
1409
|
-
r.getMonth(),
|
|
1410
|
-
r.getDate()
|
|
1411
|
-
), e.setHours(
|
|
1418
|
+
function Dt(r, e) {
|
|
1419
|
+
const t = kt(e) ? new e(0) : h(e, 0);
|
|
1420
|
+
return t.setFullYear(r.getFullYear(), r.getMonth(), r.getDate()), t.setHours(
|
|
1412
1421
|
r.getHours(),
|
|
1413
1422
|
r.getMinutes(),
|
|
1414
1423
|
r.getSeconds(),
|
|
1415
1424
|
r.getMilliseconds()
|
|
1416
|
-
),
|
|
1425
|
+
), t;
|
|
1426
|
+
}
|
|
1427
|
+
function kt(r) {
|
|
1428
|
+
return typeof r == "function" && r.prototype?.constructor === r;
|
|
1417
1429
|
}
|
|
1418
|
-
const
|
|
1419
|
-
class
|
|
1430
|
+
const Pt = 10;
|
|
1431
|
+
class me {
|
|
1420
1432
|
subPriority = 0;
|
|
1421
|
-
validate(
|
|
1433
|
+
validate(e, t) {
|
|
1422
1434
|
return !0;
|
|
1423
1435
|
}
|
|
1424
1436
|
}
|
|
1425
|
-
class
|
|
1426
|
-
constructor(
|
|
1427
|
-
super(), this.value =
|
|
1437
|
+
class Tt extends me {
|
|
1438
|
+
constructor(e, t, n, a, s) {
|
|
1439
|
+
super(), this.value = e, this.validateValue = t, this.setValue = n, this.priority = a, s && (this.subPriority = s);
|
|
1428
1440
|
}
|
|
1429
|
-
validate(
|
|
1430
|
-
return this.validateValue(
|
|
1441
|
+
validate(e, t) {
|
|
1442
|
+
return this.validateValue(e, this.value, t);
|
|
1431
1443
|
}
|
|
1432
|
-
set(
|
|
1433
|
-
return this.setValue(
|
|
1444
|
+
set(e, t, n) {
|
|
1445
|
+
return this.setValue(e, t, this.value, n);
|
|
1434
1446
|
}
|
|
1435
1447
|
}
|
|
1436
|
-
class
|
|
1437
|
-
priority =
|
|
1448
|
+
class Ot extends me {
|
|
1449
|
+
priority = Pt;
|
|
1438
1450
|
subPriority = -1;
|
|
1439
|
-
|
|
1440
|
-
|
|
1451
|
+
constructor(e, t) {
|
|
1452
|
+
super(), this.context = e || ((n) => h(t, n));
|
|
1453
|
+
}
|
|
1454
|
+
set(e, t) {
|
|
1455
|
+
return t.timestampIsSet ? e : h(e, Dt(e, this.context));
|
|
1441
1456
|
}
|
|
1442
1457
|
}
|
|
1443
1458
|
class l {
|
|
1444
|
-
run(
|
|
1445
|
-
const s = this.parse(
|
|
1459
|
+
run(e, t, n, a) {
|
|
1460
|
+
const s = this.parse(e, t, n, a);
|
|
1446
1461
|
return s ? {
|
|
1447
|
-
setter: new
|
|
1462
|
+
setter: new Tt(
|
|
1448
1463
|
s.value,
|
|
1449
1464
|
this.validate,
|
|
1450
1465
|
this.set,
|
|
@@ -1454,30 +1469,30 @@ class l {
|
|
|
1454
1469
|
rest: s.rest
|
|
1455
1470
|
} : null;
|
|
1456
1471
|
}
|
|
1457
|
-
validate(
|
|
1472
|
+
validate(e, t, n) {
|
|
1458
1473
|
return !0;
|
|
1459
1474
|
}
|
|
1460
1475
|
}
|
|
1461
|
-
class
|
|
1476
|
+
class Yt extends l {
|
|
1462
1477
|
priority = 140;
|
|
1463
|
-
parse(
|
|
1464
|
-
switch (
|
|
1478
|
+
parse(e, t, n) {
|
|
1479
|
+
switch (t) {
|
|
1465
1480
|
// AD, BC
|
|
1466
1481
|
case "G":
|
|
1467
1482
|
case "GG":
|
|
1468
1483
|
case "GGG":
|
|
1469
|
-
return n.era(
|
|
1484
|
+
return n.era(e, { width: "abbreviated" }) || n.era(e, { width: "narrow" });
|
|
1470
1485
|
// A, B
|
|
1471
1486
|
case "GGGGG":
|
|
1472
|
-
return n.era(
|
|
1487
|
+
return n.era(e, { width: "narrow" });
|
|
1473
1488
|
// Anno Domini, Before Christ
|
|
1474
1489
|
case "GGGG":
|
|
1475
1490
|
default:
|
|
1476
|
-
return n.era(
|
|
1491
|
+
return n.era(e, { width: "wide" }) || n.era(e, { width: "abbreviated" }) || n.era(e, { width: "narrow" });
|
|
1477
1492
|
}
|
|
1478
1493
|
}
|
|
1479
|
-
set(
|
|
1480
|
-
return
|
|
1494
|
+
set(e, t, n) {
|
|
1495
|
+
return t.era = n, e.setFullYear(n, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1481
1496
|
}
|
|
1482
1497
|
incompatibleTokens = ["R", "u", "t", "T"];
|
|
1483
1498
|
}
|
|
@@ -1519,73 +1534,73 @@ const x = {
|
|
|
1519
1534
|
// 0 to 999, -0 to -999
|
|
1520
1535
|
fourDigitsSigned: /^-?\d{1,4}/
|
|
1521
1536
|
// 0 to 9999, -0 to -9999
|
|
1522
|
-
},
|
|
1537
|
+
}, P = {
|
|
1523
1538
|
basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
|
|
1524
1539
|
basic: /^([+-])(\d{2})(\d{2})|Z/,
|
|
1525
1540
|
basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
|
|
1526
1541
|
extended: /^([+-])(\d{2}):(\d{2})|Z/,
|
|
1527
1542
|
extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
|
|
1528
1543
|
};
|
|
1529
|
-
function M(r,
|
|
1544
|
+
function M(r, e) {
|
|
1530
1545
|
return r && {
|
|
1531
|
-
value:
|
|
1546
|
+
value: e(r.value),
|
|
1532
1547
|
rest: r.rest
|
|
1533
1548
|
};
|
|
1534
1549
|
}
|
|
1535
|
-
function y(r,
|
|
1536
|
-
const
|
|
1537
|
-
return
|
|
1538
|
-
value: parseInt(
|
|
1539
|
-
rest:
|
|
1550
|
+
function y(r, e) {
|
|
1551
|
+
const t = e.match(r);
|
|
1552
|
+
return t ? {
|
|
1553
|
+
value: parseInt(t[0], 10),
|
|
1554
|
+
rest: e.slice(t[0].length)
|
|
1540
1555
|
} : null;
|
|
1541
1556
|
}
|
|
1542
|
-
function
|
|
1543
|
-
const
|
|
1544
|
-
if (!
|
|
1557
|
+
function T(r, e) {
|
|
1558
|
+
const t = e.match(r);
|
|
1559
|
+
if (!t)
|
|
1545
1560
|
return null;
|
|
1546
|
-
if (
|
|
1561
|
+
if (t[0] === "Z")
|
|
1547
1562
|
return {
|
|
1548
1563
|
value: 0,
|
|
1549
|
-
rest:
|
|
1564
|
+
rest: e.slice(1)
|
|
1550
1565
|
};
|
|
1551
|
-
const n =
|
|
1566
|
+
const n = t[1] === "+" ? 1 : -1, a = t[2] ? parseInt(t[2], 10) : 0, s = t[3] ? parseInt(t[3], 10) : 0, o = t[5] ? parseInt(t[5], 10) : 0;
|
|
1552
1567
|
return {
|
|
1553
|
-
value: n * (a *
|
|
1554
|
-
rest:
|
|
1568
|
+
value: n * (a * 36e5 + s * 6e4 + o * 1e3),
|
|
1569
|
+
rest: e.slice(t[0].length)
|
|
1555
1570
|
};
|
|
1556
1571
|
}
|
|
1557
|
-
function
|
|
1572
|
+
function we(r) {
|
|
1558
1573
|
return y(x.anyDigitsSigned, r);
|
|
1559
1574
|
}
|
|
1560
|
-
function
|
|
1575
|
+
function b(r, e) {
|
|
1561
1576
|
switch (r) {
|
|
1562
1577
|
case 1:
|
|
1563
|
-
return y(x.singleDigit,
|
|
1578
|
+
return y(x.singleDigit, e);
|
|
1564
1579
|
case 2:
|
|
1565
|
-
return y(x.twoDigits,
|
|
1580
|
+
return y(x.twoDigits, e);
|
|
1566
1581
|
case 3:
|
|
1567
|
-
return y(x.threeDigits,
|
|
1582
|
+
return y(x.threeDigits, e);
|
|
1568
1583
|
case 4:
|
|
1569
|
-
return y(x.fourDigits,
|
|
1584
|
+
return y(x.fourDigits, e);
|
|
1570
1585
|
default:
|
|
1571
|
-
return y(new RegExp("^\\d{1," + r + "}"),
|
|
1586
|
+
return y(new RegExp("^\\d{1," + r + "}"), e);
|
|
1572
1587
|
}
|
|
1573
1588
|
}
|
|
1574
|
-
function
|
|
1589
|
+
function R(r, e) {
|
|
1575
1590
|
switch (r) {
|
|
1576
1591
|
case 1:
|
|
1577
|
-
return y(x.singleDigitSigned,
|
|
1592
|
+
return y(x.singleDigitSigned, e);
|
|
1578
1593
|
case 2:
|
|
1579
|
-
return y(x.twoDigitsSigned,
|
|
1594
|
+
return y(x.twoDigitsSigned, e);
|
|
1580
1595
|
case 3:
|
|
1581
|
-
return y(x.threeDigitsSigned,
|
|
1596
|
+
return y(x.threeDigitsSigned, e);
|
|
1582
1597
|
case 4:
|
|
1583
|
-
return y(x.fourDigitsSigned,
|
|
1598
|
+
return y(x.fourDigitsSigned, e);
|
|
1584
1599
|
default:
|
|
1585
|
-
return y(new RegExp("^-?\\d{1," + r + "}"),
|
|
1600
|
+
return y(new RegExp("^-?\\d{1," + r + "}"), e);
|
|
1586
1601
|
}
|
|
1587
1602
|
}
|
|
1588
|
-
function
|
|
1603
|
+
function z(r) {
|
|
1589
1604
|
switch (r) {
|
|
1590
1605
|
case "morning":
|
|
1591
1606
|
return 4;
|
|
@@ -1602,8 +1617,8 @@ function $(r) {
|
|
|
1602
1617
|
return 0;
|
|
1603
1618
|
}
|
|
1604
1619
|
}
|
|
1605
|
-
function
|
|
1606
|
-
const
|
|
1620
|
+
function ye(r, e) {
|
|
1621
|
+
const t = e > 0, n = t ? e : 1 - e;
|
|
1607
1622
|
let a;
|
|
1608
1623
|
if (n <= 50)
|
|
1609
1624
|
a = r || 100;
|
|
@@ -1611,88 +1626,88 @@ function mt(r, t) {
|
|
|
1611
1626
|
const s = n + 50, o = Math.trunc(s / 100) * 100, u = r >= s % 100;
|
|
1612
1627
|
a = r + o - (u ? 100 : 0);
|
|
1613
1628
|
}
|
|
1614
|
-
return
|
|
1629
|
+
return t ? a : 1 - a;
|
|
1615
1630
|
}
|
|
1616
|
-
function
|
|
1631
|
+
function ge(r) {
|
|
1617
1632
|
return r % 400 === 0 || r % 4 === 0 && r % 100 !== 0;
|
|
1618
1633
|
}
|
|
1619
|
-
class
|
|
1634
|
+
class _t extends l {
|
|
1620
1635
|
priority = 130;
|
|
1621
1636
|
incompatibleTokens = ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"];
|
|
1622
|
-
parse(
|
|
1637
|
+
parse(e, t, n) {
|
|
1623
1638
|
const a = (s) => ({
|
|
1624
1639
|
year: s,
|
|
1625
|
-
isTwoDigitYear:
|
|
1640
|
+
isTwoDigitYear: t === "yy"
|
|
1626
1641
|
});
|
|
1627
|
-
switch (
|
|
1642
|
+
switch (t) {
|
|
1628
1643
|
case "y":
|
|
1629
|
-
return M(
|
|
1644
|
+
return M(b(4, e), a);
|
|
1630
1645
|
case "yo":
|
|
1631
1646
|
return M(
|
|
1632
|
-
n.ordinalNumber(
|
|
1647
|
+
n.ordinalNumber(e, {
|
|
1633
1648
|
unit: "year"
|
|
1634
1649
|
}),
|
|
1635
1650
|
a
|
|
1636
1651
|
);
|
|
1637
1652
|
default:
|
|
1638
|
-
return M(
|
|
1653
|
+
return M(b(t.length, e), a);
|
|
1639
1654
|
}
|
|
1640
1655
|
}
|
|
1641
|
-
validate(
|
|
1642
|
-
return
|
|
1656
|
+
validate(e, t) {
|
|
1657
|
+
return t.isTwoDigitYear || t.year > 0;
|
|
1643
1658
|
}
|
|
1644
|
-
set(
|
|
1645
|
-
const a =
|
|
1659
|
+
set(e, t, n) {
|
|
1660
|
+
const a = e.getFullYear();
|
|
1646
1661
|
if (n.isTwoDigitYear) {
|
|
1647
|
-
const o =
|
|
1662
|
+
const o = ye(
|
|
1648
1663
|
n.year,
|
|
1649
1664
|
a
|
|
1650
1665
|
);
|
|
1651
|
-
return
|
|
1666
|
+
return e.setFullYear(o, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1652
1667
|
}
|
|
1653
|
-
const s = !("era" in
|
|
1654
|
-
return
|
|
1668
|
+
const s = !("era" in t) || t.era === 1 ? n.year : 1 - n.year;
|
|
1669
|
+
return e.setFullYear(s, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1655
1670
|
}
|
|
1656
1671
|
}
|
|
1657
|
-
class
|
|
1672
|
+
class Wt extends l {
|
|
1658
1673
|
priority = 130;
|
|
1659
|
-
parse(
|
|
1674
|
+
parse(e, t, n) {
|
|
1660
1675
|
const a = (s) => ({
|
|
1661
1676
|
year: s,
|
|
1662
|
-
isTwoDigitYear:
|
|
1677
|
+
isTwoDigitYear: t === "YY"
|
|
1663
1678
|
});
|
|
1664
|
-
switch (
|
|
1679
|
+
switch (t) {
|
|
1665
1680
|
case "Y":
|
|
1666
|
-
return M(
|
|
1681
|
+
return M(b(4, e), a);
|
|
1667
1682
|
case "Yo":
|
|
1668
1683
|
return M(
|
|
1669
|
-
n.ordinalNumber(
|
|
1684
|
+
n.ordinalNumber(e, {
|
|
1670
1685
|
unit: "year"
|
|
1671
1686
|
}),
|
|
1672
1687
|
a
|
|
1673
1688
|
);
|
|
1674
1689
|
default:
|
|
1675
|
-
return M(
|
|
1690
|
+
return M(b(t.length, e), a);
|
|
1676
1691
|
}
|
|
1677
1692
|
}
|
|
1678
|
-
validate(
|
|
1679
|
-
return
|
|
1693
|
+
validate(e, t) {
|
|
1694
|
+
return t.isTwoDigitYear || t.year > 0;
|
|
1680
1695
|
}
|
|
1681
|
-
set(
|
|
1682
|
-
const s =
|
|
1696
|
+
set(e, t, n, a) {
|
|
1697
|
+
const s = V(e, a);
|
|
1683
1698
|
if (n.isTwoDigitYear) {
|
|
1684
|
-
const u =
|
|
1699
|
+
const u = ye(
|
|
1685
1700
|
n.year,
|
|
1686
1701
|
s
|
|
1687
1702
|
);
|
|
1688
|
-
return
|
|
1703
|
+
return e.setFullYear(
|
|
1689
1704
|
u,
|
|
1690
1705
|
0,
|
|
1691
1706
|
a.firstWeekContainsDate
|
|
1692
|
-
),
|
|
1707
|
+
), e.setHours(0, 0, 0, 0), _(e, a);
|
|
1693
1708
|
}
|
|
1694
|
-
const o = !("era" in
|
|
1695
|
-
return
|
|
1709
|
+
const o = !("era" in t) || t.era === 1 ? n.year : 1 - n.year;
|
|
1710
|
+
return e.setFullYear(o, 0, a.firstWeekContainsDate), e.setHours(0, 0, 0, 0), _(e, a);
|
|
1696
1711
|
}
|
|
1697
1712
|
incompatibleTokens = [
|
|
1698
1713
|
"y",
|
|
@@ -1710,14 +1725,14 @@ class We extends l {
|
|
|
1710
1725
|
"T"
|
|
1711
1726
|
];
|
|
1712
1727
|
}
|
|
1713
|
-
class
|
|
1728
|
+
class vt extends l {
|
|
1714
1729
|
priority = 130;
|
|
1715
|
-
parse(
|
|
1716
|
-
return
|
|
1730
|
+
parse(e, t) {
|
|
1731
|
+
return R(t === "R" ? 4 : t.length, e);
|
|
1717
1732
|
}
|
|
1718
|
-
set(
|
|
1719
|
-
const a =
|
|
1720
|
-
return a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0),
|
|
1733
|
+
set(e, t, n) {
|
|
1734
|
+
const a = h(e, 0);
|
|
1735
|
+
return a.setFullYear(n, 0, 4), a.setHours(0, 0, 0, 0), q(a);
|
|
1721
1736
|
}
|
|
1722
1737
|
incompatibleTokens = [
|
|
1723
1738
|
"G",
|
|
@@ -1737,62 +1752,62 @@ class ve extends l {
|
|
|
1737
1752
|
"T"
|
|
1738
1753
|
];
|
|
1739
1754
|
}
|
|
1740
|
-
class
|
|
1755
|
+
class Et extends l {
|
|
1741
1756
|
priority = 130;
|
|
1742
|
-
parse(
|
|
1743
|
-
return
|
|
1757
|
+
parse(e, t) {
|
|
1758
|
+
return R(t === "u" ? 4 : t.length, e);
|
|
1744
1759
|
}
|
|
1745
|
-
set(
|
|
1746
|
-
return
|
|
1760
|
+
set(e, t, n) {
|
|
1761
|
+
return e.setFullYear(n, 0, 1), e.setHours(0, 0, 0, 0), e;
|
|
1747
1762
|
}
|
|
1748
1763
|
incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"];
|
|
1749
1764
|
}
|
|
1750
|
-
class
|
|
1765
|
+
class Ht extends l {
|
|
1751
1766
|
priority = 120;
|
|
1752
|
-
parse(
|
|
1753
|
-
switch (
|
|
1767
|
+
parse(e, t, n) {
|
|
1768
|
+
switch (t) {
|
|
1754
1769
|
// 1, 2, 3, 4
|
|
1755
1770
|
case "Q":
|
|
1756
1771
|
case "QQ":
|
|
1757
|
-
return
|
|
1772
|
+
return b(t.length, e);
|
|
1758
1773
|
// 1st, 2nd, 3rd, 4th
|
|
1759
1774
|
case "Qo":
|
|
1760
|
-
return n.ordinalNumber(
|
|
1775
|
+
return n.ordinalNumber(e, { unit: "quarter" });
|
|
1761
1776
|
// Q1, Q2, Q3, Q4
|
|
1762
1777
|
case "QQQ":
|
|
1763
|
-
return n.quarter(
|
|
1778
|
+
return n.quarter(e, {
|
|
1764
1779
|
width: "abbreviated",
|
|
1765
1780
|
context: "formatting"
|
|
1766
|
-
}) || n.quarter(
|
|
1781
|
+
}) || n.quarter(e, {
|
|
1767
1782
|
width: "narrow",
|
|
1768
1783
|
context: "formatting"
|
|
1769
1784
|
});
|
|
1770
1785
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1771
1786
|
case "QQQQQ":
|
|
1772
|
-
return n.quarter(
|
|
1787
|
+
return n.quarter(e, {
|
|
1773
1788
|
width: "narrow",
|
|
1774
1789
|
context: "formatting"
|
|
1775
1790
|
});
|
|
1776
1791
|
// 1st quarter, 2nd quarter, ...
|
|
1777
1792
|
case "QQQQ":
|
|
1778
1793
|
default:
|
|
1779
|
-
return n.quarter(
|
|
1794
|
+
return n.quarter(e, {
|
|
1780
1795
|
width: "wide",
|
|
1781
1796
|
context: "formatting"
|
|
1782
|
-
}) || n.quarter(
|
|
1797
|
+
}) || n.quarter(e, {
|
|
1783
1798
|
width: "abbreviated",
|
|
1784
1799
|
context: "formatting"
|
|
1785
|
-
}) || n.quarter(
|
|
1800
|
+
}) || n.quarter(e, {
|
|
1786
1801
|
width: "narrow",
|
|
1787
1802
|
context: "formatting"
|
|
1788
1803
|
});
|
|
1789
1804
|
}
|
|
1790
1805
|
}
|
|
1791
|
-
validate(
|
|
1792
|
-
return
|
|
1806
|
+
validate(e, t) {
|
|
1807
|
+
return t >= 1 && t <= 4;
|
|
1793
1808
|
}
|
|
1794
|
-
set(
|
|
1795
|
-
return
|
|
1809
|
+
set(e, t, n) {
|
|
1810
|
+
return e.setMonth((n - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
1796
1811
|
}
|
|
1797
1812
|
incompatibleTokens = [
|
|
1798
1813
|
"Y",
|
|
@@ -1811,52 +1826,52 @@ class Ee extends l {
|
|
|
1811
1826
|
"T"
|
|
1812
1827
|
];
|
|
1813
1828
|
}
|
|
1814
|
-
class
|
|
1829
|
+
class qt extends l {
|
|
1815
1830
|
priority = 120;
|
|
1816
|
-
parse(
|
|
1817
|
-
switch (
|
|
1831
|
+
parse(e, t, n) {
|
|
1832
|
+
switch (t) {
|
|
1818
1833
|
// 1, 2, 3, 4
|
|
1819
1834
|
case "q":
|
|
1820
1835
|
case "qq":
|
|
1821
|
-
return
|
|
1836
|
+
return b(t.length, e);
|
|
1822
1837
|
// 1st, 2nd, 3rd, 4th
|
|
1823
1838
|
case "qo":
|
|
1824
|
-
return n.ordinalNumber(
|
|
1839
|
+
return n.ordinalNumber(e, { unit: "quarter" });
|
|
1825
1840
|
// Q1, Q2, Q3, Q4
|
|
1826
1841
|
case "qqq":
|
|
1827
|
-
return n.quarter(
|
|
1842
|
+
return n.quarter(e, {
|
|
1828
1843
|
width: "abbreviated",
|
|
1829
1844
|
context: "standalone"
|
|
1830
|
-
}) || n.quarter(
|
|
1845
|
+
}) || n.quarter(e, {
|
|
1831
1846
|
width: "narrow",
|
|
1832
1847
|
context: "standalone"
|
|
1833
1848
|
});
|
|
1834
1849
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
1835
1850
|
case "qqqqq":
|
|
1836
|
-
return n.quarter(
|
|
1851
|
+
return n.quarter(e, {
|
|
1837
1852
|
width: "narrow",
|
|
1838
1853
|
context: "standalone"
|
|
1839
1854
|
});
|
|
1840
1855
|
// 1st quarter, 2nd quarter, ...
|
|
1841
1856
|
case "qqqq":
|
|
1842
1857
|
default:
|
|
1843
|
-
return n.quarter(
|
|
1858
|
+
return n.quarter(e, {
|
|
1844
1859
|
width: "wide",
|
|
1845
1860
|
context: "standalone"
|
|
1846
|
-
}) || n.quarter(
|
|
1861
|
+
}) || n.quarter(e, {
|
|
1847
1862
|
width: "abbreviated",
|
|
1848
1863
|
context: "standalone"
|
|
1849
|
-
}) || n.quarter(
|
|
1864
|
+
}) || n.quarter(e, {
|
|
1850
1865
|
width: "narrow",
|
|
1851
1866
|
context: "standalone"
|
|
1852
1867
|
});
|
|
1853
1868
|
}
|
|
1854
1869
|
}
|
|
1855
|
-
validate(
|
|
1856
|
-
return
|
|
1870
|
+
validate(e, t) {
|
|
1871
|
+
return t >= 1 && t <= 4;
|
|
1857
1872
|
}
|
|
1858
|
-
set(
|
|
1859
|
-
return
|
|
1873
|
+
set(e, t, n) {
|
|
1874
|
+
return e.setMonth((n - 1) * 3, 1), e.setHours(0, 0, 0, 0), e;
|
|
1860
1875
|
}
|
|
1861
1876
|
incompatibleTokens = [
|
|
1862
1877
|
"Y",
|
|
@@ -1875,7 +1890,7 @@ class He extends l {
|
|
|
1875
1890
|
"T"
|
|
1876
1891
|
];
|
|
1877
1892
|
}
|
|
1878
|
-
class
|
|
1893
|
+
class Nt extends l {
|
|
1879
1894
|
incompatibleTokens = [
|
|
1880
1895
|
"Y",
|
|
1881
1896
|
"R",
|
|
@@ -1892,102 +1907,102 @@ class qe extends l {
|
|
|
1892
1907
|
"T"
|
|
1893
1908
|
];
|
|
1894
1909
|
priority = 110;
|
|
1895
|
-
parse(
|
|
1910
|
+
parse(e, t, n) {
|
|
1896
1911
|
const a = (s) => s - 1;
|
|
1897
|
-
switch (
|
|
1912
|
+
switch (t) {
|
|
1898
1913
|
// 1, 2, ..., 12
|
|
1899
1914
|
case "M":
|
|
1900
1915
|
return M(
|
|
1901
|
-
y(x.month,
|
|
1916
|
+
y(x.month, e),
|
|
1902
1917
|
a
|
|
1903
1918
|
);
|
|
1904
1919
|
// 01, 02, ..., 12
|
|
1905
1920
|
case "MM":
|
|
1906
|
-
return M(
|
|
1921
|
+
return M(b(2, e), a);
|
|
1907
1922
|
// 1st, 2nd, ..., 12th
|
|
1908
1923
|
case "Mo":
|
|
1909
1924
|
return M(
|
|
1910
|
-
n.ordinalNumber(
|
|
1925
|
+
n.ordinalNumber(e, {
|
|
1911
1926
|
unit: "month"
|
|
1912
1927
|
}),
|
|
1913
1928
|
a
|
|
1914
1929
|
);
|
|
1915
1930
|
// Jan, Feb, ..., Dec
|
|
1916
1931
|
case "MMM":
|
|
1917
|
-
return n.month(
|
|
1932
|
+
return n.month(e, {
|
|
1918
1933
|
width: "abbreviated",
|
|
1919
1934
|
context: "formatting"
|
|
1920
|
-
}) || n.month(
|
|
1935
|
+
}) || n.month(e, { width: "narrow", context: "formatting" });
|
|
1921
1936
|
// J, F, ..., D
|
|
1922
1937
|
case "MMMMM":
|
|
1923
|
-
return n.month(
|
|
1938
|
+
return n.month(e, {
|
|
1924
1939
|
width: "narrow",
|
|
1925
1940
|
context: "formatting"
|
|
1926
1941
|
});
|
|
1927
1942
|
// January, February, ..., December
|
|
1928
1943
|
case "MMMM":
|
|
1929
1944
|
default:
|
|
1930
|
-
return n.month(
|
|
1945
|
+
return n.month(e, { width: "wide", context: "formatting" }) || n.month(e, {
|
|
1931
1946
|
width: "abbreviated",
|
|
1932
1947
|
context: "formatting"
|
|
1933
|
-
}) || n.month(
|
|
1948
|
+
}) || n.month(e, { width: "narrow", context: "formatting" });
|
|
1934
1949
|
}
|
|
1935
1950
|
}
|
|
1936
|
-
validate(
|
|
1937
|
-
return
|
|
1951
|
+
validate(e, t) {
|
|
1952
|
+
return t >= 0 && t <= 11;
|
|
1938
1953
|
}
|
|
1939
|
-
set(
|
|
1940
|
-
return
|
|
1954
|
+
set(e, t, n) {
|
|
1955
|
+
return e.setMonth(n, 1), e.setHours(0, 0, 0, 0), e;
|
|
1941
1956
|
}
|
|
1942
1957
|
}
|
|
1943
|
-
class
|
|
1958
|
+
class Ft extends l {
|
|
1944
1959
|
priority = 110;
|
|
1945
|
-
parse(
|
|
1960
|
+
parse(e, t, n) {
|
|
1946
1961
|
const a = (s) => s - 1;
|
|
1947
|
-
switch (
|
|
1962
|
+
switch (t) {
|
|
1948
1963
|
// 1, 2, ..., 12
|
|
1949
1964
|
case "L":
|
|
1950
1965
|
return M(
|
|
1951
|
-
y(x.month,
|
|
1966
|
+
y(x.month, e),
|
|
1952
1967
|
a
|
|
1953
1968
|
);
|
|
1954
1969
|
// 01, 02, ..., 12
|
|
1955
1970
|
case "LL":
|
|
1956
|
-
return M(
|
|
1971
|
+
return M(b(2, e), a);
|
|
1957
1972
|
// 1st, 2nd, ..., 12th
|
|
1958
1973
|
case "Lo":
|
|
1959
1974
|
return M(
|
|
1960
|
-
n.ordinalNumber(
|
|
1975
|
+
n.ordinalNumber(e, {
|
|
1961
1976
|
unit: "month"
|
|
1962
1977
|
}),
|
|
1963
1978
|
a
|
|
1964
1979
|
);
|
|
1965
1980
|
// Jan, Feb, ..., Dec
|
|
1966
1981
|
case "LLL":
|
|
1967
|
-
return n.month(
|
|
1982
|
+
return n.month(e, {
|
|
1968
1983
|
width: "abbreviated",
|
|
1969
1984
|
context: "standalone"
|
|
1970
|
-
}) || n.month(
|
|
1985
|
+
}) || n.month(e, { width: "narrow", context: "standalone" });
|
|
1971
1986
|
// J, F, ..., D
|
|
1972
1987
|
case "LLLLL":
|
|
1973
|
-
return n.month(
|
|
1988
|
+
return n.month(e, {
|
|
1974
1989
|
width: "narrow",
|
|
1975
1990
|
context: "standalone"
|
|
1976
1991
|
});
|
|
1977
1992
|
// January, February, ..., December
|
|
1978
1993
|
case "LLLL":
|
|
1979
1994
|
default:
|
|
1980
|
-
return n.month(
|
|
1995
|
+
return n.month(e, { width: "wide", context: "standalone" }) || n.month(e, {
|
|
1981
1996
|
width: "abbreviated",
|
|
1982
1997
|
context: "standalone"
|
|
1983
|
-
}) || n.month(
|
|
1998
|
+
}) || n.month(e, { width: "narrow", context: "standalone" });
|
|
1984
1999
|
}
|
|
1985
2000
|
}
|
|
1986
|
-
validate(
|
|
1987
|
-
return
|
|
2001
|
+
validate(e, t) {
|
|
2002
|
+
return t >= 0 && t <= 11;
|
|
1988
2003
|
}
|
|
1989
|
-
set(
|
|
1990
|
-
return
|
|
2004
|
+
set(e, t, n) {
|
|
2005
|
+
return e.setMonth(n, 1), e.setHours(0, 0, 0, 0), e;
|
|
1991
2006
|
}
|
|
1992
2007
|
incompatibleTokens = [
|
|
1993
2008
|
"Y",
|
|
@@ -2005,27 +2020,27 @@ class Fe extends l {
|
|
|
2005
2020
|
"T"
|
|
2006
2021
|
];
|
|
2007
2022
|
}
|
|
2008
|
-
function
|
|
2009
|
-
const n = i(r), a =
|
|
2010
|
-
return n.setDate(n.getDate() - a * 7), n;
|
|
2023
|
+
function It(r, e, t) {
|
|
2024
|
+
const n = i(r, t?.in), a = de(n, t) - e;
|
|
2025
|
+
return n.setDate(n.getDate() - a * 7), i(n, t?.in);
|
|
2011
2026
|
}
|
|
2012
|
-
class
|
|
2027
|
+
class Ct extends l {
|
|
2013
2028
|
priority = 100;
|
|
2014
|
-
parse(
|
|
2015
|
-
switch (
|
|
2029
|
+
parse(e, t, n) {
|
|
2030
|
+
switch (t) {
|
|
2016
2031
|
case "w":
|
|
2017
|
-
return y(x.week,
|
|
2032
|
+
return y(x.week, e);
|
|
2018
2033
|
case "wo":
|
|
2019
|
-
return n.ordinalNumber(
|
|
2034
|
+
return n.ordinalNumber(e, { unit: "week" });
|
|
2020
2035
|
default:
|
|
2021
|
-
return
|
|
2036
|
+
return b(t.length, e);
|
|
2022
2037
|
}
|
|
2023
2038
|
}
|
|
2024
|
-
validate(
|
|
2025
|
-
return
|
|
2039
|
+
validate(e, t) {
|
|
2040
|
+
return t >= 1 && t <= 53;
|
|
2026
2041
|
}
|
|
2027
|
-
set(
|
|
2028
|
-
return _(
|
|
2042
|
+
set(e, t, n, a) {
|
|
2043
|
+
return _(It(e, n, a), a);
|
|
2029
2044
|
}
|
|
2030
2045
|
incompatibleTokens = [
|
|
2031
2046
|
"y",
|
|
@@ -2043,27 +2058,27 @@ class Ce extends l {
|
|
|
2043
2058
|
"T"
|
|
2044
2059
|
];
|
|
2045
2060
|
}
|
|
2046
|
-
function
|
|
2047
|
-
const
|
|
2048
|
-
return
|
|
2061
|
+
function Qt(r, e, t) {
|
|
2062
|
+
const n = i(r, t?.in), a = ce(n, t) - e;
|
|
2063
|
+
return n.setDate(n.getDate() - a * 7), n;
|
|
2049
2064
|
}
|
|
2050
|
-
class
|
|
2065
|
+
class Lt extends l {
|
|
2051
2066
|
priority = 100;
|
|
2052
|
-
parse(
|
|
2053
|
-
switch (
|
|
2067
|
+
parse(e, t, n) {
|
|
2068
|
+
switch (t) {
|
|
2054
2069
|
case "I":
|
|
2055
|
-
return y(x.week,
|
|
2070
|
+
return y(x.week, e);
|
|
2056
2071
|
case "Io":
|
|
2057
|
-
return n.ordinalNumber(
|
|
2072
|
+
return n.ordinalNumber(e, { unit: "week" });
|
|
2058
2073
|
default:
|
|
2059
|
-
return
|
|
2074
|
+
return b(t.length, e);
|
|
2060
2075
|
}
|
|
2061
2076
|
}
|
|
2062
|
-
validate(
|
|
2063
|
-
return
|
|
2077
|
+
validate(e, t) {
|
|
2078
|
+
return t >= 1 && t <= 53;
|
|
2064
2079
|
}
|
|
2065
|
-
set(
|
|
2066
|
-
return
|
|
2080
|
+
set(e, t, n) {
|
|
2081
|
+
return q(Qt(e, n));
|
|
2067
2082
|
}
|
|
2068
2083
|
incompatibleTokens = [
|
|
2069
2084
|
"y",
|
|
@@ -2082,7 +2097,7 @@ class Qe extends l {
|
|
|
2082
2097
|
"T"
|
|
2083
2098
|
];
|
|
2084
2099
|
}
|
|
2085
|
-
const
|
|
2100
|
+
const Rt = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], At = [
|
|
2086
2101
|
31,
|
|
2087
2102
|
29,
|
|
2088
2103
|
31,
|
|
@@ -2096,25 +2111,25 @@ const Re = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ae = [
|
|
|
2096
2111
|
30,
|
|
2097
2112
|
31
|
|
2098
2113
|
];
|
|
2099
|
-
class
|
|
2114
|
+
class Xt extends l {
|
|
2100
2115
|
priority = 90;
|
|
2101
2116
|
subPriority = 1;
|
|
2102
|
-
parse(
|
|
2103
|
-
switch (
|
|
2117
|
+
parse(e, t, n) {
|
|
2118
|
+
switch (t) {
|
|
2104
2119
|
case "d":
|
|
2105
|
-
return y(x.date,
|
|
2120
|
+
return y(x.date, e);
|
|
2106
2121
|
case "do":
|
|
2107
|
-
return n.ordinalNumber(
|
|
2122
|
+
return n.ordinalNumber(e, { unit: "date" });
|
|
2108
2123
|
default:
|
|
2109
|
-
return
|
|
2124
|
+
return b(t.length, e);
|
|
2110
2125
|
}
|
|
2111
2126
|
}
|
|
2112
|
-
validate(
|
|
2113
|
-
const n =
|
|
2114
|
-
return a ?
|
|
2127
|
+
validate(e, t) {
|
|
2128
|
+
const n = e.getFullYear(), a = ge(n), s = e.getMonth();
|
|
2129
|
+
return a ? t >= 1 && t <= At[s] : t >= 1 && t <= Rt[s];
|
|
2115
2130
|
}
|
|
2116
|
-
set(
|
|
2117
|
-
return
|
|
2131
|
+
set(e, t, n) {
|
|
2132
|
+
return e.setDate(n), e.setHours(0, 0, 0, 0), e;
|
|
2118
2133
|
}
|
|
2119
2134
|
incompatibleTokens = [
|
|
2120
2135
|
"Y",
|
|
@@ -2131,26 +2146,26 @@ class Xe extends l {
|
|
|
2131
2146
|
"T"
|
|
2132
2147
|
];
|
|
2133
2148
|
}
|
|
2134
|
-
class
|
|
2149
|
+
class Bt extends l {
|
|
2135
2150
|
priority = 90;
|
|
2136
2151
|
subpriority = 1;
|
|
2137
|
-
parse(
|
|
2138
|
-
switch (
|
|
2152
|
+
parse(e, t, n) {
|
|
2153
|
+
switch (t) {
|
|
2139
2154
|
case "D":
|
|
2140
2155
|
case "DD":
|
|
2141
|
-
return y(x.dayOfYear,
|
|
2156
|
+
return y(x.dayOfYear, e);
|
|
2142
2157
|
case "Do":
|
|
2143
|
-
return n.ordinalNumber(
|
|
2158
|
+
return n.ordinalNumber(e, { unit: "date" });
|
|
2144
2159
|
default:
|
|
2145
|
-
return
|
|
2160
|
+
return b(t.length, e);
|
|
2146
2161
|
}
|
|
2147
2162
|
}
|
|
2148
|
-
validate(
|
|
2149
|
-
const n =
|
|
2150
|
-
return
|
|
2163
|
+
validate(e, t) {
|
|
2164
|
+
const n = e.getFullYear();
|
|
2165
|
+
return ge(n) ? t >= 1 && t <= 366 : t >= 1 && t <= 365;
|
|
2151
2166
|
}
|
|
2152
|
-
set(
|
|
2153
|
-
return
|
|
2167
|
+
set(e, t, n) {
|
|
2168
|
+
return e.setMonth(0, n), e.setHours(0, 0, 0, 0), e;
|
|
2154
2169
|
}
|
|
2155
2170
|
incompatibleTokens = [
|
|
2156
2171
|
"Y",
|
|
@@ -2170,97 +2185,97 @@ class Be extends l {
|
|
|
2170
2185
|
"T"
|
|
2171
2186
|
];
|
|
2172
2187
|
}
|
|
2173
|
-
function
|
|
2174
|
-
const n = v(), a =
|
|
2175
|
-
return
|
|
2188
|
+
function J(r, e, t) {
|
|
2189
|
+
const n = v(), a = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, s = i(r, t?.in), o = s.getDay(), d = (e % 7 + 7) % 7, p = 7 - a, m = e < 0 || e > 6 ? e - (o + p) % 7 : (d + p) % 7 - (o + p) % 7;
|
|
2190
|
+
return A(s, m, t);
|
|
2176
2191
|
}
|
|
2177
|
-
class
|
|
2192
|
+
class Gt extends l {
|
|
2178
2193
|
priority = 90;
|
|
2179
|
-
parse(
|
|
2180
|
-
switch (
|
|
2194
|
+
parse(e, t, n) {
|
|
2195
|
+
switch (t) {
|
|
2181
2196
|
// Tue
|
|
2182
2197
|
case "E":
|
|
2183
2198
|
case "EE":
|
|
2184
2199
|
case "EEE":
|
|
2185
|
-
return n.day(
|
|
2200
|
+
return n.day(e, {
|
|
2186
2201
|
width: "abbreviated",
|
|
2187
2202
|
context: "formatting"
|
|
2188
|
-
}) || n.day(
|
|
2203
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2189
2204
|
// T
|
|
2190
2205
|
case "EEEEE":
|
|
2191
|
-
return n.day(
|
|
2206
|
+
return n.day(e, {
|
|
2192
2207
|
width: "narrow",
|
|
2193
2208
|
context: "formatting"
|
|
2194
2209
|
});
|
|
2195
2210
|
// Tu
|
|
2196
2211
|
case "EEEEEE":
|
|
2197
|
-
return n.day(
|
|
2212
|
+
return n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2198
2213
|
// Tuesday
|
|
2199
2214
|
case "EEEE":
|
|
2200
2215
|
default:
|
|
2201
|
-
return n.day(
|
|
2216
|
+
return n.day(e, { width: "wide", context: "formatting" }) || n.day(e, {
|
|
2202
2217
|
width: "abbreviated",
|
|
2203
2218
|
context: "formatting"
|
|
2204
|
-
}) || n.day(
|
|
2219
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2205
2220
|
}
|
|
2206
2221
|
}
|
|
2207
|
-
validate(
|
|
2208
|
-
return
|
|
2222
|
+
validate(e, t) {
|
|
2223
|
+
return t >= 0 && t <= 6;
|
|
2209
2224
|
}
|
|
2210
|
-
set(
|
|
2211
|
-
return
|
|
2225
|
+
set(e, t, n, a) {
|
|
2226
|
+
return e = J(e, n, a), e.setHours(0, 0, 0, 0), e;
|
|
2212
2227
|
}
|
|
2213
2228
|
incompatibleTokens = ["D", "i", "e", "c", "t", "T"];
|
|
2214
2229
|
}
|
|
2215
|
-
class
|
|
2230
|
+
class jt extends l {
|
|
2216
2231
|
priority = 90;
|
|
2217
|
-
parse(
|
|
2232
|
+
parse(e, t, n, a) {
|
|
2218
2233
|
const s = (o) => {
|
|
2219
2234
|
const u = Math.floor((o - 1) / 7) * 7;
|
|
2220
2235
|
return (o + a.weekStartsOn + 6) % 7 + u;
|
|
2221
2236
|
};
|
|
2222
|
-
switch (
|
|
2237
|
+
switch (t) {
|
|
2223
2238
|
// 3
|
|
2224
2239
|
case "e":
|
|
2225
2240
|
case "ee":
|
|
2226
|
-
return M(
|
|
2241
|
+
return M(b(t.length, e), s);
|
|
2227
2242
|
// 3rd
|
|
2228
2243
|
case "eo":
|
|
2229
2244
|
return M(
|
|
2230
|
-
n.ordinalNumber(
|
|
2245
|
+
n.ordinalNumber(e, {
|
|
2231
2246
|
unit: "day"
|
|
2232
2247
|
}),
|
|
2233
2248
|
s
|
|
2234
2249
|
);
|
|
2235
2250
|
// Tue
|
|
2236
2251
|
case "eee":
|
|
2237
|
-
return n.day(
|
|
2252
|
+
return n.day(e, {
|
|
2238
2253
|
width: "abbreviated",
|
|
2239
2254
|
context: "formatting"
|
|
2240
|
-
}) || n.day(
|
|
2255
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2241
2256
|
// T
|
|
2242
2257
|
case "eeeee":
|
|
2243
|
-
return n.day(
|
|
2258
|
+
return n.day(e, {
|
|
2244
2259
|
width: "narrow",
|
|
2245
2260
|
context: "formatting"
|
|
2246
2261
|
});
|
|
2247
2262
|
// Tu
|
|
2248
2263
|
case "eeeeee":
|
|
2249
|
-
return n.day(
|
|
2264
|
+
return n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2250
2265
|
// Tuesday
|
|
2251
2266
|
case "eeee":
|
|
2252
2267
|
default:
|
|
2253
|
-
return n.day(
|
|
2268
|
+
return n.day(e, { width: "wide", context: "formatting" }) || n.day(e, {
|
|
2254
2269
|
width: "abbreviated",
|
|
2255
2270
|
context: "formatting"
|
|
2256
|
-
}) || n.day(
|
|
2271
|
+
}) || n.day(e, { width: "short", context: "formatting" }) || n.day(e, { width: "narrow", context: "formatting" });
|
|
2257
2272
|
}
|
|
2258
2273
|
}
|
|
2259
|
-
validate(
|
|
2260
|
-
return
|
|
2274
|
+
validate(e, t) {
|
|
2275
|
+
return t >= 0 && t <= 6;
|
|
2261
2276
|
}
|
|
2262
|
-
set(
|
|
2263
|
-
return
|
|
2277
|
+
set(e, t, n, a) {
|
|
2278
|
+
return e = J(e, n, a), e.setHours(0, 0, 0, 0), e;
|
|
2264
2279
|
}
|
|
2265
2280
|
incompatibleTokens = [
|
|
2266
2281
|
"y",
|
|
@@ -2280,55 +2295,55 @@ class je extends l {
|
|
|
2280
2295
|
"T"
|
|
2281
2296
|
];
|
|
2282
2297
|
}
|
|
2283
|
-
class $
|
|
2298
|
+
class $t extends l {
|
|
2284
2299
|
priority = 90;
|
|
2285
|
-
parse(
|
|
2300
|
+
parse(e, t, n, a) {
|
|
2286
2301
|
const s = (o) => {
|
|
2287
2302
|
const u = Math.floor((o - 1) / 7) * 7;
|
|
2288
2303
|
return (o + a.weekStartsOn + 6) % 7 + u;
|
|
2289
2304
|
};
|
|
2290
|
-
switch (
|
|
2305
|
+
switch (t) {
|
|
2291
2306
|
// 3
|
|
2292
2307
|
case "c":
|
|
2293
2308
|
case "cc":
|
|
2294
|
-
return M(
|
|
2309
|
+
return M(b(t.length, e), s);
|
|
2295
2310
|
// 3rd
|
|
2296
2311
|
case "co":
|
|
2297
2312
|
return M(
|
|
2298
|
-
n.ordinalNumber(
|
|
2313
|
+
n.ordinalNumber(e, {
|
|
2299
2314
|
unit: "day"
|
|
2300
2315
|
}),
|
|
2301
2316
|
s
|
|
2302
2317
|
);
|
|
2303
2318
|
// Tue
|
|
2304
2319
|
case "ccc":
|
|
2305
|
-
return n.day(
|
|
2320
|
+
return n.day(e, {
|
|
2306
2321
|
width: "abbreviated",
|
|
2307
2322
|
context: "standalone"
|
|
2308
|
-
}) || n.day(
|
|
2323
|
+
}) || n.day(e, { width: "short", context: "standalone" }) || n.day(e, { width: "narrow", context: "standalone" });
|
|
2309
2324
|
// T
|
|
2310
2325
|
case "ccccc":
|
|
2311
|
-
return n.day(
|
|
2326
|
+
return n.day(e, {
|
|
2312
2327
|
width: "narrow",
|
|
2313
2328
|
context: "standalone"
|
|
2314
2329
|
});
|
|
2315
2330
|
// Tu
|
|
2316
2331
|
case "cccccc":
|
|
2317
|
-
return n.day(
|
|
2332
|
+
return n.day(e, { width: "short", context: "standalone" }) || n.day(e, { width: "narrow", context: "standalone" });
|
|
2318
2333
|
// Tuesday
|
|
2319
2334
|
case "cccc":
|
|
2320
2335
|
default:
|
|
2321
|
-
return n.day(
|
|
2336
|
+
return n.day(e, { width: "wide", context: "standalone" }) || n.day(e, {
|
|
2322
2337
|
width: "abbreviated",
|
|
2323
2338
|
context: "standalone"
|
|
2324
|
-
}) || n.day(
|
|
2339
|
+
}) || n.day(e, { width: "short", context: "standalone" }) || n.day(e, { width: "narrow", context: "standalone" });
|
|
2325
2340
|
}
|
|
2326
2341
|
}
|
|
2327
|
-
validate(
|
|
2328
|
-
return
|
|
2342
|
+
validate(e, t) {
|
|
2343
|
+
return t >= 0 && t <= 6;
|
|
2329
2344
|
}
|
|
2330
|
-
set(
|
|
2331
|
-
return
|
|
2345
|
+
set(e, t, n, a) {
|
|
2346
|
+
return e = J(e, n, a), e.setHours(0, 0, 0, 0), e;
|
|
2332
2347
|
}
|
|
2333
2348
|
incompatibleTokens = [
|
|
2334
2349
|
"y",
|
|
@@ -2348,32 +2363,32 @@ class $e extends l {
|
|
|
2348
2363
|
"T"
|
|
2349
2364
|
];
|
|
2350
2365
|
}
|
|
2351
|
-
function
|
|
2352
|
-
const
|
|
2353
|
-
return
|
|
2366
|
+
function Vt(r, e, t) {
|
|
2367
|
+
const n = i(r, t?.in), a = Mt(n, t), s = e - a;
|
|
2368
|
+
return A(n, s, t);
|
|
2354
2369
|
}
|
|
2355
|
-
class
|
|
2370
|
+
class zt extends l {
|
|
2356
2371
|
priority = 90;
|
|
2357
|
-
parse(
|
|
2372
|
+
parse(e, t, n) {
|
|
2358
2373
|
const a = (s) => s === 0 ? 7 : s;
|
|
2359
|
-
switch (
|
|
2374
|
+
switch (t) {
|
|
2360
2375
|
// 2
|
|
2361
2376
|
case "i":
|
|
2362
2377
|
case "ii":
|
|
2363
|
-
return
|
|
2378
|
+
return b(t.length, e);
|
|
2364
2379
|
// 2nd
|
|
2365
2380
|
case "io":
|
|
2366
|
-
return n.ordinalNumber(
|
|
2381
|
+
return n.ordinalNumber(e, { unit: "day" });
|
|
2367
2382
|
// Tue
|
|
2368
2383
|
case "iii":
|
|
2369
2384
|
return M(
|
|
2370
|
-
n.day(
|
|
2385
|
+
n.day(e, {
|
|
2371
2386
|
width: "abbreviated",
|
|
2372
2387
|
context: "formatting"
|
|
2373
|
-
}) || n.day(
|
|
2388
|
+
}) || n.day(e, {
|
|
2374
2389
|
width: "short",
|
|
2375
2390
|
context: "formatting"
|
|
2376
|
-
}) || n.day(
|
|
2391
|
+
}) || n.day(e, {
|
|
2377
2392
|
width: "narrow",
|
|
2378
2393
|
context: "formatting"
|
|
2379
2394
|
}),
|
|
@@ -2382,7 +2397,7 @@ class ze extends l {
|
|
|
2382
2397
|
// T
|
|
2383
2398
|
case "iiiii":
|
|
2384
2399
|
return M(
|
|
2385
|
-
n.day(
|
|
2400
|
+
n.day(e, {
|
|
2386
2401
|
width: "narrow",
|
|
2387
2402
|
context: "formatting"
|
|
2388
2403
|
}),
|
|
@@ -2391,10 +2406,10 @@ class ze extends l {
|
|
|
2391
2406
|
// Tu
|
|
2392
2407
|
case "iiiiii":
|
|
2393
2408
|
return M(
|
|
2394
|
-
n.day(
|
|
2409
|
+
n.day(e, {
|
|
2395
2410
|
width: "short",
|
|
2396
2411
|
context: "formatting"
|
|
2397
|
-
}) || n.day(
|
|
2412
|
+
}) || n.day(e, {
|
|
2398
2413
|
width: "narrow",
|
|
2399
2414
|
context: "formatting"
|
|
2400
2415
|
}),
|
|
@@ -2404,16 +2419,16 @@ class ze extends l {
|
|
|
2404
2419
|
case "iiii":
|
|
2405
2420
|
default:
|
|
2406
2421
|
return M(
|
|
2407
|
-
n.day(
|
|
2422
|
+
n.day(e, {
|
|
2408
2423
|
width: "wide",
|
|
2409
2424
|
context: "formatting"
|
|
2410
|
-
}) || n.day(
|
|
2425
|
+
}) || n.day(e, {
|
|
2411
2426
|
width: "abbreviated",
|
|
2412
2427
|
context: "formatting"
|
|
2413
|
-
}) || n.day(
|
|
2428
|
+
}) || n.day(e, {
|
|
2414
2429
|
width: "short",
|
|
2415
2430
|
context: "formatting"
|
|
2416
|
-
}) || n.day(
|
|
2431
|
+
}) || n.day(e, {
|
|
2417
2432
|
width: "narrow",
|
|
2418
2433
|
context: "formatting"
|
|
2419
2434
|
}),
|
|
@@ -2421,11 +2436,11 @@ class ze extends l {
|
|
|
2421
2436
|
);
|
|
2422
2437
|
}
|
|
2423
2438
|
}
|
|
2424
|
-
validate(
|
|
2425
|
-
return
|
|
2439
|
+
validate(e, t) {
|
|
2440
|
+
return t >= 1 && t <= 7;
|
|
2426
2441
|
}
|
|
2427
|
-
set(
|
|
2428
|
-
return
|
|
2442
|
+
set(e, t, n) {
|
|
2443
|
+
return e = Vt(e, n), e.setHours(0, 0, 0, 0), e;
|
|
2429
2444
|
}
|
|
2430
2445
|
incompatibleTokens = [
|
|
2431
2446
|
"y",
|
|
@@ -2445,366 +2460,366 @@ class ze extends l {
|
|
|
2445
2460
|
"T"
|
|
2446
2461
|
];
|
|
2447
2462
|
}
|
|
2448
|
-
class
|
|
2463
|
+
class Jt extends l {
|
|
2449
2464
|
priority = 80;
|
|
2450
|
-
parse(
|
|
2451
|
-
switch (
|
|
2465
|
+
parse(e, t, n) {
|
|
2466
|
+
switch (t) {
|
|
2452
2467
|
case "a":
|
|
2453
2468
|
case "aa":
|
|
2454
2469
|
case "aaa":
|
|
2455
|
-
return n.dayPeriod(
|
|
2470
|
+
return n.dayPeriod(e, {
|
|
2456
2471
|
width: "abbreviated",
|
|
2457
2472
|
context: "formatting"
|
|
2458
|
-
}) || n.dayPeriod(
|
|
2473
|
+
}) || n.dayPeriod(e, {
|
|
2459
2474
|
width: "narrow",
|
|
2460
2475
|
context: "formatting"
|
|
2461
2476
|
});
|
|
2462
2477
|
case "aaaaa":
|
|
2463
|
-
return n.dayPeriod(
|
|
2478
|
+
return n.dayPeriod(e, {
|
|
2464
2479
|
width: "narrow",
|
|
2465
2480
|
context: "formatting"
|
|
2466
2481
|
});
|
|
2467
2482
|
case "aaaa":
|
|
2468
2483
|
default:
|
|
2469
|
-
return n.dayPeriod(
|
|
2484
|
+
return n.dayPeriod(e, {
|
|
2470
2485
|
width: "wide",
|
|
2471
2486
|
context: "formatting"
|
|
2472
|
-
}) || n.dayPeriod(
|
|
2487
|
+
}) || n.dayPeriod(e, {
|
|
2473
2488
|
width: "abbreviated",
|
|
2474
2489
|
context: "formatting"
|
|
2475
|
-
}) || n.dayPeriod(
|
|
2490
|
+
}) || n.dayPeriod(e, {
|
|
2476
2491
|
width: "narrow",
|
|
2477
2492
|
context: "formatting"
|
|
2478
2493
|
});
|
|
2479
2494
|
}
|
|
2480
2495
|
}
|
|
2481
|
-
set(
|
|
2482
|
-
return
|
|
2496
|
+
set(e, t, n) {
|
|
2497
|
+
return e.setHours(z(n), 0, 0, 0), e;
|
|
2483
2498
|
}
|
|
2484
2499
|
incompatibleTokens = ["b", "B", "H", "k", "t", "T"];
|
|
2485
2500
|
}
|
|
2486
|
-
class
|
|
2501
|
+
class Kt extends l {
|
|
2487
2502
|
priority = 80;
|
|
2488
|
-
parse(
|
|
2489
|
-
switch (
|
|
2503
|
+
parse(e, t, n) {
|
|
2504
|
+
switch (t) {
|
|
2490
2505
|
case "b":
|
|
2491
2506
|
case "bb":
|
|
2492
2507
|
case "bbb":
|
|
2493
|
-
return n.dayPeriod(
|
|
2508
|
+
return n.dayPeriod(e, {
|
|
2494
2509
|
width: "abbreviated",
|
|
2495
2510
|
context: "formatting"
|
|
2496
|
-
}) || n.dayPeriod(
|
|
2511
|
+
}) || n.dayPeriod(e, {
|
|
2497
2512
|
width: "narrow",
|
|
2498
2513
|
context: "formatting"
|
|
2499
2514
|
});
|
|
2500
2515
|
case "bbbbb":
|
|
2501
|
-
return n.dayPeriod(
|
|
2516
|
+
return n.dayPeriod(e, {
|
|
2502
2517
|
width: "narrow",
|
|
2503
2518
|
context: "formatting"
|
|
2504
2519
|
});
|
|
2505
2520
|
case "bbbb":
|
|
2506
2521
|
default:
|
|
2507
|
-
return n.dayPeriod(
|
|
2522
|
+
return n.dayPeriod(e, {
|
|
2508
2523
|
width: "wide",
|
|
2509
2524
|
context: "formatting"
|
|
2510
|
-
}) || n.dayPeriod(
|
|
2525
|
+
}) || n.dayPeriod(e, {
|
|
2511
2526
|
width: "abbreviated",
|
|
2512
2527
|
context: "formatting"
|
|
2513
|
-
}) || n.dayPeriod(
|
|
2528
|
+
}) || n.dayPeriod(e, {
|
|
2514
2529
|
width: "narrow",
|
|
2515
2530
|
context: "formatting"
|
|
2516
2531
|
});
|
|
2517
2532
|
}
|
|
2518
2533
|
}
|
|
2519
|
-
set(
|
|
2520
|
-
return
|
|
2534
|
+
set(e, t, n) {
|
|
2535
|
+
return e.setHours(z(n), 0, 0, 0), e;
|
|
2521
2536
|
}
|
|
2522
2537
|
incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
|
|
2523
2538
|
}
|
|
2524
|
-
class
|
|
2539
|
+
class Zt extends l {
|
|
2525
2540
|
priority = 80;
|
|
2526
|
-
parse(
|
|
2527
|
-
switch (
|
|
2541
|
+
parse(e, t, n) {
|
|
2542
|
+
switch (t) {
|
|
2528
2543
|
case "B":
|
|
2529
2544
|
case "BB":
|
|
2530
2545
|
case "BBB":
|
|
2531
|
-
return n.dayPeriod(
|
|
2546
|
+
return n.dayPeriod(e, {
|
|
2532
2547
|
width: "abbreviated",
|
|
2533
2548
|
context: "formatting"
|
|
2534
|
-
}) || n.dayPeriod(
|
|
2549
|
+
}) || n.dayPeriod(e, {
|
|
2535
2550
|
width: "narrow",
|
|
2536
2551
|
context: "formatting"
|
|
2537
2552
|
});
|
|
2538
2553
|
case "BBBBB":
|
|
2539
|
-
return n.dayPeriod(
|
|
2554
|
+
return n.dayPeriod(e, {
|
|
2540
2555
|
width: "narrow",
|
|
2541
2556
|
context: "formatting"
|
|
2542
2557
|
});
|
|
2543
2558
|
case "BBBB":
|
|
2544
2559
|
default:
|
|
2545
|
-
return n.dayPeriod(
|
|
2560
|
+
return n.dayPeriod(e, {
|
|
2546
2561
|
width: "wide",
|
|
2547
2562
|
context: "formatting"
|
|
2548
|
-
}) || n.dayPeriod(
|
|
2563
|
+
}) || n.dayPeriod(e, {
|
|
2549
2564
|
width: "abbreviated",
|
|
2550
2565
|
context: "formatting"
|
|
2551
|
-
}) || n.dayPeriod(
|
|
2566
|
+
}) || n.dayPeriod(e, {
|
|
2552
2567
|
width: "narrow",
|
|
2553
2568
|
context: "formatting"
|
|
2554
2569
|
});
|
|
2555
2570
|
}
|
|
2556
2571
|
}
|
|
2557
|
-
set(
|
|
2558
|
-
return
|
|
2572
|
+
set(e, t, n) {
|
|
2573
|
+
return e.setHours(z(n), 0, 0, 0), e;
|
|
2559
2574
|
}
|
|
2560
2575
|
incompatibleTokens = ["a", "b", "t", "T"];
|
|
2561
2576
|
}
|
|
2562
|
-
class
|
|
2577
|
+
class Ut extends l {
|
|
2563
2578
|
priority = 70;
|
|
2564
|
-
parse(
|
|
2565
|
-
switch (
|
|
2579
|
+
parse(e, t, n) {
|
|
2580
|
+
switch (t) {
|
|
2566
2581
|
case "h":
|
|
2567
|
-
return y(x.hour12h,
|
|
2582
|
+
return y(x.hour12h, e);
|
|
2568
2583
|
case "ho":
|
|
2569
|
-
return n.ordinalNumber(
|
|
2584
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
2570
2585
|
default:
|
|
2571
|
-
return
|
|
2586
|
+
return b(t.length, e);
|
|
2572
2587
|
}
|
|
2573
2588
|
}
|
|
2574
|
-
validate(
|
|
2575
|
-
return
|
|
2589
|
+
validate(e, t) {
|
|
2590
|
+
return t >= 1 && t <= 12;
|
|
2576
2591
|
}
|
|
2577
|
-
set(
|
|
2578
|
-
const a =
|
|
2579
|
-
return a && n < 12 ?
|
|
2592
|
+
set(e, t, n) {
|
|
2593
|
+
const a = e.getHours() >= 12;
|
|
2594
|
+
return a && n < 12 ? e.setHours(n + 12, 0, 0, 0) : !a && n === 12 ? e.setHours(0, 0, 0, 0) : e.setHours(n, 0, 0, 0), e;
|
|
2580
2595
|
}
|
|
2581
2596
|
incompatibleTokens = ["H", "K", "k", "t", "T"];
|
|
2582
2597
|
}
|
|
2583
|
-
class
|
|
2598
|
+
class St extends l {
|
|
2584
2599
|
priority = 70;
|
|
2585
|
-
parse(
|
|
2586
|
-
switch (
|
|
2600
|
+
parse(e, t, n) {
|
|
2601
|
+
switch (t) {
|
|
2587
2602
|
case "H":
|
|
2588
|
-
return y(x.hour23h,
|
|
2603
|
+
return y(x.hour23h, e);
|
|
2589
2604
|
case "Ho":
|
|
2590
|
-
return n.ordinalNumber(
|
|
2605
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
2591
2606
|
default:
|
|
2592
|
-
return
|
|
2607
|
+
return b(t.length, e);
|
|
2593
2608
|
}
|
|
2594
2609
|
}
|
|
2595
|
-
validate(
|
|
2596
|
-
return
|
|
2610
|
+
validate(e, t) {
|
|
2611
|
+
return t >= 0 && t <= 23;
|
|
2597
2612
|
}
|
|
2598
|
-
set(
|
|
2599
|
-
return
|
|
2613
|
+
set(e, t, n) {
|
|
2614
|
+
return e.setHours(n, 0, 0, 0), e;
|
|
2600
2615
|
}
|
|
2601
2616
|
incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"];
|
|
2602
2617
|
}
|
|
2603
|
-
class
|
|
2618
|
+
class en extends l {
|
|
2604
2619
|
priority = 70;
|
|
2605
|
-
parse(
|
|
2606
|
-
switch (
|
|
2620
|
+
parse(e, t, n) {
|
|
2621
|
+
switch (t) {
|
|
2607
2622
|
case "K":
|
|
2608
|
-
return y(x.hour11h,
|
|
2623
|
+
return y(x.hour11h, e);
|
|
2609
2624
|
case "Ko":
|
|
2610
|
-
return n.ordinalNumber(
|
|
2625
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
2611
2626
|
default:
|
|
2612
|
-
return
|
|
2627
|
+
return b(t.length, e);
|
|
2613
2628
|
}
|
|
2614
2629
|
}
|
|
2615
|
-
validate(
|
|
2616
|
-
return
|
|
2630
|
+
validate(e, t) {
|
|
2631
|
+
return t >= 0 && t <= 11;
|
|
2617
2632
|
}
|
|
2618
|
-
set(
|
|
2619
|
-
return
|
|
2633
|
+
set(e, t, n) {
|
|
2634
|
+
return e.getHours() >= 12 && n < 12 ? e.setHours(n + 12, 0, 0, 0) : e.setHours(n, 0, 0, 0), e;
|
|
2620
2635
|
}
|
|
2621
2636
|
incompatibleTokens = ["h", "H", "k", "t", "T"];
|
|
2622
2637
|
}
|
|
2623
|
-
class
|
|
2638
|
+
class tn extends l {
|
|
2624
2639
|
priority = 70;
|
|
2625
|
-
parse(
|
|
2626
|
-
switch (
|
|
2640
|
+
parse(e, t, n) {
|
|
2641
|
+
switch (t) {
|
|
2627
2642
|
case "k":
|
|
2628
|
-
return y(x.hour24h,
|
|
2643
|
+
return y(x.hour24h, e);
|
|
2629
2644
|
case "ko":
|
|
2630
|
-
return n.ordinalNumber(
|
|
2645
|
+
return n.ordinalNumber(e, { unit: "hour" });
|
|
2631
2646
|
default:
|
|
2632
|
-
return
|
|
2647
|
+
return b(t.length, e);
|
|
2633
2648
|
}
|
|
2634
2649
|
}
|
|
2635
|
-
validate(
|
|
2636
|
-
return
|
|
2650
|
+
validate(e, t) {
|
|
2651
|
+
return t >= 1 && t <= 24;
|
|
2637
2652
|
}
|
|
2638
|
-
set(
|
|
2653
|
+
set(e, t, n) {
|
|
2639
2654
|
const a = n <= 24 ? n % 24 : n;
|
|
2640
|
-
return
|
|
2655
|
+
return e.setHours(a, 0, 0, 0), e;
|
|
2641
2656
|
}
|
|
2642
2657
|
incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"];
|
|
2643
2658
|
}
|
|
2644
2659
|
class nn extends l {
|
|
2645
2660
|
priority = 60;
|
|
2646
|
-
parse(
|
|
2647
|
-
switch (
|
|
2661
|
+
parse(e, t, n) {
|
|
2662
|
+
switch (t) {
|
|
2648
2663
|
case "m":
|
|
2649
|
-
return y(x.minute,
|
|
2664
|
+
return y(x.minute, e);
|
|
2650
2665
|
case "mo":
|
|
2651
|
-
return n.ordinalNumber(
|
|
2666
|
+
return n.ordinalNumber(e, { unit: "minute" });
|
|
2652
2667
|
default:
|
|
2653
|
-
return
|
|
2668
|
+
return b(t.length, e);
|
|
2654
2669
|
}
|
|
2655
2670
|
}
|
|
2656
|
-
validate(
|
|
2657
|
-
return
|
|
2671
|
+
validate(e, t) {
|
|
2672
|
+
return t >= 0 && t <= 59;
|
|
2658
2673
|
}
|
|
2659
|
-
set(
|
|
2660
|
-
return
|
|
2674
|
+
set(e, t, n) {
|
|
2675
|
+
return e.setMinutes(n, 0, 0), e;
|
|
2661
2676
|
}
|
|
2662
2677
|
incompatibleTokens = ["t", "T"];
|
|
2663
2678
|
}
|
|
2664
2679
|
class rn extends l {
|
|
2665
2680
|
priority = 50;
|
|
2666
|
-
parse(
|
|
2667
|
-
switch (
|
|
2681
|
+
parse(e, t, n) {
|
|
2682
|
+
switch (t) {
|
|
2668
2683
|
case "s":
|
|
2669
|
-
return y(x.second,
|
|
2684
|
+
return y(x.second, e);
|
|
2670
2685
|
case "so":
|
|
2671
|
-
return n.ordinalNumber(
|
|
2686
|
+
return n.ordinalNumber(e, { unit: "second" });
|
|
2672
2687
|
default:
|
|
2673
|
-
return
|
|
2688
|
+
return b(t.length, e);
|
|
2674
2689
|
}
|
|
2675
2690
|
}
|
|
2676
|
-
validate(
|
|
2677
|
-
return
|
|
2691
|
+
validate(e, t) {
|
|
2692
|
+
return t >= 0 && t <= 59;
|
|
2678
2693
|
}
|
|
2679
|
-
set(
|
|
2680
|
-
return
|
|
2694
|
+
set(e, t, n) {
|
|
2695
|
+
return e.setSeconds(n, 0), e;
|
|
2681
2696
|
}
|
|
2682
2697
|
incompatibleTokens = ["t", "T"];
|
|
2683
2698
|
}
|
|
2684
2699
|
class an extends l {
|
|
2685
2700
|
priority = 30;
|
|
2686
|
-
parse(
|
|
2687
|
-
const n = (a) => Math.trunc(a * Math.pow(10, -
|
|
2688
|
-
return M(
|
|
2701
|
+
parse(e, t) {
|
|
2702
|
+
const n = (a) => Math.trunc(a * Math.pow(10, -t.length + 3));
|
|
2703
|
+
return M(b(t.length, e), n);
|
|
2689
2704
|
}
|
|
2690
|
-
set(
|
|
2691
|
-
return
|
|
2705
|
+
set(e, t, n) {
|
|
2706
|
+
return e.setMilliseconds(n), e;
|
|
2692
2707
|
}
|
|
2693
2708
|
incompatibleTokens = ["t", "T"];
|
|
2694
2709
|
}
|
|
2695
2710
|
class sn extends l {
|
|
2696
2711
|
priority = 10;
|
|
2697
|
-
parse(
|
|
2698
|
-
switch (
|
|
2712
|
+
parse(e, t) {
|
|
2713
|
+
switch (t) {
|
|
2699
2714
|
case "X":
|
|
2700
|
-
return
|
|
2701
|
-
|
|
2702
|
-
|
|
2715
|
+
return T(
|
|
2716
|
+
P.basicOptionalMinutes,
|
|
2717
|
+
e
|
|
2703
2718
|
);
|
|
2704
2719
|
case "XX":
|
|
2705
|
-
return
|
|
2720
|
+
return T(P.basic, e);
|
|
2706
2721
|
case "XXXX":
|
|
2707
|
-
return
|
|
2708
|
-
|
|
2709
|
-
|
|
2722
|
+
return T(
|
|
2723
|
+
P.basicOptionalSeconds,
|
|
2724
|
+
e
|
|
2710
2725
|
);
|
|
2711
2726
|
case "XXXXX":
|
|
2712
|
-
return
|
|
2713
|
-
|
|
2714
|
-
|
|
2727
|
+
return T(
|
|
2728
|
+
P.extendedOptionalSeconds,
|
|
2729
|
+
e
|
|
2715
2730
|
);
|
|
2716
2731
|
case "XXX":
|
|
2717
2732
|
default:
|
|
2718
|
-
return
|
|
2733
|
+
return T(P.extended, e);
|
|
2719
2734
|
}
|
|
2720
2735
|
}
|
|
2721
|
-
set(
|
|
2722
|
-
return
|
|
2723
|
-
|
|
2724
|
-
|
|
2736
|
+
set(e, t, n) {
|
|
2737
|
+
return t.timestampIsSet ? e : h(
|
|
2738
|
+
e,
|
|
2739
|
+
e.getTime() - L(e) - n
|
|
2725
2740
|
);
|
|
2726
2741
|
}
|
|
2727
2742
|
incompatibleTokens = ["t", "T", "x"];
|
|
2728
2743
|
}
|
|
2729
2744
|
class on extends l {
|
|
2730
2745
|
priority = 10;
|
|
2731
|
-
parse(
|
|
2732
|
-
switch (
|
|
2746
|
+
parse(e, t) {
|
|
2747
|
+
switch (t) {
|
|
2733
2748
|
case "x":
|
|
2734
|
-
return
|
|
2735
|
-
|
|
2736
|
-
|
|
2749
|
+
return T(
|
|
2750
|
+
P.basicOptionalMinutes,
|
|
2751
|
+
e
|
|
2737
2752
|
);
|
|
2738
2753
|
case "xx":
|
|
2739
|
-
return
|
|
2754
|
+
return T(P.basic, e);
|
|
2740
2755
|
case "xxxx":
|
|
2741
|
-
return
|
|
2742
|
-
|
|
2743
|
-
|
|
2756
|
+
return T(
|
|
2757
|
+
P.basicOptionalSeconds,
|
|
2758
|
+
e
|
|
2744
2759
|
);
|
|
2745
2760
|
case "xxxxx":
|
|
2746
|
-
return
|
|
2747
|
-
|
|
2748
|
-
|
|
2761
|
+
return T(
|
|
2762
|
+
P.extendedOptionalSeconds,
|
|
2763
|
+
e
|
|
2749
2764
|
);
|
|
2750
2765
|
case "xxx":
|
|
2751
2766
|
default:
|
|
2752
|
-
return
|
|
2767
|
+
return T(P.extended, e);
|
|
2753
2768
|
}
|
|
2754
2769
|
}
|
|
2755
|
-
set(
|
|
2756
|
-
return
|
|
2757
|
-
|
|
2758
|
-
|
|
2770
|
+
set(e, t, n) {
|
|
2771
|
+
return t.timestampIsSet ? e : h(
|
|
2772
|
+
e,
|
|
2773
|
+
e.getTime() - L(e) - n
|
|
2759
2774
|
);
|
|
2760
2775
|
}
|
|
2761
2776
|
incompatibleTokens = ["t", "T", "X"];
|
|
2762
2777
|
}
|
|
2763
2778
|
class un extends l {
|
|
2764
2779
|
priority = 40;
|
|
2765
|
-
parse(
|
|
2766
|
-
return
|
|
2780
|
+
parse(e) {
|
|
2781
|
+
return we(e);
|
|
2767
2782
|
}
|
|
2768
|
-
set(
|
|
2769
|
-
return [
|
|
2783
|
+
set(e, t, n) {
|
|
2784
|
+
return [h(e, n * 1e3), { timestampIsSet: !0 }];
|
|
2770
2785
|
}
|
|
2771
2786
|
incompatibleTokens = "*";
|
|
2772
2787
|
}
|
|
2773
2788
|
class cn extends l {
|
|
2774
2789
|
priority = 20;
|
|
2775
|
-
parse(
|
|
2776
|
-
return
|
|
2790
|
+
parse(e) {
|
|
2791
|
+
return we(e);
|
|
2777
2792
|
}
|
|
2778
|
-
set(
|
|
2779
|
-
return [
|
|
2793
|
+
set(e, t, n) {
|
|
2794
|
+
return [h(e, n), { timestampIsSet: !0 }];
|
|
2780
2795
|
}
|
|
2781
2796
|
incompatibleTokens = "*";
|
|
2782
2797
|
}
|
|
2783
2798
|
const dn = {
|
|
2784
|
-
G: new
|
|
2785
|
-
y: new
|
|
2786
|
-
Y: new
|
|
2787
|
-
R: new
|
|
2788
|
-
u: new
|
|
2789
|
-
Q: new
|
|
2790
|
-
q: new
|
|
2791
|
-
M: new
|
|
2792
|
-
L: new
|
|
2793
|
-
w: new
|
|
2794
|
-
I: new
|
|
2795
|
-
d: new
|
|
2796
|
-
D: new
|
|
2797
|
-
E: new
|
|
2798
|
-
e: new
|
|
2799
|
-
c: new $
|
|
2800
|
-
i: new
|
|
2801
|
-
a: new
|
|
2802
|
-
b: new
|
|
2803
|
-
B: new
|
|
2804
|
-
h: new
|
|
2805
|
-
H: new
|
|
2806
|
-
K: new
|
|
2807
|
-
k: new
|
|
2799
|
+
G: new Yt(),
|
|
2800
|
+
y: new _t(),
|
|
2801
|
+
Y: new Wt(),
|
|
2802
|
+
R: new vt(),
|
|
2803
|
+
u: new Et(),
|
|
2804
|
+
Q: new Ht(),
|
|
2805
|
+
q: new qt(),
|
|
2806
|
+
M: new Nt(),
|
|
2807
|
+
L: new Ft(),
|
|
2808
|
+
w: new Ct(),
|
|
2809
|
+
I: new Lt(),
|
|
2810
|
+
d: new Xt(),
|
|
2811
|
+
D: new Bt(),
|
|
2812
|
+
E: new Gt(),
|
|
2813
|
+
e: new jt(),
|
|
2814
|
+
c: new $t(),
|
|
2815
|
+
i: new zt(),
|
|
2816
|
+
a: new Jt(),
|
|
2817
|
+
b: new Kt(),
|
|
2818
|
+
B: new Zt(),
|
|
2819
|
+
h: new Ut(),
|
|
2820
|
+
H: new St(),
|
|
2821
|
+
K: new en(),
|
|
2822
|
+
k: new tn(),
|
|
2808
2823
|
m: new nn(),
|
|
2809
2824
|
s: new rn(),
|
|
2810
2825
|
S: new an(),
|
|
@@ -2813,177 +2828,181 @@ const dn = {
|
|
|
2813
2828
|
t: new un(),
|
|
2814
2829
|
T: new cn()
|
|
2815
2830
|
}, ln = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, fn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, hn = /^'([^]*?)'?$/, mn = /''/g, wn = /\S/, yn = /[a-zA-Z]/;
|
|
2816
|
-
function An(r,
|
|
2817
|
-
const a =
|
|
2818
|
-
if (
|
|
2819
|
-
return r
|
|
2820
|
-
const
|
|
2821
|
-
firstWeekContainsDate:
|
|
2822
|
-
weekStartsOn:
|
|
2823
|
-
locale:
|
|
2824
|
-
},
|
|
2825
|
-
const
|
|
2826
|
-
if (
|
|
2827
|
-
const
|
|
2828
|
-
return
|
|
2831
|
+
function An(r, e, t, n) {
|
|
2832
|
+
const a = () => h(n?.in || t, NaN), s = xt(), o = n?.locale ?? s.locale ?? ue, u = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? s.firstWeekContainsDate ?? s.locale?.options?.firstWeekContainsDate ?? 1, d = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? s.weekStartsOn ?? s.locale?.options?.weekStartsOn ?? 0;
|
|
2833
|
+
if (!e)
|
|
2834
|
+
return r ? a() : i(t, n?.in);
|
|
2835
|
+
const p = {
|
|
2836
|
+
firstWeekContainsDate: u,
|
|
2837
|
+
weekStartsOn: d,
|
|
2838
|
+
locale: o
|
|
2839
|
+
}, m = [new Ot(n?.in, t)], w = e.match(fn).map((c) => {
|
|
2840
|
+
const g = c[0];
|
|
2841
|
+
if (g in j) {
|
|
2842
|
+
const k = j[g];
|
|
2843
|
+
return k(c, o.formatLong);
|
|
2829
2844
|
}
|
|
2830
2845
|
return c;
|
|
2831
|
-
}).join("").match(ln),
|
|
2846
|
+
}).join("").match(ln), D = [];
|
|
2832
2847
|
for (let c of w) {
|
|
2833
|
-
!n?.useAdditionalWeekYearTokens &&
|
|
2834
|
-
const
|
|
2835
|
-
if (
|
|
2836
|
-
const { incompatibleTokens:
|
|
2837
|
-
if (Array.isArray(
|
|
2838
|
-
const
|
|
2839
|
-
(
|
|
2848
|
+
!n?.useAdditionalWeekYearTokens && he(c) && $(c, e, r), !n?.useAdditionalDayOfYearTokens && fe(c) && $(c, e, r);
|
|
2849
|
+
const g = c[0], k = dn[g];
|
|
2850
|
+
if (k) {
|
|
2851
|
+
const { incompatibleTokens: K } = k;
|
|
2852
|
+
if (Array.isArray(K)) {
|
|
2853
|
+
const Z = D.find(
|
|
2854
|
+
(U) => K.includes(U.token) || U.token === g
|
|
2840
2855
|
);
|
|
2841
|
-
if (
|
|
2856
|
+
if (Z)
|
|
2842
2857
|
throw new RangeError(
|
|
2843
|
-
`The format string mustn't contain \`${
|
|
2858
|
+
`The format string mustn't contain \`${Z.fullToken}\` and \`${c}\` at the same time`
|
|
2844
2859
|
);
|
|
2845
|
-
} else if (
|
|
2860
|
+
} else if (k.incompatibleTokens === "*" && D.length > 0)
|
|
2846
2861
|
throw new RangeError(
|
|
2847
2862
|
`The format string mustn't contain \`${c}\` and any other token at the same time`
|
|
2848
2863
|
);
|
|
2849
|
-
|
|
2850
|
-
const
|
|
2864
|
+
D.push({ token: g, fullToken: c });
|
|
2865
|
+
const B = k.run(
|
|
2851
2866
|
r,
|
|
2852
2867
|
c,
|
|
2853
|
-
|
|
2854
|
-
|
|
2868
|
+
o.match,
|
|
2869
|
+
p
|
|
2855
2870
|
);
|
|
2856
|
-
if (!
|
|
2857
|
-
return
|
|
2858
|
-
|
|
2871
|
+
if (!B)
|
|
2872
|
+
return a();
|
|
2873
|
+
m.push(B.setter), r = B.rest;
|
|
2859
2874
|
} else {
|
|
2860
|
-
if (
|
|
2875
|
+
if (g.match(yn))
|
|
2861
2876
|
throw new RangeError(
|
|
2862
|
-
"Format string contains an unescaped latin alphabet character `" +
|
|
2877
|
+
"Format string contains an unescaped latin alphabet character `" + g + "`"
|
|
2863
2878
|
);
|
|
2864
|
-
if (c === "''" ? c = "'" :
|
|
2879
|
+
if (c === "''" ? c = "'" : g === "'" && (c = gn(c)), r.indexOf(c) === 0)
|
|
2865
2880
|
r = r.slice(c.length);
|
|
2866
2881
|
else
|
|
2867
|
-
return
|
|
2882
|
+
return a();
|
|
2868
2883
|
}
|
|
2869
2884
|
}
|
|
2870
2885
|
if (r.length > 0 && wn.test(r))
|
|
2871
|
-
return
|
|
2872
|
-
const
|
|
2873
|
-
(c) =>
|
|
2886
|
+
return a();
|
|
2887
|
+
const C = m.map((c) => c.priority).sort((c, g) => g - c).filter((c, g, k) => k.indexOf(c) === g).map(
|
|
2888
|
+
(c) => m.filter((g) => g.priority === c).sort((g, k) => k.subPriority - g.subPriority)
|
|
2874
2889
|
).map((c) => c[0]);
|
|
2875
|
-
let
|
|
2876
|
-
if (isNaN(
|
|
2877
|
-
|
|
2878
|
-
const
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
return d(e, P);
|
|
2890
|
+
let O = i(t, n?.in);
|
|
2891
|
+
if (isNaN(+O)) return a();
|
|
2892
|
+
const Q = {};
|
|
2893
|
+
for (const c of C) {
|
|
2894
|
+
if (!c.validate(O, p))
|
|
2895
|
+
return a();
|
|
2896
|
+
const g = c.set(O, Q, p);
|
|
2897
|
+
Array.isArray(g) ? (O = g[0], Object.assign(Q, g[1])) : O = g;
|
|
2898
|
+
}
|
|
2899
|
+
return O;
|
|
2886
2900
|
}
|
|
2887
2901
|
function gn(r) {
|
|
2888
2902
|
return r.match(hn)[1].replace(mn, "'");
|
|
2889
2903
|
}
|
|
2890
|
-
function Xn(r, t) {
|
|
2891
|
-
const
|
|
2892
|
-
|
|
2904
|
+
function Xn(r, e, t) {
|
|
2905
|
+
const [n, a] = I(
|
|
2906
|
+
t?.in,
|
|
2907
|
+
r,
|
|
2908
|
+
e
|
|
2909
|
+
);
|
|
2910
|
+
return +H(n) == +H(a);
|
|
2893
2911
|
}
|
|
2894
|
-
function bn(r, t) {
|
|
2895
|
-
return
|
|
2912
|
+
function bn(r, e, t) {
|
|
2913
|
+
return A(r, -e, t);
|
|
2896
2914
|
}
|
|
2897
|
-
function pn(r, t) {
|
|
2898
|
-
const
|
|
2899
|
-
|
|
2900
|
-
const
|
|
2901
|
-
return
|
|
2915
|
+
function pn(r, e, t) {
|
|
2916
|
+
const n = i(r, t?.in), a = n.getFullYear(), s = n.getDate(), o = h(r, 0);
|
|
2917
|
+
o.setFullYear(a, e, 15), o.setHours(0, 0, 0, 0);
|
|
2918
|
+
const u = pt(o);
|
|
2919
|
+
return n.setMonth(e, Math.min(s, u)), n;
|
|
2902
2920
|
}
|
|
2903
|
-
function Bn(r, t) {
|
|
2904
|
-
let
|
|
2905
|
-
return isNaN(+
|
|
2921
|
+
function Bn(r, e, t) {
|
|
2922
|
+
let n = i(r, t?.in);
|
|
2923
|
+
return isNaN(+n) ? h(r, NaN) : (e.year != null && n.setFullYear(e.year), e.month != null && (n = pn(n, e.month)), e.date != null && n.setDate(e.date), e.hours != null && n.setHours(e.hours), e.minutes != null && n.setMinutes(e.minutes), e.seconds != null && n.setSeconds(e.seconds), e.milliseconds != null && n.setMilliseconds(e.milliseconds), n);
|
|
2906
2924
|
}
|
|
2907
|
-
function Gn(r, t) {
|
|
2908
|
-
const
|
|
2909
|
-
return
|
|
2925
|
+
function Gn(r, e, t) {
|
|
2926
|
+
const n = i(r, t?.in);
|
|
2927
|
+
return n.setHours(e), n;
|
|
2910
2928
|
}
|
|
2911
|
-
function jn(r, t) {
|
|
2912
|
-
const
|
|
2913
|
-
return
|
|
2929
|
+
function jn(r, e, t) {
|
|
2930
|
+
const n = i(r, t?.in);
|
|
2931
|
+
return n.setMilliseconds(e), n;
|
|
2914
2932
|
}
|
|
2915
|
-
function $n(r, t) {
|
|
2916
|
-
const
|
|
2917
|
-
return
|
|
2933
|
+
function $n(r, e, t) {
|
|
2934
|
+
const n = i(r, t?.in);
|
|
2935
|
+
return n.setMinutes(e), n;
|
|
2918
2936
|
}
|
|
2919
|
-
function Vn(r, t) {
|
|
2920
|
-
const
|
|
2921
|
-
return
|
|
2937
|
+
function Vn(r, e, t) {
|
|
2938
|
+
const n = i(r, t?.in);
|
|
2939
|
+
return n.setSeconds(e), n;
|
|
2922
2940
|
}
|
|
2923
|
-
function zn(r, t) {
|
|
2924
|
-
const
|
|
2925
|
-
return isNaN(+
|
|
2941
|
+
function zn(r, e, t) {
|
|
2942
|
+
const n = i(r, t?.in);
|
|
2943
|
+
return isNaN(+n) ? h(r, NaN) : (n.setFullYear(e), n);
|
|
2926
2944
|
}
|
|
2927
|
-
function xn(r, t) {
|
|
2928
|
-
return
|
|
2945
|
+
function xn(r, e, t) {
|
|
2946
|
+
return X(r, -e, t);
|
|
2929
2947
|
}
|
|
2930
|
-
function Jn(r, t) {
|
|
2948
|
+
function Jn(r, e, t) {
|
|
2931
2949
|
const {
|
|
2932
|
-
years:
|
|
2933
|
-
months:
|
|
2934
|
-
weeks:
|
|
2935
|
-
days:
|
|
2936
|
-
hours:
|
|
2937
|
-
minutes:
|
|
2938
|
-
seconds:
|
|
2939
|
-
} =
|
|
2940
|
-
return
|
|
2941
|
-
}
|
|
2942
|
-
function Kn(r, t) {
|
|
2943
|
-
return
|
|
2950
|
+
years: n = 0,
|
|
2951
|
+
months: a = 0,
|
|
2952
|
+
weeks: s = 0,
|
|
2953
|
+
days: o = 0,
|
|
2954
|
+
hours: u = 0,
|
|
2955
|
+
minutes: d = 0,
|
|
2956
|
+
seconds: p = 0
|
|
2957
|
+
} = e, m = xn(r, a + n * 12, t), w = bn(m, o + s * 7, t), D = d + u * 60, O = (p + D * 60) * 1e3;
|
|
2958
|
+
return h(r, +w - O);
|
|
2959
|
+
}
|
|
2960
|
+
function Kn(r, e, t) {
|
|
2961
|
+
return ke(r, -e, t);
|
|
2944
2962
|
}
|
|
2945
2963
|
export {
|
|
2946
|
-
|
|
2964
|
+
X as A,
|
|
2947
2965
|
Yn as B,
|
|
2948
2966
|
jn as C,
|
|
2949
2967
|
Gn as D,
|
|
2950
2968
|
$n as E,
|
|
2951
2969
|
Vn as F,
|
|
2952
2970
|
pn as G,
|
|
2953
|
-
|
|
2971
|
+
kn as H,
|
|
2954
2972
|
xn as I,
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2973
|
+
A as J,
|
|
2974
|
+
de as K,
|
|
2975
|
+
ce as L,
|
|
2958
2976
|
Jn as M,
|
|
2959
|
-
|
|
2960
|
-
|
|
2977
|
+
Pe as N,
|
|
2978
|
+
ke as O,
|
|
2961
2979
|
Kn as P,
|
|
2962
|
-
|
|
2980
|
+
bn as Q,
|
|
2981
|
+
Pn as R,
|
|
2963
2982
|
Fn as a,
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2983
|
+
In as b,
|
|
2984
|
+
Nn as c,
|
|
2985
|
+
qn as d,
|
|
2986
|
+
Ln as e,
|
|
2987
|
+
En as f,
|
|
2969
2988
|
Cn as g,
|
|
2970
2989
|
Rn as h,
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2990
|
+
Qn as i,
|
|
2991
|
+
xe as j,
|
|
2992
|
+
Tn as k,
|
|
2993
|
+
Hn as l,
|
|
2975
2994
|
Dn as m,
|
|
2976
2995
|
zn as n,
|
|
2977
|
-
|
|
2996
|
+
Te as o,
|
|
2978
2997
|
_ as p,
|
|
2979
2998
|
Wn as q,
|
|
2980
2999
|
An as r,
|
|
2981
3000
|
Bn as s,
|
|
2982
|
-
|
|
3001
|
+
Ye as t,
|
|
2983
3002
|
Xn as u,
|
|
2984
3003
|
On as v,
|
|
2985
3004
|
_n as w,
|
|
2986
|
-
|
|
3005
|
+
H as x,
|
|
2987
3006
|
vn as y,
|
|
2988
3007
|
Mn as z
|
|
2989
3008
|
};
|