react-semaphor 0.1.178 → 0.1.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-controls-00cjSeD7.js → dashboard-controls-Baw7eUyM.js} +8 -8
- package/dist/chunks/{dashboard-controls-C9IWIFfW.js → dashboard-controls-CS3pAVZi.js} +473 -470
- package/dist/chunks/{dashboard-json--ke9XK9p.js → dashboard-json-ClalWYi4.js} +1 -1
- package/dist/chunks/{dashboard-json-BDjl-3ej.js → dashboard-json-Cz4bNnCC.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-BroCdmtP.js → edit-dashboard-visual-BMElXt-n.js} +30 -35
- package/dist/chunks/{edit-dashboard-visual-BBsC9feJ.js → edit-dashboard-visual-DFJ5FJ7y.js} +11 -22
- package/dist/chunks/editor-action-buttons-DVWnnC_r.js +11 -0
- package/dist/chunks/{editor-action-buttons-CHoiNw7F.js → editor-action-buttons-MtNYw1Bb.js} +57 -45
- package/dist/chunks/index-8Crk3ROJ.js +1 -0
- package/dist/chunks/index-B4EhQdS9.js +1857 -0
- package/dist/chunks/{index-DZjcALSv.js → index-CAeKp6K8.js} +23423 -24714
- package/dist/chunks/index-CfPKTeUk.js +1082 -0
- package/dist/chunks/notification-bell-2dZI5OV0.js +21 -0
- package/dist/chunks/notification-bell-YZ8VqdwA.js +870 -0
- package/dist/chunks/{resource-management-panel-C96ElLa5.js → resource-management-panel-Buhi-kvP.js} +1 -1
- package/dist/chunks/{resource-management-panel-DE8DnPSl.js → resource-management-panel-pxL28GXq.js} +133 -133
- package/dist/chunks/{use-role-aware-display-preferences-Dovp_VmV.js → use-role-aware-display-preferences-B_i2f9tn.js} +1 -1
- package/dist/chunks/{use-role-aware-display-preferences-Rd1BhDG4.js → use-role-aware-display-preferences-JljRcjrP.js} +1 -1
- package/dist/chunks/{use-visual-utils-BkRr5LoD.js → use-visual-utils-D3HjbsKO.js} +38 -38
- package/dist/chunks/{use-visual-utils-Cnju2tnE.js → use-visual-utils-DPEHcmFT.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/format-utils/index.cjs +5 -0
- package/dist/format-utils/index.js +451 -0
- package/dist/index.cjs +1 -6
- package/dist/index.js +133 -126
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/format-utils.d.ts +375 -0
- package/dist/types/main.d.ts +262 -0
- package/package.json +14 -1
- package/dist/chunks/editor-action-buttons-JE9t84-4.js +0 -6
- package/dist/chunks/index-CdfFCbJb.js +0 -1077
- package/dist/chunks/schedule-dashboard-BFa0Uljc.js +0 -416
- package/dist/chunks/schedule-dashboard-CzU0ziLB.js +0 -6
|
@@ -0,0 +1,1857 @@
|
|
|
1
|
+
const Ne = {
|
|
2
|
+
lessThanXSeconds: {
|
|
3
|
+
one: "less than a second",
|
|
4
|
+
other: "less than {{count}} seconds"
|
|
5
|
+
},
|
|
6
|
+
xSeconds: {
|
|
7
|
+
one: "1 second",
|
|
8
|
+
other: "{{count}} seconds"
|
|
9
|
+
},
|
|
10
|
+
halfAMinute: "half a minute",
|
|
11
|
+
lessThanXMinutes: {
|
|
12
|
+
one: "less than a minute",
|
|
13
|
+
other: "less than {{count}} minutes"
|
|
14
|
+
},
|
|
15
|
+
xMinutes: {
|
|
16
|
+
one: "1 minute",
|
|
17
|
+
other: "{{count}} minutes"
|
|
18
|
+
},
|
|
19
|
+
aboutXHours: {
|
|
20
|
+
one: "about 1 hour",
|
|
21
|
+
other: "about {{count}} hours"
|
|
22
|
+
},
|
|
23
|
+
xHours: {
|
|
24
|
+
one: "1 hour",
|
|
25
|
+
other: "{{count}} hours"
|
|
26
|
+
},
|
|
27
|
+
xDays: {
|
|
28
|
+
one: "1 day",
|
|
29
|
+
other: "{{count}} days"
|
|
30
|
+
},
|
|
31
|
+
aboutXWeeks: {
|
|
32
|
+
one: "about 1 week",
|
|
33
|
+
other: "about {{count}} weeks"
|
|
34
|
+
},
|
|
35
|
+
xWeeks: {
|
|
36
|
+
one: "1 week",
|
|
37
|
+
other: "{{count}} weeks"
|
|
38
|
+
},
|
|
39
|
+
aboutXMonths: {
|
|
40
|
+
one: "about 1 month",
|
|
41
|
+
other: "about {{count}} months"
|
|
42
|
+
},
|
|
43
|
+
xMonths: {
|
|
44
|
+
one: "1 month",
|
|
45
|
+
other: "{{count}} months"
|
|
46
|
+
},
|
|
47
|
+
aboutXYears: {
|
|
48
|
+
one: "about 1 year",
|
|
49
|
+
other: "about {{count}} years"
|
|
50
|
+
},
|
|
51
|
+
xYears: {
|
|
52
|
+
one: "1 year",
|
|
53
|
+
other: "{{count}} years"
|
|
54
|
+
},
|
|
55
|
+
overXYears: {
|
|
56
|
+
one: "over 1 year",
|
|
57
|
+
other: "over {{count}} years"
|
|
58
|
+
},
|
|
59
|
+
almostXYears: {
|
|
60
|
+
one: "almost 1 year",
|
|
61
|
+
other: "almost {{count}} years"
|
|
62
|
+
}
|
|
63
|
+
}, xe = (e, t, n) => {
|
|
64
|
+
let r;
|
|
65
|
+
const a = Ne[e];
|
|
66
|
+
return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
67
|
+
};
|
|
68
|
+
function _(e) {
|
|
69
|
+
return (t = {}) => {
|
|
70
|
+
const n = t.width ? String(t.width) : e.defaultWidth;
|
|
71
|
+
return e.formats[n] || e.formats[e.defaultWidth];
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
const Ye = {
|
|
75
|
+
full: "EEEE, MMMM do, y",
|
|
76
|
+
long: "MMMM do, y",
|
|
77
|
+
medium: "MMM d, y",
|
|
78
|
+
short: "MM/dd/yyyy"
|
|
79
|
+
}, pe = {
|
|
80
|
+
full: "h:mm:ss a zzzz",
|
|
81
|
+
long: "h:mm:ss a z",
|
|
82
|
+
medium: "h:mm:ss a",
|
|
83
|
+
short: "h:mm a"
|
|
84
|
+
}, Pe = {
|
|
85
|
+
full: "{{date}} 'at' {{time}}",
|
|
86
|
+
long: "{{date}} 'at' {{time}}",
|
|
87
|
+
medium: "{{date}}, {{time}}",
|
|
88
|
+
short: "{{date}}, {{time}}"
|
|
89
|
+
}, Se = {
|
|
90
|
+
date: _({
|
|
91
|
+
formats: Ye,
|
|
92
|
+
defaultWidth: "full"
|
|
93
|
+
}),
|
|
94
|
+
time: _({
|
|
95
|
+
formats: pe,
|
|
96
|
+
defaultWidth: "full"
|
|
97
|
+
}),
|
|
98
|
+
dateTime: _({
|
|
99
|
+
formats: Pe,
|
|
100
|
+
defaultWidth: "full"
|
|
101
|
+
})
|
|
102
|
+
}, ke = {
|
|
103
|
+
lastWeek: "'last' eeee 'at' p",
|
|
104
|
+
yesterday: "'yesterday at' p",
|
|
105
|
+
today: "'today at' p",
|
|
106
|
+
tomorrow: "'tomorrow at' p",
|
|
107
|
+
nextWeek: "eeee 'at' p",
|
|
108
|
+
other: "P"
|
|
109
|
+
}, We = (e, t, n, r) => ke[e];
|
|
110
|
+
function P(e) {
|
|
111
|
+
return (t, n) => {
|
|
112
|
+
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
113
|
+
let a;
|
|
114
|
+
if (r === "formatting" && e.formattingValues) {
|
|
115
|
+
const s = e.defaultFormattingWidth || e.defaultWidth, o = n != null && n.width ? String(n.width) : s;
|
|
116
|
+
a = e.formattingValues[o] || e.formattingValues[s];
|
|
117
|
+
} else {
|
|
118
|
+
const s = e.defaultWidth, o = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
119
|
+
a = e.values[o] || e.values[s];
|
|
120
|
+
}
|
|
121
|
+
const i = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
122
|
+
return a[i];
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const ve = {
|
|
126
|
+
narrow: ["B", "A"],
|
|
127
|
+
abbreviated: ["BC", "AD"],
|
|
128
|
+
wide: ["Before Christ", "Anno Domini"]
|
|
129
|
+
}, Ie = {
|
|
130
|
+
narrow: ["1", "2", "3", "4"],
|
|
131
|
+
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
132
|
+
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
133
|
+
}, Ce = {
|
|
134
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
135
|
+
abbreviated: [
|
|
136
|
+
"Jan",
|
|
137
|
+
"Feb",
|
|
138
|
+
"Mar",
|
|
139
|
+
"Apr",
|
|
140
|
+
"May",
|
|
141
|
+
"Jun",
|
|
142
|
+
"Jul",
|
|
143
|
+
"Aug",
|
|
144
|
+
"Sep",
|
|
145
|
+
"Oct",
|
|
146
|
+
"Nov",
|
|
147
|
+
"Dec"
|
|
148
|
+
],
|
|
149
|
+
wide: [
|
|
150
|
+
"January",
|
|
151
|
+
"February",
|
|
152
|
+
"March",
|
|
153
|
+
"April",
|
|
154
|
+
"May",
|
|
155
|
+
"June",
|
|
156
|
+
"July",
|
|
157
|
+
"August",
|
|
158
|
+
"September",
|
|
159
|
+
"October",
|
|
160
|
+
"November",
|
|
161
|
+
"December"
|
|
162
|
+
]
|
|
163
|
+
}, Fe = {
|
|
164
|
+
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
165
|
+
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
166
|
+
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
167
|
+
wide: [
|
|
168
|
+
"Sunday",
|
|
169
|
+
"Monday",
|
|
170
|
+
"Tuesday",
|
|
171
|
+
"Wednesday",
|
|
172
|
+
"Thursday",
|
|
173
|
+
"Friday",
|
|
174
|
+
"Saturday"
|
|
175
|
+
]
|
|
176
|
+
}, Ee = {
|
|
177
|
+
narrow: {
|
|
178
|
+
am: "a",
|
|
179
|
+
pm: "p",
|
|
180
|
+
midnight: "mi",
|
|
181
|
+
noon: "n",
|
|
182
|
+
morning: "morning",
|
|
183
|
+
afternoon: "afternoon",
|
|
184
|
+
evening: "evening",
|
|
185
|
+
night: "night"
|
|
186
|
+
},
|
|
187
|
+
abbreviated: {
|
|
188
|
+
am: "AM",
|
|
189
|
+
pm: "PM",
|
|
190
|
+
midnight: "midnight",
|
|
191
|
+
noon: "noon",
|
|
192
|
+
morning: "morning",
|
|
193
|
+
afternoon: "afternoon",
|
|
194
|
+
evening: "evening",
|
|
195
|
+
night: "night"
|
|
196
|
+
},
|
|
197
|
+
wide: {
|
|
198
|
+
am: "a.m.",
|
|
199
|
+
pm: "p.m.",
|
|
200
|
+
midnight: "midnight",
|
|
201
|
+
noon: "noon",
|
|
202
|
+
morning: "morning",
|
|
203
|
+
afternoon: "afternoon",
|
|
204
|
+
evening: "evening",
|
|
205
|
+
night: "night"
|
|
206
|
+
}
|
|
207
|
+
}, He = {
|
|
208
|
+
narrow: {
|
|
209
|
+
am: "a",
|
|
210
|
+
pm: "p",
|
|
211
|
+
midnight: "mi",
|
|
212
|
+
noon: "n",
|
|
213
|
+
morning: "in the morning",
|
|
214
|
+
afternoon: "in the afternoon",
|
|
215
|
+
evening: "in the evening",
|
|
216
|
+
night: "at night"
|
|
217
|
+
},
|
|
218
|
+
abbreviated: {
|
|
219
|
+
am: "AM",
|
|
220
|
+
pm: "PM",
|
|
221
|
+
midnight: "midnight",
|
|
222
|
+
noon: "noon",
|
|
223
|
+
morning: "in the morning",
|
|
224
|
+
afternoon: "in the afternoon",
|
|
225
|
+
evening: "in the evening",
|
|
226
|
+
night: "at night"
|
|
227
|
+
},
|
|
228
|
+
wide: {
|
|
229
|
+
am: "a.m.",
|
|
230
|
+
pm: "p.m.",
|
|
231
|
+
midnight: "midnight",
|
|
232
|
+
noon: "noon",
|
|
233
|
+
morning: "in the morning",
|
|
234
|
+
afternoon: "in the afternoon",
|
|
235
|
+
evening: "in the evening",
|
|
236
|
+
night: "at night"
|
|
237
|
+
}
|
|
238
|
+
}, $e = (e, t) => {
|
|
239
|
+
const n = Number(e), r = n % 100;
|
|
240
|
+
if (r > 20 || r < 10)
|
|
241
|
+
switch (r % 10) {
|
|
242
|
+
case 1:
|
|
243
|
+
return n + "st";
|
|
244
|
+
case 2:
|
|
245
|
+
return n + "nd";
|
|
246
|
+
case 3:
|
|
247
|
+
return n + "rd";
|
|
248
|
+
}
|
|
249
|
+
return n + "th";
|
|
250
|
+
}, _e = {
|
|
251
|
+
ordinalNumber: $e,
|
|
252
|
+
era: P({
|
|
253
|
+
values: ve,
|
|
254
|
+
defaultWidth: "wide"
|
|
255
|
+
}),
|
|
256
|
+
quarter: P({
|
|
257
|
+
values: Ie,
|
|
258
|
+
defaultWidth: "wide",
|
|
259
|
+
argumentCallback: (e) => e - 1
|
|
260
|
+
}),
|
|
261
|
+
month: P({
|
|
262
|
+
values: Ce,
|
|
263
|
+
defaultWidth: "wide"
|
|
264
|
+
}),
|
|
265
|
+
day: P({
|
|
266
|
+
values: Fe,
|
|
267
|
+
defaultWidth: "wide"
|
|
268
|
+
}),
|
|
269
|
+
dayPeriod: P({
|
|
270
|
+
values: Ee,
|
|
271
|
+
defaultWidth: "wide",
|
|
272
|
+
formattingValues: He,
|
|
273
|
+
defaultFormattingWidth: "wide"
|
|
274
|
+
})
|
|
275
|
+
};
|
|
276
|
+
function S(e) {
|
|
277
|
+
return (t, n = {}) => {
|
|
278
|
+
const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
|
|
279
|
+
if (!i)
|
|
280
|
+
return null;
|
|
281
|
+
const s = i[0], o = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(o) ? Xe(o, (y) => y.test(s)) : (
|
|
282
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
283
|
+
Ue(o, (y) => y.test(s))
|
|
284
|
+
);
|
|
285
|
+
let c;
|
|
286
|
+
c = e.valueCallback ? e.valueCallback(u) : u, c = n.valueCallback ? (
|
|
287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
288
|
+
n.valueCallback(c)
|
|
289
|
+
) : c;
|
|
290
|
+
const l = t.slice(s.length);
|
|
291
|
+
return { value: c, rest: l };
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
function Ue(e, t) {
|
|
295
|
+
for (const n in e)
|
|
296
|
+
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
297
|
+
return n;
|
|
298
|
+
}
|
|
299
|
+
function Xe(e, t) {
|
|
300
|
+
for (let n = 0; n < e.length; n++)
|
|
301
|
+
if (t(e[n]))
|
|
302
|
+
return n;
|
|
303
|
+
}
|
|
304
|
+
function ze(e) {
|
|
305
|
+
return (t, n = {}) => {
|
|
306
|
+
const r = t.match(e.matchPattern);
|
|
307
|
+
if (!r) return null;
|
|
308
|
+
const a = r[0], i = t.match(e.parsePattern);
|
|
309
|
+
if (!i) return null;
|
|
310
|
+
let s = e.valueCallback ? e.valueCallback(i[0]) : i[0];
|
|
311
|
+
s = n.valueCallback ? n.valueCallback(s) : s;
|
|
312
|
+
const o = t.slice(a.length);
|
|
313
|
+
return { value: s, rest: o };
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const Le = /^(\d+)(th|st|nd|rd)?/i, qe = /\d+/i, Re = {
|
|
317
|
+
narrow: /^(b|a)/i,
|
|
318
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
319
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
320
|
+
}, Ze = {
|
|
321
|
+
any: [/^b/i, /^(a|c)/i]
|
|
322
|
+
}, Ae = {
|
|
323
|
+
narrow: /^[1234]/i,
|
|
324
|
+
abbreviated: /^q[1234]/i,
|
|
325
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
326
|
+
}, je = {
|
|
327
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
328
|
+
}, Qe = {
|
|
329
|
+
narrow: /^[jfmasond]/i,
|
|
330
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
331
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
332
|
+
}, Ge = {
|
|
333
|
+
narrow: [
|
|
334
|
+
/^j/i,
|
|
335
|
+
/^f/i,
|
|
336
|
+
/^m/i,
|
|
337
|
+
/^a/i,
|
|
338
|
+
/^m/i,
|
|
339
|
+
/^j/i,
|
|
340
|
+
/^j/i,
|
|
341
|
+
/^a/i,
|
|
342
|
+
/^s/i,
|
|
343
|
+
/^o/i,
|
|
344
|
+
/^n/i,
|
|
345
|
+
/^d/i
|
|
346
|
+
],
|
|
347
|
+
any: [
|
|
348
|
+
/^ja/i,
|
|
349
|
+
/^f/i,
|
|
350
|
+
/^mar/i,
|
|
351
|
+
/^ap/i,
|
|
352
|
+
/^may/i,
|
|
353
|
+
/^jun/i,
|
|
354
|
+
/^jul/i,
|
|
355
|
+
/^au/i,
|
|
356
|
+
/^s/i,
|
|
357
|
+
/^o/i,
|
|
358
|
+
/^n/i,
|
|
359
|
+
/^d/i
|
|
360
|
+
]
|
|
361
|
+
}, Be = {
|
|
362
|
+
narrow: /^[smtwf]/i,
|
|
363
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
364
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
365
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
366
|
+
}, Ve = {
|
|
367
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
368
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
369
|
+
}, Je = {
|
|
370
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
371
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
372
|
+
}, Ke = {
|
|
373
|
+
any: {
|
|
374
|
+
am: /^a/i,
|
|
375
|
+
pm: /^p/i,
|
|
376
|
+
midnight: /^mi/i,
|
|
377
|
+
noon: /^no/i,
|
|
378
|
+
morning: /morning/i,
|
|
379
|
+
afternoon: /afternoon/i,
|
|
380
|
+
evening: /evening/i,
|
|
381
|
+
night: /night/i
|
|
382
|
+
}
|
|
383
|
+
}, et = {
|
|
384
|
+
ordinalNumber: ze({
|
|
385
|
+
matchPattern: Le,
|
|
386
|
+
parsePattern: qe,
|
|
387
|
+
valueCallback: (e) => parseInt(e, 10)
|
|
388
|
+
}),
|
|
389
|
+
era: S({
|
|
390
|
+
matchPatterns: Re,
|
|
391
|
+
defaultMatchWidth: "wide",
|
|
392
|
+
parsePatterns: Ze,
|
|
393
|
+
defaultParseWidth: "any"
|
|
394
|
+
}),
|
|
395
|
+
quarter: S({
|
|
396
|
+
matchPatterns: Ae,
|
|
397
|
+
defaultMatchWidth: "wide",
|
|
398
|
+
parsePatterns: je,
|
|
399
|
+
defaultParseWidth: "any",
|
|
400
|
+
valueCallback: (e) => e + 1
|
|
401
|
+
}),
|
|
402
|
+
month: S({
|
|
403
|
+
matchPatterns: Qe,
|
|
404
|
+
defaultMatchWidth: "wide",
|
|
405
|
+
parsePatterns: Ge,
|
|
406
|
+
defaultParseWidth: "any"
|
|
407
|
+
}),
|
|
408
|
+
day: S({
|
|
409
|
+
matchPatterns: Be,
|
|
410
|
+
defaultMatchWidth: "wide",
|
|
411
|
+
parsePatterns: Ve,
|
|
412
|
+
defaultParseWidth: "any"
|
|
413
|
+
}),
|
|
414
|
+
dayPeriod: S({
|
|
415
|
+
matchPatterns: Je,
|
|
416
|
+
defaultMatchWidth: "any",
|
|
417
|
+
parsePatterns: Ke,
|
|
418
|
+
defaultParseWidth: "any"
|
|
419
|
+
})
|
|
420
|
+
}, le = {
|
|
421
|
+
code: "en-US",
|
|
422
|
+
formatDistance: xe,
|
|
423
|
+
formatLong: Se,
|
|
424
|
+
formatRelative: We,
|
|
425
|
+
localize: _e,
|
|
426
|
+
match: et,
|
|
427
|
+
options: {
|
|
428
|
+
weekStartsOn: 0,
|
|
429
|
+
firstWeekContainsDate: 1
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
let tt = {};
|
|
433
|
+
function p() {
|
|
434
|
+
return tt;
|
|
435
|
+
}
|
|
436
|
+
const me = 6048e5, nt = 864e5, he = 6e4, ge = 36e5, v = 43200, G = 1440;
|
|
437
|
+
function d(e) {
|
|
438
|
+
const t = Object.prototype.toString.call(e);
|
|
439
|
+
return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
|
|
440
|
+
}
|
|
441
|
+
function B(e) {
|
|
442
|
+
const t = d(e);
|
|
443
|
+
return t.setHours(0, 0, 0, 0), t;
|
|
444
|
+
}
|
|
445
|
+
function F(e) {
|
|
446
|
+
const t = d(e), n = new Date(
|
|
447
|
+
Date.UTC(
|
|
448
|
+
t.getFullYear(),
|
|
449
|
+
t.getMonth(),
|
|
450
|
+
t.getDate(),
|
|
451
|
+
t.getHours(),
|
|
452
|
+
t.getMinutes(),
|
|
453
|
+
t.getSeconds(),
|
|
454
|
+
t.getMilliseconds()
|
|
455
|
+
)
|
|
456
|
+
);
|
|
457
|
+
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
458
|
+
}
|
|
459
|
+
function rt(e, t) {
|
|
460
|
+
const n = B(e), r = B(t), a = +n - F(n), i = +r - F(r);
|
|
461
|
+
return Math.round((a - i) / nt);
|
|
462
|
+
}
|
|
463
|
+
function T(e, t) {
|
|
464
|
+
return e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
465
|
+
}
|
|
466
|
+
function at(e) {
|
|
467
|
+
const t = d(e), n = T(e, 0);
|
|
468
|
+
return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
469
|
+
}
|
|
470
|
+
function it(e) {
|
|
471
|
+
const t = d(e);
|
|
472
|
+
return rt(t, at(t)) + 1;
|
|
473
|
+
}
|
|
474
|
+
function W(e, t) {
|
|
475
|
+
var o, u, c, l;
|
|
476
|
+
const n = p(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((l = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = d(e), i = a.getDay(), s = (i < r ? 7 : 0) + i - r;
|
|
477
|
+
return a.setDate(a.getDate() - s), a.setHours(0, 0, 0, 0), a;
|
|
478
|
+
}
|
|
479
|
+
function E(e) {
|
|
480
|
+
return W(e, { weekStartsOn: 1 });
|
|
481
|
+
}
|
|
482
|
+
function we(e) {
|
|
483
|
+
const t = d(e), n = t.getFullYear(), r = T(e, 0);
|
|
484
|
+
r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
|
|
485
|
+
const a = E(r), i = T(e, 0);
|
|
486
|
+
i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
|
|
487
|
+
const s = E(i);
|
|
488
|
+
return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= s.getTime() ? n : n - 1;
|
|
489
|
+
}
|
|
490
|
+
function st(e) {
|
|
491
|
+
const t = we(e), n = T(e, 0);
|
|
492
|
+
return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), E(n);
|
|
493
|
+
}
|
|
494
|
+
function ot(e) {
|
|
495
|
+
const t = d(e), n = +E(t) - +st(t);
|
|
496
|
+
return Math.round(n / me) + 1;
|
|
497
|
+
}
|
|
498
|
+
function De(e, t) {
|
|
499
|
+
var l, y, m, D;
|
|
500
|
+
const n = d(e), r = n.getFullYear(), a = p(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((y = (l = t == null ? void 0 : t.locale) == null ? void 0 : l.options) == null ? void 0 : y.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((D = (m = a.locale) == null ? void 0 : m.options) == null ? void 0 : D.firstWeekContainsDate) ?? 1, s = T(e, 0);
|
|
501
|
+
s.setFullYear(r + 1, 0, i), s.setHours(0, 0, 0, 0);
|
|
502
|
+
const o = W(s, t), u = T(e, 0);
|
|
503
|
+
u.setFullYear(r, 0, i), u.setHours(0, 0, 0, 0);
|
|
504
|
+
const c = W(u, t);
|
|
505
|
+
return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= c.getTime() ? r : r - 1;
|
|
506
|
+
}
|
|
507
|
+
function ut(e, t) {
|
|
508
|
+
var o, u, c, l;
|
|
509
|
+
const n = p(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((u = (o = t == null ? void 0 : t.locale) == null ? void 0 : o.options) == null ? void 0 : u.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = De(e, t), i = T(e, 0);
|
|
510
|
+
return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), W(i, t);
|
|
511
|
+
}
|
|
512
|
+
function ct(e, t) {
|
|
513
|
+
const n = d(e), r = +W(n, t) - +ut(n, t);
|
|
514
|
+
return Math.round(r / me) + 1;
|
|
515
|
+
}
|
|
516
|
+
function f(e, t) {
|
|
517
|
+
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
518
|
+
return n + r;
|
|
519
|
+
}
|
|
520
|
+
const M = {
|
|
521
|
+
// Year
|
|
522
|
+
y(e, t) {
|
|
523
|
+
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
524
|
+
return f(t === "yy" ? r % 100 : r, t.length);
|
|
525
|
+
},
|
|
526
|
+
// Month
|
|
527
|
+
M(e, t) {
|
|
528
|
+
const n = e.getMonth();
|
|
529
|
+
return t === "M" ? String(n + 1) : f(n + 1, 2);
|
|
530
|
+
},
|
|
531
|
+
// Day of the month
|
|
532
|
+
d(e, t) {
|
|
533
|
+
return f(e.getDate(), t.length);
|
|
534
|
+
},
|
|
535
|
+
// AM or PM
|
|
536
|
+
a(e, t) {
|
|
537
|
+
const n = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
538
|
+
switch (t) {
|
|
539
|
+
case "a":
|
|
540
|
+
case "aa":
|
|
541
|
+
return n.toUpperCase();
|
|
542
|
+
case "aaa":
|
|
543
|
+
return n;
|
|
544
|
+
case "aaaaa":
|
|
545
|
+
return n[0];
|
|
546
|
+
case "aaaa":
|
|
547
|
+
default:
|
|
548
|
+
return n === "am" ? "a.m." : "p.m.";
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
// Hour [1-12]
|
|
552
|
+
h(e, t) {
|
|
553
|
+
return f(e.getHours() % 12 || 12, t.length);
|
|
554
|
+
},
|
|
555
|
+
// Hour [0-23]
|
|
556
|
+
H(e, t) {
|
|
557
|
+
return f(e.getHours(), t.length);
|
|
558
|
+
},
|
|
559
|
+
// Minute
|
|
560
|
+
m(e, t) {
|
|
561
|
+
return f(e.getMinutes(), t.length);
|
|
562
|
+
},
|
|
563
|
+
// Second
|
|
564
|
+
s(e, t) {
|
|
565
|
+
return f(e.getSeconds(), t.length);
|
|
566
|
+
},
|
|
567
|
+
// Fraction of second
|
|
568
|
+
S(e, t) {
|
|
569
|
+
const n = t.length, r = e.getMilliseconds(), a = Math.trunc(
|
|
570
|
+
r * Math.pow(10, n - 3)
|
|
571
|
+
);
|
|
572
|
+
return f(a, t.length);
|
|
573
|
+
}
|
|
574
|
+
}, x = {
|
|
575
|
+
midnight: "midnight",
|
|
576
|
+
noon: "noon",
|
|
577
|
+
morning: "morning",
|
|
578
|
+
afternoon: "afternoon",
|
|
579
|
+
evening: "evening",
|
|
580
|
+
night: "night"
|
|
581
|
+
}, V = {
|
|
582
|
+
// Era
|
|
583
|
+
G: function(e, t, n) {
|
|
584
|
+
const r = e.getFullYear() > 0 ? 1 : 0;
|
|
585
|
+
switch (t) {
|
|
586
|
+
case "G":
|
|
587
|
+
case "GG":
|
|
588
|
+
case "GGG":
|
|
589
|
+
return n.era(r, { width: "abbreviated" });
|
|
590
|
+
case "GGGGG":
|
|
591
|
+
return n.era(r, { width: "narrow" });
|
|
592
|
+
case "GGGG":
|
|
593
|
+
default:
|
|
594
|
+
return n.era(r, { width: "wide" });
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
// Year
|
|
598
|
+
y: function(e, t, n) {
|
|
599
|
+
if (t === "yo") {
|
|
600
|
+
const r = e.getFullYear(), a = r > 0 ? r : 1 - r;
|
|
601
|
+
return n.ordinalNumber(a, { unit: "year" });
|
|
602
|
+
}
|
|
603
|
+
return M.y(e, t);
|
|
604
|
+
},
|
|
605
|
+
// Local week-numbering year
|
|
606
|
+
Y: function(e, t, n, r) {
|
|
607
|
+
const a = De(e, r), i = a > 0 ? a : 1 - a;
|
|
608
|
+
if (t === "YY") {
|
|
609
|
+
const s = i % 100;
|
|
610
|
+
return f(s, 2);
|
|
611
|
+
}
|
|
612
|
+
return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : f(i, t.length);
|
|
613
|
+
},
|
|
614
|
+
// ISO week-numbering year
|
|
615
|
+
R: function(e, t) {
|
|
616
|
+
const n = we(e);
|
|
617
|
+
return f(n, t.length);
|
|
618
|
+
},
|
|
619
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
620
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
621
|
+
// | Year | `y` | `u` |
|
|
622
|
+
// |------|-----|-----|
|
|
623
|
+
// | AC 1 | 1 | 1 |
|
|
624
|
+
// | BC 1 | 1 | 0 |
|
|
625
|
+
// | BC 2 | 2 | -1 |
|
|
626
|
+
// Also `yy` always returns the last two digits of a year,
|
|
627
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
628
|
+
u: function(e, t) {
|
|
629
|
+
const n = e.getFullYear();
|
|
630
|
+
return f(n, t.length);
|
|
631
|
+
},
|
|
632
|
+
// Quarter
|
|
633
|
+
Q: function(e, t, n) {
|
|
634
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
635
|
+
switch (t) {
|
|
636
|
+
case "Q":
|
|
637
|
+
return String(r);
|
|
638
|
+
case "QQ":
|
|
639
|
+
return f(r, 2);
|
|
640
|
+
case "Qo":
|
|
641
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
642
|
+
case "QQQ":
|
|
643
|
+
return n.quarter(r, {
|
|
644
|
+
width: "abbreviated",
|
|
645
|
+
context: "formatting"
|
|
646
|
+
});
|
|
647
|
+
case "QQQQQ":
|
|
648
|
+
return n.quarter(r, {
|
|
649
|
+
width: "narrow",
|
|
650
|
+
context: "formatting"
|
|
651
|
+
});
|
|
652
|
+
case "QQQQ":
|
|
653
|
+
default:
|
|
654
|
+
return n.quarter(r, {
|
|
655
|
+
width: "wide",
|
|
656
|
+
context: "formatting"
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
// Stand-alone quarter
|
|
661
|
+
q: function(e, t, n) {
|
|
662
|
+
const r = Math.ceil((e.getMonth() + 1) / 3);
|
|
663
|
+
switch (t) {
|
|
664
|
+
case "q":
|
|
665
|
+
return String(r);
|
|
666
|
+
case "qq":
|
|
667
|
+
return f(r, 2);
|
|
668
|
+
case "qo":
|
|
669
|
+
return n.ordinalNumber(r, { unit: "quarter" });
|
|
670
|
+
case "qqq":
|
|
671
|
+
return n.quarter(r, {
|
|
672
|
+
width: "abbreviated",
|
|
673
|
+
context: "standalone"
|
|
674
|
+
});
|
|
675
|
+
case "qqqqq":
|
|
676
|
+
return n.quarter(r, {
|
|
677
|
+
width: "narrow",
|
|
678
|
+
context: "standalone"
|
|
679
|
+
});
|
|
680
|
+
case "qqqq":
|
|
681
|
+
default:
|
|
682
|
+
return n.quarter(r, {
|
|
683
|
+
width: "wide",
|
|
684
|
+
context: "standalone"
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
// Month
|
|
689
|
+
M: function(e, t, n) {
|
|
690
|
+
const r = e.getMonth();
|
|
691
|
+
switch (t) {
|
|
692
|
+
case "M":
|
|
693
|
+
case "MM":
|
|
694
|
+
return M.M(e, t);
|
|
695
|
+
case "Mo":
|
|
696
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
697
|
+
case "MMM":
|
|
698
|
+
return n.month(r, {
|
|
699
|
+
width: "abbreviated",
|
|
700
|
+
context: "formatting"
|
|
701
|
+
});
|
|
702
|
+
case "MMMMM":
|
|
703
|
+
return n.month(r, {
|
|
704
|
+
width: "narrow",
|
|
705
|
+
context: "formatting"
|
|
706
|
+
});
|
|
707
|
+
case "MMMM":
|
|
708
|
+
default:
|
|
709
|
+
return n.month(r, { width: "wide", context: "formatting" });
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
// Stand-alone month
|
|
713
|
+
L: function(e, t, n) {
|
|
714
|
+
const r = e.getMonth();
|
|
715
|
+
switch (t) {
|
|
716
|
+
case "L":
|
|
717
|
+
return String(r + 1);
|
|
718
|
+
case "LL":
|
|
719
|
+
return f(r + 1, 2);
|
|
720
|
+
case "Lo":
|
|
721
|
+
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
722
|
+
case "LLL":
|
|
723
|
+
return n.month(r, {
|
|
724
|
+
width: "abbreviated",
|
|
725
|
+
context: "standalone"
|
|
726
|
+
});
|
|
727
|
+
case "LLLLL":
|
|
728
|
+
return n.month(r, {
|
|
729
|
+
width: "narrow",
|
|
730
|
+
context: "standalone"
|
|
731
|
+
});
|
|
732
|
+
case "LLLL":
|
|
733
|
+
default:
|
|
734
|
+
return n.month(r, { width: "wide", context: "standalone" });
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
// Local week of year
|
|
738
|
+
w: function(e, t, n, r) {
|
|
739
|
+
const a = ct(e, r);
|
|
740
|
+
return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : f(a, t.length);
|
|
741
|
+
},
|
|
742
|
+
// ISO week of year
|
|
743
|
+
I: function(e, t, n) {
|
|
744
|
+
const r = ot(e);
|
|
745
|
+
return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : f(r, t.length);
|
|
746
|
+
},
|
|
747
|
+
// Day of the month
|
|
748
|
+
d: function(e, t, n) {
|
|
749
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : M.d(e, t);
|
|
750
|
+
},
|
|
751
|
+
// Day of year
|
|
752
|
+
D: function(e, t, n) {
|
|
753
|
+
const r = it(e);
|
|
754
|
+
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : f(r, t.length);
|
|
755
|
+
},
|
|
756
|
+
// Day of week
|
|
757
|
+
E: function(e, t, n) {
|
|
758
|
+
const r = e.getDay();
|
|
759
|
+
switch (t) {
|
|
760
|
+
case "E":
|
|
761
|
+
case "EE":
|
|
762
|
+
case "EEE":
|
|
763
|
+
return n.day(r, {
|
|
764
|
+
width: "abbreviated",
|
|
765
|
+
context: "formatting"
|
|
766
|
+
});
|
|
767
|
+
case "EEEEE":
|
|
768
|
+
return n.day(r, {
|
|
769
|
+
width: "narrow",
|
|
770
|
+
context: "formatting"
|
|
771
|
+
});
|
|
772
|
+
case "EEEEEE":
|
|
773
|
+
return n.day(r, {
|
|
774
|
+
width: "short",
|
|
775
|
+
context: "formatting"
|
|
776
|
+
});
|
|
777
|
+
case "EEEE":
|
|
778
|
+
default:
|
|
779
|
+
return n.day(r, {
|
|
780
|
+
width: "wide",
|
|
781
|
+
context: "formatting"
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
// Local day of week
|
|
786
|
+
e: function(e, t, n, r) {
|
|
787
|
+
const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
788
|
+
switch (t) {
|
|
789
|
+
case "e":
|
|
790
|
+
return String(i);
|
|
791
|
+
case "ee":
|
|
792
|
+
return f(i, 2);
|
|
793
|
+
case "eo":
|
|
794
|
+
return n.ordinalNumber(i, { unit: "day" });
|
|
795
|
+
case "eee":
|
|
796
|
+
return n.day(a, {
|
|
797
|
+
width: "abbreviated",
|
|
798
|
+
context: "formatting"
|
|
799
|
+
});
|
|
800
|
+
case "eeeee":
|
|
801
|
+
return n.day(a, {
|
|
802
|
+
width: "narrow",
|
|
803
|
+
context: "formatting"
|
|
804
|
+
});
|
|
805
|
+
case "eeeeee":
|
|
806
|
+
return n.day(a, {
|
|
807
|
+
width: "short",
|
|
808
|
+
context: "formatting"
|
|
809
|
+
});
|
|
810
|
+
case "eeee":
|
|
811
|
+
default:
|
|
812
|
+
return n.day(a, {
|
|
813
|
+
width: "wide",
|
|
814
|
+
context: "formatting"
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
// Stand-alone local day of week
|
|
819
|
+
c: function(e, t, n, r) {
|
|
820
|
+
const a = e.getDay(), i = (a - r.weekStartsOn + 8) % 7 || 7;
|
|
821
|
+
switch (t) {
|
|
822
|
+
case "c":
|
|
823
|
+
return String(i);
|
|
824
|
+
case "cc":
|
|
825
|
+
return f(i, t.length);
|
|
826
|
+
case "co":
|
|
827
|
+
return n.ordinalNumber(i, { unit: "day" });
|
|
828
|
+
case "ccc":
|
|
829
|
+
return n.day(a, {
|
|
830
|
+
width: "abbreviated",
|
|
831
|
+
context: "standalone"
|
|
832
|
+
});
|
|
833
|
+
case "ccccc":
|
|
834
|
+
return n.day(a, {
|
|
835
|
+
width: "narrow",
|
|
836
|
+
context: "standalone"
|
|
837
|
+
});
|
|
838
|
+
case "cccccc":
|
|
839
|
+
return n.day(a, {
|
|
840
|
+
width: "short",
|
|
841
|
+
context: "standalone"
|
|
842
|
+
});
|
|
843
|
+
case "cccc":
|
|
844
|
+
default:
|
|
845
|
+
return n.day(a, {
|
|
846
|
+
width: "wide",
|
|
847
|
+
context: "standalone"
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
// ISO day of week
|
|
852
|
+
i: function(e, t, n) {
|
|
853
|
+
const r = e.getDay(), a = r === 0 ? 7 : r;
|
|
854
|
+
switch (t) {
|
|
855
|
+
case "i":
|
|
856
|
+
return String(a);
|
|
857
|
+
case "ii":
|
|
858
|
+
return f(a, t.length);
|
|
859
|
+
case "io":
|
|
860
|
+
return n.ordinalNumber(a, { unit: "day" });
|
|
861
|
+
case "iii":
|
|
862
|
+
return n.day(r, {
|
|
863
|
+
width: "abbreviated",
|
|
864
|
+
context: "formatting"
|
|
865
|
+
});
|
|
866
|
+
case "iiiii":
|
|
867
|
+
return n.day(r, {
|
|
868
|
+
width: "narrow",
|
|
869
|
+
context: "formatting"
|
|
870
|
+
});
|
|
871
|
+
case "iiiiii":
|
|
872
|
+
return n.day(r, {
|
|
873
|
+
width: "short",
|
|
874
|
+
context: "formatting"
|
|
875
|
+
});
|
|
876
|
+
case "iiii":
|
|
877
|
+
default:
|
|
878
|
+
return n.day(r, {
|
|
879
|
+
width: "wide",
|
|
880
|
+
context: "formatting"
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
// AM or PM
|
|
885
|
+
a: function(e, t, n) {
|
|
886
|
+
const a = e.getHours() / 12 >= 1 ? "pm" : "am";
|
|
887
|
+
switch (t) {
|
|
888
|
+
case "a":
|
|
889
|
+
case "aa":
|
|
890
|
+
return n.dayPeriod(a, {
|
|
891
|
+
width: "abbreviated",
|
|
892
|
+
context: "formatting"
|
|
893
|
+
});
|
|
894
|
+
case "aaa":
|
|
895
|
+
return n.dayPeriod(a, {
|
|
896
|
+
width: "abbreviated",
|
|
897
|
+
context: "formatting"
|
|
898
|
+
}).toLowerCase();
|
|
899
|
+
case "aaaaa":
|
|
900
|
+
return n.dayPeriod(a, {
|
|
901
|
+
width: "narrow",
|
|
902
|
+
context: "formatting"
|
|
903
|
+
});
|
|
904
|
+
case "aaaa":
|
|
905
|
+
default:
|
|
906
|
+
return n.dayPeriod(a, {
|
|
907
|
+
width: "wide",
|
|
908
|
+
context: "formatting"
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
// AM, PM, midnight, noon
|
|
913
|
+
b: function(e, t, n) {
|
|
914
|
+
const r = e.getHours();
|
|
915
|
+
let a;
|
|
916
|
+
switch (r === 12 ? a = x.noon : r === 0 ? a = x.midnight : a = r / 12 >= 1 ? "pm" : "am", t) {
|
|
917
|
+
case "b":
|
|
918
|
+
case "bb":
|
|
919
|
+
return n.dayPeriod(a, {
|
|
920
|
+
width: "abbreviated",
|
|
921
|
+
context: "formatting"
|
|
922
|
+
});
|
|
923
|
+
case "bbb":
|
|
924
|
+
return n.dayPeriod(a, {
|
|
925
|
+
width: "abbreviated",
|
|
926
|
+
context: "formatting"
|
|
927
|
+
}).toLowerCase();
|
|
928
|
+
case "bbbbb":
|
|
929
|
+
return n.dayPeriod(a, {
|
|
930
|
+
width: "narrow",
|
|
931
|
+
context: "formatting"
|
|
932
|
+
});
|
|
933
|
+
case "bbbb":
|
|
934
|
+
default:
|
|
935
|
+
return n.dayPeriod(a, {
|
|
936
|
+
width: "wide",
|
|
937
|
+
context: "formatting"
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
942
|
+
B: function(e, t, n) {
|
|
943
|
+
const r = e.getHours();
|
|
944
|
+
let a;
|
|
945
|
+
switch (r >= 17 ? a = x.evening : r >= 12 ? a = x.afternoon : r >= 4 ? a = x.morning : a = x.night, t) {
|
|
946
|
+
case "B":
|
|
947
|
+
case "BB":
|
|
948
|
+
case "BBB":
|
|
949
|
+
return n.dayPeriod(a, {
|
|
950
|
+
width: "abbreviated",
|
|
951
|
+
context: "formatting"
|
|
952
|
+
});
|
|
953
|
+
case "BBBBB":
|
|
954
|
+
return n.dayPeriod(a, {
|
|
955
|
+
width: "narrow",
|
|
956
|
+
context: "formatting"
|
|
957
|
+
});
|
|
958
|
+
case "BBBB":
|
|
959
|
+
default:
|
|
960
|
+
return n.dayPeriod(a, {
|
|
961
|
+
width: "wide",
|
|
962
|
+
context: "formatting"
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
// Hour [1-12]
|
|
967
|
+
h: function(e, t, n) {
|
|
968
|
+
if (t === "ho") {
|
|
969
|
+
let r = e.getHours() % 12;
|
|
970
|
+
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
971
|
+
}
|
|
972
|
+
return M.h(e, t);
|
|
973
|
+
},
|
|
974
|
+
// Hour [0-23]
|
|
975
|
+
H: function(e, t, n) {
|
|
976
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : M.H(e, t);
|
|
977
|
+
},
|
|
978
|
+
// Hour [0-11]
|
|
979
|
+
K: function(e, t, n) {
|
|
980
|
+
const r = e.getHours() % 12;
|
|
981
|
+
return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : f(r, t.length);
|
|
982
|
+
},
|
|
983
|
+
// Hour [1-24]
|
|
984
|
+
k: function(e, t, n) {
|
|
985
|
+
let r = e.getHours();
|
|
986
|
+
return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : f(r, t.length);
|
|
987
|
+
},
|
|
988
|
+
// Minute
|
|
989
|
+
m: function(e, t, n) {
|
|
990
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : M.m(e, t);
|
|
991
|
+
},
|
|
992
|
+
// Second
|
|
993
|
+
s: function(e, t, n) {
|
|
994
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : M.s(e, t);
|
|
995
|
+
},
|
|
996
|
+
// Fraction of second
|
|
997
|
+
S: function(e, t) {
|
|
998
|
+
return M.S(e, t);
|
|
999
|
+
},
|
|
1000
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1001
|
+
X: function(e, t, n) {
|
|
1002
|
+
const r = e.getTimezoneOffset();
|
|
1003
|
+
if (r === 0)
|
|
1004
|
+
return "Z";
|
|
1005
|
+
switch (t) {
|
|
1006
|
+
case "X":
|
|
1007
|
+
return K(r);
|
|
1008
|
+
case "XXXX":
|
|
1009
|
+
case "XX":
|
|
1010
|
+
return O(r);
|
|
1011
|
+
case "XXXXX":
|
|
1012
|
+
case "XXX":
|
|
1013
|
+
default:
|
|
1014
|
+
return O(r, ":");
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1018
|
+
x: function(e, t, n) {
|
|
1019
|
+
const r = e.getTimezoneOffset();
|
|
1020
|
+
switch (t) {
|
|
1021
|
+
case "x":
|
|
1022
|
+
return K(r);
|
|
1023
|
+
case "xxxx":
|
|
1024
|
+
case "xx":
|
|
1025
|
+
return O(r);
|
|
1026
|
+
case "xxxxx":
|
|
1027
|
+
case "xxx":
|
|
1028
|
+
default:
|
|
1029
|
+
return O(r, ":");
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
// Timezone (GMT)
|
|
1033
|
+
O: function(e, t, n) {
|
|
1034
|
+
const r = e.getTimezoneOffset();
|
|
1035
|
+
switch (t) {
|
|
1036
|
+
case "O":
|
|
1037
|
+
case "OO":
|
|
1038
|
+
case "OOO":
|
|
1039
|
+
return "GMT" + J(r, ":");
|
|
1040
|
+
case "OOOO":
|
|
1041
|
+
default:
|
|
1042
|
+
return "GMT" + O(r, ":");
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
// Timezone (specific non-location)
|
|
1046
|
+
z: function(e, t, n) {
|
|
1047
|
+
const r = e.getTimezoneOffset();
|
|
1048
|
+
switch (t) {
|
|
1049
|
+
case "z":
|
|
1050
|
+
case "zz":
|
|
1051
|
+
case "zzz":
|
|
1052
|
+
return "GMT" + J(r, ":");
|
|
1053
|
+
case "zzzz":
|
|
1054
|
+
default:
|
|
1055
|
+
return "GMT" + O(r, ":");
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
// Seconds timestamp
|
|
1059
|
+
t: function(e, t, n) {
|
|
1060
|
+
const r = Math.trunc(e.getTime() / 1e3);
|
|
1061
|
+
return f(r, t.length);
|
|
1062
|
+
},
|
|
1063
|
+
// Milliseconds timestamp
|
|
1064
|
+
T: function(e, t, n) {
|
|
1065
|
+
const r = e.getTime();
|
|
1066
|
+
return f(r, t.length);
|
|
1067
|
+
}
|
|
1068
|
+
};
|
|
1069
|
+
function J(e, t = "") {
|
|
1070
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
|
|
1071
|
+
return i === 0 ? n + String(a) : n + String(a) + t + f(i, 2);
|
|
1072
|
+
}
|
|
1073
|
+
function K(e, t) {
|
|
1074
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + f(Math.abs(e) / 60, 2) : O(e, t);
|
|
1075
|
+
}
|
|
1076
|
+
function O(e, t = "") {
|
|
1077
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = f(Math.trunc(r / 60), 2), i = f(r % 60, 2);
|
|
1078
|
+
return n + a + t + i;
|
|
1079
|
+
}
|
|
1080
|
+
const ee = (e, t) => {
|
|
1081
|
+
switch (e) {
|
|
1082
|
+
case "P":
|
|
1083
|
+
return t.date({ width: "short" });
|
|
1084
|
+
case "PP":
|
|
1085
|
+
return t.date({ width: "medium" });
|
|
1086
|
+
case "PPP":
|
|
1087
|
+
return t.date({ width: "long" });
|
|
1088
|
+
case "PPPP":
|
|
1089
|
+
default:
|
|
1090
|
+
return t.date({ width: "full" });
|
|
1091
|
+
}
|
|
1092
|
+
}, ye = (e, t) => {
|
|
1093
|
+
switch (e) {
|
|
1094
|
+
case "p":
|
|
1095
|
+
return t.time({ width: "short" });
|
|
1096
|
+
case "pp":
|
|
1097
|
+
return t.time({ width: "medium" });
|
|
1098
|
+
case "ppp":
|
|
1099
|
+
return t.time({ width: "long" });
|
|
1100
|
+
case "pppp":
|
|
1101
|
+
default:
|
|
1102
|
+
return t.time({ width: "full" });
|
|
1103
|
+
}
|
|
1104
|
+
}, ft = (e, t) => {
|
|
1105
|
+
const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
|
|
1106
|
+
if (!a)
|
|
1107
|
+
return ee(e, t);
|
|
1108
|
+
let i;
|
|
1109
|
+
switch (r) {
|
|
1110
|
+
case "P":
|
|
1111
|
+
i = t.dateTime({ width: "short" });
|
|
1112
|
+
break;
|
|
1113
|
+
case "PP":
|
|
1114
|
+
i = t.dateTime({ width: "medium" });
|
|
1115
|
+
break;
|
|
1116
|
+
case "PPP":
|
|
1117
|
+
i = t.dateTime({ width: "long" });
|
|
1118
|
+
break;
|
|
1119
|
+
case "PPPP":
|
|
1120
|
+
default:
|
|
1121
|
+
i = t.dateTime({ width: "full" });
|
|
1122
|
+
break;
|
|
1123
|
+
}
|
|
1124
|
+
return i.replace("{{date}}", ee(r, t)).replace("{{time}}", ye(a, t));
|
|
1125
|
+
}, dt = {
|
|
1126
|
+
p: ye,
|
|
1127
|
+
P: ft
|
|
1128
|
+
}, lt = /^D+$/, mt = /^Y+$/, ht = ["D", "DD", "YY", "YYYY"];
|
|
1129
|
+
function gt(e) {
|
|
1130
|
+
return lt.test(e);
|
|
1131
|
+
}
|
|
1132
|
+
function wt(e) {
|
|
1133
|
+
return mt.test(e);
|
|
1134
|
+
}
|
|
1135
|
+
function Dt(e, t, n) {
|
|
1136
|
+
const r = yt(e, t, n);
|
|
1137
|
+
if (console.warn(r), ht.includes(e)) throw new RangeError(r);
|
|
1138
|
+
}
|
|
1139
|
+
function yt(e, t, n) {
|
|
1140
|
+
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1141
|
+
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1142
|
+
}
|
|
1143
|
+
function bt(e) {
|
|
1144
|
+
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
1145
|
+
}
|
|
1146
|
+
function Mt(e) {
|
|
1147
|
+
if (!bt(e) && typeof e != "number")
|
|
1148
|
+
return !1;
|
|
1149
|
+
const t = d(e);
|
|
1150
|
+
return !isNaN(Number(t));
|
|
1151
|
+
}
|
|
1152
|
+
const Tt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, Ot = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Nt = /^'([^]*?)'?$/, xt = /''/g, Yt = /[a-zA-Z]/;
|
|
1153
|
+
function pt(e, t, n) {
|
|
1154
|
+
var l, y, m, D, b, N, j, Q;
|
|
1155
|
+
const r = p(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? le, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((y = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : y.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((D = (m = r.locale) == null ? void 0 : m.options) == null ? void 0 : D.firstWeekContainsDate) ?? 1, s = (n == null ? void 0 : n.weekStartsOn) ?? ((N = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : N.weekStartsOn) ?? r.weekStartsOn ?? ((Q = (j = r.locale) == null ? void 0 : j.options) == null ? void 0 : Q.weekStartsOn) ?? 0, o = d(e);
|
|
1156
|
+
if (!Mt(o))
|
|
1157
|
+
throw new RangeError("Invalid time value");
|
|
1158
|
+
let u = t.match(Ot).map((w) => {
|
|
1159
|
+
const g = w[0];
|
|
1160
|
+
if (g === "p" || g === "P") {
|
|
1161
|
+
const $ = dt[g];
|
|
1162
|
+
return $(w, a.formatLong);
|
|
1163
|
+
}
|
|
1164
|
+
return w;
|
|
1165
|
+
}).join("").match(Tt).map((w) => {
|
|
1166
|
+
if (w === "''")
|
|
1167
|
+
return { isToken: !1, value: "'" };
|
|
1168
|
+
const g = w[0];
|
|
1169
|
+
if (g === "'")
|
|
1170
|
+
return { isToken: !1, value: Pt(w) };
|
|
1171
|
+
if (V[g])
|
|
1172
|
+
return { isToken: !0, value: w };
|
|
1173
|
+
if (g.match(Yt))
|
|
1174
|
+
throw new RangeError(
|
|
1175
|
+
"Format string contains an unescaped latin alphabet character `" + g + "`"
|
|
1176
|
+
);
|
|
1177
|
+
return { isToken: !1, value: w };
|
|
1178
|
+
});
|
|
1179
|
+
a.localize.preprocessor && (u = a.localize.preprocessor(o, u));
|
|
1180
|
+
const c = {
|
|
1181
|
+
firstWeekContainsDate: i,
|
|
1182
|
+
weekStartsOn: s,
|
|
1183
|
+
locale: a
|
|
1184
|
+
};
|
|
1185
|
+
return u.map((w) => {
|
|
1186
|
+
if (!w.isToken) return w.value;
|
|
1187
|
+
const g = w.value;
|
|
1188
|
+
(!(n != null && n.useAdditionalWeekYearTokens) && wt(g) || !(n != null && n.useAdditionalDayOfYearTokens) && gt(g)) && Dt(g, t, String(e));
|
|
1189
|
+
const $ = V[g[0]];
|
|
1190
|
+
return $(o, g, a.localize, c);
|
|
1191
|
+
}).join("");
|
|
1192
|
+
}
|
|
1193
|
+
function Pt(e) {
|
|
1194
|
+
const t = e.match(Nt);
|
|
1195
|
+
return t ? t[1].replace(xt, "'") : e;
|
|
1196
|
+
}
|
|
1197
|
+
function C(e, t) {
|
|
1198
|
+
const n = d(e), r = d(t), a = n.getTime() - r.getTime();
|
|
1199
|
+
return a < 0 ? -1 : a > 0 ? 1 : a;
|
|
1200
|
+
}
|
|
1201
|
+
function St(e) {
|
|
1202
|
+
return T(e, Date.now());
|
|
1203
|
+
}
|
|
1204
|
+
function kt(e, t) {
|
|
1205
|
+
const n = d(e), r = d(t), a = n.getFullYear() - r.getFullYear(), i = n.getMonth() - r.getMonth();
|
|
1206
|
+
return a * 12 + i;
|
|
1207
|
+
}
|
|
1208
|
+
function Wt(e) {
|
|
1209
|
+
return (t) => {
|
|
1210
|
+
const r = (e ? Math[e] : Math.trunc)(t);
|
|
1211
|
+
return r === 0 ? 0 : r;
|
|
1212
|
+
};
|
|
1213
|
+
}
|
|
1214
|
+
function vt(e, t) {
|
|
1215
|
+
return +d(e) - +d(t);
|
|
1216
|
+
}
|
|
1217
|
+
function It(e) {
|
|
1218
|
+
const t = d(e);
|
|
1219
|
+
return t.setHours(23, 59, 59, 999), t;
|
|
1220
|
+
}
|
|
1221
|
+
function Ct(e) {
|
|
1222
|
+
const t = d(e), n = t.getMonth();
|
|
1223
|
+
return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
|
|
1224
|
+
}
|
|
1225
|
+
function Ft(e) {
|
|
1226
|
+
const t = d(e);
|
|
1227
|
+
return +It(t) == +Ct(t);
|
|
1228
|
+
}
|
|
1229
|
+
function Et(e, t) {
|
|
1230
|
+
const n = d(e), r = d(t), a = C(n, r), i = Math.abs(
|
|
1231
|
+
kt(n, r)
|
|
1232
|
+
);
|
|
1233
|
+
let s;
|
|
1234
|
+
if (i < 1)
|
|
1235
|
+
s = 0;
|
|
1236
|
+
else {
|
|
1237
|
+
n.getMonth() === 1 && n.getDate() > 27 && n.setDate(30), n.setMonth(n.getMonth() - a * i);
|
|
1238
|
+
let o = C(n, r) === -a;
|
|
1239
|
+
Ft(d(e)) && i === 1 && C(e, r) === 1 && (o = !1), s = a * (i - Number(o));
|
|
1240
|
+
}
|
|
1241
|
+
return s === 0 ? 0 : s;
|
|
1242
|
+
}
|
|
1243
|
+
function Ht(e, t, n) {
|
|
1244
|
+
const r = vt(e, t) / 1e3;
|
|
1245
|
+
return Wt(n == null ? void 0 : n.roundingMethod)(r);
|
|
1246
|
+
}
|
|
1247
|
+
function $t(e, t, n) {
|
|
1248
|
+
const r = p(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? le, i = 2520, s = C(e, t);
|
|
1249
|
+
if (isNaN(s))
|
|
1250
|
+
throw new RangeError("Invalid time value");
|
|
1251
|
+
const o = Object.assign({}, n, {
|
|
1252
|
+
addSuffix: n == null ? void 0 : n.addSuffix,
|
|
1253
|
+
comparison: s
|
|
1254
|
+
});
|
|
1255
|
+
let u, c;
|
|
1256
|
+
s > 0 ? (u = d(t), c = d(e)) : (u = d(e), c = d(t));
|
|
1257
|
+
const l = Ht(c, u), y = (F(c) - F(u)) / 1e3, m = Math.round((l - y) / 60);
|
|
1258
|
+
let D;
|
|
1259
|
+
if (m < 2)
|
|
1260
|
+
return n != null && n.includeSeconds ? l < 5 ? a.formatDistance("lessThanXSeconds", 5, o) : l < 10 ? a.formatDistance("lessThanXSeconds", 10, o) : l < 20 ? a.formatDistance("lessThanXSeconds", 20, o) : l < 40 ? a.formatDistance("halfAMinute", 0, o) : l < 60 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", 1, o) : m === 0 ? a.formatDistance("lessThanXMinutes", 1, o) : a.formatDistance("xMinutes", m, o);
|
|
1261
|
+
if (m < 45)
|
|
1262
|
+
return a.formatDistance("xMinutes", m, o);
|
|
1263
|
+
if (m < 90)
|
|
1264
|
+
return a.formatDistance("aboutXHours", 1, o);
|
|
1265
|
+
if (m < G) {
|
|
1266
|
+
const b = Math.round(m / 60);
|
|
1267
|
+
return a.formatDistance("aboutXHours", b, o);
|
|
1268
|
+
} else {
|
|
1269
|
+
if (m < i)
|
|
1270
|
+
return a.formatDistance("xDays", 1, o);
|
|
1271
|
+
if (m < v) {
|
|
1272
|
+
const b = Math.round(m / G);
|
|
1273
|
+
return a.formatDistance("xDays", b, o);
|
|
1274
|
+
} else if (m < v * 2)
|
|
1275
|
+
return D = Math.round(m / v), a.formatDistance("aboutXMonths", D, o);
|
|
1276
|
+
}
|
|
1277
|
+
if (D = Et(c, u), D < 12) {
|
|
1278
|
+
const b = Math.round(m / v);
|
|
1279
|
+
return a.formatDistance("xMonths", b, o);
|
|
1280
|
+
} else {
|
|
1281
|
+
const b = D % 12, N = Math.trunc(D / 12);
|
|
1282
|
+
return b < 3 ? a.formatDistance("aboutXYears", N, o) : b < 9 ? a.formatDistance("overXYears", N, o) : a.formatDistance("almostXYears", N + 1, o);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
function kn(e, t) {
|
|
1286
|
+
return $t(e, St(e), t);
|
|
1287
|
+
}
|
|
1288
|
+
function _t() {
|
|
1289
|
+
return Object.assign({}, p());
|
|
1290
|
+
}
|
|
1291
|
+
function Wn(e, t) {
|
|
1292
|
+
const r = Lt(e);
|
|
1293
|
+
let a;
|
|
1294
|
+
if (r.date) {
|
|
1295
|
+
const u = qt(r.date, 2);
|
|
1296
|
+
a = Rt(u.restDateString, u.year);
|
|
1297
|
+
}
|
|
1298
|
+
if (!a || isNaN(a.getTime()))
|
|
1299
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1300
|
+
const i = a.getTime();
|
|
1301
|
+
let s = 0, o;
|
|
1302
|
+
if (r.time && (s = Zt(r.time), isNaN(s)))
|
|
1303
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1304
|
+
if (r.timezone) {
|
|
1305
|
+
if (o = At(r.timezone), isNaN(o))
|
|
1306
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1307
|
+
} else {
|
|
1308
|
+
const u = new Date(i + s), c = /* @__PURE__ */ new Date(0);
|
|
1309
|
+
return c.setFullYear(
|
|
1310
|
+
u.getUTCFullYear(),
|
|
1311
|
+
u.getUTCMonth(),
|
|
1312
|
+
u.getUTCDate()
|
|
1313
|
+
), c.setHours(
|
|
1314
|
+
u.getUTCHours(),
|
|
1315
|
+
u.getUTCMinutes(),
|
|
1316
|
+
u.getUTCSeconds(),
|
|
1317
|
+
u.getUTCMilliseconds()
|
|
1318
|
+
), c;
|
|
1319
|
+
}
|
|
1320
|
+
return new Date(i + s + o);
|
|
1321
|
+
}
|
|
1322
|
+
const I = {
|
|
1323
|
+
dateTimeDelimiter: /[T ]/,
|
|
1324
|
+
timeZoneDelimiter: /[Z ]/i,
|
|
1325
|
+
timezone: /([Z+-].*)$/
|
|
1326
|
+
}, Ut = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Xt = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, zt = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
1327
|
+
function Lt(e) {
|
|
1328
|
+
const t = {}, n = e.split(I.dateTimeDelimiter);
|
|
1329
|
+
let r;
|
|
1330
|
+
if (n.length > 2)
|
|
1331
|
+
return t;
|
|
1332
|
+
if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], I.timeZoneDelimiter.test(t.date) && (t.date = e.split(I.timeZoneDelimiter)[0], r = e.substr(
|
|
1333
|
+
t.date.length,
|
|
1334
|
+
e.length
|
|
1335
|
+
))), r) {
|
|
1336
|
+
const a = I.timezone.exec(r);
|
|
1337
|
+
a ? (t.time = r.replace(a[1], ""), t.timezone = a[1]) : t.time = r;
|
|
1338
|
+
}
|
|
1339
|
+
return t;
|
|
1340
|
+
}
|
|
1341
|
+
function qt(e, t) {
|
|
1342
|
+
const n = new RegExp(
|
|
1343
|
+
"^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
|
|
1344
|
+
), r = e.match(n);
|
|
1345
|
+
if (!r) return { year: NaN, restDateString: "" };
|
|
1346
|
+
const a = r[1] ? parseInt(r[1]) : null, i = r[2] ? parseInt(r[2]) : null;
|
|
1347
|
+
return {
|
|
1348
|
+
year: i === null ? a : i * 100,
|
|
1349
|
+
restDateString: e.slice((r[1] || r[2]).length)
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
function Rt(e, t) {
|
|
1353
|
+
if (t === null) return /* @__PURE__ */ new Date(NaN);
|
|
1354
|
+
const n = e.match(Ut);
|
|
1355
|
+
if (!n) return /* @__PURE__ */ new Date(NaN);
|
|
1356
|
+
const r = !!n[4], a = k(n[1]), i = k(n[2]) - 1, s = k(n[3]), o = k(n[4]), u = k(n[5]) - 1;
|
|
1357
|
+
if (r)
|
|
1358
|
+
return Vt(t, o, u) ? jt(t, o, u) : /* @__PURE__ */ new Date(NaN);
|
|
1359
|
+
{
|
|
1360
|
+
const c = /* @__PURE__ */ new Date(0);
|
|
1361
|
+
return !Gt(t, i, s) || !Bt(t, a) ? /* @__PURE__ */ new Date(NaN) : (c.setUTCFullYear(t, i, Math.max(a, s)), c);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
function k(e) {
|
|
1365
|
+
return e ? parseInt(e) : 1;
|
|
1366
|
+
}
|
|
1367
|
+
function Zt(e) {
|
|
1368
|
+
const t = e.match(Xt);
|
|
1369
|
+
if (!t) return NaN;
|
|
1370
|
+
const n = U(t[1]), r = U(t[2]), a = U(t[3]);
|
|
1371
|
+
return Jt(n, r, a) ? n * ge + r * he + a * 1e3 : NaN;
|
|
1372
|
+
}
|
|
1373
|
+
function U(e) {
|
|
1374
|
+
return e && parseFloat(e.replace(",", ".")) || 0;
|
|
1375
|
+
}
|
|
1376
|
+
function At(e) {
|
|
1377
|
+
if (e === "Z") return 0;
|
|
1378
|
+
const t = e.match(zt);
|
|
1379
|
+
if (!t) return 0;
|
|
1380
|
+
const n = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), a = t[3] && parseInt(t[3]) || 0;
|
|
1381
|
+
return Kt(r, a) ? n * (r * ge + a * he) : NaN;
|
|
1382
|
+
}
|
|
1383
|
+
function jt(e, t, n) {
|
|
1384
|
+
const r = /* @__PURE__ */ new Date(0);
|
|
1385
|
+
r.setUTCFullYear(e, 0, 4);
|
|
1386
|
+
const a = r.getUTCDay() || 7, i = (t - 1) * 7 + n + 1 - a;
|
|
1387
|
+
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
1388
|
+
}
|
|
1389
|
+
const Qt = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1390
|
+
function be(e) {
|
|
1391
|
+
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
1392
|
+
}
|
|
1393
|
+
function Gt(e, t, n) {
|
|
1394
|
+
return t >= 0 && t <= 11 && n >= 1 && n <= (Qt[t] || (be(e) ? 29 : 28));
|
|
1395
|
+
}
|
|
1396
|
+
function Bt(e, t) {
|
|
1397
|
+
return t >= 1 && t <= (be(e) ? 366 : 365);
|
|
1398
|
+
}
|
|
1399
|
+
function Vt(e, t, n) {
|
|
1400
|
+
return t >= 1 && t <= 53 && n >= 0 && n <= 6;
|
|
1401
|
+
}
|
|
1402
|
+
function Jt(e, t, n) {
|
|
1403
|
+
return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
|
|
1404
|
+
}
|
|
1405
|
+
function Kt(e, t) {
|
|
1406
|
+
return t >= 0 && t <= 59;
|
|
1407
|
+
}
|
|
1408
|
+
function te(e, t, n) {
|
|
1409
|
+
const r = _t(), a = nn(e, n.timeZone, n.locale ?? r.locale);
|
|
1410
|
+
return "formatToParts" in a ? en(a, t) : tn(a, t);
|
|
1411
|
+
}
|
|
1412
|
+
function en(e, t) {
|
|
1413
|
+
const n = e.formatToParts(t);
|
|
1414
|
+
for (let r = n.length - 1; r >= 0; --r)
|
|
1415
|
+
if (n[r].type === "timeZoneName")
|
|
1416
|
+
return n[r].value;
|
|
1417
|
+
}
|
|
1418
|
+
function tn(e, t) {
|
|
1419
|
+
const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
|
|
1420
|
+
return r ? r[0].substr(1) : "";
|
|
1421
|
+
}
|
|
1422
|
+
function nn(e, t, n) {
|
|
1423
|
+
return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
|
|
1424
|
+
timeZone: t,
|
|
1425
|
+
timeZoneName: e
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1428
|
+
function rn(e, t) {
|
|
1429
|
+
const n = cn(t);
|
|
1430
|
+
return "formatToParts" in n ? sn(n, e) : on(n, e);
|
|
1431
|
+
}
|
|
1432
|
+
const an = {
|
|
1433
|
+
year: 0,
|
|
1434
|
+
month: 1,
|
|
1435
|
+
day: 2,
|
|
1436
|
+
hour: 3,
|
|
1437
|
+
minute: 4,
|
|
1438
|
+
second: 5
|
|
1439
|
+
};
|
|
1440
|
+
function sn(e, t) {
|
|
1441
|
+
try {
|
|
1442
|
+
const n = e.formatToParts(t), r = [];
|
|
1443
|
+
for (let a = 0; a < n.length; a++) {
|
|
1444
|
+
const i = an[n[a].type];
|
|
1445
|
+
i !== void 0 && (r[i] = parseInt(n[a].value, 10));
|
|
1446
|
+
}
|
|
1447
|
+
return r;
|
|
1448
|
+
} catch (n) {
|
|
1449
|
+
if (n instanceof RangeError)
|
|
1450
|
+
return [NaN];
|
|
1451
|
+
throw n;
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
function on(e, t) {
|
|
1455
|
+
const n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
|
|
1456
|
+
return [
|
|
1457
|
+
parseInt(r[3], 10),
|
|
1458
|
+
parseInt(r[1], 10),
|
|
1459
|
+
parseInt(r[2], 10),
|
|
1460
|
+
parseInt(r[4], 10),
|
|
1461
|
+
parseInt(r[5], 10),
|
|
1462
|
+
parseInt(r[6], 10)
|
|
1463
|
+
];
|
|
1464
|
+
}
|
|
1465
|
+
const X = {}, ne = new Intl.DateTimeFormat("en-US", {
|
|
1466
|
+
hourCycle: "h23",
|
|
1467
|
+
timeZone: "America/New_York",
|
|
1468
|
+
year: "numeric",
|
|
1469
|
+
month: "2-digit",
|
|
1470
|
+
day: "2-digit",
|
|
1471
|
+
hour: "2-digit",
|
|
1472
|
+
minute: "2-digit",
|
|
1473
|
+
second: "2-digit"
|
|
1474
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), un = ne === "06/25/2014, 00:00:00" || ne === "06/25/2014 00:00:00";
|
|
1475
|
+
function cn(e) {
|
|
1476
|
+
return X[e] || (X[e] = un ? new Intl.DateTimeFormat("en-US", {
|
|
1477
|
+
hourCycle: "h23",
|
|
1478
|
+
timeZone: e,
|
|
1479
|
+
year: "numeric",
|
|
1480
|
+
month: "numeric",
|
|
1481
|
+
day: "2-digit",
|
|
1482
|
+
hour: "2-digit",
|
|
1483
|
+
minute: "2-digit",
|
|
1484
|
+
second: "2-digit"
|
|
1485
|
+
}) : new Intl.DateTimeFormat("en-US", {
|
|
1486
|
+
hour12: !1,
|
|
1487
|
+
timeZone: e,
|
|
1488
|
+
year: "numeric",
|
|
1489
|
+
month: "numeric",
|
|
1490
|
+
day: "2-digit",
|
|
1491
|
+
hour: "2-digit",
|
|
1492
|
+
minute: "2-digit",
|
|
1493
|
+
second: "2-digit"
|
|
1494
|
+
})), X[e];
|
|
1495
|
+
}
|
|
1496
|
+
function Me(e, t, n, r, a, i, s) {
|
|
1497
|
+
const o = /* @__PURE__ */ new Date(0);
|
|
1498
|
+
return o.setUTCFullYear(e, t, n), o.setUTCHours(r, a, i, s), o;
|
|
1499
|
+
}
|
|
1500
|
+
const re = 36e5, fn = 6e4, z = {
|
|
1501
|
+
timezoneZ: /^(Z)$/,
|
|
1502
|
+
timezoneHH: /^([+-]\d{2})$/,
|
|
1503
|
+
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
|
|
1504
|
+
};
|
|
1505
|
+
function A(e, t, n) {
|
|
1506
|
+
if (!e)
|
|
1507
|
+
return 0;
|
|
1508
|
+
let r = z.timezoneZ.exec(e);
|
|
1509
|
+
if (r)
|
|
1510
|
+
return 0;
|
|
1511
|
+
let a, i;
|
|
1512
|
+
if (r = z.timezoneHH.exec(e), r)
|
|
1513
|
+
return a = parseInt(r[1], 10), ae(a) ? -(a * re) : NaN;
|
|
1514
|
+
if (r = z.timezoneHHMM.exec(e), r) {
|
|
1515
|
+
a = parseInt(r[2], 10);
|
|
1516
|
+
const s = parseInt(r[3], 10);
|
|
1517
|
+
return ae(a, s) ? (i = Math.abs(a) * re + s * fn, r[1] === "+" ? -i : i) : NaN;
|
|
1518
|
+
}
|
|
1519
|
+
if (mn(e)) {
|
|
1520
|
+
t = new Date(t || Date.now());
|
|
1521
|
+
const s = n ? t : dn(t), o = Z(s, e);
|
|
1522
|
+
return -(n ? o : ln(t, o, e));
|
|
1523
|
+
}
|
|
1524
|
+
return NaN;
|
|
1525
|
+
}
|
|
1526
|
+
function dn(e) {
|
|
1527
|
+
return Me(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
|
|
1528
|
+
}
|
|
1529
|
+
function Z(e, t) {
|
|
1530
|
+
const n = rn(e, t), r = Me(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
|
|
1531
|
+
let a = e.getTime();
|
|
1532
|
+
const i = a % 1e3;
|
|
1533
|
+
return a -= i >= 0 ? i : 1e3 + i, r - a;
|
|
1534
|
+
}
|
|
1535
|
+
function ln(e, t, n) {
|
|
1536
|
+
let a = e.getTime() - t;
|
|
1537
|
+
const i = Z(new Date(a), n);
|
|
1538
|
+
if (t === i)
|
|
1539
|
+
return t;
|
|
1540
|
+
a -= i - t;
|
|
1541
|
+
const s = Z(new Date(a), n);
|
|
1542
|
+
return i === s ? i : Math.max(i, s);
|
|
1543
|
+
}
|
|
1544
|
+
function ae(e, t) {
|
|
1545
|
+
return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
|
|
1546
|
+
}
|
|
1547
|
+
const ie = {};
|
|
1548
|
+
function mn(e) {
|
|
1549
|
+
if (ie[e])
|
|
1550
|
+
return !0;
|
|
1551
|
+
try {
|
|
1552
|
+
return new Intl.DateTimeFormat(void 0, { timeZone: e }), ie[e] = !0, !0;
|
|
1553
|
+
} catch {
|
|
1554
|
+
return !1;
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
const hn = 60 * 1e3, gn = {
|
|
1558
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1559
|
+
X: function(e, t, n) {
|
|
1560
|
+
const r = L(n.timeZone, e);
|
|
1561
|
+
if (r === 0)
|
|
1562
|
+
return "Z";
|
|
1563
|
+
switch (t) {
|
|
1564
|
+
case "X":
|
|
1565
|
+
return se(r);
|
|
1566
|
+
case "XXXX":
|
|
1567
|
+
case "XX":
|
|
1568
|
+
return Y(r);
|
|
1569
|
+
case "XXXXX":
|
|
1570
|
+
case "XXX":
|
|
1571
|
+
default:
|
|
1572
|
+
return Y(r, ":");
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
1576
|
+
x: function(e, t, n) {
|
|
1577
|
+
const r = L(n.timeZone, e);
|
|
1578
|
+
switch (t) {
|
|
1579
|
+
case "x":
|
|
1580
|
+
return se(r);
|
|
1581
|
+
case "xxxx":
|
|
1582
|
+
case "xx":
|
|
1583
|
+
return Y(r);
|
|
1584
|
+
case "xxxxx":
|
|
1585
|
+
case "xxx":
|
|
1586
|
+
default:
|
|
1587
|
+
return Y(r, ":");
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
// Timezone (GMT)
|
|
1591
|
+
O: function(e, t, n) {
|
|
1592
|
+
const r = L(n.timeZone, e);
|
|
1593
|
+
switch (t) {
|
|
1594
|
+
case "O":
|
|
1595
|
+
case "OO":
|
|
1596
|
+
case "OOO":
|
|
1597
|
+
return "GMT" + wn(r, ":");
|
|
1598
|
+
case "OOOO":
|
|
1599
|
+
default:
|
|
1600
|
+
return "GMT" + Y(r, ":");
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
// Timezone (specific non-location)
|
|
1604
|
+
z: function(e, t, n) {
|
|
1605
|
+
switch (t) {
|
|
1606
|
+
case "z":
|
|
1607
|
+
case "zz":
|
|
1608
|
+
case "zzz":
|
|
1609
|
+
return te("short", e, n);
|
|
1610
|
+
case "zzzz":
|
|
1611
|
+
default:
|
|
1612
|
+
return te("long", e, n);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
function L(e, t) {
|
|
1617
|
+
const n = e ? A(e, t, !0) / hn : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
|
|
1618
|
+
if (Number.isNaN(n))
|
|
1619
|
+
throw new RangeError("Invalid time zone specified: " + e);
|
|
1620
|
+
return n;
|
|
1621
|
+
}
|
|
1622
|
+
function H(e, t) {
|
|
1623
|
+
const n = e < 0 ? "-" : "";
|
|
1624
|
+
let r = Math.abs(e).toString();
|
|
1625
|
+
for (; r.length < t; )
|
|
1626
|
+
r = "0" + r;
|
|
1627
|
+
return n + r;
|
|
1628
|
+
}
|
|
1629
|
+
function Y(e, t = "") {
|
|
1630
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = H(Math.floor(r / 60), 2), i = H(Math.floor(r % 60), 2);
|
|
1631
|
+
return n + a + t + i;
|
|
1632
|
+
}
|
|
1633
|
+
function se(e, t) {
|
|
1634
|
+
return e % 60 === 0 ? (e > 0 ? "-" : "+") + H(Math.abs(e) / 60, 2) : Y(e, t);
|
|
1635
|
+
}
|
|
1636
|
+
function wn(e, t = "") {
|
|
1637
|
+
const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), i = r % 60;
|
|
1638
|
+
return i === 0 ? n + String(a) : n + String(a) + t + H(i, 2);
|
|
1639
|
+
}
|
|
1640
|
+
function oe(e) {
|
|
1641
|
+
const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
|
|
1642
|
+
return t.setUTCFullYear(e.getFullYear()), +e - +t;
|
|
1643
|
+
}
|
|
1644
|
+
const Dn = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, q = 36e5, ue = 6e4, yn = 2, h = {
|
|
1645
|
+
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
1646
|
+
datePattern: /^([0-9W+-]+)(.*)/,
|
|
1647
|
+
// year tokens
|
|
1648
|
+
YY: /^(\d{2})$/,
|
|
1649
|
+
YYY: [
|
|
1650
|
+
/^([+-]\d{2})$/,
|
|
1651
|
+
// 0 additional digits
|
|
1652
|
+
/^([+-]\d{3})$/,
|
|
1653
|
+
// 1 additional digit
|
|
1654
|
+
/^([+-]\d{4})$/
|
|
1655
|
+
// 2 additional digits
|
|
1656
|
+
],
|
|
1657
|
+
YYYY: /^(\d{4})/,
|
|
1658
|
+
YYYYY: [
|
|
1659
|
+
/^([+-]\d{4})/,
|
|
1660
|
+
// 0 additional digits
|
|
1661
|
+
/^([+-]\d{5})/,
|
|
1662
|
+
// 1 additional digit
|
|
1663
|
+
/^([+-]\d{6})/
|
|
1664
|
+
// 2 additional digits
|
|
1665
|
+
],
|
|
1666
|
+
// date tokens
|
|
1667
|
+
MM: /^-(\d{2})$/,
|
|
1668
|
+
DDD: /^-?(\d{3})$/,
|
|
1669
|
+
MMDD: /^-?(\d{2})-?(\d{2})$/,
|
|
1670
|
+
Www: /^-?W(\d{2})$/,
|
|
1671
|
+
WwwD: /^-?W(\d{2})-?(\d{1})$/,
|
|
1672
|
+
HH: /^(\d{2}([.,]\d*)?)$/,
|
|
1673
|
+
HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1674
|
+
HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1675
|
+
// time zone tokens (to identify the presence of a tz)
|
|
1676
|
+
timeZone: Dn
|
|
1677
|
+
};
|
|
1678
|
+
function Te(e, t = {}) {
|
|
1679
|
+
if (arguments.length < 1)
|
|
1680
|
+
throw new TypeError("1 argument required, but only " + arguments.length + " present");
|
|
1681
|
+
if (e === null)
|
|
1682
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1683
|
+
const n = t.additionalDigits == null ? yn : Number(t.additionalDigits);
|
|
1684
|
+
if (n !== 2 && n !== 1 && n !== 0)
|
|
1685
|
+
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
1686
|
+
if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
|
|
1687
|
+
return new Date(e.getTime());
|
|
1688
|
+
if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]")
|
|
1689
|
+
return new Date(e);
|
|
1690
|
+
if (Object.prototype.toString.call(e) !== "[object String]")
|
|
1691
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1692
|
+
const r = bn(e), { year: a, restDateString: i } = Mn(r.date, n), s = Tn(i, a);
|
|
1693
|
+
if (s === null || isNaN(s.getTime()))
|
|
1694
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1695
|
+
if (s) {
|
|
1696
|
+
const o = s.getTime();
|
|
1697
|
+
let u = 0, c;
|
|
1698
|
+
if (r.time && (u = On(r.time), u === null || isNaN(u)))
|
|
1699
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1700
|
+
if (r.timeZone || t.timeZone) {
|
|
1701
|
+
if (c = A(r.timeZone || t.timeZone, new Date(o + u)), isNaN(c))
|
|
1702
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1703
|
+
} else
|
|
1704
|
+
c = oe(new Date(o + u)), c = oe(new Date(o + u + c));
|
|
1705
|
+
return new Date(o + u + c);
|
|
1706
|
+
} else
|
|
1707
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
1708
|
+
}
|
|
1709
|
+
function bn(e) {
|
|
1710
|
+
const t = {};
|
|
1711
|
+
let n = h.dateTimePattern.exec(e), r;
|
|
1712
|
+
if (n ? (t.date = n[1], r = n[3]) : (n = h.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
|
|
1713
|
+
const a = h.timeZone.exec(r);
|
|
1714
|
+
a ? (t.time = r.replace(a[1], ""), t.timeZone = a[1].trim()) : t.time = r;
|
|
1715
|
+
}
|
|
1716
|
+
return t;
|
|
1717
|
+
}
|
|
1718
|
+
function Mn(e, t) {
|
|
1719
|
+
if (e) {
|
|
1720
|
+
const n = h.YYY[t], r = h.YYYYY[t];
|
|
1721
|
+
let a = h.YYYY.exec(e) || r.exec(e);
|
|
1722
|
+
if (a) {
|
|
1723
|
+
const i = a[1];
|
|
1724
|
+
return {
|
|
1725
|
+
year: parseInt(i, 10),
|
|
1726
|
+
restDateString: e.slice(i.length)
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
if (a = h.YY.exec(e) || n.exec(e), a) {
|
|
1730
|
+
const i = a[1];
|
|
1731
|
+
return {
|
|
1732
|
+
year: parseInt(i, 10) * 100,
|
|
1733
|
+
restDateString: e.slice(i.length)
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
return {
|
|
1738
|
+
year: null
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
function Tn(e, t) {
|
|
1742
|
+
if (t === null)
|
|
1743
|
+
return null;
|
|
1744
|
+
let n, r, a;
|
|
1745
|
+
if (!e || !e.length)
|
|
1746
|
+
return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
|
|
1747
|
+
let i = h.MM.exec(e);
|
|
1748
|
+
if (i)
|
|
1749
|
+
return n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1, fe(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
|
|
1750
|
+
if (i = h.DDD.exec(e), i) {
|
|
1751
|
+
n = /* @__PURE__ */ new Date(0);
|
|
1752
|
+
const s = parseInt(i[1], 10);
|
|
1753
|
+
return Yn(t, s) ? (n.setUTCFullYear(t, 0, s), n) : /* @__PURE__ */ new Date(NaN);
|
|
1754
|
+
}
|
|
1755
|
+
if (i = h.MMDD.exec(e), i) {
|
|
1756
|
+
n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1;
|
|
1757
|
+
const s = parseInt(i[2], 10);
|
|
1758
|
+
return fe(t, r, s) ? (n.setUTCFullYear(t, r, s), n) : /* @__PURE__ */ new Date(NaN);
|
|
1759
|
+
}
|
|
1760
|
+
if (i = h.Www.exec(e), i)
|
|
1761
|
+
return a = parseInt(i[1], 10) - 1, de(a) ? ce(t, a) : /* @__PURE__ */ new Date(NaN);
|
|
1762
|
+
if (i = h.WwwD.exec(e), i) {
|
|
1763
|
+
a = parseInt(i[1], 10) - 1;
|
|
1764
|
+
const s = parseInt(i[2], 10) - 1;
|
|
1765
|
+
return de(a, s) ? ce(t, a, s) : /* @__PURE__ */ new Date(NaN);
|
|
1766
|
+
}
|
|
1767
|
+
return null;
|
|
1768
|
+
}
|
|
1769
|
+
function On(e) {
|
|
1770
|
+
let t, n, r = h.HH.exec(e);
|
|
1771
|
+
if (r)
|
|
1772
|
+
return t = parseFloat(r[1].replace(",", ".")), R(t) ? t % 24 * q : NaN;
|
|
1773
|
+
if (r = h.HHMM.exec(e), r)
|
|
1774
|
+
return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), R(t, n) ? t % 24 * q + n * ue : NaN;
|
|
1775
|
+
if (r = h.HHMMSS.exec(e), r) {
|
|
1776
|
+
t = parseInt(r[1], 10), n = parseInt(r[2], 10);
|
|
1777
|
+
const a = parseFloat(r[3].replace(",", "."));
|
|
1778
|
+
return R(t, n, a) ? t % 24 * q + n * ue + a * 1e3 : NaN;
|
|
1779
|
+
}
|
|
1780
|
+
return null;
|
|
1781
|
+
}
|
|
1782
|
+
function ce(e, t, n) {
|
|
1783
|
+
t = t || 0, n = n || 0;
|
|
1784
|
+
const r = /* @__PURE__ */ new Date(0);
|
|
1785
|
+
r.setUTCFullYear(e, 0, 4);
|
|
1786
|
+
const a = r.getUTCDay() || 7, i = t * 7 + n + 1 - a;
|
|
1787
|
+
return r.setUTCDate(r.getUTCDate() + i), r;
|
|
1788
|
+
}
|
|
1789
|
+
const Nn = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], xn = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1790
|
+
function Oe(e) {
|
|
1791
|
+
return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
|
|
1792
|
+
}
|
|
1793
|
+
function fe(e, t, n) {
|
|
1794
|
+
if (t < 0 || t > 11)
|
|
1795
|
+
return !1;
|
|
1796
|
+
if (n != null) {
|
|
1797
|
+
if (n < 1)
|
|
1798
|
+
return !1;
|
|
1799
|
+
const r = Oe(e);
|
|
1800
|
+
if (r && n > xn[t] || !r && n > Nn[t])
|
|
1801
|
+
return !1;
|
|
1802
|
+
}
|
|
1803
|
+
return !0;
|
|
1804
|
+
}
|
|
1805
|
+
function Yn(e, t) {
|
|
1806
|
+
if (t < 1)
|
|
1807
|
+
return !1;
|
|
1808
|
+
const n = Oe(e);
|
|
1809
|
+
return !(n && t > 366 || !n && t > 365);
|
|
1810
|
+
}
|
|
1811
|
+
function de(e, t) {
|
|
1812
|
+
return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
|
|
1813
|
+
}
|
|
1814
|
+
function R(e, t, n) {
|
|
1815
|
+
return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
|
|
1816
|
+
}
|
|
1817
|
+
const pn = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
1818
|
+
function Pn(e, t, n = {}) {
|
|
1819
|
+
t = String(t);
|
|
1820
|
+
const r = t.match(pn);
|
|
1821
|
+
if (r) {
|
|
1822
|
+
const a = Te(n.originalDate || e, n);
|
|
1823
|
+
t = r.reduce(function(i, s) {
|
|
1824
|
+
if (s[0] === "'")
|
|
1825
|
+
return i;
|
|
1826
|
+
const o = i.indexOf(s), u = i[o - 1] === "'", c = i.replace(s, "'" + gn[s[0]](a, s, n) + "'");
|
|
1827
|
+
return u ? c.substring(0, o - 1) + c.substring(o + 1) : c;
|
|
1828
|
+
}, t);
|
|
1829
|
+
}
|
|
1830
|
+
return pt(e, t, n);
|
|
1831
|
+
}
|
|
1832
|
+
function Sn(e, t, n) {
|
|
1833
|
+
e = Te(e, n);
|
|
1834
|
+
const r = A(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
|
|
1835
|
+
return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
|
|
1836
|
+
}
|
|
1837
|
+
function vn(e, t, n, r) {
|
|
1838
|
+
return r = {
|
|
1839
|
+
...r,
|
|
1840
|
+
timeZone: t,
|
|
1841
|
+
originalDate: e
|
|
1842
|
+
}, Pn(Sn(e, t, { timeZone: r.timeZone }), n, r);
|
|
1843
|
+
}
|
|
1844
|
+
export {
|
|
1845
|
+
kn as a,
|
|
1846
|
+
pt as b,
|
|
1847
|
+
T as c,
|
|
1848
|
+
Dn as d,
|
|
1849
|
+
Te as e,
|
|
1850
|
+
vn as f,
|
|
1851
|
+
A as g,
|
|
1852
|
+
Sn as h,
|
|
1853
|
+
ge as m,
|
|
1854
|
+
Me as n,
|
|
1855
|
+
Wn as p,
|
|
1856
|
+
d as t
|
|
1857
|
+
};
|