temporal-polyfill-lite 0.4.1 → 0.4.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 +16 -0
- package/README.md +3 -4
- package/dist/calendars/index.js +1 -1
- package/dist/calendars/shim.js +1 -1
- package/dist/calendars/{src-CIbGWA87.js → src-BU-7y4gA.js} +734 -727
- package/dist/index.js +1 -1
- package/dist/shim.js +1 -1
- package/dist/{src-Cpu9wF28.js → src-sQY-gZ2P.js} +698 -691
- package/package.json +1 -1
|
@@ -1,15 +1,33 @@
|
|
|
1
|
-
function getNameFromUnit(e) {
|
|
2
|
-
return ae[e];
|
|
3
|
-
}
|
|
4
|
-
function nanosecondsForTimeUnit(e) {
|
|
5
|
-
return ce[e - 3];
|
|
6
|
-
}
|
|
7
1
|
function isObject(e) {
|
|
8
2
|
return ("object" == typeof e || "function" == typeof e) && null !== e;
|
|
9
3
|
}
|
|
10
4
|
function createNullPrototypeObject(e) {
|
|
11
5
|
return Object.assign(Object.create(null), e);
|
|
12
6
|
}
|
|
7
|
+
function makePropertyNonEnumerable(e, t) {
|
|
8
|
+
Object.defineProperty(e, t, { enumerable: !1 });
|
|
9
|
+
}
|
|
10
|
+
function makePropertiesNonEnumerable(e) {
|
|
11
|
+
for (const t of Object.keys(e)) makePropertyNonEnumerable(e, t);
|
|
12
|
+
}
|
|
13
|
+
function defineNonEnumerableProperty(e, t, o) {
|
|
14
|
+
e[t] = o, makePropertyNonEnumerable(e, t);
|
|
15
|
+
}
|
|
16
|
+
function defineStringTag(e, t) {
|
|
17
|
+
Object.defineProperty(e, Symbol.toStringTag, {
|
|
18
|
+
value: t,
|
|
19
|
+
configurable: !0
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function renameFunction(e, t) {
|
|
23
|
+
Object.defineProperty(e, "name", { value: t });
|
|
24
|
+
}
|
|
25
|
+
function getNameFromUnit(e) {
|
|
26
|
+
return v[e];
|
|
27
|
+
}
|
|
28
|
+
function nanosecondsForTimeUnit(e) {
|
|
29
|
+
return M[e - 3];
|
|
30
|
+
}
|
|
13
31
|
function mapUnlessUndefined(e, t) {
|
|
14
32
|
return void 0 === e ? void 0 : t(e);
|
|
15
33
|
}
|
|
@@ -22,6 +40,19 @@ function throwRangeError(e) {
|
|
|
22
40
|
function throwTypeError(e) {
|
|
23
41
|
throw new TypeError(e);
|
|
24
42
|
}
|
|
43
|
+
function getInternalSlotOrThrow(e, t) {
|
|
44
|
+
const o = e.get(t);
|
|
45
|
+
return o || throwTypeError("invalid method call"), o;
|
|
46
|
+
}
|
|
47
|
+
function getInternalSlotOrThrowForDurationFormat(e) {
|
|
48
|
+
return getInternalSlotOrThrow(L, e);
|
|
49
|
+
}
|
|
50
|
+
function durationRecordToDurationLikeObject(e) {
|
|
51
|
+
const t = createNullPrototypeObject();
|
|
52
|
+
return E.map((o, n) => {
|
|
53
|
+
t[o] = e[n];
|
|
54
|
+
}), t;
|
|
55
|
+
}
|
|
25
56
|
function toPrimitive(e) {
|
|
26
57
|
if (!isObject(e)) return e;
|
|
27
58
|
const t = e[Symbol.toPrimitive];
|
|
@@ -38,11 +69,11 @@ function toBigInt(e) {
|
|
|
38
69
|
return BigInt.asIntN(2 ** 53 - 1, e);
|
|
39
70
|
}
|
|
40
71
|
function toIntegerIfIntegral(e) {
|
|
41
|
-
const t =
|
|
72
|
+
const t = Se(e);
|
|
42
73
|
return Number.isInteger(t) || throwRangeError(invalidNumber(t)), t + 0;
|
|
43
74
|
}
|
|
44
75
|
function toIntegerWithTruncation(e) {
|
|
45
|
-
const t =
|
|
76
|
+
const t = Se(e);
|
|
46
77
|
return isFinite(t) || throwRangeError(invalidNumber(t)), Math.trunc(t) + 0;
|
|
47
78
|
}
|
|
48
79
|
function toPositiveIntegerWithTruncation(e) {
|
|
@@ -54,11 +85,11 @@ function getOptionsObject(e = createNullPrototypeObject()) {
|
|
|
54
85
|
}
|
|
55
86
|
function getOption(e, t, o, n) {
|
|
56
87
|
const r = e[t];
|
|
57
|
-
if (void 0 === r) return n ===
|
|
88
|
+
if (void 0 === r) return n === B && throwRangeError(missingField(t)), n;
|
|
58
89
|
const a = toString(r);
|
|
59
90
|
return o.includes(a) || throwRangeError(invalidField(t)), a;
|
|
60
91
|
}
|
|
61
|
-
function getRoundToOptionsObject(e = throwTypeError(
|
|
92
|
+
function getRoundToOptionsObject(e = throwTypeError(W)) {
|
|
62
93
|
return "string" == typeof e ? createNullPrototypeObject({ smallestUnit: e }) : getOptionsObject(e);
|
|
63
94
|
}
|
|
64
95
|
function validateString(e) {
|
|
@@ -85,24 +116,6 @@ function clamp(e, t, o) {
|
|
|
85
116
|
function isWithin(e, t, o) {
|
|
86
117
|
return e >= t && e <= o;
|
|
87
118
|
}
|
|
88
|
-
function makePropertyNonEnumerable(e, t) {
|
|
89
|
-
Object.defineProperty(e, t, { enumerable: !1 });
|
|
90
|
-
}
|
|
91
|
-
function makePropertiesNonEnumerable(e) {
|
|
92
|
-
for (const t of Object.keys(e)) makePropertyNonEnumerable(e, t);
|
|
93
|
-
}
|
|
94
|
-
function defineNonEnumerableProperty(e, t, o) {
|
|
95
|
-
e[t] = o, makePropertyNonEnumerable(e, t);
|
|
96
|
-
}
|
|
97
|
-
function defineStringTag(e, t) {
|
|
98
|
-
Object.defineProperty(e, Symbol.toStringTag, {
|
|
99
|
-
value: t,
|
|
100
|
-
configurable: !0
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function renameFunction(e, t) {
|
|
104
|
-
Object.defineProperty(e, "name", { value: t });
|
|
105
|
-
}
|
|
106
119
|
function normalizeEpochNanoseconds(e, t) {
|
|
107
120
|
return [e + divFloor(t, a), modFloor(t, a)];
|
|
108
121
|
}
|
|
@@ -163,11 +176,11 @@ function negateTimeDuration(e) {
|
|
|
163
176
|
return normalize(-e[0], -e[1]);
|
|
164
177
|
}
|
|
165
178
|
function signTimeDuration(e) {
|
|
166
|
-
return
|
|
179
|
+
return Ee(e, ve);
|
|
167
180
|
}
|
|
168
181
|
function timeDurationToSubsecondsNumber(e, t, o) {
|
|
169
182
|
const n = signTimeDuration(e);
|
|
170
|
-
return e = absTimeDuration(e), n *
|
|
183
|
+
return e = absTimeDuration(e), n * Se(`${864 * e[0] + divTrunc(e[1], 1e11)}${toZeroPaddedDecimalString(divTrunc(e[1] % 1e11, 10 ** (9 + t)), 2 - t)}.${o ? toZeroPaddedDecimalString(e[1] % 10 ** (9 + t), 9 + t) : "0"}`) + 0;
|
|
171
184
|
}
|
|
172
185
|
function roundTimeDurationByDays(e, t, o) {
|
|
173
186
|
return normalize(roundNumberToIncrement(e[0] + signTimeDuration(e) * (e[1] ? .2 * compare(Math.abs(e[1] / a), .5) + .5 : 0), t, o), 0);
|
|
@@ -178,10 +191,10 @@ function divideTimeDurationToFloatingPoint(e, t) {
|
|
|
178
191
|
function interpretISODateTimeOffset(e, t, o, n, r, a, i, c) {
|
|
179
192
|
if (!t) return getStartOfDay(r, e);
|
|
180
193
|
const s = combineIsoDateAndTimeRecord(e, t);
|
|
181
|
-
if (o ===
|
|
182
|
-
if (o ===
|
|
194
|
+
if (o === ne || o === te && "ignore" == i) return getEpochNanosecondsFor(r, s, a);
|
|
195
|
+
if (o === oe || o === te && "use" == i) return validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(s.o.t, s.o.u, s.o.T, s.p.D, s.p.I, s.p.O, s.p.F, s.p.S, s.p.$ - n)));
|
|
183
196
|
((e) => {
|
|
184
|
-
Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(
|
|
197
|
+
Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(P);
|
|
185
198
|
})(e);
|
|
186
199
|
const l = getPossibleEpochNanoseconds(r, s);
|
|
187
200
|
for (const e of l) {
|
|
@@ -196,40 +209,40 @@ function toTemporalZonedDateTime(e, t) {
|
|
|
196
209
|
if (isObject(e)) {
|
|
197
210
|
if (isZonedDateTime(e)) {
|
|
198
211
|
const o = getOptionsObject(t);
|
|
199
|
-
return getTemporalDisambiguationOption(o), getTemporalOffsetOption(o,
|
|
212
|
+
return getTemporalDisambiguationOption(o), getTemporalOffsetOption(o, X), getTemporalOverflowOption(o), getInternalSlotOrThrowForZonedDateTime(e);
|
|
200
213
|
}
|
|
201
214
|
i = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
202
215
|
const l = prepareCalendarFields(i, e, [
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
], [
|
|
216
|
+
yt.t,
|
|
217
|
+
yt.u,
|
|
218
|
+
yt.v,
|
|
219
|
+
yt.T,
|
|
220
|
+
yt.D,
|
|
221
|
+
yt.I,
|
|
222
|
+
yt.O,
|
|
223
|
+
yt.F,
|
|
224
|
+
yt.S,
|
|
225
|
+
yt.$,
|
|
226
|
+
yt.M,
|
|
227
|
+
yt.P
|
|
228
|
+
], [yt.P]);
|
|
216
229
|
o = l.timeZone, n = l.offset;
|
|
217
230
|
const d = getOptionsObject(t);
|
|
218
|
-
r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d,
|
|
231
|
+
r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d, X);
|
|
219
232
|
const m = interpretTemporalDateTimeFields(i, l, getTemporalOverflowOption(d));
|
|
220
233
|
c = m.o, s = m.p;
|
|
221
234
|
} else {
|
|
222
235
|
validateString(e);
|
|
223
|
-
const m = parseIsoDateTime(e, [
|
|
236
|
+
const m = parseIsoDateTime(e, [et]);
|
|
224
237
|
o = toTemporalTimeZoneIdentifier(m.P.R), n = m.P.N, l = m.P.Z, i = canonicalizeCalendar(m.Y || "iso8601"), d = !1, n && (d = hasUtcOffsetSubMinuteParts(n));
|
|
225
238
|
const u = getOptionsObject(t);
|
|
226
|
-
r = getTemporalDisambiguationOption(u), a = getTemporalOffsetOption(u,
|
|
239
|
+
r = getTemporalDisambiguationOption(u), a = getTemporalOffsetOption(u, X), getTemporalOverflowOption(u), c = createIsoDateRecord(m.t, m.u, m.T), s = m.p;
|
|
227
240
|
}
|
|
228
|
-
const m = l ?
|
|
229
|
-
return createZonedDateTimeSlot(interpretISODateTimeOffset(c, s, m, m ===
|
|
241
|
+
const m = l ? oe : n ? te : ne;
|
|
242
|
+
return createZonedDateTimeSlot(interpretISODateTimeOffset(c, s, m, m === te ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
|
|
230
243
|
}
|
|
231
244
|
function createTemporalZonedDateTime(e, t, o, n) {
|
|
232
|
-
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) =>
|
|
245
|
+
return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => Ne[e] && Ne[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
|
|
233
246
|
}
|
|
234
247
|
function createZonedDateTimeSlot(e, t, o, n) {
|
|
235
248
|
return {
|
|
@@ -239,34 +252,34 @@ function createZonedDateTimeSlot(e, t, o, n) {
|
|
|
239
252
|
W: n
|
|
240
253
|
};
|
|
241
254
|
}
|
|
242
|
-
function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i =
|
|
255
|
+
function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = D, c = ce) {
|
|
243
256
|
const s = roundTemporalInstant(e.U, a, i, c), l = epochSeconds(s) === epochSeconds(e.U) ? getOffsetNanosecondsForZonedDateTimeSlot(e) : getOffsetNanosecondsFor(e.P, s);
|
|
244
|
-
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(s, l), "iso8601", t,
|
|
257
|
+
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(s, l), "iso8601", t, he)}${r === fe ? "" : formatDateTimeUtcOffsetRounded(l)}${n === Oe ? "" : `[${n === Fe ? "!" : ""}${e.P}]`}${formatCalendarAnnotation(e.Y, o)}`;
|
|
245
258
|
}
|
|
246
259
|
function addZonedDateTime(e, t, o) {
|
|
247
260
|
if (!dateDurationSign(t.A)) return addInstant(e.U, t.p);
|
|
248
261
|
const n = getIsoDateTimeForZonedDateTimeSlot(e);
|
|
249
|
-
return addInstant(getEpochNanosecondsFor(e.P, validateIsoDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(e.Y, n.o, t.A, o), n.p)),
|
|
262
|
+
return addInstant(getEpochNanosecondsFor(e.P, validateIsoDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(e.Y, n.o, t.A, o), n.p)), G), t.p);
|
|
250
263
|
}
|
|
251
264
|
function differenceZonedDateTime(e, t, o) {
|
|
252
265
|
const n = compareEpochNanoseconds(e.U, t.U);
|
|
253
|
-
if (!n) return combineDateAndTimeDuration(zeroDateDuration(),
|
|
266
|
+
if (!n) return combineDateAndTimeDuration(zeroDateDuration(), ve);
|
|
254
267
|
const r = getIsoDateTimeForZonedDateTimeSlot(e), a = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
255
268
|
if (!compareIsoDate(r.o, a.o)) return combineDateAndTimeDuration(zeroDateDuration(), timeDurationFromEpochNanosecondsDifference(t.U, e.U));
|
|
256
269
|
let i, c = differenceTime(r.p, a.p);
|
|
257
|
-
for (let o =
|
|
258
|
-
return combineDateAndTimeDuration(calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o,
|
|
270
|
+
for (let o = Mt(c) === n ? 1 : 0; o <= (3 - n) / 2 && (i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p), c = timeDurationFromEpochNanosecondsDifference(t.U, getEpochNanosecondsFor(e.P, i, G)), Mt(c) === n); o++);
|
|
271
|
+
return combineDateAndTimeDuration(calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o, d)), c);
|
|
259
272
|
}
|
|
260
273
|
function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
|
|
261
274
|
if (!isDateUnit(o)) return differenceInstant(e.U, t.U, n, r, a);
|
|
262
275
|
const i = differenceZonedDateTime(e, t, o);
|
|
263
|
-
return r ===
|
|
276
|
+
return r === D && 1 === n ? i : roundRelativeDuration(i, e.U, t.U, getIsoDateTimeForZonedDateTimeSlot(e), e.P, e.Y, o, n, r, a);
|
|
264
277
|
}
|
|
265
278
|
function differenceTemporalZonedDateTime(e, t, o, n) {
|
|
266
279
|
const r = toTemporalZonedDateTime(o);
|
|
267
|
-
calendarEquals(t.Y, r.Y) || throwRangeError(
|
|
268
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
269
|
-
return isDateUnit(a.L) ? (timeZoneEquals(t.P, r.P) || throwRangeError("time zone mismatch"), compareEpochNanoseconds(t.U, r.U) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(t, r, a.L, a.V, a.H, a.q),
|
|
280
|
+
calendarEquals(t.Y, r.Y) || throwRangeError(Z);
|
|
281
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), x, [], D, m);
|
|
282
|
+
return isDateUnit(a.L) ? (timeZoneEquals(t.P, r.P) || throwRangeError("time zone mismatch"), compareEpochNanoseconds(t.U, r.U) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(t, r, a.L, a.V, a.H, a.q), m), e)) : createTemporalDuration(createTemporalDurationSlot([
|
|
270
283
|
0,
|
|
271
284
|
0,
|
|
272
285
|
0,
|
|
@@ -288,18 +301,17 @@ function getOffsetNanosecondsForZonedDateTimeSlot(e) {
|
|
|
288
301
|
function getIsoDateTimeForZonedDateTimeSlot(e) {
|
|
289
302
|
return getIsoDateTimeFromOffsetNanoseconds(e.U, getOffsetNanosecondsForZonedDateTimeSlot(e));
|
|
290
303
|
}
|
|
291
|
-
function createTemporalZonedDateTimeFromSlot(e, t = Object.create(
|
|
292
|
-
return
|
|
304
|
+
function createTemporalZonedDateTimeFromSlot(e, t = Object.create(be.prototype)) {
|
|
305
|
+
return Me.set(t, e), t;
|
|
293
306
|
}
|
|
294
307
|
function calendarIsoToDateForZonedDateTimeSlot(e) {
|
|
295
308
|
return calendarIsoToDate(e.Y, getIsoDateTimeForZonedDateTimeSlot(e).o);
|
|
296
309
|
}
|
|
297
310
|
function getInternalSlotForZonedDateTime(e) {
|
|
298
|
-
return
|
|
311
|
+
return Me.get(e);
|
|
299
312
|
}
|
|
300
313
|
function getInternalSlotOrThrowForZonedDateTime(e) {
|
|
301
|
-
|
|
302
|
-
return t || throwTypeError(Te), t;
|
|
314
|
+
return getInternalSlotOrThrow(Me, e);
|
|
303
315
|
}
|
|
304
316
|
function isZonedDateTime(e) {
|
|
305
317
|
return !!getInternalSlotForZonedDateTime(e);
|
|
@@ -321,11 +333,11 @@ function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, c = 0) {
|
|
|
321
333
|
return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, c);
|
|
322
334
|
}
|
|
323
335
|
function clampEpochSecond(e) {
|
|
324
|
-
return clamp(e, -1e10,
|
|
336
|
+
return clamp(e, -1e10, 1 / 0);
|
|
325
337
|
}
|
|
326
338
|
function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
327
339
|
if ("UTC" === t) return 0;
|
|
328
|
-
const r = clampEpochSecond(o), a =
|
|
340
|
+
const r = clampEpochSecond(o), a = Ne[t] ||= createLruCache(5e3), i = a.C(r);
|
|
329
341
|
if (void 0 !== i) return i;
|
|
330
342
|
const c = getFormatterForTimeZone(t).formatToParts(1e3 * r), s = (utcEpochMilliseconds(...[
|
|
331
343
|
"year",
|
|
@@ -338,7 +350,7 @@ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
|
|
|
338
350
|
return n || a.B(r, s), s;
|
|
339
351
|
}
|
|
340
352
|
function getFormatterForTimeZone(e) {
|
|
341
|
-
return
|
|
353
|
+
return Re[e] ||= new Nt("en-u-hc-h23", {
|
|
342
354
|
timeZone: e,
|
|
343
355
|
year: "numeric",
|
|
344
356
|
month: "numeric",
|
|
@@ -378,10 +390,10 @@ function formatOffsetTimeZoneIdentifier(e) {
|
|
|
378
390
|
}
|
|
379
391
|
function formatUtcOffsetNanoseconds(e) {
|
|
380
392
|
const n = Math.abs(e);
|
|
381
|
-
return `${e < 0 ? "-" : "+"}${formatTimeString(divFloor(n, o), modFloor(divFloor(n, t), 60), modFloor(divFloor(n, 1e9), 60), 0, n % 6e10 ? void 0 :
|
|
393
|
+
return `${e < 0 ? "-" : "+"}${formatTimeString(divFloor(n, o), modFloor(divFloor(n, t), 60), modFloor(divFloor(n, 1e9), 60), 0, n % 6e10 ? void 0 : J)}`;
|
|
382
394
|
}
|
|
383
395
|
function formatDateTimeUtcOffsetRounded(e) {
|
|
384
|
-
return formatOffsetTimeZoneIdentifier(roundNumberToIncrement(e, t,
|
|
396
|
+
return formatOffsetTimeZoneIdentifier(roundNumberToIncrement(e, t, de) / t);
|
|
385
397
|
}
|
|
386
398
|
function toTemporalTimeZoneIdentifier(e) {
|
|
387
399
|
if (isZonedDateTime(e)) return getInternalSlotOrThrowForZonedDateTime(e).P;
|
|
@@ -389,12 +401,12 @@ function toTemporalTimeZoneIdentifier(e) {
|
|
|
389
401
|
const t = ((e) => {
|
|
390
402
|
if (isTimeZoneIdentifier(e)) return parseTimeZoneIdentifier(e);
|
|
391
403
|
const t = parseIsoDateTime(e, [
|
|
392
|
-
Ge,
|
|
393
|
-
Ke,
|
|
394
|
-
Qe,
|
|
395
404
|
et,
|
|
396
405
|
tt,
|
|
397
|
-
ot
|
|
406
|
+
ot,
|
|
407
|
+
nt,
|
|
408
|
+
rt,
|
|
409
|
+
at
|
|
398
410
|
]).P, o = t.R || t.Z && "UTC" || t.N;
|
|
399
411
|
return o || throwRangeError(invalidTimeZone(e)), parseTimeZoneIdentifier(o);
|
|
400
412
|
})(e);
|
|
@@ -407,7 +419,7 @@ function getEpochNanosecondsFor(e, t, o) {
|
|
|
407
419
|
return disambiguatePossibleEpochNanoseconds(getPossibleEpochNanoseconds(e, t), e, t, o);
|
|
408
420
|
}
|
|
409
421
|
function disambiguatePossibleEpochNanoseconds(e, t, o, n) {
|
|
410
|
-
return 1 === e.length ? e[0] : ("reject" === n && throwRangeError("ambiguity / gaps in local time"), getNamedTimeZoneEpochCandidates(t, o).map(validateEpochNanoseconds)["compatible" === n ? +!e[0] : +(n ===
|
|
422
|
+
return 1 === e.length ? e[0] : ("reject" === n && throwRangeError("ambiguity / gaps in local time"), getNamedTimeZoneEpochCandidates(t, o).map(validateEpochNanoseconds)["compatible" === n ? +!e[0] : +(n === K)]);
|
|
411
423
|
}
|
|
412
424
|
function getPossibleEpochNanoseconds(e, t) {
|
|
413
425
|
return isOffsetTimeZoneIdentifier(e) ? [validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(t.o.t, t.o.u, t.o.T, t.p.D, t.p.I, t.p.O, t.p.F, t.p.S, t.p.$ - parseDateTimeUtcOffset(e))))] : ((e, t) => getNamedTimeZoneEpochCandidates(e, t).filter((o) => !compareEpochNanoseconds(addNanosecondsToEpochSeconds(o, getOffsetNanosecondsFor(e, o)), getUtcEpochNanoseconds(t))))(e, t).map(validateEpochNanoseconds);
|
|
@@ -417,7 +429,7 @@ function getStartOfDay(e, t) {
|
|
|
417
429
|
return getPossibleEpochNanoseconds(e, o)[0] || createEpochNanosecondsFromEpochSeconds(bisectOffsetTransition(e, ...getNamedTimeZoneEpochCandidates(e, o).map(epochSeconds)));
|
|
418
430
|
}
|
|
419
431
|
function timeZoneEquals(e, t) {
|
|
420
|
-
return e === t || !isOffsetTimeZoneIdentifier(e) && !isOffsetTimeZoneIdentifier(t) && getFormatterForTimeZone(e).resolvedOptions().timeZone === getFormatterForTimeZone(t).resolvedOptions().timeZone;
|
|
432
|
+
return e === t || !isOffsetTimeZoneIdentifier(e) && !isOffsetTimeZoneIdentifier(t) && (Pe ? new Pe.ZonedDateTime(BigInt(0), e).equals(new Pe.ZonedDateTime(BigInt(0), t)) : getFormatterForTimeZone(e).resolvedOptions().timeZone === getFormatterForTimeZone(t).resolvedOptions().timeZone);
|
|
421
433
|
}
|
|
422
434
|
function parseTimeZoneIdentifier(e) {
|
|
423
435
|
return isTimeZoneIdentifier(e) || throwRangeError(invalidTimeZone(e)), createNullPrototypeObject(isOffsetTimeZoneIdentifier(e) ? { G: parseDateTimeUtcOffset(e) / t } : { _: e });
|
|
@@ -444,7 +456,7 @@ function combineIsoDateAndTimeRecord(e, t) {
|
|
|
444
456
|
};
|
|
445
457
|
}
|
|
446
458
|
function interpretTemporalDateTimeFields(e, t, o) {
|
|
447
|
-
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[
|
|
459
|
+
return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[yt.D], t[yt.I], t[yt.O], t[yt.F], t[yt.S], t[yt.$], o));
|
|
448
460
|
}
|
|
449
461
|
function toTemporalDateTime(e, t) {
|
|
450
462
|
if (isObject(e)) {
|
|
@@ -464,28 +476,28 @@ function toTemporalDateTime(e, t) {
|
|
|
464
476
|
}
|
|
465
477
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
466
478
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o, prepareCalendarFields(o, e, [
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
479
|
+
yt.t,
|
|
480
|
+
yt.u,
|
|
481
|
+
yt.v,
|
|
482
|
+
yt.T,
|
|
483
|
+
yt.D,
|
|
484
|
+
yt.I,
|
|
485
|
+
yt.O,
|
|
486
|
+
yt.F,
|
|
487
|
+
yt.S,
|
|
488
|
+
yt.$
|
|
477
489
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
478
490
|
}
|
|
479
491
|
validateString(e);
|
|
480
|
-
const o = parseIsoDateTime(e, [
|
|
492
|
+
const o = parseIsoDateTime(e, [tt]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
481
493
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(o.t, o.u, o.T), o.p || midnightTimeRecord()), n);
|
|
482
494
|
}
|
|
483
495
|
function balanceIsoDateTime(e, t, o, n, r, a, i, c, s) {
|
|
484
496
|
const l = balanceTime(n, r, a, i, c, s);
|
|
485
497
|
return combineIsoDateAndTimeRecord(addDaysToIsoDate(createIsoDateRecord(e, t, o), l.X), l);
|
|
486
498
|
}
|
|
487
|
-
function createTemporalDateTime(e, t, o = Object.create(
|
|
488
|
-
return
|
|
499
|
+
function createTemporalDateTime(e, t, o = Object.create($e.prototype)) {
|
|
500
|
+
return Ze.set(o, {
|
|
489
501
|
K: validateIsoDateTime(e),
|
|
490
502
|
Y: t
|
|
491
503
|
}), o;
|
|
@@ -502,22 +514,22 @@ function roundIsoDateTime(e, t, o, n) {
|
|
|
502
514
|
}
|
|
503
515
|
function differenceISODateTime(e, t, o, n) {
|
|
504
516
|
let r = differenceTime(e.p, t.p);
|
|
505
|
-
const a =
|
|
517
|
+
const a = Mt(r);
|
|
506
518
|
let i = t.o;
|
|
507
519
|
a === compareIsoDate(e.o, t.o) && (i = addDaysToIsoDate(i, a), r = add24HourDaysToTimeDuration(r, -a));
|
|
508
|
-
const c = largerOfTwoTemporalUnits(
|
|
520
|
+
const c = largerOfTwoTemporalUnits(d, n), s = calendarDateUntil(o, e.o, i, c);
|
|
509
521
|
return n !== c && (r = add24HourDaysToTimeDuration(r, s.X), s.X = 0), combineDateAndTimeDuration(s, r);
|
|
510
522
|
}
|
|
511
523
|
function differencePlainDateTimeWithRounding(e, t, o, n, r, a, i) {
|
|
512
|
-
if (!compareIsoDateTime(e, t)) return combineDateAndTimeDuration(zeroDateDuration(),
|
|
524
|
+
if (!compareIsoDateTime(e, t)) return combineDateAndTimeDuration(zeroDateDuration(), ve);
|
|
513
525
|
validateIsoDateTime(e), validateIsoDateTime(t);
|
|
514
526
|
const c = differenceISODateTime(e, t, o, n);
|
|
515
|
-
return a ===
|
|
527
|
+
return a === D && 1 === r ? c : roundRelativeDuration(c, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, o, n, r, a, i);
|
|
516
528
|
}
|
|
517
529
|
function differenceTemporalPlainDateTime(e, t, o, n) {
|
|
518
530
|
const r = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(o));
|
|
519
|
-
calendarEquals(t.Y, r.Y) || throwRangeError(
|
|
520
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
531
|
+
calendarEquals(t.Y, r.Y) || throwRangeError(Z);
|
|
532
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), x, [], D, d);
|
|
521
533
|
return compareIsoDateTime(t.K, r.K) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differencePlainDateTimeWithRounding(t.K, r.K, t.Y, a.L, a.V, a.H, a.q), a.L), e)) : createTemporalDuration(createTemporalDurationSlot([
|
|
522
534
|
0,
|
|
523
535
|
0,
|
|
@@ -539,14 +551,13 @@ function validateIsoDateTime(e) {
|
|
|
539
551
|
return ((e) => {
|
|
540
552
|
const t = isoDateRecordToEpochDays(e.o);
|
|
541
553
|
return Math.abs(t) <= 1e8 || -100000001 === t && !!compareTimeRecord(e.p, midnightTimeRecord());
|
|
542
|
-
})(e) || throwRangeError(
|
|
554
|
+
})(e) || throwRangeError(P), e;
|
|
543
555
|
}
|
|
544
556
|
function getInternalSlotForPlainDateTime(e) {
|
|
545
|
-
return
|
|
557
|
+
return Ze.get(e);
|
|
546
558
|
}
|
|
547
559
|
function getInternalSlotOrThrowForPlainDateTime(e) {
|
|
548
|
-
|
|
549
|
-
return t || throwTypeError(Te), t;
|
|
560
|
+
return getInternalSlotOrThrow(Ze, e);
|
|
550
561
|
}
|
|
551
562
|
function isPlainDateTime(e) {
|
|
552
563
|
return !!getInternalSlotForPlainDateTime(e);
|
|
@@ -556,7 +567,7 @@ function calendarDateForPlainDateTime(e) {
|
|
|
556
567
|
return calendarIsoToDate(t.Y, t.K.o);
|
|
557
568
|
}
|
|
558
569
|
function createTimeRecord(e, t, o, n, r, a, i = 0) {
|
|
559
|
-
return {
|
|
570
|
+
return ((e, t, o, n, r, a) => isWithin(e, 0, 23) && isWithin(t, 0, 59) && isWithin(o, 0, 59) && isWithin(n, 0, 999) && isWithin(r, 0, 999) && isWithin(a, 0, 999))(e, t, o, n, r, a) || throwRangeError(b), {
|
|
560
571
|
D: e,
|
|
561
572
|
I: t,
|
|
562
573
|
O: o,
|
|
@@ -575,17 +586,14 @@ function differenceTime(e, t) {
|
|
|
575
586
|
function toTemporalTime(e, t) {
|
|
576
587
|
if (isObject(e)) return isPlainTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getInternalSlotOrThrowForPlainTime(e)) : isPlainDateTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getInternalSlotOrThrowForPlainDateTime(e).K.p) : isZonedDateTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(e)).p) : regulateTime(...toTemporalTimeRecord(e), getTemporalOverflowOption(getOptionsObject(t)));
|
|
577
588
|
validateString(e);
|
|
578
|
-
const o = parseIsoDateTime(e, [
|
|
589
|
+
const o = parseIsoDateTime(e, [nt]);
|
|
579
590
|
return getTemporalOverflowOption(getOptionsObject(t)), o.p;
|
|
580
591
|
}
|
|
581
592
|
function toTimeRecordOrMidnight(e) {
|
|
582
593
|
return void 0 === e ? midnightTimeRecord() : toTemporalTime(e);
|
|
583
594
|
}
|
|
584
595
|
function regulateTime(e, t, o, n, r, a, i) {
|
|
585
|
-
return "constrain" === i ? createTimeRecord(clamp(e, 0, 23), clamp(t, 0, 59), clamp(o, 0, 59), clamp(n, 0, 999), clamp(r, 0, 999), clamp(a, 0, 999)) :
|
|
586
|
-
}
|
|
587
|
-
function isValidTime(e, t, o, n, r, a) {
|
|
588
|
-
return isWithin(e, 0, 23) && isWithin(t, 0, 59) && isWithin(o, 0, 59) && isWithin(n, 0, 999) && isWithin(r, 0, 999) && isWithin(a, 0, 999);
|
|
596
|
+
return "constrain" === i ? createTimeRecord(clamp(e, 0, 23), clamp(t, 0, 59), clamp(o, 0, 59), clamp(n, 0, 999), clamp(r, 0, 999), clamp(a, 0, 999)) : createTimeRecord(e, t, o, n, r, a);
|
|
589
597
|
}
|
|
590
598
|
function balanceTime(e, t, o, n, r, a) {
|
|
591
599
|
return r += divFloor(a, 1e3), n += divFloor(r, 1e3), o += divFloor(n, 1e3), t += divFloor(o, 60), {
|
|
@@ -598,23 +606,23 @@ function balanceTime(e, t, o, n, r, a) {
|
|
|
598
606
|
X: divFloor(e, 24)
|
|
599
607
|
};
|
|
600
608
|
}
|
|
601
|
-
function createTemporalTime(e, t = Object.create(
|
|
602
|
-
return
|
|
609
|
+
function createTemporalTime(e, t = Object.create(Ye.prototype)) {
|
|
610
|
+
return Ce.set(t, e), t;
|
|
603
611
|
}
|
|
604
612
|
function toTemporalTimeRecord(e, t = !1) {
|
|
605
613
|
let o = !1;
|
|
606
614
|
const n = [
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
615
|
+
yt.D,
|
|
616
|
+
yt.S,
|
|
617
|
+
yt.F,
|
|
618
|
+
yt.I,
|
|
619
|
+
yt.$,
|
|
620
|
+
yt.O
|
|
613
621
|
].map((n) => {
|
|
614
622
|
const r = e[n];
|
|
615
623
|
return void 0 !== r ? (o = !0, toIntegerWithTruncation(r)) : t ? void 0 : 0;
|
|
616
624
|
});
|
|
617
|
-
return o || throwTypeError(
|
|
625
|
+
return o || throwTypeError(U), [
|
|
618
626
|
0,
|
|
619
627
|
3,
|
|
620
628
|
5,
|
|
@@ -638,18 +646,17 @@ function roundTime(e, n, r, a) {
|
|
|
638
646
|
return balanceTime(0, 0, 0, 0, 0, divFloor(c, i) * i + roundNumberToIncrement(modFloor(c, i), n * nanosecondsForTimeUnit(r), a));
|
|
639
647
|
}
|
|
640
648
|
function differenceTemporalPlainTime(e, t, o, n) {
|
|
641
|
-
const r = toTemporalTime(o), a = getDifferenceSettings(e, getOptionsObject(n),
|
|
649
|
+
const r = toTemporalTime(o), a = getDifferenceSettings(e, getOptionsObject(n), V, [], D, m);
|
|
642
650
|
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(differenceTime(t, r), a.V, a.H, a.q)), a.L), e));
|
|
643
651
|
}
|
|
644
652
|
function addDurationToTime(e, t, o) {
|
|
645
653
|
return createTemporalTime(addTime(t, toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)).p));
|
|
646
654
|
}
|
|
647
655
|
function getInternalSlotOrThrowForPlainTime(e) {
|
|
648
|
-
|
|
649
|
-
return t || throwTypeError(Te), t;
|
|
656
|
+
return getInternalSlotOrThrow(Ce, e);
|
|
650
657
|
}
|
|
651
658
|
function isPlainTime(e) {
|
|
652
|
-
return
|
|
659
|
+
return Ce.has(e);
|
|
653
660
|
}
|
|
654
661
|
function optionalChain(e) {
|
|
655
662
|
return e.reduceRight((e, t) => `${t}(?:${e})?`);
|
|
@@ -661,31 +668,31 @@ function createRegExp(e) {
|
|
|
661
668
|
return RegExp(`^(?:${e})$`);
|
|
662
669
|
}
|
|
663
670
|
function isAmbiguousTemporalTimeString(e) {
|
|
664
|
-
return
|
|
671
|
+
return it.some((t) => isSemanticallyValid(e.match(t)?.groups));
|
|
665
672
|
}
|
|
666
673
|
function isTimeZoneIdentifier(e) {
|
|
667
|
-
return
|
|
674
|
+
return ct.test(e);
|
|
668
675
|
}
|
|
669
676
|
function isSemanticallyValid(e) {
|
|
670
|
-
return !!e && "-000000" !== (e.a || e.l) && (!e.a || isValidIsoDate(
|
|
677
|
+
return !!e && "-000000" !== (e.a || e.l) && (!e.a || isValidIsoDate(Se(e.a), Se(e.b), Se(e.c))) && (!e.n || isValidIsoDate(1972, Se(e.m), Se(e.n)));
|
|
671
678
|
}
|
|
672
679
|
function parseIsoDateTime(e, t) {
|
|
673
680
|
for (const o of t) {
|
|
674
681
|
const t = e.match(o);
|
|
675
|
-
if (!t || !isSemanticallyValid(t.groups) || o ===
|
|
682
|
+
if (!t || !isSemanticallyValid(t.groups) || o === nt && isAmbiguousTemporalTimeString(e)) continue;
|
|
676
683
|
const n = t.groups;
|
|
677
684
|
let r;
|
|
678
685
|
if (n.k) {
|
|
679
686
|
let t = !1;
|
|
680
|
-
for (const [, o, a, i] of n.k.matchAll(
|
|
687
|
+
for (const [, o, a, i] of n.k.matchAll(Qe)) "u-ca" === a ? r ? (o || t) && throwRangeError(parseError(e)) : (r = i, t = !!o) : o && throwRangeError(parseError(e));
|
|
681
688
|
}
|
|
682
689
|
n.m && r && "iso8601" !== asciiLowerCase(r) && throwRangeError(parseError(e));
|
|
683
690
|
const a = (n.g || "").padEnd(9, "0");
|
|
684
691
|
return {
|
|
685
|
-
t: mapUnlessUndefined(n.a || n.l,
|
|
686
|
-
u:
|
|
687
|
-
T:
|
|
688
|
-
p: n.d ? createTimeRecord(
|
|
692
|
+
t: mapUnlessUndefined(n.a || n.l, Se),
|
|
693
|
+
u: Se(n.b || n.m || 1),
|
|
694
|
+
T: Se(n.c || n.n || 1),
|
|
695
|
+
p: n.d ? createTimeRecord(Se(n.d || 0), Se(n.e || 0), clamp(Se(n.f || 0), 0, 59), Se(a.slice(0, 3)), Se(a.slice(3, 6)), Se(a.slice(6))) : void 0,
|
|
689
696
|
P: {
|
|
690
697
|
Z: !!n.i,
|
|
691
698
|
N: n.h,
|
|
@@ -697,11 +704,11 @@ function parseIsoDateTime(e, t) {
|
|
|
697
704
|
throwRangeError(parseError(e));
|
|
698
705
|
}
|
|
699
706
|
function parseDateTimeUtcOffset(e) {
|
|
700
|
-
const o = e.match(
|
|
701
|
-
return o || throwRangeError(parseError(e)),
|
|
707
|
+
const o = e.match(lt);
|
|
708
|
+
return o || throwRangeError(parseError(e)), Se(`${o[1]}1`) * (36e11 * Se(o[2]) + Se(o[4] || "") * t + 1e9 * Se(o[5] || "") + Se((o[6] || "").padEnd(9, "0")) + 0);
|
|
702
709
|
}
|
|
703
710
|
function hasUtcOffsetSubMinuteParts(e) {
|
|
704
|
-
return !!e.match(
|
|
711
|
+
return !!e.match(lt)[5];
|
|
705
712
|
}
|
|
706
713
|
function toTemporalMonthDay(e, t) {
|
|
707
714
|
if (isObject(e)) {
|
|
@@ -709,31 +716,30 @@ function toTemporalMonthDay(e, t) {
|
|
|
709
716
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay(o.o, o.Y);
|
|
710
717
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
711
718
|
return createTemporalMonthDay(calendarMonthDayFromFields(n, prepareCalendarFields(n, e, [
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
719
|
+
yt.t,
|
|
720
|
+
yt.u,
|
|
721
|
+
yt.v,
|
|
722
|
+
yt.T
|
|
716
723
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
717
724
|
}
|
|
718
725
|
validateString(e);
|
|
719
|
-
const o = parseIsoDateTime(e, [
|
|
720
|
-
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay("iso8601" === n ? createIsoDateRecord(1972, o.u, o.T) : calendarMonthDayFromFields(n, isoDateToFields(n, validateIsoDate(createIsoDateRecord(o.t, o.u, o.T)),
|
|
726
|
+
const o = parseIsoDateTime(e, [rt]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
727
|
+
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay("iso8601" === n ? createIsoDateRecord(1972, o.u, o.T) : calendarMonthDayFromFields(n, isoDateToFields(n, validateIsoDate(createIsoDateRecord(o.t, o.u, o.T)), q), _), n);
|
|
721
728
|
}
|
|
722
|
-
function createTemporalMonthDay(e, t, o = Object.create(
|
|
723
|
-
return
|
|
729
|
+
function createTemporalMonthDay(e, t, o = Object.create(mt.prototype)) {
|
|
730
|
+
return dt.set(o, {
|
|
724
731
|
o: validateIsoDate(e),
|
|
725
732
|
Y: t
|
|
726
733
|
}), o;
|
|
727
734
|
}
|
|
728
735
|
function temporalMonthDayToString(e, t) {
|
|
729
|
-
return `${t ===
|
|
736
|
+
return `${t === De || t === pe || "iso8601" !== e.Y ? `${padIsoYear(e.o.t)}-` : ""}${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.Y, t)}`;
|
|
730
737
|
}
|
|
731
738
|
function getInternalSlotForPlainMonthDay(e) {
|
|
732
|
-
return
|
|
739
|
+
return dt.get(e);
|
|
733
740
|
}
|
|
734
741
|
function getInternalSlotOrThrowForPlainMonthDay(e) {
|
|
735
|
-
|
|
736
|
-
return t || throwTypeError(Te), t;
|
|
742
|
+
return getInternalSlotOrThrow(dt, e);
|
|
737
743
|
}
|
|
738
744
|
function isPlainMonthDay(e) {
|
|
739
745
|
return !!getInternalSlotForPlainMonthDay(e);
|
|
@@ -744,14 +750,14 @@ function toTemporalYearMonth(e, t) {
|
|
|
744
750
|
if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(o.o, o.Y);
|
|
745
751
|
const n = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
746
752
|
return createTemporalYearMonth(calendarYearMonthFromFields(n, prepareCalendarFields(n, e, [
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
753
|
+
yt.t,
|
|
754
|
+
yt.u,
|
|
755
|
+
yt.v
|
|
750
756
|
], []), getTemporalOverflowOption(getOptionsObject(t))), n);
|
|
751
757
|
}
|
|
752
758
|
validateString(e);
|
|
753
|
-
const o = parseIsoDateTime(e, [
|
|
754
|
-
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(calendarYearMonthFromFields(n, isoDateToFields(n, validateIsoYearMonth(createIsoDateRecord(o.t, o.u, o.T)),
|
|
759
|
+
const o = parseIsoDateTime(e, [at]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
760
|
+
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(calendarYearMonthFromFields(n, isoDateToFields(n, validateIsoYearMonth(createIsoDateRecord(o.t, o.u, o.T)), H), _), n);
|
|
755
761
|
}
|
|
756
762
|
function balanceIsoYearMonth(e, t) {
|
|
757
763
|
return {
|
|
@@ -759,19 +765,19 @@ function balanceIsoYearMonth(e, t) {
|
|
|
759
765
|
u: modFloor(t - 1, 12) + 1
|
|
760
766
|
};
|
|
761
767
|
}
|
|
762
|
-
function createTemporalYearMonth(e, t, o = Object.create(
|
|
763
|
-
return
|
|
768
|
+
function createTemporalYearMonth(e, t, o = Object.create(Tt.prototype)) {
|
|
769
|
+
return ut.set(o, {
|
|
764
770
|
o: validateIsoYearMonth(e),
|
|
765
771
|
Y: t
|
|
766
772
|
}), o;
|
|
767
773
|
}
|
|
768
774
|
function temporalYearMonthToString(e, t) {
|
|
769
|
-
return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}${t ===
|
|
775
|
+
return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}${t === De || t === pe || "iso8601" !== e.Y ? `-${toZeroPaddedDecimalString(e.o.T, 2)}` : ""}${formatCalendarAnnotation(e.Y, t)}`;
|
|
770
776
|
}
|
|
771
777
|
function differenceTemporalPlainYearMonth(e, t, o, n) {
|
|
772
778
|
const r = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(o));
|
|
773
|
-
calendarEquals(t.Y, r.Y) || throwRangeError(
|
|
774
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
779
|
+
calendarEquals(t.Y, r.Y) || throwRangeError(Z);
|
|
780
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), z, [l, d], s, c);
|
|
775
781
|
if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
|
|
776
782
|
0,
|
|
777
783
|
0,
|
|
@@ -785,35 +791,34 @@ function differenceTemporalPlainYearMonth(e, t, o, n) {
|
|
|
785
791
|
0
|
|
786
792
|
]));
|
|
787
793
|
const i = calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
788
|
-
...isoDateToFields(t.Y, t.o,
|
|
789
|
-
[
|
|
790
|
-
}),
|
|
791
|
-
...isoDateToFields(t.Y, r.o,
|
|
792
|
-
[
|
|
793
|
-
}),
|
|
794
|
-
let
|
|
795
|
-
if (a.H !==
|
|
794
|
+
...isoDateToFields(t.Y, t.o, H),
|
|
795
|
+
[yt.T]: 1
|
|
796
|
+
}), _), m = calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
797
|
+
...isoDateToFields(t.Y, r.o, H),
|
|
798
|
+
[yt.T]: 1
|
|
799
|
+
}), _);
|
|
800
|
+
let u = combineDateAndTimeDuration(adjustDateDurationRecord(calendarDateUntil(t.Y, i, m, a.L), 0, 0), ve);
|
|
801
|
+
if (a.H !== s || 1 !== a.V) {
|
|
796
802
|
const e = combineIsoDateAndTimeRecord(i, midnightTimeRecord());
|
|
797
|
-
|
|
803
|
+
u = roundRelativeDuration(u, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(m, midnightTimeRecord())), e, void 0, t.Y, a.L, a.V, a.H, a.q);
|
|
798
804
|
}
|
|
799
|
-
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(
|
|
805
|
+
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(u, d), e));
|
|
800
806
|
}
|
|
801
807
|
function addDurationToYearMonth(e, t, o, n) {
|
|
802
808
|
const r = toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)), a = getTemporalOverflowOption(getOptionsObject(n));
|
|
803
809
|
return (r.A.ee || r.A.X || signTimeDuration(r.p)) && throwRangeError("duration can contain only years and months"), createTemporalYearMonth(calendarYearMonthFromFields(t.Y, isoDateToFields(t.Y, calendarDateAdd(t.Y, calendarDateFromFields(t.Y, createNullPrototypeObject({
|
|
804
|
-
...isoDateToFields(t.Y, t.o,
|
|
805
|
-
[
|
|
806
|
-
}),
|
|
810
|
+
...isoDateToFields(t.Y, t.o, H),
|
|
811
|
+
[yt.T]: 1
|
|
812
|
+
}), _), r.A, a), H), a), t.Y);
|
|
807
813
|
}
|
|
808
814
|
function validateIsoYearMonth(e) {
|
|
809
|
-
return ((e) => isWithin(12 * e.t + e.u, -3261848, 3309129))(e) || throwRangeError(
|
|
815
|
+
return ((e) => isWithin(12 * e.t + e.u, -3261848, 3309129))(e) || throwRangeError(P), e;
|
|
810
816
|
}
|
|
811
817
|
function getInternalSlotForPlainYearMonth(e) {
|
|
812
|
-
return
|
|
818
|
+
return ut.get(e);
|
|
813
819
|
}
|
|
814
820
|
function getInternalSlotOrThrowForPlainYearMonth(e) {
|
|
815
|
-
|
|
816
|
-
return t || throwTypeError(Te), t;
|
|
821
|
+
return getInternalSlotOrThrow(ut, e);
|
|
817
822
|
}
|
|
818
823
|
function isPlainYearMonth(e) {
|
|
819
824
|
return !!getInternalSlotForPlainYearMonth(e);
|
|
@@ -823,14 +828,14 @@ function calendarDateForPlainYearMonth(e) {
|
|
|
823
828
|
return calendarIsoToDate(t.Y, t.o);
|
|
824
829
|
}
|
|
825
830
|
function createIsoDateRecord(e, t, o) {
|
|
826
|
-
return {
|
|
831
|
+
return isValidIsoDate(e, t, o) || throwRangeError(b), {
|
|
827
832
|
t: e,
|
|
828
833
|
u: t,
|
|
829
834
|
T: o
|
|
830
835
|
};
|
|
831
836
|
}
|
|
832
|
-
function createTemporalDate(e, t, o = Object.create(
|
|
833
|
-
return
|
|
837
|
+
function createTemporalDate(e, t, o = Object.create(ht.prototype)) {
|
|
838
|
+
return Dt.set(o, {
|
|
834
839
|
o: validateIsoDate(e),
|
|
835
840
|
Y: t
|
|
836
841
|
}), o;
|
|
@@ -854,18 +859,18 @@ function toTemporalDate(e, t) {
|
|
|
854
859
|
}
|
|
855
860
|
const o = getTemporalCalendarIdentifierWithIsoDefault(e);
|
|
856
861
|
return createTemporalDate(calendarDateFromFields(o, prepareCalendarFields(o, e, [
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
862
|
+
yt.t,
|
|
863
|
+
yt.u,
|
|
864
|
+
yt.v,
|
|
865
|
+
yt.T
|
|
861
866
|
], []), getTemporalOverflowOption(getOptionsObject(t))), o);
|
|
862
867
|
}
|
|
863
868
|
validateString(e);
|
|
864
|
-
const o = parseIsoDateTime(e, [
|
|
869
|
+
const o = parseIsoDateTime(e, [tt]), n = canonicalizeCalendar(o.Y || "iso8601");
|
|
865
870
|
return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDate(createIsoDateRecord(o.t, o.u, o.T), n);
|
|
866
871
|
}
|
|
867
872
|
function regulateIsoDate(e, t, o, n) {
|
|
868
|
-
return "constrain" === n ? createIsoDateRecord(e, t = clamp(t, 1, 12), clamp(o, 1, isoDaysInMonth(e, t))) :
|
|
873
|
+
return "constrain" === n ? createIsoDateRecord(e, t = clamp(t, 1, 12), clamp(o, 1, isoDaysInMonth(e, t))) : createIsoDateRecord(e, t, o);
|
|
869
874
|
}
|
|
870
875
|
function isValidIsoDate(e, t, o) {
|
|
871
876
|
return isWithin(t, 1, 12) && isWithin(o, 1, isoDaysInMonth(e, t));
|
|
@@ -884,8 +889,8 @@ function compareIsoDate(e, t) {
|
|
|
884
889
|
}
|
|
885
890
|
function differenceTemporalPlainDate(e, t, o, n) {
|
|
886
891
|
const r = getInternalSlotOrThrowForPlainDate(toTemporalDate(o));
|
|
887
|
-
calendarEquals(t.Y, r.Y) || throwRangeError(
|
|
888
|
-
const a = getDifferenceSettings(e, getOptionsObject(n),
|
|
892
|
+
calendarEquals(t.Y, r.Y) || throwRangeError(Z);
|
|
893
|
+
const a = getDifferenceSettings(e, getOptionsObject(n), z, [], d, d);
|
|
889
894
|
if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
|
|
890
895
|
0,
|
|
891
896
|
0,
|
|
@@ -898,12 +903,12 @@ function differenceTemporalPlainDate(e, t, o, n) {
|
|
|
898
903
|
0,
|
|
899
904
|
0
|
|
900
905
|
]));
|
|
901
|
-
let i = combineDateAndTimeDuration(calendarDateUntil(t.Y, t.o, r.o, a.L),
|
|
902
|
-
if (a.H !==
|
|
906
|
+
let i = combineDateAndTimeDuration(calendarDateUntil(t.Y, t.o, r.o, a.L), ve);
|
|
907
|
+
if (a.H !== d || 1 !== a.V) {
|
|
903
908
|
const e = combineIsoDateAndTimeRecord(t.o, midnightTimeRecord());
|
|
904
909
|
i = roundRelativeDuration(i, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())), e, void 0, t.Y, a.L, a.V, a.H, a.q);
|
|
905
910
|
}
|
|
906
|
-
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(i,
|
|
911
|
+
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(i, d), e));
|
|
907
912
|
}
|
|
908
913
|
function addDurationToDate(e, t, o, n) {
|
|
909
914
|
return createTemporalDate(calendarDateAdd(t.Y, t.o, ((e) => {
|
|
@@ -912,11 +917,10 @@ function addDurationToDate(e, t, o, n) {
|
|
|
912
917
|
})(applySignToDurationSlot(toTemporalDuration(o), e)), getTemporalOverflowOption(getOptionsObject(n))), t.Y);
|
|
913
918
|
}
|
|
914
919
|
function getInternalSlotForPlainDate(e) {
|
|
915
|
-
return
|
|
920
|
+
return Dt.get(e);
|
|
916
921
|
}
|
|
917
922
|
function getInternalSlotOrThrowForPlainDate(e) {
|
|
918
|
-
|
|
919
|
-
return t || throwTypeError(Te), t;
|
|
923
|
+
return getInternalSlotOrThrow(Dt, e);
|
|
920
924
|
}
|
|
921
925
|
function isPlainDate(e) {
|
|
922
926
|
return !!getInternalSlotForPlainDate(e);
|
|
@@ -929,7 +933,7 @@ function calendarDateForPlainDate(e) {
|
|
|
929
933
|
return calendarIsoToDate(t.Y, t.o);
|
|
930
934
|
}
|
|
931
935
|
function formatToParts(e, t) {
|
|
932
|
-
return (
|
|
936
|
+
return (pt[e] ||= new Nt("en", {
|
|
933
937
|
year: "numeric",
|
|
934
938
|
month: "numeric",
|
|
935
939
|
day: "numeric",
|
|
@@ -950,7 +954,7 @@ function extractYearMonthDay(e, t) {
|
|
|
950
954
|
};
|
|
951
955
|
}
|
|
952
956
|
function yearMonthDay(e, t) {
|
|
953
|
-
return
|
|
957
|
+
return ft[e].J(t, () => ((e, t) => {
|
|
954
958
|
const o = formatToParts(e, t), n = [
|
|
955
959
|
"relatedYear",
|
|
956
960
|
"month",
|
|
@@ -964,7 +968,7 @@ function yearMonthDay(e, t) {
|
|
|
964
968
|
})(e, t));
|
|
965
969
|
}
|
|
966
970
|
function getNewYear(e, t) {
|
|
967
|
-
return
|
|
971
|
+
return gt[e].J(t, () => {
|
|
968
972
|
let o = isoDateToEpochDays(t, 0, 1985 === t ? 53 : Math.floor(modFloor(-10.8822 * t + 16, 29.53)) + 23), n = yearMonthDay(e, o);
|
|
969
973
|
for (let r = 0; "M01" !== n.v; r++) {
|
|
970
974
|
if (r > 20) throw new Error("unexpected calendar error");
|
|
@@ -1108,7 +1112,7 @@ function epochDaysToDate$2(e, t) {
|
|
|
1108
1112
|
};
|
|
1109
1113
|
}
|
|
1110
1114
|
function getYearMonthDay(e) {
|
|
1111
|
-
return
|
|
1115
|
+
return It.J(e, () => extractYearMonthDay("islamic-umalqura", e));
|
|
1112
1116
|
}
|
|
1113
1117
|
function getFirstDayOfMonth(e, t) {
|
|
1114
1118
|
const o = balanceIsoYearMonth(e, t), n = calendarIntegersToEpochDays$2("islamic-civil", o.t, o.u, 1);
|
|
@@ -1121,7 +1125,7 @@ function constrainDay$2(e, t, o) {
|
|
|
1121
1125
|
return o < 30 ? o : clamp(o, 1, ((e, t) => getFirstDayOfMonth(e, t + 1) - getFirstDayOfMonth(e, t))(e, t));
|
|
1122
1126
|
}
|
|
1123
1127
|
function startOfYear(e) {
|
|
1124
|
-
return
|
|
1128
|
+
return Ot.J(e, () => {
|
|
1125
1129
|
const t = isoDateToEpochDays(e + 621, 4, 1), o = extractYearMonthDay("persian", t);
|
|
1126
1130
|
return t - dayOfYearFromMonthDay(o.u, o.T) + 1;
|
|
1127
1131
|
});
|
|
@@ -1154,7 +1158,7 @@ function daysInMonth(e, t) {
|
|
|
1154
1158
|
return t <= 6 ? 31 : 12 !== t || isLeapYear(e) ? 30 : 29;
|
|
1155
1159
|
}
|
|
1156
1160
|
function canonicalizeCalendar(e) {
|
|
1157
|
-
return "islamicc" === (e = asciiLowerCase(e)) ? "islamic-civil" : "ethiopic-amete-alem" === e ? "ethioaa" :
|
|
1161
|
+
return "islamicc" === (e = asciiLowerCase(e)) ? "islamic-civil" : "ethiopic-amete-alem" === e ? "ethioaa" : St[e] ? e : throwRangeError(((e) => `unsupported calendar: ${e}`)(e));
|
|
1158
1162
|
}
|
|
1159
1163
|
function calendarDateAdd(e, t, o, n) {
|
|
1160
1164
|
if (isIsoLikeCalendar(e) || !o.te && !o.oe) return ((e, t, o) => {
|
|
@@ -1169,7 +1173,7 @@ function compareSurpasses(e, t, o, n, r) {
|
|
|
1169
1173
|
}
|
|
1170
1174
|
function nonIsoDateSurpasses(e, t, o, n, r, a) {
|
|
1171
1175
|
if (compareSurpasses(t, o.t + r, o.v, o.T, n)) return { De: !0 };
|
|
1172
|
-
const i = balanceNonIsoYearMonth(e, o.t + r, monthCodeToOrdinal(e, o.t + r, constrainMonthCode(e, o.t + r, parseMonthCode(o.v),
|
|
1176
|
+
const i = balanceNonIsoYearMonth(e, o.t + r, monthCodeToOrdinal(e, o.t + r, constrainMonthCode(e, o.t + r, parseMonthCode(o.v), _)) + a);
|
|
1173
1177
|
return compareSurpasses(t, i.t, i.u, o.T, n) ? { De: !0 } : {
|
|
1174
1178
|
De: !1,
|
|
1175
1179
|
...i
|
|
@@ -1177,20 +1181,20 @@ function nonIsoDateSurpasses(e, t, o, n, r, a) {
|
|
|
1177
1181
|
}
|
|
1178
1182
|
function calendarDateUntil(e, t, o, n) {
|
|
1179
1183
|
const r = compareIsoDate(o, t);
|
|
1180
|
-
if (isIsoLikeCalendar(e) || n ===
|
|
1184
|
+
if (isIsoLikeCalendar(e) || n === l || n === d || !r) return ((e, t, o) => {
|
|
1181
1185
|
const n = compareIsoDate(t, e);
|
|
1182
1186
|
if (!n) return zeroDateDuration();
|
|
1183
|
-
if (o ===
|
|
1187
|
+
if (o === l || o === d) {
|
|
1184
1188
|
const n = isoDateToEpochDays(t.t, t.u - 1, t.T) - isoDateToEpochDays(e.t, e.u - 1, e.T);
|
|
1185
|
-
return o ===
|
|
1189
|
+
return o === l ? createDateDurationRecord(0, 0, divTrunc(n, 7) + 0, n % 7 + 0) : createDateDurationRecord(0, 0, 0, n);
|
|
1186
1190
|
}
|
|
1187
|
-
const r = 12 * t.t + t.u - 12 * e.t - e.u - (n * (e.T - t.T) > 0 ? n : 0), a = balanceIsoYearMonth(e.t, e.u + r), i = isoDateRecordToEpochDays(t) - isoDateRecordToEpochDays(regulateIsoDate(a.t, a.u, e.T,
|
|
1188
|
-
return o ===
|
|
1191
|
+
const r = 12 * t.t + t.u - 12 * e.t - e.u - (n * (e.T - t.T) > 0 ? n : 0), a = balanceIsoYearMonth(e.t, e.u + r), i = isoDateRecordToEpochDays(t) - isoDateRecordToEpochDays(regulateIsoDate(a.t, a.u, e.T, _));
|
|
1192
|
+
return o === c ? createDateDurationRecord(divTrunc(r, 12), r % 12 + 0, 0, i) : createDateDurationRecord(0, r, 0, i);
|
|
1189
1193
|
})(t, o, n);
|
|
1190
1194
|
const a = nonIsoCalendarIsoToDate(e, t), i = nonIsoCalendarIsoToDate(e, o);
|
|
1191
|
-
let
|
|
1192
|
-
if (n ===
|
|
1193
|
-
const
|
|
1195
|
+
let s, m = 0;
|
|
1196
|
+
if (n === c) for (m = i.t - a.t; (s = nonIsoDateSurpasses(e, r, a, i, m, 0)).De; m -= r);
|
|
1197
|
+
const u = ("hebrew" === e ? (T = (s || a).t, D = (s || a).u, monthNumber(i.t, i.u) - monthNumber(T, D)) : isChineseDangi(e) ? (function(e, t, o, n, r) {
|
|
1194
1198
|
if (t === n) return r - o;
|
|
1195
1199
|
const a = calendarIntegersToEpochDays$6(e, t, o, 1), i = calendarIntegersToEpochDays$6(e, n, r, 1), c = sign(i - a);
|
|
1196
1200
|
if (Math.abs(i - a) <= 15e6) return Math.round((i - a) / 29.5306);
|
|
@@ -1200,14 +1204,14 @@ function calendarDateUntil(e, t, o, n) {
|
|
|
1200
1204
|
t -= yearMonthDay(e, t).T - 1, s += Math.round((t - l) / 29.5306), l = t;
|
|
1201
1205
|
}
|
|
1202
1206
|
return s;
|
|
1203
|
-
})(e, (
|
|
1204
|
-
var
|
|
1205
|
-
const
|
|
1206
|
-
return createDateDurationRecord(
|
|
1207
|
+
})(e, (s || a).t, (s || a).u, i.t, i.u) : (i.t - (s || a).t) * a.ue + i.u - (s || a).u) - (r * (a.T - i.T) > 0 ? r : 0);
|
|
1208
|
+
var T, D;
|
|
1209
|
+
const h = nonIsoDateSurpasses(e, r, a, i, m, u);
|
|
1210
|
+
return createDateDurationRecord(m, u, 0, isoDateRecordToEpochDays(o) - isoDateRecordToEpochDays(calendarIntegersToIso(e, h.t, h.u, constrainDay(e, h.t, h.u, a.T, _))));
|
|
1207
1211
|
}
|
|
1208
1212
|
function calendarDateToIso(e, t, o) {
|
|
1209
|
-
const n = t[
|
|
1210
|
-
if (isIsoLikeCalendar(e)) return ((e, t) => regulateIsoDate(e[
|
|
1213
|
+
const n = t[yt.t], r = t[yt.u], a = mapUnlessUndefined(t[yt.v], parseMonthCode), i = t[yt.T];
|
|
1214
|
+
if (isIsoLikeCalendar(e)) return ((e, t) => regulateIsoDate(e[yt.t], e[yt.u], e[yt.T], t))({
|
|
1211
1215
|
...t,
|
|
1212
1216
|
year: n + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0)
|
|
1213
1217
|
}, o);
|
|
@@ -1224,7 +1228,7 @@ function nonIsoCalendarIsoToDate(e, t) {
|
|
|
1224
1228
|
}
|
|
1225
1229
|
};
|
|
1226
1230
|
if ("japanese" === e) {
|
|
1227
|
-
const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a =
|
|
1231
|
+
const r = o >= 18017 ? "reiwa" : o >= 6947 ? "heisei" : o >= -15713 ? "showa" : o >= -20974 ? "taisho" : o >= -35428 ? "meiji" : t.t > 0 ? "ce" : "bce", a = St[e].get(r);
|
|
1228
1232
|
return {
|
|
1229
1233
|
ne: r,
|
|
1230
1234
|
re: "bce" === r ? 1 - t.t : t.t - a + 1,
|
|
@@ -1396,17 +1400,17 @@ function nonIsoCalendarIsoToDate(e, t) {
|
|
|
1396
1400
|
})(o) : epochDaysToDate$2(e, o);
|
|
1397
1401
|
}
|
|
1398
1402
|
function calendarSupportsEra(e) {
|
|
1399
|
-
return !!
|
|
1403
|
+
return !!St[e].size;
|
|
1400
1404
|
}
|
|
1401
1405
|
function canonicalizeEraInCalendar(e, t) {
|
|
1402
1406
|
const o = "ad" === t ? "ce" : "bc" === t ? "bce" : t;
|
|
1403
|
-
return
|
|
1407
|
+
return St[e].has(o) ? o : throwRangeError(((e) => `invalid era: ${e}`)(t));
|
|
1404
1408
|
}
|
|
1405
1409
|
function constrainMonthCode(e, t, o, n) {
|
|
1406
|
-
if ("hebrew" === e) return o[1] && !isLeapYear$2(t) ? "reject" === n ? throwRangeError(
|
|
1410
|
+
if ("hebrew" === e) return o[1] && !isLeapYear$2(t) ? "reject" === n ? throwRangeError(b) : [6, !1] : o;
|
|
1407
1411
|
if (isChineseDangi(e)) {
|
|
1408
1412
|
const r = ((e, t, o) => o[1] && ordinalMonthToMonthCode(e, t, o[0] + 1) !== createMonthCode(...o) ? [o[0], !1] : o)(e, t, o);
|
|
1409
|
-
return o !== r && "reject" === n ? throwRangeError(
|
|
1413
|
+
return o !== r && "reject" === n ? throwRangeError(b) : r;
|
|
1410
1414
|
}
|
|
1411
1415
|
return o;
|
|
1412
1416
|
}
|
|
@@ -1430,11 +1434,11 @@ function isChineseDangi(e) {
|
|
|
1430
1434
|
}
|
|
1431
1435
|
function constrainDay(e, t, o, n, r) {
|
|
1432
1436
|
const a = "persian" === e ? ((e, t, o) => o < 30 ? o : clamp(o, 1, daysInMonth(e, t)))(t, o, n) : "islamic-umalqura" === e ? constrainDay$2(t, o, n) : isChineseDangi(e) ? ((e, t, o, n) => n <= 29 ? n : clamp(n, 1, daysInMonth$6(e, t, o)))(e, t, o, n) : clamp(n, 1, isCopticOrEthiopic(e) ? daysInMonth$5(t, o) : "indian" === e ? daysInMonth$3(t, o) : "hebrew" === e ? daysInMonth$4(t, o) : daysInMonth$2(t, o));
|
|
1433
|
-
return n !== a && "reject" === r ? throwRangeError(
|
|
1437
|
+
return n !== a && "reject" === r ? throwRangeError(b) : a;
|
|
1434
1438
|
}
|
|
1435
1439
|
function constrainMonth(e, t, o, n) {
|
|
1436
1440
|
const r = isChineseDangi(e) ? ((e, t, o) => isWithin(o, 1, 12) ? o : clamp(o, 1, monthsInYear(e, t)))(e, t, o) : clamp(o, 1, "hebrew" === e && isLeapYear$2(t) || isCopticOrEthiopic(e) ? 13 : 12);
|
|
1437
|
-
return r !== o && "reject" === n && throwRangeError(
|
|
1441
|
+
return r !== o && "reject" === n && throwRangeError(b), r;
|
|
1438
1442
|
}
|
|
1439
1443
|
function balanceNonIsoYearMonth(e, t, o) {
|
|
1440
1444
|
if ("hebrew" === e) return ((e, t) => {
|
|
@@ -1471,7 +1475,7 @@ function parseMonthCode(e) {
|
|
|
1471
1475
|
const t = toPrimitive(e);
|
|
1472
1476
|
validateString(t);
|
|
1473
1477
|
const o = t.match(/M(\d\d)(L?)/);
|
|
1474
|
-
return o && "M00" !== t || throwRangeError(invalidMonthCode(t)), [
|
|
1478
|
+
return o && "M00" !== t || throwRangeError(invalidMonthCode(t)), [Se(o[1]), !!o[2]];
|
|
1475
1479
|
}
|
|
1476
1480
|
function createMonthCode(e, t = !1) {
|
|
1477
1481
|
return `M${toZeroPaddedDecimalString(e, 2)}${t ? "L" : ""}`;
|
|
@@ -1482,16 +1486,16 @@ function prepareCalendarFields(e, t, o, n) {
|
|
|
1482
1486
|
let a = !1;
|
|
1483
1487
|
for (const e of o) {
|
|
1484
1488
|
const o = t[e];
|
|
1485
|
-
void 0 !== o ? (a = !0, r[e] =
|
|
1489
|
+
void 0 !== o ? (a = !0, r[e] = vt[e][0](o)) : n && (n.includes(e) && throwTypeError(missingField(e)), r[e] = vt[e][1]);
|
|
1486
1490
|
}
|
|
1487
|
-
return n || a || throwTypeError(
|
|
1491
|
+
return n || a || throwTypeError(U), r;
|
|
1488
1492
|
}
|
|
1489
1493
|
function calendarMergeFields(e, t, o) {
|
|
1490
1494
|
const n = ((e, t) => {
|
|
1491
1495
|
const o = [];
|
|
1492
|
-
return void 0 !== t[
|
|
1496
|
+
return void 0 !== t[yt.u] && o.push(yt.v), void 0 !== t[yt.v] && o.push(yt.u), !calendarSupportsEra(e) || void 0 === t[yt.ne] && void 0 === t[yt.re] && void 0 === t[yt.t] || o.push(yt.ne, yt.re, yt.t), !((e) => "japanese" === e)(e) || void 0 === t[yt.T] && void 0 === t[yt.u] && void 0 === t[yt.v] || o.push(yt.ne, yt.re), o;
|
|
1493
1497
|
})(e, o), r = createEmptyCalendarFieldsRecord();
|
|
1494
|
-
for (const e of
|
|
1498
|
+
for (const e of wt) void 0 === t[e] || n.includes(e) || (r[e] = t[e]), void 0 !== o[e] && (r[e] = o[e]);
|
|
1495
1499
|
return r;
|
|
1496
1500
|
}
|
|
1497
1501
|
function toTemporalCalendarIdentifier(e) {
|
|
@@ -1499,15 +1503,15 @@ function toTemporalCalendarIdentifier(e) {
|
|
|
1499
1503
|
return t ? t.Y : (validateString(e), canonicalizeCalendar(((e) => {
|
|
1500
1504
|
try {
|
|
1501
1505
|
return parseIsoDateTime(e, [
|
|
1502
|
-
Ge,
|
|
1503
|
-
Ke,
|
|
1504
|
-
Qe,
|
|
1505
1506
|
et,
|
|
1506
1507
|
tt,
|
|
1507
|
-
ot
|
|
1508
|
+
ot,
|
|
1509
|
+
nt,
|
|
1510
|
+
rt,
|
|
1511
|
+
at
|
|
1508
1512
|
]).Y || "iso8601";
|
|
1509
1513
|
} catch {
|
|
1510
|
-
return
|
|
1514
|
+
return st.test(e) || throwRangeError(parseError(e)), e;
|
|
1511
1515
|
}
|
|
1512
1516
|
})(e)));
|
|
1513
1517
|
}
|
|
@@ -1519,26 +1523,26 @@ function calendarDateFromFields(e, t, o) {
|
|
|
1519
1523
|
return calendarResolveFields(e, t), validateIsoDate(calendarDateToIso(e, t, o));
|
|
1520
1524
|
}
|
|
1521
1525
|
function calendarYearMonthFromFields(e, t, o) {
|
|
1522
|
-
return t.day = 1, calendarResolveFields(e, t,
|
|
1526
|
+
return t.day = 1, calendarResolveFields(e, t, H), validateIsoYearMonth(calendarDateToIso(e, t, o));
|
|
1523
1527
|
}
|
|
1524
1528
|
function calendarMonthDayFromFields(e, t, o) {
|
|
1525
|
-
return calendarResolveFields(e, t,
|
|
1529
|
+
return calendarResolveFields(e, t, q), (function(e, t, o) {
|
|
1526
1530
|
if (isIsoLikeCalendar(e)) return ((e, t, o) => {
|
|
1527
|
-
const n = regulateIsoDate(e[
|
|
1531
|
+
const n = regulateIsoDate(e[yt.t] ?? 1972, e[yt.u], e[yt.T], t);
|
|
1528
1532
|
return o || validateIsoDate(n), createIsoDateRecord(1972, n.u, n.T);
|
|
1529
1533
|
})({
|
|
1530
1534
|
...t,
|
|
1531
1535
|
year: mapUnlessUndefined(t.year, (t) => t + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0))
|
|
1532
1536
|
}, o, "iso8601" === e);
|
|
1533
|
-
const n = t[
|
|
1534
|
-
let r = t[
|
|
1537
|
+
const n = t[yt.t];
|
|
1538
|
+
let r = t[yt.u], a = mapUnlessUndefined(t[yt.v], parseMonthCode), i = t[yt.T];
|
|
1535
1539
|
return void 0 !== n ? (a || (r = constrainMonth(e, n, r, o)), a = a ? constrainMonthCode(e, n, a, o) : parseMonthCode(nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, 1)).v), i = constrainDay(e, n, r, i, o), validateIsoDate(calendarIntegersToIso(e, n, r, i))) : i = ((e, t, o, n) => {
|
|
1536
1540
|
if (isChineseDangi(e) || "islamic-umalqura" === e || "persian" === e) {
|
|
1537
1541
|
const r = clamp(o, 1, "persian" === e && t[0] <= 6 ? 31 : 30);
|
|
1538
|
-
return o !== r && "reject" === n ? throwRangeError(
|
|
1542
|
+
return o !== r && "reject" === n ? throwRangeError(b) : r;
|
|
1539
1543
|
}
|
|
1540
1544
|
return "hebrew" === e ? t[1] ? constrainDay(e, 3, 6, o, n) : constrainDay(e, 1, t[0], o, n) : constrainDay(e, isCopticOrEthiopic(e) ? 3 : 2, t[0], o, n);
|
|
1541
|
-
})(e, a, i, o), isChineseDangi(e) && a[1] && (1 === a[0] || 12 === a[0] || 30 === i && (2 === a[0] || isWithin(a[0], 8, 11))) && ("reject" === o && throwRangeError(
|
|
1545
|
+
})(e, a, i, o), isChineseDangi(e) && a[1] && (1 === a[0] || 12 === a[0] || 30 === i && (2 === a[0] || isWithin(a[0], 8, 11))) && ("reject" === o && throwRangeError(b), a[1] = !1), isCopticOrEthiopic(e) ? epochDaysToIsoDate(((e, t) => 13 === e && 6 === t ? 618 : (30 * (e - 1) + t + 252) % 365 + 731)(a[0], i)) : "indian" === e ? epochDaysToIsoDate(((e, t) => calendarIntegersToEpochDays$3(30 * e + t <= 310 ? 1894 : 1893, e, t))(a[0], i)) : "persian" === e ? epochDaysToIsoDate(((e, t) => {
|
|
1542
1546
|
if (12 === e && 30 === t) {
|
|
1543
1547
|
for (let o = 1350;; o--) if (isLeapYear(o)) return calendarIntegersToEpochDays(o, e, t);
|
|
1544
1548
|
}
|
|
@@ -1576,7 +1580,7 @@ function calendarMonthDayFromFields(e, t, o) {
|
|
|
1576
1580
|
})(e, t, o);
|
|
1577
1581
|
}
|
|
1578
1582
|
function formatCalendarAnnotation(e, t) {
|
|
1579
|
-
return t ===
|
|
1583
|
+
return t === he || t === Te && "iso8601" === e ? "" : `[${t === pe ? "!" : ""}u-ca=${e}]`;
|
|
1580
1584
|
}
|
|
1581
1585
|
function calendarEquals(e, t) {
|
|
1582
1586
|
return e === t;
|
|
@@ -1630,30 +1634,30 @@ function calendarExtraFields(e, t) {
|
|
|
1630
1634
|
return calendarSupportsEra(e) && t.includes("year") ? ["era", "eraYear"] : [];
|
|
1631
1635
|
}
|
|
1632
1636
|
function isoResolveFields(e, t) {
|
|
1633
|
-
t !==
|
|
1634
|
-
const o = mapUnlessUndefined(e[
|
|
1635
|
-
o && ((o[0] > 12 || o[1] || void 0 !== e[
|
|
1636
|
-
}
|
|
1637
|
-
function calendarResolveFields(e, t, o =
|
|
1638
|
-
"iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o =
|
|
1639
|
-
const n = t[
|
|
1640
|
-
let a = t[
|
|
1641
|
-
const i = t[
|
|
1642
|
-
if (o ===
|
|
1637
|
+
t !== q && void 0 === e[yt.t] && throwTypeError(missingField(yt.t)), t !== H && void 0 === e[yt.T] && throwTypeError(missingField(yt.T)), void 0 === e[yt.v] && void 0 === e[yt.u] && throwTypeError(missingField("month, monthCode"));
|
|
1638
|
+
const o = mapUnlessUndefined(e[yt.v], parseMonthCode);
|
|
1639
|
+
o && ((o[0] > 12 || o[1] || void 0 !== e[yt.u] && o[0] !== e[yt.u]) && throwRangeError(C), e[yt.u] = o[0]);
|
|
1640
|
+
}
|
|
1641
|
+
function calendarResolveFields(e, t, o = z) {
|
|
1642
|
+
"iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o = z) {
|
|
1643
|
+
const n = t[yt.ne], r = t[yt.re];
|
|
1644
|
+
let a = t[yt.t];
|
|
1645
|
+
const i = t[yt.v], c = t[yt.u], s = t[yt.T];
|
|
1646
|
+
if (o === q && void 0 !== i && void 0 === c || void 0 !== a || calendarSupportsEraForNonIsoCalendars(e) && void 0 !== n && void 0 !== r || throwTypeError(missingField("year, era, eraYear")), calendarSupportsEraForNonIsoCalendars(e) && void 0 === n != (void 0 === r) && throwTypeError(), o !== H && void 0 === s && throwTypeError(missingField("day")), c === i && throwTypeError(missingField("month, monthCode")), calendarSupportsEraForNonIsoCalendars(e) && void 0 !== r) {
|
|
1643
1647
|
const o = ((e, t, o) => {
|
|
1644
|
-
const n = canonicalizeEraInCalendar(e, t), r =
|
|
1648
|
+
const n = canonicalizeEraInCalendar(e, t), r = St[e].get(n);
|
|
1645
1649
|
return !1 === r ? 1 - o : r + o - 1;
|
|
1646
1650
|
})(e, canonicalizeEraInCalendar(e, n), r);
|
|
1647
|
-
void 0 !== a && a !== o && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[
|
|
1651
|
+
void 0 !== a && a !== o && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[yt.t] = o;
|
|
1648
1652
|
}
|
|
1649
|
-
if (t[
|
|
1653
|
+
if (t[yt.ne] = t[yt.re] = void 0, isIsoLikeCalendar(e)) isoResolveFields(t, o);
|
|
1650
1654
|
else if (i) {
|
|
1651
1655
|
const o = parseMonthCode(i);
|
|
1652
1656
|
((e, t) => isWithin(t[0], 1, 12) && !t[1] || isChineseDangi(e) && isWithin(t[0], 1, 12) || isCopticOrEthiopic(e) && 13 === t[0] && !t[1] || "hebrew" === e && 5 === t[0] && t[1])(e, o) || throwRangeError(invalidMonthCode(i));
|
|
1653
|
-
const n = t[
|
|
1657
|
+
const n = t[yt.t];
|
|
1654
1658
|
if (void 0 !== n) {
|
|
1655
|
-
const r = monthCodeToOrdinal(e, n, constrainMonthCode(e, n, o,
|
|
1656
|
-
void 0 !==
|
|
1659
|
+
const r = monthCodeToOrdinal(e, n, constrainMonthCode(e, n, o, _));
|
|
1660
|
+
void 0 !== c && c !== r && throwRangeError(C), t[yt.u] = r;
|
|
1657
1661
|
}
|
|
1658
1662
|
}
|
|
1659
1663
|
})(e, t, o);
|
|
@@ -1665,7 +1669,7 @@ function zeroDateDuration() {
|
|
|
1665
1669
|
return createDateDurationRecord(0, 0, 0, 0);
|
|
1666
1670
|
}
|
|
1667
1671
|
function toInternalDurationRecord(e) {
|
|
1668
|
-
return combineDateAndTimeDuration(createDateDurationRecord(e[
|
|
1672
|
+
return combineDateAndTimeDuration(createDateDurationRecord(e[h], e[p], e[g], e[f]), timeDurationFromComponents(e[I], e[O], e[F], e[S], e[y], e[w]));
|
|
1669
1673
|
}
|
|
1670
1674
|
function toInternalDurationRecordWith24HourDays([e, t, o, n, ...r]) {
|
|
1671
1675
|
return combineDateAndTimeDuration(createDateDurationRecord(e, t, o, 0), add24HourDaysToTimeDuration(timeDurationFromComponents(...r), n));
|
|
@@ -1698,9 +1702,9 @@ function combineDateAndTimeDuration(e, t) {
|
|
|
1698
1702
|
};
|
|
1699
1703
|
}
|
|
1700
1704
|
function toTemporalDuration(e) {
|
|
1701
|
-
return
|
|
1702
|
-
const t =
|
|
1703
|
-
t && !/[pt]$|[.,](\d{1,9})[hms]
|
|
1705
|
+
return Et.get(e) || (isObject(e) ? createTemporalDurationSlot(toTemporalPartialDurationRecord(e).map((e) => e || 0)) : (validateString(e), ((e) => {
|
|
1706
|
+
const t = e.match(/^([+-]?)p(?:(\d+)y)?(?:(\d+)m)?(?:(\d+)w)?(?:(\d+)d)?(?:t(?:(\d+)(?:[.,](\d{1,9}))?h)?(?:(\d+)(?:[.,](\d{1,9}))?m)?(?:(\d+)(?:[.,](\d{1,9}))?s)?)?$/i);
|
|
1707
|
+
t && !/[pt]$|[.,](\d{1,9})[hms]./i.test(e) || throwRangeError(parseError(e));
|
|
1704
1708
|
const o = balanceTime(0, 0, 0, 0, 0, 3600 * toIntegerWithTruncation((t[7] || "").padEnd(9, "0")) + 60 * toIntegerWithTruncation((t[9] || "").padEnd(9, "0")) + toIntegerWithTruncation((t[11] || "").padEnd(9, "0")));
|
|
1705
1709
|
return applySignToDurationSlot(createTemporalDurationSlot([
|
|
1706
1710
|
toIntegerWithTruncation(t[2] || ""),
|
|
@@ -1714,8 +1718,7 @@ function toTemporalDuration(e) {
|
|
|
1714
1718
|
o.S,
|
|
1715
1719
|
o.$
|
|
1716
1720
|
]), toIntegerWithTruncation(`${t[1]}1`));
|
|
1717
|
-
})(e));
|
|
1718
|
-
var t;
|
|
1721
|
+
})(e)));
|
|
1719
1722
|
}
|
|
1720
1723
|
function durationSign(e) {
|
|
1721
1724
|
return sign(e.find((e) => e) || 0);
|
|
@@ -1724,14 +1727,14 @@ function dateDurationSign(e) {
|
|
|
1724
1727
|
return sign(e.te || e.oe || e.ee || e.X);
|
|
1725
1728
|
}
|
|
1726
1729
|
function internalDurationSign(e) {
|
|
1727
|
-
return dateDurationSign(e.A) ||
|
|
1730
|
+
return dateDurationSign(e.A) || Mt(e.p);
|
|
1728
1731
|
}
|
|
1729
1732
|
function validateDuration(...e) {
|
|
1730
1733
|
e.some((e) => e < 0) && e.some((e) => e > 0) && throwRangeError("invalid duration"), (e.some((e) => Math.abs(e) > 1e25) || [
|
|
1731
|
-
e[
|
|
1732
|
-
e[
|
|
1733
|
-
e[
|
|
1734
|
-
].some((e) => Math.abs(e) >= 2 ** 32)) && throwRangeError(
|
|
1734
|
+
e[h],
|
|
1735
|
+
e[p],
|
|
1736
|
+
e[g]
|
|
1737
|
+
].some((e) => Math.abs(e) >= 2 ** 32)) && throwRangeError(R), validateTimeDurationRange(timeDurationFromComponents(24 * e[f] + e[I], e[O], e[F], e[S], e[y], e[w]));
|
|
1735
1738
|
}
|
|
1736
1739
|
function defaultTemporalLargestUnit(e) {
|
|
1737
1740
|
return (e.findIndex((e) => e) + 10) % 10;
|
|
@@ -1749,8 +1752,8 @@ function toTemporalPartialDurationRecord(e) {
|
|
|
1749
1752
|
6,
|
|
1750
1753
|
2,
|
|
1751
1754
|
0
|
|
1752
|
-
].map((t) => mapUnlessUndefined(e[
|
|
1753
|
-
return t.some((e) => void 0 !== e) || throwTypeError(
|
|
1755
|
+
].map((t) => mapUnlessUndefined(e[E[t]], toIntegerIfIntegral));
|
|
1756
|
+
return t.some((e) => void 0 !== e) || throwTypeError(U), [
|
|
1754
1757
|
9,
|
|
1755
1758
|
5,
|
|
1756
1759
|
8,
|
|
@@ -1766,8 +1769,8 @@ function toTemporalPartialDurationRecord(e) {
|
|
|
1766
1769
|
function createTemporalDurationSlot(e) {
|
|
1767
1770
|
return validateDuration(...e), e;
|
|
1768
1771
|
}
|
|
1769
|
-
function createTemporalDuration(e, t = Object.create(
|
|
1770
|
-
return
|
|
1772
|
+
function createTemporalDuration(e, t = Object.create(bt.prototype)) {
|
|
1773
|
+
return Et.set(t, e), t;
|
|
1771
1774
|
}
|
|
1772
1775
|
function timeDurationFromComponents(e, t, o, n, r, a) {
|
|
1773
1776
|
return addTimeDuration(addTimeDuration(addTimeDuration(createTimeDurationFromUnit(3600 * e + 60 * t + o, 1e9), createTimeDurationFromUnit(n, 1e6)), createTimeDurationFromUnit(r, 1e3)), createTimeDurationFromUnit(a, 1));
|
|
@@ -1783,7 +1786,7 @@ function roundTimeDurationToIncrement(e, t, o) {
|
|
|
1783
1786
|
}
|
|
1784
1787
|
function dateDurationDays(e, t) {
|
|
1785
1788
|
const o = adjustDateDurationRecord(e, 0);
|
|
1786
|
-
return dateDurationSign(e) ? e.X + isoDateRecordToEpochDays(calendarDateAdd(t.Y, t.o, o,
|
|
1789
|
+
return dateDurationSign(e) ? e.X + isoDateRecordToEpochDays(calendarDateAdd(t.Y, t.o, o, _)) - isoDateRecordToEpochDays(t.o) : e.X;
|
|
1787
1790
|
}
|
|
1788
1791
|
function roundTimeDuration(e, t, o, n) {
|
|
1789
1792
|
return roundTimeDurationToIncrement(e, nanosecondsForTimeUnit(o) * t, n);
|
|
@@ -1791,26 +1794,26 @@ function roundTimeDuration(e, t, o, n) {
|
|
|
1791
1794
|
function totalTimeDuration(e, t) {
|
|
1792
1795
|
return divideTimeDurationToFloatingPoint(e, nanosecondsForTimeUnit(t));
|
|
1793
1796
|
}
|
|
1794
|
-
function computeNudgeWindow(e, t, o, n, r, a, i,
|
|
1795
|
-
let
|
|
1796
|
-
if (
|
|
1797
|
-
else if (
|
|
1798
|
-
else if (
|
|
1799
|
-
const o = calendarDateAdd(a, n.o, adjustDateDurationRecord(t.A, 0, 0),
|
|
1800
|
-
|
|
1801
|
-
} else
|
|
1802
|
-
if (dateDurationSign(
|
|
1803
|
-
const e = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o,
|
|
1804
|
-
|
|
1805
|
-
} else
|
|
1806
|
-
const
|
|
1797
|
+
function computeNudgeWindow(e, t, o, n, r, a, i, d, m) {
|
|
1798
|
+
let u, T, D, h, p;
|
|
1799
|
+
if (d === c) u = roundNumberToIncrement(t.A.te, i, ce) + (m ? i * e : 0), T = u + i * e, D = createDateDurationRecord(u, 0, 0, 0), h = createDateDurationRecord(T, 0, 0, 0);
|
|
1800
|
+
else if (d === s) u = roundNumberToIncrement(t.A.oe, i, ce) + (m ? i * e : 0), T = u + i * e, D = adjustDateDurationRecord(t.A, 0, 0, u), h = adjustDateDurationRecord(t.A, 0, 0, T);
|
|
1801
|
+
else if (d === l) {
|
|
1802
|
+
const o = calendarDateAdd(a, n.o, adjustDateDurationRecord(t.A, 0, 0), _);
|
|
1803
|
+
u = roundNumberToIncrement(t.A.ee + calendarDateUntil(a, o, addDaysToIsoDate(o, t.A.X), l).ee, i, ce), T = u + i * e, D = adjustDateDurationRecord(t.A, 0, u), h = adjustDateDurationRecord(t.A, 0, T);
|
|
1804
|
+
} else u = roundNumberToIncrement(t.A.X, i, ce), T = u + i * e, D = adjustDateDurationRecord(t.A, u), h = adjustDateDurationRecord(t.A, T);
|
|
1805
|
+
if (dateDurationSign(D)) {
|
|
1806
|
+
const e = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, D, _), n.p);
|
|
1807
|
+
p = r ? getEpochNanosecondsFor(r, e, G) : getUtcEpochNanoseconds(e);
|
|
1808
|
+
} else p = o;
|
|
1809
|
+
const g = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, h, _), n.p);
|
|
1807
1810
|
return {
|
|
1808
|
-
he:
|
|
1809
|
-
pe:
|
|
1810
|
-
ge:
|
|
1811
|
-
fe: r ? getEpochNanosecondsFor(r,
|
|
1812
|
-
Ie:
|
|
1813
|
-
Oe:
|
|
1811
|
+
he: u,
|
|
1812
|
+
pe: T,
|
|
1813
|
+
ge: p,
|
|
1814
|
+
fe: r ? getEpochNanosecondsFor(r, g, G) : getUtcEpochNanoseconds(g),
|
|
1815
|
+
Ie: D,
|
|
1816
|
+
Oe: h
|
|
1814
1817
|
};
|
|
1815
1818
|
}
|
|
1816
1819
|
function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
|
|
@@ -1818,74 +1821,73 @@ function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
|
|
|
1818
1821
|
compareEpochNanoseconds(m.ge, n) * compareEpochNanoseconds(m.fe, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, i, c, s, !0), d = !0);
|
|
1819
1822
|
const u = differenceEpochNanoseconds(m.ge, n), T = differenceEpochNanoseconds(m.ge, m.fe);
|
|
1820
1823
|
let D = m.Ie, h = m.ge;
|
|
1821
|
-
return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ?
|
|
1824
|
+
return roundNumberToIncrement(m.he + ((e, t, o) => signTimeDuration(e) ? Ee(e, t) ? Ee(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(u, T, e) * c * e, c, l) === m.pe && (d = !0, D = m.Oe, h = m.fe), {
|
|
1822
1825
|
Fe: {
|
|
1823
|
-
ye: combineDateAndTimeDuration(D,
|
|
1826
|
+
ye: combineDateAndTimeDuration(D, ve),
|
|
1824
1827
|
Se: h,
|
|
1825
1828
|
we: d
|
|
1826
1829
|
},
|
|
1827
1830
|
$e: m.he + divideTimeDurationToFloatingPoint(u, 1e9) / divideTimeDurationToFloatingPoint(T, 1e9) * c * e
|
|
1828
1831
|
};
|
|
1829
1832
|
}
|
|
1830
|
-
function roundRelativeDuration(e, t, o, n, r, a, i, c, s,
|
|
1831
|
-
const
|
|
1832
|
-
const s = calendarDateAdd(r, o.o, t.A,
|
|
1833
|
-
let
|
|
1834
|
-
const
|
|
1835
|
-
let
|
|
1836
|
-
return
|
|
1837
|
-
ye: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.X +
|
|
1838
|
-
Se:
|
|
1839
|
-
we:
|
|
1833
|
+
function roundRelativeDuration(e, t, o, n, r, a, i, c, s, m) {
|
|
1834
|
+
const u = internalDurationSign(e) || 1, T = isCalendarUnit(s) || r && s === d ? nudgeToCalendarUnit(u, e, t, o, n, r, a, c, s, m).Fe : r ? ((e, t, o, n, r, a, i, c) => {
|
|
1835
|
+
const s = calendarDateAdd(r, o.o, t.A, _), l = combineIsoDateAndTimeRecord(s, o.p), d = combineIsoDateAndTimeRecord(addDaysToIsoDate(s, e), o.p), m = getEpochNanosecondsFor(n, l, G), u = getEpochNanosecondsFor(n, d, G), T = timeDurationFromEpochNanosecondsDifference(u, m), D = nanosecondsForTimeUnit(i);
|
|
1836
|
+
let h = roundTimeDurationToIncrement(t.p, a * D, c);
|
|
1837
|
+
const p = addTimeDuration(h, negateTimeDuration(T));
|
|
1838
|
+
let g = !1, f = 0;
|
|
1839
|
+
return Mt(p) !== -e && (g = !0, f = e, h = roundTimeDurationToIncrement(p, a * D, c)), {
|
|
1840
|
+
ye: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.X + f), h),
|
|
1841
|
+
Se: addTimeDurationToEpochNanoseconds(u, h),
|
|
1842
|
+
we: g
|
|
1840
1843
|
};
|
|
1841
|
-
})(
|
|
1842
|
-
const i = add24HourDaysToTimeDuration(e.p, e.A.X), c = r ===
|
|
1844
|
+
})(u, e, n, r, a, c, s, m) : (function(e, t, o, n, r, a) {
|
|
1845
|
+
const i = add24HourDaysToTimeDuration(e.p, e.A.X), c = r === d ? roundTimeDurationByDays(i, n, a) : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a), s = c[0];
|
|
1843
1846
|
return {
|
|
1844
|
-
ye: combineDateAndTimeDuration(adjustDateDurationRecord(e.A,
|
|
1847
|
+
ye: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, isDateUnit(o) ? s : 0), isDateUnit(o) ? addTimeDuration(c, timeDurationFromComponents(24 * -s, 0, 0, 0, 0, 0)) : c),
|
|
1845
1848
|
Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
|
|
1846
|
-
we: sign(s - i[0]) ===
|
|
1849
|
+
we: sign(s - i[0]) === Mt(i)
|
|
1847
1850
|
};
|
|
1848
|
-
})(e, o, i, c, s,
|
|
1849
|
-
return
|
|
1851
|
+
})(e, o, i, c, s, m);
|
|
1852
|
+
return T.we && s !== l ? ((e, t, o, n, r, a, i, c) => {
|
|
1850
1853
|
if (c === i) return t;
|
|
1851
1854
|
const s = i;
|
|
1852
|
-
let
|
|
1853
|
-
for (let
|
|
1854
|
-
|
|
1855
|
-
const
|
|
1856
|
-
if (
|
|
1857
|
-
t = combineDateAndTimeDuration(
|
|
1855
|
+
let d;
|
|
1856
|
+
for (let m = c - 1; m >= s; m--) if (m !== g || i === l) {
|
|
1857
|
+
d = m === h ? createDateDurationRecord(t.A.te + e, 0, 0, 0) : m === p ? adjustDateDurationRecord(t.A, 0, 0, t.A.oe + e) : adjustDateDurationRecord(t.A, 0, t.A.ee + e);
|
|
1858
|
+
const i = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, d, _), n.p), c = r ? getEpochNanosecondsFor(r, i, G) : getUtcEpochNanoseconds(i);
|
|
1859
|
+
if (Mt(differenceEpochNanoseconds(c, o)) === -e) break;
|
|
1860
|
+
t = combineDateAndTimeDuration(d, ve);
|
|
1858
1861
|
}
|
|
1859
1862
|
return t;
|
|
1860
|
-
})(
|
|
1863
|
+
})(u, T.ye, T.Se, n, r, a, i, largerOfTwoTemporalUnits(s, d)) : T.ye;
|
|
1861
1864
|
}
|
|
1862
1865
|
function totalRelativeDuration(e, t, o, n, r, a, i) {
|
|
1863
|
-
return isCalendarUnit(i) || r && i ===
|
|
1866
|
+
return isCalendarUnit(i) || r && i === d ? nudgeToCalendarUnit(internalDurationSign(e) || 1, e, t, o, n, r, a, 1, i, ce).$e : totalTimeDuration(add24HourDaysToTimeDuration(e.p, e.A.X), i);
|
|
1864
1867
|
}
|
|
1865
1868
|
function temporalDurationToString(e, t) {
|
|
1866
|
-
const o = durationSign(e), n = timeDurationFromComponents(0, 0, (e = applySignToDurationSlot(e, o))[
|
|
1869
|
+
const o = durationSign(e), n = timeDurationFromComponents(0, 0, (e = applySignToDurationSlot(e, o))[F], e[S], e[y], e[w]), [, , , r, a, i, c] = balanceTimeDuration(n, T), [s, l, d, m, u, D] = [
|
|
1867
1870
|
"Y",
|
|
1868
1871
|
"M",
|
|
1869
1872
|
"W",
|
|
1870
1873
|
"D",
|
|
1871
1874
|
"H",
|
|
1872
1875
|
"M"
|
|
1873
|
-
].map((t, o) => e[o] ? `${e[o]}${t}` : ""),
|
|
1874
|
-
return `${o < 0 ? "-" : ""}P${s}${l}${d}${m}${
|
|
1876
|
+
].map((t, o) => e[o] ? `${e[o]}${t}` : ""), h = `${u}${D}${Mt(n) || defaultTemporalLargestUnit(e) >= T || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + c, t)}S` : ""}`;
|
|
1877
|
+
return `${o < 0 ? "-" : ""}P${s}${l}${d}${m}${h && `T${h}`}`;
|
|
1875
1878
|
}
|
|
1876
1879
|
function addDurations(e, t, o) {
|
|
1877
1880
|
const n = applySignToDurationSlot(toTemporalDuration(o), e), r = largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), defaultTemporalLargestUnit(n));
|
|
1878
1881
|
return isCalendarUnit(r) && throwRangeError(durationWithDateUnit(r)), createTemporalDuration(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), addTimeDuration(toInternalDurationRecordWith24HourDays(t).p, toInternalDurationRecordWith24HourDays(n).p)), r));
|
|
1879
1882
|
}
|
|
1880
1883
|
function getInternalSlotOrThrowForDuration(e) {
|
|
1881
|
-
|
|
1882
|
-
return t || throwTypeError(Te), t;
|
|
1884
|
+
return getInternalSlotOrThrow(Et, e);
|
|
1883
1885
|
}
|
|
1884
1886
|
function applySignToDurationSlot(e, t) {
|
|
1885
1887
|
return createTemporalDurationSlot(e.map((e) => e * t + 0));
|
|
1886
1888
|
}
|
|
1887
1889
|
function validateTimeDurationRange(e) {
|
|
1888
|
-
return ((e) =>
|
|
1890
|
+
return ((e) => Ee(absTimeDuration(e), createTimeDurationFromUnit(2 ** 53, 1e9)) < 0)(e) || throwRangeError(R), e;
|
|
1889
1891
|
}
|
|
1890
1892
|
function balanceTimeDuration(e, t) {
|
|
1891
1893
|
const o = clamp(t, 3, 9);
|
|
@@ -1897,8 +1899,8 @@ function balanceTimeDuration(e, t) {
|
|
|
1897
1899
|
0,
|
|
1898
1900
|
0,
|
|
1899
1901
|
0
|
|
1900
|
-
].slice(0, o -
|
|
1901
|
-
o >
|
|
1902
|
+
].slice(0, o - f),
|
|
1903
|
+
o > F ? timeDurationToSubsecondsNumber(e, 18 - 3 * o) : divTrunc((r = e, r[0] * n + divTrunc(r[1], 1e9)), M[o - f] / 1e9),
|
|
1902
1904
|
...[
|
|
1903
1905
|
0,
|
|
1904
1906
|
1,
|
|
@@ -1906,7 +1908,7 @@ function balanceTimeDuration(e, t) {
|
|
|
1906
1908
|
3,
|
|
1907
1909
|
4,
|
|
1908
1910
|
5
|
|
1909
|
-
].map((t) => divTrunc(e[1],
|
|
1911
|
+
].map((t) => divTrunc(e[1], M[t + 1]) % (M[t] / M[t + 1]) + 0).slice(o - f)
|
|
1910
1912
|
];
|
|
1911
1913
|
var r;
|
|
1912
1914
|
}
|
|
@@ -1936,34 +1938,34 @@ function mathematicalInLeapYear(e) {
|
|
|
1936
1938
|
return +!(e % (e % 25 ? 4 : 16));
|
|
1937
1939
|
}
|
|
1938
1940
|
function getTemporalOverflowOption(e) {
|
|
1939
|
-
return getOption(e, "overflow", [
|
|
1941
|
+
return getOption(e, "overflow", [_, X], _);
|
|
1940
1942
|
}
|
|
1941
1943
|
function getTemporalDisambiguationOption(e) {
|
|
1942
1944
|
return getOption(e, "disambiguation", [
|
|
1943
|
-
|
|
1945
|
+
G,
|
|
1944
1946
|
"earlier",
|
|
1945
|
-
|
|
1947
|
+
K,
|
|
1946
1948
|
"reject"
|
|
1947
|
-
],
|
|
1949
|
+
], G);
|
|
1948
1950
|
}
|
|
1949
1951
|
function negateRoundingMode(e) {
|
|
1950
|
-
return "ceil" === e ?
|
|
1952
|
+
return "ceil" === e ? ae : "floor" === e ? re : "halfCeil" === e ? le : "halfFloor" === e ? se : e;
|
|
1951
1953
|
}
|
|
1952
1954
|
function getTemporalOffsetOption(e, t) {
|
|
1953
1955
|
return getOption(e, "offset", [
|
|
1954
|
-
|
|
1956
|
+
Q,
|
|
1955
1957
|
"use",
|
|
1956
1958
|
"ignore",
|
|
1957
|
-
|
|
1959
|
+
ee
|
|
1958
1960
|
], t);
|
|
1959
1961
|
}
|
|
1960
1962
|
function getTemporalShowCalendarNameOption(e) {
|
|
1961
1963
|
return getOption(e, "calendarName", [
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
],
|
|
1964
|
+
Te,
|
|
1965
|
+
De,
|
|
1966
|
+
he,
|
|
1967
|
+
pe
|
|
1968
|
+
], Te);
|
|
1967
1969
|
}
|
|
1968
1970
|
function validateTemporalRoundingIncrement(e, t, o) {
|
|
1969
1971
|
(e > (o ? t : t - 1) || t % e) && throwRangeError(invalidField("roundingIncrement"));
|
|
@@ -1977,32 +1979,32 @@ function getTemporalFractionalSecondDigitsOption(e) {
|
|
|
1977
1979
|
}
|
|
1978
1980
|
function toSecondsStringPrecisionRecord(e, t) {
|
|
1979
1981
|
return e ? {
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
+
ve: e === u ? J : 3 * (e - 6),
|
|
1983
|
+
Ee: e,
|
|
1982
1984
|
Me: 1
|
|
1983
1985
|
} : {
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
+
ve: t,
|
|
1987
|
+
Ee: divFloor((t ?? 9) - 1, 3) + 7,
|
|
1986
1988
|
Me: 10 ** ((9 - (t ?? 9)) % 3)
|
|
1987
1989
|
};
|
|
1988
1990
|
}
|
|
1989
1991
|
function getTemporalUnitValuedOption(e, t, o) {
|
|
1990
1992
|
return mapUnlessUndefined(getOption(e, t, [
|
|
1991
|
-
...
|
|
1992
|
-
...
|
|
1993
|
+
...v,
|
|
1994
|
+
...E,
|
|
1993
1995
|
"auto"
|
|
1994
1996
|
], o), (e) => {
|
|
1995
|
-
return "auto" === e ? "auto" : (t = e.replace(/s$/, ""),
|
|
1997
|
+
return "auto" === e ? "auto" : (t = e.replace(/s$/, ""), v.indexOf(t));
|
|
1996
1998
|
var t;
|
|
1997
1999
|
});
|
|
1998
2000
|
}
|
|
1999
2001
|
function validateTemporalUnitValue(e, t, o = []) {
|
|
2000
|
-
void 0 === e || o.includes(e) || ("auto" === e && throwRangeError(disallowedUnit(e)), (e <=
|
|
2002
|
+
void 0 === e || o.includes(e) || ("auto" === e && throwRangeError(disallowedUnit(e)), (e <= d && t === V || e > d && t === z) && throwRangeError(disallowedUnit(e)));
|
|
2001
2003
|
}
|
|
2002
2004
|
function getTemporalRelativeToOption(e) {
|
|
2003
2005
|
const t = e.relativeTo;
|
|
2004
2006
|
if (void 0 === t) return createNullPrototypeObject();
|
|
2005
|
-
let o, n, r, a, i, c = !0, s =
|
|
2007
|
+
let o, n, r, a, i, c = !0, s = te;
|
|
2006
2008
|
if (isObject(t)) {
|
|
2007
2009
|
if (isZonedDateTime(t)) return createNullPrototypeObject({ be: getInternalSlotOrThrowForZonedDateTime(t) });
|
|
2008
2010
|
if (isPlainDate(t)) return createNullPrototypeObject({ Pe: getInternalSlotOrThrowForPlainDate(t) });
|
|
@@ -2010,35 +2012,35 @@ function getTemporalRelativeToOption(e) {
|
|
|
2010
2012
|
if (e) return createNullPrototypeObject({ Pe: getInternalSlotOrThrowForPlainDate(createTemporalDate(e.K.o, e.Y)) });
|
|
2011
2013
|
r = getTemporalCalendarIdentifierWithIsoDefault(t);
|
|
2012
2014
|
const c = prepareCalendarFields(r, t, [
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
], []), l = interpretTemporalDateTimeFields(r, c,
|
|
2026
|
-
a = l.o, i = l.p, o = c.timeZone, n = c.offset, s = n ?
|
|
2015
|
+
yt.t,
|
|
2016
|
+
yt.u,
|
|
2017
|
+
yt.v,
|
|
2018
|
+
yt.T,
|
|
2019
|
+
yt.D,
|
|
2020
|
+
yt.I,
|
|
2021
|
+
yt.O,
|
|
2022
|
+
yt.F,
|
|
2023
|
+
yt.S,
|
|
2024
|
+
yt.$,
|
|
2025
|
+
yt.M,
|
|
2026
|
+
yt.P
|
|
2027
|
+
], []), l = interpretTemporalDateTimeFields(r, c, _);
|
|
2028
|
+
a = l.o, i = l.p, o = c.timeZone, n = c.offset, s = n ? te : ne;
|
|
2027
2029
|
} else {
|
|
2028
2030
|
validateString(t);
|
|
2029
|
-
const e = parseIsoDateTime(t, [
|
|
2030
|
-
n = e.P.N, e.P.R ? (o = toTemporalTimeZoneIdentifier(e.P.R), s = e.P.Z ?
|
|
2031
|
+
const e = parseIsoDateTime(t, [et, tt]);
|
|
2032
|
+
n = e.P.N, e.P.R ? (o = toTemporalTimeZoneIdentifier(e.P.R), s = e.P.Z ? oe : n ? te : ne, c = void 0 !== n && hasUtcOffsetSubMinuteParts(n)) : o = void 0, r = canonicalizeCalendar(e.Y || "iso8601"), a = createIsoDateRecord(e.t, e.u, e.T), i = e.p;
|
|
2031
2033
|
}
|
|
2032
|
-
return createNullPrototypeObject(o ? { be: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, s, s ===
|
|
2034
|
+
return createNullPrototypeObject(o ? { be: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, s, s === te ? parseDateTimeUtcOffset(n) : 0, o, G, ee, c), o, r)) } : { Pe: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
|
|
2033
2035
|
}
|
|
2034
2036
|
function largerOfTwoTemporalUnits(e, t) {
|
|
2035
2037
|
return e < t ? e : t;
|
|
2036
2038
|
}
|
|
2037
2039
|
function isCalendarUnit(e) {
|
|
2038
|
-
return e <
|
|
2040
|
+
return e < d;
|
|
2039
2041
|
}
|
|
2040
2042
|
function isDateUnit(e) {
|
|
2041
|
-
return e <=
|
|
2043
|
+
return e <= d;
|
|
2042
2044
|
}
|
|
2043
2045
|
function maximumTemporalDurationRoundingIncrement(e) {
|
|
2044
2046
|
return [
|
|
@@ -2055,22 +2057,22 @@ function formatFractionalSeconds(e, t) {
|
|
|
2055
2057
|
return void 0 === t ? e ? `.${o.replace(/0*$/, "")}` : "" : t ? `.${o.slice(0, t)}` : "";
|
|
2056
2058
|
}
|
|
2057
2059
|
function formatTimeString(e, t, o, n, r) {
|
|
2058
|
-
return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r ===
|
|
2060
|
+
return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r === J ? "" : `:${toZeroPaddedDecimalString(o, 2)}${formatFractionalSeconds(n, r)}`}`;
|
|
2059
2061
|
}
|
|
2060
2062
|
function roundNumberToIncrement(e, t, o) {
|
|
2061
|
-
return
|
|
2063
|
+
return Pt[o](e / t) * t;
|
|
2062
2064
|
}
|
|
2063
2065
|
function getRoundingModeOption(e, t) {
|
|
2064
2066
|
return getOption(e, "roundingMode", [
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2067
|
+
re,
|
|
2068
|
+
ae,
|
|
2069
|
+
ie,
|
|
2070
|
+
ce,
|
|
2071
|
+
se,
|
|
2072
|
+
le,
|
|
2073
|
+
de,
|
|
2074
|
+
me,
|
|
2075
|
+
ue
|
|
2074
2076
|
], t);
|
|
2075
2077
|
}
|
|
2076
2078
|
function getRoundingIncrementOption(e) {
|
|
@@ -2080,15 +2082,15 @@ function getRoundingIncrementOption(e) {
|
|
|
2080
2082
|
function isoDateToFields(e, t, o) {
|
|
2081
2083
|
const n = calendarIsoToDate(e, t);
|
|
2082
2084
|
return createNullPrototypeObject({
|
|
2083
|
-
[
|
|
2084
|
-
[
|
|
2085
|
-
[
|
|
2085
|
+
[yt.t]: o === q ? void 0 : n.t,
|
|
2086
|
+
[yt.v]: n.v,
|
|
2087
|
+
[yt.T]: o === H ? void 0 : n.T
|
|
2086
2088
|
});
|
|
2087
2089
|
}
|
|
2088
2090
|
function getDifferenceSettings(e, t, o, n, r, a) {
|
|
2089
|
-
let i = getTemporalUnitValuedOption(t, "largestUnit"
|
|
2090
|
-
const c = getRoundingIncrementOption(t), s = getRoundingModeOption(t,
|
|
2091
|
-
return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(l, o), n.includes(l) && throwRangeError(disallowedUnit(l)), "auto" === i && (i = largerOfTwoTemporalUnits(a, l)), i > l && throwRangeError(
|
|
2091
|
+
let i = getTemporalUnitValuedOption(t, "largestUnit") ?? "auto";
|
|
2092
|
+
const c = getRoundingIncrementOption(t), s = getRoundingModeOption(t, ce), l = getTemporalUnitValuedOption(t, "smallestUnit") ?? r;
|
|
2093
|
+
return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(l, o), n.includes(l) && throwRangeError(disallowedUnit(l)), "auto" === i && (i = largerOfTwoTemporalUnits(a, l)), i > l && throwRangeError($), isDateUnit(l) || validateTemporalRoundingIncrement(c, maximumTemporalDurationRoundingIncrement(l), !1), {
|
|
2092
2094
|
H: l,
|
|
2093
2095
|
L: i,
|
|
2094
2096
|
q: -1 === e ? negateRoundingMode(s) : s,
|
|
@@ -2108,21 +2110,20 @@ function epochDaysToIsoDate(e) {
|
|
|
2108
2110
|
}
|
|
2109
2111
|
function isoDateTimeToFields(e, t) {
|
|
2110
2112
|
return createNullPrototypeObject({
|
|
2111
|
-
...isoDateToFields(e, t.o,
|
|
2112
|
-
[
|
|
2113
|
-
[
|
|
2114
|
-
[
|
|
2115
|
-
[
|
|
2116
|
-
[
|
|
2117
|
-
[
|
|
2113
|
+
...isoDateToFields(e, t.o, z),
|
|
2114
|
+
[yt.D]: t.p.D,
|
|
2115
|
+
[yt.I]: t.p.I,
|
|
2116
|
+
[yt.O]: t.p.O,
|
|
2117
|
+
[yt.F]: t.p.F,
|
|
2118
|
+
[yt.S]: t.p.S,
|
|
2119
|
+
[yt.$]: t.p.$
|
|
2118
2120
|
});
|
|
2119
2121
|
}
|
|
2120
2122
|
function getInternalSlotOrThrowForDateTimeFormat(e) {
|
|
2121
|
-
|
|
2122
|
-
return t || throwTypeError(Te), t;
|
|
2123
|
+
return getInternalSlotOrThrow(Zt, e);
|
|
2123
2124
|
}
|
|
2124
2125
|
function formatDateTime(e, t) {
|
|
2125
|
-
const [o, n] = handleDateTimeValue(
|
|
2126
|
+
const [o, n] = handleDateTimeValue(e, t);
|
|
2126
2127
|
return o.format(n);
|
|
2127
2128
|
}
|
|
2128
2129
|
function removeDateTimeFormatOptions(e, t) {
|
|
@@ -2133,19 +2134,19 @@ function dateStyleToMonthStyle(e) {
|
|
|
2133
2134
|
}
|
|
2134
2135
|
function amendOptionsForPlainDate(e) {
|
|
2135
2136
|
const t = createNullPrototypeObject(e);
|
|
2136
|
-
return hasAnyOptions(e,
|
|
2137
|
+
return hasAnyOptions(e, $t) || (hasAnyOptions(e, Ct) && throwTypeError(N), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Ct, "timeZoneName"]), t.timeZone = "UTC", t;
|
|
2137
2138
|
}
|
|
2138
2139
|
function amendOptionsForPlainTime(e) {
|
|
2139
2140
|
const t = createNullPrototypeObject(e);
|
|
2140
|
-
return hasAnyOptions(e,
|
|
2141
|
-
|
|
2141
|
+
return hasAnyOptions(e, Ct) || (hasAnyOptions(e, $t) && throwTypeError(N), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2142
|
+
...$t,
|
|
2142
2143
|
"era",
|
|
2143
2144
|
"timeZoneName"
|
|
2144
2145
|
]), t.timeZone = "UTC", t;
|
|
2145
2146
|
}
|
|
2146
2147
|
function amendOptionsForPlainDateTime(e) {
|
|
2147
2148
|
const t = createNullPrototypeObject(e);
|
|
2148
|
-
return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [
|
|
2149
|
+
return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...$t, ...Ct]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
|
|
2149
2150
|
}
|
|
2150
2151
|
function amendOptionsForPlainYearMonth(e) {
|
|
2151
2152
|
const t = createNullPrototypeObject(e);
|
|
@@ -2153,8 +2154,8 @@ function amendOptionsForPlainYearMonth(e) {
|
|
|
2153
2154
|
"year",
|
|
2154
2155
|
"month",
|
|
2155
2156
|
"dateStyle"
|
|
2156
|
-
]) || (hasAnyOptions(e, [
|
|
2157
|
-
...
|
|
2157
|
+
]) || (hasAnyOptions(e, [...$t, ...Ct]) && throwTypeError(N), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2158
|
+
...Ct,
|
|
2158
2159
|
"day",
|
|
2159
2160
|
"weekday",
|
|
2160
2161
|
"timeZoneName"
|
|
@@ -2166,8 +2167,8 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2166
2167
|
"month",
|
|
2167
2168
|
"day",
|
|
2168
2169
|
"dateStyle"
|
|
2169
|
-
]) || (hasAnyOptions(e, [
|
|
2170
|
-
...
|
|
2170
|
+
]) || (hasAnyOptions(e, [...$t, ...Ct]) && throwTypeError(N), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
|
|
2171
|
+
...Ct,
|
|
2171
2172
|
"era",
|
|
2172
2173
|
"year",
|
|
2173
2174
|
"weekday",
|
|
@@ -2176,27 +2177,27 @@ function amendOptionsForPlainMonthDay(e) {
|
|
|
2176
2177
|
}
|
|
2177
2178
|
function amendOptionsForInstant(e) {
|
|
2178
2179
|
const t = createNullPrototypeObject(e);
|
|
2179
|
-
return hasAnyOptions(e, [
|
|
2180
|
+
return hasAnyOptions(e, [...$t, ...Ct]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
|
|
2180
2181
|
}
|
|
2181
2182
|
function hasAnyOptions(e, t) {
|
|
2182
2183
|
return t.some((t) => void 0 !== e[t]);
|
|
2183
2184
|
}
|
|
2184
|
-
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n
|
|
2185
|
-
null === t && throwTypeError(
|
|
2186
|
-
const
|
|
2187
|
-
let
|
|
2188
|
-
const
|
|
2189
|
-
return "timeZone" === o && void 0 !== n ? (void 0 !==
|
|
2185
|
+
function createDateTimeFormat(e, t = createNullPrototypeObject(), o, n) {
|
|
2186
|
+
null === t && throwTypeError(N);
|
|
2187
|
+
const r = createNullPrototypeObject();
|
|
2188
|
+
let a = new Nt(e, new Proxy({}, { get(e, o) {
|
|
2189
|
+
const a = t[o];
|
|
2190
|
+
return "timeZone" === o && void 0 !== n ? (void 0 !== a && throwTypeError("disallowed field: timeZone"), r[o] = n) : void 0 === a ? a : r[o] = "hour12" === o ? ((e) => !!e)(a) : "fractionalSecondDigits" === o ? Se(a) : toString(a);
|
|
2190
2191
|
} }));
|
|
2191
|
-
return (o ===
|
|
2192
|
-
|
|
2193
|
-
...
|
|
2192
|
+
return (o === z && r.timeStyle || o === V && r.dateStyle) && throwTypeError(N), r.calendar = a.resolvedOptions().calendar, void 0 === n || hasAnyOptions(r, [
|
|
2193
|
+
...$t,
|
|
2194
|
+
...Ct,
|
|
2194
2195
|
"timeZoneName"
|
|
2195
|
-
]) || (
|
|
2196
|
-
Re:
|
|
2197
|
-
Ne:
|
|
2198
|
-
Ze:
|
|
2199
|
-
})
|
|
2196
|
+
]) || (r.timeZoneName = "short", a = new Nt(a.resolvedOptions().locale, r)), createNullPrototypeObject({
|
|
2197
|
+
Re: a,
|
|
2198
|
+
Ne: r,
|
|
2199
|
+
Ze: a.resolvedOptions().locale
|
|
2200
|
+
});
|
|
2200
2201
|
}
|
|
2201
2202
|
function validateSameTemporalType(e, t) {
|
|
2202
2203
|
[
|
|
@@ -2210,27 +2211,28 @@ function validateSameTemporalType(e, t) {
|
|
|
2210
2211
|
].some((o) => o(e) !== o(t)) && throwTypeError("Temporal type mismatch");
|
|
2211
2212
|
}
|
|
2212
2213
|
function toDateTimeFormattable(e) {
|
|
2213
|
-
return ((e) => isObject(e) && (isPlainDate(e) || isPlainTime(e) || isPlainDateTime(e) || isZonedDateTime(e) || isPlainYearMonth(e) || isPlainMonthDay(e) || isInstant(e)))(e) ? e :
|
|
2214
|
+
return ((e) => isObject(e) && (isPlainDate(e) || isPlainTime(e) || isPlainDateTime(e) || isZonedDateTime(e) || isPlainYearMonth(e) || isPlainMonthDay(e) || isInstant(e)))(e) ? e : Se(e);
|
|
2214
2215
|
}
|
|
2215
2216
|
function handleDateTimeValue(e, t) {
|
|
2216
2217
|
const o = getInternalSlotForPlainDate(t), n = getInternalSlotForPlainDateTime(t), r = getInternalSlotForPlainYearMonth(t), a = getInternalSlotForPlainMonthDay(t);
|
|
2217
|
-
return isPlainTime(t) ? [e.Ye ||= new
|
|
2218
|
+
return isPlainTime(t) ? [e.Ye ||= new Nt(e.Ze, amendOptionsForPlainTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.Y !== e.Ne.calendar && "iso8601" !== o.Y && throwRangeError(Z), [e.Ce ||= new Nt(e.Ze, amendOptionsForPlainDate(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.Y !== e.Ne.calendar && "iso8601" !== n.Y && throwRangeError(Z), [e.Ue ||= new Nt(e.Ze, amendOptionsForPlainDateTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(n.K))]) : r ? (r.Y !== e.Ne.calendar && throwRangeError(Z), [e.je ||= new Nt(e.Ze, amendOptionsForPlainYearMonth(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.Y !== e.Ne.calendar && throwRangeError(Z), [e.We ||= new Nt(e.Ze, amendOptionsForPlainMonthDay(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.ke ||= new Nt(e.Ze, amendOptionsForInstant(e.Ne)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).U)] : (isZonedDateTime(t) && throwTypeError(Y), [e.Re, t]);
|
|
2218
2219
|
}
|
|
2219
2220
|
function DateTimeFormat(e, t) {
|
|
2220
|
-
return new
|
|
2221
|
+
return new Ut(e, t);
|
|
2221
2222
|
}
|
|
2222
|
-
function createTemporalInstant(e, t = Object.create(
|
|
2223
|
-
return
|
|
2223
|
+
function createTemporalInstant(e, t = Object.create(Lt.prototype)) {
|
|
2224
|
+
return At.set(t, { U: e }), t;
|
|
2224
2225
|
}
|
|
2225
2226
|
function toTemporalInstant$1(e) {
|
|
2226
2227
|
if (isObject(e)) {
|
|
2227
|
-
const t =
|
|
2228
|
-
if (
|
|
2228
|
+
const o = (t = e, At.get(t) || getInternalSlotForZonedDateTime(e));
|
|
2229
|
+
if (o) return createTemporalInstant(o.U);
|
|
2229
2230
|
e = toPrimitive(e);
|
|
2230
2231
|
}
|
|
2232
|
+
var t;
|
|
2231
2233
|
validateString(e);
|
|
2232
|
-
const
|
|
2233
|
-
return createTemporalInstant(validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(
|
|
2234
|
+
const o = parseIsoDateTime(e, [ot]), n = o.P.Z ? 0 : parseDateTimeUtcOffset(o.P.N), r = o.p;
|
|
2235
|
+
return createTemporalInstant(validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(o.t, o.u, o.T, r.D, r.I, r.O, r.F, r.S, r.$ - n))));
|
|
2234
2236
|
}
|
|
2235
2237
|
function addInstant(e, t) {
|
|
2236
2238
|
return validateEpochNanoseconds(addTimeDurationToEpochNanoseconds(e, t));
|
|
@@ -2240,15 +2242,15 @@ function differenceInstant(e, t, o, n, r) {
|
|
|
2240
2242
|
}
|
|
2241
2243
|
function roundTemporalInstant(e, t, o, n) {
|
|
2242
2244
|
return (function(e, t, o) {
|
|
2243
|
-
return normalizeEpochNanoseconds(e[0], ((e, t, o) =>
|
|
2245
|
+
return normalizeEpochNanoseconds(e[0], ((e, t, o) => Rt[o](e / t) * t)(e[1], t, o));
|
|
2244
2246
|
})(e, t * nanosecondsForTimeUnit(o), n);
|
|
2245
2247
|
}
|
|
2246
2248
|
function temporalInstantToString(e, t, o) {
|
|
2247
2249
|
const n = getOffsetNanosecondsFor(t || "UTC", e);
|
|
2248
|
-
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(e, n), "iso8601", o,
|
|
2250
|
+
return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(e, n), "iso8601", o, he)}${t ? formatDateTimeUtcOffsetRounded(n) : "Z"}`;
|
|
2249
2251
|
}
|
|
2250
2252
|
function differenceTemporalInstant(e, t, o, n) {
|
|
2251
|
-
const r = getInternalSlotOrThrowForInstant(toTemporalInstant$1(o)), a = getDifferenceSettings(e, getOptionsObject(n),
|
|
2253
|
+
const r = getInternalSlotOrThrowForInstant(toTemporalInstant$1(o)), a = getDifferenceSettings(e, getOptionsObject(n), V, [], D, T);
|
|
2252
2254
|
return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceInstant(t.U, r.U, a.V, a.H, a.q), a.L), e));
|
|
2253
2255
|
}
|
|
2254
2256
|
function addDurationToInstant(e, t, o) {
|
|
@@ -2256,26 +2258,22 @@ function addDurationToInstant(e, t, o) {
|
|
|
2256
2258
|
return isDateUnit(defaultTemporalLargestUnit(n)) && throwRangeError(durationWithDateUnit(defaultTemporalLargestUnit(n))), createTemporalInstant(addInstant(t.U, toInternalDurationRecordWith24HourDays(n).p));
|
|
2257
2259
|
}
|
|
2258
2260
|
function validateEpochNanoseconds(e) {
|
|
2259
|
-
return ((e) => compareEpochNanoseconds(
|
|
2260
|
-
}
|
|
2261
|
-
function getInternalSlotForInstant(e) {
|
|
2262
|
-
return Ut.get(e);
|
|
2261
|
+
return ((e) => compareEpochNanoseconds(ye, e) * compareEpochNanoseconds(we, e) <= 0)(e) || throwRangeError(P), e;
|
|
2263
2262
|
}
|
|
2264
2263
|
function getInternalSlotOrThrowForInstant(e) {
|
|
2265
|
-
|
|
2266
|
-
return t || throwTypeError(Te), t;
|
|
2264
|
+
return getInternalSlotOrThrow(At, e);
|
|
2267
2265
|
}
|
|
2268
2266
|
function isInstant(e) {
|
|
2269
|
-
return
|
|
2267
|
+
return At.has(e);
|
|
2270
2268
|
}
|
|
2271
2269
|
function clampEpochNanoseconds(e) {
|
|
2272
|
-
return compareEpochNanoseconds(e,
|
|
2270
|
+
return compareEpochNanoseconds(e, we) > 0 ? we : compareEpochNanoseconds(e, ye) < 0 ? ye : e;
|
|
2273
2271
|
}
|
|
2274
2272
|
function systemTimeZoneIdentifier() {
|
|
2275
|
-
return
|
|
2273
|
+
return Ht && qt + Ht > Date.now() && xt ? xt : (qt = Date.now(), xt = new Nt().resolvedOptions().timeZone);
|
|
2276
2274
|
}
|
|
2277
2275
|
function setSystemTimeZoneIdCacheTtl(e) {
|
|
2278
|
-
|
|
2276
|
+
Ht = e, e || (xt = void 0, qt = -1 / 0);
|
|
2279
2277
|
}
|
|
2280
2278
|
function systemUtcEpochNanoseconds() {
|
|
2281
2279
|
return createEpochNanosecondsFromEpochMilliseconds(Date.now());
|
|
@@ -2283,7 +2281,7 @@ function systemUtcEpochNanoseconds() {
|
|
|
2283
2281
|
function systemDateTime(e = systemTimeZoneIdentifier()) {
|
|
2284
2282
|
return getIsoDateTimeForZonedDateTimeSlot(createZonedDateTimeSlot(systemUtcEpochNanoseconds(), toTemporalTimeZoneIdentifier(e), "iso8601"));
|
|
2285
2283
|
}
|
|
2286
|
-
const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097, c =
|
|
2284
|
+
const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097, c = 0, s = 1, l = 2, d = 3, m = 4, u = 5, T = 6, D = 9, h = 0, p = 1, g = 2, f = 3, I = 4, O = 5, F = 6, S = 7, y = 8, w = 9, v = [
|
|
2287
2285
|
"year",
|
|
2288
2286
|
"month",
|
|
2289
2287
|
"week",
|
|
@@ -2294,7 +2292,7 @@ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097
|
|
|
2294
2292
|
"millisecond",
|
|
2295
2293
|
"microsecond",
|
|
2296
2294
|
"nanosecond"
|
|
2297
|
-
],
|
|
2295
|
+
], E = v.map((e) => `${e}s`), M = [
|
|
2298
2296
|
a,
|
|
2299
2297
|
o,
|
|
2300
2298
|
t,
|
|
@@ -2302,8 +2300,27 @@ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e11, i = 146097
|
|
|
2302
2300
|
1e6,
|
|
2303
2301
|
1e3,
|
|
2304
2302
|
1
|
|
2305
|
-
], missingField = (e) => `missing field: ${e}`, invalidField = (e) => `invalid field: ${e}`, parseError = (e) => `parse error: ${e}`,
|
|
2306
|
-
var
|
|
2303
|
+
], missingField = (e) => `missing field: ${e}`, invalidField = (e) => `invalid field: ${e}`, parseError = (e) => `parse error: ${e}`, b = "invalid date / time", P = "out-of-bounds date", R = "out-of-bounds duration", N = "invalid formatting options", Z = "calendar mismatch", disallowedUnit = (e) => `disallowed unit: ${"auto" === e ? e : getNameFromUnit(e)}`, invalidNumber = (e) => `invalid number: ${e}`, invalidTimeZone = (e) => `invalid time zone: ${e}`, invalidMonthCode = (e) => `invalid month code:${e}`, durationWithDateUnit = (e) => `duration has a date unit: ${getNameFromUnit(e)}`, $ = "invalid `largestUnit` and `smallestUnit` options", C = "mismatch of `month` and `monthCode`", Y = "value is not formattable", notObject = (e) => `not object: ${e}`, U = "empty fields", j = "can't convert Temporal classes to number", W = "argument is undefined", A = globalThis.Intl.DurationFormat, L = /* @__PURE__ */ new WeakMap();
|
|
2304
|
+
var k = class {
|
|
2305
|
+
static supportedLocalesOf(e, t = void 0) {
|
|
2306
|
+
return A.supportedLocalesOf(e, t);
|
|
2307
|
+
}
|
|
2308
|
+
constructor(e = void 0, t = void 0) {
|
|
2309
|
+
L.set(this, { Ae: new A(e, t) });
|
|
2310
|
+
}
|
|
2311
|
+
format(e) {
|
|
2312
|
+
return getInternalSlotOrThrowForDurationFormat(this).Ae.format(durationRecordToDurationLikeObject(toTemporalDuration(e)));
|
|
2313
|
+
}
|
|
2314
|
+
formatToParts(e) {
|
|
2315
|
+
return getInternalSlotOrThrowForDurationFormat(this).Ae.formatToParts(durationRecordToDurationLikeObject(toTemporalDuration(e)));
|
|
2316
|
+
}
|
|
2317
|
+
resolvedOptions() {
|
|
2318
|
+
return getInternalSlotOrThrowForDurationFormat(this).Ae.resolvedOptions();
|
|
2319
|
+
}
|
|
2320
|
+
};
|
|
2321
|
+
defineStringTag(k.prototype, "Intl.DurationFormat"), renameFunction(k, "DurationFormat");
|
|
2322
|
+
const z = Symbol(), V = Symbol(), x = Symbol(), H = Symbol(), q = Symbol(), B = Symbol(), J = Symbol(), _ = "constrain", X = "reject", G = "compatible", K = "later", Q = "prefer", ee = "reject", te = Symbol(), oe = Symbol(), ne = Symbol(), re = "ceil", ae = "floor", ie = "expand", ce = "trunc", se = "halfCeil", le = "halfFloor", de = "halfExpand", me = "halfTrunc", ue = "halfEven", Te = "auto", De = "always", he = "never", pe = "critical", ge = "auto", fe = "never", Ie = "auto", Oe = "never", Fe = "critical", Se = Math.max, ye = createEpochNanosecondsFromEpochMilliseconds(-864e13), we = createEpochNanosecondsFromEpochMilliseconds(864e13), ve = [0, 0], Ee = compareEpochNanoseconds, Me = /* @__PURE__ */ new WeakMap();
|
|
2323
|
+
var be = class {
|
|
2307
2324
|
constructor(e, t, o = "iso8601") {
|
|
2308
2325
|
const n = validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e)));
|
|
2309
2326
|
validateString(t);
|
|
@@ -2406,25 +2423,25 @@ var Ee = class {
|
|
|
2406
2423
|
validatePartialTemporalObject(e);
|
|
2407
2424
|
const n = getOffsetNanosecondsForZonedDateTimeSlot(o), r = getIsoDateTimeForZonedDateTimeSlot(o), a = calendarMergeFields(o.Y, createNullPrototypeObject({
|
|
2408
2425
|
...isoDateTimeToFields(o.Y, r),
|
|
2409
|
-
[
|
|
2426
|
+
[yt.M]: formatUtcOffsetNanoseconds(n)
|
|
2410
2427
|
}), prepareCalendarFields(o.Y, e, [
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
])), i = getOptionsObject(t), c = getTemporalDisambiguationOption(i), s = getTemporalOffsetOption(i,
|
|
2423
|
-
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p,
|
|
2428
|
+
yt.t,
|
|
2429
|
+
yt.u,
|
|
2430
|
+
yt.v,
|
|
2431
|
+
yt.T,
|
|
2432
|
+
yt.D,
|
|
2433
|
+
yt.I,
|
|
2434
|
+
yt.O,
|
|
2435
|
+
yt.F,
|
|
2436
|
+
yt.S,
|
|
2437
|
+
yt.$,
|
|
2438
|
+
yt.M
|
|
2439
|
+
])), i = getOptionsObject(t), c = getTemporalDisambiguationOption(i), s = getTemporalOffsetOption(i, Q), l = getTemporalOverflowOption(i), d = interpretTemporalDateTimeFields(o.Y, a, l);
|
|
2440
|
+
return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, te, parseDateTimeUtcOffset(a[yt.M]), o.P, c, s, !0), o.P, o.Y);
|
|
2424
2441
|
}
|
|
2425
2442
|
withPlainTime(e = void 0) {
|
|
2426
2443
|
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
2427
|
-
return createTemporalZonedDateTime(void 0 === e ? getStartOfDay(t.P, o.o) : getEpochNanosecondsFor(t.P, combineIsoDateAndTimeRecord(o.o, toTemporalTime(e)),
|
|
2444
|
+
return createTemporalZonedDateTime(void 0 === e ? getStartOfDay(t.P, o.o) : getEpochNanosecondsFor(t.P, combineIsoDateAndTimeRecord(o.o, toTemporalTime(e)), G), t.P, t.Y);
|
|
2428
2445
|
}
|
|
2429
2446
|
withTimeZone(e) {
|
|
2430
2447
|
const t = getInternalSlotOrThrowForZonedDateTime(this);
|
|
@@ -2447,39 +2464,39 @@ var Ee = class {
|
|
|
2447
2464
|
return differenceTemporalZonedDateTime(-1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
|
|
2448
2465
|
}
|
|
2449
2466
|
round(e) {
|
|
2450
|
-
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit",
|
|
2451
|
-
if (validateTemporalUnitValue(a,
|
|
2467
|
+
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
2468
|
+
if (validateTemporalUnitValue(a, V, [d]), validateTemporalRoundingIncrement(n, a === d ? 1 : maximumTemporalDurationRoundingIncrement(a), a === d), a === D && 1 === n) return createTemporalZonedDateTimeFromSlot(t);
|
|
2452
2469
|
const i = getIsoDateTimeForZonedDateTimeSlot(t);
|
|
2453
|
-
if (a ===
|
|
2470
|
+
if (a === d) {
|
|
2454
2471
|
const e = getStartOfDay(t.P, i.o), o = getStartOfDay(t.P, addDaysToIsoDate(i.o, 1));
|
|
2455
2472
|
return createTemporalZonedDateTime(addNanosecondsToEpochSeconds(e, roundNumberToIncrement(timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, 1 !== compareEpochNanoseconds(o, t.U) ? addNanosecondsToEpochSeconds(o, -1) : t.U), -9), timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, o), -9), r)), t.P, t.Y);
|
|
2456
2473
|
}
|
|
2457
|
-
const c = roundIsoDateTime(i, n, a, r),
|
|
2458
|
-
return createTemporalZonedDateTime(interpretISODateTimeOffset(c.o, c.p,
|
|
2474
|
+
const c = roundIsoDateTime(i, n, a, r), s = getOffsetNanosecondsForZonedDateTimeSlot(t);
|
|
2475
|
+
return createTemporalZonedDateTime(interpretISODateTimeOffset(c.o, c.p, te, s, t.P, G, Q, !0), t.P, t.Y);
|
|
2459
2476
|
}
|
|
2460
2477
|
equals(e) {
|
|
2461
2478
|
const t = getInternalSlotOrThrowForZonedDateTime(this), o = toTemporalZonedDateTime(e);
|
|
2462
2479
|
return !compareEpochNanoseconds(t.U, o.U) && timeZoneEquals(t.P, o.P) && calendarEquals(t.Y, o.Y);
|
|
2463
2480
|
}
|
|
2464
2481
|
toString(e = void 0) {
|
|
2465
|
-
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
],
|
|
2470
|
-
validateTemporalUnitValue(c,
|
|
2471
|
-
const
|
|
2472
|
-
return temporalZonedDateTimeToString(t,
|
|
2482
|
+
const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [ge, fe], ge))(o), i = getRoundingModeOption(o, ce), c = getTemporalUnitValuedOption(o, "smallestUnit"), s = ((e) => getOption(e, "timeZoneName", [
|
|
2483
|
+
Ie,
|
|
2484
|
+
Oe,
|
|
2485
|
+
Fe
|
|
2486
|
+
], Ie))(o);
|
|
2487
|
+
validateTemporalUnitValue(c, V), c === m && throwRangeError(invalidField("smallestUnit"));
|
|
2488
|
+
const l = toSecondsStringPrecisionRecord(c, r);
|
|
2489
|
+
return temporalZonedDateTimeToString(t, l.ve, n, s, a, l.Me, l.Ee, i);
|
|
2473
2490
|
}
|
|
2474
2491
|
toLocaleString(e = void 0, t = void 0) {
|
|
2475
|
-
const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t,
|
|
2476
|
-
return "iso8601" === o.Y || calendarEquals(o.Y,
|
|
2492
|
+
const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t, x, o.P);
|
|
2493
|
+
return "iso8601" === o.Y || calendarEquals(o.Y, n.Ne.calendar) || throwRangeError(Z), formatDateTime(n, createTemporalInstant(o.U));
|
|
2477
2494
|
}
|
|
2478
2495
|
toJSON() {
|
|
2479
|
-
return temporalZonedDateTimeToString(getInternalSlotOrThrowForZonedDateTime(this), void 0,
|
|
2496
|
+
return temporalZonedDateTimeToString(getInternalSlotOrThrowForZonedDateTime(this), void 0, Te, Ie, ge);
|
|
2480
2497
|
}
|
|
2481
2498
|
valueOf() {
|
|
2482
|
-
throwTypeError(
|
|
2499
|
+
throwTypeError(j);
|
|
2483
2500
|
}
|
|
2484
2501
|
startOfDay() {
|
|
2485
2502
|
const e = getInternalSlotOrThrowForZonedDateTime(this);
|
|
@@ -2487,10 +2504,10 @@ var Ee = class {
|
|
|
2487
2504
|
}
|
|
2488
2505
|
getTimeZoneTransition(e) {
|
|
2489
2506
|
const t = getInternalSlotOrThrowForZonedDateTime(this);
|
|
2490
|
-
void 0 === e && throwTypeError(
|
|
2491
|
-
const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"],
|
|
2507
|
+
void 0 === e && throwTypeError(W);
|
|
2508
|
+
const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"], B), n = ((e, t, o) => {
|
|
2492
2509
|
if ("UTC" === e || isOffsetTimeZoneIdentifier(e)) return null;
|
|
2493
|
-
const n = -4e9, r = Math.floor((Date.now() + 31536e7) / 1e3), a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n,
|
|
2510
|
+
const n = -4e9, r = Math.floor((Date.now() + 31536e7) / 1e3), a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n, 1 / 0);
|
|
2494
2511
|
return -1 === o ? a === n ? null : a > r ? searchTimeZoneTransition(e, a, a - 31536e3, o) || searchTimeZoneTransition(e, r, n, o) : searchTimeZoneTransition(e, a, n, o) : searchTimeZoneTransition(e, a, a > r ? a + 31536e3 : r, o);
|
|
2495
2512
|
})(t.P, t.U, "next" === o ? 1 : -1);
|
|
2496
2513
|
return null === n ? null : createTemporalZonedDateTime(n, t.P, t.Y);
|
|
@@ -2510,9 +2527,9 @@ var Ee = class {
|
|
|
2510
2527
|
return createTemporalDateTime(getIsoDateTimeForZonedDateTimeSlot(e), e.Y);
|
|
2511
2528
|
}
|
|
2512
2529
|
};
|
|
2513
|
-
defineStringTag(
|
|
2514
|
-
const
|
|
2515
|
-
var
|
|
2530
|
+
defineStringTag(be.prototype, "Temporal.ZonedDateTime"), renameFunction(be, "ZonedDateTime");
|
|
2531
|
+
const Pe = globalThis.Temporal, Re = createNullPrototypeObject(), Ne = createNullPrototypeObject(), Ze = /* @__PURE__ */ new WeakMap();
|
|
2532
|
+
var $e = class {
|
|
2516
2533
|
constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = "iso8601") {
|
|
2517
2534
|
const d = [
|
|
2518
2535
|
e,
|
|
@@ -2528,7 +2545,7 @@ var Re = class {
|
|
|
2528
2545
|
].map(toIntegerWithTruncation);
|
|
2529
2546
|
validateString(l);
|
|
2530
2547
|
const u = canonicalizeCalendar(l);
|
|
2531
|
-
|
|
2548
|
+
createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(...d), createTimeRecord(...m)), u, this);
|
|
2532
2549
|
}
|
|
2533
2550
|
static from(e, t = void 0) {
|
|
2534
2551
|
return toTemporalDateTime(e, t);
|
|
@@ -2606,16 +2623,16 @@ var Re = class {
|
|
|
2606
2623
|
const o = getInternalSlotOrThrowForPlainDateTime(this);
|
|
2607
2624
|
validatePartialTemporalObject(e);
|
|
2608
2625
|
const n = calendarMergeFields(o.Y, isoDateTimeToFields(o.Y, o.K), prepareCalendarFields(o.Y, e, [
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2626
|
+
yt.t,
|
|
2627
|
+
yt.u,
|
|
2628
|
+
yt.v,
|
|
2629
|
+
yt.T,
|
|
2630
|
+
yt.D,
|
|
2631
|
+
yt.I,
|
|
2632
|
+
yt.O,
|
|
2633
|
+
yt.F,
|
|
2634
|
+
yt.S,
|
|
2635
|
+
yt.$
|
|
2619
2636
|
]));
|
|
2620
2637
|
return createTemporalDateTime(interpretTemporalDateTimeFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2621
2638
|
}
|
|
@@ -2639,28 +2656,28 @@ var Re = class {
|
|
|
2639
2656
|
return differenceTemporalPlainDateTime(-1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
|
|
2640
2657
|
}
|
|
2641
2658
|
round(e) {
|
|
2642
|
-
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit",
|
|
2643
|
-
return validateTemporalUnitValue(a,
|
|
2659
|
+
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
2660
|
+
return validateTemporalUnitValue(a, V, [d]), validateTemporalRoundingIncrement(n, a === d ? 1 : maximumTemporalDurationRoundingIncrement(a), a === d), createTemporalDateTime(roundIsoDateTime(t.K, n, a, r), t.Y);
|
|
2644
2661
|
}
|
|
2645
2662
|
equals(e) {
|
|
2646
2663
|
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(e));
|
|
2647
2664
|
return !compareIsoDateTime(t.K, o.K) && calendarEquals(t.Y, o.Y);
|
|
2648
2665
|
}
|
|
2649
2666
|
toString(e = void 0) {
|
|
2650
|
-
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o,
|
|
2651
|
-
validateTemporalUnitValue(i,
|
|
2667
|
+
const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, ce), i = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
2668
|
+
validateTemporalUnitValue(i, V), i === m && throwRangeError(invalidField("smallestUnit"));
|
|
2652
2669
|
const c = toSecondsStringPrecisionRecord(i, r);
|
|
2653
|
-
return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t.K, c.Me, c.
|
|
2670
|
+
return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t.K, c.Me, c.Ee, a)), t.Y, c.ve, n);
|
|
2654
2671
|
}
|
|
2655
2672
|
toLocaleString(e = void 0, t = void 0) {
|
|
2656
|
-
return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2673
|
+
return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t, x), this);
|
|
2657
2674
|
}
|
|
2658
2675
|
toJSON() {
|
|
2659
2676
|
const e = getInternalSlotOrThrowForPlainDateTime(this);
|
|
2660
|
-
return isoDateTimeToString(e.K, e.Y, void 0,
|
|
2677
|
+
return isoDateTimeToString(e.K, e.Y, void 0, Te);
|
|
2661
2678
|
}
|
|
2662
2679
|
valueOf() {
|
|
2663
|
-
throwTypeError(
|
|
2680
|
+
throwTypeError(j);
|
|
2664
2681
|
}
|
|
2665
2682
|
toZonedDateTime(e, t = void 0) {
|
|
2666
2683
|
const o = getInternalSlotOrThrowForPlainDateTime(this), n = toTemporalTimeZoneIdentifier(e), r = getTemporalDisambiguationOption(getOptionsObject(t));
|
|
@@ -2674,19 +2691,18 @@ var Re = class {
|
|
|
2674
2691
|
return createTemporalTime(getInternalSlotOrThrowForPlainDateTime(this).K.p);
|
|
2675
2692
|
}
|
|
2676
2693
|
};
|
|
2677
|
-
defineStringTag(
|
|
2678
|
-
const
|
|
2679
|
-
var
|
|
2694
|
+
defineStringTag($e.prototype, "Temporal.PlainDateTime"), renameFunction($e, "PlainDateTime");
|
|
2695
|
+
const Ce = /* @__PURE__ */ new WeakMap();
|
|
2696
|
+
var Ye = class {
|
|
2680
2697
|
constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0) {
|
|
2681
|
-
|
|
2698
|
+
createTemporalTime(createTimeRecord(...[
|
|
2682
2699
|
e,
|
|
2683
2700
|
t,
|
|
2684
2701
|
o,
|
|
2685
2702
|
n,
|
|
2686
2703
|
r,
|
|
2687
2704
|
a
|
|
2688
|
-
].map(toIntegerWithTruncation);
|
|
2689
|
-
isValidTime(...i) || throwRangeError(se), createTemporalTime(createTimeRecord(...i), this);
|
|
2705
|
+
].map(toIntegerWithTruncation)), this);
|
|
2690
2706
|
}
|
|
2691
2707
|
static from(e, t = void 0) {
|
|
2692
2708
|
return createTemporalTime(toTemporalTime(e, t));
|
|
@@ -2736,54 +2752,54 @@ var Ze = class {
|
|
|
2736
2752
|
return differenceTemporalPlainTime(-1, getInternalSlotOrThrowForPlainTime(this), e, t);
|
|
2737
2753
|
}
|
|
2738
2754
|
round(e) {
|
|
2739
|
-
const t = getInternalSlotOrThrowForPlainTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o,
|
|
2740
|
-
return validateTemporalUnitValue(a,
|
|
2755
|
+
const t = getInternalSlotOrThrowForPlainTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, de), a = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
2756
|
+
return validateTemporalUnitValue(a, V), validateTemporalRoundingIncrement(n, maximumTemporalDurationRoundingIncrement(a), !1), createTemporalTime(roundTime(t, n, a, r));
|
|
2741
2757
|
}
|
|
2742
2758
|
equals(e) {
|
|
2743
2759
|
return !compareTimeRecord(getInternalSlotOrThrowForPlainTime(this), toTemporalTime(e));
|
|
2744
2760
|
}
|
|
2745
2761
|
toString(e = void 0) {
|
|
2746
|
-
const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o,
|
|
2747
|
-
validateTemporalUnitValue(a,
|
|
2762
|
+
const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
2763
|
+
validateTemporalUnitValue(a, V), a === m && throwRangeError(invalidField("smallestUnit"));
|
|
2748
2764
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
2749
|
-
return timeRecordToString(roundTime(t, i.Me, i.
|
|
2765
|
+
return timeRecordToString(roundTime(t, i.Me, i.Ee, r), i.ve);
|
|
2750
2766
|
}
|
|
2751
2767
|
toLocaleString(e = void 0, t = void 0) {
|
|
2752
|
-
return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2768
|
+
return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t, V), this);
|
|
2753
2769
|
}
|
|
2754
2770
|
toJSON() {
|
|
2755
2771
|
return timeRecordToString(getInternalSlotOrThrowForPlainTime(this));
|
|
2756
2772
|
}
|
|
2757
2773
|
valueOf() {
|
|
2758
|
-
throwTypeError(
|
|
2774
|
+
throwTypeError(j);
|
|
2759
2775
|
}
|
|
2760
2776
|
};
|
|
2761
|
-
defineStringTag(
|
|
2762
|
-
const
|
|
2763
|
-
`(?<d>${
|
|
2764
|
-
`(?<y>:?)(?<e>${
|
|
2777
|
+
defineStringTag(Ye.prototype, "Temporal.PlainTime"), renameFunction(Ye, "PlainTime");
|
|
2778
|
+
const Ue = "\\d{4}|[-+]\\d{6}", je = "0[1-9]|1[0-2]", We = "0[1-9]|[12]\\d|30|31", Ae = "[01]\\d|2[0-3]", Le = "[0-5]\\d", ke = `(?<a>${Ue})(?<x>-?)(?<b>${je})\\k<x>(?<c>${We})`, ze = optionalChain([
|
|
2779
|
+
`(?<d>${Ae})`,
|
|
2780
|
+
`(?<y>:?)(?<e>${Le})`,
|
|
2765
2781
|
"\\k<y>(?<f>[0-5]\\d|60)",
|
|
2766
2782
|
"[.,](?<g>\\d{1,9})"
|
|
2767
|
-
]),
|
|
2768
|
-
`([+-])(${
|
|
2769
|
-
`(?<z>:?)(${
|
|
2770
|
-
`\\k<z>(${
|
|
2783
|
+
]), Ve = optionalChain([
|
|
2784
|
+
`([+-])(${Ae})`,
|
|
2785
|
+
`(?<z>:?)(${Le})`,
|
|
2786
|
+
`\\k<z>(${Le})`,
|
|
2771
2787
|
"[.,](\\d{1,9})"
|
|
2772
|
-
]),
|
|
2773
|
-
|
|
2774
|
-
`[ tT]${
|
|
2775
|
-
`(?<h>${
|
|
2776
|
-
]),
|
|
2777
|
-
|
|
2778
|
-
`[ tT]${
|
|
2779
|
-
|
|
2780
|
-
])}${
|
|
2781
|
-
var
|
|
2788
|
+
]), xe = optionalChain([
|
|
2789
|
+
ke,
|
|
2790
|
+
`[ tT]${ze}`,
|
|
2791
|
+
`(?<h>${Ve})`
|
|
2792
|
+
]), He = `(?<l>${Ue})-?(?<m>${je})`, qe = `(?:--)?(?<m>${je})-?(?<n>${We})`, Be = `(?<h>${Ve})|(?<i>[zZ])`, Je = `([+-])(${Ae})(?::?(${Le}))?|${join("[a-zA-Z._][a-zA-Z._+-\\d]*", "\\/")}`, _e = `\\[!?(?<j>${Je})\\]`, Xe = join("[a-zA-Z\\d]+", "-"), Ge = `\\[(!)?([a-z_][a-z\\d_-]*)=(${Xe})\\]`, Ke = `(?<k>(${Ge})*)`, Qe = RegExp(Ge, "g"), et = createRegExp(`${optionalChain([
|
|
2793
|
+
ke,
|
|
2794
|
+
`[ tT]${ze}`,
|
|
2795
|
+
Be
|
|
2796
|
+
])}${_e}${Ke}`), tt = createRegExp(`${xe}(?:${_e})?${Ke}`), ot = createRegExp(`${ke}[ tT]${ze}(?:${Be})(?:${_e})?${Ke}`), nt = createRegExp(`(${ke}[ tT]|[tT]?)${ze}(?<h>${Ve})?(?:${_e})?${Ke}`), rt = createRegExp(`(${xe}|${qe})(?:${_e})?${Ke}`), at = createRegExp(`(${xe}|${He})(?:${_e})?${Ke}`), it = [createRegExp(`${qe}(${_e})?(${Ge})*`), createRegExp(`${He}(${_e})?(${Ge})*`)], ct = createRegExp(Je), st = createRegExp(Xe), lt = createRegExp(Ve), dt = /* @__PURE__ */ new WeakMap();
|
|
2797
|
+
var mt = class {
|
|
2782
2798
|
constructor(e, t, o = "iso8601", n = 1972) {
|
|
2783
2799
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
|
|
2784
2800
|
validateString(o);
|
|
2785
|
-
const i = canonicalizeCalendar(o)
|
|
2786
|
-
|
|
2801
|
+
const i = canonicalizeCalendar(o);
|
|
2802
|
+
createTemporalMonthDay(createIsoDateRecord(toIntegerWithTruncation(n), r, a), i, this);
|
|
2787
2803
|
}
|
|
2788
2804
|
static from(e, t = void 0) {
|
|
2789
2805
|
return toTemporalMonthDay(e, t);
|
|
@@ -2801,11 +2817,11 @@ var st = class {
|
|
|
2801
2817
|
}
|
|
2802
2818
|
with(e, t = void 0) {
|
|
2803
2819
|
const o = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2804
|
-
return validatePartialTemporalObject(e), createTemporalMonthDay(calendarMonthDayFromFields(o.Y, calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o,
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2820
|
+
return validatePartialTemporalObject(e), createTemporalMonthDay(calendarMonthDayFromFields(o.Y, calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, q), prepareCalendarFields(o.Y, e, [
|
|
2821
|
+
yt.t,
|
|
2822
|
+
yt.u,
|
|
2823
|
+
yt.v,
|
|
2824
|
+
yt.T
|
|
2809
2825
|
])), getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2810
2826
|
}
|
|
2811
2827
|
equals(e) {
|
|
@@ -2816,27 +2832,27 @@ var st = class {
|
|
|
2816
2832
|
return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
|
|
2817
2833
|
}
|
|
2818
2834
|
toLocaleString(e = void 0, t = void 0) {
|
|
2819
|
-
return getInternalSlotOrThrowForPlainMonthDay(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2835
|
+
return getInternalSlotOrThrowForPlainMonthDay(this), formatDateTime(createDateTimeFormat(e, t, z), this);
|
|
2820
2836
|
}
|
|
2821
2837
|
toJSON() {
|
|
2822
|
-
return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this),
|
|
2838
|
+
return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), Te);
|
|
2823
2839
|
}
|
|
2824
2840
|
valueOf() {
|
|
2825
|
-
throwTypeError(
|
|
2841
|
+
throwTypeError(j);
|
|
2826
2842
|
}
|
|
2827
2843
|
toPlainDate(e) {
|
|
2828
2844
|
const t = getInternalSlotOrThrowForPlainMonthDay(this);
|
|
2829
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o,
|
|
2845
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, q), prepareCalendarFields(t.Y, e, [yt.t], [])), _), t.Y);
|
|
2830
2846
|
}
|
|
2831
2847
|
};
|
|
2832
|
-
defineStringTag(
|
|
2833
|
-
const
|
|
2834
|
-
var
|
|
2848
|
+
defineStringTag(mt.prototype, "Temporal.PlainMonthDay"), renameFunction(mt, "PlainMonthDay");
|
|
2849
|
+
const ut = /* @__PURE__ */ new WeakMap();
|
|
2850
|
+
var Tt = class {
|
|
2835
2851
|
constructor(e, t, o = "iso8601", n = 1) {
|
|
2836
2852
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
|
|
2837
2853
|
validateString(o);
|
|
2838
|
-
const i = canonicalizeCalendar(o)
|
|
2839
|
-
|
|
2854
|
+
const i = canonicalizeCalendar(o);
|
|
2855
|
+
createTemporalYearMonth(createIsoDateRecord(r, a, toIntegerWithTruncation(n)), i, this);
|
|
2840
2856
|
}
|
|
2841
2857
|
static from(e, t = void 0) {
|
|
2842
2858
|
return toTemporalYearMonth(e, t);
|
|
@@ -2877,10 +2893,10 @@ var dt = class {
|
|
|
2877
2893
|
with(e, t = void 0) {
|
|
2878
2894
|
const o = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2879
2895
|
validatePartialTemporalObject(e);
|
|
2880
|
-
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o,
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2896
|
+
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, H), prepareCalendarFields(o.Y, e, [
|
|
2897
|
+
yt.t,
|
|
2898
|
+
yt.u,
|
|
2899
|
+
yt.v
|
|
2884
2900
|
]));
|
|
2885
2901
|
return createTemporalYearMonth(calendarYearMonthFromFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))), o.Y);
|
|
2886
2902
|
}
|
|
@@ -2904,27 +2920,27 @@ var dt = class {
|
|
|
2904
2920
|
return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
|
|
2905
2921
|
}
|
|
2906
2922
|
toLocaleString(e = void 0, t = void 0) {
|
|
2907
|
-
return getInternalSlotOrThrowForPlainYearMonth(this), formatDateTime(createDateTimeFormat(e, t,
|
|
2923
|
+
return getInternalSlotOrThrowForPlainYearMonth(this), formatDateTime(createDateTimeFormat(e, t, z), this);
|
|
2908
2924
|
}
|
|
2909
2925
|
toJSON() {
|
|
2910
|
-
return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this),
|
|
2926
|
+
return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), Te);
|
|
2911
2927
|
}
|
|
2912
2928
|
valueOf() {
|
|
2913
|
-
throwTypeError(
|
|
2929
|
+
throwTypeError(j);
|
|
2914
2930
|
}
|
|
2915
2931
|
toPlainDate(e) {
|
|
2916
2932
|
const t = getInternalSlotOrThrowForPlainYearMonth(this);
|
|
2917
|
-
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o,
|
|
2933
|
+
return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.Y, calendarMergeFields(t.Y, isoDateToFields(t.Y, t.o, H), prepareCalendarFields(t.Y, e, [yt.T], [])), _), t.Y);
|
|
2918
2934
|
}
|
|
2919
2935
|
};
|
|
2920
|
-
defineStringTag(
|
|
2921
|
-
const
|
|
2922
|
-
var
|
|
2936
|
+
defineStringTag(Tt.prototype, "Temporal.PlainYearMonth"), renameFunction(Tt, "PlainYearMonth");
|
|
2937
|
+
const Dt = /* @__PURE__ */ new WeakMap();
|
|
2938
|
+
var ht = class {
|
|
2923
2939
|
constructor(e, t, o, n = "iso8601") {
|
|
2924
2940
|
const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t), i = toIntegerWithTruncation(o);
|
|
2925
2941
|
validateString(n);
|
|
2926
2942
|
const c = canonicalizeCalendar(n);
|
|
2927
|
-
|
|
2943
|
+
createTemporalDate(createIsoDateRecord(r, a, i), c, this);
|
|
2928
2944
|
}
|
|
2929
2945
|
static from(e, t = void 0) {
|
|
2930
2946
|
return toTemporalDate(e, t);
|
|
@@ -2982,11 +2998,11 @@ var ut = class {
|
|
|
2982
2998
|
}
|
|
2983
2999
|
toPlainYearMonth() {
|
|
2984
3000
|
const e = getInternalSlotOrThrowForPlainDate(this);
|
|
2985
|
-
return createTemporalYearMonth(calendarYearMonthFromFields(e.Y, isoDateToFields(e.Y, e.o,
|
|
3001
|
+
return createTemporalYearMonth(calendarYearMonthFromFields(e.Y, isoDateToFields(e.Y, e.o, z), _), e.Y);
|
|
2986
3002
|
}
|
|
2987
3003
|
toPlainMonthDay() {
|
|
2988
3004
|
const e = getInternalSlotOrThrowForPlainDate(this);
|
|
2989
|
-
return createTemporalMonthDay(calendarMonthDayFromFields(e.Y, isoDateToFields(e.Y, e.o,
|
|
3005
|
+
return createTemporalMonthDay(calendarMonthDayFromFields(e.Y, isoDateToFields(e.Y, e.o, z), _), e.Y);
|
|
2990
3006
|
}
|
|
2991
3007
|
add(e, t = void 0) {
|
|
2992
3008
|
return addDurationToDate(1, getInternalSlotOrThrowForPlainDate(this), e, t);
|
|
@@ -2997,11 +3013,11 @@ var ut = class {
|
|
|
2997
3013
|
with(e, t = void 0) {
|
|
2998
3014
|
const o = getInternalSlotOrThrowForPlainDate(this);
|
|
2999
3015
|
validatePartialTemporalObject(e);
|
|
3000
|
-
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o,
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3016
|
+
const n = calendarMergeFields(o.Y, isoDateToFields(o.Y, o.o, z), prepareCalendarFields(o.Y, e, [
|
|
3017
|
+
yt.t,
|
|
3018
|
+
yt.u,
|
|
3019
|
+
yt.v,
|
|
3020
|
+
yt.T
|
|
3005
3021
|
])), r = getTemporalOverflowOption(getOptionsObject(t));
|
|
3006
3022
|
return createTemporalDate(calendarDateFromFields(o.Y, n, r), o.Y);
|
|
3007
3023
|
}
|
|
@@ -3029,43 +3045,43 @@ var ut = class {
|
|
|
3029
3045
|
const t = e.timeZone;
|
|
3030
3046
|
void 0 === t ? n = toTemporalTimeZoneIdentifier(e) : (n = toTemporalTimeZoneIdentifier(t), o = e.plainTime);
|
|
3031
3047
|
} else n = toTemporalTimeZoneIdentifier(e);
|
|
3032
|
-
return createTemporalZonedDateTime(void 0 === o ? getStartOfDay(n, t.o) : getEpochNanosecondsFor(n, validateIsoDateTime(combineIsoDateAndTimeRecord(t.o, toTemporalTime(o))),
|
|
3048
|
+
return createTemporalZonedDateTime(void 0 === o ? getStartOfDay(n, t.o) : getEpochNanosecondsFor(n, validateIsoDateTime(combineIsoDateAndTimeRecord(t.o, toTemporalTime(o))), G), n, t.Y);
|
|
3033
3049
|
}
|
|
3034
3050
|
toString(e = void 0) {
|
|
3035
3051
|
return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
|
|
3036
3052
|
}
|
|
3037
3053
|
toLocaleString(e = void 0, t = void 0) {
|
|
3038
|
-
return getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t,
|
|
3054
|
+
return getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, z), this);
|
|
3039
3055
|
}
|
|
3040
3056
|
toJSON() {
|
|
3041
|
-
return temporalDateToString(getInternalSlotOrThrowForPlainDate(this),
|
|
3057
|
+
return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), Te);
|
|
3042
3058
|
}
|
|
3043
3059
|
valueOf() {
|
|
3044
|
-
throwTypeError(
|
|
3060
|
+
throwTypeError(j);
|
|
3045
3061
|
}
|
|
3046
3062
|
};
|
|
3047
|
-
defineStringTag(
|
|
3048
|
-
const
|
|
3063
|
+
defineStringTag(ht.prototype, "Temporal.PlainDate"), renameFunction(ht, "PlainDate");
|
|
3064
|
+
const pt = createNullPrototypeObject(), gt = {
|
|
3049
3065
|
chinese: createLruCache(2e3),
|
|
3050
3066
|
dangi: createLruCache(2e3)
|
|
3051
|
-
},
|
|
3067
|
+
}, ft = {
|
|
3052
3068
|
chinese: createLruCache(1e4),
|
|
3053
3069
|
dangi: createLruCache(1e4)
|
|
3054
|
-
},
|
|
3070
|
+
}, It = createLruCache(5e3), Ot = createLruCache(1e3), Ft = /* @__PURE__ */ new Map([["ah", 1], ["bh", !1]]), St = createNullPrototypeObject({
|
|
3055
3071
|
iso8601: /* @__PURE__ */ new Map(),
|
|
3056
|
-
buddhist: new Map([["be", 1]]),
|
|
3072
|
+
buddhist: /* @__PURE__ */ new Map([["be", 1]]),
|
|
3057
3073
|
chinese: /* @__PURE__ */ new Map(),
|
|
3058
|
-
coptic: new Map([["am", 1]]),
|
|
3074
|
+
coptic: /* @__PURE__ */ new Map([["am", 1]]),
|
|
3059
3075
|
dangi: /* @__PURE__ */ new Map(),
|
|
3060
|
-
ethioaa: new Map([["aa", 1]]),
|
|
3061
|
-
ethiopic: new Map([["am", 1], ["aa", -5499]]),
|
|
3062
|
-
gregory: new Map([["ce", 1], ["bce", !1]]),
|
|
3063
|
-
hebrew: new Map([["am", 1]]),
|
|
3064
|
-
indian: new Map([["shaka", 1]]),
|
|
3065
|
-
"islamic-civil":
|
|
3066
|
-
"islamic-tbla":
|
|
3067
|
-
"islamic-umalqura":
|
|
3068
|
-
japanese: new Map([
|
|
3076
|
+
ethioaa: /* @__PURE__ */ new Map([["aa", 1]]),
|
|
3077
|
+
ethiopic: /* @__PURE__ */ new Map([["am", 1], ["aa", -5499]]),
|
|
3078
|
+
gregory: /* @__PURE__ */ new Map([["ce", 1], ["bce", !1]]),
|
|
3079
|
+
hebrew: /* @__PURE__ */ new Map([["am", 1]]),
|
|
3080
|
+
indian: /* @__PURE__ */ new Map([["shaka", 1]]),
|
|
3081
|
+
"islamic-civil": Ft,
|
|
3082
|
+
"islamic-tbla": Ft,
|
|
3083
|
+
"islamic-umalqura": Ft,
|
|
3084
|
+
japanese: /* @__PURE__ */ new Map([
|
|
3069
3085
|
["reiwa", 2019],
|
|
3070
3086
|
["heisei", 1989],
|
|
3071
3087
|
["showa", 1926],
|
|
@@ -3074,9 +3090,9 @@ const Tt = createNullPrototypeObject(), Dt = {
|
|
|
3074
3090
|
["ce", 1],
|
|
3075
3091
|
["bce", !1]
|
|
3076
3092
|
]),
|
|
3077
|
-
persian: new Map([["ap", 1]]),
|
|
3078
|
-
roc: new Map([["roc", 1], ["broc", !1]])
|
|
3079
|
-
}),
|
|
3093
|
+
persian: /* @__PURE__ */ new Map([["ap", 1]]),
|
|
3094
|
+
roc: /* @__PURE__ */ new Map([["roc", 1], ["broc", !1]])
|
|
3095
|
+
}), yt = {
|
|
3080
3096
|
ne: "era",
|
|
3081
3097
|
re: "eraYear",
|
|
3082
3098
|
t: "year",
|
|
@@ -3091,41 +3107,41 @@ const Tt = createNullPrototypeObject(), Dt = {
|
|
|
3091
3107
|
$: "nanosecond",
|
|
3092
3108
|
M: "offset",
|
|
3093
3109
|
P: "timeZone"
|
|
3094
|
-
},
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
],
|
|
3110
|
-
[
|
|
3111
|
-
[
|
|
3112
|
-
[
|
|
3113
|
-
[
|
|
3114
|
-
[
|
|
3115
|
-
[
|
|
3116
|
-
[
|
|
3117
|
-
[
|
|
3118
|
-
[
|
|
3119
|
-
[
|
|
3120
|
-
[
|
|
3121
|
-
[
|
|
3122
|
-
[
|
|
3110
|
+
}, wt = [
|
|
3111
|
+
yt.ne,
|
|
3112
|
+
yt.re,
|
|
3113
|
+
yt.t,
|
|
3114
|
+
yt.u,
|
|
3115
|
+
yt.v,
|
|
3116
|
+
yt.T,
|
|
3117
|
+
yt.D,
|
|
3118
|
+
yt.I,
|
|
3119
|
+
yt.O,
|
|
3120
|
+
yt.F,
|
|
3121
|
+
yt.S,
|
|
3122
|
+
yt.$,
|
|
3123
|
+
yt.M,
|
|
3124
|
+
yt.P
|
|
3125
|
+
], vt = {
|
|
3126
|
+
[yt.ne]: [toString],
|
|
3127
|
+
[yt.re]: [toIntegerWithTruncation],
|
|
3128
|
+
[yt.t]: [toIntegerWithTruncation],
|
|
3129
|
+
[yt.u]: [toPositiveIntegerWithTruncation],
|
|
3130
|
+
[yt.v]: [(e) => createMonthCode(...parseMonthCode(e))],
|
|
3131
|
+
[yt.T]: [toPositiveIntegerWithTruncation],
|
|
3132
|
+
[yt.D]: [toIntegerWithTruncation, 0],
|
|
3133
|
+
[yt.I]: [toIntegerWithTruncation, 0],
|
|
3134
|
+
[yt.O]: [toIntegerWithTruncation, 0],
|
|
3135
|
+
[yt.F]: [toIntegerWithTruncation, 0],
|
|
3136
|
+
[yt.S]: [toIntegerWithTruncation, 0],
|
|
3137
|
+
[yt.$]: [toIntegerWithTruncation, 0],
|
|
3138
|
+
[yt.M]: [(e) => {
|
|
3123
3139
|
const t = toPrimitive(e);
|
|
3124
3140
|
return validateString(t), parseDateTimeUtcOffset(t), t;
|
|
3125
3141
|
}],
|
|
3126
|
-
[
|
|
3127
|
-
},
|
|
3128
|
-
var
|
|
3142
|
+
[yt.P]: [toTemporalTimeZoneIdentifier]
|
|
3143
|
+
}, Et = /* @__PURE__ */ new WeakMap(), Mt = signTimeDuration;
|
|
3144
|
+
var bt = class {
|
|
3129
3145
|
constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = 0) {
|
|
3130
3146
|
createTemporalDuration(createTemporalDurationSlot([
|
|
3131
3147
|
e,
|
|
@@ -3148,37 +3164,37 @@ var vt = class {
|
|
|
3148
3164
|
if (!n.some((e, t) => r[t] !== e)) return 0;
|
|
3149
3165
|
const i = defaultTemporalLargestUnit(n), c = defaultTemporalLargestUnit(r), s = toInternalDurationRecord(n), l = toInternalDurationRecord(r);
|
|
3150
3166
|
let d, m;
|
|
3151
|
-
return a.be && (isDateUnit(i) || isDateUnit(c)) ? compareEpochNanoseconds(addZonedDateTime(a.be, s,
|
|
3167
|
+
return a.be && (isDateUnit(i) || isDateUnit(c)) ? compareEpochNanoseconds(addZonedDateTime(a.be, s, _), addZonedDateTime(a.be, l, _)) : (isCalendarUnit(i) || isCalendarUnit(c) ? (a.Pe || throwRangeError(missingField("relativeTo")), d = dateDurationDays(s.A, a.Pe), m = dateDurationDays(l.A, a.Pe)) : (d = n[f], m = r[f]), Ee(add24HourDaysToTimeDuration(s.p, d), add24HourDaysToTimeDuration(l.p, m)));
|
|
3152
3168
|
}
|
|
3153
3169
|
get years() {
|
|
3154
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3170
|
+
return getInternalSlotOrThrowForDuration(this)[h];
|
|
3155
3171
|
}
|
|
3156
3172
|
get months() {
|
|
3157
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3173
|
+
return getInternalSlotOrThrowForDuration(this)[p];
|
|
3158
3174
|
}
|
|
3159
3175
|
get weeks() {
|
|
3160
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3176
|
+
return getInternalSlotOrThrowForDuration(this)[g];
|
|
3161
3177
|
}
|
|
3162
3178
|
get days() {
|
|
3163
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3179
|
+
return getInternalSlotOrThrowForDuration(this)[f];
|
|
3164
3180
|
}
|
|
3165
3181
|
get hours() {
|
|
3166
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3182
|
+
return getInternalSlotOrThrowForDuration(this)[I];
|
|
3167
3183
|
}
|
|
3168
3184
|
get minutes() {
|
|
3169
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3185
|
+
return getInternalSlotOrThrowForDuration(this)[O];
|
|
3170
3186
|
}
|
|
3171
3187
|
get seconds() {
|
|
3172
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3188
|
+
return getInternalSlotOrThrowForDuration(this)[F];
|
|
3173
3189
|
}
|
|
3174
3190
|
get milliseconds() {
|
|
3175
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3191
|
+
return getInternalSlotOrThrowForDuration(this)[S];
|
|
3176
3192
|
}
|
|
3177
3193
|
get microseconds() {
|
|
3178
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3194
|
+
return getInternalSlotOrThrowForDuration(this)[y];
|
|
3179
3195
|
}
|
|
3180
3196
|
get nanoseconds() {
|
|
3181
|
-
return getInternalSlotOrThrowForDuration(this)[
|
|
3197
|
+
return getInternalSlotOrThrowForDuration(this)[w];
|
|
3182
3198
|
}
|
|
3183
3199
|
get sign() {
|
|
3184
3200
|
return durationSign(getInternalSlotOrThrowForDuration(this));
|
|
@@ -3204,82 +3220,77 @@ var vt = class {
|
|
|
3204
3220
|
}
|
|
3205
3221
|
round(e) {
|
|
3206
3222
|
const t = getInternalSlotOrThrowForDuration(this), o = getRoundToOptionsObject(e);
|
|
3207
|
-
let n = getTemporalUnitValuedOption(o, "largestUnit"
|
|
3208
|
-
const r = getTemporalRelativeToOption(o), a = getRoundingIncrementOption(o), i = getRoundingModeOption(o,
|
|
3209
|
-
let c = getTemporalUnitValuedOption(o, "smallestUnit"
|
|
3210
|
-
validateTemporalUnitValue(c,
|
|
3211
|
-
const s = void 0
|
|
3212
|
-
c ??=
|
|
3213
|
-
const d = defaultTemporalLargestUnit(t), m = largerOfTwoTemporalUnits(d, c), u = void 0 !== n;
|
|
3214
|
-
if (void 0 !== n && "auto" !== n || (n = m), (!s && !u || n > c) && throwRangeError(De), isDateUnit(c) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(c), !1), a > 1 && n !== c && isDateUnit(c) && throwRangeError(De), r.be) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.be, createZonedDateTimeSlot(addZonedDateTime(r.be, toInternalDurationRecord(t), D), r.be.P, r.be.Y), n, a, c, i), isDateUnit(n) ? H : n));
|
|
3223
|
+
let n = getTemporalUnitValuedOption(o, "largestUnit");
|
|
3224
|
+
const r = getTemporalRelativeToOption(o), a = getRoundingIncrementOption(o), i = getRoundingModeOption(o, de);
|
|
3225
|
+
let c = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
3226
|
+
validateTemporalUnitValue(c, x);
|
|
3227
|
+
const s = defaultTemporalLargestUnit(t), l = void 0 === c && void 0 === n;
|
|
3228
|
+
if (c ??= D, void 0 !== n && "auto" !== n || (n = largerOfTwoTemporalUnits(s, c)), (l || n > c) && throwRangeError($), isDateUnit(c) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(c), !1), a > 1 && n !== c && isDateUnit(c) && throwRangeError($), r.be) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.be, createZonedDateTimeSlot(addZonedDateTime(r.be, toInternalDurationRecord(t), _), r.be.P, r.be.Y), n, a, c, i), isDateUnit(n) ? m : n));
|
|
3215
3229
|
if (r.Pe) {
|
|
3216
3230
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
3217
|
-
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.Pe.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.Pe.Y, r.Pe.o, adjustDateDurationRecord(e.A, o.X),
|
|
3231
|
+
return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.Pe.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.Pe.Y, r.Pe.o, adjustDateDurationRecord(e.A, o.X), _), o), r.Pe.Y, n, a, c, i), n));
|
|
3218
3232
|
}
|
|
3219
|
-
(isCalendarUnit(
|
|
3220
|
-
const
|
|
3221
|
-
return createTemporalDuration(temporalDurationFromInternal(c ===
|
|
3233
|
+
(isCalendarUnit(s) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
|
|
3234
|
+
const u = toInternalDurationRecordWith24HourDays(t);
|
|
3235
|
+
return createTemporalDuration(temporalDurationFromInternal(c === d ? combineDateAndTimeDuration(createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(u.p, a, i)[0]), ve) : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(u.p, a, c, i)), n));
|
|
3222
3236
|
}
|
|
3223
3237
|
total(e) {
|
|
3224
3238
|
const t = getInternalSlotOrThrowForDuration(this);
|
|
3225
|
-
void 0 === e && throwTypeError(
|
|
3226
|
-
const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit",
|
|
3227
|
-
if (validateTemporalUnitValue(r,
|
|
3239
|
+
void 0 === e && throwTypeError(W);
|
|
3240
|
+
const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit", B);
|
|
3241
|
+
if (validateTemporalUnitValue(r, x), n.be) return ((e, t, o) => isDateUnit(o) ? totalRelativeDuration(differenceZonedDateTime(e, t, o), e.U, t.U, getIsoDateTimeForZonedDateTimeSlot(e), e.P, e.Y, o) : totalTimeDuration(timeDurationFromEpochNanosecondsDifference(t.U, e.U), o))(n.be, createZonedDateTimeSlot(addZonedDateTime(n.be, toInternalDurationRecord(t), _), n.be.P, n.be.Y), r);
|
|
3228
3242
|
if (n.Pe) {
|
|
3229
3243
|
const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
|
|
3230
|
-
return ((e, t, o, n) => compareIsoDateTime(e, t) ? (validateIsoDateTime(e), validateIsoDateTime(t), totalRelativeDuration(differenceISODateTime(e, t, o, n), getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, o, n)) : 0)(combineIsoDateAndTimeRecord(n.Pe.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(n.Pe.Y, n.Pe.o, adjustDateDurationRecord(e.A, o.X),
|
|
3244
|
+
return ((e, t, o, n) => compareIsoDateTime(e, t) ? (validateIsoDateTime(e), validateIsoDateTime(t), totalRelativeDuration(differenceISODateTime(e, t, o, n), getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, o, n)) : 0)(combineIsoDateAndTimeRecord(n.Pe.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(n.Pe.Y, n.Pe.o, adjustDateDurationRecord(e.A, o.X), _), o), n.Pe.Y, r);
|
|
3231
3245
|
}
|
|
3232
3246
|
return (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) && throwRangeError(missingField("relativeTo")), totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r);
|
|
3233
3247
|
}
|
|
3234
3248
|
toString(e = void 0) {
|
|
3235
|
-
const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o,
|
|
3236
|
-
validateTemporalUnitValue(a,
|
|
3249
|
+
const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit");
|
|
3250
|
+
validateTemporalUnitValue(a, V), a !== m && a !== u || throwRangeError(disallowedUnit(a));
|
|
3237
3251
|
const i = toSecondsStringPrecisionRecord(a, n);
|
|
3238
|
-
if (i.
|
|
3252
|
+
if (i.Ee === D && 1 === i.Me) return temporalDurationToString(t, i.ve);
|
|
3239
3253
|
const c = toInternalDurationRecord(t);
|
|
3240
|
-
return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.Me, i.
|
|
3254
|
+
return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.Me, i.Ee, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), T)), i.ve);
|
|
3241
3255
|
}
|
|
3242
3256
|
toJSON() {
|
|
3243
3257
|
return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
|
|
3244
3258
|
}
|
|
3245
3259
|
toLocaleString(e = void 0, t = void 0) {
|
|
3246
|
-
|
|
3247
|
-
return ie.map((e, t) => {
|
|
3248
|
-
n[e] = o[t];
|
|
3249
|
-
}), new Intl.DurationFormat(e, t).format(n);
|
|
3260
|
+
return new A(e, t).format(durationRecordToDurationLikeObject(getInternalSlotOrThrowForDuration(this)));
|
|
3250
3261
|
}
|
|
3251
3262
|
valueOf() {
|
|
3252
|
-
throwTypeError(
|
|
3263
|
+
throwTypeError(j);
|
|
3253
3264
|
}
|
|
3254
3265
|
};
|
|
3255
|
-
defineStringTag(
|
|
3256
|
-
const
|
|
3257
|
-
[
|
|
3258
|
-
[
|
|
3259
|
-
[
|
|
3260
|
-
[
|
|
3261
|
-
[
|
|
3262
|
-
[
|
|
3263
|
-
[
|
|
3264
|
-
[
|
|
3265
|
-
[
|
|
3266
|
-
},
|
|
3267
|
-
[
|
|
3268
|
-
[
|
|
3269
|
-
[
|
|
3270
|
-
[
|
|
3271
|
-
[
|
|
3272
|
-
[
|
|
3273
|
-
[
|
|
3274
|
-
[
|
|
3275
|
-
[
|
|
3276
|
-
},
|
|
3266
|
+
defineStringTag(bt.prototype, "Temporal.Duration"), renameFunction(bt, "Duration");
|
|
3267
|
+
const Pt = {
|
|
3268
|
+
[re]: Math.ceil,
|
|
3269
|
+
[ae]: Math.floor,
|
|
3270
|
+
[ie]: roundExpand,
|
|
3271
|
+
[ce]: Math.trunc,
|
|
3272
|
+
[se]: roundHalfCeil,
|
|
3273
|
+
[le]: roundHalfFloor,
|
|
3274
|
+
[de]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
|
|
3275
|
+
[me]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
|
|
3276
|
+
[ue]: roundHalfEven
|
|
3277
|
+
}, Rt = {
|
|
3278
|
+
[re]: Math.ceil,
|
|
3279
|
+
[ae]: Math.floor,
|
|
3280
|
+
[ie]: Math.ceil,
|
|
3281
|
+
[ce]: Math.floor,
|
|
3282
|
+
[se]: roundHalfCeil,
|
|
3283
|
+
[le]: roundHalfFloor,
|
|
3284
|
+
[de]: roundHalfCeil,
|
|
3285
|
+
[me]: roundHalfFloor,
|
|
3286
|
+
[ue]: roundHalfEven
|
|
3287
|
+
}, Nt = globalThis.Intl.DateTimeFormat, Zt = /* @__PURE__ */ new WeakMap(), $t = [
|
|
3277
3288
|
"year",
|
|
3278
3289
|
"month",
|
|
3279
3290
|
"day",
|
|
3280
3291
|
"weekday",
|
|
3281
3292
|
"dateStyle"
|
|
3282
|
-
],
|
|
3293
|
+
], Ct = [
|
|
3283
3294
|
"hour",
|
|
3284
3295
|
"minute",
|
|
3285
3296
|
"second",
|
|
@@ -3287,49 +3298,47 @@ const Et = {
|
|
|
3287
3298
|
"dayPeriod",
|
|
3288
3299
|
"timeStyle"
|
|
3289
3300
|
];
|
|
3290
|
-
var
|
|
3291
|
-
|
|
3292
|
-
return formatDateTime(this, e);
|
|
3301
|
+
var Yt = class {
|
|
3302
|
+
Le(e) {
|
|
3303
|
+
return formatDateTime(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
3293
3304
|
}
|
|
3294
|
-
},
|
|
3305
|
+
}, Ut = class {
|
|
3295
3306
|
constructor(e, t) {
|
|
3296
|
-
createDateTimeFormat(e, t,
|
|
3307
|
+
Zt.set(this, createDateTimeFormat(e, t, x, void 0));
|
|
3297
3308
|
}
|
|
3298
3309
|
get format() {
|
|
3299
|
-
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).
|
|
3310
|
+
return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).ze ||= Yt.prototype.Le.bind(this), "name", { value: "" });
|
|
3300
3311
|
}
|
|
3301
3312
|
formatToParts(e) {
|
|
3302
3313
|
return ((e, t) => {
|
|
3303
|
-
const [o, n] = handleDateTimeValue(
|
|
3314
|
+
const [o, n] = handleDateTimeValue(e, t);
|
|
3304
3315
|
return o.formatToParts(n);
|
|
3305
|
-
})(this, e);
|
|
3316
|
+
})(getInternalSlotOrThrowForDateTimeFormat(this), e);
|
|
3306
3317
|
}
|
|
3307
3318
|
formatRange(e, t) {
|
|
3308
|
-
return void 0 !== e && void 0 !== t || throwTypeError(
|
|
3309
|
-
const n = getInternalSlotOrThrowForDateTimeFormat(e);
|
|
3319
|
+
return void 0 !== e && void 0 !== t || throwTypeError(Y), ((e, t, o) => {
|
|
3310
3320
|
validateSameTemporalType(t, o);
|
|
3311
|
-
const [
|
|
3312
|
-
return
|
|
3313
|
-
})(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
3321
|
+
const [n, r] = handleDateTimeValue(e, t);
|
|
3322
|
+
return n.formatRange(r, handleDateTimeValue(e, o)[1]);
|
|
3323
|
+
})(getInternalSlotOrThrowForDateTimeFormat(this), toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
3314
3324
|
}
|
|
3315
3325
|
formatRangeToParts(e, t) {
|
|
3316
|
-
return void 0 !== e && void 0 !== t || throwTypeError(
|
|
3317
|
-
const n = getInternalSlotOrThrowForDateTimeFormat(e);
|
|
3326
|
+
return void 0 !== e && void 0 !== t || throwTypeError(Y), ((e, t, o) => {
|
|
3318
3327
|
validateSameTemporalType(t, o);
|
|
3319
|
-
const [
|
|
3320
|
-
return
|
|
3321
|
-
})(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
3328
|
+
const [n, r] = handleDateTimeValue(e, t);
|
|
3329
|
+
return n.formatRangeToParts(r, handleDateTimeValue(e, o)[1]);
|
|
3330
|
+
})(getInternalSlotOrThrowForDateTimeFormat(this), toDateTimeFormattable(e), toDateTimeFormattable(t));
|
|
3322
3331
|
}
|
|
3323
3332
|
resolvedOptions() {
|
|
3324
3333
|
return getInternalSlotOrThrowForDateTimeFormat(this).Re.resolvedOptions();
|
|
3325
3334
|
}
|
|
3326
3335
|
};
|
|
3327
|
-
const
|
|
3328
|
-
|
|
3329
|
-
for (const e of ["formatRange", "formatRangeToParts"])
|
|
3330
|
-
Object.defineProperties(DateTimeFormat,
|
|
3331
|
-
const
|
|
3332
|
-
var
|
|
3336
|
+
const jt = Object.getOwnPropertyDescriptors(Nt), Wt = Ut.prototype;
|
|
3337
|
+
jt.prototype.value = Wt;
|
|
3338
|
+
for (const e of ["formatRange", "formatRangeToParts"]) Nt.prototype[e] || delete Wt[e];
|
|
3339
|
+
Object.defineProperties(DateTimeFormat, jt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
|
|
3340
|
+
const At = /* @__PURE__ */ new WeakMap();
|
|
3341
|
+
var Lt = class {
|
|
3333
3342
|
constructor(e) {
|
|
3334
3343
|
createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
|
|
3335
3344
|
}
|
|
@@ -3364,43 +3373,41 @@ var jt = class {
|
|
|
3364
3373
|
return differenceTemporalInstant(-1, getInternalSlotOrThrowForInstant(this), e, t);
|
|
3365
3374
|
}
|
|
3366
3375
|
round(e) {
|
|
3367
|
-
const t = getInternalSlotOrThrowForInstant(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o,
|
|
3368
|
-
return validateTemporalUnitValue(i,
|
|
3376
|
+
const t = getInternalSlotOrThrowForInstant(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, de), i = getTemporalUnitValuedOption(o, "smallestUnit", B);
|
|
3377
|
+
return validateTemporalUnitValue(i, V), validateTemporalRoundingIncrement(n, a / nanosecondsForTimeUnit(i), !0), createTemporalInstant(roundTemporalInstant(t.U, n, i, r));
|
|
3369
3378
|
}
|
|
3370
3379
|
equals(e) {
|
|
3371
3380
|
return !compareEpochNanoseconds(getInternalSlotOrThrowForInstant(this).U, getInternalSlotOrThrowForInstant(toTemporalInstant$1(e)).U);
|
|
3372
3381
|
}
|
|
3373
3382
|
toString(e = void 0) {
|
|
3374
|
-
const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o,
|
|
3375
|
-
validateTemporalUnitValue(a,
|
|
3376
|
-
const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier),
|
|
3377
|
-
return temporalInstantToString(roundTemporalInstant(t.U,
|
|
3383
|
+
const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, ce), a = getTemporalUnitValuedOption(o, "smallestUnit"), i = o.timeZone;
|
|
3384
|
+
validateTemporalUnitValue(a, V), a === m && throwRangeError(invalidField("smallestUnit"));
|
|
3385
|
+
const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), s = toSecondsStringPrecisionRecord(a, n);
|
|
3386
|
+
return temporalInstantToString(roundTemporalInstant(t.U, s.Me, s.Ee, r), c, s.ve);
|
|
3378
3387
|
}
|
|
3379
3388
|
toLocaleString(e = void 0, t = void 0) {
|
|
3380
|
-
return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t,
|
|
3389
|
+
return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, x), this);
|
|
3381
3390
|
}
|
|
3382
3391
|
toJSON() {
|
|
3383
3392
|
return temporalInstantToString(getInternalSlotOrThrowForInstant(this).U);
|
|
3384
3393
|
}
|
|
3385
3394
|
valueOf() {
|
|
3386
|
-
throwTypeError(
|
|
3395
|
+
throwTypeError(j);
|
|
3387
3396
|
}
|
|
3388
3397
|
toZonedDateTimeISO(e) {
|
|
3389
3398
|
return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).U, toTemporalTimeZoneIdentifier(e), "iso8601");
|
|
3390
3399
|
}
|
|
3391
3400
|
};
|
|
3392
|
-
defineStringTag(
|
|
3393
|
-
const
|
|
3401
|
+
defineStringTag(Lt.prototype, "Temporal.Instant"), renameFunction(Lt, "Instant");
|
|
3402
|
+
const kt = class {
|
|
3394
3403
|
toTemporalInstant() {
|
|
3395
3404
|
const e = Date.prototype.valueOf.call(this);
|
|
3396
3405
|
return e != e && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
|
|
3397
3406
|
}
|
|
3398
|
-
}.prototype.toTemporalInstant,
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
let kt, zt = 0, Vt = -Infinity;
|
|
3403
|
-
const xt = {
|
|
3407
|
+
}.prototype.toTemporalInstant, zt = {}, Vt = Object.getOwnPropertyDescriptors(globalThis.Intl);
|
|
3408
|
+
Vt.DateTimeFormat.value = DateTimeFormat, Vt.DurationFormat && (Vt.DurationFormat.value = k), Object.defineProperties(zt, Vt);
|
|
3409
|
+
let xt, Ht = 0, qt = -1 / 0;
|
|
3410
|
+
const Bt = {
|
|
3404
3411
|
timeZoneId: () => systemTimeZoneIdentifier(),
|
|
3405
3412
|
instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
|
|
3406
3413
|
plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
|
|
@@ -3408,17 +3415,17 @@ const xt = {
|
|
|
3408
3415
|
plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
|
|
3409
3416
|
plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
|
|
3410
3417
|
};
|
|
3411
|
-
defineStringTag(
|
|
3412
|
-
const
|
|
3413
|
-
Instant:
|
|
3414
|
-
PlainDateTime:
|
|
3415
|
-
PlainDate:
|
|
3416
|
-
PlainTime:
|
|
3417
|
-
PlainYearMonth:
|
|
3418
|
-
PlainMonthDay:
|
|
3419
|
-
Duration:
|
|
3420
|
-
ZonedDateTime:
|
|
3421
|
-
Now:
|
|
3418
|
+
defineStringTag(Bt, "Temporal.Now"), makePropertiesNonEnumerable(Bt);
|
|
3419
|
+
const Jt = {
|
|
3420
|
+
Instant: Lt,
|
|
3421
|
+
PlainDateTime: $e,
|
|
3422
|
+
PlainDate: ht,
|
|
3423
|
+
PlainTime: Ye,
|
|
3424
|
+
PlainYearMonth: Tt,
|
|
3425
|
+
PlainMonthDay: mt,
|
|
3426
|
+
Duration: bt,
|
|
3427
|
+
ZonedDateTime: be,
|
|
3428
|
+
Now: Bt
|
|
3422
3429
|
};
|
|
3423
|
-
defineStringTag(
|
|
3424
|
-
export { defineNonEnumerableProperty as a,
|
|
3430
|
+
defineStringTag(Jt, "Temporal"), makePropertiesNonEnumerable(Jt);
|
|
3431
|
+
export { defineNonEnumerableProperty as a, kt as i, setSystemTimeZoneIdCacheTtl as n, zt as r, Jt as t };
|