@knime/jsonforms 1.15.2 → 1.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{AnyOfTwinlist--MdzLj12.js → AnyOfTwinlist-KB0IjyOd.js} +1 -1
- package/dist/{Button-V53sPts7.js → Button-B6NccR4s.js} +1 -1
- package/dist/{CheckboxControl-DxmF67Fl.js → CheckboxControl-CYfjLF_Q.js} +1 -1
- package/dist/{Checkboxes-Dc2mE1E7.js → Checkboxes-D2Of8wBA.js} +1 -1
- package/dist/{CheckboxesControl-MTDoYv6o.js → CheckboxesControl-BktrOnVe.js} +3 -3
- package/dist/{ComboBoxControl-eTVu0ilp.js → ComboBoxControl-BUOtNRUR.js} +2 -2
- package/dist/DateControl-CR9yBHT0.js +34 -0
- package/dist/{DateTimeControl-BscBtjDl.js → DateTimeControl-mxyPurHh.js} +8 -9
- package/dist/{DateTimeFormatInput-CnxjE9CW.js → DateTimeFormatInput-CRxeQ0Zh.js} +3 -3
- package/dist/{DateTimeFormatPickerControl-CYOPU0JI.js → DateTimeFormatPickerControl-CehuGkzU.js} +2 -2
- package/dist/{DateTimeFormatPickerWithTypeControl-Cw0R0IXT.js → DateTimeFormatPickerWithTypeControl-mC42XrIO.js} +3 -3
- package/dist/{Dropdown-DYa_CZWd.js → Dropdown-BeD0EGmH.js} +2 -2
- package/dist/{DropdownControl-ChX3Fkhd.js → DropdownControl-BzJ4RWdp.js} +2 -2
- package/dist/{HorizontalLayout-DZvUpTvS.js → HorizontalLayout-D7SNG8xY.js} +1 -1
- package/dist/{InputField-BFt5Zzv5.js → InputField-Z_TvmegD.js} +1 -1
- package/dist/{IntegerControl-BD7DJKmE.js → IntegerControl-BumFaaD0.js} +1 -1
- package/dist/{IntervalControl-BvpmygdW.js → IntervalControl-CsmmAUQZ.js} +3 -3
- package/dist/{LoadingDropdown-CyKWt1IO.js → LoadingDropdown-rhddxaPI.js} +3 -3
- package/dist/{LoadingIcon-BqKwArbh.js → LoadingIcon-Fu4ZKrdj.js} +1 -1
- package/dist/{ManualTwinlistControl-QbonJ1LT.js → ManualTwinlistControl-phvyxHwm.js} +4 -4
- package/dist/{MultiSelectListBoxControl-D6JvhoAd.js → MultiSelectListBoxControl-8TfBURKM.js} +2 -2
- package/dist/{MultimodeTwinlistControl-2Rotlohs.js → MultimodeTwinlistControl-Dm1PWjAe.js} +6 -6
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_2c8e8d82_lang-Cal28Ekk.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_2c8e8d82_lang-BR3eNADi.js} +1 -1
- package/dist/{MultiselectListBox-DPzM2Ttt.js → MultiselectListBox-B31ZfMfu.js} +2 -2
- package/dist/{NameFilter-CU8FByJ_.js → NameFilter-BA29AcPW.js} +1 -1
- package/dist/{NumberControl-BdT6fi25.js → NumberControl-Da2etxiM.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-Bld73u64.js → NumberControlBase.vue_vue_type_script_setup_true_lang-BNrHgQ8S.js} +2 -2
- package/dist/{NumberInput-7lO4sZya.js → NumberInput-DYMhWjUe.js} +1 -1
- package/dist/{OneOfDropdown-DB1aVf_c.js → OneOfDropdown-DKmDvBWW.js} +1 -1
- package/dist/{RadioControl-CuVOGSxA.js → RadioControl-BXUGZ9wv.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-CiHB1cWM.js → RadioControlBase.vue_vue_type_script_setup_true_lang-W1ekTlJW.js} +3 -3
- package/dist/{RichTextControl-GezlZvsV.js → RichTextControl-CmHdELxR.js} +4 -4
- package/dist/{SectionHeading-D5y3im2k.js → SectionHeading-BG2yzVJD.js} +1 -1
- package/dist/{SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-1WZC8AqN.js → SectionHeading.vue_vue_type_style_index_0_scoped_625edfbe_lang-CB-Psmtt.js} +34 -34
- package/dist/{SectionLayout-Cg1g2Yo3.js → SectionLayout-Bnm0Jl3H.js} +3 -3
- package/dist/{SettingsSubPanel-B6gyM99J.js → SettingsSubPanel-BY9KQcH7.js} +1 -1
- package/dist/{SettingsSubPanelLayout-DVclglW2.js → SettingsSubPanelLayout-DWhYLL3Z.js} +4 -4
- package/dist/{SimpleButtonControl-DFTQjOZI.js → SimpleButtonControl-bjRoDhnR.js} +2 -2
- package/dist/{SimpleTwinlistControl-DMPdJAZ9.js → SimpleTwinlistControl-DqRByJvP.js} +2 -2
- package/dist/{SingleSelectControl-BGFi0465.js → SingleSelectControl-C8xAQWvt.js} +2 -2
- package/dist/{SingleSelectListBoxControl-BE7-OUkf.js → SingleSelectListBoxControl-DOA07yeJ.js} +3 -3
- package/dist/{SortListControl-qqG_jOzq.js → SortListControl-BfpG7HYZ.js} +6 -6
- package/dist/{StyledListItem-xeXwpQpT.js → StyledListItem-B9I3u4_i.js} +1 -1
- package/dist/{TextAreaControl-CWVnSSxA.js → TextAreaControl-C7ICVJ17.js} +1 -1
- package/dist/{TextControl-ByEqNjPa.js → TextControl-9dzJf6hH.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-CTLy3TVR.js → TextControl.vue_vue_type_script_setup_true_lang-B2nV46-b.js} +3 -3
- package/dist/{TimeControl-C4nZHiqg.js → TimeControl-cbvEThGD.js} +11 -12
- package/dist/{TwinlistControlBase-D0xdGWtx.js → TwinlistControlBase-D6ffMZbh.js} +3 -3
- package/dist/{TwinlistLoadingInfo-DbxgK_4I.js → TwinlistLoadingInfo-CB-TBzpK.js} +4 -4
- package/dist/{TypedStringFilter-BC23XyG4.js → TypedStringFilter-C8njK-LK.js} +1 -1
- package/dist/{ValueSwitch-DZ5vEThg.js → ValueSwitch-BkpbDab4.js} +1 -1
- package/dist/{ValueSwitchControl-CE1tgpks.js → ValueSwitchControl-DuvmApeV.js} +1 -1
- package/dist/{VerticalLayout-1r4v5PV2.js → VerticalLayout-Cpti_fKY.js} +2 -2
- package/dist/{VerticalLayoutBase-C42y1fUX.js → VerticalLayoutBase-BHsF4RN4.js} +1 -1
- package/dist/{ZonedDateTimeControl-2naMUn7s.js → ZonedDateTimeControl-CjOD_mZp.js} +8 -9
- package/dist/{_baseEach-BSevR6MA.js → _baseEach-V7XhUaXb.js} +2 -2
- package/dist/{_baseIteratee-1E2Ks-cN.js → _baseIteratee-C1so1JZP.js} +3 -3
- package/dist/{_getTag-Ccp_NogL.js → _getTag-BHYRy9P4.js} +1 -1
- package/dist/knime-jsonforms.js +7 -7
- package/dist/{DateTimeInput-DZ-22w4C.js → localTimeUtils-_Nz5xQcb.js} +4403 -3543
- package/dist/testing.js +2 -2
- package/dist/{toString-CSnbWb-n.js → toString-B48cVDY_.js} +1 -1
- package/dist/{useBuiltinValidations-rwOsR_Sq.js → useBuiltinValidations-CllSUxkL.js} +1 -1
- package/dist/{usePossibleValues-DXZusnxu.js → usePossibleValues-DwOe-HFF.js} +1 -1
- package/package.json +1 -1
- package/dist/DateControl-DsBPH7xg.js +0 -29
- package/dist/localTimeUtils-ofPz-s5l.js +0 -884
|
@@ -1,884 +0,0 @@
|
|
|
1
|
-
import { r as q, t as k, g as F, a as Z, b as j, c as z, d as _, e as V, l as K, i as A, f as J, s as ee, h as te, j as re, k as L, m as ae, n as I, o as P, p as ne } from "./DateTimeInput-DZ-22w4C.js";
|
|
2
|
-
var ie = 864e5;
|
|
3
|
-
function oe(n) {
|
|
4
|
-
q(1, arguments);
|
|
5
|
-
var e = k(n), r = e.getTime();
|
|
6
|
-
e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
|
|
7
|
-
var t = e.getTime(), a = r - t;
|
|
8
|
-
return Math.floor(a / ie) + 1;
|
|
9
|
-
}
|
|
10
|
-
function u(n, e) {
|
|
11
|
-
for (var r = n < 0 ? "-" : "", t = Math.abs(n).toString(); t.length < e; )
|
|
12
|
-
t = "0" + t;
|
|
13
|
-
return r + t;
|
|
14
|
-
}
|
|
15
|
-
var g = {
|
|
16
|
-
// Year
|
|
17
|
-
y: function(e, r) {
|
|
18
|
-
var t = e.getUTCFullYear(), a = t > 0 ? t : 1 - t;
|
|
19
|
-
return u(r === "yy" ? a % 100 : a, r.length);
|
|
20
|
-
},
|
|
21
|
-
// Month
|
|
22
|
-
M: function(e, r) {
|
|
23
|
-
var t = e.getUTCMonth();
|
|
24
|
-
return r === "M" ? String(t + 1) : u(t + 1, 2);
|
|
25
|
-
},
|
|
26
|
-
// Day of the month
|
|
27
|
-
d: function(e, r) {
|
|
28
|
-
return u(e.getUTCDate(), r.length);
|
|
29
|
-
},
|
|
30
|
-
// AM or PM
|
|
31
|
-
a: function(e, r) {
|
|
32
|
-
var t = e.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
33
|
-
switch (r) {
|
|
34
|
-
case "a":
|
|
35
|
-
case "aa":
|
|
36
|
-
return t.toUpperCase();
|
|
37
|
-
case "aaa":
|
|
38
|
-
return t;
|
|
39
|
-
case "aaaaa":
|
|
40
|
-
return t[0];
|
|
41
|
-
case "aaaa":
|
|
42
|
-
default:
|
|
43
|
-
return t === "am" ? "a.m." : "p.m.";
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
// Hour [1-12]
|
|
47
|
-
h: function(e, r) {
|
|
48
|
-
return u(e.getUTCHours() % 12 || 12, r.length);
|
|
49
|
-
},
|
|
50
|
-
// Hour [0-23]
|
|
51
|
-
H: function(e, r) {
|
|
52
|
-
return u(e.getUTCHours(), r.length);
|
|
53
|
-
},
|
|
54
|
-
// Minute
|
|
55
|
-
m: function(e, r) {
|
|
56
|
-
return u(e.getUTCMinutes(), r.length);
|
|
57
|
-
},
|
|
58
|
-
// Second
|
|
59
|
-
s: function(e, r) {
|
|
60
|
-
return u(e.getUTCSeconds(), r.length);
|
|
61
|
-
},
|
|
62
|
-
// Fraction of second
|
|
63
|
-
S: function(e, r) {
|
|
64
|
-
var t = r.length, a = e.getUTCMilliseconds(), i = Math.floor(a * Math.pow(10, t - 3));
|
|
65
|
-
return u(i, r.length);
|
|
66
|
-
}
|
|
67
|
-
}, w = {
|
|
68
|
-
midnight: "midnight",
|
|
69
|
-
noon: "noon",
|
|
70
|
-
morning: "morning",
|
|
71
|
-
afternoon: "afternoon",
|
|
72
|
-
evening: "evening",
|
|
73
|
-
night: "night"
|
|
74
|
-
}, ue = {
|
|
75
|
-
// Era
|
|
76
|
-
G: function(e, r, t) {
|
|
77
|
-
var a = e.getUTCFullYear() > 0 ? 1 : 0;
|
|
78
|
-
switch (r) {
|
|
79
|
-
// AD, BC
|
|
80
|
-
case "G":
|
|
81
|
-
case "GG":
|
|
82
|
-
case "GGG":
|
|
83
|
-
return t.era(a, {
|
|
84
|
-
width: "abbreviated"
|
|
85
|
-
});
|
|
86
|
-
// A, B
|
|
87
|
-
case "GGGGG":
|
|
88
|
-
return t.era(a, {
|
|
89
|
-
width: "narrow"
|
|
90
|
-
});
|
|
91
|
-
// Anno Domini, Before Christ
|
|
92
|
-
case "GGGG":
|
|
93
|
-
default:
|
|
94
|
-
return t.era(a, {
|
|
95
|
-
width: "wide"
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
// Year
|
|
100
|
-
y: function(e, r, t) {
|
|
101
|
-
if (r === "yo") {
|
|
102
|
-
var a = e.getUTCFullYear(), i = a > 0 ? a : 1 - a;
|
|
103
|
-
return t.ordinalNumber(i, {
|
|
104
|
-
unit: "year"
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return g.y(e, r);
|
|
108
|
-
},
|
|
109
|
-
// Local week-numbering year
|
|
110
|
-
Y: function(e, r, t, a) {
|
|
111
|
-
var i = z(e, a), o = i > 0 ? i : 1 - i;
|
|
112
|
-
if (r === "YY") {
|
|
113
|
-
var c = o % 100;
|
|
114
|
-
return u(c, 2);
|
|
115
|
-
}
|
|
116
|
-
return r === "Yo" ? t.ordinalNumber(o, {
|
|
117
|
-
unit: "year"
|
|
118
|
-
}) : u(o, r.length);
|
|
119
|
-
},
|
|
120
|
-
// ISO week-numbering year
|
|
121
|
-
R: function(e, r) {
|
|
122
|
-
var t = j(e);
|
|
123
|
-
return u(t, r.length);
|
|
124
|
-
},
|
|
125
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
126
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
127
|
-
// | Year | `y` | `u` |
|
|
128
|
-
// |------|-----|-----|
|
|
129
|
-
// | AC 1 | 1 | 1 |
|
|
130
|
-
// | BC 1 | 1 | 0 |
|
|
131
|
-
// | BC 2 | 2 | -1 |
|
|
132
|
-
// Also `yy` always returns the last two digits of a year,
|
|
133
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
134
|
-
u: function(e, r) {
|
|
135
|
-
var t = e.getUTCFullYear();
|
|
136
|
-
return u(t, r.length);
|
|
137
|
-
},
|
|
138
|
-
// Quarter
|
|
139
|
-
Q: function(e, r, t) {
|
|
140
|
-
var a = Math.ceil((e.getUTCMonth() + 1) / 3);
|
|
141
|
-
switch (r) {
|
|
142
|
-
// 1, 2, 3, 4
|
|
143
|
-
case "Q":
|
|
144
|
-
return String(a);
|
|
145
|
-
// 01, 02, 03, 04
|
|
146
|
-
case "QQ":
|
|
147
|
-
return u(a, 2);
|
|
148
|
-
// 1st, 2nd, 3rd, 4th
|
|
149
|
-
case "Qo":
|
|
150
|
-
return t.ordinalNumber(a, {
|
|
151
|
-
unit: "quarter"
|
|
152
|
-
});
|
|
153
|
-
// Q1, Q2, Q3, Q4
|
|
154
|
-
case "QQQ":
|
|
155
|
-
return t.quarter(a, {
|
|
156
|
-
width: "abbreviated",
|
|
157
|
-
context: "formatting"
|
|
158
|
-
});
|
|
159
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
160
|
-
case "QQQQQ":
|
|
161
|
-
return t.quarter(a, {
|
|
162
|
-
width: "narrow",
|
|
163
|
-
context: "formatting"
|
|
164
|
-
});
|
|
165
|
-
// 1st quarter, 2nd quarter, ...
|
|
166
|
-
case "QQQQ":
|
|
167
|
-
default:
|
|
168
|
-
return t.quarter(a, {
|
|
169
|
-
width: "wide",
|
|
170
|
-
context: "formatting"
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
// Stand-alone quarter
|
|
175
|
-
q: function(e, r, t) {
|
|
176
|
-
var a = Math.ceil((e.getUTCMonth() + 1) / 3);
|
|
177
|
-
switch (r) {
|
|
178
|
-
// 1, 2, 3, 4
|
|
179
|
-
case "q":
|
|
180
|
-
return String(a);
|
|
181
|
-
// 01, 02, 03, 04
|
|
182
|
-
case "qq":
|
|
183
|
-
return u(a, 2);
|
|
184
|
-
// 1st, 2nd, 3rd, 4th
|
|
185
|
-
case "qo":
|
|
186
|
-
return t.ordinalNumber(a, {
|
|
187
|
-
unit: "quarter"
|
|
188
|
-
});
|
|
189
|
-
// Q1, Q2, Q3, Q4
|
|
190
|
-
case "qqq":
|
|
191
|
-
return t.quarter(a, {
|
|
192
|
-
width: "abbreviated",
|
|
193
|
-
context: "standalone"
|
|
194
|
-
});
|
|
195
|
-
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
196
|
-
case "qqqqq":
|
|
197
|
-
return t.quarter(a, {
|
|
198
|
-
width: "narrow",
|
|
199
|
-
context: "standalone"
|
|
200
|
-
});
|
|
201
|
-
// 1st quarter, 2nd quarter, ...
|
|
202
|
-
case "qqqq":
|
|
203
|
-
default:
|
|
204
|
-
return t.quarter(a, {
|
|
205
|
-
width: "wide",
|
|
206
|
-
context: "standalone"
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
// Month
|
|
211
|
-
M: function(e, r, t) {
|
|
212
|
-
var a = e.getUTCMonth();
|
|
213
|
-
switch (r) {
|
|
214
|
-
case "M":
|
|
215
|
-
case "MM":
|
|
216
|
-
return g.M(e, r);
|
|
217
|
-
// 1st, 2nd, ..., 12th
|
|
218
|
-
case "Mo":
|
|
219
|
-
return t.ordinalNumber(a + 1, {
|
|
220
|
-
unit: "month"
|
|
221
|
-
});
|
|
222
|
-
// Jan, Feb, ..., Dec
|
|
223
|
-
case "MMM":
|
|
224
|
-
return t.month(a, {
|
|
225
|
-
width: "abbreviated",
|
|
226
|
-
context: "formatting"
|
|
227
|
-
});
|
|
228
|
-
// J, F, ..., D
|
|
229
|
-
case "MMMMM":
|
|
230
|
-
return t.month(a, {
|
|
231
|
-
width: "narrow",
|
|
232
|
-
context: "formatting"
|
|
233
|
-
});
|
|
234
|
-
// January, February, ..., December
|
|
235
|
-
case "MMMM":
|
|
236
|
-
default:
|
|
237
|
-
return t.month(a, {
|
|
238
|
-
width: "wide",
|
|
239
|
-
context: "formatting"
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
// Stand-alone month
|
|
244
|
-
L: function(e, r, t) {
|
|
245
|
-
var a = e.getUTCMonth();
|
|
246
|
-
switch (r) {
|
|
247
|
-
// 1, 2, ..., 12
|
|
248
|
-
case "L":
|
|
249
|
-
return String(a + 1);
|
|
250
|
-
// 01, 02, ..., 12
|
|
251
|
-
case "LL":
|
|
252
|
-
return u(a + 1, 2);
|
|
253
|
-
// 1st, 2nd, ..., 12th
|
|
254
|
-
case "Lo":
|
|
255
|
-
return t.ordinalNumber(a + 1, {
|
|
256
|
-
unit: "month"
|
|
257
|
-
});
|
|
258
|
-
// Jan, Feb, ..., Dec
|
|
259
|
-
case "LLL":
|
|
260
|
-
return t.month(a, {
|
|
261
|
-
width: "abbreviated",
|
|
262
|
-
context: "standalone"
|
|
263
|
-
});
|
|
264
|
-
// J, F, ..., D
|
|
265
|
-
case "LLLLL":
|
|
266
|
-
return t.month(a, {
|
|
267
|
-
width: "narrow",
|
|
268
|
-
context: "standalone"
|
|
269
|
-
});
|
|
270
|
-
// January, February, ..., December
|
|
271
|
-
case "LLLL":
|
|
272
|
-
default:
|
|
273
|
-
return t.month(a, {
|
|
274
|
-
width: "wide",
|
|
275
|
-
context: "standalone"
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
// Local week of year
|
|
280
|
-
w: function(e, r, t, a) {
|
|
281
|
-
var i = Z(e, a);
|
|
282
|
-
return r === "wo" ? t.ordinalNumber(i, {
|
|
283
|
-
unit: "week"
|
|
284
|
-
}) : u(i, r.length);
|
|
285
|
-
},
|
|
286
|
-
// ISO week of year
|
|
287
|
-
I: function(e, r, t) {
|
|
288
|
-
var a = F(e);
|
|
289
|
-
return r === "Io" ? t.ordinalNumber(a, {
|
|
290
|
-
unit: "week"
|
|
291
|
-
}) : u(a, r.length);
|
|
292
|
-
},
|
|
293
|
-
// Day of the month
|
|
294
|
-
d: function(e, r, t) {
|
|
295
|
-
return r === "do" ? t.ordinalNumber(e.getUTCDate(), {
|
|
296
|
-
unit: "date"
|
|
297
|
-
}) : g.d(e, r);
|
|
298
|
-
},
|
|
299
|
-
// Day of year
|
|
300
|
-
D: function(e, r, t) {
|
|
301
|
-
var a = oe(e);
|
|
302
|
-
return r === "Do" ? t.ordinalNumber(a, {
|
|
303
|
-
unit: "dayOfYear"
|
|
304
|
-
}) : u(a, r.length);
|
|
305
|
-
},
|
|
306
|
-
// Day of week
|
|
307
|
-
E: function(e, r, t) {
|
|
308
|
-
var a = e.getUTCDay();
|
|
309
|
-
switch (r) {
|
|
310
|
-
// Tue
|
|
311
|
-
case "E":
|
|
312
|
-
case "EE":
|
|
313
|
-
case "EEE":
|
|
314
|
-
return t.day(a, {
|
|
315
|
-
width: "abbreviated",
|
|
316
|
-
context: "formatting"
|
|
317
|
-
});
|
|
318
|
-
// T
|
|
319
|
-
case "EEEEE":
|
|
320
|
-
return t.day(a, {
|
|
321
|
-
width: "narrow",
|
|
322
|
-
context: "formatting"
|
|
323
|
-
});
|
|
324
|
-
// Tu
|
|
325
|
-
case "EEEEEE":
|
|
326
|
-
return t.day(a, {
|
|
327
|
-
width: "short",
|
|
328
|
-
context: "formatting"
|
|
329
|
-
});
|
|
330
|
-
// Tuesday
|
|
331
|
-
case "EEEE":
|
|
332
|
-
default:
|
|
333
|
-
return t.day(a, {
|
|
334
|
-
width: "wide",
|
|
335
|
-
context: "formatting"
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
// Local day of week
|
|
340
|
-
e: function(e, r, t, a) {
|
|
341
|
-
var i = e.getUTCDay(), o = (i - a.weekStartsOn + 8) % 7 || 7;
|
|
342
|
-
switch (r) {
|
|
343
|
-
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
344
|
-
case "e":
|
|
345
|
-
return String(o);
|
|
346
|
-
// Padded numerical value
|
|
347
|
-
case "ee":
|
|
348
|
-
return u(o, 2);
|
|
349
|
-
// 1st, 2nd, ..., 7th
|
|
350
|
-
case "eo":
|
|
351
|
-
return t.ordinalNumber(o, {
|
|
352
|
-
unit: "day"
|
|
353
|
-
});
|
|
354
|
-
case "eee":
|
|
355
|
-
return t.day(i, {
|
|
356
|
-
width: "abbreviated",
|
|
357
|
-
context: "formatting"
|
|
358
|
-
});
|
|
359
|
-
// T
|
|
360
|
-
case "eeeee":
|
|
361
|
-
return t.day(i, {
|
|
362
|
-
width: "narrow",
|
|
363
|
-
context: "formatting"
|
|
364
|
-
});
|
|
365
|
-
// Tu
|
|
366
|
-
case "eeeeee":
|
|
367
|
-
return t.day(i, {
|
|
368
|
-
width: "short",
|
|
369
|
-
context: "formatting"
|
|
370
|
-
});
|
|
371
|
-
// Tuesday
|
|
372
|
-
case "eeee":
|
|
373
|
-
default:
|
|
374
|
-
return t.day(i, {
|
|
375
|
-
width: "wide",
|
|
376
|
-
context: "formatting"
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
// Stand-alone local day of week
|
|
381
|
-
c: function(e, r, t, a) {
|
|
382
|
-
var i = e.getUTCDay(), o = (i - a.weekStartsOn + 8) % 7 || 7;
|
|
383
|
-
switch (r) {
|
|
384
|
-
// Numerical value (same as in `e`)
|
|
385
|
-
case "c":
|
|
386
|
-
return String(o);
|
|
387
|
-
// Padded numerical value
|
|
388
|
-
case "cc":
|
|
389
|
-
return u(o, r.length);
|
|
390
|
-
// 1st, 2nd, ..., 7th
|
|
391
|
-
case "co":
|
|
392
|
-
return t.ordinalNumber(o, {
|
|
393
|
-
unit: "day"
|
|
394
|
-
});
|
|
395
|
-
case "ccc":
|
|
396
|
-
return t.day(i, {
|
|
397
|
-
width: "abbreviated",
|
|
398
|
-
context: "standalone"
|
|
399
|
-
});
|
|
400
|
-
// T
|
|
401
|
-
case "ccccc":
|
|
402
|
-
return t.day(i, {
|
|
403
|
-
width: "narrow",
|
|
404
|
-
context: "standalone"
|
|
405
|
-
});
|
|
406
|
-
// Tu
|
|
407
|
-
case "cccccc":
|
|
408
|
-
return t.day(i, {
|
|
409
|
-
width: "short",
|
|
410
|
-
context: "standalone"
|
|
411
|
-
});
|
|
412
|
-
// Tuesday
|
|
413
|
-
case "cccc":
|
|
414
|
-
default:
|
|
415
|
-
return t.day(i, {
|
|
416
|
-
width: "wide",
|
|
417
|
-
context: "standalone"
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
},
|
|
421
|
-
// ISO day of week
|
|
422
|
-
i: function(e, r, t) {
|
|
423
|
-
var a = e.getUTCDay(), i = a === 0 ? 7 : a;
|
|
424
|
-
switch (r) {
|
|
425
|
-
// 2
|
|
426
|
-
case "i":
|
|
427
|
-
return String(i);
|
|
428
|
-
// 02
|
|
429
|
-
case "ii":
|
|
430
|
-
return u(i, r.length);
|
|
431
|
-
// 2nd
|
|
432
|
-
case "io":
|
|
433
|
-
return t.ordinalNumber(i, {
|
|
434
|
-
unit: "day"
|
|
435
|
-
});
|
|
436
|
-
// Tue
|
|
437
|
-
case "iii":
|
|
438
|
-
return t.day(a, {
|
|
439
|
-
width: "abbreviated",
|
|
440
|
-
context: "formatting"
|
|
441
|
-
});
|
|
442
|
-
// T
|
|
443
|
-
case "iiiii":
|
|
444
|
-
return t.day(a, {
|
|
445
|
-
width: "narrow",
|
|
446
|
-
context: "formatting"
|
|
447
|
-
});
|
|
448
|
-
// Tu
|
|
449
|
-
case "iiiiii":
|
|
450
|
-
return t.day(a, {
|
|
451
|
-
width: "short",
|
|
452
|
-
context: "formatting"
|
|
453
|
-
});
|
|
454
|
-
// Tuesday
|
|
455
|
-
case "iiii":
|
|
456
|
-
default:
|
|
457
|
-
return t.day(a, {
|
|
458
|
-
width: "wide",
|
|
459
|
-
context: "formatting"
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
// AM or PM
|
|
464
|
-
a: function(e, r, t) {
|
|
465
|
-
var a = e.getUTCHours(), i = a / 12 >= 1 ? "pm" : "am";
|
|
466
|
-
switch (r) {
|
|
467
|
-
case "a":
|
|
468
|
-
case "aa":
|
|
469
|
-
return t.dayPeriod(i, {
|
|
470
|
-
width: "abbreviated",
|
|
471
|
-
context: "formatting"
|
|
472
|
-
});
|
|
473
|
-
case "aaa":
|
|
474
|
-
return t.dayPeriod(i, {
|
|
475
|
-
width: "abbreviated",
|
|
476
|
-
context: "formatting"
|
|
477
|
-
}).toLowerCase();
|
|
478
|
-
case "aaaaa":
|
|
479
|
-
return t.dayPeriod(i, {
|
|
480
|
-
width: "narrow",
|
|
481
|
-
context: "formatting"
|
|
482
|
-
});
|
|
483
|
-
case "aaaa":
|
|
484
|
-
default:
|
|
485
|
-
return t.dayPeriod(i, {
|
|
486
|
-
width: "wide",
|
|
487
|
-
context: "formatting"
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
// AM, PM, midnight, noon
|
|
492
|
-
b: function(e, r, t) {
|
|
493
|
-
var a = e.getUTCHours(), i;
|
|
494
|
-
switch (a === 12 ? i = w.noon : a === 0 ? i = w.midnight : i = a / 12 >= 1 ? "pm" : "am", r) {
|
|
495
|
-
case "b":
|
|
496
|
-
case "bb":
|
|
497
|
-
return t.dayPeriod(i, {
|
|
498
|
-
width: "abbreviated",
|
|
499
|
-
context: "formatting"
|
|
500
|
-
});
|
|
501
|
-
case "bbb":
|
|
502
|
-
return t.dayPeriod(i, {
|
|
503
|
-
width: "abbreviated",
|
|
504
|
-
context: "formatting"
|
|
505
|
-
}).toLowerCase();
|
|
506
|
-
case "bbbbb":
|
|
507
|
-
return t.dayPeriod(i, {
|
|
508
|
-
width: "narrow",
|
|
509
|
-
context: "formatting"
|
|
510
|
-
});
|
|
511
|
-
case "bbbb":
|
|
512
|
-
default:
|
|
513
|
-
return t.dayPeriod(i, {
|
|
514
|
-
width: "wide",
|
|
515
|
-
context: "formatting"
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
520
|
-
B: function(e, r, t) {
|
|
521
|
-
var a = e.getUTCHours(), i;
|
|
522
|
-
switch (a >= 17 ? i = w.evening : a >= 12 ? i = w.afternoon : a >= 4 ? i = w.morning : i = w.night, r) {
|
|
523
|
-
case "B":
|
|
524
|
-
case "BB":
|
|
525
|
-
case "BBB":
|
|
526
|
-
return t.dayPeriod(i, {
|
|
527
|
-
width: "abbreviated",
|
|
528
|
-
context: "formatting"
|
|
529
|
-
});
|
|
530
|
-
case "BBBBB":
|
|
531
|
-
return t.dayPeriod(i, {
|
|
532
|
-
width: "narrow",
|
|
533
|
-
context: "formatting"
|
|
534
|
-
});
|
|
535
|
-
case "BBBB":
|
|
536
|
-
default:
|
|
537
|
-
return t.dayPeriod(i, {
|
|
538
|
-
width: "wide",
|
|
539
|
-
context: "formatting"
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
},
|
|
543
|
-
// Hour [1-12]
|
|
544
|
-
h: function(e, r, t) {
|
|
545
|
-
if (r === "ho") {
|
|
546
|
-
var a = e.getUTCHours() % 12;
|
|
547
|
-
return a === 0 && (a = 12), t.ordinalNumber(a, {
|
|
548
|
-
unit: "hour"
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
return g.h(e, r);
|
|
552
|
-
},
|
|
553
|
-
// Hour [0-23]
|
|
554
|
-
H: function(e, r, t) {
|
|
555
|
-
return r === "Ho" ? t.ordinalNumber(e.getUTCHours(), {
|
|
556
|
-
unit: "hour"
|
|
557
|
-
}) : g.H(e, r);
|
|
558
|
-
},
|
|
559
|
-
// Hour [0-11]
|
|
560
|
-
K: function(e, r, t) {
|
|
561
|
-
var a = e.getUTCHours() % 12;
|
|
562
|
-
return r === "Ko" ? t.ordinalNumber(a, {
|
|
563
|
-
unit: "hour"
|
|
564
|
-
}) : u(a, r.length);
|
|
565
|
-
},
|
|
566
|
-
// Hour [1-24]
|
|
567
|
-
k: function(e, r, t) {
|
|
568
|
-
var a = e.getUTCHours();
|
|
569
|
-
return a === 0 && (a = 24), r === "ko" ? t.ordinalNumber(a, {
|
|
570
|
-
unit: "hour"
|
|
571
|
-
}) : u(a, r.length);
|
|
572
|
-
},
|
|
573
|
-
// Minute
|
|
574
|
-
m: function(e, r, t) {
|
|
575
|
-
return r === "mo" ? t.ordinalNumber(e.getUTCMinutes(), {
|
|
576
|
-
unit: "minute"
|
|
577
|
-
}) : g.m(e, r);
|
|
578
|
-
},
|
|
579
|
-
// Second
|
|
580
|
-
s: function(e, r, t) {
|
|
581
|
-
return r === "so" ? t.ordinalNumber(e.getUTCSeconds(), {
|
|
582
|
-
unit: "second"
|
|
583
|
-
}) : g.s(e, r);
|
|
584
|
-
},
|
|
585
|
-
// Fraction of second
|
|
586
|
-
S: function(e, r) {
|
|
587
|
-
return g.S(e, r);
|
|
588
|
-
},
|
|
589
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
590
|
-
X: function(e, r, t, a) {
|
|
591
|
-
var i = a._originalDate || e, o = i.getTimezoneOffset();
|
|
592
|
-
if (o === 0)
|
|
593
|
-
return "Z";
|
|
594
|
-
switch (r) {
|
|
595
|
-
// Hours and optional minutes
|
|
596
|
-
case "X":
|
|
597
|
-
return W(o);
|
|
598
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
599
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
600
|
-
// so this token always has the same output as `XX`
|
|
601
|
-
case "XXXX":
|
|
602
|
-
case "XX":
|
|
603
|
-
return h(o);
|
|
604
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
605
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
606
|
-
// so this token always has the same output as `XXX`
|
|
607
|
-
case "XXXXX":
|
|
608
|
-
case "XXX":
|
|
609
|
-
// Hours and minutes with `:` delimiter
|
|
610
|
-
default:
|
|
611
|
-
return h(o, ":");
|
|
612
|
-
}
|
|
613
|
-
},
|
|
614
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
615
|
-
x: function(e, r, t, a) {
|
|
616
|
-
var i = a._originalDate || e, o = i.getTimezoneOffset();
|
|
617
|
-
switch (r) {
|
|
618
|
-
// Hours and optional minutes
|
|
619
|
-
case "x":
|
|
620
|
-
return W(o);
|
|
621
|
-
// Hours, minutes and optional seconds without `:` delimiter
|
|
622
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
623
|
-
// so this token always has the same output as `xx`
|
|
624
|
-
case "xxxx":
|
|
625
|
-
case "xx":
|
|
626
|
-
return h(o);
|
|
627
|
-
// Hours, minutes and optional seconds with `:` delimiter
|
|
628
|
-
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
629
|
-
// so this token always has the same output as `xxx`
|
|
630
|
-
case "xxxxx":
|
|
631
|
-
case "xxx":
|
|
632
|
-
// Hours and minutes with `:` delimiter
|
|
633
|
-
default:
|
|
634
|
-
return h(o, ":");
|
|
635
|
-
}
|
|
636
|
-
},
|
|
637
|
-
// Timezone (GMT)
|
|
638
|
-
O: function(e, r, t, a) {
|
|
639
|
-
var i = a._originalDate || e, o = i.getTimezoneOffset();
|
|
640
|
-
switch (r) {
|
|
641
|
-
// Short
|
|
642
|
-
case "O":
|
|
643
|
-
case "OO":
|
|
644
|
-
case "OOO":
|
|
645
|
-
return "GMT" + Y(o, ":");
|
|
646
|
-
// Long
|
|
647
|
-
case "OOOO":
|
|
648
|
-
default:
|
|
649
|
-
return "GMT" + h(o, ":");
|
|
650
|
-
}
|
|
651
|
-
},
|
|
652
|
-
// Timezone (specific non-location)
|
|
653
|
-
z: function(e, r, t, a) {
|
|
654
|
-
var i = a._originalDate || e, o = i.getTimezoneOffset();
|
|
655
|
-
switch (r) {
|
|
656
|
-
// Short
|
|
657
|
-
case "z":
|
|
658
|
-
case "zz":
|
|
659
|
-
case "zzz":
|
|
660
|
-
return "GMT" + Y(o, ":");
|
|
661
|
-
// Long
|
|
662
|
-
case "zzzz":
|
|
663
|
-
default:
|
|
664
|
-
return "GMT" + h(o, ":");
|
|
665
|
-
}
|
|
666
|
-
},
|
|
667
|
-
// Seconds timestamp
|
|
668
|
-
t: function(e, r, t, a) {
|
|
669
|
-
var i = a._originalDate || e, o = Math.floor(i.getTime() / 1e3);
|
|
670
|
-
return u(o, r.length);
|
|
671
|
-
},
|
|
672
|
-
// Milliseconds timestamp
|
|
673
|
-
T: function(e, r, t, a) {
|
|
674
|
-
var i = a._originalDate || e, o = i.getTime();
|
|
675
|
-
return u(o, r.length);
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
function Y(n, e) {
|
|
679
|
-
var r = n > 0 ? "-" : "+", t = Math.abs(n), a = Math.floor(t / 60), i = t % 60;
|
|
680
|
-
if (i === 0)
|
|
681
|
-
return r + String(a);
|
|
682
|
-
var o = e;
|
|
683
|
-
return r + String(a) + o + u(i, 2);
|
|
684
|
-
}
|
|
685
|
-
function W(n, e) {
|
|
686
|
-
if (n % 60 === 0) {
|
|
687
|
-
var r = n > 0 ? "-" : "+";
|
|
688
|
-
return r + u(Math.abs(n) / 60, 2);
|
|
689
|
-
}
|
|
690
|
-
return h(n, e);
|
|
691
|
-
}
|
|
692
|
-
function h(n, e) {
|
|
693
|
-
var r = e || "", t = n > 0 ? "-" : "+", a = Math.abs(n), i = u(Math.floor(a / 60), 2), o = u(a % 60, 2);
|
|
694
|
-
return t + i + r + o;
|
|
695
|
-
}
|
|
696
|
-
var se = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ce = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, de = /^'([^]*?)'?$/, fe = /''/g, me = /[a-zA-Z]/;
|
|
697
|
-
function le(n, e, r) {
|
|
698
|
-
var t, a, i, o, c, d, m, f, v, y, C, O, M, U;
|
|
699
|
-
q(2, arguments);
|
|
700
|
-
var Q = String(e), S = V(), T = (t = (a = void 0) !== null && a !== void 0 ? a : S.locale) !== null && t !== void 0 ? t : K, N = _((i = (o = (c = (d = void 0) !== null && d !== void 0 ? d : void 0) !== null && c !== void 0 ? c : S.firstWeekContainsDate) !== null && o !== void 0 ? o : (m = S.locale) === null || m === void 0 || (f = m.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && i !== void 0 ? i : 1);
|
|
701
|
-
if (!(N >= 1 && N <= 7))
|
|
702
|
-
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
703
|
-
var E = _((v = (y = (C = (O = void 0) !== null && O !== void 0 ? O : void 0) !== null && C !== void 0 ? C : S.weekStartsOn) !== null && y !== void 0 ? y : (M = S.locale) === null || M === void 0 || (U = M.options) === null || U === void 0 ? void 0 : U.weekStartsOn) !== null && v !== void 0 ? v : 0);
|
|
704
|
-
if (!(E >= 0 && E <= 6))
|
|
705
|
-
throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
706
|
-
if (!T.localize)
|
|
707
|
-
throw new RangeError("locale must contain localize property");
|
|
708
|
-
if (!T.formatLong)
|
|
709
|
-
throw new RangeError("locale must contain formatLong property");
|
|
710
|
-
var b = k(n);
|
|
711
|
-
if (!A(b))
|
|
712
|
-
throw new RangeError("Invalid time value");
|
|
713
|
-
var $ = J(b), B = ee(b, $), R = {
|
|
714
|
-
firstWeekContainsDate: N,
|
|
715
|
-
weekStartsOn: E,
|
|
716
|
-
locale: T,
|
|
717
|
-
_originalDate: b
|
|
718
|
-
}, X = Q.match(ce).map(function(s) {
|
|
719
|
-
var l = s[0];
|
|
720
|
-
if (l === "p" || l === "P") {
|
|
721
|
-
var D = te[l];
|
|
722
|
-
return D(s, T.formatLong);
|
|
723
|
-
}
|
|
724
|
-
return s;
|
|
725
|
-
}).join("").match(se).map(function(s) {
|
|
726
|
-
if (s === "''")
|
|
727
|
-
return "'";
|
|
728
|
-
var l = s[0];
|
|
729
|
-
if (l === "'")
|
|
730
|
-
return ge(s);
|
|
731
|
-
var D = ue[l];
|
|
732
|
-
if (D)
|
|
733
|
-
return re(s) && L(s, e, String(n)), ae(s) && L(s, e, String(n)), D(B, s, T.localize, R);
|
|
734
|
-
if (l.match(me))
|
|
735
|
-
throw new RangeError("Format string contains an unescaped latin alphabet character `" + l + "`");
|
|
736
|
-
return s;
|
|
737
|
-
}).join("");
|
|
738
|
-
return X;
|
|
739
|
-
}
|
|
740
|
-
function ge(n) {
|
|
741
|
-
var e = n.match(de);
|
|
742
|
-
return e ? e[1].replace(fe, "'") : n;
|
|
743
|
-
}
|
|
744
|
-
function ve(n, e) {
|
|
745
|
-
var r;
|
|
746
|
-
q(1, arguments);
|
|
747
|
-
var t = _((r = void 0) !== null && r !== void 0 ? r : 2);
|
|
748
|
-
if (t !== 2 && t !== 1 && t !== 0)
|
|
749
|
-
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
750
|
-
if (!(typeof n == "string" || Object.prototype.toString.call(n) === "[object String]"))
|
|
751
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
752
|
-
var a = Te(n), i;
|
|
753
|
-
if (a.date) {
|
|
754
|
-
var o = pe(a.date, t);
|
|
755
|
-
i = be(o.restDateString, o.year);
|
|
756
|
-
}
|
|
757
|
-
if (!i || isNaN(i.getTime()))
|
|
758
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
759
|
-
var c = i.getTime(), d = 0, m;
|
|
760
|
-
if (a.time && (d = De(a.time), isNaN(d)))
|
|
761
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
762
|
-
if (a.timezone) {
|
|
763
|
-
if (m = xe(a.timezone), isNaN(m))
|
|
764
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
765
|
-
} else {
|
|
766
|
-
var f = new Date(c + d), v = /* @__PURE__ */ new Date(0);
|
|
767
|
-
return v.setFullYear(f.getUTCFullYear(), f.getUTCMonth(), f.getUTCDate()), v.setHours(f.getUTCHours(), f.getUTCMinutes(), f.getUTCSeconds(), f.getUTCMilliseconds()), v;
|
|
768
|
-
}
|
|
769
|
-
return new Date(c + d + m);
|
|
770
|
-
}
|
|
771
|
-
var x = {
|
|
772
|
-
dateTimeDelimiter: /[T ]/,
|
|
773
|
-
timeZoneDelimiter: /[Z ]/i,
|
|
774
|
-
timezone: /([Z+-].*)$/
|
|
775
|
-
}, he = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, we = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Se = /^([+-])(\d{2})(?::?(\d{2}))?$/;
|
|
776
|
-
function Te(n) {
|
|
777
|
-
var e = {}, r = n.split(x.dateTimeDelimiter), t;
|
|
778
|
-
if (r.length > 2)
|
|
779
|
-
return e;
|
|
780
|
-
if (/:/.test(r[0]) ? t = r[0] : (e.date = r[0], t = r[1], x.timeZoneDelimiter.test(e.date) && (e.date = n.split(x.timeZoneDelimiter)[0], t = n.substr(e.date.length, n.length))), t) {
|
|
781
|
-
var a = x.timezone.exec(t);
|
|
782
|
-
a ? (e.time = t.replace(a[1], ""), e.timezone = a[1]) : e.time = t;
|
|
783
|
-
}
|
|
784
|
-
return e;
|
|
785
|
-
}
|
|
786
|
-
function pe(n, e) {
|
|
787
|
-
var r = new RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"), t = n.match(r);
|
|
788
|
-
if (!t) return {
|
|
789
|
-
year: NaN,
|
|
790
|
-
restDateString: ""
|
|
791
|
-
};
|
|
792
|
-
var a = t[1] ? parseInt(t[1]) : null, i = t[2] ? parseInt(t[2]) : null;
|
|
793
|
-
return {
|
|
794
|
-
year: i === null ? a : i * 100,
|
|
795
|
-
restDateString: n.slice((t[1] || t[2]).length)
|
|
796
|
-
};
|
|
797
|
-
}
|
|
798
|
-
function be(n, e) {
|
|
799
|
-
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
800
|
-
var r = n.match(he);
|
|
801
|
-
if (!r) return /* @__PURE__ */ new Date(NaN);
|
|
802
|
-
var t = !!r[4], a = p(r[1]), i = p(r[2]) - 1, o = p(r[3]), c = p(r[4]), d = p(r[5]) - 1;
|
|
803
|
-
if (t)
|
|
804
|
-
return Ue(e, c, d) ? ye(e, c, d) : /* @__PURE__ */ new Date(NaN);
|
|
805
|
-
var m = /* @__PURE__ */ new Date(0);
|
|
806
|
-
return !Oe(e, i, o) || !Me(e, a) ? /* @__PURE__ */ new Date(NaN) : (m.setUTCFullYear(e, i, Math.max(a, o)), m);
|
|
807
|
-
}
|
|
808
|
-
function p(n) {
|
|
809
|
-
return n ? parseInt(n) : 1;
|
|
810
|
-
}
|
|
811
|
-
function De(n) {
|
|
812
|
-
var e = n.match(we);
|
|
813
|
-
if (!e) return NaN;
|
|
814
|
-
var r = H(e[1]), t = H(e[2]), a = H(e[3]);
|
|
815
|
-
return Ne(r, t, a) ? r * I + t * P + a * 1e3 : NaN;
|
|
816
|
-
}
|
|
817
|
-
function H(n) {
|
|
818
|
-
return n && parseFloat(n.replace(",", ".")) || 0;
|
|
819
|
-
}
|
|
820
|
-
function xe(n) {
|
|
821
|
-
if (n === "Z") return 0;
|
|
822
|
-
var e = n.match(Se);
|
|
823
|
-
if (!e) return 0;
|
|
824
|
-
var r = e[1] === "+" ? -1 : 1, t = parseInt(e[2]), a = e[3] && parseInt(e[3]) || 0;
|
|
825
|
-
return Ee(t, a) ? r * (t * I + a * P) : NaN;
|
|
826
|
-
}
|
|
827
|
-
function ye(n, e, r) {
|
|
828
|
-
var t = /* @__PURE__ */ new Date(0);
|
|
829
|
-
t.setUTCFullYear(n, 0, 4);
|
|
830
|
-
var a = t.getUTCDay() || 7, i = (e - 1) * 7 + r + 1 - a;
|
|
831
|
-
return t.setUTCDate(t.getUTCDate() + i), t;
|
|
832
|
-
}
|
|
833
|
-
var Ce = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
834
|
-
function G(n) {
|
|
835
|
-
return n % 400 === 0 || n % 4 === 0 && n % 100 !== 0;
|
|
836
|
-
}
|
|
837
|
-
function Oe(n, e, r) {
|
|
838
|
-
return e >= 0 && e <= 11 && r >= 1 && r <= (Ce[e] || (G(n) ? 29 : 28));
|
|
839
|
-
}
|
|
840
|
-
function Me(n, e) {
|
|
841
|
-
return e >= 1 && e <= (G(n) ? 366 : 365);
|
|
842
|
-
}
|
|
843
|
-
function Ue(n, e, r) {
|
|
844
|
-
return e >= 1 && e <= 53 && r >= 0 && r <= 6;
|
|
845
|
-
}
|
|
846
|
-
function Ne(n, e, r) {
|
|
847
|
-
return n === 24 ? e === 0 && r === 0 : r >= 0 && r < 60 && e >= 0 && e < 60 && n >= 0 && n < 25;
|
|
848
|
-
}
|
|
849
|
-
function Ee(n, e) {
|
|
850
|
-
return e >= 0 && e <= 59;
|
|
851
|
-
}
|
|
852
|
-
const He = (n) => {
|
|
853
|
-
const e = ve(n);
|
|
854
|
-
if (isNaN(e.getTime())) {
|
|
855
|
-
const r = [
|
|
856
|
-
"HH:mm",
|
|
857
|
-
"HH:mm:ss",
|
|
858
|
-
"HH:mm:ss.S",
|
|
859
|
-
"HH:mm:ss.SS",
|
|
860
|
-
"HH:mm:ss.SSS",
|
|
861
|
-
"HH:mm:ss.SSSS",
|
|
862
|
-
"HH:mm:ss.SSSSS",
|
|
863
|
-
"HH:mm:ss.SSSSSS",
|
|
864
|
-
"HH:mm:ss.SSSSSSS",
|
|
865
|
-
"HH:mm:ss.SSSSSSSS",
|
|
866
|
-
"HH:mm:ss.SSSSSSSSS"
|
|
867
|
-
];
|
|
868
|
-
for (const t of r) {
|
|
869
|
-
const a = ne(n, t, new Date(1970, 0, 1));
|
|
870
|
-
if (!isNaN(a.getTime()))
|
|
871
|
-
return a;
|
|
872
|
-
}
|
|
873
|
-
throw new Error(`Unparsable time format: ${n}`);
|
|
874
|
-
} else
|
|
875
|
-
return e;
|
|
876
|
-
}, _e = (n) => le(n, "HH:mm:ss.SSS"), Le = {
|
|
877
|
-
toString: _e,
|
|
878
|
-
fromString: He
|
|
879
|
-
}, Ye = (n) => /* @__PURE__ */ new Date(`${n}Z`), We = (n) => n.toISOString().slice(0, -1);
|
|
880
|
-
export {
|
|
881
|
-
We as f,
|
|
882
|
-
Le as l,
|
|
883
|
-
Ye as t
|
|
884
|
-
};
|