temporal-polyfill-lite 0.2.2 → 0.2.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.
@@ -0,0 +1,4924 @@
1
+ function getNameFromUnit(e) {
2
+ return se[e];
3
+ }
4
+ function nanosecondsForTimeUnit(e) {
5
+ return de[e - 3];
6
+ }
7
+ function isObject(e) {
8
+ return ("object" == typeof e || "function" == typeof e) && null !== e;
9
+ }
10
+ function createNullPrototypeObject(e) {
11
+ return Object.assign(Object.create(null), e);
12
+ }
13
+ function mapUnlessUndefined(e, t) {
14
+ return void 0 === e ? void 0 : t(e);
15
+ }
16
+ function withArray(e, t) {
17
+ return e.map((e, o) => e ?? t[o]);
18
+ }
19
+ function throwRangeError(e) {
20
+ throw new RangeError(e);
21
+ }
22
+ function throwTypeError(e) {
23
+ throw new TypeError(e);
24
+ }
25
+ function toPrimitive(e) {
26
+ if (!isObject(e)) return e;
27
+ const t = e[Symbol.toPrimitive];
28
+ if (null != t) {
29
+ const o = Date.call.call(t, e, "string");
30
+ if (!isObject(o)) return o;
31
+ throwTypeError("cannot convert value to primitive");
32
+ }
33
+ return Date.prototype[Symbol.toPrimitive].call(e, "string");
34
+ }
35
+ function toString(e) {
36
+ return `${e}`;
37
+ }
38
+ function toBoolean(e) {
39
+ return !!e;
40
+ }
41
+ function toBigInt(e) {
42
+ return isObject(e) || "number" == typeof e ? BigInt.asIntN(2 ** 53 - 1, e) : BigInt(e);
43
+ }
44
+ function toIntegerIfIntegral(e) {
45
+ const t = we(e);
46
+ return (Number.isInteger(t) || throwRangeError(invalidNumber(t)), t + 0);
47
+ }
48
+ function toIntegerWithTruncation(e) {
49
+ const t = we(e);
50
+ return ((!isNaN(t) && isFinite(t)) || throwRangeError(invalidNumber(t)), Math.trunc(t) + 0);
51
+ }
52
+ function toPositiveIntegerWithTruncation(e) {
53
+ const t = toIntegerWithTruncation(e);
54
+ return (t <= 0 && throwRangeError(invalidNumber(t)), t);
55
+ }
56
+ function getOptionsObject(e = createNullPrototypeObject({})) {
57
+ return (isObject(e) || throwTypeError("invalid options object"), e);
58
+ }
59
+ function getOption(e, t, o, n) {
60
+ const r = e[t];
61
+ if (void 0 === r) return (n === T && throwRangeError(missingField(t)), n);
62
+ const a = toString(r);
63
+ return (o.includes(a) || throwRangeError(invalidField(t)), a);
64
+ }
65
+ function getRoundToOptionsObject(e = throwTypeError(ye)) {
66
+ return "string" == typeof e
67
+ ? createNullPrototypeObject({ smallestUnit: e })
68
+ : getOptionsObject(e);
69
+ }
70
+ function validateString(e) {
71
+ "string" != typeof e && throwTypeError(((e) => `${e} is not a string`)(e));
72
+ }
73
+ function divFloor(e, t) {
74
+ return Math.floor(e / t) + 0;
75
+ }
76
+ function modFloor(e, t) {
77
+ return (((e % t) + t) % t) + 0;
78
+ }
79
+ function divTrunc(e, t) {
80
+ return Math.trunc(e / t) + 0;
81
+ }
82
+ function sign(e) {
83
+ return e < 0 ? -1 : e ? 1 : 0;
84
+ }
85
+ function compare(e, t) {
86
+ return sign(e - t);
87
+ }
88
+ function clamp(e, t, o) {
89
+ return e < t ? t : e > o ? o : e;
90
+ }
91
+ function isWithin(e, t, o) {
92
+ return e >= t && e <= o;
93
+ }
94
+ function makePropertyNonEnumerable(e, t) {
95
+ Object.defineProperty(e, t, { enumerable: !1 });
96
+ }
97
+ function makePropertiesNonEnumerable(e) {
98
+ for (const t of Object.keys(e)) makePropertyNonEnumerable(e, t);
99
+ }
100
+ function defineNonEnumerableProperty(e, t, o) {
101
+ ((e[t] = o), makePropertyNonEnumerable(e, t));
102
+ }
103
+ function defineStringTag(e, t) {
104
+ Object.defineProperty(e, Symbol.toStringTag, { value: t, configurable: !0 });
105
+ }
106
+ function renameFunction(e, t) {
107
+ Object.defineProperty(e, "name", { value: t });
108
+ }
109
+ function normalizeEpochNanoseconds(e, t) {
110
+ return [e + divFloor(t, i), modFloor(t, i)];
111
+ }
112
+ function createEpochNanosecondsFromBigInt(e) {
113
+ return normalizeEpochNanoseconds(Number(e / BigInt(i)), Number(e % BigInt(i)));
114
+ }
115
+ function createEpochNanosecondsFromEpochMilliseconds(e) {
116
+ return normalizeEpochNanoseconds(divFloor(e, r), 1e6 * modFloor(e, r));
117
+ }
118
+ function createEpochNanosecondsFromEpochSeconds(e) {
119
+ return createEpochNanosecondsFromEpochMilliseconds(1e3 * e);
120
+ }
121
+ function convertEpochNanosecondsToBigInt(e) {
122
+ return BigInt(e[0]) * BigInt(i) + BigInt(e[1]);
123
+ }
124
+ function compareEpochNanoseconds(e, t) {
125
+ return compare(e[0], t[0]) || compare(e[1], t[1]);
126
+ }
127
+ function epochMilliseconds(t) {
128
+ return t[0] * r + divFloor(t[1], e);
129
+ }
130
+ function epochSeconds(e) {
131
+ return divFloor(epochMilliseconds(e), 1e3);
132
+ }
133
+ function addNanosecondsToEpochSeconds(e, t) {
134
+ return normalizeEpochNanoseconds(e[0], e[1] + t);
135
+ }
136
+ function differenceEpochNanoseconds(e, t) {
137
+ return normalize(t[0] - e[0], t[1] - e[1]);
138
+ }
139
+ function addTimeDurationToEpochNanoseconds(e, t) {
140
+ return normalizeEpochNanoseconds(e[0] + t[0], e[1] + t[1]);
141
+ }
142
+ function asciiLowerCase(e) {
143
+ return e.replace(/[A-Z]/g, (e) => e.toLowerCase());
144
+ }
145
+ function asciiUpperCase(e) {
146
+ return e.replace(/[a-z]/g, (e) => e.toUpperCase());
147
+ }
148
+ function toZeroPaddedDecimalString(e, t) {
149
+ return toString(e).padStart(t, "0");
150
+ }
151
+ function normalize(e, t) {
152
+ const [o, n] = normalizeEpochNanoseconds(e, t);
153
+ return o < 0 && n > 0 ? [o + 1, n - i] : [o, n];
154
+ }
155
+ function createTimeDurationFromSeconds(e) {
156
+ return normalize(divTrunc(e, n), (e % n) * 1e9);
157
+ }
158
+ function addTimeDuration(e, t) {
159
+ return normalize(e[0] + t[0], e[1] + t[1]);
160
+ }
161
+ function absTimeDuration(e) {
162
+ return normalize(Math.abs(e[0]), Math.abs(e[1]));
163
+ }
164
+ function negateTimeDuration(e) {
165
+ return normalize(-e[0], -e[1]);
166
+ }
167
+ function signTimeDuration(e) {
168
+ return Me(e, [0, 0]);
169
+ }
170
+ function timeDurationToSubsecondsNumber(e, t, o) {
171
+ const n = signTimeDuration(e);
172
+ return (
173
+ (e = absTimeDuration(e)),
174
+ n *
175
+ we(
176
+ `${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"}`,
177
+ ) +
178
+ 0
179
+ );
180
+ }
181
+ function roundTimeDurationByDays(e, t, o) {
182
+ return normalize(
183
+ roundNumberToIncrement(
184
+ e[0] + signTimeDuration(e) * (e[1] ? 0.2 * compare(Math.abs(e[1] / i), 0.5) + 0.5 : 0),
185
+ t,
186
+ o,
187
+ ),
188
+ 0,
189
+ );
190
+ }
191
+ function divideTimeDurationToFloatingPoint(e, t) {
192
+ return t <= 1e9
193
+ ? timeDurationToSubsecondsNumber(e, -9 + Math.log10(t), !0)
194
+ : (i / t) * e[0] + e[1] / t;
195
+ }
196
+ function interpretISODateTimeOffset(e, o, n, r, a, i, c, s) {
197
+ if (!o) return getStartOfDay(a, e);
198
+ const l = combineIsoDateAndTimeRecord(e, o);
199
+ if (n === v || (n === y && c == F)) return getEpochNanosecondsFor(a, l, i);
200
+ if (n === w || (n === y && "use" == c))
201
+ return validateEpochNanoseconds(
202
+ getUtcEpochNanoseconds(
203
+ balanceIsoDateTime(l.o.t, l.o.u, l.o.T, l.p.D, l.p.I, l.p.O, l.p.F, l.p.S, l.p.$ - r),
204
+ ),
205
+ );
206
+ ((e) => {
207
+ Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(Te);
208
+ })(e);
209
+ const d = getPossibleEpochNanoseconds(a, l);
210
+ for (const e of d) {
211
+ const o = getOffsetNanosecondsFor(a, e);
212
+ if (o === r) return e;
213
+ if (!s && roundNumberToIncrement(o, t, Z) === r) return e;
214
+ }
215
+ return (
216
+ c === S && throwRangeError("time zone offset mismatch"),
217
+ disambiguatePossibleEpochNanoseconds(d, a, l, i)
218
+ );
219
+ }
220
+ function toTemporalZonedDateTime(e, t) {
221
+ let o,
222
+ n,
223
+ r,
224
+ a,
225
+ i,
226
+ c,
227
+ s,
228
+ l = !1,
229
+ d = !0;
230
+ if (isObject(e)) {
231
+ if (isZonedDateTime(e)) {
232
+ const o = getOptionsObject(t);
233
+ return (
234
+ getTemporalDisambiguationOption(o),
235
+ getTemporalOffsetOption(o, p),
236
+ getTemporalOverflowOption(o),
237
+ getInternalSlotOrThrowForZonedDateTime(e)
238
+ );
239
+ }
240
+ i = getTemporalCalendarIdentifierWithIsoDefault(e);
241
+ const l = prepareCalendarFields(
242
+ i,
243
+ e,
244
+ [yt.t, yt.u, yt.v, yt.T, yt.D, yt.I, yt.O, yt.F, yt.S, yt.$, yt.M, yt.P],
245
+ [yt.P],
246
+ );
247
+ ((o = l.timeZone), (n = l.offset));
248
+ const d = getOptionsObject(t);
249
+ ((r = getTemporalDisambiguationOption(d)), (a = getTemporalOffsetOption(d, p)));
250
+ const m = interpretTemporalDateTimeFields(i, l, getTemporalOverflowOption(d));
251
+ ((c = m.o), (s = m.p));
252
+ } else {
253
+ validateString(e);
254
+ const m = parseIsoDateTime(e, [et]);
255
+ ((o = toTemporalTimeZoneIdentifier(m.P.R)),
256
+ (n = m.P.N),
257
+ (l = m.P.Z),
258
+ (i = canonicalizeCalendar(m.Y || "iso8601")),
259
+ (d = !1),
260
+ n && (d = hasUtcOffsetSubMinuteParts(n)));
261
+ const u = getOptionsObject(t);
262
+ ((r = getTemporalDisambiguationOption(u)),
263
+ (a = getTemporalOffsetOption(u, p)),
264
+ getTemporalOverflowOption(u),
265
+ (c = createIsoDateRecord(m.t, m.u, m.T)),
266
+ (s = m.p));
267
+ }
268
+ const m = l ? w : n ? y : v;
269
+ return createZonedDateTimeSlot(
270
+ interpretISODateTimeOffset(c, s, m, m === y ? parseDateTimeUtcOffset(n) : 0, o, r, a, d),
271
+ o,
272
+ i,
273
+ );
274
+ }
275
+ function createTemporalZonedDateTime(e, t, o, n) {
276
+ return createTemporalZonedDateTimeFromSlot(
277
+ createZonedDateTimeSlot(
278
+ e,
279
+ t,
280
+ o,
281
+ ((e, t) => Ne[e] && Ne[e].C(clampEpochSecond(t)))(t, epochSeconds(e)),
282
+ ),
283
+ n,
284
+ );
285
+ }
286
+ function createZonedDateTimeSlot(e, t, o, n) {
287
+ return { U: e, P: t, Y: o, W: n };
288
+ }
289
+ function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = K, c = P) {
290
+ const s = roundTemporalInstant(e.U, a, i, c),
291
+ l =
292
+ epochSeconds(s) === epochSeconds(e.U)
293
+ ? getOffsetNanosecondsForZonedDateTimeSlot(e)
294
+ : getOffsetNanosecondsFor(e.P, s);
295
+ return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(s, l), "iso8601", t, j)}${r === L ? "" : formatDateTimeUtcOffsetRounded(l)}${n === z ? "" : `[${n === V ? "!" : ""}${e.P}]`}${formatCalendarAnnotation(e.Y, o)}`;
296
+ }
297
+ function addZonedDateTime(e, t, o) {
298
+ if (0 === dateDurationSign(t.A)) return addInstant(e.U, t.p);
299
+ const n = getIsoDateTimeForZonedDateTimeSlot(e);
300
+ return addInstant(
301
+ getEpochNanosecondsFor(
302
+ e.P,
303
+ validateIsoDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(e.Y, n.o, t.A, o), n.p)),
304
+ g,
305
+ ),
306
+ t.p,
307
+ );
308
+ }
309
+ function differenceZonedDateTime(e, t, o) {
310
+ const n = compareEpochNanoseconds(e.U, t.U);
311
+ if (!n) return combineDateAndTimeDuration(zeroDateDuration(), createTimeDurationFromSeconds(0));
312
+ const r = getIsoDateTimeForZonedDateTimeSlot(e),
313
+ a = getIsoDateTimeForZonedDateTimeSlot(t);
314
+ if (!compareIsoDate(r.o, a.o))
315
+ return combineDateAndTimeDuration(
316
+ zeroDateDuration(),
317
+ timeDurationFromEpochNanosecondsDifference(t.U, e.U),
318
+ );
319
+ let i,
320
+ c = differenceTime(r.p, a.p);
321
+ for (
322
+ let o = Mt(c) === n ? 1 : 0;
323
+ o <= (3 - n) / 2 &&
324
+ ((i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p)),
325
+ (c = timeDurationFromEpochNanosecondsDifference(t.U, getEpochNanosecondsFor(e.P, i, g))),
326
+ Mt(c) === n);
327
+ o++
328
+ );
329
+ return combineDateAndTimeDuration(
330
+ calendarDateUntil(e.Y, r.o, i.o, largerOfTwoTemporalUnits(o, B)),
331
+ c,
332
+ );
333
+ }
334
+ function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
335
+ if (!isDateUnit(o)) return differenceInstant(e.U, t.U, n, r, a);
336
+ const i = differenceZonedDateTime(e, t, o);
337
+ return r === K && 1 === n
338
+ ? i
339
+ : roundRelativeDuration(
340
+ i,
341
+ e.U,
342
+ t.U,
343
+ getIsoDateTimeForZonedDateTimeSlot(e),
344
+ e.P,
345
+ e.Y,
346
+ o,
347
+ n,
348
+ r,
349
+ a,
350
+ );
351
+ }
352
+ function differenceTemporalZonedDateTime(e, t, o, n) {
353
+ const r = toTemporalZonedDateTime(o);
354
+ calendarEquals(t.Y, r.Y) || throwRangeError(pe);
355
+ const a = getDifferenceSettings(e, getOptionsObject(n), d, [], K, J);
356
+ return isDateUnit(a.L)
357
+ ? (timeZoneEquals(t.P, r.P) || throwRangeError("time zone mismatch"),
358
+ compareEpochNanoseconds(t.U, r.U)
359
+ ? createTemporalDuration(
360
+ applySignToDurationSlot(
361
+ temporalDurationFromInternal(
362
+ differenceZonedDateTimeWithRounding(t, r, a.L, a.V, a.H, a.q),
363
+ J,
364
+ ),
365
+ e,
366
+ ),
367
+ )
368
+ : createTemporalDuration(createTemporalDurationSlot([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])))
369
+ : createTemporalDuration(
370
+ applySignToDurationSlot(
371
+ temporalDurationFromInternal(differenceInstant(t.U, r.U, a.V, a.H, a.q), a.L),
372
+ e,
373
+ ),
374
+ );
375
+ }
376
+ function addDurationToZonedDateTime(e, t, o, n) {
377
+ return createTemporalZonedDateTime(
378
+ addZonedDateTime(
379
+ t,
380
+ toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)),
381
+ getTemporalOverflowOption(getOptionsObject(n)),
382
+ ),
383
+ t.P,
384
+ t.Y,
385
+ );
386
+ }
387
+ function getOffsetNanosecondsForZonedDateTimeSlot(e) {
388
+ return (e.W ??= getOffsetNanosecondsFor(e.P, e.U));
389
+ }
390
+ function getIsoDateTimeForZonedDateTimeSlot(e) {
391
+ return getIsoDateTimeFromOffsetNanoseconds(e.U, getOffsetNanosecondsForZonedDateTimeSlot(e));
392
+ }
393
+ function createTemporalZonedDateTimeFromSlot(e, t = Object.create(Pe.prototype)) {
394
+ return (be.set(t, e), t);
395
+ }
396
+ function calendarIsoToDateForZonedDateTimeSlot(e) {
397
+ return calendarIsoToDate(e.Y, getIsoDateTimeForZonedDateTimeSlot(e).o);
398
+ }
399
+ function getInternalSlotForZonedDateTime(e) {
400
+ return be.get(e);
401
+ }
402
+ function getInternalSlotOrThrowForZonedDateTime(e) {
403
+ const t = getInternalSlotForZonedDateTime(e);
404
+ return (t || throwTypeError(ge), t);
405
+ }
406
+ function isZonedDateTime(e) {
407
+ return !!getInternalSlotForZonedDateTime(e);
408
+ }
409
+ function createLruCache(e) {
410
+ const t = new Map();
411
+ return {
412
+ C(e) {
413
+ if (t.has(e)) {
414
+ const o = t.get(e);
415
+ return (t.delete(e), t.set(e, o), o);
416
+ }
417
+ },
418
+ B(o, n) {
419
+ (t.size >= e && t.delete(t.keys().next().value), t.set(o, n));
420
+ },
421
+ };
422
+ }
423
+ function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, c = 0) {
424
+ return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, c);
425
+ }
426
+ function clampEpochSecond(e) {
427
+ return clamp(e, -1e10, 1 / 0);
428
+ }
429
+ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
430
+ if ("UTC" === t) return 0;
431
+ const r = clampEpochSecond(o),
432
+ a = (Ne[t] ||= createLruCache(5e3)),
433
+ i = a.C(r);
434
+ if (void 0 !== i) return i;
435
+ const c = getFormatterForTimeZone(t).formatToParts(1e3 * r),
436
+ s =
437
+ (utcEpochMilliseconds(
438
+ ...["year", "month", "day", "hour", "minute", "second"].map((e) =>
439
+ toIntegerIfIntegral(c.find((t) => t.type === e).value),
440
+ ),
441
+ ) -
442
+ 1e3 * r) *
443
+ e;
444
+ return (n || a.B(r, s), s);
445
+ }
446
+ function getFormatterForTimeZone(e) {
447
+ return (Re[e] ||= new Nt("en-u-hc-h23", {
448
+ timeZone: e,
449
+ year: "numeric",
450
+ month: "numeric",
451
+ day: "numeric",
452
+ hour: "numeric",
453
+ minute: "numeric",
454
+ second: "numeric",
455
+ }));
456
+ }
457
+ function bisectOffsetTransition(e, t, o) {
458
+ const n = getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, t);
459
+ let r = t,
460
+ a = o;
461
+ for (; a - r > 1; ) {
462
+ const t = Math.floor((a + r) / 2);
463
+ getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, t, a - r > 3) === n ? (r = t) : (a = t);
464
+ }
465
+ return a;
466
+ }
467
+ function adjustWindowForEpoch(e) {
468
+ return e < -85e7 ? 1814400 : e > -77e7 && e < 96e7 ? 1382400 : 561600;
469
+ }
470
+ function searchTimeZoneTransition(e, t, o, n) {
471
+ o = clamp(o, -864e10, 864e10);
472
+ for (
473
+ let r = 172800 * n, a = t, i = t + r;
474
+ (o - i) * n > 0;
475
+ r = adjustWindowForEpoch(a) * n, a = i, i = clamp(i + r, -864e10, 864e10)
476
+ )
477
+ if (
478
+ getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, a, !0) !==
479
+ getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, i, !0)
480
+ )
481
+ return createEpochNanosecondsFromEpochSeconds(
482
+ n > 0 ? bisectOffsetTransition(e, a, i) : bisectOffsetTransition(e, i, a),
483
+ );
484
+ return null;
485
+ }
486
+ function getAvailableNamedTimeZoneIdentifier(e) {
487
+ return (
488
+ ((e) => {
489
+ /^(?![cemw]et|[emh]st|prc|ro[ck]|uct|utc|gmt)[a-z]{3}$|systemv|^us.*w$/i.test(e) &&
490
+ throwRangeError(invalidTimeZone(e));
491
+ })(
492
+ (e = asciiLowerCase(e).replace(/[^/]+/g, (e) =>
493
+ /^(?!etc|yap).{1,3}$|\d/.test(e)
494
+ ? asciiUpperCase(e)
495
+ : e.replace(/baja|mc|comod|[a-z]+/g, (e) => {
496
+ return /^(su|gb|nz|in|chat)$/.test(e)
497
+ ? asciiUpperCase(e)
498
+ : /^(of|au|es)$/.test(e)
499
+ ? e
500
+ : ((t = e), t.replace(/^[a-z]/, (e) => e.toUpperCase())).replace(
501
+ /du(?=r)|n(?=or)|i(?=slan)/,
502
+ asciiUpperCase,
503
+ );
504
+ var t;
505
+ }),
506
+ )),
507
+ ),
508
+ getFormatterForTimeZone(e),
509
+ e
510
+ );
511
+ }
512
+ function formatOffsetTimeZoneIdentifier(e) {
513
+ return formatUtcOffsetNanoseconds(e * t);
514
+ }
515
+ function formatUtcOffsetNanoseconds(e) {
516
+ const n = Math.abs(e);
517
+ return `${e < 0 ? "-" : "+"}${formatTimeString(divFloor(n, o), modFloor(divFloor(n, t), 60), modFloor(divFloor(n, 1e9), 60), 0, n % t ? void 0 : D)}`;
518
+ }
519
+ function formatDateTimeUtcOffsetRounded(e) {
520
+ return formatOffsetTimeZoneIdentifier(roundNumberToIncrement(e, t, Z) / t);
521
+ }
522
+ function toTemporalTimeZoneIdentifier(e) {
523
+ if (isZonedDateTime(e)) return getInternalSlotOrThrowForZonedDateTime(e).P;
524
+ validateString(e);
525
+ const t = ((e) => {
526
+ if (isTimeZoneIdentifier(e)) return parseTimeZoneIdentifier(e);
527
+ const t = parseIsoDateTime(e, [et, tt, ot, nt, rt, at]).P,
528
+ o = t.R || (t.Z && "UTC") || t.N;
529
+ return (o || throwRangeError(invalidTimeZone(e)), parseTimeZoneIdentifier(o));
530
+ })(e);
531
+ return t.J ? getAvailableNamedTimeZoneIdentifier(t.J) : formatOffsetTimeZoneIdentifier(t.G);
532
+ }
533
+ function getOffsetNanosecondsFor(e, t) {
534
+ return isOffsetTimeZoneIdentifier(e)
535
+ ? parseDateTimeUtcOffset(e)
536
+ : getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, epochSeconds(t));
537
+ }
538
+ function getEpochNanosecondsFor(e, t, o) {
539
+ return disambiguatePossibleEpochNanoseconds(getPossibleEpochNanoseconds(e, t), e, t, o);
540
+ }
541
+ function disambiguatePossibleEpochNanoseconds(e, t, o, n) {
542
+ return 1 === e.length
543
+ ? e[0]
544
+ : (n === I && throwRangeError("ambiguity / gaps in local time"),
545
+ getNamedTimeZoneEpochCandidates(t, o).map(validateEpochNanoseconds)[
546
+ n === g ? +!e[0] : +(n === f)
547
+ ]);
548
+ }
549
+ function getPossibleEpochNanoseconds(e, t) {
550
+ return isOffsetTimeZoneIdentifier(e)
551
+ ? [
552
+ validateEpochNanoseconds(
553
+ getUtcEpochNanoseconds(
554
+ balanceIsoDateTime(
555
+ t.o.t,
556
+ t.o.u,
557
+ t.o.T,
558
+ t.p.D,
559
+ t.p.I,
560
+ t.p.O,
561
+ t.p.F,
562
+ t.p.S,
563
+ t.p.$ - parseDateTimeUtcOffset(e),
564
+ ),
565
+ ),
566
+ ),
567
+ ]
568
+ : ((e, t) =>
569
+ getNamedTimeZoneEpochCandidates(e, t).filter(
570
+ (o) =>
571
+ !compareEpochNanoseconds(
572
+ addNanosecondsToEpochSeconds(o, getOffsetNanosecondsFor(e, o)),
573
+ getUtcEpochNanoseconds(t),
574
+ ),
575
+ ))(e, t).map(validateEpochNanoseconds);
576
+ }
577
+ function getStartOfDay(e, t) {
578
+ const o = combineIsoDateAndTimeRecord(t, midnightTimeRecord());
579
+ return (
580
+ getPossibleEpochNanoseconds(e, o)[0] ||
581
+ createEpochNanosecondsFromEpochSeconds(
582
+ bisectOffsetTransition(e, ...getNamedTimeZoneEpochCandidates(e, o).map(epochSeconds)),
583
+ )
584
+ );
585
+ }
586
+ function timeZoneEquals(e, t) {
587
+ return (
588
+ e === t ||
589
+ (!isOffsetTimeZoneIdentifier(e) &&
590
+ !isOffsetTimeZoneIdentifier(t) &&
591
+ getFormatterForTimeZone(e).resolvedOptions().timeZone ===
592
+ getFormatterForTimeZone(t).resolvedOptions().timeZone)
593
+ );
594
+ }
595
+ function parseTimeZoneIdentifier(e) {
596
+ return (
597
+ isTimeZoneIdentifier(e) || throwRangeError(invalidTimeZone(e)),
598
+ createNullPrototypeObject(
599
+ isOffsetTimeZoneIdentifier(e) ? { G: parseDateTimeUtcOffset(e) / t } : { J: e },
600
+ )
601
+ );
602
+ }
603
+ function isOffsetTimeZoneIdentifier(e) {
604
+ return /^[+-]/.test(e);
605
+ }
606
+ function getNamedTimeZoneEpochCandidates(e, t) {
607
+ const o = getUtcEpochNanoseconds(t);
608
+ if ("UTC" === e) return [o];
609
+ const n = getOffsetNanosecondsFor(
610
+ e,
611
+ clampEpochNanoseconds(addNanosecondsToEpochSeconds(o, -864e11)),
612
+ ),
613
+ r = getOffsetNanosecondsFor(e, clampEpochNanoseconds(addNanosecondsToEpochSeconds(o, 864e11))),
614
+ a = addNanosecondsToEpochSeconds(o, -n),
615
+ i = addNanosecondsToEpochSeconds(o, -r);
616
+ return n === r ? [a] : [a, i].sort(compareEpochNanoseconds);
617
+ }
618
+ function getIsoDateTimeFromOffsetNanoseconds(e, t) {
619
+ return ((e) => {
620
+ const t = e;
621
+ return combineIsoDateAndTimeRecord(epochDaysToIsoDate(t[0]), balanceTime(0, 0, 0, 0, 0, t[1]));
622
+ })(addNanosecondsToEpochSeconds(e, t));
623
+ }
624
+ function combineIsoDateAndTimeRecord(e, t) {
625
+ return { o: e, p: t };
626
+ }
627
+ function interpretTemporalDateTimeFields(e, t, o) {
628
+ return combineIsoDateAndTimeRecord(
629
+ calendarDateFromFields(e, t, o),
630
+ regulateTime(t[yt.D], t[yt.I], t[yt.O], t[yt.F], t[yt.S], t[yt.$], o),
631
+ );
632
+ }
633
+ function toTemporalDateTime(e, t) {
634
+ if (isObject(e)) {
635
+ if (isPlainDateTime(e)) {
636
+ getTemporalOverflowOption(getOptionsObject(t));
637
+ const o = getInternalSlotOrThrowForPlainDateTime(e);
638
+ return createTemporalDateTime(o._, o.Y);
639
+ }
640
+ if (isZonedDateTime(e)) {
641
+ const o = getInternalSlotOrThrowForZonedDateTime(e);
642
+ return (
643
+ getTemporalOverflowOption(getOptionsObject(t)),
644
+ createTemporalDateTime(getIsoDateTimeForZonedDateTimeSlot(o), o.Y)
645
+ );
646
+ }
647
+ if (isPlainDate(e)) {
648
+ getTemporalOverflowOption(getOptionsObject(t));
649
+ const o = getInternalSlotOrThrowForPlainDate(e);
650
+ return createTemporalDateTime(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord()), o.Y);
651
+ }
652
+ const o = getTemporalCalendarIdentifierWithIsoDefault(e);
653
+ return createTemporalDateTime(
654
+ interpretTemporalDateTimeFields(
655
+ o,
656
+ prepareCalendarFields(
657
+ o,
658
+ e,
659
+ [yt.t, yt.u, yt.v, yt.T, yt.D, yt.I, yt.O, yt.F, yt.S, yt.$],
660
+ [],
661
+ ),
662
+ getTemporalOverflowOption(getOptionsObject(t)),
663
+ ),
664
+ o,
665
+ );
666
+ }
667
+ validateString(e);
668
+ const o = parseIsoDateTime(e, [tt]),
669
+ n = canonicalizeCalendar(o.Y || "iso8601");
670
+ return (
671
+ getTemporalOverflowOption(getOptionsObject(t)),
672
+ createTemporalDateTime(
673
+ combineIsoDateAndTimeRecord(createIsoDateRecord(o.t, o.u, o.T), o.p || midnightTimeRecord()),
674
+ n,
675
+ )
676
+ );
677
+ }
678
+ function balanceIsoDateTime(e, t, o, n, r, a, i, c, s) {
679
+ const l = balanceTime(n, r, a, i, c, s);
680
+ return combineIsoDateAndTimeRecord(addDaysToIsoDate(createIsoDateRecord(e, t, o), l.K), l);
681
+ }
682
+ function createTemporalDateTime(e, t, o = Object.create($e.prototype)) {
683
+ return (Ze.set(o, { _: validateIsoDateTime(e), Y: t }), o);
684
+ }
685
+ function isoDateTimeToString(e, t, o, n) {
686
+ return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}T${formatTimeString(e.p.D, e.p.I, e.p.O, 1e6 * e.p.F + 1e3 * e.p.S + e.p.$, o)}${formatCalendarAnnotation(t, n)}`;
687
+ }
688
+ function compareIsoDateTime(e, t) {
689
+ return compareIsoDate(e.o, t.o) || compareTimeRecord(e.p, t.p);
690
+ }
691
+ function roundIsoDateTime(e, t, o, n) {
692
+ const r = roundTime(e.p, t, o, n);
693
+ return combineIsoDateAndTimeRecord(addDaysToIsoDate(e.o, r.K), r);
694
+ }
695
+ function differenceISODateTime(e, t, o, n) {
696
+ let r = differenceTime(e.p, t.p);
697
+ const a = Mt(r);
698
+ let i = t.o;
699
+ a === compareIsoDate(e.o, t.o) &&
700
+ ((i = addDaysToIsoDate(i, a)), (r = add24HourDaysToTimeDuration(r, -a)));
701
+ const c = largerOfTwoTemporalUnits(B, n),
702
+ s = calendarDateUntil(o, e.o, i, c);
703
+ return (
704
+ n !== c && ((r = add24HourDaysToTimeDuration(r, s.K)), (s.K = 0)),
705
+ combineDateAndTimeDuration(s, r)
706
+ );
707
+ }
708
+ function differencePlainDateTimeWithRounding(e, t, o, n, r, a, i) {
709
+ if (!compareIsoDateTime(e, t))
710
+ return combineDateAndTimeDuration(zeroDateDuration(), createTimeDurationFromSeconds(0));
711
+ (validateIsoDateTime(e), validateIsoDateTime(t));
712
+ const c = differenceISODateTime(e, t, o, n);
713
+ return a === K && 1 === r
714
+ ? c
715
+ : roundRelativeDuration(
716
+ c,
717
+ getUtcEpochNanoseconds(e),
718
+ getUtcEpochNanoseconds(t),
719
+ e,
720
+ void 0,
721
+ o,
722
+ n,
723
+ r,
724
+ a,
725
+ i,
726
+ );
727
+ }
728
+ function differenceTemporalPlainDateTime(e, t, o, n) {
729
+ const r = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(o));
730
+ calendarEquals(t.Y, r.Y) || throwRangeError(pe);
731
+ const a = getDifferenceSettings(e, getOptionsObject(n), d, [], K, B);
732
+ return compareIsoDateTime(t._, r._)
733
+ ? createTemporalDuration(
734
+ applySignToDurationSlot(
735
+ temporalDurationFromInternal(
736
+ differencePlainDateTimeWithRounding(t._, r._, t.Y, a.L, a.V, a.H, a.q),
737
+ a.L,
738
+ ),
739
+ e,
740
+ ),
741
+ )
742
+ : createTemporalDuration(createTemporalDurationSlot([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
743
+ }
744
+ function addDurationToDateTime(e, t, o, n) {
745
+ const r = applySignToDurationSlot(toTemporalDuration(o), e),
746
+ a = getTemporalOverflowOption(getOptionsObject(n)),
747
+ i = toInternalDurationRecordWith24HourDays(r),
748
+ c = addTime(t._.p, i.p);
749
+ return createTemporalDateTime(
750
+ combineIsoDateAndTimeRecord(
751
+ calendarDateAdd(t.Y, t._.o, adjustDateDurationRecord(i.A, c.K), a),
752
+ c,
753
+ ),
754
+ t.Y,
755
+ );
756
+ }
757
+ function validateIsoDateTime(e) {
758
+ return (
759
+ ((e) => {
760
+ const t = isoDateRecordToEpochDays(e.o);
761
+ return (
762
+ Math.abs(t) <= 1e8 || (-100000001 === t && !!compareTimeRecord(e.p, midnightTimeRecord()))
763
+ );
764
+ })(e) || throwRangeError(Te),
765
+ e
766
+ );
767
+ }
768
+ function getInternalSlotForPlainDateTime(e) {
769
+ return Ze.get(e);
770
+ }
771
+ function getInternalSlotOrThrowForPlainDateTime(e) {
772
+ const t = getInternalSlotForPlainDateTime(e);
773
+ return (t || throwTypeError(ge), t);
774
+ }
775
+ function isPlainDateTime(e) {
776
+ return !!getInternalSlotForPlainDateTime(e);
777
+ }
778
+ function createTimeRecord(e, t, o, n, r, a, i = 0) {
779
+ return { D: e, I: t, O: o, F: n, S: r, $: a, K: i };
780
+ }
781
+ function midnightTimeRecord() {
782
+ return createTimeRecord(0, 0, 0, 0, 0, 0);
783
+ }
784
+ function differenceTime(e, t) {
785
+ return timeDurationFromComponents(
786
+ t.D - e.D,
787
+ t.I - e.I,
788
+ t.O - e.O,
789
+ t.F - e.F,
790
+ t.S - e.S,
791
+ t.$ - e.$,
792
+ );
793
+ }
794
+ function toTemporalTime(e, t) {
795
+ if (isObject(e))
796
+ return isPlainTime(e)
797
+ ? (getTemporalOverflowOption(getOptionsObject(t)), getInternalSlotOrThrowForPlainTime(e))
798
+ : isPlainDateTime(e)
799
+ ? (getTemporalOverflowOption(getOptionsObject(t)),
800
+ getInternalSlotOrThrowForPlainDateTime(e)._.p)
801
+ : isZonedDateTime(e)
802
+ ? (getTemporalOverflowOption(getOptionsObject(t)),
803
+ getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(e)).p)
804
+ : regulateTime(
805
+ ...toTemporalTimeRecord(e),
806
+ getTemporalOverflowOption(getOptionsObject(t)),
807
+ );
808
+ validateString(e);
809
+ const o = parseIsoDateTime(e, [nt]);
810
+ return (getTemporalOverflowOption(getOptionsObject(t)), o.p);
811
+ }
812
+ function toTimeRecordOrMidnight(e) {
813
+ return void 0 === e ? midnightTimeRecord() : toTemporalTime(e);
814
+ }
815
+ function regulateTime(e, t, o, n, r, a, i) {
816
+ return i === h
817
+ ? createTimeRecord(
818
+ clamp(e, 0, 23),
819
+ clamp(t, 0, 59),
820
+ clamp(o, 0, 59),
821
+ clamp(n, 0, 999),
822
+ clamp(r, 0, 999),
823
+ clamp(a, 0, 999),
824
+ )
825
+ : (isValidTime(e, t, o, n, r, a) || throwRangeError(ue), createTimeRecord(e, t, o, n, r, a));
826
+ }
827
+ function isValidTime(e, t, o, n, r, a) {
828
+ return (
829
+ isWithin(e, 0, 23) &&
830
+ isWithin(t, 0, 59) &&
831
+ isWithin(o, 0, 59) &&
832
+ isWithin(n, 0, 999) &&
833
+ isWithin(r, 0, 999) &&
834
+ isWithin(a, 0, 999)
835
+ );
836
+ }
837
+ function balanceTime(e, t, o, n, r, a) {
838
+ return (
839
+ (r += divFloor(a, 1e3)),
840
+ (n += divFloor(r, 1e3)),
841
+ (o += divFloor(n, 1e3)),
842
+ (t += divFloor(o, 60)),
843
+ {
844
+ D: modFloor((e += divFloor(t, 60)), 24),
845
+ I: modFloor(t, 60),
846
+ O: modFloor(o, 60),
847
+ F: modFloor(n, 1e3),
848
+ S: modFloor(r, 1e3),
849
+ $: modFloor(a, 1e3),
850
+ K: divFloor(e, 24),
851
+ }
852
+ );
853
+ }
854
+ function createTemporalTime(e, t = Object.create(Ce.prototype)) {
855
+ return (Ye.set(t, e), t);
856
+ }
857
+ function toTemporalTimeRecord(e, t = !1) {
858
+ let o = !1;
859
+ const n = [yt.D, yt.S, yt.F, yt.I, yt.$, yt.O].map((n) => {
860
+ const r = e[n];
861
+ return void 0 !== r ? ((o = !0), toIntegerWithTruncation(r)) : t ? void 0 : 0;
862
+ });
863
+ return (o || throwTypeError(Fe), [0, 3, 5, 2, 1, 4].map((e) => n[e]));
864
+ }
865
+ function timeRecordToString(e, t) {
866
+ return formatTimeString(e.D, e.I, e.O, 1e6 * e.F + 1e3 * e.S + e.$, t);
867
+ }
868
+ function compareTimeRecord(e, t) {
869
+ return (
870
+ compare(e.D, t.D) ||
871
+ compare(e.I, t.I) ||
872
+ compare(e.O, t.O) ||
873
+ compare(e.F, t.F) ||
874
+ compare(e.S, t.S) ||
875
+ compare(e.$, t.$)
876
+ );
877
+ }
878
+ function addTime(e, t) {
879
+ const o = t,
880
+ n = balanceTime(e.D, e.I, e.O, e.F, e.S, e.$ + o[1]);
881
+ return ((n.K += o[0]), n);
882
+ }
883
+ function roundTime(e, n, r, a) {
884
+ const i = nanosecondsForTimeUnit(clamp(r - 1, 3, 8)),
885
+ c = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.F + 1e3 * e.S + e.$;
886
+ return balanceTime(
887
+ 0,
888
+ 0,
889
+ 0,
890
+ 0,
891
+ 0,
892
+ divFloor(c, i) * i + roundNumberToIncrement(modFloor(c, i), n * nanosecondsForTimeUnit(r), a),
893
+ );
894
+ }
895
+ function differenceTemporalPlainTime(e, t, o, n) {
896
+ const r = toTemporalTime(o),
897
+ a = getDifferenceSettings(e, getOptionsObject(n), l, [], K, J);
898
+ return createTemporalDuration(
899
+ applySignToDurationSlot(
900
+ temporalDurationFromInternal(
901
+ combineDateAndTimeDuration(
902
+ zeroDateDuration(),
903
+ roundTimeDuration(differenceTime(t, r), a.V, a.H, a.q),
904
+ ),
905
+ a.L,
906
+ ),
907
+ e,
908
+ ),
909
+ );
910
+ }
911
+ function addDurationToTime(e, t, o) {
912
+ return createTemporalTime(
913
+ addTime(t, toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)).p),
914
+ );
915
+ }
916
+ function getInternalSlotOrThrowForPlainTime(e) {
917
+ const t = Ye.get(e);
918
+ return (t || throwTypeError(ge), t);
919
+ }
920
+ function isPlainTime(e) {
921
+ return Ye.has(e);
922
+ }
923
+ function optionalChain(e) {
924
+ return e.reduceRight((e, t) => `${t}(?:${e})?`);
925
+ }
926
+ function join(e, t) {
927
+ return `${e}(?:${t}${e})*`;
928
+ }
929
+ function createRegExp(e) {
930
+ return RegExp(`^(?:${e})$`);
931
+ }
932
+ function isAmbiguousTemporalTimeString(e) {
933
+ return it.some((t) => {
934
+ const o = e.match(t);
935
+ return o && isSemanticallyValid(o.groups);
936
+ });
937
+ }
938
+ function isTimeZoneIdentifier(e) {
939
+ return ct.test(e);
940
+ }
941
+ function parseAnnotationsAndGetCalendar(e) {
942
+ let t,
943
+ o = !1;
944
+ for (const n of e.matchAll(Qe)) {
945
+ const e = !!n[1];
946
+ "u-ca" === n[2]
947
+ ? t
948
+ ? (e || o) && throwRangeError(me)
949
+ : ((t = n[3]), e && (o = !0))
950
+ : e && throwRangeError(me);
951
+ }
952
+ return t;
953
+ }
954
+ function getTimeRecordFromMatchedGroups(e) {
955
+ const t = (e.g || "").padEnd(9, "0");
956
+ return createTimeRecord(
957
+ we(e.d || 0),
958
+ we(e.e || 0),
959
+ clamp(we(e.f || 0), 0, 59),
960
+ we(t.slice(0, 3)),
961
+ we(t.slice(3, 6)),
962
+ we(t.slice(6)),
963
+ );
964
+ }
965
+ function isSemanticallyValid(e) {
966
+ return (
967
+ "-000000" !== (e.a || e.l) &&
968
+ (!e.a || isValidIsoDate(we(e.a), we(e.b), we(e.c))) &&
969
+ (!e.n || isValidIsoDate(1972, we(e.m), we(e.n)))
970
+ );
971
+ }
972
+ function parseIsoDateTime(e, t) {
973
+ for (const o of t) {
974
+ const t = e.match(o);
975
+ if (!t || !isSemanticallyValid(t.groups) || (o === nt && isAmbiguousTemporalTimeString(e)))
976
+ continue;
977
+ const n = t.groups,
978
+ r = parseAnnotationsAndGetCalendar(n.k || "");
979
+ return (
980
+ n.m && r && "iso8601" !== asciiLowerCase(r) && throwRangeError(me),
981
+ {
982
+ t: mapUnlessUndefined(n.a || n.l, we),
983
+ u: we(n.b || n.m || 1),
984
+ T: we(n.c || n.n || 1),
985
+ p: n.d ? getTimeRecordFromMatchedGroups(n) : void 0,
986
+ P: { Z: !!n.i, N: n.h, R: n.j },
987
+ Y: r,
988
+ }
989
+ );
990
+ }
991
+ throwRangeError(me);
992
+ }
993
+ function parseDateTimeUtcOffset(e) {
994
+ const o = e.match(lt);
995
+ return (
996
+ o || throwRangeError(me),
997
+ we(`${o[1]}1`) *
998
+ (36e11 * we(o[2]) +
999
+ we(o[4] || "") * t +
1000
+ 1e9 * we(o[5] || "") +
1001
+ we((o[6] || "").padEnd(9, "0")) +
1002
+ 0)
1003
+ );
1004
+ }
1005
+ function hasUtcOffsetSubMinuteParts(e) {
1006
+ return !!e.match(lt)[5];
1007
+ }
1008
+ function toTemporalMonthDay(e, t) {
1009
+ if (isObject(e)) {
1010
+ const o = getInternalSlotForPlainMonthDay(e);
1011
+ if (o)
1012
+ return (getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay(o.o, o.Y));
1013
+ const n = getTemporalCalendarIdentifierWithIsoDefault(e);
1014
+ return createTemporalMonthDay(
1015
+ calendarMonthDayFromFields(
1016
+ n,
1017
+ prepareCalendarFields(n, e, [yt.t, yt.u, yt.v, yt.T], []),
1018
+ getTemporalOverflowOption(getOptionsObject(t)),
1019
+ ),
1020
+ n,
1021
+ );
1022
+ }
1023
+ validateString(e);
1024
+ const o = parseIsoDateTime(e, [rt]),
1025
+ n = canonicalizeCalendar(o.Y || "iso8601");
1026
+ return (
1027
+ getTemporalOverflowOption(getOptionsObject(t)),
1028
+ createTemporalMonthDay(
1029
+ "iso8601" === n
1030
+ ? createIsoDateRecord(1972, o.u, o.T)
1031
+ : calendarMonthDayFromFields(
1032
+ n,
1033
+ isoDateToFields(n, validateIsoDate(createIsoDateRecord(o.t, o.u, o.T)), u),
1034
+ h,
1035
+ ),
1036
+ n,
1037
+ )
1038
+ );
1039
+ }
1040
+ function createTemporalMonthDay(e, t, o = Object.create(mt.prototype)) {
1041
+ return (dt.set(o, { o: validateIsoDate(e), Y: t }), o);
1042
+ }
1043
+ function temporalMonthDayToString(e, t) {
1044
+ return `${t === U || t === W || "iso8601" !== e.Y ? `${padIsoYear(e.o.t)}-` : ""}${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.Y, t)}`;
1045
+ }
1046
+ function getInternalSlotForPlainMonthDay(e) {
1047
+ return dt.get(e);
1048
+ }
1049
+ function getInternalSlotOrThrowForPlainMonthDay(e) {
1050
+ const t = getInternalSlotForPlainMonthDay(e);
1051
+ return (t || throwTypeError(ge), t);
1052
+ }
1053
+ function isPlainMonthDay(e) {
1054
+ return !!getInternalSlotForPlainMonthDay(e);
1055
+ }
1056
+ function toTemporalYearMonth(e, t) {
1057
+ if (isObject(e)) {
1058
+ const o = getInternalSlotForPlainYearMonth(e);
1059
+ if (o)
1060
+ return (getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(o.o, o.Y));
1061
+ const n = getTemporalCalendarIdentifierWithIsoDefault(e);
1062
+ return createTemporalYearMonth(
1063
+ calendarYearMonthFromFields(
1064
+ n,
1065
+ prepareCalendarFields(n, e, [yt.t, yt.u, yt.v], []),
1066
+ getTemporalOverflowOption(getOptionsObject(t)),
1067
+ ),
1068
+ n,
1069
+ );
1070
+ }
1071
+ validateString(e);
1072
+ const o = parseIsoDateTime(e, [at]),
1073
+ n = canonicalizeCalendar(o.Y || "iso8601");
1074
+ return (
1075
+ getTemporalOverflowOption(getOptionsObject(t)),
1076
+ createTemporalYearMonth(
1077
+ calendarYearMonthFromFields(
1078
+ n,
1079
+ isoDateToFields(n, validateIsoYearMonth(createIsoDateRecord(o.t, o.u, o.T)), m),
1080
+ h,
1081
+ ),
1082
+ n,
1083
+ )
1084
+ );
1085
+ }
1086
+ function balanceIsoYearMonth(e, t) {
1087
+ return { t: e + divFloor(t - 1, 12), u: modFloor(t - 1, 12) + 1 };
1088
+ }
1089
+ function createTemporalYearMonth(e, t, o = Object.create(Tt.prototype)) {
1090
+ return (ut.set(o, { o: validateIsoYearMonth(e), Y: t }), o);
1091
+ }
1092
+ function temporalYearMonthToString(e, t) {
1093
+ return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}${t === U || t === W || "iso8601" !== e.Y ? `-${toZeroPaddedDecimalString(e.o.T, 2)}` : ""}${formatCalendarAnnotation(e.Y, t)}`;
1094
+ }
1095
+ function differenceTemporalPlainYearMonth(e, t, o, n) {
1096
+ const r = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(o));
1097
+ calendarEquals(t.Y, r.Y) || throwRangeError(pe);
1098
+ const a = getDifferenceSettings(e, getOptionsObject(n), s, [q, B], H, x);
1099
+ if (!compareIsoDate(t.o, r.o))
1100
+ return createTemporalDuration(createTemporalDurationSlot([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
1101
+ const i = calendarDateFromFields(
1102
+ t.Y,
1103
+ createNullPrototypeObject({ ...isoDateToFields(t.Y, t.o, m), [yt.T]: 1 }),
1104
+ h,
1105
+ ),
1106
+ c = calendarDateFromFields(
1107
+ t.Y,
1108
+ createNullPrototypeObject({ ...isoDateToFields(t.Y, r.o, m), [yt.T]: 1 }),
1109
+ h,
1110
+ );
1111
+ let l = combineDateAndTimeDuration(
1112
+ adjustDateDurationRecord(calendarDateUntil(t.Y, i, c, a.L), 0, 0),
1113
+ createTimeDurationFromSeconds(0),
1114
+ );
1115
+ if (a.H !== H || 1 !== a.V) {
1116
+ const e = combineIsoDateAndTimeRecord(i, midnightTimeRecord());
1117
+ l = roundRelativeDuration(
1118
+ l,
1119
+ getUtcEpochNanoseconds(e),
1120
+ getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(c, midnightTimeRecord())),
1121
+ e,
1122
+ void 0,
1123
+ t.Y,
1124
+ a.L,
1125
+ a.V,
1126
+ a.H,
1127
+ a.q,
1128
+ );
1129
+ }
1130
+ return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(l, B), e));
1131
+ }
1132
+ function addDurationToYearMonth(e, t, o, n) {
1133
+ const r = toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)),
1134
+ a = getTemporalOverflowOption(getOptionsObject(n));
1135
+ return (
1136
+ (r.A.X || r.A.K || signTimeDuration(r.p)) &&
1137
+ throwRangeError("duration can contain only years and months"),
1138
+ createTemporalYearMonth(
1139
+ calendarYearMonthFromFields(
1140
+ t.Y,
1141
+ isoDateToFields(
1142
+ t.Y,
1143
+ calendarDateAdd(
1144
+ t.Y,
1145
+ calendarDateFromFields(
1146
+ t.Y,
1147
+ createNullPrototypeObject({ ...isoDateToFields(t.Y, t.o, m), [yt.T]: 1 }),
1148
+ h,
1149
+ ),
1150
+ r.A,
1151
+ a,
1152
+ ),
1153
+ m,
1154
+ ),
1155
+ a,
1156
+ ),
1157
+ t.Y,
1158
+ )
1159
+ );
1160
+ }
1161
+ function validateIsoYearMonth(e) {
1162
+ return (((e) => isWithin(12 * e.t + e.u, -3261848, 3309129))(e) || throwRangeError(Te), e);
1163
+ }
1164
+ function getInternalSlotForPlainYearMonth(e) {
1165
+ return ut.get(e);
1166
+ }
1167
+ function getInternalSlotOrThrowForPlainYearMonth(e) {
1168
+ const t = getInternalSlotForPlainYearMonth(e);
1169
+ return (t || throwTypeError(ge), t);
1170
+ }
1171
+ function isPlainYearMonth(e) {
1172
+ return !!getInternalSlotForPlainYearMonth(e);
1173
+ }
1174
+ function createIsoDateRecord(e, t, o) {
1175
+ return { t: e, u: t, T: o };
1176
+ }
1177
+ function createTemporalDate(e, t, o = Object.create(ht.prototype)) {
1178
+ return (Dt.set(o, { o: validateIsoDate(e), Y: t }), o);
1179
+ }
1180
+ function toTemporalDate(e, t) {
1181
+ if (isObject(e)) {
1182
+ if (isPlainDate(e)) {
1183
+ getTemporalOverflowOption(getOptionsObject(t));
1184
+ const o = getInternalSlotOrThrowForPlainDate(e);
1185
+ return createTemporalDate(o.o, o.Y);
1186
+ }
1187
+ if (isZonedDateTime(e)) {
1188
+ getTemporalOverflowOption(getOptionsObject(t));
1189
+ const o = getInternalSlotOrThrowForZonedDateTime(e);
1190
+ return createTemporalDate(getIsoDateTimeForZonedDateTimeSlot(o).o, o.Y);
1191
+ }
1192
+ if (isPlainDateTime(e)) {
1193
+ getTemporalOverflowOption(getOptionsObject(t));
1194
+ const o = getInternalSlotOrThrowForPlainDateTime(e);
1195
+ return createTemporalDate(o._.o, o.Y);
1196
+ }
1197
+ const o = getTemporalCalendarIdentifierWithIsoDefault(e);
1198
+ return createTemporalDate(
1199
+ calendarDateFromFields(
1200
+ o,
1201
+ prepareCalendarFields(o, e, [yt.t, yt.u, yt.v, yt.T], []),
1202
+ getTemporalOverflowOption(getOptionsObject(t)),
1203
+ ),
1204
+ o,
1205
+ );
1206
+ }
1207
+ validateString(e);
1208
+ const o = parseIsoDateTime(e, [tt]),
1209
+ n = canonicalizeCalendar(o.Y || "iso8601");
1210
+ return (
1211
+ getTemporalOverflowOption(getOptionsObject(t)),
1212
+ createTemporalDate(createIsoDateRecord(o.t, o.u, o.T), n)
1213
+ );
1214
+ }
1215
+ function regulateIsoDate(e, t, o, n) {
1216
+ return n === h
1217
+ ? createIsoDateRecord(e, (t = clamp(t, 1, 12)), clamp(o, 1, isoDaysInMonth(e, t)))
1218
+ : (isValidIsoDate(e, t, o) || throwRangeError(Te), createIsoDateRecord(e, t, o));
1219
+ }
1220
+ function isValidIsoDate(e, t, o) {
1221
+ return isWithin(t, 1, 12) && isWithin(o, 1, isoDaysInMonth(e, t));
1222
+ }
1223
+ function addDaysToIsoDate(e, t) {
1224
+ return epochDaysToIsoDate(isoDateToEpochDays(e.t, e.u - 1, e.T + t));
1225
+ }
1226
+ function padIsoYear(e) {
1227
+ return isWithin(e, 0, 9999)
1228
+ ? toZeroPaddedDecimalString(e, 4)
1229
+ : `${e < 0 ? "-" : "+"}${toZeroPaddedDecimalString(Math.abs(e), 6)}`;
1230
+ }
1231
+ function temporalDateToString(e, t) {
1232
+ return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.Y, t)}`;
1233
+ }
1234
+ function compareIsoDate(e, t) {
1235
+ return compare(isoDateRecordToEpochDays(e), isoDateRecordToEpochDays(t));
1236
+ }
1237
+ function differenceTemporalPlainDate(e, t, o, n) {
1238
+ const r = getInternalSlotOrThrowForPlainDate(toTemporalDate(o));
1239
+ calendarEquals(t.Y, r.Y) || throwRangeError(pe);
1240
+ const a = getDifferenceSettings(e, getOptionsObject(n), s, [], B, B);
1241
+ if (!compareIsoDate(t.o, r.o))
1242
+ return createTemporalDuration(createTemporalDurationSlot([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]));
1243
+ let i = combineDateAndTimeDuration(
1244
+ calendarDateUntil(t.Y, t.o, r.o, a.L),
1245
+ createTimeDurationFromSeconds(0),
1246
+ );
1247
+ if (a.H !== B || 1 !== a.V) {
1248
+ const e = combineIsoDateAndTimeRecord(t.o, midnightTimeRecord());
1249
+ i = roundRelativeDuration(
1250
+ i,
1251
+ getUtcEpochNanoseconds(e),
1252
+ getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())),
1253
+ e,
1254
+ void 0,
1255
+ t.Y,
1256
+ a.L,
1257
+ a.V,
1258
+ a.H,
1259
+ a.q,
1260
+ );
1261
+ }
1262
+ return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(i, B), e));
1263
+ }
1264
+ function addDurationToDate(e, t, o, n) {
1265
+ return createTemporalDate(
1266
+ calendarDateAdd(
1267
+ t.Y,
1268
+ t.o,
1269
+ ((e) => {
1270
+ const t = toInternalDurationRecordWith24HourDays(e);
1271
+ return createDateDurationRecord(t.A.ee, t.A.te, t.A.X, t.p[0]);
1272
+ })(applySignToDurationSlot(toTemporalDuration(o), e)),
1273
+ getTemporalOverflowOption(getOptionsObject(n)),
1274
+ ),
1275
+ t.Y,
1276
+ );
1277
+ }
1278
+ function getInternalSlotForPlainDate(e) {
1279
+ return Dt.get(e);
1280
+ }
1281
+ function getInternalSlotOrThrowForPlainDate(e) {
1282
+ const t = getInternalSlotForPlainDate(e);
1283
+ return (t || throwTypeError(ge), t);
1284
+ }
1285
+ function isPlainDate(e) {
1286
+ return !!getInternalSlotForPlainDate(e);
1287
+ }
1288
+ function validateIsoDate(e) {
1289
+ return (
1290
+ validateIsoDateTime(combineIsoDateAndTimeRecord(e, createTimeRecord(12, 0, 0, 0, 0, 0))), e
1291
+ );
1292
+ }
1293
+ function formatToParts(e, t) {
1294
+ return (pt[e] ||= new Intl.DateTimeFormat("en", {
1295
+ year: "numeric",
1296
+ month: "numeric",
1297
+ day: "numeric",
1298
+ calendar: e,
1299
+ timeZone: "UTC",
1300
+ })).formatToParts(t * r);
1301
+ }
1302
+ function extractYearMonthDay(e, t) {
1303
+ const o = formatToParts(e, t),
1304
+ n = ["year", "month", "day"].map((e) => toIntegerIfIntegral(o.find((t) => t.type === e).value));
1305
+ return { t: n[0], u: n[1], T: n[2] };
1306
+ }
1307
+ function yearMonthDay(e, t) {
1308
+ const o = ft[e].C(t);
1309
+ if (o) return o;
1310
+ const n = ((e, t) => {
1311
+ const o = formatToParts(e, t),
1312
+ n = ["relatedYear", "month", "day"].map((e) => o.find((t) => t.type === e).value);
1313
+ return {
1314
+ t: toIntegerIfIntegral(n[0]),
1315
+ v: createMonthCode(parseInt(n[1]), /bis/.test(n[1])),
1316
+ T: toIntegerIfIntegral(n[2]),
1317
+ };
1318
+ })(e, t);
1319
+ return (ft[e].B(t, n), n);
1320
+ }
1321
+ function getNewYear(e, t) {
1322
+ let o = gt[e].C(t);
1323
+ if (o) return o;
1324
+ let n = isoDateToEpochDays(
1325
+ t,
1326
+ 0,
1327
+ 1985 === t ? 53 : Math.floor(modFloor(-10.8822 * t + 16, 29.53)) + 23,
1328
+ ),
1329
+ r = yearMonthDay(e, n);
1330
+ for (let o = 0; "M01" !== r.v; o++) {
1331
+ if (o > 20) throw new Error("unexpected calendar error");
1332
+ ((n += r.t < t ? 31 - r.T : -r.T), (r = yearMonthDay(e, n)));
1333
+ }
1334
+ return (gt[e].B(t, n - r.T + 1), n - r.T + 1);
1335
+ }
1336
+ function ordinalMonthToMonthCode(e, t, o) {
1337
+ return yearMonthDay(e, getNewYear(e, t) + 30 * (o - 1)).v;
1338
+ }
1339
+ function calendarIntegersToEpochDays$6(e, t, o, n) {
1340
+ const r = getNewYear(e, t) + 30 * (o - 1);
1341
+ return r - yearMonthDay(e, r).T + n;
1342
+ }
1343
+ function daysInMonth$5(e, t, o) {
1344
+ return calendarIntegersToEpochDays$6(e, t, o + 1, 1) - calendarIntegersToEpochDays$6(e, t, o, 1);
1345
+ }
1346
+ function monthsInYear(e, t) {
1347
+ return getNewYear(e, t + 1) - getNewYear(e, t) > 360 ? 13 : 12;
1348
+ }
1349
+ function epochDaysToDate$6(e, t) {
1350
+ return {
1351
+ oe: void 0,
1352
+ ne: void 0,
1353
+ get t() {
1354
+ return yearMonthDay(e, t).t;
1355
+ },
1356
+ get u() {
1357
+ const o = yearMonthDay(e, t);
1358
+ return Math.round((t - o.T - getNewYear(e, o.t)) / 29.53) + 1;
1359
+ },
1360
+ get v() {
1361
+ return yearMonthDay(e, t).v;
1362
+ },
1363
+ get T() {
1364
+ return yearMonthDay(e, t).T;
1365
+ },
1366
+ re: isoDayOfWeek(epochDaysToIsoDate(t)),
1367
+ get ae() {
1368
+ const o = yearMonthDay(e, t).t;
1369
+ return t - getNewYear(e, o) + 1;
1370
+ },
1371
+ ie: { ce: void 0, t: void 0 },
1372
+ se: 7,
1373
+ get le() {
1374
+ const o = yearMonthDay(e, t);
1375
+ return daysInMonth$5(e, o.t, Math.round((t - o.T - getNewYear(e, o.t)) / 29.53) + 1);
1376
+ },
1377
+ get de() {
1378
+ const o = yearMonthDay(e, t).t;
1379
+ return getNewYear(e, o + 1) - getNewYear(e, o);
1380
+ },
1381
+ get me() {
1382
+ return monthsInYear(e, yearMonthDay(e, t).t);
1383
+ },
1384
+ get ue() {
1385
+ return monthsInYear(e, yearMonthDay(e, t).t) > 12;
1386
+ },
1387
+ };
1388
+ }
1389
+ function epoch$1(e) {
1390
+ return "coptic" === e ? -615924 : "ethioaa" === e ? -2725608 : -716733;
1391
+ }
1392
+ function mathematicalInLeapYear$2(e) {
1393
+ return +!((e + 1) % 4);
1394
+ }
1395
+ function daysInMonth$4(e, t) {
1396
+ return 13 === t ? 5 + mathematicalInLeapYear$2(e) : 30;
1397
+ }
1398
+ function calendarIntegersToEpochDays$5(e, t, o, n) {
1399
+ return Math.floor(365.25 * t) + 30 * (o - 1) + n + epoch$1(e);
1400
+ }
1401
+ function isLeapYear$2(e) {
1402
+ return modFloor(7 * e + 1, 19) < 7;
1403
+ }
1404
+ function monthNumber(e, t) {
1405
+ return divFloor(235 * e - 234, 19) + t;
1406
+ }
1407
+ function newYearEpochDays(e) {
1408
+ const t = monthNumber(e, 1) - 1,
1409
+ o = modFloor(13753 * t + 5604, 25920);
1410
+ let n = 29 * t - 2092590 + divFloor(13753 * t + 5604, 25920);
1411
+ (o >= 19440 ||
1412
+ (!isLeapYear$2(e) && 5 === modFloor(n, 7) && o >= 9924) ||
1413
+ (isLeapYear$2(e - 1) && 4 === modFloor(n, 7) && o >= 16789)) &&
1414
+ n++;
1415
+ const r = modFloor(n, 7);
1416
+ return ((1 !== r && 3 !== r && 6 !== r) || n++, n);
1417
+ }
1418
+ function calendarIntegersToEpochDays$4(e, t, o) {
1419
+ const n = ((newYearEpochDays(e + 1) - newYearEpochDays(e)) % 30) - 24;
1420
+ return (
1421
+ newYearEpochDays(e) +
1422
+ (isLeapYear$2(e) ? Math.round(29.53 * (t - 1) + 0.35) : Math.ceil(29.5 * (t - 1))) +
1423
+ (1 === n && t >= 3 ? 1 : -1 === n && t >= 4 ? -1 : 0) +
1424
+ o -
1425
+ 1
1426
+ );
1427
+ }
1428
+ function daysInMonth$3(e, t) {
1429
+ return calendarIntegersToEpochDays$4(e, t + 1, 1) - calendarIntegersToEpochDays$4(e, t, 1);
1430
+ }
1431
+ function mathematicalInLeapYear$1(e) {
1432
+ return mathematicalInLeapYear(e + 78);
1433
+ }
1434
+ function firstDayOfYear(e) {
1435
+ return isoDateToEpochDays(e + 78, 2, 22 - mathematicalInLeapYear$1(e));
1436
+ }
1437
+ function daysInMonth$2(e, t) {
1438
+ return t > 6 || (1 === t && !mathematicalInLeapYear$1(e)) ? 30 : 31;
1439
+ }
1440
+ function calendarIntegersToEpochDays$3(e, t, o) {
1441
+ return (
1442
+ firstDayOfYear(e) -
1443
+ 1 +
1444
+ 30 * (t - 1) +
1445
+ o +
1446
+ clamp(t - 1, 0, 6) +
1447
+ (1 === t || mathematicalInLeapYear$1(e) ? 0 : -1)
1448
+ );
1449
+ }
1450
+ function epoch(e) {
1451
+ return "islamic-civil" === e ? -492148 : -492149;
1452
+ }
1453
+ function isLeapYear$1(e) {
1454
+ return modFloor(11 * (e + 4), 30) < 11;
1455
+ }
1456
+ function daysInMonth$1(e, t) {
1457
+ return 12 === t ? (isLeapYear$1(e) ? 30 : 29) : 29 + (t % 2);
1458
+ }
1459
+ function calendarIntegersToEpochDays$2(e, t, o, n) {
1460
+ return (
1461
+ epoch(e) + 354 * (t - 1) + divFloor(11 * (t + 3), 30) - 1 + Math.ceil(29.5 * (o - 1)) + n - 1
1462
+ );
1463
+ }
1464
+ function epochDaysToDate$2(e, t) {
1465
+ let o = divFloor(30 * (t - epoch(e)), 10631) + 2;
1466
+ for (; calendarIntegersToEpochDays$2(e, o, 1, 1) > t; o--);
1467
+ let n = 12;
1468
+ for (; calendarIntegersToEpochDays$2(e, o, n, 1) > t; n--);
1469
+ return {
1470
+ oe: o > 0 ? "ah" : "bh",
1471
+ ne: o > 0 ? o : 1 - o,
1472
+ t: o,
1473
+ u: n,
1474
+ v: createMonthCode(n),
1475
+ T: t - calendarIntegersToEpochDays$2(e, o, n, 1) + 1,
1476
+ re: isoDayOfWeek(epochDaysToIsoDate(t)),
1477
+ ae: t - calendarIntegersToEpochDays$2(e, o, 1, 1) + 1,
1478
+ ie: { ce: void 0, t: void 0 },
1479
+ se: 7,
1480
+ le: daysInMonth$1(o, n),
1481
+ de: isLeapYear$1(o) ? 355 : 354,
1482
+ me: 12,
1483
+ ue: isLeapYear$1(o),
1484
+ };
1485
+ }
1486
+ function getYearMonthDay(e) {
1487
+ const t = It.C(e);
1488
+ if (t) return t;
1489
+ const o = extractYearMonthDay("islamic-umalqura", e);
1490
+ return (It.B(e, o), o);
1491
+ }
1492
+ function getFirstDayOfMonth(e, t) {
1493
+ const o = balanceIsoYearMonth(e, t),
1494
+ n = calendarIntegersToEpochDays$2("islamic-civil", o.t, o.u, 1);
1495
+ return isWithin(12 * e + t, 15540, 19260) ? n + 14 - getYearMonthDay(n + 14).T + 1 : n;
1496
+ }
1497
+ function calendarIntegersToEpochDays$1(e, t, o) {
1498
+ return getFirstDayOfMonth(e, t) + o - 1;
1499
+ }
1500
+ function constrainDay$2(e, t, o) {
1501
+ return o < 30
1502
+ ? o
1503
+ : clamp(o, 1, ((e, t) => getFirstDayOfMonth(e, t + 1) - getFirstDayOfMonth(e, t))(e, t));
1504
+ }
1505
+ function startOfYear(e) {
1506
+ const t = Ot.C(e);
1507
+ if (t) return t;
1508
+ const o = isoDateToEpochDays(e + 621, 3, 1),
1509
+ n = o - extractYearMonthDay("persian", o).T + 1;
1510
+ return (Ot.B(e, n), n);
1511
+ }
1512
+ function dayOfYearFromMonthDay(e, t) {
1513
+ return 30 * (e - 1) + t + clamp(e - 1, 0, 6);
1514
+ }
1515
+ function calendarIntegersToEpochDays(e, t, o) {
1516
+ return startOfYear(e) - 1 + 30 * (t - 1) + o + clamp(t - 1, 0, 6);
1517
+ }
1518
+ function isLeapYear(e) {
1519
+ return startOfYear(e + 1) - startOfYear(e) > 365;
1520
+ }
1521
+ function getDate(e) {
1522
+ const t = isoDateRecordToEpochDays(e);
1523
+ let o = 30 * e.u + e.T <= 105 ? e.t - 622 : e.t - 621,
1524
+ n = startOfYear(o);
1525
+ n > t && (o--, (n = startOfYear(o)));
1526
+ const r = ((e) => {
1527
+ const t = e <= 186 ? divFloor(e - 1, 31) + 1 : divFloor(e - 7, 30) + 1;
1528
+ return [t, e - dayOfYearFromMonthDay(t, 1) + 1];
1529
+ })(t - n + 1);
1530
+ return { t: o, u: r[0], T: r[1], ae: t - n + 1 };
1531
+ }
1532
+ function canonicalizeCalendar(e) {
1533
+ return "islamicc" === (e = asciiLowerCase(e))
1534
+ ? "islamic-civil"
1535
+ : "ethiopic-amete-alem" === e
1536
+ ? "ethioaa"
1537
+ : St[e]
1538
+ ? e
1539
+ : throwRangeError(((e) => `calendar not supported in this polyfill: ${e}`)(e));
1540
+ }
1541
+ function calendarDateAdd(e, t, o, n) {
1542
+ if (isIsoLikeCalendar(e) || (!o.ee && !o.te))
1543
+ return ((e, t, o) => {
1544
+ const n = balanceIsoYearMonth(e.t + t.ee, e.u + t.te);
1545
+ return validateIsoDate(addDaysToIsoDate(regulateIsoDate(n.t, n.u, e.T, o), 7 * t.X + t.K));
1546
+ })(t, o, n);
1547
+ const r = nonIsoCalendarIsoToDate(e, t),
1548
+ a = r.t + o.ee,
1549
+ i = balanceNonIsoYearMonth(
1550
+ e,
1551
+ a,
1552
+ monthCodeToOrdinal(e, a, constrainMonthCode(e, a, r.v, n)) + o.te,
1553
+ );
1554
+ return validateIsoDate(
1555
+ addDaysToIsoDate(
1556
+ calendarIntegersToIso(e, i.t, i.u, constrainDay(e, i.t, i.u, r.T, n)),
1557
+ 7 * o.X + o.K,
1558
+ ),
1559
+ );
1560
+ }
1561
+ function compareSurpasses(e, t, o, n, r) {
1562
+ return t !== r.t
1563
+ ? e * (t - r.t) > 0
1564
+ : o !== r.u && o !== r.v
1565
+ ? e * ("string" == typeof o ? (o > r.v ? 1 : o < r.v ? -1 : 0) : o - r.u) > 0
1566
+ : e * (n - r.T) > 0;
1567
+ }
1568
+ function nonIsoDateSurpasses(e, t, o, n, r, a) {
1569
+ if (compareSurpasses(t, o.t + r, o.v, o.T, n)) return { Te: !0 };
1570
+ const i = balanceNonIsoYearMonth(
1571
+ e,
1572
+ o.t + r,
1573
+ monthCodeToOrdinal(e, o.t + r, constrainMonthCode(e, o.t + r, o.v, h)) + a,
1574
+ );
1575
+ return compareSurpasses(t, i.t, i.u, o.T, n) ? { Te: !0 } : { Te: !1, ...i };
1576
+ }
1577
+ function calendarDateUntil(e, t, o, n) {
1578
+ const r = compareIsoDate(o, t);
1579
+ if (isIsoLikeCalendar(e) || n === q || n === B || !r)
1580
+ return ((e, t, o) => {
1581
+ const n = compareIsoDate(t, e);
1582
+ if (!n) return zeroDateDuration();
1583
+ if (o === q || o === B) {
1584
+ const n = isoDateToEpochDays(t.t, t.u - 1, t.T) - isoDateToEpochDays(e.t, e.u - 1, e.T);
1585
+ return o === q
1586
+ ? createDateDurationRecord(0, 0, divTrunc(n, 7) + 0, (n % 7) + 0)
1587
+ : createDateDurationRecord(0, 0, 0, n);
1588
+ }
1589
+ const r = 12 * t.t + t.u - 12 * e.t - e.u - (n * (e.T - t.T) > 0 ? n : 0),
1590
+ a = balanceIsoYearMonth(e.t, e.u + r),
1591
+ i =
1592
+ isoDateRecordToEpochDays(t) - isoDateRecordToEpochDays(regulateIsoDate(a.t, a.u, e.T, h));
1593
+ return o === x
1594
+ ? createDateDurationRecord(divTrunc(r, 12), (r % 12) + 0, 0, i)
1595
+ : createDateDurationRecord(0, r, 0, i);
1596
+ })(t, o, n);
1597
+ const a = nonIsoCalendarIsoToDate(e, t),
1598
+ i = nonIsoCalendarIsoToDate(e, o);
1599
+ let c,
1600
+ s = 0;
1601
+ if (n === x) for (s = i.t - a.t; (c = nonIsoDateSurpasses(e, r, a, i, s, 0)).Te; s -= r);
1602
+ const l =
1603
+ ("hebrew" === e
1604
+ ? ((d = (c || a).t), (m = (c || a).u), monthNumber(i.t, i.u) - monthNumber(d, m))
1605
+ : "chinese" === e || "dangi" === e
1606
+ ? (function (e, t, o, n, r) {
1607
+ if (t === n) return r - o;
1608
+ const a = calendarIntegersToEpochDays$6(e, t, o, 1),
1609
+ i = calendarIntegersToEpochDays$6(e, n, r, 1),
1610
+ c = sign(i - a);
1611
+ if (Math.abs(i - a) <= 15e6) return Math.round((i - a) / 29.5306);
1612
+ let s = 0,
1613
+ l = a;
1614
+ for (; (i - l) * c > 0; ) {
1615
+ let t = l + clamp(15e6, 1, Math.abs(i - l)) * c;
1616
+ ((t -= yearMonthDay(e, t).T - 1), (s += Math.round((t - l) / 29.5306)), (l = t));
1617
+ }
1618
+ return s;
1619
+ })(e, (c || a).t, (c || a).u, i.t, i.u)
1620
+ : (i.t - (c || a).t) * a.me + i.u - (c || a).u) - (r * (a.T - i.T) > 0 ? r : 0);
1621
+ var d, m;
1622
+ const u = nonIsoDateSurpasses(e, r, a, i, s, l);
1623
+ return createDateDurationRecord(
1624
+ s,
1625
+ l,
1626
+ 0,
1627
+ isoDateRecordToEpochDays(o) -
1628
+ isoDateRecordToEpochDays(
1629
+ calendarIntegersToIso(e, u.t, u.u, constrainDay(e, u.t, u.u, a.T, h)),
1630
+ ),
1631
+ );
1632
+ }
1633
+ function calendarDateToIso(e, t, o) {
1634
+ const n = t[yt.t],
1635
+ r = t[yt.u],
1636
+ a = t[yt.v],
1637
+ i = t[yt.T];
1638
+ if (isIsoLikeCalendar(e))
1639
+ return ((e, t) => regulateIsoDate(e[yt.t], e[yt.u], e[yt.T], t))(
1640
+ { ...t, year: n + ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0) },
1641
+ o,
1642
+ );
1643
+ void 0 !== a && constrainMonthCode(e, n, a, o);
1644
+ const c =
1645
+ "chinese" === e || "dangi" === e
1646
+ ? ((e, t, o) => (isWithin(o, 1, 12) ? o : clamp(o, 1, monthsInYear(e, t))))(e, n, r)
1647
+ : clamp(r, 1, "hebrew" === e ? (isLeapYear$2(n) ? 13 : 12) : isCopticOrEthiopic(e) ? 13 : 12);
1648
+ return (
1649
+ c !== r && o === p && throwRangeError(Te),
1650
+ calendarIntegersToIso(e, n, c, constrainDay(e, n, c, i, o))
1651
+ );
1652
+ }
1653
+ function nonIsoCalendarIsoToDate(e, t) {
1654
+ const o = isoDateRecordToEpochDays(t);
1655
+ if (isIsoLikeCalendar(e)) {
1656
+ const n = { ...isoCalendarIsoToDate(t), ie: { t: void 0, ce: void 0 } };
1657
+ if ("japanese" === e) {
1658
+ const r =
1659
+ o >= 18017
1660
+ ? "reiwa"
1661
+ : o >= 6947
1662
+ ? "heisei"
1663
+ : o >= -15713
1664
+ ? "showa"
1665
+ : o >= -20974
1666
+ ? "taisho"
1667
+ : o >= -35428
1668
+ ? "meiji"
1669
+ : t.t > 0
1670
+ ? "ce"
1671
+ : "bce",
1672
+ a = St[e].get(r);
1673
+ return { oe: r, ne: "bce" === r ? 1 - t.t : t.t - a + 1, ...n };
1674
+ }
1675
+ return "gregory" === e
1676
+ ? { oe: t.t > 0 ? "ce" : "bce", ne: t.t > 0 ? t.t : 1 - t.t, ...n }
1677
+ : "buddhist" === e
1678
+ ? { oe: "be", ne: t.t + 543, ...n, t: t.t + 543 }
1679
+ : {
1680
+ oe: t.t >= 1912 ? "roc" : "broc",
1681
+ ne: t.t >= 1912 ? t.t - 1911 : 1912 - t.t,
1682
+ ...n,
1683
+ t: t.t - 1911,
1684
+ };
1685
+ }
1686
+ return isCopticOrEthiopic(e)
1687
+ ? ((e, t) => {
1688
+ const o = divFloor(t - epoch$1(e) + 365, 365.25) - 1,
1689
+ n = t - calendarIntegersToEpochDays$5(e, o, 1, 1) + 1,
1690
+ r = divFloor(n - 1, 30) + 1;
1691
+ return {
1692
+ oe: "coptic" === e || ("ethiopic" === e && o > 0) ? "am" : "aa",
1693
+ ne: "ethiopic" === e && o <= 0 ? o + 5500 : o,
1694
+ t: o,
1695
+ u: r,
1696
+ v: createMonthCode(r),
1697
+ T: modFloor(n - 1, 30) + 1,
1698
+ re: isoDayOfWeek(epochDaysToIsoDate(t)),
1699
+ ae: n,
1700
+ ie: { ce: void 0, t: void 0 },
1701
+ se: 7,
1702
+ le: daysInMonth$4(o, r),
1703
+ de: mathematicalInLeapYear$2(o) + 365,
1704
+ me: 13,
1705
+ ue: !!mathematicalInLeapYear$2(o),
1706
+ };
1707
+ })(e, o)
1708
+ : "indian" === e
1709
+ ? ((e) => {
1710
+ const t = epochDaysToIsoDate(e),
1711
+ o = firstDayOfYear(t.t - 78) <= e ? t.t - 78 : t.t - 79,
1712
+ n = mathematicalInLeapYear$1(o),
1713
+ r = e - firstDayOfYear(o) + 1;
1714
+ let a = 0;
1715
+ for (; a < 12 && calendarIntegersToEpochDays$3(o, a + 1, 1) <= e; a++);
1716
+ return {
1717
+ oe: "shaka",
1718
+ ne: o,
1719
+ t: o,
1720
+ u: a,
1721
+ v: createMonthCode(a),
1722
+ T: e - calendarIntegersToEpochDays$3(o, a, 1) + 1,
1723
+ re: isoDayOfWeek(t),
1724
+ ae: r,
1725
+ ie: { ce: void 0, t: void 0 },
1726
+ se: 7,
1727
+ le: daysInMonth$2(o, a),
1728
+ de: 365 + n,
1729
+ me: 12,
1730
+ ue: !!n,
1731
+ };
1732
+ })(o)
1733
+ : "persian" === e
1734
+ ? ((e) => {
1735
+ const t = epochDaysToIsoDate(e);
1736
+ return {
1737
+ oe: "ap",
1738
+ get ne() {
1739
+ return getDate(t).t;
1740
+ },
1741
+ get t() {
1742
+ return getDate(t).t;
1743
+ },
1744
+ get u() {
1745
+ return getDate(t).u;
1746
+ },
1747
+ get v() {
1748
+ return createMonthCode(getDate(t).u);
1749
+ },
1750
+ get T() {
1751
+ return getDate(t).T;
1752
+ },
1753
+ re: isoDayOfWeek(t),
1754
+ get ae() {
1755
+ return getDate(t).ae;
1756
+ },
1757
+ ie: { ce: void 0, t: void 0 },
1758
+ se: 7,
1759
+ get le() {
1760
+ const e = getDate(t);
1761
+ return e.u <= 6 ? 31 : 12 !== e.u || isLeapYear(e.t) ? 30 : 29;
1762
+ },
1763
+ get de() {
1764
+ return isLeapYear(getDate(t).t) ? 366 : 365;
1765
+ },
1766
+ me: 12,
1767
+ get ue() {
1768
+ return isLeapYear(getDate(t).t);
1769
+ },
1770
+ };
1771
+ })(o)
1772
+ : "islamic-civil" === e || "islamic-tbla" === e
1773
+ ? epochDaysToDate$2(e, o)
1774
+ : "islamic-umalqura" === e
1775
+ ? ((e) => {
1776
+ const t = epochDaysToDate$2("islamic-civil", e),
1777
+ o = epochDaysToIsoDate(e);
1778
+ return e < -33600 || e > 76200
1779
+ ? t
1780
+ : {
1781
+ oe: "ah",
1782
+ get ne() {
1783
+ return getYearMonthDay(e).t;
1784
+ },
1785
+ get t() {
1786
+ return getYearMonthDay(e).t;
1787
+ },
1788
+ get u() {
1789
+ return getYearMonthDay(e).u;
1790
+ },
1791
+ get v() {
1792
+ return createMonthCode(getYearMonthDay(e).u);
1793
+ },
1794
+ get T() {
1795
+ return getYearMonthDay(e).T;
1796
+ },
1797
+ re: isoDayOfWeek(o),
1798
+ get ae() {
1799
+ return e - getFirstDayOfMonth(getYearMonthDay(e).t, 1) + 1;
1800
+ },
1801
+ ie: { ce: void 0, t: void 0 },
1802
+ se: 7,
1803
+ get le() {
1804
+ const t = getYearMonthDay(e);
1805
+ return getFirstDayOfMonth(t.t, t.u + 1) - getFirstDayOfMonth(t.t, t.u);
1806
+ },
1807
+ get de() {
1808
+ const t = getYearMonthDay(e).t;
1809
+ return getFirstDayOfMonth(t + 1, 1) - getFirstDayOfMonth(t, 1);
1810
+ },
1811
+ me: 12,
1812
+ get ue() {
1813
+ const t = getYearMonthDay(e).t;
1814
+ return getFirstDayOfMonth(t + 1, 1) - getFirstDayOfMonth(t, 1) > 354;
1815
+ },
1816
+ };
1817
+ })(o)
1818
+ : "hebrew" === e
1819
+ ? ((e) => {
1820
+ const t = epochDaysToIsoDate(e);
1821
+ let o = divFloor(e + 2092590, 365.2468222) + 2;
1822
+ for (; calendarIntegersToEpochDays$4(o, 1, 1) > e; o--);
1823
+ let n = isLeapYear$2(o) ? 13 : 12;
1824
+ for (; calendarIntegersToEpochDays$4(o, n, 1) > e; n--);
1825
+ return {
1826
+ oe: "am",
1827
+ ne: o,
1828
+ t: o,
1829
+ u: n,
1830
+ v: isLeapYear$2(o)
1831
+ ? createMonthCode(n <= 5 ? n : n - 1, 6 === n)
1832
+ : createMonthCode(n),
1833
+ T: e - calendarIntegersToEpochDays$4(o, n, 1) + 1,
1834
+ re: isoDayOfWeek(t),
1835
+ ae: e - calendarIntegersToEpochDays$4(o, 1, 1) + 1,
1836
+ ie: { ce: void 0, t: void 0 },
1837
+ se: 7,
1838
+ le: daysInMonth$3(o, n),
1839
+ de:
1840
+ calendarIntegersToEpochDays$4(o + 1, 1, 1) -
1841
+ calendarIntegersToEpochDays$4(o, 1, 1),
1842
+ me: isLeapYear$2(o) ? 13 : 12,
1843
+ ue: isLeapYear$2(o),
1844
+ };
1845
+ })(o)
1846
+ : epochDaysToDate$6(e, o);
1847
+ }
1848
+ function calendarMonthDayToIsoReferenceDate(e, t, o) {
1849
+ if (isIsoLikeCalendar(e))
1850
+ return ((e, t) => {
1851
+ const o = regulateIsoDate(e[yt.t] ?? 1972, e[yt.u], e[yt.T], t);
1852
+ return createIsoDateRecord(1972, o.u, o.T);
1853
+ })(
1854
+ {
1855
+ ...t,
1856
+ year: mapUnlessUndefined(
1857
+ t.year,
1858
+ (t) => t - ("buddhist" === e ? -543 : "roc" === e ? 1911 : 0),
1859
+ ),
1860
+ },
1861
+ o,
1862
+ );
1863
+ const n = t[yt.t],
1864
+ r = t[yt.u];
1865
+ let a = t[yt.v],
1866
+ i = t[yt.T];
1867
+ "chinese" === e || "dangi" === e
1868
+ ? (i > 30 && o === p && throwRangeError(Te),
1869
+ (i = clamp(i, 1, 30)),
1870
+ void 0 !== n && (a || (a = nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, 1)).v)),
1871
+ ("M01L" !== a &&
1872
+ "M12L" !== a &&
1873
+ (("M02L" !== a && "M08L" !== a && "M09L" !== a && "M10L" !== a && "M11L" !== a) ||
1874
+ 30 !== i)) ||
1875
+ (o === p && throwRangeError(Te), (a = createMonthCode(parseMonthCode(a)[0]))))
1876
+ : (void 0 !== n
1877
+ ? (a && (a = constrainMonthCode(e, n, a, o)), (i = constrainDay(e, n, r, i, o)))
1878
+ : (i = ((e, t, o, n) => {
1879
+ const r = parseMonthCode(t);
1880
+ if ("chinese" === e || "dangi" === e) {
1881
+ const e = clamp(o, 1, 30);
1882
+ return o !== e && n === p ? throwRangeError(Te) : e;
1883
+ }
1884
+ if ("hebrew" === e)
1885
+ return "M05L" === t ? constrainDay(e, 3, 6, o, n) : constrainDay(e, 1, r[0], o, n);
1886
+ if (isCopticOrEthiopic(e)) return constrainDay(e, 3, r[0], o, n);
1887
+ if ("indian" === e) return constrainDay(e, 2, r[0], o, n);
1888
+ if ("islamic-civil" === e || "islamic-tbla" === e)
1889
+ return constrainDay(e, 2, r[0], o, n);
1890
+ if ("islamic-umalqura" === e) {
1891
+ const e = clamp(o, 1, 30);
1892
+ return o !== e && n === p ? throwRangeError(Te) : e;
1893
+ }
1894
+ if ("persian" === e) {
1895
+ const e = clamp(o, 1, r[0] <= 6 ? 31 : 30);
1896
+ return o !== e && n === p ? throwRangeError(Te) : e;
1897
+ }
1898
+ })(e, a, i, o)),
1899
+ a || (a = nonIsoCalendarIsoToDate(e, calendarIntegersToIso(e, n, r, i)).v));
1900
+ const c = parseMonthCode(a);
1901
+ return isCopticOrEthiopic(e)
1902
+ ? epochDaysToIsoDate(
1903
+ ((e, t) => (13 === e && 6 === t ? 618 : ((30 * (e - 1) + t + 252) % 365) + 731))(c[0], i),
1904
+ )
1905
+ : epochDaysToIsoDate(
1906
+ "indian" === e
1907
+ ? ((e, t) => calendarIntegersToEpochDays$3(30 * e + t <= 310 ? 1894 : 1893, e, t))(
1908
+ c[0],
1909
+ i,
1910
+ )
1911
+ : "persian" === e
1912
+ ? ((e, t) => {
1913
+ if (12 === e && 30 === t)
1914
+ for (let o = 1350; ; o--)
1915
+ if (isLeapYear(o)) return calendarIntegersToEpochDays(o, e, t);
1916
+ const o = calendarIntegersToEpochDays(1351, e, t);
1917
+ return o <= 1095 ? o : calendarIntegersToEpochDays(1350, e, t);
1918
+ })(c[0], i)
1919
+ : "islamic-civil" === e || "islamic-tbla" === e
1920
+ ? ((e, t, o) =>
1921
+ 12 === t && 30 === o
1922
+ ? "islamic-civil" === e
1923
+ ? 421
1924
+ : 420
1925
+ : calendarIntegersToEpochDays$2(
1926
+ e,
1927
+ 30 * t + o <= ("islamic-civil" === e ? 355 : 356) ? 1392 : 1391,
1928
+ t,
1929
+ o,
1930
+ ))(e, c[0], i)
1931
+ : "islamic-umalqura" === e
1932
+ ? ((e, t) => {
1933
+ for (let o = 1392; ; o--)
1934
+ if (constrainDay$2(o, e, t) === t) {
1935
+ const n = calendarIntegersToEpochDays$1(o, e, t);
1936
+ if (n <= 1095) return n;
1937
+ }
1938
+ })(c[0], i)
1939
+ : "hebrew" === e
1940
+ ? ((e, t) => {
1941
+ const o = parseMonthCode(e);
1942
+ if ("M05L" === e) return calendarIntegersToEpochDays$4(5730, 6, t);
1943
+ if (("M02" === e || "M03" === e) && 30 === t)
1944
+ return calendarIntegersToEpochDays$4(5732, o[0], t);
1945
+ const n = calendarIntegersToEpochDays$4(5733, o[0], t);
1946
+ return n <= 1095 ? n : calendarIntegersToEpochDays$4(5732, o[0], t);
1947
+ })(a, i)
1948
+ : (function (e, t, o) {
1949
+ const [n, r] = parseMonthCode(t),
1950
+ a = r || (30 === o && (6 === n || 8 === n)) || 12 === n ? n + 1 : n;
1951
+ if ("M11" === t) {
1952
+ const t = calendarIntegersToEpochDays$6(e, 30 === o ? 1969 : 1972, 11, o);
1953
+ return t <= 1095 ? t : calendarIntegersToEpochDays$6(e, 1971, 12, o);
1954
+ }
1955
+ return calendarIntegersToEpochDays$6(
1956
+ e,
1957
+ ((e, t, o) => {
1958
+ const [n, r] = parseMonthCode(t);
1959
+ return 12 === n
1960
+ ? 1971
1961
+ : !r && (o < 30 || 2 === n || 5 === n || 7 === n || 9 === n || 10 === n)
1962
+ ? 1972
1963
+ : r
1964
+ ? 2 === n
1965
+ ? 1947
1966
+ : 3 === n
1967
+ ? 30 === o
1968
+ ? 1955
1969
+ : 1966
1970
+ : 4 === n
1971
+ ? 30 === o
1972
+ ? 1944
1973
+ : 1963
1974
+ : 5 === n
1975
+ ? 30 === o
1976
+ ? 1952
1977
+ : 1971
1978
+ : 6 === n
1979
+ ? 30 === o
1980
+ ? 1941
1981
+ : 1960
1982
+ : 7 === n
1983
+ ? 30 === o
1984
+ ? 1938
1985
+ : 1968
1986
+ : 8 === n
1987
+ ? 1957
1988
+ : 9 === n
1989
+ ? 2014
1990
+ : 10 === n
1991
+ ? 1984
1992
+ : 2033
1993
+ : 1 === n || 4 === n
1994
+ ? 1970
1995
+ : 3 === n
1996
+ ? "chinese" === e
1997
+ ? 1966
1998
+ : 1968
1999
+ : 1971;
2000
+ })(e, t, o),
2001
+ a,
2002
+ o,
2003
+ );
2004
+ })(e, a, i),
2005
+ );
2006
+ }
2007
+ function calendarSupportsEra(e) {
2008
+ return !!St[e].size;
2009
+ }
2010
+ function canonicalizeEraInCalendar(e, t) {
2011
+ const o = "ad" === t ? "ce" : "bc" === t ? "bce" : t;
2012
+ return St[e].has(o) ? o : throwRangeError(((e) => `invalid era: ${e}`)(t));
2013
+ }
2014
+ function constrainMonthCode(e, t, o, n) {
2015
+ if ("hebrew" === e)
2016
+ return "M05L" !== o || isLeapYear$2(t) ? o : n === p ? throwRangeError(Te) : "M06";
2017
+ if ("chinese" === e || "dangi" === e) {
2018
+ const r = ((e, t, o) => {
2019
+ const [n, r] = parseMonthCode(o);
2020
+ return r && ordinalMonthToMonthCode(e, t, n + 1) !== o ? createMonthCode(n) : o;
2021
+ })(e, t, o);
2022
+ return o !== r && n === p ? throwRangeError(Te) : r;
2023
+ }
2024
+ return o;
2025
+ }
2026
+ function monthCodeToOrdinal(e, t, o) {
2027
+ const n = parseMonthCode(o);
2028
+ return "hebrew" === e
2029
+ ? ((e, t) => {
2030
+ const o = parseMonthCode(t);
2031
+ return o[0] + +(isLeapYear$2(e) && o[0] + +o[1] >= 6);
2032
+ })(t, o)
2033
+ : "chinese" === e || "dangi" === e
2034
+ ? ((e, t, o) => {
2035
+ const [n, r] = parseMonthCode(o);
2036
+ return r || ordinalMonthToMonthCode(e, t, n) !== o ? n + 1 : n;
2037
+ })(e, t, o)
2038
+ : n[0];
2039
+ }
2040
+ function calendarIntegersToIso(e, t, o, n) {
2041
+ return isCopticOrEthiopic(e)
2042
+ ? epochDaysToIsoDate(calendarIntegersToEpochDays$5(e, t, o, n))
2043
+ : epochDaysToIsoDate(
2044
+ "indian" === e
2045
+ ? calendarIntegersToEpochDays$3(t, o, n)
2046
+ : "persian" === e
2047
+ ? calendarIntegersToEpochDays(t, o, n)
2048
+ : "islamic-civil" === e || "islamic-tbla" === e
2049
+ ? calendarIntegersToEpochDays$2(e, t, o, n)
2050
+ : "islamic-umalqura" === e
2051
+ ? calendarIntegersToEpochDays$1(t, o, n)
2052
+ : "hebrew" === e
2053
+ ? calendarIntegersToEpochDays$4(t, o, n)
2054
+ : calendarIntegersToEpochDays$6(e, t, o, n),
2055
+ );
2056
+ }
2057
+ function calendarSupportsEraForNonIsoCalendars(e) {
2058
+ return calendarSupportsEra(e);
2059
+ }
2060
+ function isIsoLikeCalendar(e) {
2061
+ return "iso8601" === e || "buddhist" === e || "gregory" === e || "japanese" === e || "roc" === e;
2062
+ }
2063
+ function isCopticOrEthiopic(e) {
2064
+ return "coptic" === e || "ethioaa" === e || "ethiopic" === e;
2065
+ }
2066
+ function constrainDay(e, t, o, n, r) {
2067
+ const a =
2068
+ "persian" === e
2069
+ ? ((e, t, o) =>
2070
+ t <= 6
2071
+ ? clamp(o, 1, 31)
2072
+ : 12 !== t
2073
+ ? clamp(o, 1, 30)
2074
+ : o < 30
2075
+ ? o
2076
+ : clamp(o, 1, isLeapYear(e) ? 30 : 29))(t, o, n)
2077
+ : "islamic-umalqura" === e
2078
+ ? constrainDay$2(t, o, n)
2079
+ : "chinese" === e || "dangi" === e
2080
+ ? ((e, t, o, n) => (n <= 29 ? n : clamp(n, 1, daysInMonth$5(e, t, o))))(e, t, o, n)
2081
+ : clamp(
2082
+ n,
2083
+ 1,
2084
+ isCopticOrEthiopic(e)
2085
+ ? daysInMonth$4(t, o)
2086
+ : "indian" === e
2087
+ ? daysInMonth$2(t, o)
2088
+ : "islamic-civil" === e || "islamic-tbla" === e
2089
+ ? daysInMonth$1(t, o)
2090
+ : "hebrew" === e
2091
+ ? daysInMonth$3(t, o)
2092
+ : void 0,
2093
+ );
2094
+ return n !== a && r === p ? throwRangeError(Te) : a;
2095
+ }
2096
+ function balanceNonIsoYearMonth(e, t, o) {
2097
+ if ("hebrew" === e)
2098
+ return ((e, t) => {
2099
+ const o = monthNumber(e, 1) + t - 1,
2100
+ n = Math.floor((19 * (o - 1) + 17) / 235) + 1;
2101
+ return { t: n, u: o - monthNumber(n, 1) + 1 };
2102
+ })(t, o);
2103
+ if ("chinese" === e || "dangi" === e)
2104
+ return ((e, t, o) => {
2105
+ if (isWithin(o, 1, 12)) return { t: t, u: o };
2106
+ const n = o >= 1 ? 1 : -1;
2107
+ let r = getNewYear(e, t),
2108
+ a = Math.abs(o - 1);
2109
+ for (; a > 0; ) {
2110
+ const t = Math.min(a, 5e5);
2111
+ ((r += Math.floor(29.5306 * t * n + 10)), (r -= yearMonthDay(e, r).T - 1), (a -= t));
2112
+ }
2113
+ const i = epochDaysToDate$6(e, r);
2114
+ return { t: i.t, u: i.u };
2115
+ })(e, t, o);
2116
+ const n = isCopticOrEthiopic(e) ? 13 : 12;
2117
+ return { t: t + divFloor(o - 1, n), u: modFloor(o - 1, n) + 1 };
2118
+ }
2119
+ function parseMonthCode(e) {
2120
+ const t = toPrimitive(e);
2121
+ validateString(t);
2122
+ const o = t.match(/M(\d\d)(L?)/);
2123
+ return ((o && "M00" !== t) || throwRangeError(invalidMonthCode(t)), [we(o[1]), !!o[2]]);
2124
+ }
2125
+ function createMonthCode(e, t = !1) {
2126
+ return `M${toZeroPaddedDecimalString(e, 2)}${t ? "L" : ""}`;
2127
+ }
2128
+ function prepareCalendarFields(e, t, o, n) {
2129
+ o = [...o, ...calendarExtraFields(e, o)].sort();
2130
+ const r = createEmptyCalendarFieldsRecord();
2131
+ let a = !1;
2132
+ for (const e of o) {
2133
+ const o = t[e];
2134
+ void 0 !== o
2135
+ ? ((a = !0), (r[e] = vt[e][0](o)))
2136
+ : n && (n.includes(e) && throwTypeError(missingField(e)), (r[e] = vt[e][1]));
2137
+ }
2138
+ return (n || a || throwTypeError(Fe), r);
2139
+ }
2140
+ function calendarMergeFields(e, t, o) {
2141
+ const n = ((e, t) => {
2142
+ const o = [];
2143
+ return (
2144
+ void 0 !== t[yt.u] && o.push(yt.v),
2145
+ void 0 !== t[yt.v] && o.push(yt.u),
2146
+ !calendarSupportsEra(e) ||
2147
+ (void 0 === t[yt.oe] && void 0 === t[yt.ne] && void 0 === t[yt.t]) ||
2148
+ o.push(yt.oe, yt.ne, yt.t),
2149
+ !((e) => "japanese" === e)(e) ||
2150
+ (void 0 === t[yt.T] && void 0 === t[yt.u] && void 0 === t[yt.v]) ||
2151
+ o.push(yt.oe, yt.ne),
2152
+ o
2153
+ );
2154
+ })(e, o),
2155
+ r = createEmptyCalendarFieldsRecord();
2156
+ for (const e of wt)
2157
+ (void 0 === t[e] || n.includes(e) || (r[e] = t[e]), void 0 !== o[e] && (r[e] = o[e]));
2158
+ return r;
2159
+ }
2160
+ function toTemporalCalendarIdentifier(e) {
2161
+ const t =
2162
+ getInternalSlotForPlainDate(e) ||
2163
+ getInternalSlotForPlainDateTime(e) ||
2164
+ getInternalSlotForPlainMonthDay(e) ||
2165
+ getInternalSlotForPlainYearMonth(e) ||
2166
+ getInternalSlotForZonedDateTime(e);
2167
+ return t
2168
+ ? t.Y
2169
+ : (validateString(e),
2170
+ canonicalizeCalendar(
2171
+ ((e) => {
2172
+ try {
2173
+ return parseIsoDateTime(e, [et, tt, ot, nt, rt, at]).Y || "iso8601";
2174
+ } catch {
2175
+ return (st.test(e) || throwRangeError(me), e);
2176
+ }
2177
+ })(e),
2178
+ ));
2179
+ }
2180
+ function getTemporalCalendarIdentifierWithIsoDefault(e) {
2181
+ const t =
2182
+ getInternalSlotForPlainDate(e) ||
2183
+ getInternalSlotForPlainDateTime(e) ||
2184
+ getInternalSlotForPlainMonthDay(e) ||
2185
+ getInternalSlotForPlainYearMonth(e) ||
2186
+ getInternalSlotForZonedDateTime(e);
2187
+ return t ? t.Y : mapUnlessUndefined(e.calendar, toTemporalCalendarIdentifier) || "iso8601";
2188
+ }
2189
+ function calendarDateFromFields(e, t, o) {
2190
+ return (calendarResolveFields(e, t), validateIsoDate(calendarDateToIso(e, t, o)));
2191
+ }
2192
+ function calendarYearMonthFromFields(e, t, o) {
2193
+ return (
2194
+ (t.day = 1), calendarResolveFields(e, t, m), validateIsoYearMonth(calendarDateToIso(e, t, o))
2195
+ );
2196
+ }
2197
+ function calendarMonthDayFromFields(e, t, o) {
2198
+ return (calendarResolveFields(e, t, u), calendarMonthDayToIsoReferenceDate(e, t, o));
2199
+ }
2200
+ function formatCalendarAnnotation(e, t) {
2201
+ return t === j || (t === C && "iso8601" === e) ? "" : `[${t === W ? "!" : ""}u-ca=${e}]`;
2202
+ }
2203
+ function calendarEquals(e, t) {
2204
+ return e === t;
2205
+ }
2206
+ function isoDaysInMonth(e, t) {
2207
+ return isoDateToEpochDays(e, t, 1) - isoDateToEpochDays(e, t - 1, 1);
2208
+ }
2209
+ function isoWeeksInYear(e) {
2210
+ return 4 === isoDayOfWeek(createIsoDateRecord(e, 1, 1)) ||
2211
+ 4 === isoDayOfWeek(createIsoDateRecord(e, 12, 31))
2212
+ ? 53
2213
+ : 52;
2214
+ }
2215
+ function isoWeekOfYear(e) {
2216
+ const t = e.t,
2217
+ o = divFloor(isoDayOfYear(e) + 10 - isoDayOfWeek(e), 7);
2218
+ return o < 1
2219
+ ? { t: t - 1, ce: isoWeeksInYear(t - 1) }
2220
+ : o > isoWeeksInYear(t)
2221
+ ? { t: t + 1, ce: 1 }
2222
+ : { t: t, ce: o };
2223
+ }
2224
+ function isoDayOfYear(e) {
2225
+ return isoDateRecordToEpochDays(e) - isoDateToEpochDays(e.t, 0, 0);
2226
+ }
2227
+ function isoDayOfWeek(e) {
2228
+ return modFloor(isoDateRecordToEpochDays(e) + 3, 7) + 1;
2229
+ }
2230
+ function isoCalendarIsoToDate(e) {
2231
+ return {
2232
+ t: e.t,
2233
+ u: e.u,
2234
+ v: createMonthCode(e.u),
2235
+ T: e.T,
2236
+ re: isoDayOfWeek(e),
2237
+ ae: isoDayOfYear(e),
2238
+ ie: isoWeekOfYear(e),
2239
+ se: 7,
2240
+ le: isoDaysInMonth(e.t, e.u),
2241
+ de: ((t = e.t), 365 + mathematicalInLeapYear(t)),
2242
+ me: 12,
2243
+ ue: !!mathematicalInLeapYear(e.t),
2244
+ };
2245
+ var t;
2246
+ }
2247
+ function calendarIsoToDate(e, t) {
2248
+ return "iso8601" === e ? isoCalendarIsoToDate(t) : nonIsoCalendarIsoToDate(e, t);
2249
+ }
2250
+ function calendarExtraFields(e, t) {
2251
+ return calendarSupportsEra(e) && t.includes("year") ? ["era", "eraYear"] : [];
2252
+ }
2253
+ function isoResolveFields(e, t) {
2254
+ (t !== u && void 0 === e[yt.t] && throwTypeError(missingField(yt.t)),
2255
+ t !== m && void 0 === e[yt.T] && throwTypeError(missingField(yt.T)),
2256
+ void 0 === e[yt.v] && void 0 === e[yt.u] && throwTypeError(missingField("month, monthCode")));
2257
+ const o = mapUnlessUndefined(e[yt.v], parseMonthCode);
2258
+ o &&
2259
+ ((o[0] > 12 || o[1] || (void 0 !== e[yt.u] && o[0] !== e[yt.u])) && throwRangeError(Ie),
2260
+ (e[yt.u] = o[0]));
2261
+ }
2262
+ function calendarResolveFields(e, t, o = s) {
2263
+ "iso8601" === e
2264
+ ? isoResolveFields(t, o)
2265
+ : (function (e, t, o = s) {
2266
+ const n = t[yt.oe],
2267
+ r = t[yt.ne];
2268
+ let a = t[yt.t];
2269
+ const i = t[yt.v],
2270
+ c = t[yt.u],
2271
+ l = t[yt.T];
2272
+ if (
2273
+ ((o === u && void 0 !== i && void 0 === c) ||
2274
+ void 0 !== a ||
2275
+ (calendarSupportsEraForNonIsoCalendars(e) && void 0 !== n && void 0 !== r) ||
2276
+ throwTypeError(missingField("year, era, eraYear")),
2277
+ calendarSupportsEraForNonIsoCalendars(e) &&
2278
+ (void 0 === n) != (void 0 === r) &&
2279
+ throwTypeError(),
2280
+ o !== m && void 0 === l && throwTypeError(missingField("day")),
2281
+ c === i && throwTypeError(missingField("month, monthCode")),
2282
+ calendarSupportsEraForNonIsoCalendars(e) && void 0 !== r)
2283
+ ) {
2284
+ const o = ((e, t, o) => {
2285
+ const n = canonicalizeEraInCalendar(e, t),
2286
+ r = St[e].get(n);
2287
+ return !1 === r ? 1 - o : r + o - 1;
2288
+ })(e, canonicalizeEraInCalendar(e, n), r);
2289
+ (void 0 !== a && a !== o && throwRangeError("mismatch of `year`, `era` and `eraYear`"),
2290
+ (t[yt.t] = o));
2291
+ }
2292
+ if (((t[yt.oe] = t[yt.ne] = void 0), isIsoLikeCalendar(e))) isoResolveFields(t, o);
2293
+ else if (void 0 !== i) {
2294
+ ((e, t) => {
2295
+ const o = parseMonthCode(t);
2296
+ return (
2297
+ (isWithin(o[0], 1, 12) && !o[1]) ||
2298
+ (("chinese" === e || "dangi" === e) && isWithin(o[0], 1, 12)) ||
2299
+ (isCopticOrEthiopic(e) && "M13" === t) ||
2300
+ ("hebrew" === e && "M05L" === t)
2301
+ );
2302
+ })(e, i) || throwRangeError(invalidMonthCode(i));
2303
+ const o = t[yt.t];
2304
+ if (void 0 !== o) {
2305
+ const n = monthCodeToOrdinal(e, o, constrainMonthCode(e, o, i, h));
2306
+ (void 0 !== c && c !== n && throwRangeError(Ie), (t[yt.u] = n));
2307
+ }
2308
+ }
2309
+ })(e, t, o);
2310
+ }
2311
+ function createEmptyCalendarFieldsRecord() {
2312
+ return createNullPrototypeObject({});
2313
+ }
2314
+ function zeroDateDuration() {
2315
+ return createDateDurationRecord(0, 0, 0, 0);
2316
+ }
2317
+ function toInternalDurationRecord(e) {
2318
+ return combineDateAndTimeDuration(
2319
+ createDateDurationRecord(e[X], e[Q], e[ee], e[te]),
2320
+ timeDurationFromComponents(e[oe], e[ne], e[re], e[ae], e[ie], e[ce]),
2321
+ );
2322
+ }
2323
+ function toInternalDurationRecordWith24HourDays([e, t, o, n, ...r]) {
2324
+ return combineDateAndTimeDuration(
2325
+ createDateDurationRecord(e, t, o, 0),
2326
+ add24HourDaysToTimeDuration(timeDurationFromComponents(...r), n),
2327
+ );
2328
+ }
2329
+ function temporalDurationFromInternal(e, t) {
2330
+ const [o, ...n] = balanceTimeDuration(e.p, t);
2331
+ return createTemporalDurationSlot([e.A.ee, e.A.te, e.A.X, e.A.K + o, ...n]);
2332
+ }
2333
+ function createDateDurationRecord(e, t, o, n) {
2334
+ return (validateDuration(e, t, o, n, 0, 0, 0, 0, 0, 0), { ee: e, te: t, X: o, K: n });
2335
+ }
2336
+ function adjustDateDurationRecord(e, t, o = e.X, n = e.te) {
2337
+ return createDateDurationRecord(e.ee, n, o, t);
2338
+ }
2339
+ function combineDateAndTimeDuration(e, t) {
2340
+ return { A: e, p: t };
2341
+ }
2342
+ function toTemporalDuration(e) {
2343
+ return (
2344
+ (t = e),
2345
+ Et.has(t)
2346
+ ? getInternalSlotOrThrowForDuration(e)
2347
+ : isObject(e)
2348
+ ? createTemporalDurationSlot(toTemporalPartialDurationRecord(e).map((e) => e || 0))
2349
+ : (validateString(e),
2350
+ ((e) => {
2351
+ const t = (e = asciiLowerCase(e)).match(
2352
+ /^([+-]?)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)?)?$/,
2353
+ );
2354
+ (t && !/[pt]$|[.,](\d{1,9})[hms]./.test(e)) || throwRangeError(me);
2355
+ const o = balanceTime(
2356
+ 0,
2357
+ 0,
2358
+ 0,
2359
+ 0,
2360
+ 0,
2361
+ 3600 * toIntegerWithTruncation((t[7] || "").padEnd(9, "0")) +
2362
+ 60 * toIntegerWithTruncation((t[9] || "").padEnd(9, "0")) +
2363
+ toIntegerWithTruncation((t[11] || "").padEnd(9, "0")),
2364
+ );
2365
+ return applySignToDurationSlot(
2366
+ createTemporalDurationSlot([
2367
+ toIntegerWithTruncation(t[2] || ""),
2368
+ toIntegerWithTruncation(t[3] || ""),
2369
+ toIntegerWithTruncation(t[4] || ""),
2370
+ toIntegerWithTruncation(t[5] || ""),
2371
+ toIntegerWithTruncation(t[6] || ""),
2372
+ toIntegerWithTruncation(t[8] || "") + o.I,
2373
+ toIntegerWithTruncation(t[10] || "") + o.O,
2374
+ o.F,
2375
+ o.S,
2376
+ o.$,
2377
+ ]),
2378
+ toIntegerWithTruncation(`${t[1]}1`),
2379
+ );
2380
+ })(e))
2381
+ );
2382
+ var t;
2383
+ }
2384
+ function durationSign(e) {
2385
+ return sign(e.find((e) => 0 !== e) || 0);
2386
+ }
2387
+ function dateDurationSign(e) {
2388
+ return sign(e.ee || e.te || e.X || e.K);
2389
+ }
2390
+ function internalDurationSign(e) {
2391
+ return dateDurationSign(e.A) || Mt(e.p);
2392
+ }
2393
+ function validateDuration(...e) {
2394
+ (e.some((e) => e < 0) && e.some((e) => e > 0) && throwRangeError("invalid duration"),
2395
+ (e.every((e) => Math.abs(e) < 1e25) &&
2396
+ Math.abs(e[X]) < 2 ** 32 &&
2397
+ Math.abs(e[Q]) < 2 ** 32 &&
2398
+ Math.abs(e[ee]) < 2 ** 32) ||
2399
+ throwRangeError(De),
2400
+ validateTimeDurationRange(
2401
+ timeDurationFromComponents(24 * e[te] + e[oe], e[ne], e[re], e[ae], e[ie], e[ce]),
2402
+ ));
2403
+ }
2404
+ function defaultTemporalLargestUnit(e) {
2405
+ return (e.findIndex((e) => 0 !== e) + 10) % 10;
2406
+ }
2407
+ function toTemporalPartialDurationRecord(e) {
2408
+ isObject(e) || throwTypeError(notObject(e));
2409
+ const t = [3, 4, 8, 7, 5, 1, 9, 6, 2, 0].map((t) =>
2410
+ mapUnlessUndefined(e[le[t]], toIntegerIfIntegral),
2411
+ );
2412
+ return (
2413
+ t.every((e) => void 0 === e) && throwTypeError(Fe),
2414
+ [9, 5, 8, 0, 1, 4, 7, 3, 2, 6].map((e) => t[e])
2415
+ );
2416
+ }
2417
+ function createTemporalDurationSlot(e) {
2418
+ return (validateDuration(...e), e);
2419
+ }
2420
+ function createTemporalDuration(e, t = Object.create(bt.prototype)) {
2421
+ return (Et.set(t, e), t);
2422
+ }
2423
+ function timeDurationFromComponents(e, t, o, n, c, s) {
2424
+ return addTimeDuration(
2425
+ addTimeDuration(
2426
+ addTimeDuration(
2427
+ createTimeDurationFromSeconds(3600 * e + 60 * t + o),
2428
+ normalize(divTrunc((m = n), r), (m % r) * 1e6),
2429
+ ),
2430
+ ((d = c), normalize(Math.round((d - (d % a)) / a), (d % a) * 1e3)),
2431
+ ),
2432
+ ((l = s), normalize(Math.round((l - (l % i)) / i), l % i)),
2433
+ );
2434
+ var l, d, m;
2435
+ }
2436
+ function add24HourDaysToTimeDuration(e, t) {
2437
+ return validateTimeDurationRange(((e, t) => normalize(e[0] + t, e[1]))(e, t));
2438
+ }
2439
+ function timeDurationFromEpochNanosecondsDifference(e, t) {
2440
+ return differenceEpochNanoseconds(t, e);
2441
+ }
2442
+ function roundTimeDurationToIncrement(e, t, o) {
2443
+ return validateTimeDurationRange(
2444
+ ((e, t, o) =>
2445
+ normalize(2 * divTrunc(e[0], 2), roundNumberToIncrement(e[1] + (e[0] % 2) * i, t, o)))(
2446
+ e,
2447
+ t,
2448
+ o,
2449
+ ),
2450
+ );
2451
+ }
2452
+ function dateDurationDays(e, t) {
2453
+ const o = adjustDateDurationRecord(e, 0);
2454
+ return dateDurationSign(e)
2455
+ ? e.K +
2456
+ isoDateRecordToEpochDays(calendarDateAdd(t.Y, t.o, o, h)) -
2457
+ isoDateRecordToEpochDays(t.o)
2458
+ : e.K;
2459
+ }
2460
+ function roundTimeDuration(e, t, o, n) {
2461
+ return roundTimeDurationToIncrement(e, nanosecondsForTimeUnit(o) * t, n);
2462
+ }
2463
+ function totalTimeDuration(e, t) {
2464
+ return divideTimeDurationToFloatingPoint(e, nanosecondsForTimeUnit(t));
2465
+ }
2466
+ function computeNudgeWindow(e, t, o, n, r, a, i, c, s) {
2467
+ let l, d, m, u, T;
2468
+ if (c === x)
2469
+ ((l = roundNumberToIncrement(t.A.ee, i, P) + (s ? i * e : 0)),
2470
+ (d = l + i * e),
2471
+ (m = createDateDurationRecord(l, 0, 0, 0)),
2472
+ (u = createDateDurationRecord(d, 0, 0, 0)));
2473
+ else if (c === H)
2474
+ ((l = roundNumberToIncrement(t.A.te, i, P) + (s ? i * e : 0)),
2475
+ (d = l + i * e),
2476
+ (m = adjustDateDurationRecord(t.A, 0, 0, l)),
2477
+ (u = adjustDateDurationRecord(t.A, 0, 0, d)));
2478
+ else if (c === q) {
2479
+ const o = calendarDateAdd(a, n.o, adjustDateDurationRecord(t.A, 0, 0), h);
2480
+ ((l = roundNumberToIncrement(
2481
+ t.A.X + calendarDateUntil(a, o, addDaysToIsoDate(o, t.A.K), q).X,
2482
+ i,
2483
+ P,
2484
+ )),
2485
+ (d = l + i * e),
2486
+ (m = adjustDateDurationRecord(t.A, 0, l)),
2487
+ (u = adjustDateDurationRecord(t.A, 0, d)));
2488
+ } else
2489
+ ((l = roundNumberToIncrement(t.A.K, i, P)),
2490
+ (d = l + i * e),
2491
+ (m = adjustDateDurationRecord(t.A, l)),
2492
+ (u = adjustDateDurationRecord(t.A, d)));
2493
+ if (0 === l) T = o;
2494
+ else {
2495
+ const e = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, m, h), n.p);
2496
+ T = r ? getEpochNanosecondsFor(r, e, g) : getUtcEpochNanoseconds(e);
2497
+ }
2498
+ const D = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, u, h), n.p);
2499
+ return {
2500
+ he: l,
2501
+ De: d,
2502
+ pe: T,
2503
+ ge: r ? getEpochNanosecondsFor(r, D, g) : getUtcEpochNanoseconds(D),
2504
+ fe: m,
2505
+ Ie: u,
2506
+ };
2507
+ }
2508
+ function nudgeToCalendarUnit(e, t, o, n, r, a, i, c, s, l) {
2509
+ let d = !1,
2510
+ m = computeNudgeWindow(e, t, o, r, a, i, c, s, !1);
2511
+ compareEpochNanoseconds(m.pe, n) * compareEpochNanoseconds(m.ge, n) > 0 &&
2512
+ ((m = computeNudgeWindow(e, t, o, r, a, i, c, s, !0)), (d = !0));
2513
+ const u = differenceEpochNanoseconds(m.pe, n),
2514
+ T = differenceEpochNanoseconds(m.pe, m.ge);
2515
+ let D = m.fe,
2516
+ h = m.pe;
2517
+ return (
2518
+ roundNumberToIncrement(
2519
+ m.he +
2520
+ ((e, t, o) =>
2521
+ signTimeDuration(e) ? (Me(e, t) ? (Me(addTimeDuration(e, e), t) * o) / 5 + 0.5 : 1) : 0)(
2522
+ u,
2523
+ T,
2524
+ e,
2525
+ ) *
2526
+ c *
2527
+ e,
2528
+ c,
2529
+ l,
2530
+ ) === m.De && ((d = !0), (D = m.Ie), (h = m.ge)),
2531
+ {
2532
+ Oe: { Fe: combineDateAndTimeDuration(D, createTimeDurationFromSeconds(0)), Se: h, ye: d },
2533
+ we:
2534
+ m.he +
2535
+ (divideTimeDurationToFloatingPoint(u, 1e9) / divideTimeDurationToFloatingPoint(T, 1e9)) *
2536
+ c *
2537
+ e,
2538
+ }
2539
+ );
2540
+ }
2541
+ function roundRelativeDuration(e, t, o, n, r, a, i, c, s, l) {
2542
+ const d = internalDurationSign(e) || 1,
2543
+ m =
2544
+ isCalendarUnit(s) || (r && s === B)
2545
+ ? nudgeToCalendarUnit(d, e, t, o, n, r, a, c, s, l).Oe
2546
+ : r
2547
+ ? ((e, t, o, n, r, a, i, c) => {
2548
+ const s = calendarDateAdd(r, o.o, t.A, h),
2549
+ l = combineIsoDateAndTimeRecord(s, o.p),
2550
+ d = combineIsoDateAndTimeRecord(addDaysToIsoDate(s, e), o.p),
2551
+ m = getEpochNanosecondsFor(n, l, g),
2552
+ u = getEpochNanosecondsFor(n, d, g),
2553
+ T = timeDurationFromEpochNanosecondsDifference(u, m),
2554
+ D = nanosecondsForTimeUnit(i);
2555
+ let p = roundTimeDurationToIncrement(t.p, a * D, c);
2556
+ const f = addTimeDuration(p, negateTimeDuration(T));
2557
+ let I,
2558
+ O = !1,
2559
+ F = 0;
2560
+ return (
2561
+ Mt(f) !== -e
2562
+ ? ((O = !0),
2563
+ (F = e),
2564
+ (p = roundTimeDurationToIncrement(f, a * D, c)),
2565
+ (I = addTimeDurationToEpochNanoseconds(u, p)))
2566
+ : (I = addTimeDurationToEpochNanoseconds(u, p)),
2567
+ {
2568
+ Fe: combineDateAndTimeDuration(adjustDateDurationRecord(t.A, t.A.K + F), p),
2569
+ Se: I,
2570
+ ye: O,
2571
+ }
2572
+ );
2573
+ })(d, e, n, r, a, c, s, l)
2574
+ : (function (e, t, o, n, r, a) {
2575
+ const i = add24HourDaysToTimeDuration(e.p, e.A.K),
2576
+ c =
2577
+ r === B
2578
+ ? roundTimeDurationByDays(i, n, a)
2579
+ : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a),
2580
+ s = c[0],
2581
+ [l, d] = isDateUnit(o)
2582
+ ? [s, addTimeDuration(c, timeDurationFromComponents(24 * -s, 0, 0, 0, 0, 0))]
2583
+ : [0, c];
2584
+ return {
2585
+ Fe: combineDateAndTimeDuration(adjustDateDurationRecord(e.A, l), d),
2586
+ Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(c, negateTimeDuration(i))),
2587
+ ye: sign(s - i[0]) === Mt(i),
2588
+ };
2589
+ })(e, o, i, c, s, l);
2590
+ return m.ye && s !== q
2591
+ ? ((e, t, o, n, r, a, i, c) => {
2592
+ if (c === i) return t;
2593
+ const s = i;
2594
+ let l;
2595
+ for (let i = c - 1; i >= s; i--)
2596
+ if (i !== ee || s === ee) {
2597
+ l =
2598
+ i === X
2599
+ ? createDateDurationRecord(t.A.ee + e, 0, 0, 0)
2600
+ : i === Q
2601
+ ? adjustDateDurationRecord(t.A, 0, 0, t.A.te + e)
2602
+ : adjustDateDurationRecord(t.A, 0, t.A.X + e);
2603
+ const c = combineIsoDateAndTimeRecord(calendarDateAdd(a, n.o, l, h), n.p);
2604
+ if (
2605
+ Mt(
2606
+ differenceEpochNanoseconds(
2607
+ r ? getEpochNanosecondsFor(r, c, g) : getUtcEpochNanoseconds(c),
2608
+ o,
2609
+ ),
2610
+ ) === -e
2611
+ )
2612
+ break;
2613
+ t = combineDateAndTimeDuration(l, createTimeDurationFromSeconds(0));
2614
+ }
2615
+ return t;
2616
+ })(d, m.Fe, m.Se, n, r, a, i, largerOfTwoTemporalUnits(s, B))
2617
+ : m.Fe;
2618
+ }
2619
+ function totalRelativeDuration(e, t, o, n, r, a, i) {
2620
+ return isCalendarUnit(i) || (r && i === B)
2621
+ ? nudgeToCalendarUnit(internalDurationSign(e) || 1, e, t, o, n, r, a, 1, i, P).we
2622
+ : totalTimeDuration(add24HourDaysToTimeDuration(e.p, e.A.K), i);
2623
+ }
2624
+ function temporalDurationToString(e, t) {
2625
+ const o = durationSign(e),
2626
+ n = timeDurationFromComponents(
2627
+ 0,
2628
+ 0,
2629
+ (e = applySignToDurationSlot(e, o))[re],
2630
+ e[ae],
2631
+ e[ie],
2632
+ e[ce],
2633
+ ),
2634
+ [, , , r, a, i, c] = balanceTimeDuration(n, _),
2635
+ [s, l, d, m, u, T] = ["Y", "M", "W", "D", "H", "M"].map((t, o) => (e[o] ? `${e[o]}${t}` : "")),
2636
+ D = `${u}${T}${Mt(n) || defaultTemporalLargestUnit(e) >= _ || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + c, t)}S` : ""}`;
2637
+ return `${o < 0 ? "-" : ""}P${s}${l}${d}${m}${D && `T${D}`}`;
2638
+ }
2639
+ function addDurations(e, t, o) {
2640
+ const n = applySignToDurationSlot(toTemporalDuration(o), e),
2641
+ r = largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), defaultTemporalLargestUnit(n));
2642
+ return (
2643
+ isCalendarUnit(r) && throwRangeError(durationWithDateUnit(r)),
2644
+ createTemporalDuration(
2645
+ temporalDurationFromInternal(
2646
+ combineDateAndTimeDuration(
2647
+ zeroDateDuration(),
2648
+ addTimeDuration(
2649
+ toInternalDurationRecordWith24HourDays(t).p,
2650
+ toInternalDurationRecordWith24HourDays(n).p,
2651
+ ),
2652
+ ),
2653
+ r,
2654
+ ),
2655
+ )
2656
+ );
2657
+ }
2658
+ function getInternalSlotOrThrowForDuration(e) {
2659
+ const t = Et.get(e);
2660
+ return (t || throwTypeError(ge), t);
2661
+ }
2662
+ function applySignToDurationSlot(e, t) {
2663
+ return createTemporalDurationSlot(e.map((e) => e * t + 0));
2664
+ }
2665
+ function validateTimeDurationRange(e) {
2666
+ return (
2667
+ ((e) => Me(absTimeDuration(e), createTimeDurationFromSeconds(2 ** 53)) < 0)(e) ||
2668
+ throwRangeError(De),
2669
+ e
2670
+ );
2671
+ }
2672
+ function balanceTimeDuration(e, t) {
2673
+ const o = clamp(t, 3, 9);
2674
+ return [
2675
+ ...[0, 0, 0, 0, 0, 0].slice(0, o - te),
2676
+ o > re
2677
+ ? timeDurationToSubsecondsNumber(e, 18 - 3 * o)
2678
+ : divTrunc(((r = e), r[0] * n + divTrunc(r[1], 1e9)), de[o - te] / 1e9),
2679
+ ...[0, 1, 2, 3, 4, 5]
2680
+ .map((t) => (divTrunc(e[1], de[t + 1]) % (de[t] / de[t + 1])) + 0)
2681
+ .slice(o - te),
2682
+ ];
2683
+ var r;
2684
+ }
2685
+ function isIntegerAndHalf(e) {
2686
+ return Math.abs(e) % 1 == 0.5;
2687
+ }
2688
+ function roundExpand(e) {
2689
+ return (e < 0 ? Math.floor(e) : Math.ceil(e)) + 0;
2690
+ }
2691
+ function roundHalfCeil(e) {
2692
+ return (isIntegerAndHalf(e) ? Math.ceil(e) : Math.round(e)) + 0;
2693
+ }
2694
+ function roundHalfFloor(e) {
2695
+ return (isIntegerAndHalf(e) ? Math.floor(e) : Math.round(e)) + 0;
2696
+ }
2697
+ function roundHalfEven(e) {
2698
+ return (isIntegerAndHalf(e) ? (e = Math.trunc(e)) + (e % 2) : Math.round(e)) + 0;
2699
+ }
2700
+ function isoDateToEpochDays(e, t, o) {
2701
+ const n = balanceIsoYearMonth(e, t + 1);
2702
+ return Date.UTC((n.t % 400) - 400, n.u - 1, 0) / r + (divTrunc(n.t, 400) + 1) * c + o;
2703
+ }
2704
+ function isoDateRecordToEpochDays(e) {
2705
+ return isoDateToEpochDays(e.t, e.u - 1, e.T);
2706
+ }
2707
+ function mathematicalInLeapYear(e) {
2708
+ return +!(e % (e % 25 ? 4 : 16));
2709
+ }
2710
+ function getTemporalOverflowOption(e) {
2711
+ return getOption(e, "overflow", [h, p], h);
2712
+ }
2713
+ function getTemporalDisambiguationOption(e) {
2714
+ return getOption(e, "disambiguation", [g, "earlier", f, I], g);
2715
+ }
2716
+ function negateRoundingMode(e) {
2717
+ return e === E ? M : e === M ? E : e === R ? N : e === N ? R : e;
2718
+ }
2719
+ function getTemporalOffsetOption(e, t) {
2720
+ return getOption(e, "offset", [O, "use", F, S], t);
2721
+ }
2722
+ function getTemporalShowCalendarNameOption(e) {
2723
+ return getOption(e, "calendarName", [C, U, j, W], C);
2724
+ }
2725
+ function validateTemporalRoundingIncrement(e, t, o) {
2726
+ (e > (o ? t : t - 1) || t % e !== 0) && throwRangeError(invalidField("roundingIncrement"));
2727
+ }
2728
+ function getTemporalFractionalSecondDigitsOption(e) {
2729
+ const t = "fractionalSecondDigits",
2730
+ o = e[t];
2731
+ if (void 0 === o) return;
2732
+ if ("number" != typeof o)
2733
+ return void ("auto" !== toString(o) && throwRangeError(invalidField(t)));
2734
+ (!isNaN(o) && isFinite(o)) || throwRangeError(invalidField(t));
2735
+ const n = Math.floor(o);
2736
+ return (isWithin(n, 0, 9) || throwRangeError(invalidField(t)), n);
2737
+ }
2738
+ function toSecondsStringPrecisionRecord(e, t) {
2739
+ return e
2740
+ ? { $e: e === G ? D : 3 * (e - 6), ve: e, Ee: 1 }
2741
+ : { $e: t, ve: divFloor((t ?? 9) - 1, 3) + 7, Ee: 10 ** ((9 - (t ?? 9)) % 3) };
2742
+ }
2743
+ function getTemporalUnitValuedOption(e, t, o) {
2744
+ return mapUnlessUndefined(getOption(e, t, [...se, ...le, "auto"], o), (e) => {
2745
+ return "auto" === e ? "auto" : ((t = e.replace(/s$/, "")), se.indexOf(t));
2746
+ var t;
2747
+ });
2748
+ }
2749
+ function validateTemporalUnitValue(e, t, o = []) {
2750
+ void 0 === e ||
2751
+ o.includes(e) ||
2752
+ ("auto" === e && throwRangeError(disallowedUnit(e)),
2753
+ ((e <= B && t === l) || (e > B && t === s)) && throwRangeError(disallowedUnit(e)));
2754
+ }
2755
+ function getTemporalRelativeToOption(e) {
2756
+ const t = e.relativeTo;
2757
+ if (void 0 === t) return createNullPrototypeObject({});
2758
+ let o,
2759
+ n,
2760
+ r,
2761
+ a,
2762
+ i,
2763
+ c = !0,
2764
+ s = y;
2765
+ if (isObject(t)) {
2766
+ if (isZonedDateTime(t))
2767
+ return createNullPrototypeObject({ Me: getInternalSlotOrThrowForZonedDateTime(t) });
2768
+ if (isPlainDate(t))
2769
+ return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(t) });
2770
+ const e = getInternalSlotForPlainDateTime(t);
2771
+ if (e)
2772
+ return createNullPrototypeObject({
2773
+ be: getInternalSlotOrThrowForPlainDate(createTemporalDate(e._.o, e.Y)),
2774
+ });
2775
+ r = getTemporalCalendarIdentifierWithIsoDefault(t);
2776
+ const c = prepareCalendarFields(
2777
+ r,
2778
+ t,
2779
+ [yt.t, yt.u, yt.v, yt.T, yt.D, yt.I, yt.O, yt.F, yt.S, yt.$, yt.M, yt.P],
2780
+ [],
2781
+ ),
2782
+ l = interpretTemporalDateTimeFields(r, c, h);
2783
+ ((a = l.o), (i = l.p), (o = c.timeZone), (n = c.offset), (s = n ? y : v));
2784
+ } else {
2785
+ validateString(t);
2786
+ const e = parseIsoDateTime(t, [et, tt]);
2787
+ ((n = e.P.N),
2788
+ e.P.R
2789
+ ? ((o = toTemporalTimeZoneIdentifier(e.P.R)),
2790
+ (s = e.P.Z ? w : n ? y : v),
2791
+ (c = void 0 !== n && hasUtcOffsetSubMinuteParts(n)))
2792
+ : (o = void 0),
2793
+ (r = canonicalizeCalendar(e.Y || "iso8601")),
2794
+ (a = createIsoDateRecord(e.t, e.u, e.T)),
2795
+ (i = e.p));
2796
+ }
2797
+ return createNullPrototypeObject(
2798
+ o
2799
+ ? {
2800
+ Me: getInternalSlotOrThrowForZonedDateTime(
2801
+ createTemporalZonedDateTime(
2802
+ interpretISODateTimeOffset(
2803
+ a,
2804
+ i,
2805
+ s,
2806
+ s === y ? parseDateTimeUtcOffset(n) : 0,
2807
+ o,
2808
+ g,
2809
+ S,
2810
+ c,
2811
+ ),
2812
+ o,
2813
+ r,
2814
+ ),
2815
+ ),
2816
+ }
2817
+ : { be: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) },
2818
+ );
2819
+ }
2820
+ function largerOfTwoTemporalUnits(e, t) {
2821
+ return e < t ? e : t;
2822
+ }
2823
+ function isCalendarUnit(e) {
2824
+ return e < B;
2825
+ }
2826
+ function isDateUnit(e) {
2827
+ return e <= B;
2828
+ }
2829
+ function maximumTemporalDurationRoundingIncrement(e) {
2830
+ return [24, 60, 60][e - 4] || 1e3;
2831
+ }
2832
+ function validatePartialTemporalObject(e) {
2833
+ (!isObject(e) ||
2834
+ isPlainDate(e) ||
2835
+ isPlainDateTime(e) ||
2836
+ isPlainMonthDay(e) ||
2837
+ isPlainTime(e) ||
2838
+ isPlainYearMonth(e) ||
2839
+ isZonedDateTime(e) ||
2840
+ void 0 !== e.calendar ||
2841
+ void 0 !== e.timeZone) &&
2842
+ throwTypeError("invalid argument for `with` method");
2843
+ }
2844
+ function formatFractionalSeconds(e, t) {
2845
+ const o = toZeroPaddedDecimalString(e, 9);
2846
+ return void 0 === t
2847
+ ? 0 === e
2848
+ ? ""
2849
+ : `.${o.replace(/0*$/, "")}`
2850
+ : 0 === t
2851
+ ? ""
2852
+ : `.${o.slice(0, t)}`;
2853
+ }
2854
+ function formatTimeString(e, t, o, n, r) {
2855
+ return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r === D ? "" : `:${toZeroPaddedDecimalString(o, 2)}${formatFractionalSeconds(n, r)}`}`;
2856
+ }
2857
+ function roundNumberToIncrement(e, t, o) {
2858
+ return Pt[o](e / t) * t;
2859
+ }
2860
+ function getRoundingModeOption(e, t) {
2861
+ return getOption(e, "roundingMode", [E, M, b, P, R, N, Z, $, Y], t);
2862
+ }
2863
+ function getRoundingIncrementOption(e) {
2864
+ const t = "roundingIncrement",
2865
+ o = mapUnlessUndefined(e[t], toIntegerWithTruncation) ?? 1;
2866
+ return ((o < 1 || o > 1e9) && throwRangeError(invalidField(t)), o);
2867
+ }
2868
+ function isoDateToFields(e, t, o) {
2869
+ const n = calendarIsoToDate(e, t);
2870
+ return createNullPrototypeObject({
2871
+ [yt.t]: o === u ? void 0 : n.t,
2872
+ [yt.v]: n.v,
2873
+ [yt.T]: o === m ? void 0 : n.T,
2874
+ });
2875
+ }
2876
+ function getDifferenceSettings(e, t, o, n, r, a) {
2877
+ let i = getTemporalUnitValuedOption(t, "largestUnit", void 0) ?? "auto";
2878
+ const c = getRoundingIncrementOption(t),
2879
+ s = getRoundingModeOption(t, P),
2880
+ l = getTemporalUnitValuedOption(t, "smallestUnit", void 0) ?? r;
2881
+ return (
2882
+ validateTemporalUnitValue(i, o, ["auto"]),
2883
+ n.includes(i) && throwRangeError(disallowedUnit(i)),
2884
+ validateTemporalUnitValue(l, o),
2885
+ n.includes(l) && throwRangeError(disallowedUnit(l)),
2886
+ "auto" === i && (i = largerOfTwoTemporalUnits(a, l)),
2887
+ i > l && throwRangeError(fe),
2888
+ isDateUnit(l) ||
2889
+ validateTemporalRoundingIncrement(c, maximumTemporalDurationRoundingIncrement(l), !1),
2890
+ { H: l, L: i, q: -1 === e ? negateRoundingMode(s) : s, V: c }
2891
+ );
2892
+ }
2893
+ function getUtcEpochNanoseconds(e) {
2894
+ return addNanosecondsToEpochSeconds(
2895
+ createEpochNanosecondsFromEpochMilliseconds(
2896
+ utcEpochMilliseconds(e.o.t, e.o.u, e.o.T, e.p.D, e.p.I, e.p.O, e.p.F),
2897
+ ),
2898
+ 1e3 * e.p.S + e.p.$,
2899
+ );
2900
+ }
2901
+ function epochDaysToIsoDate(e) {
2902
+ const t = new Date(modFloor(e, c) * r);
2903
+ return {
2904
+ t: t.getUTCFullYear() + 400 * divFloor(e, c),
2905
+ u: t.getUTCMonth() + 1,
2906
+ T: t.getUTCDate(),
2907
+ };
2908
+ }
2909
+ function isoDateTimeToFields(e, t) {
2910
+ return createNullPrototypeObject({
2911
+ ...isoDateToFields(e, t.o, s),
2912
+ [yt.D]: t.p.D,
2913
+ [yt.I]: t.p.I,
2914
+ [yt.O]: t.p.O,
2915
+ [yt.F]: t.p.F,
2916
+ [yt.S]: t.p.S,
2917
+ [yt.$]: t.p.$,
2918
+ });
2919
+ }
2920
+ function getInternalSlotOrThrowForDateTimeFormat(e) {
2921
+ const t = $t.get(e);
2922
+ return (t || throwTypeError(ge), t);
2923
+ }
2924
+ function formatDateTime(e, t) {
2925
+ const [o, n] = handleDateTimeValue(getInternalSlotOrThrowForDateTimeFormat(e), t);
2926
+ return o.format(n);
2927
+ }
2928
+ function removeDateTimeFormatOptions(e, t) {
2929
+ for (const o of t) e[o] = void 0;
2930
+ }
2931
+ function dateStyleToMonthStyle(e) {
2932
+ return "short" === e ? "numeric" : "medium" === e ? "short" : "long";
2933
+ }
2934
+ function amendOptionsForPlainDate(e) {
2935
+ const t = createNullPrototypeObject(e);
2936
+ return (
2937
+ hasAnyOptions(e, Yt) ||
2938
+ (hasAnyOptions(e, Ct) && throwTypeError(he), (t.year = t.month = t.day = "numeric")),
2939
+ removeDateTimeFormatOptions(t, [...Ct, "timeZoneName"]),
2940
+ (t.timeZone = "UTC"),
2941
+ t
2942
+ );
2943
+ }
2944
+ function amendOptionsForPlainTime(e) {
2945
+ const t = createNullPrototypeObject(e);
2946
+ return (
2947
+ hasAnyOptions(e, Ct) ||
2948
+ (hasAnyOptions(e, Yt) && throwTypeError(he), (t.hour = t.minute = t.second = "numeric")),
2949
+ ("long" !== e.timeStyle && "full" !== e.timeStyle) ||
2950
+ (removeDateTimeFormatOptions(t, ["timeStyle"]), (t.hour = t.minute = t.second = "numeric")),
2951
+ removeDateTimeFormatOptions(t, [...Yt, "era", "timeZoneName"]),
2952
+ (t.timeZone = "UTC"),
2953
+ t
2954
+ );
2955
+ }
2956
+ function amendOptionsForPlainDateTime(e) {
2957
+ const t = createNullPrototypeObject(e);
2958
+ return (
2959
+ ("long" !== e.timeStyle && "full" !== e.timeStyle) ||
2960
+ (removeDateTimeFormatOptions(t, ["timeStyle"]),
2961
+ (t.hour = t.minute = t.second = "numeric"),
2962
+ e.dateStyle &&
2963
+ (removeDateTimeFormatOptions(t, ["dateStyle"]),
2964
+ (t.year = t.day = "numeric"),
2965
+ (t.month = dateStyleToMonthStyle(e.dateStyle)),
2966
+ (t.weekday = "full" === e.dateStyle ? "long" : void 0))),
2967
+ hasAnyOptions(e, [...Yt, ...Ct]) ||
2968
+ (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"),
2969
+ removeDateTimeFormatOptions(t, ["timeZoneName"]),
2970
+ (t.timeZone = "UTC"),
2971
+ t
2972
+ );
2973
+ }
2974
+ function amendOptionsForPlainYearMonth(e) {
2975
+ const t = createNullPrototypeObject(e);
2976
+ return (
2977
+ e.dateStyle &&
2978
+ (removeDateTimeFormatOptions(t, ["dateStyle"]),
2979
+ (t.year = "short" === e.dateStyle ? "2-digit" : "numeric"),
2980
+ (t.month = dateStyleToMonthStyle(e.dateStyle))),
2981
+ hasAnyOptions(e, ["year", "month", "dateStyle"]) ||
2982
+ (hasAnyOptions(e, [...Yt, ...Ct]) && throwTypeError(he), (t.year = t.month = "numeric")),
2983
+ removeDateTimeFormatOptions(t, [...Ct, "day", "weekday", "timeZoneName"]),
2984
+ (t.timeZone = "UTC"),
2985
+ t
2986
+ );
2987
+ }
2988
+ function amendOptionsForPlainMonthDay(e) {
2989
+ const t = createNullPrototypeObject(e);
2990
+ return (
2991
+ e.dateStyle &&
2992
+ (removeDateTimeFormatOptions(t, ["dateStyle"]),
2993
+ (t.month = dateStyleToMonthStyle(e.dateStyle)),
2994
+ (t.day = "numeric")),
2995
+ hasAnyOptions(e, ["month", "day", "dateStyle"]) ||
2996
+ (hasAnyOptions(e, [...Yt, ...Ct]) && throwTypeError(he), (t.month = t.day = "numeric")),
2997
+ removeDateTimeFormatOptions(t, [...Ct, "era", "year", "weekday", "timeZoneName"]),
2998
+ (t.timeZone = "UTC"),
2999
+ t
3000
+ );
3001
+ }
3002
+ function amendOptionsForInstant(e) {
3003
+ const t = createNullPrototypeObject(e);
3004
+ return (
3005
+ hasAnyOptions(e, [...Yt, ...Ct]) ||
3006
+ (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"),
3007
+ t
3008
+ );
3009
+ }
3010
+ function hasAnyOptions(e, t) {
3011
+ return t.some((t) => void 0 !== e[t]);
3012
+ }
3013
+ function createDateTimeFormat(
3014
+ e,
3015
+ t = createNullPrototypeObject({}),
3016
+ o,
3017
+ n,
3018
+ r = Object.create(jt.prototype),
3019
+ ) {
3020
+ null === t && throwTypeError(he);
3021
+ const a = ((e, t) => {
3022
+ const o = createNullPrototypeObject({});
3023
+ for (const n of t) o[n] = e[n];
3024
+ return o;
3025
+ })(Object(t), Zt);
3026
+ ((a.hour12 = mapUnlessUndefined(a.hour12, toBoolean)),
3027
+ (a.hourCycle = mapUnlessUndefined(a.hourCycle, toString)),
3028
+ (a.formatMatcher = mapUnlessUndefined(a.formatMatcher, toString)),
3029
+ void 0 !== n &&
3030
+ (void 0 !== a.timeZone && throwTypeError("disallowed field: timeZone"),
3031
+ (a.timeZone = n),
3032
+ hasAnyOptions(a, [...Yt, ...Ct, "timeZoneName"]) || (a.timeZoneName = "short")));
3033
+ const i = new Nt(e, a),
3034
+ c = i.resolvedOptions(),
3035
+ d = createNullPrototypeObject(c);
3036
+ for (const e of Object.keys(d)) void 0 === a[e] && (d[e] = void 0);
3037
+ return (
3038
+ (d.hour12 = a.hour12),
3039
+ (d.hourCycle = a.hourCycle),
3040
+ (d.formatMatcher = a.formatMatcher),
3041
+ (d.timeZone = c.timeZone),
3042
+ (d.calendar = c.calendar),
3043
+ ((o === s && d.timeStyle) || (o === l && d.dateStyle)) && throwTypeError(he),
3044
+ $t.set(r, createNullPrototypeObject({ Pe: i, Re: d, Ne: i.resolvedOptions().locale })),
3045
+ r
3046
+ );
3047
+ }
3048
+ function validateSameTemporalType(e, t) {
3049
+ [
3050
+ isPlainDate,
3051
+ isPlainTime,
3052
+ isPlainDateTime,
3053
+ isZonedDateTime,
3054
+ isInstant,
3055
+ isPlainYearMonth,
3056
+ isPlainMonthDay,
3057
+ ].some((o) => o(e) !== o(t)) && throwTypeError("Temporal type mismatch");
3058
+ }
3059
+ function toDateTimeFormattable(e) {
3060
+ return ((e) =>
3061
+ isObject(e) &&
3062
+ (isPlainDate(e) ||
3063
+ isPlainTime(e) ||
3064
+ isPlainDateTime(e) ||
3065
+ isZonedDateTime(e) ||
3066
+ isPlainYearMonth(e) ||
3067
+ isPlainMonthDay(e) ||
3068
+ isInstant(e)))(e)
3069
+ ? e
3070
+ : we(e);
3071
+ }
3072
+ function handleDateTimeValue(e, t) {
3073
+ const o = getInternalSlotForPlainDate(t),
3074
+ n = getInternalSlotForPlainDateTime(t),
3075
+ r = getInternalSlotForPlainYearMonth(t),
3076
+ a = getInternalSlotForPlainMonthDay(t);
3077
+ return isPlainTime(t)
3078
+ ? [
3079
+ (e.Ze ||= new Nt(e.Ne, amendOptionsForPlainTime(e.Re))),
3080
+ epochMilliseconds(
3081
+ getUtcEpochNanoseconds(
3082
+ combineIsoDateAndTimeRecord(
3083
+ createIsoDateRecord(1970, 1, 1),
3084
+ getInternalSlotOrThrowForPlainTime(t),
3085
+ ),
3086
+ ),
3087
+ ),
3088
+ ]
3089
+ : o
3090
+ ? (o.Y !== e.Re.calendar && "iso8601" !== o.Y && throwRangeError(pe),
3091
+ [
3092
+ (e.Ye ||= new Nt(e.Ne, amendOptionsForPlainDate(e.Re))),
3093
+ epochMilliseconds(
3094
+ getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())),
3095
+ ),
3096
+ ])
3097
+ : n
3098
+ ? (n.Y !== e.Re.calendar && "iso8601" !== n.Y && throwRangeError(pe),
3099
+ [
3100
+ (e.Ce ||= new Nt(e.Ne, amendOptionsForPlainDateTime(e.Re))),
3101
+ epochMilliseconds(getUtcEpochNanoseconds(n._)),
3102
+ ])
3103
+ : r
3104
+ ? (r.Y !== e.Re.calendar && throwRangeError(pe),
3105
+ [
3106
+ (e.Ue ||= new Nt(e.Ne, amendOptionsForPlainYearMonth(e.Re))),
3107
+ epochMilliseconds(
3108
+ getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())),
3109
+ ),
3110
+ ])
3111
+ : a
3112
+ ? (a.Y !== e.Re.calendar && throwRangeError(pe),
3113
+ [
3114
+ (e.je ||= new Nt(e.Ne, amendOptionsForPlainMonthDay(e.Re))),
3115
+ epochMilliseconds(
3116
+ getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())),
3117
+ ),
3118
+ ])
3119
+ : isInstant(t)
3120
+ ? [
3121
+ (e.We ||= new Nt(e.Ne, amendOptionsForInstant(e.Re))),
3122
+ epochMilliseconds(getInternalSlotOrThrowForInstant(t).U),
3123
+ ]
3124
+ : (isZonedDateTime(t) && throwTypeError(Oe), [e.Pe, t]);
3125
+ }
3126
+ function DateTimeFormat(e, t) {
3127
+ return new jt(e, t);
3128
+ }
3129
+ function createTemporalInstant(e, t = Object.create(Lt.prototype)) {
3130
+ return (At.set(t, { U: e }), t);
3131
+ }
3132
+ function toTemporalInstant$1(e) {
3133
+ if (isObject(e)) {
3134
+ const t = getInternalSlotForInstant(e) || getInternalSlotForZonedDateTime(e);
3135
+ if (t) return createTemporalInstant(t.U);
3136
+ e = toPrimitive(e);
3137
+ }
3138
+ validateString(e);
3139
+ const t = parseIsoDateTime(e, [ot]),
3140
+ o = t.P.Z ? 0 : parseDateTimeUtcOffset(t.P.N),
3141
+ n = t.p;
3142
+ return createTemporalInstant(
3143
+ validateEpochNanoseconds(
3144
+ getUtcEpochNanoseconds(balanceIsoDateTime(t.t, t.u, t.T, n.D, n.I, n.O, n.F, n.S, n.$ - o)),
3145
+ ),
3146
+ );
3147
+ }
3148
+ function addInstant(e, t) {
3149
+ return validateEpochNanoseconds(addTimeDurationToEpochNanoseconds(e, t));
3150
+ }
3151
+ function differenceInstant(e, t, o, n, r) {
3152
+ return combineDateAndTimeDuration(
3153
+ zeroDateDuration(),
3154
+ roundTimeDuration(timeDurationFromEpochNanosecondsDifference(t, e), o, n, r),
3155
+ );
3156
+ }
3157
+ function roundTemporalInstant(e, t, o, n) {
3158
+ return (function (e, t, o) {
3159
+ return normalizeEpochNanoseconds(e[0], ((e, t, o) => Rt[o](e / t) * t)(e[1], t, o));
3160
+ })(e, t * nanosecondsForTimeUnit(o), n);
3161
+ }
3162
+ function temporalInstantToString(e, t, o) {
3163
+ const n = getOffsetNanosecondsFor(t || "UTC", e);
3164
+ return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(e, n), "iso8601", o, j)}${t ? formatDateTimeUtcOffsetRounded(n) : "Z"}`;
3165
+ }
3166
+ function differenceTemporalInstant(e, t, o, n) {
3167
+ const r = getInternalSlotOrThrowForInstant(toTemporalInstant$1(o)),
3168
+ a = getDifferenceSettings(e, getOptionsObject(n), l, [], K, _);
3169
+ return createTemporalDuration(
3170
+ applySignToDurationSlot(
3171
+ temporalDurationFromInternal(differenceInstant(t.U, r.U, a.V, a.H, a.q), a.L),
3172
+ e,
3173
+ ),
3174
+ );
3175
+ }
3176
+ function addDurationToInstant(e, t, o) {
3177
+ const n = applySignToDurationSlot(toTemporalDuration(o), e);
3178
+ return (
3179
+ isDateUnit(defaultTemporalLargestUnit(n)) &&
3180
+ throwRangeError(durationWithDateUnit(defaultTemporalLargestUnit(n))),
3181
+ createTemporalInstant(addInstant(t.U, toInternalDurationRecordWith24HourDays(n).p))
3182
+ );
3183
+ }
3184
+ function validateEpochNanoseconds(e) {
3185
+ return (
3186
+ ((e) => compareEpochNanoseconds(ve, e) * compareEpochNanoseconds(Ee, e) <= 0)(e) ||
3187
+ throwRangeError(Te),
3188
+ e
3189
+ );
3190
+ }
3191
+ function getInternalSlotForInstant(e) {
3192
+ return At.get(e);
3193
+ }
3194
+ function getInternalSlotOrThrowForInstant(e) {
3195
+ const t = getInternalSlotForInstant(e);
3196
+ return (t || throwTypeError(ge), t);
3197
+ }
3198
+ function isInstant(e) {
3199
+ return At.has(e);
3200
+ }
3201
+ function clampEpochNanoseconds(e) {
3202
+ return compareEpochNanoseconds(e, Ee) > 0 ? Ee : compareEpochNanoseconds(e, ve) < 0 ? ve : e;
3203
+ }
3204
+ function systemTimeZoneIdentifier() {
3205
+ return new Nt().resolvedOptions().timeZone;
3206
+ }
3207
+ function systemUtcEpochNanoseconds() {
3208
+ return createEpochNanosecondsFromEpochMilliseconds(Date.now());
3209
+ }
3210
+ function systemDateTime(e = systemTimeZoneIdentifier()) {
3211
+ return getIsoDateTimeForZonedDateTimeSlot(
3212
+ createZonedDateTimeSlot(
3213
+ systemUtcEpochNanoseconds(),
3214
+ toTemporalTimeZoneIdentifier(e),
3215
+ "iso8601",
3216
+ ),
3217
+ );
3218
+ }
3219
+ const e = 1e6,
3220
+ t = 6e10,
3221
+ o = 36e11,
3222
+ n = 86400,
3223
+ r = 864e5,
3224
+ a = 864e8,
3225
+ i = 864e11,
3226
+ c = 146097,
3227
+ s = Symbol(),
3228
+ l = Symbol(),
3229
+ d = Symbol(),
3230
+ m = Symbol(),
3231
+ u = Symbol(),
3232
+ T = Symbol(),
3233
+ D = Symbol(),
3234
+ h = "constrain",
3235
+ p = "reject",
3236
+ g = "compatible",
3237
+ f = "later",
3238
+ I = "reject",
3239
+ O = "prefer",
3240
+ F = "ignore",
3241
+ S = "reject",
3242
+ y = Symbol(),
3243
+ w = Symbol(),
3244
+ v = Symbol(),
3245
+ E = "ceil",
3246
+ M = "floor",
3247
+ b = "expand",
3248
+ P = "trunc",
3249
+ R = "halfCeil",
3250
+ N = "halfFloor",
3251
+ Z = "halfExpand",
3252
+ $ = "halfTrunc",
3253
+ Y = "halfEven",
3254
+ C = "auto",
3255
+ U = "always",
3256
+ j = "never",
3257
+ W = "critical",
3258
+ A = "auto",
3259
+ L = "never",
3260
+ k = "auto",
3261
+ z = "never",
3262
+ V = "critical",
3263
+ x = 0,
3264
+ H = 1,
3265
+ q = 2,
3266
+ B = 3,
3267
+ J = 4,
3268
+ G = 5,
3269
+ _ = 6,
3270
+ K = 9,
3271
+ X = 0,
3272
+ Q = 1,
3273
+ ee = 2,
3274
+ te = 3,
3275
+ oe = 4,
3276
+ ne = 5,
3277
+ re = 6,
3278
+ ae = 7,
3279
+ ie = 8,
3280
+ ce = 9,
3281
+ se = [
3282
+ "year",
3283
+ "month",
3284
+ "week",
3285
+ "day",
3286
+ "hour",
3287
+ "minute",
3288
+ "second",
3289
+ "millisecond",
3290
+ "microsecond",
3291
+ "nanosecond",
3292
+ ],
3293
+ le = se.map((e) => `${e}s`),
3294
+ de = [i, o, t, 1e9, 1e6, 1e3, 1],
3295
+ missingField = (e) => `missing field: ${e}`,
3296
+ invalidField = (e) => `invalid field: ${e}`,
3297
+ me = "parse error",
3298
+ ue = "invalid date / time",
3299
+ Te = "out-of-bounds date",
3300
+ De = "out-of-bounds duration",
3301
+ he = "invalid formatting options",
3302
+ pe = "calendar mismatch",
3303
+ disallowedUnit = (e) => `disallowed unit: ${"auto" === e ? e : getNameFromUnit(e)}`,
3304
+ invalidNumber = (e) => `invalid number: ${e}`,
3305
+ invalidTimeZone = (e) => `invalid time zone: ${e}`,
3306
+ ge = "invalid method call",
3307
+ invalidMonthCode = (e) => `invalid month code:${e}`,
3308
+ durationWithDateUnit = (e) => `duration has a date unit: ${getNameFromUnit(e)}`,
3309
+ fe = "invalid `largestUnit` and `smallestUnit` options",
3310
+ Ie = "mismatch of `month` and `monthCode`",
3311
+ Oe = "value is not formattable",
3312
+ notObject = (e) => `not object: ${e}`,
3313
+ Fe = "empty fields",
3314
+ Se = "can't convert Temporal classes to number",
3315
+ ye = "argument is undefined",
3316
+ we = Math.max,
3317
+ ve = createEpochNanosecondsFromEpochMilliseconds(-864e13),
3318
+ Ee = createEpochNanosecondsFromEpochMilliseconds(864e13),
3319
+ Me = compareEpochNanoseconds,
3320
+ be = new WeakMap();
3321
+ var Pe = class {
3322
+ constructor(e, t, o = "iso8601") {
3323
+ const n = validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e)));
3324
+ validateString(t);
3325
+ const r = parseTimeZoneIdentifier(t),
3326
+ a = r.J ? getAvailableNamedTimeZoneIdentifier(r.J) : formatOffsetTimeZoneIdentifier(r.G);
3327
+ (validateString(o), createTemporalZonedDateTime(n, a, canonicalizeCalendar(o), this));
3328
+ }
3329
+ static from(e, t = void 0) {
3330
+ return createTemporalZonedDateTimeFromSlot(toTemporalZonedDateTime(e, t));
3331
+ }
3332
+ static compare(e, t) {
3333
+ return compareEpochNanoseconds(toTemporalZonedDateTime(e).U, toTemporalZonedDateTime(t).U);
3334
+ }
3335
+ get calendarId() {
3336
+ return getInternalSlotOrThrowForZonedDateTime(this).Y;
3337
+ }
3338
+ get timeZoneId() {
3339
+ return getInternalSlotOrThrowForZonedDateTime(this).P;
3340
+ }
3341
+ get era() {
3342
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).oe;
3343
+ }
3344
+ get eraYear() {
3345
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ne;
3346
+ }
3347
+ get year() {
3348
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).t;
3349
+ }
3350
+ get month() {
3351
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).u;
3352
+ }
3353
+ get monthCode() {
3354
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).v;
3355
+ }
3356
+ get day() {
3357
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).T;
3358
+ }
3359
+ get hour() {
3360
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.D;
3361
+ }
3362
+ get minute() {
3363
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.I;
3364
+ }
3365
+ get second() {
3366
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.O;
3367
+ }
3368
+ get millisecond() {
3369
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.F;
3370
+ }
3371
+ get microsecond() {
3372
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.S;
3373
+ }
3374
+ get nanosecond() {
3375
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.$;
3376
+ }
3377
+ get epochMilliseconds() {
3378
+ return epochMilliseconds(getInternalSlotOrThrowForZonedDateTime(this).U);
3379
+ }
3380
+ get epochNanoseconds() {
3381
+ return convertEpochNanosecondsToBigInt(getInternalSlotOrThrowForZonedDateTime(this).U);
3382
+ }
3383
+ get dayOfWeek() {
3384
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).re;
3385
+ }
3386
+ get dayOfYear() {
3387
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ae;
3388
+ }
3389
+ get weekOfYear() {
3390
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie
3391
+ .ce;
3392
+ }
3393
+ get yearOfWeek() {
3394
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie.t;
3395
+ }
3396
+ get hoursInDay() {
3397
+ const e = getInternalSlotOrThrowForZonedDateTime(this),
3398
+ t = getIsoDateTimeForZonedDateTimeSlot(e).o;
3399
+ return (
3400
+ timeDurationToSubsecondsNumber(
3401
+ differenceEpochNanoseconds(
3402
+ getStartOfDay(e.P, t),
3403
+ getStartOfDay(e.P, addDaysToIsoDate(t, 1)),
3404
+ ),
3405
+ -9,
3406
+ ) / o
3407
+ );
3408
+ }
3409
+ get daysInWeek() {
3410
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).se;
3411
+ }
3412
+ get daysInMonth() {
3413
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).le;
3414
+ }
3415
+ get daysInYear() {
3416
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).de;
3417
+ }
3418
+ get monthsInYear() {
3419
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).me;
3420
+ }
3421
+ get inLeapYear() {
3422
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ue;
3423
+ }
3424
+ get offsetNanoseconds() {
3425
+ return getOffsetNanosecondsForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this));
3426
+ }
3427
+ get offset() {
3428
+ return formatUtcOffsetNanoseconds(
3429
+ getOffsetNanosecondsForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)),
3430
+ );
3431
+ }
3432
+ with(e, t = void 0) {
3433
+ const o = getInternalSlotOrThrowForZonedDateTime(this);
3434
+ validatePartialTemporalObject(e);
3435
+ const n = getOffsetNanosecondsForZonedDateTimeSlot(o),
3436
+ r = getIsoDateTimeForZonedDateTimeSlot(o),
3437
+ a = calendarMergeFields(
3438
+ o.Y,
3439
+ createNullPrototypeObject({
3440
+ ...isoDateTimeToFields(o.Y, r),
3441
+ [yt.M]: formatUtcOffsetNanoseconds(n),
3442
+ }),
3443
+ prepareCalendarFields(o.Y, e, [
3444
+ yt.t,
3445
+ yt.u,
3446
+ yt.v,
3447
+ yt.T,
3448
+ yt.D,
3449
+ yt.I,
3450
+ yt.O,
3451
+ yt.F,
3452
+ yt.S,
3453
+ yt.$,
3454
+ yt.M,
3455
+ ]),
3456
+ ),
3457
+ i = getOptionsObject(t),
3458
+ c = getTemporalDisambiguationOption(i),
3459
+ s = getTemporalOffsetOption(i, O),
3460
+ l = getTemporalOverflowOption(i),
3461
+ d = interpretTemporalDateTimeFields(o.Y, a, l);
3462
+ return createTemporalZonedDateTime(
3463
+ interpretISODateTimeOffset(d.o, d.p, y, parseDateTimeUtcOffset(a[yt.M]), o.P, c, s, !0),
3464
+ o.P,
3465
+ o.Y,
3466
+ );
3467
+ }
3468
+ withPlainTime(e = void 0) {
3469
+ const t = getInternalSlotOrThrowForZonedDateTime(this),
3470
+ o = getIsoDateTimeForZonedDateTimeSlot(t);
3471
+ return createTemporalZonedDateTime(
3472
+ void 0 === e
3473
+ ? getStartOfDay(t.P, o.o)
3474
+ : getEpochNanosecondsFor(t.P, combineIsoDateAndTimeRecord(o.o, toTemporalTime(e)), g),
3475
+ t.P,
3476
+ t.Y,
3477
+ );
3478
+ }
3479
+ withTimeZone(e) {
3480
+ const t = getInternalSlotOrThrowForZonedDateTime(this);
3481
+ return createTemporalZonedDateTime(t.U, toTemporalTimeZoneIdentifier(e), t.Y);
3482
+ }
3483
+ withCalendar(e) {
3484
+ const t = getInternalSlotOrThrowForZonedDateTime(this);
3485
+ return createTemporalZonedDateTime(t.U, t.P, toTemporalCalendarIdentifier(e));
3486
+ }
3487
+ add(e, t = void 0) {
3488
+ return addDurationToZonedDateTime(1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
3489
+ }
3490
+ subtract(e, t = void 0) {
3491
+ return addDurationToZonedDateTime(-1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
3492
+ }
3493
+ until(e, t = void 0) {
3494
+ return differenceTemporalZonedDateTime(1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
3495
+ }
3496
+ since(e, t = void 0) {
3497
+ return differenceTemporalZonedDateTime(-1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
3498
+ }
3499
+ round(e) {
3500
+ const t = getInternalSlotOrThrowForZonedDateTime(this),
3501
+ o = getRoundToOptionsObject(e),
3502
+ n = getRoundingIncrementOption(o),
3503
+ r = getRoundingModeOption(o, "halfExpand"),
3504
+ a = getTemporalUnitValuedOption(o, "smallestUnit", T);
3505
+ if (
3506
+ (validateTemporalUnitValue(a, l, [B]),
3507
+ validateTemporalRoundingIncrement(
3508
+ n,
3509
+ a === B ? 1 : maximumTemporalDurationRoundingIncrement(a),
3510
+ a === B,
3511
+ ),
3512
+ a === K && 1 === n)
3513
+ )
3514
+ return createTemporalZonedDateTimeFromSlot(t);
3515
+ const i = getIsoDateTimeForZonedDateTimeSlot(t);
3516
+ if (a === B) {
3517
+ const e = getStartOfDay(t.P, i.o),
3518
+ o = getStartOfDay(t.P, addDaysToIsoDate(i.o, 1));
3519
+ return createTemporalZonedDateTime(
3520
+ addNanosecondsToEpochSeconds(
3521
+ e,
3522
+ roundNumberToIncrement(
3523
+ timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, t.U), -9),
3524
+ timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, o), -9),
3525
+ r,
3526
+ ),
3527
+ ),
3528
+ t.P,
3529
+ t.Y,
3530
+ );
3531
+ }
3532
+ const c = roundIsoDateTime(i, n, a, r),
3533
+ s = getOffsetNanosecondsForZonedDateTimeSlot(t);
3534
+ return createTemporalZonedDateTime(
3535
+ interpretISODateTimeOffset(c.o, c.p, y, s, t.P, g, O, !0),
3536
+ t.P,
3537
+ t.Y,
3538
+ );
3539
+ }
3540
+ equals(e) {
3541
+ const t = getInternalSlotOrThrowForZonedDateTime(this),
3542
+ o = toTemporalZonedDateTime(e);
3543
+ return (
3544
+ !compareEpochNanoseconds(t.U, o.U) && timeZoneEquals(t.P, o.P) && calendarEquals(t.Y, o.Y)
3545
+ );
3546
+ }
3547
+ toString(e = void 0) {
3548
+ const t = getInternalSlotOrThrowForZonedDateTime(this),
3549
+ o = getOptionsObject(e),
3550
+ n = getTemporalShowCalendarNameOption(o),
3551
+ r = getTemporalFractionalSecondDigitsOption(o),
3552
+ a = ((e) => getOption(e, "offset", [A, L], A))(o),
3553
+ i = getRoundingModeOption(o, P),
3554
+ c = getTemporalUnitValuedOption(o, "smallestUnit", void 0),
3555
+ s = ((e) => getOption(e, "timeZoneName", [k, z, V], k))(o);
3556
+ (validateTemporalUnitValue(c, l), c === J && throwRangeError(invalidField("smallestUnit")));
3557
+ const d = toSecondsStringPrecisionRecord(c, r);
3558
+ return temporalZonedDateTimeToString(t, d.$e, n, s, a, d.Ee, d.ve, i);
3559
+ }
3560
+ toLocaleString(e = void 0, t = void 0) {
3561
+ const o = getInternalSlotOrThrowForZonedDateTime(this),
3562
+ n = createDateTimeFormat(e, t, d, o.P),
3563
+ r = getInternalSlotOrThrowForDateTimeFormat(n);
3564
+ return (
3565
+ "iso8601" === o.Y || calendarEquals(o.Y, r.Re.calendar) || throwRangeError(pe),
3566
+ formatDateTime(n, createTemporalInstant(o.U))
3567
+ );
3568
+ }
3569
+ toJSON() {
3570
+ return temporalZonedDateTimeToString(
3571
+ getInternalSlotOrThrowForZonedDateTime(this),
3572
+ void 0,
3573
+ C,
3574
+ k,
3575
+ A,
3576
+ );
3577
+ }
3578
+ valueOf() {
3579
+ throwTypeError(Se);
3580
+ }
3581
+ startOfDay() {
3582
+ const e = getInternalSlotOrThrowForZonedDateTime(this);
3583
+ return createTemporalZonedDateTime(
3584
+ getStartOfDay(e.P, getIsoDateTimeForZonedDateTimeSlot(e).o),
3585
+ e.P,
3586
+ e.Y,
3587
+ );
3588
+ }
3589
+ getTimeZoneTransition(e) {
3590
+ const t = getInternalSlotOrThrowForZonedDateTime(this);
3591
+ void 0 === e && throwTypeError(ye);
3592
+ const o = getOption(
3593
+ "string" == typeof e ? { direction: e } : getOptionsObject(e),
3594
+ "direction",
3595
+ ["next", "previous"],
3596
+ T,
3597
+ ),
3598
+ n = ((e, t, o) => {
3599
+ if ("UTC" === e || isOffsetTimeZoneIdentifier(e)) return null;
3600
+ const n = -4e9,
3601
+ r = Math.floor((Date.now() + 31536e7) / 1e3),
3602
+ a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n, 1 / 0);
3603
+ return -1 === o
3604
+ ? a === n
3605
+ ? null
3606
+ : a > r
3607
+ ? searchTimeZoneTransition(e, a, a - 31536e3, o) ||
3608
+ searchTimeZoneTransition(e, r, n, o)
3609
+ : searchTimeZoneTransition(e, a, n, o)
3610
+ : searchTimeZoneTransition(e, a, a > r ? a + 31536e3 : r, o);
3611
+ })(t.P, t.U, "next" === o ? 1 : -1);
3612
+ return null === n ? null : createTemporalZonedDateTime(n, t.P, t.Y);
3613
+ }
3614
+ toInstant() {
3615
+ return createTemporalInstant(getInternalSlotOrThrowForZonedDateTime(this).U);
3616
+ }
3617
+ toPlainDate() {
3618
+ const e = getInternalSlotOrThrowForZonedDateTime(this);
3619
+ return createTemporalDate(getIsoDateTimeForZonedDateTimeSlot(e).o, e.Y);
3620
+ }
3621
+ toPlainTime() {
3622
+ return createTemporalTime(
3623
+ getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p,
3624
+ );
3625
+ }
3626
+ toPlainDateTime() {
3627
+ const e = getInternalSlotOrThrowForZonedDateTime(this);
3628
+ return createTemporalDateTime(getIsoDateTimeForZonedDateTimeSlot(e), e.Y);
3629
+ }
3630
+ };
3631
+ (defineStringTag(Pe.prototype, "Temporal.ZonedDateTime"), renameFunction(Pe, "ZonedDateTime"));
3632
+ const Re = createNullPrototypeObject({}),
3633
+ Ne = createNullPrototypeObject({}),
3634
+ Ze = new WeakMap();
3635
+ var $e = class {
3636
+ constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = "iso8601") {
3637
+ const d = [e, t, o].map(toIntegerWithTruncation),
3638
+ m = [n, r, a, i, c, s].map(toIntegerWithTruncation);
3639
+ validateString(l);
3640
+ const u = canonicalizeCalendar(l);
3641
+ ((isValidIsoDate(...d) && isValidTime(...m)) || throwRangeError(ue),
3642
+ createTemporalDateTime(
3643
+ combineIsoDateAndTimeRecord(createIsoDateRecord(...d), createTimeRecord(...m)),
3644
+ u,
3645
+ this,
3646
+ ));
3647
+ }
3648
+ static from(e, t = void 0) {
3649
+ return toTemporalDateTime(e, t);
3650
+ }
3651
+ static compare(e, t) {
3652
+ return compareIsoDateTime(
3653
+ getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(e))._,
3654
+ getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(t))._,
3655
+ );
3656
+ }
3657
+ get calendarId() {
3658
+ return getInternalSlotOrThrowForPlainDateTime(this).Y;
3659
+ }
3660
+ get era() {
3661
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3662
+ return calendarIsoToDate(e.Y, e._.o).oe;
3663
+ }
3664
+ get eraYear() {
3665
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3666
+ return calendarIsoToDate(e.Y, e._.o).ne;
3667
+ }
3668
+ get year() {
3669
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3670
+ return calendarIsoToDate(e.Y, e._.o).t;
3671
+ }
3672
+ get month() {
3673
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3674
+ return calendarIsoToDate(e.Y, e._.o).u;
3675
+ }
3676
+ get monthCode() {
3677
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3678
+ return calendarIsoToDate(e.Y, e._.o).v;
3679
+ }
3680
+ get day() {
3681
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3682
+ return calendarIsoToDate(e.Y, e._.o).T;
3683
+ }
3684
+ get hour() {
3685
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.D;
3686
+ }
3687
+ get minute() {
3688
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.I;
3689
+ }
3690
+ get second() {
3691
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.O;
3692
+ }
3693
+ get millisecond() {
3694
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.F;
3695
+ }
3696
+ get microsecond() {
3697
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.S;
3698
+ }
3699
+ get nanosecond() {
3700
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.$;
3701
+ }
3702
+ get dayOfWeek() {
3703
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3704
+ return calendarIsoToDate(e.Y, e._.o).re;
3705
+ }
3706
+ get dayOfYear() {
3707
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3708
+ return calendarIsoToDate(e.Y, e._.o).ae;
3709
+ }
3710
+ get weekOfYear() {
3711
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3712
+ return calendarIsoToDate(e.Y, e._.o).ie.ce;
3713
+ }
3714
+ get yearOfWeek() {
3715
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3716
+ return calendarIsoToDate(e.Y, e._.o).ie.t;
3717
+ }
3718
+ get daysInWeek() {
3719
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3720
+ return calendarIsoToDate(e.Y, e._.o).se;
3721
+ }
3722
+ get daysInMonth() {
3723
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3724
+ return calendarIsoToDate(e.Y, e._.o).le;
3725
+ }
3726
+ get daysInYear() {
3727
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3728
+ return calendarIsoToDate(e.Y, e._.o).de;
3729
+ }
3730
+ get monthsInYear() {
3731
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3732
+ return calendarIsoToDate(e.Y, e._.o).me;
3733
+ }
3734
+ get inLeapYear() {
3735
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3736
+ return calendarIsoToDate(e.Y, e._.o).ue;
3737
+ }
3738
+ with(e, t = void 0) {
3739
+ const o = getInternalSlotOrThrowForPlainDateTime(this);
3740
+ validatePartialTemporalObject(e);
3741
+ const n = calendarMergeFields(
3742
+ o.Y,
3743
+ isoDateTimeToFields(o.Y, o._),
3744
+ prepareCalendarFields(o.Y, e, [yt.t, yt.u, yt.v, yt.T, yt.D, yt.I, yt.O, yt.F, yt.S, yt.$]),
3745
+ );
3746
+ return createTemporalDateTime(
3747
+ interpretTemporalDateTimeFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))),
3748
+ o.Y,
3749
+ );
3750
+ }
3751
+ withPlainTime(e = void 0) {
3752
+ const t = getInternalSlotOrThrowForPlainDateTime(this);
3753
+ return createTemporalDateTime(
3754
+ combineIsoDateAndTimeRecord(t._.o, toTimeRecordOrMidnight(e)),
3755
+ t.Y,
3756
+ );
3757
+ }
3758
+ withCalendar(e) {
3759
+ return createTemporalDateTime(
3760
+ getInternalSlotOrThrowForPlainDateTime(this)._,
3761
+ toTemporalCalendarIdentifier(e),
3762
+ );
3763
+ }
3764
+ add(e, t = void 0) {
3765
+ return addDurationToDateTime(1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
3766
+ }
3767
+ subtract(e, t = void 0) {
3768
+ return addDurationToDateTime(-1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
3769
+ }
3770
+ until(e, t = void 0) {
3771
+ return differenceTemporalPlainDateTime(1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
3772
+ }
3773
+ since(e, t = void 0) {
3774
+ return differenceTemporalPlainDateTime(-1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
3775
+ }
3776
+ round(e) {
3777
+ const t = getInternalSlotOrThrowForPlainDateTime(this),
3778
+ o = getRoundToOptionsObject(e),
3779
+ n = getRoundingIncrementOption(o),
3780
+ r = getRoundingModeOption(o, "halfExpand"),
3781
+ a = getTemporalUnitValuedOption(o, "smallestUnit", T);
3782
+ return (
3783
+ validateTemporalUnitValue(a, l, [B]),
3784
+ validateTemporalRoundingIncrement(
3785
+ n,
3786
+ a === B ? 1 : maximumTemporalDurationRoundingIncrement(a),
3787
+ a === B,
3788
+ ),
3789
+ createTemporalDateTime(roundIsoDateTime(t._, n, a, r), t.Y)
3790
+ );
3791
+ }
3792
+ equals(e) {
3793
+ const t = getInternalSlotOrThrowForPlainDateTime(this),
3794
+ o = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(e));
3795
+ return !compareIsoDateTime(t._, o._) && calendarEquals(t.Y, o.Y);
3796
+ }
3797
+ toString(e = void 0) {
3798
+ const t = getInternalSlotOrThrowForPlainDateTime(this),
3799
+ o = getOptionsObject(e),
3800
+ n = getTemporalShowCalendarNameOption(o),
3801
+ r = getTemporalFractionalSecondDigitsOption(o),
3802
+ a = getRoundingModeOption(o, P),
3803
+ i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
3804
+ (validateTemporalUnitValue(i, l), i === J && throwRangeError(invalidField("smallestUnit")));
3805
+ const c = toSecondsStringPrecisionRecord(i, r);
3806
+ return isoDateTimeToString(
3807
+ validateIsoDateTime(roundIsoDateTime(t._, c.Ee, c.ve, a)),
3808
+ t.Y,
3809
+ c.$e,
3810
+ n,
3811
+ );
3812
+ }
3813
+ toLocaleString(e = void 0, t = void 0) {
3814
+ return (
3815
+ getInternalSlotOrThrowForPlainDateTime(this),
3816
+ formatDateTime(createDateTimeFormat(e, t, d), this)
3817
+ );
3818
+ }
3819
+ toJSON() {
3820
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3821
+ return isoDateTimeToString(e._, e.Y, void 0, C);
3822
+ }
3823
+ valueOf() {
3824
+ throwTypeError(Se);
3825
+ }
3826
+ toZonedDateTime(e, t = void 0) {
3827
+ const o = getInternalSlotOrThrowForPlainDateTime(this),
3828
+ n = toTemporalTimeZoneIdentifier(e),
3829
+ r = getTemporalDisambiguationOption(getOptionsObject(t));
3830
+ return createTemporalZonedDateTime(getEpochNanosecondsFor(n, o._, r), n, o.Y);
3831
+ }
3832
+ toPlainDate() {
3833
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
3834
+ return createTemporalDate(e._.o, e.Y);
3835
+ }
3836
+ toPlainTime() {
3837
+ return createTemporalTime(getInternalSlotOrThrowForPlainDateTime(this)._.p);
3838
+ }
3839
+ };
3840
+ (defineStringTag($e.prototype, "Temporal.PlainDateTime"), renameFunction($e, "PlainDateTime"));
3841
+ const Ye = new WeakMap();
3842
+ var Ce = class {
3843
+ constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0) {
3844
+ const i = [e, t, o, n, r, a].map(toIntegerWithTruncation);
3845
+ (isValidTime(...i) || throwRangeError(ue), createTemporalTime(createTimeRecord(...i), this));
3846
+ }
3847
+ static from(e, t = void 0) {
3848
+ return createTemporalTime(toTemporalTime(e, t));
3849
+ }
3850
+ static compare(e, t) {
3851
+ return compareTimeRecord(toTemporalTime(e), toTemporalTime(t));
3852
+ }
3853
+ get hour() {
3854
+ return getInternalSlotOrThrowForPlainTime(this).D;
3855
+ }
3856
+ get minute() {
3857
+ return getInternalSlotOrThrowForPlainTime(this).I;
3858
+ }
3859
+ get second() {
3860
+ return getInternalSlotOrThrowForPlainTime(this).O;
3861
+ }
3862
+ get millisecond() {
3863
+ return getInternalSlotOrThrowForPlainTime(this).F;
3864
+ }
3865
+ get microsecond() {
3866
+ return getInternalSlotOrThrowForPlainTime(this).S;
3867
+ }
3868
+ get nanosecond() {
3869
+ return getInternalSlotOrThrowForPlainTime(this).$;
3870
+ }
3871
+ add(e) {
3872
+ return addDurationToTime(1, getInternalSlotOrThrowForPlainTime(this), e);
3873
+ }
3874
+ subtract(e) {
3875
+ return addDurationToTime(-1, getInternalSlotOrThrowForPlainTime(this), e);
3876
+ }
3877
+ with(e, t = void 0) {
3878
+ const o = getInternalSlotOrThrowForPlainTime(this);
3879
+ return (
3880
+ validatePartialTemporalObject(e),
3881
+ createTemporalTime(
3882
+ regulateTime(
3883
+ ...withArray(toTemporalTimeRecord(e, !0), [o.D, o.I, o.O, o.F, o.S, o.$]),
3884
+ getTemporalOverflowOption(getOptionsObject(t)),
3885
+ ),
3886
+ )
3887
+ );
3888
+ }
3889
+ until(e, t = void 0) {
3890
+ return differenceTemporalPlainTime(1, getInternalSlotOrThrowForPlainTime(this), e, t);
3891
+ }
3892
+ since(e, t = void 0) {
3893
+ return differenceTemporalPlainTime(-1, getInternalSlotOrThrowForPlainTime(this), e, t);
3894
+ }
3895
+ round(e) {
3896
+ const t = getInternalSlotOrThrowForPlainTime(this),
3897
+ o = getRoundToOptionsObject(e),
3898
+ n = getRoundingIncrementOption(o),
3899
+ r = getRoundingModeOption(o, Z),
3900
+ a = getTemporalUnitValuedOption(o, "smallestUnit", T);
3901
+ return (
3902
+ validateTemporalUnitValue(a, l),
3903
+ validateTemporalRoundingIncrement(n, maximumTemporalDurationRoundingIncrement(a), !1),
3904
+ createTemporalTime(roundTime(t, n, a, r))
3905
+ );
3906
+ }
3907
+ equals(e) {
3908
+ return !compareTimeRecord(getInternalSlotOrThrowForPlainTime(this), toTemporalTime(e));
3909
+ }
3910
+ toString(e = void 0) {
3911
+ const t = getInternalSlotOrThrowForPlainTime(this),
3912
+ o = getOptionsObject(e),
3913
+ n = getTemporalFractionalSecondDigitsOption(o),
3914
+ r = getRoundingModeOption(o, P),
3915
+ a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
3916
+ (validateTemporalUnitValue(a, l), a === J && throwRangeError(invalidField("smallestUnit")));
3917
+ const i = toSecondsStringPrecisionRecord(a, n);
3918
+ return timeRecordToString(roundTime(t, i.Ee, i.ve, r), i.$e);
3919
+ }
3920
+ toLocaleString(e = void 0, t = void 0) {
3921
+ return (
3922
+ getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t, l), this)
3923
+ );
3924
+ }
3925
+ toJSON() {
3926
+ return timeRecordToString(getInternalSlotOrThrowForPlainTime(this));
3927
+ }
3928
+ valueOf() {
3929
+ throwTypeError(Se);
3930
+ }
3931
+ };
3932
+ (defineStringTag(Ce.prototype, "Temporal.PlainTime"), renameFunction(Ce, "PlainTime"));
3933
+ const Ue = "\\d{4}|[-+]\\d{6}",
3934
+ je = "0[1-9]|1[0-2]",
3935
+ We = "0[1-9]|[12]\\d|30|31",
3936
+ Ae = "[01]\\d|2[0-3]",
3937
+ Le = "[0-5]\\d",
3938
+ ke = `(?<a>${Ue})(?<x>-?)(?<b>${je})\\k<x>(?<c>${We})`,
3939
+ ze = optionalChain([
3940
+ `(?<d>${Ae})`,
3941
+ `(?<y>:?)(?<e>${Le})`,
3942
+ "\\k<y>(?<f>[0-5]\\d|60)",
3943
+ "[.,](?<g>\\d{1,9})",
3944
+ ]),
3945
+ Ve = optionalChain([`([+-])(${Ae})`, `(?<z>:?)(${Le})`, `\\k<z>(${Le})`, "[.,](\\d{1,9})"]),
3946
+ xe = optionalChain([ke, `[ tT]${ze}`, `(?<h>${Ve})`]),
3947
+ He = `(?<l>${Ue})-?(?<m>${je})`,
3948
+ qe = `(?:--)?(?<m>${je})-?(?<n>${We})`,
3949
+ Be = `(?<h>${Ve})|(?<i>[zZ])`,
3950
+ Je = `([+-])(${Ae})(?::?(${Le}))?|${join("[a-zA-Z._][a-zA-Z._+-\\d]*", "\\/")}`,
3951
+ Ge = `\\[!?(?<j>${Je})\\]`,
3952
+ _e = join("[a-zA-Z\\d]+", "-"),
3953
+ Ke = `\\[(!)?([a-z_][a-z\\d_-]*)=(${_e})\\]`,
3954
+ Xe = `(?<k>(${Ke})*)`,
3955
+ Qe = RegExp(Ke, "g"),
3956
+ et = createRegExp(`${optionalChain([ke, `[ tT]${ze}`, Be])}${Ge}${Xe}`),
3957
+ tt = createRegExp(`${xe}(?:${Ge})?${Xe}`),
3958
+ ot = createRegExp(`${ke}[ tT]${ze}(?:${Be})(?:${Ge})?${Xe}`),
3959
+ nt = createRegExp(`(${ke}[ tT]|[tT]?)${ze}(?<h>${Ve})?(?:${Ge})?${Xe}`),
3960
+ rt = createRegExp(`(${xe}|${qe})(?:${Ge})?${Xe}`),
3961
+ at = createRegExp(`(${xe}|${He})(?:${Ge})?${Xe}`),
3962
+ it = [createRegExp(`${qe}(${Ge})?(${Ke})*`), createRegExp(`${He}(${Ge})?(${Ke})*`)],
3963
+ ct = createRegExp(Je),
3964
+ st = createRegExp(_e),
3965
+ lt = createRegExp(Ve),
3966
+ dt = new WeakMap();
3967
+ var mt = class {
3968
+ constructor(e, t, o = "iso8601", n = 1972) {
3969
+ const r = toIntegerWithTruncation(e),
3970
+ a = toIntegerWithTruncation(t);
3971
+ validateString(o);
3972
+ const i = canonicalizeCalendar(o),
3973
+ c = toIntegerWithTruncation(n);
3974
+ (isValidIsoDate(c, r, a) || throwRangeError(ue),
3975
+ createTemporalMonthDay(createIsoDateRecord(c, r, a), i, this));
3976
+ }
3977
+ static from(e, t = void 0) {
3978
+ return toTemporalMonthDay(e, t);
3979
+ }
3980
+ get calendarId() {
3981
+ return getInternalSlotOrThrowForPlainMonthDay(this).Y;
3982
+ }
3983
+ get monthCode() {
3984
+ const e = getInternalSlotOrThrowForPlainMonthDay(this);
3985
+ return calendarIsoToDate(e.Y, e.o).v;
3986
+ }
3987
+ get day() {
3988
+ const e = getInternalSlotOrThrowForPlainMonthDay(this);
3989
+ return calendarIsoToDate(e.Y, e.o).T;
3990
+ }
3991
+ with(e, t = void 0) {
3992
+ const o = getInternalSlotOrThrowForPlainMonthDay(this);
3993
+ return (
3994
+ validatePartialTemporalObject(e),
3995
+ createTemporalMonthDay(
3996
+ calendarMonthDayFromFields(
3997
+ o.Y,
3998
+ calendarMergeFields(
3999
+ o.Y,
4000
+ isoDateToFields(o.Y, o.o, u),
4001
+ prepareCalendarFields(o.Y, e, [yt.t, yt.u, yt.v, yt.T]),
4002
+ ),
4003
+ getTemporalOverflowOption(getOptionsObject(t)),
4004
+ ),
4005
+ o.Y,
4006
+ )
4007
+ );
4008
+ }
4009
+ equals(e) {
4010
+ const t = getInternalSlotOrThrowForPlainMonthDay(this),
4011
+ o = getInternalSlotOrThrowForPlainMonthDay(toTemporalMonthDay(e));
4012
+ return 0 === compareIsoDate(t.o, o.o) && calendarEquals(t.Y, o.Y);
4013
+ }
4014
+ toString(e = void 0) {
4015
+ return temporalMonthDayToString(
4016
+ getInternalSlotOrThrowForPlainMonthDay(this),
4017
+ getTemporalShowCalendarNameOption(getOptionsObject(e)),
4018
+ );
4019
+ }
4020
+ toLocaleString(e = void 0, t = void 0) {
4021
+ return (
4022
+ getInternalSlotOrThrowForPlainMonthDay(this),
4023
+ formatDateTime(createDateTimeFormat(e, t, s), this)
4024
+ );
4025
+ }
4026
+ toJSON() {
4027
+ return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), C);
4028
+ }
4029
+ valueOf() {
4030
+ throwTypeError(Se);
4031
+ }
4032
+ toPlainDate(e) {
4033
+ const t = getInternalSlotOrThrowForPlainMonthDay(this);
4034
+ return (
4035
+ isObject(e) || throwTypeError(notObject(e)),
4036
+ createTemporalDate(
4037
+ calendarDateFromFields(
4038
+ t.Y,
4039
+ calendarMergeFields(
4040
+ t.Y,
4041
+ isoDateToFields(t.Y, t.o, u),
4042
+ prepareCalendarFields(t.Y, e, [yt.t], []),
4043
+ ),
4044
+ h,
4045
+ ),
4046
+ t.Y,
4047
+ )
4048
+ );
4049
+ }
4050
+ };
4051
+ (defineStringTag(mt.prototype, "Temporal.PlainMonthDay"), renameFunction(mt, "PlainMonthDay"));
4052
+ const ut = new WeakMap();
4053
+ var Tt = class {
4054
+ constructor(e, t, o = "iso8601", n = 1) {
4055
+ const r = toIntegerWithTruncation(e),
4056
+ a = toIntegerWithTruncation(t);
4057
+ validateString(o);
4058
+ const i = canonicalizeCalendar(o),
4059
+ c = toIntegerWithTruncation(n);
4060
+ (isValidIsoDate(r, a, c) || throwRangeError(ue),
4061
+ createTemporalYearMonth(createIsoDateRecord(r, a, c), i, this));
4062
+ }
4063
+ static from(e, t = void 0) {
4064
+ return toTemporalYearMonth(e, t);
4065
+ }
4066
+ static compare(e, t) {
4067
+ return compareIsoDate(
4068
+ getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(e)).o,
4069
+ getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(t)).o,
4070
+ );
4071
+ }
4072
+ get calendarId() {
4073
+ return getInternalSlotOrThrowForPlainYearMonth(this).Y;
4074
+ }
4075
+ get era() {
4076
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4077
+ return calendarIsoToDate(e.Y, e.o).oe;
4078
+ }
4079
+ get eraYear() {
4080
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4081
+ return calendarIsoToDate(e.Y, e.o).ne;
4082
+ }
4083
+ get year() {
4084
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4085
+ return calendarIsoToDate(e.Y, e.o).t;
4086
+ }
4087
+ get month() {
4088
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4089
+ return calendarIsoToDate(e.Y, e.o).u;
4090
+ }
4091
+ get monthCode() {
4092
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4093
+ return calendarIsoToDate(e.Y, e.o).v;
4094
+ }
4095
+ get daysInYear() {
4096
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4097
+ return calendarIsoToDate(e.Y, e.o).de;
4098
+ }
4099
+ get daysInMonth() {
4100
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4101
+ return calendarIsoToDate(e.Y, e.o).le;
4102
+ }
4103
+ get monthsInYear() {
4104
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4105
+ return calendarIsoToDate(e.Y, e.o).me;
4106
+ }
4107
+ get inLeapYear() {
4108
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
4109
+ return calendarIsoToDate(e.Y, e.o).ue;
4110
+ }
4111
+ with(e, t = void 0) {
4112
+ const o = getInternalSlotOrThrowForPlainYearMonth(this);
4113
+ validatePartialTemporalObject(e);
4114
+ const n = calendarMergeFields(
4115
+ o.Y,
4116
+ isoDateToFields(o.Y, o.o, m),
4117
+ prepareCalendarFields(o.Y, e, [yt.t, yt.u, yt.v]),
4118
+ );
4119
+ return createTemporalYearMonth(
4120
+ calendarYearMonthFromFields(o.Y, n, getTemporalOverflowOption(getOptionsObject(t))),
4121
+ o.Y,
4122
+ );
4123
+ }
4124
+ add(e, t = void 0) {
4125
+ return addDurationToYearMonth(1, getInternalSlotOrThrowForPlainYearMonth(this), e, t);
4126
+ }
4127
+ subtract(e, t = void 0) {
4128
+ return addDurationToYearMonth(-1, getInternalSlotOrThrowForPlainYearMonth(this), e, t);
4129
+ }
4130
+ until(e, t = void 0) {
4131
+ return differenceTemporalPlainYearMonth(1, getInternalSlotOrThrowForPlainYearMonth(this), e, t);
4132
+ }
4133
+ since(e, t = void 0) {
4134
+ return differenceTemporalPlainYearMonth(
4135
+ -1,
4136
+ getInternalSlotOrThrowForPlainYearMonth(this),
4137
+ e,
4138
+ t,
4139
+ );
4140
+ }
4141
+ equals(e) {
4142
+ const t = getInternalSlotOrThrowForPlainYearMonth(this),
4143
+ o = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(e));
4144
+ return 0 === compareIsoDate(t.o, o.o) && t.Y === o.Y;
4145
+ }
4146
+ toString(e = void 0) {
4147
+ return temporalYearMonthToString(
4148
+ getInternalSlotOrThrowForPlainYearMonth(this),
4149
+ getTemporalShowCalendarNameOption(getOptionsObject(e)),
4150
+ );
4151
+ }
4152
+ toLocaleString(e = void 0, t = void 0) {
4153
+ return (
4154
+ getInternalSlotOrThrowForPlainYearMonth(this),
4155
+ formatDateTime(createDateTimeFormat(e, t, s), this)
4156
+ );
4157
+ }
4158
+ toJSON() {
4159
+ return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), C);
4160
+ }
4161
+ valueOf() {
4162
+ throwTypeError(Se);
4163
+ }
4164
+ toPlainDate(e) {
4165
+ const t = getInternalSlotOrThrowForPlainYearMonth(this);
4166
+ return (
4167
+ isObject(e) || throwTypeError(notObject(e)),
4168
+ createTemporalDate(
4169
+ calendarDateFromFields(
4170
+ t.Y,
4171
+ calendarMergeFields(
4172
+ t.Y,
4173
+ isoDateToFields(t.Y, t.o, m),
4174
+ prepareCalendarFields(t.Y, e, [yt.T], []),
4175
+ ),
4176
+ h,
4177
+ ),
4178
+ t.Y,
4179
+ )
4180
+ );
4181
+ }
4182
+ };
4183
+ (defineStringTag(Tt.prototype, "Temporal.PlainYearMonth"), renameFunction(Tt, "PlainYearMonth"));
4184
+ const Dt = new WeakMap();
4185
+ var ht = class {
4186
+ constructor(e, t, o, n = "iso8601") {
4187
+ const r = toIntegerWithTruncation(e),
4188
+ a = toIntegerWithTruncation(t),
4189
+ i = toIntegerWithTruncation(o);
4190
+ validateString(n);
4191
+ const c = canonicalizeCalendar(n);
4192
+ (isValidIsoDate(r, a, i) || throwRangeError(ue),
4193
+ createTemporalDate(createIsoDateRecord(r, a, i), c, this));
4194
+ }
4195
+ static from(e, t = void 0) {
4196
+ return toTemporalDate(e, t);
4197
+ }
4198
+ static compare(e, t) {
4199
+ return compareIsoDate(
4200
+ getInternalSlotOrThrowForPlainDate(toTemporalDate(e)).o,
4201
+ getInternalSlotOrThrowForPlainDate(toTemporalDate(t)).o,
4202
+ );
4203
+ }
4204
+ get calendarId() {
4205
+ return getInternalSlotOrThrowForPlainDate(this).Y;
4206
+ }
4207
+ get era() {
4208
+ const e = getInternalSlotOrThrowForPlainDate(this);
4209
+ return calendarIsoToDate(e.Y, e.o).oe;
4210
+ }
4211
+ get eraYear() {
4212
+ const e = getInternalSlotOrThrowForPlainDate(this);
4213
+ return calendarIsoToDate(e.Y, e.o).ne;
4214
+ }
4215
+ get year() {
4216
+ const e = getInternalSlotOrThrowForPlainDate(this);
4217
+ return calendarIsoToDate(e.Y, e.o).t;
4218
+ }
4219
+ get month() {
4220
+ const e = getInternalSlotOrThrowForPlainDate(this);
4221
+ return calendarIsoToDate(e.Y, e.o).u;
4222
+ }
4223
+ get monthCode() {
4224
+ const e = getInternalSlotOrThrowForPlainDate(this);
4225
+ return calendarIsoToDate(e.Y, e.o).v;
4226
+ }
4227
+ get day() {
4228
+ const e = getInternalSlotOrThrowForPlainDate(this);
4229
+ return calendarIsoToDate(e.Y, e.o).T;
4230
+ }
4231
+ get dayOfWeek() {
4232
+ const e = getInternalSlotOrThrowForPlainDate(this);
4233
+ return calendarIsoToDate(e.Y, e.o).re;
4234
+ }
4235
+ get dayOfYear() {
4236
+ const e = getInternalSlotOrThrowForPlainDate(this);
4237
+ return calendarIsoToDate(e.Y, e.o).ae;
4238
+ }
4239
+ get weekOfYear() {
4240
+ const e = getInternalSlotOrThrowForPlainDate(this);
4241
+ return calendarIsoToDate(e.Y, e.o).ie.ce;
4242
+ }
4243
+ get yearOfWeek() {
4244
+ const e = getInternalSlotOrThrowForPlainDate(this);
4245
+ return calendarIsoToDate(e.Y, e.o).ie.t;
4246
+ }
4247
+ get daysInWeek() {
4248
+ const e = getInternalSlotOrThrowForPlainDate(this);
4249
+ return calendarIsoToDate(e.Y, e.o).se;
4250
+ }
4251
+ get daysInMonth() {
4252
+ const e = getInternalSlotOrThrowForPlainDate(this);
4253
+ return calendarIsoToDate(e.Y, e.o).le;
4254
+ }
4255
+ get daysInYear() {
4256
+ const e = getInternalSlotOrThrowForPlainDate(this);
4257
+ return calendarIsoToDate(e.Y, e.o).de;
4258
+ }
4259
+ get monthsInYear() {
4260
+ const e = getInternalSlotOrThrowForPlainDate(this);
4261
+ return calendarIsoToDate(e.Y, e.o).me;
4262
+ }
4263
+ get inLeapYear() {
4264
+ const e = getInternalSlotOrThrowForPlainDate(this);
4265
+ return calendarIsoToDate(e.Y, e.o).ue;
4266
+ }
4267
+ toPlainYearMonth() {
4268
+ const e = getInternalSlotOrThrowForPlainDate(this);
4269
+ return createTemporalYearMonth(
4270
+ calendarYearMonthFromFields(e.Y, isoDateToFields(e.Y, e.o, s), h),
4271
+ e.Y,
4272
+ );
4273
+ }
4274
+ toPlainMonthDay() {
4275
+ const e = getInternalSlotOrThrowForPlainDate(this);
4276
+ return createTemporalMonthDay(
4277
+ calendarMonthDayFromFields(e.Y, isoDateToFields(e.Y, e.o, s), h),
4278
+ e.Y,
4279
+ );
4280
+ }
4281
+ add(e, t = void 0) {
4282
+ return addDurationToDate(1, getInternalSlotOrThrowForPlainDate(this), e, t);
4283
+ }
4284
+ subtract(e, t = void 0) {
4285
+ return addDurationToDate(-1, getInternalSlotOrThrowForPlainDate(this), e, t);
4286
+ }
4287
+ with(e, t = void 0) {
4288
+ const o = getInternalSlotOrThrowForPlainDate(this);
4289
+ validatePartialTemporalObject(e);
4290
+ const n = calendarMergeFields(
4291
+ o.Y,
4292
+ isoDateToFields(o.Y, o.o, s),
4293
+ prepareCalendarFields(o.Y, e, [yt.t, yt.u, yt.v, yt.T]),
4294
+ ),
4295
+ r = getTemporalOverflowOption(getOptionsObject(t));
4296
+ return createTemporalDate(calendarDateFromFields(o.Y, n, r), o.Y);
4297
+ }
4298
+ withCalendar(e) {
4299
+ return createTemporalDate(
4300
+ getInternalSlotOrThrowForPlainDate(this).o,
4301
+ toTemporalCalendarIdentifier(e),
4302
+ );
4303
+ }
4304
+ until(e, t = void 0) {
4305
+ return differenceTemporalPlainDate(1, getInternalSlotOrThrowForPlainDate(this), e, t);
4306
+ }
4307
+ since(e, t = void 0) {
4308
+ return differenceTemporalPlainDate(-1, getInternalSlotOrThrowForPlainDate(this), e, t);
4309
+ }
4310
+ equals(e) {
4311
+ const t = getInternalSlotOrThrowForPlainDate(this),
4312
+ o = getInternalSlotOrThrowForPlainDate(toTemporalDate(e));
4313
+ return !compareIsoDate(t.o, o.o) && calendarEquals(t.Y, o.Y);
4314
+ }
4315
+ toPlainDateTime(e = void 0) {
4316
+ const t = getInternalSlotOrThrowForPlainDate(this);
4317
+ return createTemporalDateTime(combineIsoDateAndTimeRecord(t.o, toTimeRecordOrMidnight(e)), t.Y);
4318
+ }
4319
+ toZonedDateTime(e) {
4320
+ const t = getInternalSlotOrThrowForPlainDate(this);
4321
+ let o, n;
4322
+ if (isObject(e)) {
4323
+ const t = e.timeZone;
4324
+ void 0 === t
4325
+ ? (n = toTemporalTimeZoneIdentifier(e))
4326
+ : ((n = toTemporalTimeZoneIdentifier(t)), (o = e.plainTime));
4327
+ } else n = toTemporalTimeZoneIdentifier(e);
4328
+ return createTemporalZonedDateTime(
4329
+ void 0 === o
4330
+ ? getStartOfDay(n, t.o)
4331
+ : getEpochNanosecondsFor(
4332
+ n,
4333
+ validateIsoDateTime(combineIsoDateAndTimeRecord(t.o, toTemporalTime(o))),
4334
+ g,
4335
+ ),
4336
+ n,
4337
+ t.Y,
4338
+ );
4339
+ }
4340
+ toString(e = void 0) {
4341
+ return temporalDateToString(
4342
+ getInternalSlotOrThrowForPlainDate(this),
4343
+ getTemporalShowCalendarNameOption(getOptionsObject(e)),
4344
+ );
4345
+ }
4346
+ toLocaleString(e = void 0, t = void 0) {
4347
+ return (
4348
+ getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, s), this)
4349
+ );
4350
+ }
4351
+ toJSON() {
4352
+ return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), C);
4353
+ }
4354
+ valueOf() {
4355
+ throwTypeError(Se);
4356
+ }
4357
+ };
4358
+ (defineStringTag(ht.prototype, "Temporal.PlainDate"), renameFunction(ht, "PlainDate"));
4359
+ const pt = createNullPrototypeObject({}),
4360
+ gt = { chinese: createLruCache(2e3), dangi: createLruCache(2e3) },
4361
+ ft = { chinese: createLruCache(1e4), dangi: createLruCache(1e4) },
4362
+ It = createLruCache(5e3),
4363
+ Ot = createLruCache(1e3),
4364
+ Ft = new Map([
4365
+ ["ah", 1],
4366
+ ["bh", !1],
4367
+ ]),
4368
+ St = createNullPrototypeObject({
4369
+ iso8601: new Map(),
4370
+ buddhist: new Map([["be", 1]]),
4371
+ chinese: new Map(),
4372
+ coptic: new Map([["am", 1]]),
4373
+ dangi: new Map(),
4374
+ ethioaa: new Map([["aa", 1]]),
4375
+ ethiopic: new Map([
4376
+ ["am", 1],
4377
+ ["aa", -5499],
4378
+ ]),
4379
+ gregory: new Map([
4380
+ ["ce", 1],
4381
+ ["bce", !1],
4382
+ ]),
4383
+ hebrew: new Map([["am", 1]]),
4384
+ indian: new Map([["shaka", 1]]),
4385
+ "islamic-civil": Ft,
4386
+ "islamic-tbla": Ft,
4387
+ "islamic-umalqura": Ft,
4388
+ japanese: new Map([
4389
+ ["reiwa", 2019],
4390
+ ["heisei", 1989],
4391
+ ["showa", 1926],
4392
+ ["taisho", 1912],
4393
+ ["meiji", 1868],
4394
+ ["ce", 1],
4395
+ ["bce", !1],
4396
+ ]),
4397
+ persian: new Map([["ap", 1]]),
4398
+ roc: new Map([
4399
+ ["roc", 1],
4400
+ ["broc", !1],
4401
+ ]),
4402
+ }),
4403
+ yt = {
4404
+ oe: "era",
4405
+ ne: "eraYear",
4406
+ t: "year",
4407
+ u: "month",
4408
+ v: "monthCode",
4409
+ T: "day",
4410
+ D: "hour",
4411
+ I: "minute",
4412
+ O: "second",
4413
+ F: "millisecond",
4414
+ S: "microsecond",
4415
+ $: "nanosecond",
4416
+ M: "offset",
4417
+ P: "timeZone",
4418
+ },
4419
+ wt = [yt.oe, yt.ne, yt.t, yt.u, yt.v, yt.T, yt.D, yt.I, yt.O, yt.F, yt.S, yt.$, yt.M, yt.P],
4420
+ vt = {
4421
+ [yt.oe]: [toString],
4422
+ [yt.ne]: [toIntegerWithTruncation],
4423
+ [yt.t]: [toIntegerWithTruncation],
4424
+ [yt.u]: [toPositiveIntegerWithTruncation],
4425
+ [yt.v]: [(e) => createMonthCode(...parseMonthCode(e))],
4426
+ [yt.T]: [toPositiveIntegerWithTruncation],
4427
+ [yt.D]: [toIntegerWithTruncation, 0],
4428
+ [yt.I]: [toIntegerWithTruncation, 0],
4429
+ [yt.O]: [toIntegerWithTruncation, 0],
4430
+ [yt.F]: [toIntegerWithTruncation, 0],
4431
+ [yt.S]: [toIntegerWithTruncation, 0],
4432
+ [yt.$]: [toIntegerWithTruncation, 0],
4433
+ [yt.M]: [
4434
+ (e) => {
4435
+ const t = toPrimitive(e);
4436
+ return (validateString(t), parseDateTimeUtcOffset(t), t);
4437
+ },
4438
+ ],
4439
+ [yt.P]: [toTemporalTimeZoneIdentifier],
4440
+ },
4441
+ Et = new WeakMap(),
4442
+ Mt = signTimeDuration;
4443
+ var bt = class {
4444
+ constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, c = 0, s = 0, l = 0) {
4445
+ createTemporalDuration(
4446
+ createTemporalDurationSlot([e, t, o, n, r, a, i, c, s, l].map(toIntegerIfIntegral)),
4447
+ this,
4448
+ );
4449
+ }
4450
+ static from(e) {
4451
+ return createTemporalDuration(toTemporalDuration(e));
4452
+ }
4453
+ static compare(e, t, o = void 0) {
4454
+ const n = toTemporalDuration(e),
4455
+ r = toTemporalDuration(t),
4456
+ a = getTemporalRelativeToOption(getOptionsObject(o));
4457
+ if (n.every((e, t) => r[t] === e)) return 0;
4458
+ const i = defaultTemporalLargestUnit(n),
4459
+ c = defaultTemporalLargestUnit(r),
4460
+ s = toInternalDurationRecord(n),
4461
+ l = toInternalDurationRecord(r);
4462
+ let d, m;
4463
+ return a.Me && (isDateUnit(i) || isDateUnit(c))
4464
+ ? compareEpochNanoseconds(addZonedDateTime(a.Me, s, h), addZonedDateTime(a.Me, l, h))
4465
+ : (isCalendarUnit(i) || isCalendarUnit(c)
4466
+ ? (a.be || throwRangeError(missingField("relativeTo")),
4467
+ (d = dateDurationDays(s.A, a.be)),
4468
+ (m = dateDurationDays(l.A, a.be)))
4469
+ : ((d = n[te]), (m = r[te])),
4470
+ Me(add24HourDaysToTimeDuration(s.p, d), add24HourDaysToTimeDuration(l.p, m)));
4471
+ }
4472
+ get years() {
4473
+ return getInternalSlotOrThrowForDuration(this)[X];
4474
+ }
4475
+ get months() {
4476
+ return getInternalSlotOrThrowForDuration(this)[Q];
4477
+ }
4478
+ get weeks() {
4479
+ return getInternalSlotOrThrowForDuration(this)[ee];
4480
+ }
4481
+ get days() {
4482
+ return getInternalSlotOrThrowForDuration(this)[te];
4483
+ }
4484
+ get hours() {
4485
+ return getInternalSlotOrThrowForDuration(this)[oe];
4486
+ }
4487
+ get minutes() {
4488
+ return getInternalSlotOrThrowForDuration(this)[ne];
4489
+ }
4490
+ get seconds() {
4491
+ return getInternalSlotOrThrowForDuration(this)[re];
4492
+ }
4493
+ get milliseconds() {
4494
+ return getInternalSlotOrThrowForDuration(this)[ae];
4495
+ }
4496
+ get microseconds() {
4497
+ return getInternalSlotOrThrowForDuration(this)[ie];
4498
+ }
4499
+ get nanoseconds() {
4500
+ return getInternalSlotOrThrowForDuration(this)[ce];
4501
+ }
4502
+ get sign() {
4503
+ return durationSign(getInternalSlotOrThrowForDuration(this));
4504
+ }
4505
+ get blank() {
4506
+ return 0 === durationSign(getInternalSlotOrThrowForDuration(this));
4507
+ }
4508
+ with(e) {
4509
+ const t = getInternalSlotOrThrowForDuration(this);
4510
+ return createTemporalDuration(
4511
+ createTemporalDurationSlot(withArray(toTemporalPartialDurationRecord(e), t)),
4512
+ );
4513
+ }
4514
+ negated() {
4515
+ return createTemporalDuration(
4516
+ applySignToDurationSlot(getInternalSlotOrThrowForDuration(this), -1),
4517
+ );
4518
+ }
4519
+ abs() {
4520
+ return createTemporalDuration(
4521
+ createTemporalDurationSlot(getInternalSlotOrThrowForDuration(this).map(Math.abs)),
4522
+ );
4523
+ }
4524
+ add(e) {
4525
+ return addDurations(1, getInternalSlotOrThrowForDuration(this), e);
4526
+ }
4527
+ subtract(e) {
4528
+ return addDurations(-1, getInternalSlotOrThrowForDuration(this), e);
4529
+ }
4530
+ round(e) {
4531
+ const t = getInternalSlotOrThrowForDuration(this),
4532
+ o = getRoundToOptionsObject(e);
4533
+ let n = getTemporalUnitValuedOption(o, "largestUnit", void 0);
4534
+ const r = getTemporalRelativeToOption(o),
4535
+ a = getRoundingIncrementOption(o),
4536
+ i = getRoundingModeOption(o, Z);
4537
+ let c = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
4538
+ validateTemporalUnitValue(c, d);
4539
+ const s = void 0 !== c;
4540
+ c ??= K;
4541
+ const l = defaultTemporalLargestUnit(t),
4542
+ m = largerOfTwoTemporalUnits(l, c),
4543
+ u = void 0 !== n;
4544
+ if (
4545
+ ((void 0 !== n && "auto" !== n) || (n = m),
4546
+ ((!s && !u) || n > c) && throwRangeError(fe),
4547
+ isDateUnit(c) ||
4548
+ validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(c), !1),
4549
+ a > 1 && n !== c && isDateUnit(c) && throwRangeError(fe),
4550
+ r.Me)
4551
+ )
4552
+ return createTemporalDuration(
4553
+ temporalDurationFromInternal(
4554
+ differenceZonedDateTimeWithRounding(
4555
+ r.Me,
4556
+ createZonedDateTimeSlot(
4557
+ addZonedDateTime(r.Me, toInternalDurationRecord(t), h),
4558
+ r.Me.P,
4559
+ r.Me.Y,
4560
+ ),
4561
+ n,
4562
+ a,
4563
+ c,
4564
+ i,
4565
+ ),
4566
+ isDateUnit(n) ? J : n,
4567
+ ),
4568
+ );
4569
+ if (r.be) {
4570
+ const e = toInternalDurationRecordWith24HourDays(t),
4571
+ o = addTime(midnightTimeRecord(), e.p);
4572
+ return createTemporalDuration(
4573
+ temporalDurationFromInternal(
4574
+ differencePlainDateTimeWithRounding(
4575
+ combineIsoDateAndTimeRecord(r.be.o, midnightTimeRecord()),
4576
+ combineIsoDateAndTimeRecord(
4577
+ calendarDateAdd(r.be.Y, r.be.o, adjustDateDurationRecord(e.A, o.K), h),
4578
+ o,
4579
+ ),
4580
+ r.be.Y,
4581
+ n,
4582
+ a,
4583
+ c,
4584
+ i,
4585
+ ),
4586
+ n,
4587
+ ),
4588
+ );
4589
+ }
4590
+ (isCalendarUnit(l) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
4591
+ const T = toInternalDurationRecordWith24HourDays(t);
4592
+ return createTemporalDuration(
4593
+ temporalDurationFromInternal(
4594
+ c === B
4595
+ ? combineDateAndTimeDuration(
4596
+ createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(T.p, a, i)[0]),
4597
+ createTimeDurationFromSeconds(0),
4598
+ )
4599
+ : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(T.p, a, c, i)),
4600
+ n,
4601
+ ),
4602
+ );
4603
+ }
4604
+ total(e) {
4605
+ const t = getInternalSlotOrThrowForDuration(this);
4606
+ void 0 === e && throwTypeError(ye);
4607
+ const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e),
4608
+ n = getTemporalRelativeToOption(o),
4609
+ r = getTemporalUnitValuedOption(o, "unit", T);
4610
+ if ((validateTemporalUnitValue(r, d), n.Me))
4611
+ return ((e, t, o) =>
4612
+ isDateUnit(o)
4613
+ ? totalRelativeDuration(
4614
+ differenceZonedDateTime(e, t, o),
4615
+ e.U,
4616
+ t.U,
4617
+ getIsoDateTimeForZonedDateTimeSlot(e),
4618
+ e.P,
4619
+ e.Y,
4620
+ o,
4621
+ )
4622
+ : totalTimeDuration(timeDurationFromEpochNanosecondsDifference(t.U, e.U), o))(
4623
+ n.Me,
4624
+ createZonedDateTimeSlot(
4625
+ addZonedDateTime(n.Me, toInternalDurationRecord(t), h),
4626
+ n.Me.P,
4627
+ n.Me.Y,
4628
+ ),
4629
+ r,
4630
+ );
4631
+ if (n.be) {
4632
+ const e = toInternalDurationRecordWith24HourDays(t),
4633
+ o = addTime(midnightTimeRecord(), e.p);
4634
+ return ((e, t, o, n) =>
4635
+ compareIsoDateTime(e, t)
4636
+ ? (validateIsoDateTime(e),
4637
+ validateIsoDateTime(t),
4638
+ totalRelativeDuration(
4639
+ differenceISODateTime(e, t, o, n),
4640
+ getUtcEpochNanoseconds(e),
4641
+ getUtcEpochNanoseconds(t),
4642
+ e,
4643
+ void 0,
4644
+ o,
4645
+ n,
4646
+ ))
4647
+ : 0)(
4648
+ combineIsoDateAndTimeRecord(n.be.o, midnightTimeRecord()),
4649
+ combineIsoDateAndTimeRecord(
4650
+ calendarDateAdd(n.be.Y, n.be.o, adjustDateDurationRecord(e.A, o.K), h),
4651
+ o,
4652
+ ),
4653
+ n.be.Y,
4654
+ r,
4655
+ );
4656
+ }
4657
+ return (
4658
+ (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) &&
4659
+ throwRangeError(missingField("relativeTo")),
4660
+ totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r)
4661
+ );
4662
+ }
4663
+ toString(e = void 0) {
4664
+ const t = getInternalSlotOrThrowForDuration(this),
4665
+ o = getOptionsObject(e),
4666
+ n = getTemporalFractionalSecondDigitsOption(o),
4667
+ r = getRoundingModeOption(o, P),
4668
+ a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
4669
+ (validateTemporalUnitValue(a, l), (a !== J && a !== G) || throwRangeError(disallowedUnit(a)));
4670
+ const i = toSecondsStringPrecisionRecord(a, n);
4671
+ if (i.ve === K && 1 === i.Ee) return temporalDurationToString(t, i.$e);
4672
+ const c = toInternalDurationRecord(t);
4673
+ return temporalDurationToString(
4674
+ temporalDurationFromInternal(
4675
+ combineDateAndTimeDuration(c.A, roundTimeDuration(c.p, i.Ee, i.ve, r)),
4676
+ largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), _),
4677
+ ),
4678
+ i.$e,
4679
+ );
4680
+ }
4681
+ toJSON() {
4682
+ return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
4683
+ }
4684
+ toLocaleString(e = void 0, t = void 0) {
4685
+ const o = getInternalSlotOrThrowForDuration(this),
4686
+ n = createNullPrototypeObject({});
4687
+ return (
4688
+ le.map((e, t) => {
4689
+ n[e] = o[t];
4690
+ }),
4691
+ new Intl.DurationFormat(e, t).format(n)
4692
+ );
4693
+ }
4694
+ valueOf() {
4695
+ throwTypeError(Se);
4696
+ }
4697
+ };
4698
+ (defineStringTag(bt.prototype, "Temporal.Duration"), renameFunction(bt, "Duration"));
4699
+ const Pt = {
4700
+ [E]: Math.ceil,
4701
+ [M]: Math.floor,
4702
+ [b]: roundExpand,
4703
+ [P]: Math.trunc,
4704
+ [R]: roundHalfCeil,
4705
+ [N]: roundHalfFloor,
4706
+ [Z]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
4707
+ [$]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
4708
+ [Y]: roundHalfEven,
4709
+ },
4710
+ Rt = {
4711
+ [E]: Math.ceil,
4712
+ [M]: Math.floor,
4713
+ [b]: Math.ceil,
4714
+ [P]: Math.floor,
4715
+ [R]: roundHalfCeil,
4716
+ [N]: roundHalfFloor,
4717
+ [Z]: roundHalfCeil,
4718
+ [$]: roundHalfFloor,
4719
+ [Y]: roundHalfEven,
4720
+ },
4721
+ Nt = globalThis.Intl.DateTimeFormat,
4722
+ Zt = [];
4723
+ new Nt(
4724
+ void 0,
4725
+ new Proxy(
4726
+ {},
4727
+ {
4728
+ get(e, t) {
4729
+ Zt.push(t);
4730
+ },
4731
+ },
4732
+ ),
4733
+ );
4734
+ const $t = new WeakMap(),
4735
+ Yt = ["year", "month", "day", "weekday", "dateStyle"],
4736
+ Ct = ["hour", "minute", "second", "fractionalSecondDigits", "dayPeriod", "timeStyle"];
4737
+ var Ut = class {
4738
+ Ae(e) {
4739
+ return formatDateTime(this, e);
4740
+ }
4741
+ },
4742
+ jt = class {
4743
+ constructor(e, t) {
4744
+ createDateTimeFormat(e, t, d, void 0, this);
4745
+ }
4746
+ get format() {
4747
+ return Object.defineProperty(
4748
+ (getInternalSlotOrThrowForDateTimeFormat(this).ke ||= Ut.prototype.Ae.bind(this)),
4749
+ "name",
4750
+ { value: "" },
4751
+ );
4752
+ }
4753
+ formatToParts(e) {
4754
+ return ((e, t) => {
4755
+ const [o, n] = handleDateTimeValue(getInternalSlotOrThrowForDateTimeFormat(e), t);
4756
+ return o.formatToParts(n);
4757
+ })(this, e);
4758
+ }
4759
+ formatRange(e, t) {
4760
+ return (
4761
+ (void 0 !== e && void 0 !== t) || throwTypeError(Oe),
4762
+ ((e, t, o) => {
4763
+ const n = getInternalSlotOrThrowForDateTimeFormat(e);
4764
+ validateSameTemporalType(t, o);
4765
+ const [r, a] = handleDateTimeValue(n, t);
4766
+ return r.formatRange(a, handleDateTimeValue(n, o)[1]);
4767
+ })(this, toDateTimeFormattable(e), toDateTimeFormattable(t))
4768
+ );
4769
+ }
4770
+ formatRangeToParts(e, t) {
4771
+ return (
4772
+ (void 0 !== e && void 0 !== t) || throwTypeError(Oe),
4773
+ ((e, t, o) => {
4774
+ const n = getInternalSlotOrThrowForDateTimeFormat(e);
4775
+ validateSameTemporalType(t, o);
4776
+ const [r, a] = handleDateTimeValue(n, t);
4777
+ return r.formatRangeToParts(a, handleDateTimeValue(n, o)[1]);
4778
+ })(this, toDateTimeFormattable(e), toDateTimeFormattable(t))
4779
+ );
4780
+ }
4781
+ resolvedOptions() {
4782
+ return getInternalSlotOrThrowForDateTimeFormat(this).Pe.resolvedOptions();
4783
+ }
4784
+ };
4785
+ const Wt = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
4786
+ ((Wt.prototype.value = jt.prototype),
4787
+ Object.defineProperties(DateTimeFormat, Wt),
4788
+ (DateTimeFormat.prototype.constructor = DateTimeFormat),
4789
+ defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat"));
4790
+ const At = new WeakMap();
4791
+ var Lt = class {
4792
+ constructor(e) {
4793
+ createTemporalInstant(
4794
+ validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))),
4795
+ this,
4796
+ );
4797
+ }
4798
+ static from(e) {
4799
+ return toTemporalInstant$1(e);
4800
+ }
4801
+ static fromEpochMilliseconds(e) {
4802
+ return createTemporalInstant(
4803
+ validateEpochNanoseconds(createEpochNanosecondsFromEpochMilliseconds(toIntegerIfIntegral(e))),
4804
+ );
4805
+ }
4806
+ static fromEpochNanoseconds(e) {
4807
+ return createTemporalInstant(
4808
+ validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))),
4809
+ );
4810
+ }
4811
+ static compare(e, t) {
4812
+ return compareEpochNanoseconds(
4813
+ getInternalSlotOrThrowForInstant(toTemporalInstant$1(e)).U,
4814
+ getInternalSlotOrThrowForInstant(toTemporalInstant$1(t)).U,
4815
+ );
4816
+ }
4817
+ get epochMilliseconds() {
4818
+ return epochMilliseconds(getInternalSlotOrThrowForInstant(this).U);
4819
+ }
4820
+ get epochNanoseconds() {
4821
+ return convertEpochNanosecondsToBigInt(getInternalSlotOrThrowForInstant(this).U);
4822
+ }
4823
+ add(e) {
4824
+ return addDurationToInstant(1, getInternalSlotOrThrowForInstant(this), e);
4825
+ }
4826
+ subtract(e) {
4827
+ return addDurationToInstant(-1, getInternalSlotOrThrowForInstant(this), e);
4828
+ }
4829
+ until(e, t = void 0) {
4830
+ return differenceTemporalInstant(1, getInternalSlotOrThrowForInstant(this), e, t);
4831
+ }
4832
+ since(e, t = void 0) {
4833
+ return differenceTemporalInstant(-1, getInternalSlotOrThrowForInstant(this), e, t);
4834
+ }
4835
+ round(e) {
4836
+ const t = getInternalSlotOrThrowForInstant(this),
4837
+ o = getRoundToOptionsObject(e),
4838
+ n = getRoundingIncrementOption(o),
4839
+ r = getRoundingModeOption(o, Z),
4840
+ a = getTemporalUnitValuedOption(o, "smallestUnit", T);
4841
+ return (
4842
+ validateTemporalUnitValue(a, l),
4843
+ validateTemporalRoundingIncrement(n, i / nanosecondsForTimeUnit(a), !0),
4844
+ createTemporalInstant(roundTemporalInstant(t.U, n, a, r))
4845
+ );
4846
+ }
4847
+ equals(e) {
4848
+ return !compareEpochNanoseconds(
4849
+ getInternalSlotOrThrowForInstant(this).U,
4850
+ getInternalSlotOrThrowForInstant(toTemporalInstant$1(e)).U,
4851
+ );
4852
+ }
4853
+ toString(e = void 0) {
4854
+ const t = getInternalSlotOrThrowForInstant(this),
4855
+ o = getOptionsObject(e),
4856
+ n = getTemporalFractionalSecondDigitsOption(o),
4857
+ r = getRoundingModeOption(o, P),
4858
+ a = getTemporalUnitValuedOption(o, "smallestUnit", void 0),
4859
+ i = o.timeZone;
4860
+ (validateTemporalUnitValue(a, l), a === J && throwRangeError(invalidField("smallestUnit")));
4861
+ const c = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier),
4862
+ s = toSecondsStringPrecisionRecord(a, n);
4863
+ return temporalInstantToString(roundTemporalInstant(t.U, s.Ee, s.ve, r), c, s.$e);
4864
+ }
4865
+ toLocaleString(e = void 0, t = void 0) {
4866
+ return (
4867
+ getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, d), this)
4868
+ );
4869
+ }
4870
+ toJSON() {
4871
+ return temporalInstantToString(getInternalSlotOrThrowForInstant(this).U);
4872
+ }
4873
+ valueOf() {
4874
+ throwTypeError(Se);
4875
+ }
4876
+ toZonedDateTimeISO(e) {
4877
+ return createTemporalZonedDateTime(
4878
+ getInternalSlotOrThrowForInstant(this).U,
4879
+ toTemporalTimeZoneIdentifier(e),
4880
+ "iso8601",
4881
+ );
4882
+ }
4883
+ };
4884
+ (defineStringTag(Lt.prototype, "Temporal.Instant"), renameFunction(Lt, "Instant"));
4885
+ const kt = class {
4886
+ toTemporalInstant() {
4887
+ const e = Date.prototype.valueOf.call(this);
4888
+ return (
4889
+ isNaN(e) && throwRangeError("invalid date"),
4890
+ createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e))
4891
+ );
4892
+ }
4893
+ }.prototype.toTemporalInstant,
4894
+ zt = Object.getOwnPropertyDescriptors(globalThis.Intl);
4895
+ zt.DateTimeFormat.value = DateTimeFormat;
4896
+ const Vt = {};
4897
+ Object.defineProperties(Vt, zt);
4898
+ const xt = {
4899
+ timeZoneId: () => systemTimeZoneIdentifier(),
4900
+ instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
4901
+ plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
4902
+ zonedDateTimeISO: (e = systemTimeZoneIdentifier()) =>
4903
+ createTemporalZonedDateTime(
4904
+ systemUtcEpochNanoseconds(),
4905
+ toTemporalTimeZoneIdentifier(e),
4906
+ "iso8601",
4907
+ ),
4908
+ plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
4909
+ plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p),
4910
+ };
4911
+ (defineStringTag(xt, "Temporal.Now"), makePropertiesNonEnumerable(xt));
4912
+ const Ht = {
4913
+ Instant: Lt,
4914
+ PlainDateTime: $e,
4915
+ PlainDate: ht,
4916
+ PlainTime: Ce,
4917
+ PlainYearMonth: Tt,
4918
+ PlainMonthDay: mt,
4919
+ Duration: bt,
4920
+ ZonedDateTime: Pe,
4921
+ Now: xt,
4922
+ };
4923
+ (defineStringTag(Ht, "Temporal"), makePropertiesNonEnumerable(Ht));
4924
+ export { defineNonEnumerableProperty as i, Vt as n, kt as r, Ht as t };