temporal-polyfill-lite 0.3.0 → 0.3.2

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,2872 @@
1
+ function getNameFromUnit(e) {
2
+ return ie[e];
3
+ }
4
+ function nanosecondsForTimeUnit(e) {
5
+ return ce[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 = Fe(e);
46
+ return Number.isInteger(t) || throwRangeError(invalidNumber(t)), t + 0;
47
+ }
48
+ function toIntegerWithTruncation(e) {
49
+ const t = Fe(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 === u && throwRangeError(missingField(t)), n;
62
+ const a = toString(r);
63
+ return o.includes(a) || throwRangeError(invalidField(t)), a;
64
+ }
65
+ function getRoundToOptionsObject(e = throwTypeError(Se)) {
66
+ return "string" == typeof e ? createNullPrototypeObject({ smallestUnit: e }) : getOptionsObject(e);
67
+ }
68
+ function validateString(e) {
69
+ "string" != typeof e && throwTypeError(((e) => `${e} is not a string`)(e));
70
+ }
71
+ function divFloor(e, t) {
72
+ return Math.floor(e / t) + 0;
73
+ }
74
+ function modFloor(e, t) {
75
+ return (e % t + t) % t + 0;
76
+ }
77
+ function divTrunc(e, t) {
78
+ return Math.trunc(e / t) + 0;
79
+ }
80
+ function sign(e) {
81
+ return e < 0 ? -1 : e ? 1 : 0;
82
+ }
83
+ function compare(e, t) {
84
+ return sign(e - t);
85
+ }
86
+ function clamp(e, t, o) {
87
+ return e < t ? t : e > o ? o : e;
88
+ }
89
+ function isWithin(e, t, o) {
90
+ return e >= t && e <= o;
91
+ }
92
+ function makePropertyNonEnumerable(e, t) {
93
+ Object.defineProperty(e, t, { enumerable: !1 });
94
+ }
95
+ function makePropertiesNonEnumerable(e) {
96
+ for (const t of Object.keys(e)) makePropertyNonEnumerable(e, t);
97
+ }
98
+ function defineNonEnumerableProperty(e, t, o) {
99
+ e[t] = o, makePropertyNonEnumerable(e, t);
100
+ }
101
+ function defineStringTag(e, t) {
102
+ Object.defineProperty(e, Symbol.toStringTag, {
103
+ value: t,
104
+ configurable: !0
105
+ });
106
+ }
107
+ function renameFunction(e, t) {
108
+ Object.defineProperty(e, "name", { value: t });
109
+ }
110
+ function normalizeEpochNanoseconds(e, t) {
111
+ return [e + divFloor(t, i), modFloor(t, i)];
112
+ }
113
+ function createEpochNanosecondsFromBigInt(e) {
114
+ return normalizeEpochNanoseconds(Number(e / BigInt(i)), Number(e % BigInt(i)));
115
+ }
116
+ function createEpochNanosecondsFromEpochMilliseconds(e) {
117
+ return normalizeEpochNanoseconds(divFloor(e, r), 1e6 * modFloor(e, r));
118
+ }
119
+ function createEpochNanosecondsFromEpochSeconds(e) {
120
+ return createEpochNanosecondsFromEpochMilliseconds(1e3 * e);
121
+ }
122
+ function convertEpochNanosecondsToBigInt(e) {
123
+ return BigInt(e[0]) * BigInt(i) + BigInt(e[1]);
124
+ }
125
+ function compareEpochNanoseconds(e, t) {
126
+ return compare(e[0], t[0]) || compare(e[1], t[1]);
127
+ }
128
+ function epochMilliseconds(t) {
129
+ return t[0] * r + divFloor(t[1], e);
130
+ }
131
+ function epochSeconds(e) {
132
+ return divFloor(epochMilliseconds(e), 1e3);
133
+ }
134
+ function addNanosecondsToEpochSeconds(e, t) {
135
+ return normalizeEpochNanoseconds(e[0], e[1] + t);
136
+ }
137
+ function differenceEpochNanoseconds(e, t) {
138
+ return normalize(t[0] - e[0], t[1] - e[1]);
139
+ }
140
+ function addTimeDurationToEpochNanoseconds(e, t) {
141
+ return normalizeEpochNanoseconds(e[0] + t[0], e[1] + t[1]);
142
+ }
143
+ function asciiLowerCase(e) {
144
+ return e.replace(/[A-Z]/g, (e) => e.toLowerCase());
145
+ }
146
+ function asciiUpperCase(e) {
147
+ return e.replace(/[a-z]/g, (e) => e.toUpperCase());
148
+ }
149
+ function toZeroPaddedDecimalString(e, t) {
150
+ return toString(e).padStart(t, "0");
151
+ }
152
+ function normalize(e, t) {
153
+ const [o, n] = normalizeEpochNanoseconds(e, t);
154
+ return o < 0 && n > 0 ? [o + 1, n - i] : [o, n];
155
+ }
156
+ function createTimeDurationFromSeconds(e) {
157
+ return normalize(divTrunc(e, n), e % n * 1e9);
158
+ }
159
+ function addTimeDuration(e, t) {
160
+ return normalize(e[0] + t[0], e[1] + t[1]);
161
+ }
162
+ function absTimeDuration(e) {
163
+ return normalize(Math.abs(e[0]), Math.abs(e[1]));
164
+ }
165
+ function negateTimeDuration(e) {
166
+ return normalize(-e[0], -e[1]);
167
+ }
168
+ function signTimeDuration(e) {
169
+ return ye(e, [0, 0]);
170
+ }
171
+ function timeDurationToSubsecondsNumber(e, t, o) {
172
+ const n = signTimeDuration(e);
173
+ return e = absTimeDuration(e), n * Fe(`${864 * e[0] + divTrunc(e[1], 1e11)}${toZeroPaddedDecimalString(divTrunc(e[1] % 1e11, 10 ** (9 + t)), 2 - t)}.${o ? toZeroPaddedDecimalString(e[1] % 10 ** (9 + t), 9 + t) : "0"}`) + 0;
174
+ }
175
+ function roundTimeDurationByDays(e, t, o) {
176
+ return normalize(roundNumberToIncrement(e[0] + signTimeDuration(e) * (e[1] ? .2 * compare(Math.abs(e[1] / i), .5) + .5 : 0), t, o), 0);
177
+ }
178
+ function divideTimeDurationToFloatingPoint(e, t) {
179
+ return t <= 1e9 ? timeDurationToSubsecondsNumber(e, -9 + Math.log10(t), !0) : i / t * e[0] + e[1] / t;
180
+ }
181
+ function interpretISODateTimeOffset(e, t, o, n, r, a, i, l) {
182
+ if (!t) return getStartOfDay(r, e);
183
+ const c = combineIsoDateAndTimeRecord(e, t);
184
+ if (o === w || o === S && "ignore" == i) return getEpochNanosecondsFor(r, c, a);
185
+ if (o === F || o === S && "use" == i) return validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(c.o.t, c.o.u, c.o.T, c.p.D, c.p.I, c.p.O, c.p.S, c.p.F, c.p.v - n)));
186
+ ((e) => {
187
+ Math.abs(isoDateToEpochDays(e.t, e.u - 1, e.T)) > 1e8 && throwRangeError(me);
188
+ })(e);
189
+ const s = getPossibleEpochNanoseconds(r, c);
190
+ for (const e of s) {
191
+ const t = getOffsetNanosecondsFor(r, e);
192
+ if (t === n) return e;
193
+ if (!l && roundNumberToIncrement(t, 6e10, "halfExpand") === n) return e;
194
+ }
195
+ return "reject" === i && throwRangeError("time zone offset mismatch"), disambiguatePossibleEpochNanoseconds(s, r, c, a);
196
+ }
197
+ function toTemporalZonedDateTime(e, t) {
198
+ let o, n, r, a, i, l, c, s = !1, d = !0;
199
+ if (isObject(e)) {
200
+ if (isZonedDateTime(e)) {
201
+ const o = getOptionsObject(t);
202
+ return getTemporalDisambiguationOption(o), getTemporalOffsetOption(o, h), getTemporalOverflowOption(o), getInternalSlotOrThrowForZonedDateTime(e);
203
+ }
204
+ i = getTemporalCalendarIdentifierWithIsoDefault(e);
205
+ const s = prepareCalendarFields(i, e, [
206
+ Dt.t,
207
+ Dt.u,
208
+ Dt.P,
209
+ Dt.T,
210
+ Dt.D,
211
+ Dt.I,
212
+ Dt.O,
213
+ Dt.S,
214
+ Dt.F,
215
+ Dt.v,
216
+ Dt.R,
217
+ Dt.N
218
+ ], [Dt.N]);
219
+ o = s.timeZone, n = s.offset;
220
+ const d = getOptionsObject(t);
221
+ r = getTemporalDisambiguationOption(d), a = getTemporalOffsetOption(d, h);
222
+ const m = interpretTemporalDateTimeFields(i, s, getTemporalOverflowOption(d));
223
+ l = m.o, c = m.p;
224
+ } else {
225
+ validateString(e);
226
+ const m = parseIsoDateTime(e, [Xe]);
227
+ o = toTemporalTimeZoneIdentifier(m.N.Z), n = m.N.$, s = m.N.M, i = canonicalizeCalendar(m.U || "iso8601"), d = !1, n && (d = hasUtcOffsetSubMinuteParts(n));
228
+ const T = getOptionsObject(t);
229
+ r = getTemporalDisambiguationOption(T), a = getTemporalOffsetOption(T, h), getTemporalOverflowOption(T), l = createIsoDateRecord(m.t, m.u, m.T), c = m.p;
230
+ }
231
+ const m = s ? F : n ? S : w;
232
+ return createZonedDateTimeSlot(interpretISODateTimeOffset(l, c, m, m === S ? parseDateTimeUtcOffset(n) : 0, o, r, a, d), o, i);
233
+ }
234
+ function createTemporalZonedDateTime(e, t, o, n) {
235
+ return createTemporalZonedDateTimeFromSlot(createZonedDateTimeSlot(e, t, o, ((e, t) => Re[e] && Re[e].C(clampEpochSecond(t)))(t, epochSeconds(e))), n);
236
+ }
237
+ function createZonedDateTimeSlot(e, t, o, n) {
238
+ return {
239
+ Y: e,
240
+ N: t,
241
+ U: o,
242
+ A: n
243
+ };
244
+ }
245
+ function temporalZonedDateTimeToString(e, t, o, n, r, a = 1, i = G, l = P) {
246
+ const c = roundTemporalInstant(e.Y, a, i, l), s = epochSeconds(c) === epochSeconds(e.Y) ? getOffsetNanosecondsForZonedDateTimeSlot(e) : getOffsetNanosecondsFor(e.N, c);
247
+ return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(c, s), "iso8601", t, $)}${r === A ? "" : formatDateTimeUtcOffsetRounded(s)}${n === z ? "" : `[${n === V ? "!" : ""}${e.N}]`}${formatCalendarAnnotation(e.U, o)}`;
248
+ }
249
+ function addZonedDateTime(e, t, o) {
250
+ if (0 === dateDurationSign(t.W)) return addInstant(e.Y, t.p);
251
+ const n = getIsoDateTimeForZonedDateTimeSlot(e);
252
+ return addInstant(getEpochNanosecondsFor(e.N, validateIsoDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(e.U, n.o, t.W, o), n.p)), g), t.p);
253
+ }
254
+ function differenceZonedDateTime(e, t, o) {
255
+ const n = compareEpochNanoseconds(e.Y, t.Y);
256
+ if (!n) return combineDateAndTimeDuration(zeroDateDuration(), createTimeDurationFromSeconds(0));
257
+ const r = getIsoDateTimeForZonedDateTimeSlot(e), a = getIsoDateTimeForZonedDateTimeSlot(t);
258
+ if (!compareIsoDate(r.o, a.o)) return combineDateAndTimeDuration(zeroDateDuration(), timeDurationFromEpochNanosecondsDifference(t.Y, e.Y));
259
+ let i, l = differenceTime(r.p, a.p);
260
+ for (let o = ft(l) === n ? 1 : 0; o <= (3 - n) / 2 && (i = combineIsoDateAndTimeRecord(addDaysToIsoDate(a.o, o * n), r.p), l = timeDurationFromEpochNanosecondsDifference(t.Y, getEpochNanosecondsFor(e.N, i, g)), ft(l) === n); o++);
261
+ return combineDateAndTimeDuration(calendarDateUntil(e.U, r.o, i.o, largerOfTwoTemporalUnits(o, L)), l);
262
+ }
263
+ function differenceZonedDateTimeWithRounding(e, t, o, n, r, a) {
264
+ if (!isDateUnit(o)) return differenceInstant(e.Y, t.Y, n, r, a);
265
+ const i = differenceZonedDateTime(e, t, o);
266
+ return r === G && 1 === n ? i : roundRelativeDuration(i, e.Y, t.Y, getIsoDateTimeForZonedDateTimeSlot(e), e.N, e.U, o, n, r, a);
267
+ }
268
+ function differenceTemporalZonedDateTime(e, t, o, n) {
269
+ const r = toTemporalZonedDateTime(o);
270
+ calendarEquals(t.U, r.U) || throwRangeError(De);
271
+ const a = getDifferenceSettings(e, getOptionsObject(n), d, [], G, B);
272
+ return isDateUnit(a.V) ? (timeZoneEquals(t.N, r.N) || throwRangeError("time zone mismatch"), compareEpochNanoseconds(t.Y, r.Y) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(t, r, a.V, a.H, a.L, a.B), B), e)) : createTemporalDuration(createTemporalDurationSlot([
273
+ 0,
274
+ 0,
275
+ 0,
276
+ 0,
277
+ 0,
278
+ 0,
279
+ 0,
280
+ 0,
281
+ 0,
282
+ 0
283
+ ]))) : createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceInstant(t.Y, r.Y, a.H, a.L, a.B), a.V), e));
284
+ }
285
+ function addDurationToZonedDateTime(e, t, o, n) {
286
+ return createTemporalZonedDateTime(addZonedDateTime(t, toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)), getTemporalOverflowOption(getOptionsObject(n))), t.N, t.U);
287
+ }
288
+ function getOffsetNanosecondsForZonedDateTimeSlot(e) {
289
+ return e.A ??= getOffsetNanosecondsFor(e.N, e.Y);
290
+ }
291
+ function getIsoDateTimeForZonedDateTimeSlot(e) {
292
+ return getIsoDateTimeFromOffsetNanoseconds(e.Y, getOffsetNanosecondsForZonedDateTimeSlot(e));
293
+ }
294
+ function createTemporalZonedDateTimeFromSlot(e, t = Object.create(Pe.prototype)) {
295
+ return Ee.set(t, e), t;
296
+ }
297
+ function calendarIsoToDateForZonedDateTimeSlot(e) {
298
+ return calendarIsoToDate(e.U, getIsoDateTimeForZonedDateTimeSlot(e).o);
299
+ }
300
+ function getInternalSlotForZonedDateTime(e) {
301
+ return Ee.get(e);
302
+ }
303
+ function getInternalSlotOrThrowForZonedDateTime(e) {
304
+ const t = getInternalSlotForZonedDateTime(e);
305
+ return t || throwTypeError(pe), t;
306
+ }
307
+ function isZonedDateTime(e) {
308
+ return !!getInternalSlotForZonedDateTime(e);
309
+ }
310
+ function utcEpochMilliseconds(e, t, o, n = 0, a = 0, i = 0, l = 0) {
311
+ return isoDateToEpochDays(e, t - 1, o) * r + Date.UTC(1970, 0, 1, n, a, i, l);
312
+ }
313
+ function clampEpochSecond(e) {
314
+ return clamp(e, -1e10, Infinity);
315
+ }
316
+ function getNamedTimeZoneOffsetNanosecondsForEpochSecond(t, o, n) {
317
+ if ("UTC" === t) return 0;
318
+ const r = clampEpochSecond(o), a = Re[t] ||= (() => {
319
+ const e = /* @__PURE__ */ new Map();
320
+ return {
321
+ C(t) {
322
+ if (e.has(t)) {
323
+ const o = e.get(t);
324
+ return e.delete(t), e.set(t, o), o;
325
+ }
326
+ },
327
+ q(t, o) {
328
+ e.size >= 5e3 && e.delete(e.keys().next().value), e.set(t, o);
329
+ }
330
+ };
331
+ })(), i = a.C(r);
332
+ if (void 0 !== i) return i;
333
+ const l = getFormatterForTimeZone(t).formatToParts(1e3 * r), c = (utcEpochMilliseconds(...[
334
+ "year",
335
+ "month",
336
+ "day",
337
+ "hour",
338
+ "minute",
339
+ "second"
340
+ ].map((e) => toIntegerIfIntegral(l.find((t) => t.type === e).value))) - 1e3 * r) * e;
341
+ return n || a.q(r, c), c;
342
+ }
343
+ function getFormatterForTimeZone(e) {
344
+ return be[e] ||= new Ft("en-u-hc-h23", {
345
+ timeZone: e,
346
+ year: "numeric",
347
+ month: "numeric",
348
+ day: "numeric",
349
+ hour: "numeric",
350
+ minute: "numeric",
351
+ second: "numeric"
352
+ });
353
+ }
354
+ function bisectOffsetTransition(e, t, o) {
355
+ const n = getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, t);
356
+ let r = t, a = o;
357
+ for (; a - r > 1;) {
358
+ const t = Math.floor((a + r) / 2);
359
+ getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, t, a - r > 3) === n ? r = t : a = t;
360
+ }
361
+ return a;
362
+ }
363
+ function adjustWindowForEpoch(e) {
364
+ return e < -85e7 ? 1814400 : e > -77e7 && e < 96e7 ? 1382400 : 561600;
365
+ }
366
+ function searchTimeZoneTransition(e, t, o, n) {
367
+ o = clamp(o, -864e10, 864e10);
368
+ for (let r = 172800 * n, a = t, i = t + r; (o - i) * n > 0; r = adjustWindowForEpoch(a) * n, a = i, i = clamp(i + r, -864e10, 864e10)) if (getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, a, !0) !== getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, i, !0)) return createEpochNanosecondsFromEpochSeconds(n > 0 ? bisectOffsetTransition(e, a, i) : bisectOffsetTransition(e, i, a));
369
+ return null;
370
+ }
371
+ function getAvailableNamedTimeZoneIdentifier(e) {
372
+ return ((e) => {
373
+ /^(?![cemw]et|[emh]st|prc|ro[ck]|uct|utc|gmt)[a-z]{3}$|systemv|^us.*w$/i.test(e) && throwRangeError(invalidTimeZone(e));
374
+ })(e = asciiLowerCase(e).replace(/[^/]+/g, (e) => /^(?!etc|yap).{1,3}$|\d/.test(e) ? asciiUpperCase(e) : e.replace(/baja|mc|comod|[a-z]+/g, (e) => {
375
+ return /^(su|gb|nz|in|chat)$/.test(e) ? asciiUpperCase(e) : /^(of|au|es)$/.test(e) ? e : (t = e, t.replace(/^[a-z]/, (e) => e.toUpperCase())).replace(/du(?=r)|n(?=or)|i(?=slan)/, asciiUpperCase);
376
+ var t;
377
+ }))), getFormatterForTimeZone(e), e;
378
+ }
379
+ function formatOffsetTimeZoneIdentifier(e) {
380
+ return formatUtcOffsetNanoseconds(e * t);
381
+ }
382
+ function formatUtcOffsetNanoseconds(e) {
383
+ const n = Math.abs(e);
384
+ return `${e < 0 ? "-" : "+"}${formatTimeString(divFloor(n, o), modFloor(divFloor(n, t), 60), modFloor(divFloor(n, 1e9), 60), 0, n % 6e10 ? void 0 : D)}`;
385
+ }
386
+ function formatDateTimeUtcOffsetRounded(e) {
387
+ return formatOffsetTimeZoneIdentifier(roundNumberToIncrement(e, t, Z) / t);
388
+ }
389
+ function toTemporalTimeZoneIdentifier(e) {
390
+ if (isZonedDateTime(e)) return getInternalSlotOrThrowForZonedDateTime(e).N;
391
+ validateString(e);
392
+ const t = ((e) => {
393
+ if (isTimeZoneIdentifier(e)) return parseTimeZoneIdentifier(e);
394
+ const t = parseIsoDateTime(e, [
395
+ Xe,
396
+ Qe,
397
+ et,
398
+ tt,
399
+ ot,
400
+ nt
401
+ ]).N, o = t.Z || t.M && "UTC" || t.$;
402
+ return o || throwRangeError(invalidTimeZone(e)), parseTimeZoneIdentifier(o);
403
+ })(e);
404
+ return t.J ? getAvailableNamedTimeZoneIdentifier(t.J) : formatOffsetTimeZoneIdentifier(t.G);
405
+ }
406
+ function getOffsetNanosecondsFor(e, t) {
407
+ return isOffsetTimeZoneIdentifier(e) ? parseDateTimeUtcOffset(e) : getNamedTimeZoneOffsetNanosecondsForEpochSecond(e, epochSeconds(t));
408
+ }
409
+ function getEpochNanosecondsFor(e, t, o) {
410
+ return disambiguatePossibleEpochNanoseconds(getPossibleEpochNanoseconds(e, t), e, t, o);
411
+ }
412
+ function disambiguatePossibleEpochNanoseconds(e, t, o, n) {
413
+ return 1 === e.length ? e[0] : ("reject" === n && throwRangeError("ambiguity / gaps in local time"), getNamedTimeZoneEpochCandidates(t, o).map(validateEpochNanoseconds)["compatible" === n ? +!e[0] : +(n === f)]);
414
+ }
415
+ function getPossibleEpochNanoseconds(e, t) {
416
+ return isOffsetTimeZoneIdentifier(e) ? [validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(t.o.t, t.o.u, t.o.T, t.p.D, t.p.I, t.p.O, t.p.S, t.p.F, t.p.v - parseDateTimeUtcOffset(e))))] : ((e, t) => getNamedTimeZoneEpochCandidates(e, t).filter((o) => !compareEpochNanoseconds(addNanosecondsToEpochSeconds(o, getOffsetNanosecondsFor(e, o)), getUtcEpochNanoseconds(t))))(e, t).map(validateEpochNanoseconds);
417
+ }
418
+ function getStartOfDay(e, t) {
419
+ const o = combineIsoDateAndTimeRecord(t, midnightTimeRecord());
420
+ return getPossibleEpochNanoseconds(e, o)[0] || createEpochNanosecondsFromEpochSeconds(bisectOffsetTransition(e, ...getNamedTimeZoneEpochCandidates(e, o).map(epochSeconds)));
421
+ }
422
+ function timeZoneEquals(e, t) {
423
+ return e === t || !isOffsetTimeZoneIdentifier(e) && !isOffsetTimeZoneIdentifier(t) && getFormatterForTimeZone(e).resolvedOptions().timeZone === getFormatterForTimeZone(t).resolvedOptions().timeZone;
424
+ }
425
+ function parseTimeZoneIdentifier(e) {
426
+ return isTimeZoneIdentifier(e) || throwRangeError(invalidTimeZone(e)), createNullPrototypeObject(isOffsetTimeZoneIdentifier(e) ? { G: parseDateTimeUtcOffset(e) / t } : { J: e });
427
+ }
428
+ function isOffsetTimeZoneIdentifier(e) {
429
+ return /^[+-]/.test(e);
430
+ }
431
+ function getNamedTimeZoneEpochCandidates(e, t) {
432
+ const o = getUtcEpochNanoseconds(t);
433
+ if ("UTC" === e) return [o];
434
+ const n = getOffsetNanosecondsFor(e, clampEpochNanoseconds(addNanosecondsToEpochSeconds(o, -864e11))), r = getOffsetNanosecondsFor(e, clampEpochNanoseconds(addNanosecondsToEpochSeconds(o, 864e11))), a = addNanosecondsToEpochSeconds(o, -n), i = addNanosecondsToEpochSeconds(o, -r);
435
+ return n === r ? [a] : [a, i].sort(compareEpochNanoseconds);
436
+ }
437
+ function getIsoDateTimeFromOffsetNanoseconds(e, t) {
438
+ return ((e) => {
439
+ const t = e;
440
+ return combineIsoDateAndTimeRecord(epochDaysToIsoDate(t[0]), balanceTime(0, 0, 0, 0, 0, t[1]));
441
+ })(addNanosecondsToEpochSeconds(e, t));
442
+ }
443
+ function combineIsoDateAndTimeRecord(e, t) {
444
+ return {
445
+ o: e,
446
+ p: t
447
+ };
448
+ }
449
+ function interpretTemporalDateTimeFields(e, t, o) {
450
+ return combineIsoDateAndTimeRecord(calendarDateFromFields(e, t, o), regulateTime(t[Dt.D], t[Dt.I], t[Dt.O], t[Dt.S], t[Dt.F], t[Dt.v], o));
451
+ }
452
+ function toTemporalDateTime(e, t) {
453
+ if (isObject(e)) {
454
+ if (isPlainDateTime(e)) {
455
+ getTemporalOverflowOption(getOptionsObject(t));
456
+ const o = getInternalSlotOrThrowForPlainDateTime(e);
457
+ return createTemporalDateTime(o._, o.U);
458
+ }
459
+ if (isZonedDateTime(e)) {
460
+ const o = getInternalSlotOrThrowForZonedDateTime(e);
461
+ return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDateTime(getIsoDateTimeForZonedDateTimeSlot(o), o.U);
462
+ }
463
+ if (isPlainDate(e)) {
464
+ getTemporalOverflowOption(getOptionsObject(t));
465
+ const o = getInternalSlotOrThrowForPlainDate(e);
466
+ return createTemporalDateTime(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord()), o.U);
467
+ }
468
+ const o = getTemporalCalendarIdentifierWithIsoDefault(e);
469
+ return createTemporalDateTime(interpretTemporalDateTimeFields(o, prepareCalendarFields(o, e, [
470
+ Dt.t,
471
+ Dt.u,
472
+ Dt.P,
473
+ Dt.T,
474
+ Dt.D,
475
+ Dt.I,
476
+ Dt.O,
477
+ Dt.S,
478
+ Dt.F,
479
+ Dt.v
480
+ ], []), getTemporalOverflowOption(getOptionsObject(t))), o);
481
+ }
482
+ validateString(e);
483
+ const o = parseIsoDateTime(e, [Qe]), n = canonicalizeCalendar(o.U || "iso8601");
484
+ return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(o.t, o.u, o.T), o.p || midnightTimeRecord()), n);
485
+ }
486
+ function balanceIsoDateTime(e, t, o, n, r, a, i, l, c) {
487
+ const s = balanceTime(n, r, a, i, l, c);
488
+ return combineIsoDateAndTimeRecord(addDaysToIsoDate(createIsoDateRecord(e, t, o), s.K), s);
489
+ }
490
+ function createTemporalDateTime(e, t, o = Object.create(Ne.prototype)) {
491
+ return Ze.set(o, {
492
+ _: validateIsoDateTime(e),
493
+ U: t
494
+ }), o;
495
+ }
496
+ function isoDateTimeToString(e, t, o, n) {
497
+ 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.S + 1e3 * e.p.F + e.p.v, o)}${formatCalendarAnnotation(t, n)}`;
498
+ }
499
+ function compareIsoDateTime(e, t) {
500
+ return compareIsoDate(e.o, t.o) || compareTimeRecord(e.p, t.p);
501
+ }
502
+ function roundIsoDateTime(e, t, o, n) {
503
+ const r = roundTime(e.p, t, o, n);
504
+ return combineIsoDateAndTimeRecord(addDaysToIsoDate(e.o, r.K), r);
505
+ }
506
+ function differenceISODateTime(e, t, o, n) {
507
+ let r = differenceTime(e.p, t.p);
508
+ const a = ft(r);
509
+ let i = t.o;
510
+ a === compareIsoDate(e.o, t.o) && (i = addDaysToIsoDate(i, a), r = add24HourDaysToTimeDuration(r, -a));
511
+ const l = largerOfTwoTemporalUnits(L, n), c = calendarDateUntil(o, e.o, i, l);
512
+ return n !== l && (r = add24HourDaysToTimeDuration(r, c.K), c.K = 0), combineDateAndTimeDuration(c, r);
513
+ }
514
+ function differencePlainDateTimeWithRounding(e, t, o, n, r, a, i) {
515
+ if (!compareIsoDateTime(e, t)) return combineDateAndTimeDuration(zeroDateDuration(), createTimeDurationFromSeconds(0));
516
+ validateIsoDateTime(e), validateIsoDateTime(t);
517
+ const l = differenceISODateTime(e, t, o, n);
518
+ return a === G && 1 === r ? l : roundRelativeDuration(l, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, o, n, r, a, i);
519
+ }
520
+ function differenceTemporalPlainDateTime(e, t, o, n) {
521
+ const r = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(o));
522
+ calendarEquals(t.U, r.U) || throwRangeError(De);
523
+ const a = getDifferenceSettings(e, getOptionsObject(n), d, [], G, L);
524
+ return compareIsoDateTime(t._, r._) ? createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differencePlainDateTimeWithRounding(t._, r._, t.U, a.V, a.H, a.L, a.B), a.V), e)) : createTemporalDuration(createTemporalDurationSlot([
525
+ 0,
526
+ 0,
527
+ 0,
528
+ 0,
529
+ 0,
530
+ 0,
531
+ 0,
532
+ 0,
533
+ 0,
534
+ 0
535
+ ]));
536
+ }
537
+ function addDurationToDateTime(e, t, o, n) {
538
+ const r = applySignToDurationSlot(toTemporalDuration(o), e), a = getTemporalOverflowOption(getOptionsObject(n)), i = toInternalDurationRecordWith24HourDays(r), l = addTime(t._.p, i.p);
539
+ return createTemporalDateTime(combineIsoDateAndTimeRecord(calendarDateAdd(t.U, t._.o, adjustDateDurationRecord(i.W, l.K), a), l), t.U);
540
+ }
541
+ function validateIsoDateTime(e) {
542
+ return ((e) => {
543
+ const t = isoDateRecordToEpochDays(e.o);
544
+ return Math.abs(t) <= 1e8 || -100000001 === t && !!compareTimeRecord(e.p, midnightTimeRecord());
545
+ })(e) || throwRangeError(me), e;
546
+ }
547
+ function getInternalSlotForPlainDateTime(e) {
548
+ return Ze.get(e);
549
+ }
550
+ function getInternalSlotOrThrowForPlainDateTime(e) {
551
+ const t = getInternalSlotForPlainDateTime(e);
552
+ return t || throwTypeError(pe), t;
553
+ }
554
+ function isPlainDateTime(e) {
555
+ return !!getInternalSlotForPlainDateTime(e);
556
+ }
557
+ function createTimeRecord(e, t, o, n, r, a, i = 0) {
558
+ return {
559
+ D: e,
560
+ I: t,
561
+ O: o,
562
+ S: n,
563
+ F: r,
564
+ v: a,
565
+ K: i
566
+ };
567
+ }
568
+ function midnightTimeRecord() {
569
+ return createTimeRecord(0, 0, 0, 0, 0, 0);
570
+ }
571
+ function differenceTime(e, t) {
572
+ return timeDurationFromComponents(t.D - e.D, t.I - e.I, t.O - e.O, t.S - e.S, t.F - e.F, t.v - e.v);
573
+ }
574
+ function toTemporalTime(e, t) {
575
+ if (isObject(e)) return isPlainTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getInternalSlotOrThrowForPlainTime(e)) : isPlainDateTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getInternalSlotOrThrowForPlainDateTime(e)._.p) : isZonedDateTime(e) ? (getTemporalOverflowOption(getOptionsObject(t)), getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(e)).p) : regulateTime(...toTemporalTimeRecord(e), getTemporalOverflowOption(getOptionsObject(t)));
576
+ validateString(e);
577
+ const o = parseIsoDateTime(e, [tt]);
578
+ return getTemporalOverflowOption(getOptionsObject(t)), o.p;
579
+ }
580
+ function toTimeRecordOrMidnight(e) {
581
+ return void 0 === e ? midnightTimeRecord() : toTemporalTime(e);
582
+ }
583
+ function regulateTime(e, t, o, n, r, a, i) {
584
+ return "constrain" === i ? createTimeRecord(clamp(e, 0, 23), clamp(t, 0, 59), clamp(o, 0, 59), clamp(n, 0, 999), clamp(r, 0, 999), clamp(a, 0, 999)) : (isValidTime(e, t, o, n, r, a) || throwRangeError(de), createTimeRecord(e, t, o, n, r, a));
585
+ }
586
+ function isValidTime(e, t, o, n, r, a) {
587
+ return isWithin(e, 0, 23) && isWithin(t, 0, 59) && isWithin(o, 0, 59) && isWithin(n, 0, 999) && isWithin(r, 0, 999) && isWithin(a, 0, 999);
588
+ }
589
+ function balanceTime(e, t, o, n, r, a) {
590
+ return r += divFloor(a, 1e3), n += divFloor(r, 1e3), o += divFloor(n, 1e3), t += divFloor(o, 60), {
591
+ D: modFloor(e += divFloor(t, 60), 24),
592
+ I: modFloor(t, 60),
593
+ O: modFloor(o, 60),
594
+ S: modFloor(n, 1e3),
595
+ F: modFloor(r, 1e3),
596
+ v: modFloor(a, 1e3),
597
+ K: divFloor(e, 24)
598
+ };
599
+ }
600
+ function createTemporalTime(e, t = Object.create(Ue.prototype)) {
601
+ return Me.set(t, e), t;
602
+ }
603
+ function toTemporalTimeRecord(e, t = !1) {
604
+ let o = !1;
605
+ const n = [
606
+ Dt.D,
607
+ Dt.F,
608
+ Dt.S,
609
+ Dt.I,
610
+ Dt.v,
611
+ Dt.O
612
+ ].map((n) => {
613
+ const r = e[n];
614
+ return void 0 !== r ? (o = !0, toIntegerWithTruncation(r)) : t ? void 0 : 0;
615
+ });
616
+ return o || throwTypeError(Ie), [
617
+ 0,
618
+ 3,
619
+ 5,
620
+ 2,
621
+ 1,
622
+ 4
623
+ ].map((e) => n[e]);
624
+ }
625
+ function timeRecordToString(e, t) {
626
+ return formatTimeString(e.D, e.I, e.O, 1e6 * e.S + 1e3 * e.F + e.v, t);
627
+ }
628
+ function compareTimeRecord(e, t) {
629
+ return compare(e.D, t.D) || compare(e.I, t.I) || compare(e.O, t.O) || compare(e.S, t.S) || compare(e.F, t.F) || compare(e.v, t.v);
630
+ }
631
+ function addTime(e, t) {
632
+ const o = t, n = balanceTime(e.D, e.I, e.O, e.S, e.F, e.v + o[1]);
633
+ return n.K += o[0], n;
634
+ }
635
+ function roundTime(e, n, r, a) {
636
+ const i = nanosecondsForTimeUnit(clamp(r - 1, 3, 8)), l = e.D * o + e.I * t + 1e9 * e.O + 1e6 * e.S + 1e3 * e.F + e.v;
637
+ return balanceTime(0, 0, 0, 0, 0, divFloor(l, i) * i + roundNumberToIncrement(modFloor(l, i), n * nanosecondsForTimeUnit(r), a));
638
+ }
639
+ function differenceTemporalPlainTime(e, t, o, n) {
640
+ const r = toTemporalTime(o), a = getDifferenceSettings(e, getOptionsObject(n), s, [], G, B);
641
+ return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(differenceTime(t, r), a.H, a.L, a.B)), a.V), e));
642
+ }
643
+ function addDurationToTime(e, t, o) {
644
+ return createTemporalTime(addTime(t, toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)).p));
645
+ }
646
+ function getInternalSlotOrThrowForPlainTime(e) {
647
+ const t = Me.get(e);
648
+ return t || throwTypeError(pe), t;
649
+ }
650
+ function isPlainTime(e) {
651
+ return Me.has(e);
652
+ }
653
+ function optionalChain(e) {
654
+ return e.reduceRight((e, t) => `${t}(?:${e})?`);
655
+ }
656
+ function join(e, t) {
657
+ return `${e}(?:${t}${e})*`;
658
+ }
659
+ function createRegExp(e) {
660
+ return RegExp(`^(?:${e})$`);
661
+ }
662
+ function isAmbiguousTemporalTimeString(e) {
663
+ return rt.some((t) => {
664
+ const o = e.match(t);
665
+ return o && isSemanticallyValid(o.groups);
666
+ });
667
+ }
668
+ function isTimeZoneIdentifier(e) {
669
+ return at.test(e);
670
+ }
671
+ function parseAnnotationsAndGetCalendar(e) {
672
+ let t, o = !1;
673
+ for (const n of e.matchAll(Ke)) {
674
+ const e = !!n[1];
675
+ "u-ca" === n[2] ? t ? (e || o) && throwRangeError(se) : (t = n[3], e && (o = !0)) : e && throwRangeError(se);
676
+ }
677
+ return t;
678
+ }
679
+ function getTimeRecordFromMatchedGroups(e) {
680
+ const t = (e.g || "").padEnd(9, "0");
681
+ return createTimeRecord(Fe(e.d || 0), Fe(e.e || 0), clamp(Fe(e.f || 0), 0, 59), Fe(t.slice(0, 3)), Fe(t.slice(3, 6)), Fe(t.slice(6)));
682
+ }
683
+ function isSemanticallyValid(e) {
684
+ return "-000000" !== (e.a || e.l) && (!e.a || isValidIsoDate(Fe(e.a), Fe(e.b), Fe(e.c))) && (!e.n || isValidIsoDate(1972, Fe(e.m), Fe(e.n)));
685
+ }
686
+ function parseIsoDateTime(e, t) {
687
+ for (const o of t) {
688
+ const t = e.match(o);
689
+ if (!t || !isSemanticallyValid(t.groups) || o === tt && isAmbiguousTemporalTimeString(e)) continue;
690
+ const n = t.groups, r = parseAnnotationsAndGetCalendar(n.k || "");
691
+ return n.m && r && "iso8601" !== asciiLowerCase(r) && throwRangeError(se), {
692
+ t: mapUnlessUndefined(n.a || n.l, Fe),
693
+ u: Fe(n.b || n.m || 1),
694
+ T: Fe(n.c || n.n || 1),
695
+ p: n.d ? getTimeRecordFromMatchedGroups(n) : void 0,
696
+ N: {
697
+ M: !!n.i,
698
+ $: n.h,
699
+ Z: n.j
700
+ },
701
+ U: r
702
+ };
703
+ }
704
+ throwRangeError(se);
705
+ }
706
+ function parseDateTimeUtcOffset(e) {
707
+ const o = e.match(lt);
708
+ return o || throwRangeError(se), Fe(`${o[1]}1`) * (36e11 * Fe(o[2]) + Fe(o[4] || "") * t + 1e9 * Fe(o[5] || "") + Fe((o[6] || "").padEnd(9, "0")) + 0);
709
+ }
710
+ function hasUtcOffsetSubMinuteParts(e) {
711
+ return !!e.match(lt)[5];
712
+ }
713
+ function toTemporalMonthDay(e, t) {
714
+ if (isObject(e)) {
715
+ const o = getInternalSlotForPlainMonthDay(e);
716
+ if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay(o.o, o.U);
717
+ const n = getTemporalCalendarIdentifierWithIsoDefault(e);
718
+ return createTemporalMonthDay(calendarMonthDayFromFields(n, prepareCalendarFields(n, e, [
719
+ Dt.t,
720
+ Dt.u,
721
+ Dt.P,
722
+ Dt.T
723
+ ], []), getTemporalOverflowOption(getOptionsObject(t))), n);
724
+ }
725
+ validateString(e);
726
+ const o = parseIsoDateTime(e, [ot]), n = canonicalizeCalendar(o.U || "iso8601");
727
+ return getTemporalOverflowOption(getOptionsObject(t)), createTemporalMonthDay("iso8601" === n ? createIsoDateRecord(1972, o.u, o.T) : calendarMonthDayFromFields(n, isoDateToFields(n, validateIsoDate(createIsoDateRecord(o.t, o.u, o.T)), T), p), n);
728
+ }
729
+ function createTemporalMonthDay(e, t, o = Object.create(st.prototype)) {
730
+ return ct.set(o, {
731
+ o: validateIsoDate(e),
732
+ U: t
733
+ }), o;
734
+ }
735
+ function temporalMonthDayToString(e, t) {
736
+ return `${t === j || t === C || "iso8601" !== e.U ? `${padIsoYear(e.o.t)}-` : ""}${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.U, t)}`;
737
+ }
738
+ function getInternalSlotForPlainMonthDay(e) {
739
+ return ct.get(e);
740
+ }
741
+ function getInternalSlotOrThrowForPlainMonthDay(e) {
742
+ const t = getInternalSlotForPlainMonthDay(e);
743
+ return t || throwTypeError(pe), t;
744
+ }
745
+ function isPlainMonthDay(e) {
746
+ return !!getInternalSlotForPlainMonthDay(e);
747
+ }
748
+ function toTemporalYearMonth(e, t) {
749
+ if (isObject(e)) {
750
+ const o = getInternalSlotForPlainYearMonth(e);
751
+ if (o) return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(o.o, o.U);
752
+ const n = getTemporalCalendarIdentifierWithIsoDefault(e);
753
+ return createTemporalYearMonth(calendarYearMonthFromFields(n, prepareCalendarFields(n, e, [
754
+ Dt.t,
755
+ Dt.u,
756
+ Dt.P
757
+ ], []), getTemporalOverflowOption(getOptionsObject(t))), n);
758
+ }
759
+ validateString(e);
760
+ const o = parseIsoDateTime(e, [nt]), n = canonicalizeCalendar(o.U || "iso8601");
761
+ return getTemporalOverflowOption(getOptionsObject(t)), createTemporalYearMonth(calendarYearMonthFromFields(n, isoDateToFields(n, validateIsoYearMonth(createIsoDateRecord(o.t, o.u, o.T)), m), p), n);
762
+ }
763
+ function balanceIsoYearMonth(e, t) {
764
+ return {
765
+ t: e + divFloor(t - 1, 12),
766
+ u: modFloor(t - 1, 12) + 1
767
+ };
768
+ }
769
+ function createTemporalYearMonth(e, t, o = Object.create(mt.prototype)) {
770
+ return dt.set(o, {
771
+ o: validateIsoYearMonth(e),
772
+ U: t
773
+ }), o;
774
+ }
775
+ function temporalYearMonthToString(e, t) {
776
+ return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}${t === j || t === C || "iso8601" !== e.U ? `-${toZeroPaddedDecimalString(e.o.T, 2)}` : ""}${formatCalendarAnnotation(e.U, t)}`;
777
+ }
778
+ function differenceTemporalPlainYearMonth(e, t, o, n) {
779
+ const r = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(o));
780
+ calendarEquals(t.U, r.U) || throwRangeError(De);
781
+ const a = getDifferenceSettings(e, getOptionsObject(n), c, [x, L], H, k);
782
+ if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
783
+ 0,
784
+ 0,
785
+ 0,
786
+ 0,
787
+ 0,
788
+ 0,
789
+ 0,
790
+ 0,
791
+ 0,
792
+ 0
793
+ ]));
794
+ const i = calendarDateFromFields(t.U, createNullPrototypeObject({
795
+ ...isoDateToFields(t.U, t.o, m),
796
+ [Dt.T]: 1
797
+ }), p), l = calendarDateFromFields(t.U, createNullPrototypeObject({
798
+ ...isoDateToFields(t.U, r.o, m),
799
+ [Dt.T]: 1
800
+ }), p);
801
+ let s = combineDateAndTimeDuration(adjustDateDurationRecord(calendarDateUntil(t.U, i, l, a.V), 0, 0), createTimeDurationFromSeconds(0));
802
+ if (a.L !== H || 1 !== a.H) {
803
+ const e = combineIsoDateAndTimeRecord(i, midnightTimeRecord());
804
+ s = roundRelativeDuration(s, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(l, midnightTimeRecord())), e, void 0, t.U, a.V, a.H, a.L, a.B);
805
+ }
806
+ return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(s, L), e));
807
+ }
808
+ function addDurationToYearMonth(e, t, o, n) {
809
+ const r = toInternalDurationRecord(applySignToDurationSlot(toTemporalDuration(o), e)), a = getTemporalOverflowOption(getOptionsObject(n));
810
+ return (r.W.X || r.W.K || signTimeDuration(r.p)) && throwRangeError("duration can contain only years and months"), createTemporalYearMonth(calendarYearMonthFromFields(t.U, isoDateToFields(t.U, calendarDateAdd(t.U, calendarDateFromFields(t.U, createNullPrototypeObject({
811
+ ...isoDateToFields(t.U, t.o, m),
812
+ [Dt.T]: 1
813
+ }), p), r.W, a), m), a), t.U);
814
+ }
815
+ function validateIsoYearMonth(e) {
816
+ return ((e) => isWithin(12 * e.t + e.u, -3261848, 3309129))(e) || throwRangeError(me), e;
817
+ }
818
+ function getInternalSlotForPlainYearMonth(e) {
819
+ return dt.get(e);
820
+ }
821
+ function getInternalSlotOrThrowForPlainYearMonth(e) {
822
+ const t = getInternalSlotForPlainYearMonth(e);
823
+ return t || throwTypeError(pe), t;
824
+ }
825
+ function isPlainYearMonth(e) {
826
+ return !!getInternalSlotForPlainYearMonth(e);
827
+ }
828
+ function createIsoDateRecord(e, t, o) {
829
+ return {
830
+ t: e,
831
+ u: t,
832
+ T: o
833
+ };
834
+ }
835
+ function createTemporalDate(e, t, o = Object.create(ut.prototype)) {
836
+ return Tt.set(o, {
837
+ o: validateIsoDate(e),
838
+ U: t
839
+ }), o;
840
+ }
841
+ function toTemporalDate(e, t) {
842
+ if (isObject(e)) {
843
+ if (isPlainDate(e)) {
844
+ getTemporalOverflowOption(getOptionsObject(t));
845
+ const o = getInternalSlotOrThrowForPlainDate(e);
846
+ return createTemporalDate(o.o, o.U);
847
+ }
848
+ if (isZonedDateTime(e)) {
849
+ getTemporalOverflowOption(getOptionsObject(t));
850
+ const o = getInternalSlotOrThrowForZonedDateTime(e);
851
+ return createTemporalDate(getIsoDateTimeForZonedDateTimeSlot(o).o, o.U);
852
+ }
853
+ if (isPlainDateTime(e)) {
854
+ getTemporalOverflowOption(getOptionsObject(t));
855
+ const o = getInternalSlotOrThrowForPlainDateTime(e);
856
+ return createTemporalDate(o._.o, o.U);
857
+ }
858
+ const o = getTemporalCalendarIdentifierWithIsoDefault(e);
859
+ return createTemporalDate(calendarDateFromFields(o, prepareCalendarFields(o, e, [
860
+ Dt.t,
861
+ Dt.u,
862
+ Dt.P,
863
+ Dt.T
864
+ ], []), getTemporalOverflowOption(getOptionsObject(t))), o);
865
+ }
866
+ validateString(e);
867
+ const o = parseIsoDateTime(e, [Qe]), n = canonicalizeCalendar(o.U || "iso8601");
868
+ return getTemporalOverflowOption(getOptionsObject(t)), createTemporalDate(createIsoDateRecord(o.t, o.u, o.T), n);
869
+ }
870
+ function regulateIsoDate(e, t, o, n) {
871
+ return "constrain" === n ? createIsoDateRecord(e, t = clamp(t, 1, 12), clamp(o, 1, isoDaysInMonth(e, t))) : (isValidIsoDate(e, t, o) || throwRangeError(me), createIsoDateRecord(e, t, o));
872
+ }
873
+ function isValidIsoDate(e, t, o) {
874
+ return isWithin(t, 1, 12) && isWithin(o, 1, isoDaysInMonth(e, t));
875
+ }
876
+ function addDaysToIsoDate(e, t) {
877
+ return epochDaysToIsoDate(isoDateToEpochDays(e.t, e.u - 1, e.T + t));
878
+ }
879
+ function padIsoYear(e) {
880
+ return isWithin(e, 0, 9999) ? toZeroPaddedDecimalString(e, 4) : `${e < 0 ? "-" : "+"}${toZeroPaddedDecimalString(Math.abs(e), 6)}`;
881
+ }
882
+ function temporalDateToString(e, t) {
883
+ return `${padIsoYear(e.o.t)}-${toZeroPaddedDecimalString(e.o.u, 2)}-${toZeroPaddedDecimalString(e.o.T, 2)}${formatCalendarAnnotation(e.U, t)}`;
884
+ }
885
+ function compareIsoDate(e, t) {
886
+ return compare(isoDateRecordToEpochDays(e), isoDateRecordToEpochDays(t));
887
+ }
888
+ function differenceTemporalPlainDate(e, t, o, n) {
889
+ const r = getInternalSlotOrThrowForPlainDate(toTemporalDate(o));
890
+ calendarEquals(t.U, r.U) || throwRangeError(De);
891
+ const a = getDifferenceSettings(e, getOptionsObject(n), c, [], L, L);
892
+ if (!compareIsoDate(t.o, r.o)) return createTemporalDuration(createTemporalDurationSlot([
893
+ 0,
894
+ 0,
895
+ 0,
896
+ 0,
897
+ 0,
898
+ 0,
899
+ 0,
900
+ 0,
901
+ 0,
902
+ 0
903
+ ]));
904
+ let i = combineDateAndTimeDuration(calendarDateUntil(t.U, t.o, r.o, a.V), createTimeDurationFromSeconds(0));
905
+ if (a.L !== L || 1 !== a.H) {
906
+ const e = combineIsoDateAndTimeRecord(t.o, midnightTimeRecord());
907
+ i = roundRelativeDuration(i, getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())), e, void 0, t.U, a.V, a.H, a.L, a.B);
908
+ }
909
+ return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(i, L), e));
910
+ }
911
+ function addDurationToDate(e, t, o, n) {
912
+ return createTemporalDate(calendarDateAdd(t.U, t.o, ((e) => {
913
+ const t = toInternalDurationRecordWith24HourDays(e);
914
+ return createDateDurationRecord(t.W.ee, t.W.te, t.W.X, t.p[0]);
915
+ })(applySignToDurationSlot(toTemporalDuration(o), e)), getTemporalOverflowOption(getOptionsObject(n))), t.U);
916
+ }
917
+ function getInternalSlotForPlainDate(e) {
918
+ return Tt.get(e);
919
+ }
920
+ function getInternalSlotOrThrowForPlainDate(e) {
921
+ const t = getInternalSlotForPlainDate(e);
922
+ return t || throwTypeError(pe), t;
923
+ }
924
+ function isPlainDate(e) {
925
+ return !!getInternalSlotForPlainDate(e);
926
+ }
927
+ function validateIsoDate(e) {
928
+ return validateIsoDateTime(combineIsoDateAndTimeRecord(e, createTimeRecord(12, 0, 0, 0, 0, 0))), e;
929
+ }
930
+ function canonicalizeCalendar(e) {
931
+ return "iso8601" !== (e = asciiLowerCase(e)) && "gregory" !== e && throwRangeError(((e) => `calendar not supported in this polyfill: ${e}`)(e)), e;
932
+ }
933
+ function calendarDateAdd(e, t, o, n) {
934
+ return ((e, t, o) => {
935
+ const n = balanceIsoYearMonth(e.t + t.ee, e.u + t.te);
936
+ return validateIsoDate(addDaysToIsoDate(regulateIsoDate(n.t, n.u, e.T, o), 7 * t.X + t.K));
937
+ })(t, o, n);
938
+ }
939
+ function calendarDateUntil(e, t, o, n) {
940
+ return ((e, t, o) => {
941
+ const n = compareIsoDate(t, e);
942
+ if (!n) return zeroDateDuration();
943
+ if (o === x || o === L) {
944
+ const n = isoDateToEpochDays(t.t, t.u - 1, t.T) - isoDateToEpochDays(e.t, e.u - 1, e.T);
945
+ return o === x ? createDateDurationRecord(0, 0, divTrunc(n, 7) + 0, n % 7 + 0) : createDateDurationRecord(0, 0, 0, n);
946
+ }
947
+ const r = 12 * t.t + t.u - 12 * e.t - e.u - (n * (e.T - t.T) > 0 ? n : 0), a = balanceIsoYearMonth(e.t, e.u + r), i = isoDateRecordToEpochDays(t) - isoDateRecordToEpochDays(regulateIsoDate(a.t, a.u, e.T, p));
948
+ return o === k ? createDateDurationRecord(divTrunc(r, 12), r % 12 + 0, 0, i) : createDateDurationRecord(0, r, 0, i);
949
+ })(t, o, n);
950
+ }
951
+ function calendarDateToIso(e, t, o) {
952
+ return ((e, t) => regulateIsoDate(e[Dt.t], e[Dt.u], e[Dt.T], t))(t, o);
953
+ }
954
+ function calendarSupportsEra(e) {
955
+ return "gregory" === e;
956
+ }
957
+ function canonicalizeEraInCalendar(e, t) {
958
+ return "ad" === t || "ce" === t ? "ce" : "bc" === t || "bce" === t ? "bce" : throwRangeError(((e) => `invalid era: ${e}`)(t));
959
+ }
960
+ function parseMonthCode(e) {
961
+ const t = toPrimitive(e);
962
+ validateString(t);
963
+ const o = t.match(/M(\d\d)(L?)/);
964
+ return o && "M00" !== t || throwRangeError(invalidMonthCode(t)), [Fe(o[1]), !!o[2]];
965
+ }
966
+ function createMonthCode(e, t = !1) {
967
+ return `M${toZeroPaddedDecimalString(e, 2)}${t ? "L" : ""}`;
968
+ }
969
+ function prepareCalendarFields(e, t, o, n) {
970
+ o = [...o, ...calendarExtraFields(e, o)].sort();
971
+ const r = createEmptyCalendarFieldsRecord();
972
+ let a = !1;
973
+ for (const e of o) {
974
+ const o = t[e];
975
+ void 0 !== o ? (a = !0, r[e] = ht[e][0](o)) : n && (n.includes(e) && throwTypeError(missingField(e)), r[e] = ht[e][1]);
976
+ }
977
+ return n || a || throwTypeError(Ie), r;
978
+ }
979
+ function calendarMergeFields(e, t, o) {
980
+ const n = ((e, t) => {
981
+ const o = [];
982
+ return void 0 !== t[Dt.u] && o.push(Dt.P), void 0 !== t[Dt.P] && o.push(Dt.u), !calendarSupportsEra(e) || void 0 === t[Dt.oe] && void 0 === t[Dt.ne] && void 0 === t[Dt.t] || o.push(Dt.oe, Dt.ne, Dt.t), o;
983
+ })(e, o), r = createEmptyCalendarFieldsRecord();
984
+ for (const e of pt) void 0 === t[e] || n.includes(e) || (r[e] = t[e]), void 0 !== o[e] && (r[e] = o[e]);
985
+ return r;
986
+ }
987
+ function toTemporalCalendarIdentifier(e) {
988
+ const t = getInternalSlotForPlainDate(e) || getInternalSlotForPlainDateTime(e) || getInternalSlotForPlainMonthDay(e) || getInternalSlotForPlainYearMonth(e) || getInternalSlotForZonedDateTime(e);
989
+ return t ? t.U : (validateString(e), canonicalizeCalendar(((e) => {
990
+ try {
991
+ return parseIsoDateTime(e, [
992
+ Xe,
993
+ Qe,
994
+ et,
995
+ tt,
996
+ ot,
997
+ nt
998
+ ]).U || "iso8601";
999
+ } catch {
1000
+ return it.test(e) || throwRangeError(se), e;
1001
+ }
1002
+ })(e)));
1003
+ }
1004
+ function getTemporalCalendarIdentifierWithIsoDefault(e) {
1005
+ const t = getInternalSlotForPlainDate(e) || getInternalSlotForPlainDateTime(e) || getInternalSlotForPlainMonthDay(e) || getInternalSlotForPlainYearMonth(e) || getInternalSlotForZonedDateTime(e);
1006
+ return t ? t.U : mapUnlessUndefined(e.calendar, toTemporalCalendarIdentifier) || "iso8601";
1007
+ }
1008
+ function calendarDateFromFields(e, t, o) {
1009
+ return calendarResolveFields(e, t), validateIsoDate(calendarDateToIso(0, t, o));
1010
+ }
1011
+ function calendarYearMonthFromFields(e, t, o) {
1012
+ return t.day = 1, calendarResolveFields(e, t, m), validateIsoYearMonth(calendarDateToIso(0, t, o));
1013
+ }
1014
+ function calendarMonthDayFromFields(e, t, o) {
1015
+ return calendarResolveFields(e, t, T), (function(e, t, o) {
1016
+ return ((e, t, o) => {
1017
+ const n = regulateIsoDate(e[Dt.t] ?? 1972, e[Dt.u], e[Dt.T], t);
1018
+ return o || validateIsoDate(n), createIsoDateRecord(1972, n.u, n.T);
1019
+ })(t, o, "iso8601" === e);
1020
+ })(e, t, o);
1021
+ }
1022
+ function formatCalendarAnnotation(e, t) {
1023
+ return t === $ || t === U && "iso8601" === e ? "" : `[${t === C ? "!" : ""}u-ca=${e}]`;
1024
+ }
1025
+ function calendarEquals(e, t) {
1026
+ return e === t;
1027
+ }
1028
+ function isoDaysInMonth(e, t) {
1029
+ return isoDateToEpochDays(e % 400, t, 1) - isoDateToEpochDays(e % 400, t - 1, 1);
1030
+ }
1031
+ function isoWeeksInYear(e) {
1032
+ return 4 === isoDayOfWeek(createIsoDateRecord(e, 1, 1)) || 4 === isoDayOfWeek(createIsoDateRecord(e, 12, 31)) ? 53 : 52;
1033
+ }
1034
+ function isoWeekOfYear(e) {
1035
+ const t = e.t, o = divFloor(isoDayOfYear(e) + 10 - isoDayOfWeek(e), 7);
1036
+ return o < 1 ? {
1037
+ t: t - 1,
1038
+ re: isoWeeksInYear(t - 1)
1039
+ } : o > isoWeeksInYear(t) ? {
1040
+ t: t + 1,
1041
+ re: 1
1042
+ } : {
1043
+ t,
1044
+ re: o
1045
+ };
1046
+ }
1047
+ function isoDayOfYear(e) {
1048
+ return isoDateRecordToEpochDays(e) - isoDateToEpochDays(e.t, 0, 0);
1049
+ }
1050
+ function isoDayOfWeek(e) {
1051
+ return modFloor(isoDateRecordToEpochDays(e) + 3, 7) + 1;
1052
+ }
1053
+ function isoCalendarIsoToDate(e) {
1054
+ return {
1055
+ t: e.t,
1056
+ u: e.u,
1057
+ P: createMonthCode(e.u),
1058
+ T: e.T,
1059
+ ae: isoDayOfWeek(e),
1060
+ ie: isoDayOfYear(e),
1061
+ le: isoWeekOfYear(e),
1062
+ ce: 7,
1063
+ se: isoDaysInMonth(e.t, e.u),
1064
+ de: (t = e.t, 365 + mathematicalInLeapYear(t)),
1065
+ me: 12,
1066
+ ue: !!mathematicalInLeapYear(e.t)
1067
+ };
1068
+ var t;
1069
+ }
1070
+ function calendarIsoToDate(e, t) {
1071
+ return "iso8601" === e ? isoCalendarIsoToDate(t) : ((e, t) => ({
1072
+ oe: t.t > 0 ? "ce" : "bce",
1073
+ ne: t.t > 0 ? t.t : 1 - t.t,
1074
+ ...isoCalendarIsoToDate(t),
1075
+ le: {
1076
+ t: void 0,
1077
+ re: void 0
1078
+ }
1079
+ }))(0, t);
1080
+ }
1081
+ function calendarExtraFields(e, t) {
1082
+ return calendarSupportsEra(e) && t.includes("year") ? ["era", "eraYear"] : [];
1083
+ }
1084
+ function isoResolveFields(e, t) {
1085
+ t !== T && void 0 === e[Dt.t] && throwTypeError(missingField(Dt.t)), t !== m && void 0 === e[Dt.T] && throwTypeError(missingField(Dt.T)), void 0 === e[Dt.P] && void 0 === e[Dt.u] && throwTypeError(missingField("month, monthCode"));
1086
+ const o = mapUnlessUndefined(e[Dt.P], parseMonthCode);
1087
+ o && ((o[0] > 12 || o[1] || void 0 !== e[Dt.u] && o[0] !== e[Dt.u]) && throwRangeError(ge), e[Dt.u] = o[0]);
1088
+ }
1089
+ function calendarResolveFields(e, t, o = c) {
1090
+ "iso8601" === e ? isoResolveFields(t, o) : (function(e, t, o = c) {
1091
+ const n = t[Dt.oe], r = t[Dt.ne];
1092
+ let a = t[Dt.t];
1093
+ const i = t[Dt.P], l = t[Dt.u], s = t[Dt.T];
1094
+ if (o === T && void 0 !== i && void 0 === l || void 0 !== a || void 0 !== n && void 0 !== r || throwTypeError(missingField("year, era, eraYear")), void 0 === n != (void 0 === r) && throwTypeError(), o !== m && void 0 === s && throwTypeError(missingField("day")), l === i && throwTypeError(missingField("month, monthCode")), void 0 !== r) {
1095
+ const e = ((e, t, o) => "ce" === canonicalizeEraInCalendar(0, t) ? o : 1 - o)(0, canonicalizeEraInCalendar(0, n), r);
1096
+ void 0 !== a && a !== e && throwRangeError("mismatch of `year`, `era` and `eraYear`"), t[Dt.t] = e;
1097
+ }
1098
+ t[Dt.oe] = t[Dt.ne] = void 0, isoResolveFields(t, o);
1099
+ })(0, t, o);
1100
+ }
1101
+ function createEmptyCalendarFieldsRecord() {
1102
+ return createNullPrototypeObject({});
1103
+ }
1104
+ function zeroDateDuration() {
1105
+ return createDateDurationRecord(0, 0, 0, 0);
1106
+ }
1107
+ function toInternalDurationRecord(e) {
1108
+ return combineDateAndTimeDuration(createDateDurationRecord(e[_], e[K], e[X], e[Q]), timeDurationFromComponents(e[ee], e[te], e[oe], e[ne], e[re], e[ae]));
1109
+ }
1110
+ function toInternalDurationRecordWith24HourDays([e, t, o, n, ...r]) {
1111
+ return combineDateAndTimeDuration(createDateDurationRecord(e, t, o, 0), add24HourDaysToTimeDuration(timeDurationFromComponents(...r), n));
1112
+ }
1113
+ function temporalDurationFromInternal(e, t) {
1114
+ const [o, ...n] = balanceTimeDuration(e.p, t);
1115
+ return createTemporalDurationSlot([
1116
+ e.W.ee,
1117
+ e.W.te,
1118
+ e.W.X,
1119
+ e.W.K + o,
1120
+ ...n
1121
+ ]);
1122
+ }
1123
+ function createDateDurationRecord(e, t, o, n) {
1124
+ return validateDuration(e, t, o, n, 0, 0, 0, 0, 0, 0), {
1125
+ ee: e,
1126
+ te: t,
1127
+ X: o,
1128
+ K: n
1129
+ };
1130
+ }
1131
+ function adjustDateDurationRecord(e, t, o = e.X, n = e.te) {
1132
+ return createDateDurationRecord(e.ee, n, o, t);
1133
+ }
1134
+ function combineDateAndTimeDuration(e, t) {
1135
+ return {
1136
+ W: e,
1137
+ p: t
1138
+ };
1139
+ }
1140
+ function toTemporalDuration(e) {
1141
+ return t = e, gt.has(t) ? getInternalSlotOrThrowForDuration(e) : isObject(e) ? createTemporalDurationSlot(toTemporalPartialDurationRecord(e).map((e) => e || 0)) : (validateString(e), ((e) => {
1142
+ const t = (e = asciiLowerCase(e)).match(/^([+-]?)p(?:(\d+)y)?(?:(\d+)m)?(?:(\d+)w)?(?:(\d+)d)?(?:t(?:(\d+)(?:[.,](\d{1,9}))?h)?(?:(\d+)(?:[.,](\d{1,9}))?m)?(?:(\d+)(?:[.,](\d{1,9}))?s)?)?$/);
1143
+ t && !/[pt]$|[.,](\d{1,9})[hms]./.test(e) || throwRangeError(se);
1144
+ const o = balanceTime(0, 0, 0, 0, 0, 3600 * toIntegerWithTruncation((t[7] || "").padEnd(9, "0")) + 60 * toIntegerWithTruncation((t[9] || "").padEnd(9, "0")) + toIntegerWithTruncation((t[11] || "").padEnd(9, "0")));
1145
+ return applySignToDurationSlot(createTemporalDurationSlot([
1146
+ toIntegerWithTruncation(t[2] || ""),
1147
+ toIntegerWithTruncation(t[3] || ""),
1148
+ toIntegerWithTruncation(t[4] || ""),
1149
+ toIntegerWithTruncation(t[5] || ""),
1150
+ toIntegerWithTruncation(t[6] || ""),
1151
+ toIntegerWithTruncation(t[8] || "") + o.I,
1152
+ toIntegerWithTruncation(t[10] || "") + o.O,
1153
+ o.S,
1154
+ o.F,
1155
+ o.v
1156
+ ]), toIntegerWithTruncation(`${t[1]}1`));
1157
+ })(e));
1158
+ var t;
1159
+ }
1160
+ function durationSign(e) {
1161
+ return sign(e.find((e) => 0 !== e) || 0);
1162
+ }
1163
+ function dateDurationSign(e) {
1164
+ return sign(e.ee || e.te || e.X || e.K);
1165
+ }
1166
+ function internalDurationSign(e) {
1167
+ return dateDurationSign(e.W) || ft(e.p);
1168
+ }
1169
+ function validateDuration(...e) {
1170
+ e.some((e) => e < 0) && e.some((e) => e > 0) && throwRangeError("invalid duration"), e.every((e) => Math.abs(e) < 1e25) && Math.abs(e[_]) < 2 ** 32 && Math.abs(e[K]) < 2 ** 32 && Math.abs(e[X]) < 2 ** 32 || throwRangeError(Te), validateTimeDurationRange(timeDurationFromComponents(24 * e[Q] + e[ee], e[te], e[oe], e[ne], e[re], e[ae]));
1171
+ }
1172
+ function defaultTemporalLargestUnit(e) {
1173
+ return (e.findIndex((e) => 0 !== e) + 10) % 10;
1174
+ }
1175
+ function toTemporalPartialDurationRecord(e) {
1176
+ isObject(e) || throwTypeError(notObject(e));
1177
+ const t = [
1178
+ 3,
1179
+ 4,
1180
+ 8,
1181
+ 7,
1182
+ 5,
1183
+ 1,
1184
+ 9,
1185
+ 6,
1186
+ 2,
1187
+ 0
1188
+ ].map((t) => mapUnlessUndefined(e[le[t]], toIntegerIfIntegral));
1189
+ return t.every((e) => void 0 === e) && throwTypeError(Ie), [
1190
+ 9,
1191
+ 5,
1192
+ 8,
1193
+ 0,
1194
+ 1,
1195
+ 4,
1196
+ 7,
1197
+ 3,
1198
+ 2,
1199
+ 6
1200
+ ].map((e) => t[e]);
1201
+ }
1202
+ function createTemporalDurationSlot(e) {
1203
+ return validateDuration(...e), e;
1204
+ }
1205
+ function createTemporalDuration(e, t = Object.create(It.prototype)) {
1206
+ return gt.set(t, e), t;
1207
+ }
1208
+ function timeDurationFromComponents(e, t, o, n, l, c) {
1209
+ return addTimeDuration(addTimeDuration(addTimeDuration(createTimeDurationFromSeconds(3600 * e + 60 * t + o), normalize(divTrunc(m = n, r), m % r * 1e6)), (d = l, normalize(Math.round((d - d % a) / a), d % a * 1e3))), (s = c, normalize(Math.round((s - s % i) / i), s % i)));
1210
+ var s, d, m;
1211
+ }
1212
+ function add24HourDaysToTimeDuration(e, t) {
1213
+ return validateTimeDurationRange(((e, t) => normalize(e[0] + t, e[1]))(e, t));
1214
+ }
1215
+ function timeDurationFromEpochNanosecondsDifference(e, t) {
1216
+ return differenceEpochNanoseconds(t, e);
1217
+ }
1218
+ function roundTimeDurationToIncrement(e, t, o) {
1219
+ return validateTimeDurationRange(((e, t, o) => normalize(2 * divTrunc(e[0], 2), roundNumberToIncrement(e[1] + e[0] % 2 * i, t, o)))(e, t, o));
1220
+ }
1221
+ function dateDurationDays(e, t) {
1222
+ const o = adjustDateDurationRecord(e, 0);
1223
+ return dateDurationSign(e) ? e.K + isoDateRecordToEpochDays(calendarDateAdd(t.U, t.o, o, p)) - isoDateRecordToEpochDays(t.o) : e.K;
1224
+ }
1225
+ function roundTimeDuration(e, t, o, n) {
1226
+ return roundTimeDurationToIncrement(e, nanosecondsForTimeUnit(o) * t, n);
1227
+ }
1228
+ function totalTimeDuration(e, t) {
1229
+ return divideTimeDurationToFloatingPoint(e, nanosecondsForTimeUnit(t));
1230
+ }
1231
+ function computeNudgeWindow(e, t, o, n, r, a, i, l, c) {
1232
+ let s, d, m, T, u;
1233
+ if (l === k) s = roundNumberToIncrement(t.W.ee, i, P) + (c ? i * e : 0), d = s + i * e, m = createDateDurationRecord(s, 0, 0, 0), T = createDateDurationRecord(d, 0, 0, 0);
1234
+ else if (l === H) s = roundNumberToIncrement(t.W.te, i, P) + (c ? i * e : 0), d = s + i * e, m = adjustDateDurationRecord(t.W, 0, 0, s), T = adjustDateDurationRecord(t.W, 0, 0, d);
1235
+ else if (l === x) {
1236
+ const o = calendarDateAdd(0, n.o, adjustDateDurationRecord(t.W, 0, 0), p);
1237
+ s = roundNumberToIncrement(t.W.X + calendarDateUntil(0, o, addDaysToIsoDate(o, t.W.K), x).X, i, P), d = s + i * e, m = adjustDateDurationRecord(t.W, 0, s), T = adjustDateDurationRecord(t.W, 0, d);
1238
+ } else s = roundNumberToIncrement(t.W.K, i, P), d = s + i * e, m = adjustDateDurationRecord(t.W, s), T = adjustDateDurationRecord(t.W, d);
1239
+ if (0 === s) u = o;
1240
+ else {
1241
+ const e = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o, m, p), n.p);
1242
+ u = r ? getEpochNanosecondsFor(r, e, g) : getUtcEpochNanoseconds(e);
1243
+ }
1244
+ const D = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o, T, p), n.p);
1245
+ return {
1246
+ Te: s,
1247
+ De: d,
1248
+ pe: u,
1249
+ he: r ? getEpochNanosecondsFor(r, D, g) : getUtcEpochNanoseconds(D),
1250
+ ge: m,
1251
+ fe: T
1252
+ };
1253
+ }
1254
+ function nudgeToCalendarUnit(e, t, o, n, r, a, i, l, c, s) {
1255
+ let d = !1, m = computeNudgeWindow(e, t, o, r, a, 0, l, c, !1);
1256
+ compareEpochNanoseconds(m.pe, n) * compareEpochNanoseconds(m.he, n) > 0 && (m = computeNudgeWindow(e, t, o, r, a, 0, l, c, !0), d = !0);
1257
+ const T = differenceEpochNanoseconds(m.pe, n), u = differenceEpochNanoseconds(m.pe, m.he);
1258
+ let D = m.ge, p = m.pe;
1259
+ return roundNumberToIncrement(m.Te + ((e, t, o) => signTimeDuration(e) ? ye(e, t) ? ye(addTimeDuration(e, e), t) * o / 5 + .5 : 1 : 0)(T, u, e) * l * e, l, s) === m.De && (d = !0, D = m.fe, p = m.he), {
1260
+ Ie: {
1261
+ Oe: combineDateAndTimeDuration(D, createTimeDurationFromSeconds(0)),
1262
+ Se: p,
1263
+ Fe: d
1264
+ },
1265
+ we: m.Te + divideTimeDurationToFloatingPoint(T, 1e9) / divideTimeDurationToFloatingPoint(u, 1e9) * l * e
1266
+ };
1267
+ }
1268
+ function roundRelativeDuration(e, t, o, n, r, a, i, l, c, s) {
1269
+ const d = internalDurationSign(e) || 1, m = isCalendarUnit(c) || r && c === L ? nudgeToCalendarUnit(d, e, t, o, n, r, 0, l, c, s).Ie : r ? ((e, t, o, n, r, a, i, l) => {
1270
+ const c = calendarDateAdd(0, o.o, t.W, p), s = combineIsoDateAndTimeRecord(c, o.p), d = combineIsoDateAndTimeRecord(addDaysToIsoDate(c, e), o.p), m = getEpochNanosecondsFor(n, s, g), T = getEpochNanosecondsFor(n, d, g), u = timeDurationFromEpochNanosecondsDifference(T, m), D = nanosecondsForTimeUnit(i);
1271
+ let h = roundTimeDurationToIncrement(t.p, a * D, l);
1272
+ const f = addTimeDuration(h, negateTimeDuration(u));
1273
+ let I, O = !1, S = 0;
1274
+ return ft(f) !== -e ? (O = !0, S = e, h = roundTimeDurationToIncrement(f, a * D, l), I = addTimeDurationToEpochNanoseconds(T, h)) : I = addTimeDurationToEpochNanoseconds(T, h), {
1275
+ Oe: combineDateAndTimeDuration(adjustDateDurationRecord(t.W, t.W.K + S), h),
1276
+ Se: I,
1277
+ Fe: O
1278
+ };
1279
+ })(d, e, n, r, 0, l, c, s) : (function(e, t, o, n, r, a) {
1280
+ const i = add24HourDaysToTimeDuration(e.p, e.W.K), l = r === L ? roundTimeDurationByDays(i, n, a) : roundTimeDurationToIncrement(i, nanosecondsForTimeUnit(r) * n, a), c = l[0], [s, d] = isDateUnit(o) ? [c, addTimeDuration(l, timeDurationFromComponents(24 * -c, 0, 0, 0, 0, 0))] : [0, l];
1281
+ return {
1282
+ Oe: combineDateAndTimeDuration(adjustDateDurationRecord(e.W, s), d),
1283
+ Se: addTimeDurationToEpochNanoseconds(t, addTimeDuration(l, negateTimeDuration(i))),
1284
+ Fe: sign(c - i[0]) === ft(i)
1285
+ };
1286
+ })(e, o, i, l, c, s);
1287
+ return m.Fe && c !== x ? ((e, t, o, n, r, a, i, l) => {
1288
+ if (l === i) return t;
1289
+ const c = i;
1290
+ let s;
1291
+ for (let a = l - 1; a >= c; a--) if (a !== X || c === X) {
1292
+ s = a === _ ? createDateDurationRecord(t.W.ee + e, 0, 0, 0) : a === K ? adjustDateDurationRecord(t.W, 0, 0, t.W.te + e) : adjustDateDurationRecord(t.W, 0, t.W.X + e);
1293
+ const i = combineIsoDateAndTimeRecord(calendarDateAdd(0, n.o, s, p), n.p);
1294
+ if (ft(differenceEpochNanoseconds(r ? getEpochNanosecondsFor(r, i, "compatible") : getUtcEpochNanoseconds(i), o)) === -e) break;
1295
+ t = combineDateAndTimeDuration(s, createTimeDurationFromSeconds(0));
1296
+ }
1297
+ return t;
1298
+ })(d, m.Oe, m.Se, n, r, 0, i, largerOfTwoTemporalUnits(c, L)) : m.Oe;
1299
+ }
1300
+ function totalRelativeDuration(e, t, o, n, r, a, i) {
1301
+ return isCalendarUnit(i) || r && i === L ? nudgeToCalendarUnit(internalDurationSign(e) || 1, e, t, o, n, r, 0, 1, i, P).we : totalTimeDuration(add24HourDaysToTimeDuration(e.p, e.W.K), i);
1302
+ }
1303
+ function temporalDurationToString(e, t) {
1304
+ const o = durationSign(e), n = timeDurationFromComponents(0, 0, (e = applySignToDurationSlot(e, o))[oe], e[ne], e[re], e[ae]), [, , , r, a, i, l] = balanceTimeDuration(n, J), [c, s, d, m, T, u] = [
1305
+ "Y",
1306
+ "M",
1307
+ "W",
1308
+ "D",
1309
+ "H",
1310
+ "M"
1311
+ ].map((t, o) => e[o] ? `${e[o]}${t}` : ""), D = `${T}${u}${ft(n) || defaultTemporalLargestUnit(e) >= J || void 0 !== t ? `${toString(r)}${formatFractionalSeconds(1e6 * a + 1e3 * i + l, t)}S` : ""}`;
1312
+ return `${o < 0 ? "-" : ""}P${c}${s}${d}${m}${D && `T${D}`}`;
1313
+ }
1314
+ function addDurations(e, t, o) {
1315
+ const n = applySignToDurationSlot(toTemporalDuration(o), e), r = largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), defaultTemporalLargestUnit(n));
1316
+ return isCalendarUnit(r) && throwRangeError(durationWithDateUnit(r)), createTemporalDuration(temporalDurationFromInternal(combineDateAndTimeDuration(zeroDateDuration(), addTimeDuration(toInternalDurationRecordWith24HourDays(t).p, toInternalDurationRecordWith24HourDays(n).p)), r));
1317
+ }
1318
+ function getInternalSlotOrThrowForDuration(e) {
1319
+ const t = gt.get(e);
1320
+ return t || throwTypeError(pe), t;
1321
+ }
1322
+ function applySignToDurationSlot(e, t) {
1323
+ return createTemporalDurationSlot(e.map((e) => e * t + 0));
1324
+ }
1325
+ function validateTimeDurationRange(e) {
1326
+ return ((e) => ye(absTimeDuration(e), createTimeDurationFromSeconds(2 ** 53)) < 0)(e) || throwRangeError(Te), e;
1327
+ }
1328
+ function balanceTimeDuration(e, t) {
1329
+ const o = clamp(t, 3, 9);
1330
+ return [
1331
+ ...[
1332
+ 0,
1333
+ 0,
1334
+ 0,
1335
+ 0,
1336
+ 0,
1337
+ 0
1338
+ ].slice(0, o - Q),
1339
+ o > oe ? timeDurationToSubsecondsNumber(e, 18 - 3 * o) : divTrunc((r = e, r[0] * n + divTrunc(r[1], 1e9)), ce[o - Q] / 1e9),
1340
+ ...[
1341
+ 0,
1342
+ 1,
1343
+ 2,
1344
+ 3,
1345
+ 4,
1346
+ 5
1347
+ ].map((t) => divTrunc(e[1], ce[t + 1]) % (ce[t] / ce[t + 1]) + 0).slice(o - Q)
1348
+ ];
1349
+ var r;
1350
+ }
1351
+ function isIntegerAndHalf(e) {
1352
+ return Math.abs(e) % 1 == .5;
1353
+ }
1354
+ function roundExpand(e) {
1355
+ return (e < 0 ? Math.floor(e) : Math.ceil(e)) + 0;
1356
+ }
1357
+ function roundHalfCeil(e) {
1358
+ return (isIntegerAndHalf(e) ? Math.ceil(e) : Math.round(e)) + 0;
1359
+ }
1360
+ function roundHalfFloor(e) {
1361
+ return (isIntegerAndHalf(e) ? Math.floor(e) : Math.round(e)) + 0;
1362
+ }
1363
+ function roundHalfEven(e) {
1364
+ return (isIntegerAndHalf(e) ? (e = Math.trunc(e)) + e % 2 : Math.round(e)) + 0;
1365
+ }
1366
+ function isoDateToEpochDays(e, t, o) {
1367
+ const n = balanceIsoYearMonth(e, t + 1);
1368
+ return Date.UTC(n.t % 400 - 400, n.u - 1, 0) / r + (divTrunc(n.t, 400) + 1) * l + o;
1369
+ }
1370
+ function isoDateRecordToEpochDays(e) {
1371
+ return isoDateToEpochDays(e.t, e.u - 1, e.T);
1372
+ }
1373
+ function mathematicalInLeapYear(e) {
1374
+ return +!(e % (e % 25 ? 4 : 16));
1375
+ }
1376
+ function getTemporalOverflowOption(e) {
1377
+ return getOption(e, "overflow", [p, h], p);
1378
+ }
1379
+ function getTemporalDisambiguationOption(e) {
1380
+ return getOption(e, "disambiguation", [
1381
+ g,
1382
+ "earlier",
1383
+ f,
1384
+ "reject"
1385
+ ], g);
1386
+ }
1387
+ function negateRoundingMode(e) {
1388
+ return "ceil" === e ? y : "floor" === e ? v : "halfCeil" === e ? R : "halfFloor" === e ? b : e;
1389
+ }
1390
+ function getTemporalOffsetOption(e, t) {
1391
+ return getOption(e, "offset", [
1392
+ I,
1393
+ "use",
1394
+ "ignore",
1395
+ O
1396
+ ], t);
1397
+ }
1398
+ function getTemporalShowCalendarNameOption(e) {
1399
+ return getOption(e, "calendarName", [
1400
+ U,
1401
+ j,
1402
+ $,
1403
+ C
1404
+ ], U);
1405
+ }
1406
+ function validateTemporalRoundingIncrement(e, t, o) {
1407
+ (e > (o ? t : t - 1) || t % e !== 0) && throwRangeError(invalidField("roundingIncrement"));
1408
+ }
1409
+ function getTemporalFractionalSecondDigitsOption(e) {
1410
+ const t = "fractionalSecondDigits", o = e[t];
1411
+ if (void 0 === o) return;
1412
+ if ("number" != typeof o) return void ("auto" !== toString(o) && throwRangeError(invalidField(t)));
1413
+ !isNaN(o) && isFinite(o) || throwRangeError(invalidField(t));
1414
+ const n = Math.floor(o);
1415
+ return isWithin(n, 0, 9) || throwRangeError(invalidField(t)), n;
1416
+ }
1417
+ function toSecondsStringPrecisionRecord(e, t) {
1418
+ return e ? {
1419
+ ve: e === q ? D : 3 * (e - 6),
1420
+ ye: e,
1421
+ Ee: 1
1422
+ } : {
1423
+ ve: t,
1424
+ ye: divFloor((t ?? 9) - 1, 3) + 7,
1425
+ Ee: 10 ** ((9 - (t ?? 9)) % 3)
1426
+ };
1427
+ }
1428
+ function getTemporalUnitValuedOption(e, t, o) {
1429
+ return mapUnlessUndefined(getOption(e, t, [
1430
+ ...ie,
1431
+ ...le,
1432
+ "auto"
1433
+ ], o), (e) => {
1434
+ return "auto" === e ? "auto" : (t = e.replace(/s$/, ""), ie.indexOf(t));
1435
+ var t;
1436
+ });
1437
+ }
1438
+ function validateTemporalUnitValue(e, t, o = []) {
1439
+ void 0 === e || o.includes(e) || ("auto" === e && throwRangeError(disallowedUnit(e)), (e <= L && t === s || e > L && t === c) && throwRangeError(disallowedUnit(e)));
1440
+ }
1441
+ function getTemporalRelativeToOption(e) {
1442
+ const t = e.relativeTo;
1443
+ if (void 0 === t) return createNullPrototypeObject({});
1444
+ let o, n, r, a, i, l = !0, c = S;
1445
+ if (isObject(t)) {
1446
+ if (isZonedDateTime(t)) return createNullPrototypeObject({ Pe: getInternalSlotOrThrowForZonedDateTime(t) });
1447
+ if (isPlainDate(t)) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(t) });
1448
+ const e = getInternalSlotForPlainDateTime(t);
1449
+ if (e) return createNullPrototypeObject({ be: getInternalSlotOrThrowForPlainDate(createTemporalDate(e._.o, e.U)) });
1450
+ r = getTemporalCalendarIdentifierWithIsoDefault(t);
1451
+ const l = prepareCalendarFields(r, t, [
1452
+ Dt.t,
1453
+ Dt.u,
1454
+ Dt.P,
1455
+ Dt.T,
1456
+ Dt.D,
1457
+ Dt.I,
1458
+ Dt.O,
1459
+ Dt.S,
1460
+ Dt.F,
1461
+ Dt.v,
1462
+ Dt.R,
1463
+ Dt.N
1464
+ ], []), s = interpretTemporalDateTimeFields(r, l, p);
1465
+ a = s.o, i = s.p, o = l.timeZone, n = l.offset, c = n ? S : w;
1466
+ } else {
1467
+ validateString(t);
1468
+ const e = parseIsoDateTime(t, [Xe, Qe]);
1469
+ n = e.N.$, e.N.Z ? (o = toTemporalTimeZoneIdentifier(e.N.Z), c = e.N.M ? F : n ? S : w, l = void 0 !== n && hasUtcOffsetSubMinuteParts(n)) : o = void 0, r = canonicalizeCalendar(e.U || "iso8601"), a = createIsoDateRecord(e.t, e.u, e.T), i = e.p;
1470
+ }
1471
+ return createNullPrototypeObject(o ? { Pe: getInternalSlotOrThrowForZonedDateTime(createTemporalZonedDateTime(interpretISODateTimeOffset(a, i, c, c === S ? parseDateTimeUtcOffset(n) : 0, o, g, O, l), o, r)) } : { be: getInternalSlotOrThrowForPlainDate(createTemporalDate(a, r)) });
1472
+ }
1473
+ function largerOfTwoTemporalUnits(e, t) {
1474
+ return e < t ? e : t;
1475
+ }
1476
+ function isCalendarUnit(e) {
1477
+ return e < L;
1478
+ }
1479
+ function isDateUnit(e) {
1480
+ return e <= L;
1481
+ }
1482
+ function maximumTemporalDurationRoundingIncrement(e) {
1483
+ return [
1484
+ 24,
1485
+ 60,
1486
+ 60
1487
+ ][e - 4] || 1e3;
1488
+ }
1489
+ function validatePartialTemporalObject(e) {
1490
+ (!isObject(e) || isPlainDate(e) || isPlainDateTime(e) || isPlainMonthDay(e) || isPlainTime(e) || isPlainYearMonth(e) || isZonedDateTime(e) || void 0 !== e.calendar || void 0 !== e.timeZone) && throwTypeError("invalid argument for `with` method");
1491
+ }
1492
+ function formatFractionalSeconds(e, t) {
1493
+ const o = toZeroPaddedDecimalString(e, 9);
1494
+ return void 0 === t ? 0 === e ? "" : `.${o.replace(/0*$/, "")}` : 0 === t ? "" : `.${o.slice(0, t)}`;
1495
+ }
1496
+ function formatTimeString(e, t, o, n, r) {
1497
+ return `${toZeroPaddedDecimalString(e, 2)}:${toZeroPaddedDecimalString(t, 2)}${r === D ? "" : `:${toZeroPaddedDecimalString(o, 2)}${formatFractionalSeconds(n, r)}`}`;
1498
+ }
1499
+ function roundNumberToIncrement(e, t, o) {
1500
+ return Ot[o](e / t) * t;
1501
+ }
1502
+ function getRoundingModeOption(e, t) {
1503
+ return getOption(e, "roundingMode", [
1504
+ v,
1505
+ y,
1506
+ E,
1507
+ P,
1508
+ b,
1509
+ R,
1510
+ Z,
1511
+ N,
1512
+ M
1513
+ ], t);
1514
+ }
1515
+ function getRoundingIncrementOption(e) {
1516
+ const t = "roundingIncrement", o = mapUnlessUndefined(e[t], toIntegerWithTruncation) ?? 1;
1517
+ return (o < 1 || o > 1e9) && throwRangeError(invalidField(t)), o;
1518
+ }
1519
+ function isoDateToFields(e, t, o) {
1520
+ const n = calendarIsoToDate(e, t);
1521
+ return createNullPrototypeObject({
1522
+ [Dt.t]: o === T ? void 0 : n.t,
1523
+ [Dt.P]: n.P,
1524
+ [Dt.T]: o === m ? void 0 : n.T
1525
+ });
1526
+ }
1527
+ function getDifferenceSettings(e, t, o, n, r, a) {
1528
+ let i = getTemporalUnitValuedOption(t, "largestUnit", void 0) ?? "auto";
1529
+ const l = getRoundingIncrementOption(t), c = getRoundingModeOption(t, P), s = getTemporalUnitValuedOption(t, "smallestUnit", void 0) ?? r;
1530
+ return validateTemporalUnitValue(i, o, ["auto"]), n.includes(i) && throwRangeError(disallowedUnit(i)), validateTemporalUnitValue(s, o), n.includes(s) && throwRangeError(disallowedUnit(s)), "auto" === i && (i = largerOfTwoTemporalUnits(a, s)), i > s && throwRangeError(he), isDateUnit(s) || validateTemporalRoundingIncrement(l, maximumTemporalDurationRoundingIncrement(s), !1), {
1531
+ L: s,
1532
+ V: i,
1533
+ B: -1 === e ? negateRoundingMode(c) : c,
1534
+ H: l
1535
+ };
1536
+ }
1537
+ function getUtcEpochNanoseconds(e) {
1538
+ return addNanosecondsToEpochSeconds(createEpochNanosecondsFromEpochMilliseconds(utcEpochMilliseconds(e.o.t, e.o.u, e.o.T, e.p.D, e.p.I, e.p.O, e.p.S)), 1e3 * e.p.F + e.p.v);
1539
+ }
1540
+ function epochDaysToIsoDate(e) {
1541
+ const t = new Date(modFloor(e, l) * r);
1542
+ return {
1543
+ t: t.getUTCFullYear() + 400 * divFloor(e, l),
1544
+ u: t.getUTCMonth() + 1,
1545
+ T: t.getUTCDate()
1546
+ };
1547
+ }
1548
+ function isoDateTimeToFields(e, t) {
1549
+ return createNullPrototypeObject({
1550
+ ...isoDateToFields(e, t.o, c),
1551
+ [Dt.D]: t.p.D,
1552
+ [Dt.I]: t.p.I,
1553
+ [Dt.O]: t.p.O,
1554
+ [Dt.S]: t.p.S,
1555
+ [Dt.F]: t.p.F,
1556
+ [Dt.v]: t.p.v
1557
+ });
1558
+ }
1559
+ function getInternalSlotOrThrowForDateTimeFormat(e) {
1560
+ const t = vt.get(e);
1561
+ return t || throwTypeError(pe), t;
1562
+ }
1563
+ function formatDateTime(e, t) {
1564
+ const [o, n] = handleDateTimeValue(getInternalSlotOrThrowForDateTimeFormat(e), t);
1565
+ return o.format(n);
1566
+ }
1567
+ function removeDateTimeFormatOptions(e, t) {
1568
+ for (const o of t) e[o] = void 0;
1569
+ }
1570
+ function dateStyleToMonthStyle(e) {
1571
+ return "short" === e ? "numeric" : "medium" === e ? "short" : "long";
1572
+ }
1573
+ function amendOptionsForPlainDate(e) {
1574
+ const t = createNullPrototypeObject(e);
1575
+ return hasAnyOptions(e, yt) || (hasAnyOptions(e, Et) && throwTypeError(ue), t.year = t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [...Et, "timeZoneName"]), t.timeZone = "UTC", t;
1576
+ }
1577
+ function amendOptionsForPlainTime(e) {
1578
+ const t = createNullPrototypeObject(e);
1579
+ return hasAnyOptions(e, Et) || (hasAnyOptions(e, yt) && throwTypeError(ue), t.hour = t.minute = t.second = "numeric"), "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, [
1580
+ ...yt,
1581
+ "era",
1582
+ "timeZoneName"
1583
+ ]), t.timeZone = "UTC", t;
1584
+ }
1585
+ function amendOptionsForPlainDateTime(e) {
1586
+ const t = createNullPrototypeObject(e);
1587
+ return "long" !== e.timeStyle && "full" !== e.timeStyle || (removeDateTimeFormatOptions(t, ["timeStyle"]), t.hour = t.minute = t.second = "numeric", e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = t.day = "numeric", t.month = dateStyleToMonthStyle(e.dateStyle), t.weekday = "full" === e.dateStyle ? "long" : void 0)), hasAnyOptions(e, [...yt, ...Et]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), removeDateTimeFormatOptions(t, ["timeZoneName"]), t.timeZone = "UTC", t;
1588
+ }
1589
+ function amendOptionsForPlainYearMonth(e) {
1590
+ const t = createNullPrototypeObject(e);
1591
+ return e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.year = "short" === e.dateStyle ? "2-digit" : "numeric", t.month = dateStyleToMonthStyle(e.dateStyle)), hasAnyOptions(e, [
1592
+ "year",
1593
+ "month",
1594
+ "dateStyle"
1595
+ ]) || (hasAnyOptions(e, [...yt, ...Et]) && throwTypeError(ue), t.year = t.month = "numeric"), removeDateTimeFormatOptions(t, [
1596
+ ...Et,
1597
+ "day",
1598
+ "weekday",
1599
+ "timeZoneName"
1600
+ ]), t.timeZone = "UTC", t;
1601
+ }
1602
+ function amendOptionsForPlainMonthDay(e) {
1603
+ const t = createNullPrototypeObject(e);
1604
+ return e.dateStyle && (removeDateTimeFormatOptions(t, ["dateStyle"]), t.month = dateStyleToMonthStyle(e.dateStyle), t.day = "numeric"), hasAnyOptions(e, [
1605
+ "month",
1606
+ "day",
1607
+ "dateStyle"
1608
+ ]) || (hasAnyOptions(e, [...yt, ...Et]) && throwTypeError(ue), t.month = t.day = "numeric"), removeDateTimeFormatOptions(t, [
1609
+ ...Et,
1610
+ "era",
1611
+ "year",
1612
+ "weekday",
1613
+ "timeZoneName"
1614
+ ]), t.timeZone = "UTC", t;
1615
+ }
1616
+ function amendOptionsForInstant(e) {
1617
+ const t = createNullPrototypeObject(e);
1618
+ return hasAnyOptions(e, [...yt, ...Et]) || (t.year = t.month = t.day = t.hour = t.minute = t.second = "numeric"), t;
1619
+ }
1620
+ function hasAnyOptions(e, t) {
1621
+ return t.some((t) => void 0 !== e[t]);
1622
+ }
1623
+ function createDateTimeFormat(e, t = createNullPrototypeObject({}), o, n, r = Object.create(bt.prototype)) {
1624
+ null === t && throwTypeError(ue);
1625
+ const a = ((e, t) => {
1626
+ const o = createNullPrototypeObject({});
1627
+ for (const n of t) o[n] = e[n];
1628
+ return o;
1629
+ })(Object(t), wt);
1630
+ a.hour12 = mapUnlessUndefined(a.hour12, toBoolean), a.hourCycle = mapUnlessUndefined(a.hourCycle, toString), a.formatMatcher = mapUnlessUndefined(a.formatMatcher, toString), void 0 !== n && (void 0 !== a.timeZone && throwTypeError("disallowed field: timeZone"), a.timeZone = n, hasAnyOptions(a, [
1631
+ ...yt,
1632
+ ...Et,
1633
+ "timeZoneName"
1634
+ ]) || (a.timeZoneName = "short"));
1635
+ const i = new Ft(e, a), l = i.resolvedOptions(), d = createNullPrototypeObject(l);
1636
+ for (const e of Object.keys(d)) void 0 === a[e] && (d[e] = void 0);
1637
+ return d.hour12 = a.hour12, d.hourCycle = a.hourCycle, d.formatMatcher = a.formatMatcher, d.timeZone = l.timeZone, d.calendar = l.calendar, (o === c && d.timeStyle || o === s && d.dateStyle) && throwTypeError(ue), vt.set(r, createNullPrototypeObject({
1638
+ Re: i,
1639
+ Ne: d,
1640
+ Ze: i.resolvedOptions().locale
1641
+ })), r;
1642
+ }
1643
+ function validateSameTemporalType(e, t) {
1644
+ [
1645
+ isPlainDate,
1646
+ isPlainTime,
1647
+ isPlainDateTime,
1648
+ isZonedDateTime,
1649
+ isInstant,
1650
+ isPlainYearMonth,
1651
+ isPlainMonthDay
1652
+ ].some((o) => o(e) !== o(t)) && throwTypeError("Temporal type mismatch");
1653
+ }
1654
+ function toDateTimeFormattable(e) {
1655
+ return ((e) => isObject(e) && (isPlainDate(e) || isPlainTime(e) || isPlainDateTime(e) || isZonedDateTime(e) || isPlainYearMonth(e) || isPlainMonthDay(e) || isInstant(e)))(e) ? e : Fe(e);
1656
+ }
1657
+ function handleDateTimeValue(e, t) {
1658
+ const o = getInternalSlotForPlainDate(t), n = getInternalSlotForPlainDateTime(t), r = getInternalSlotForPlainYearMonth(t), a = getInternalSlotForPlainMonthDay(t);
1659
+ return isPlainTime(t) ? [e.$e ||= new Ft(e.Ze, amendOptionsForPlainTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(createIsoDateRecord(1970, 1, 1), getInternalSlotOrThrowForPlainTime(t))))] : o ? (o.U !== e.Ne.calendar && "iso8601" !== o.U && throwRangeError(De), [e.Me ||= new Ft(e.Ze, amendOptionsForPlainDate(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(o.o, midnightTimeRecord())))]) : n ? (n.U !== e.Ne.calendar && "iso8601" !== n.U && throwRangeError(De), [e.Ue ||= new Ft(e.Ze, amendOptionsForPlainDateTime(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(n._))]) : r ? (r.U !== e.Ne.calendar && throwRangeError(De), [e.je ||= new Ft(e.Ze, amendOptionsForPlainYearMonth(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(r.o, midnightTimeRecord())))]) : a ? (a.U !== e.Ne.calendar && throwRangeError(De), [e.Ce ||= new Ft(e.Ze, amendOptionsForPlainMonthDay(e.Ne)), epochMilliseconds(getUtcEpochNanoseconds(combineIsoDateAndTimeRecord(a.o, midnightTimeRecord())))]) : isInstant(t) ? [e.Ye ||= new Ft(e.Ze, amendOptionsForInstant(e.Ne)), epochMilliseconds(getInternalSlotOrThrowForInstant(t).Y)] : (isZonedDateTime(t) && throwTypeError(fe), [e.Re, t]);
1660
+ }
1661
+ function DateTimeFormat(e, t) {
1662
+ return new bt(e, t);
1663
+ }
1664
+ function createTemporalInstant(e, t = Object.create(Nt.prototype)) {
1665
+ return Zt.set(t, { Y: e }), t;
1666
+ }
1667
+ function toTemporalInstant$1(e) {
1668
+ if (isObject(e)) {
1669
+ const t = getInternalSlotForInstant(e) || getInternalSlotForZonedDateTime(e);
1670
+ if (t) return createTemporalInstant(t.Y);
1671
+ e = toPrimitive(e);
1672
+ }
1673
+ validateString(e);
1674
+ const t = parseIsoDateTime(e, [et]), o = t.N.M ? 0 : parseDateTimeUtcOffset(t.N.$), n = t.p;
1675
+ return createTemporalInstant(validateEpochNanoseconds(getUtcEpochNanoseconds(balanceIsoDateTime(t.t, t.u, t.T, n.D, n.I, n.O, n.S, n.F, n.v - o))));
1676
+ }
1677
+ function addInstant(e, t) {
1678
+ return validateEpochNanoseconds(addTimeDurationToEpochNanoseconds(e, t));
1679
+ }
1680
+ function differenceInstant(e, t, o, n, r) {
1681
+ return combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(timeDurationFromEpochNanosecondsDifference(t, e), o, n, r));
1682
+ }
1683
+ function roundTemporalInstant(e, t, o, n) {
1684
+ return (function(e, t, o) {
1685
+ return normalizeEpochNanoseconds(e[0], ((e, t, o) => St[o](e / t) * t)(e[1], t, o));
1686
+ })(e, t * nanosecondsForTimeUnit(o), n);
1687
+ }
1688
+ function temporalInstantToString(e, t, o) {
1689
+ const n = getOffsetNanosecondsFor(t || "UTC", e);
1690
+ return `${isoDateTimeToString(getIsoDateTimeFromOffsetNanoseconds(e, n), "iso8601", o, $)}${t ? formatDateTimeUtcOffsetRounded(n) : "Z"}`;
1691
+ }
1692
+ function differenceTemporalInstant(e, t, o, n) {
1693
+ const r = getInternalSlotOrThrowForInstant(toTemporalInstant$1(o)), a = getDifferenceSettings(e, getOptionsObject(n), s, [], G, J);
1694
+ return createTemporalDuration(applySignToDurationSlot(temporalDurationFromInternal(differenceInstant(t.Y, r.Y, a.H, a.L, a.B), a.V), e));
1695
+ }
1696
+ function addDurationToInstant(e, t, o) {
1697
+ const n = applySignToDurationSlot(toTemporalDuration(o), e);
1698
+ return isDateUnit(defaultTemporalLargestUnit(n)) && throwRangeError(durationWithDateUnit(defaultTemporalLargestUnit(n))), createTemporalInstant(addInstant(t.Y, toInternalDurationRecordWith24HourDays(n).p));
1699
+ }
1700
+ function validateEpochNanoseconds(e) {
1701
+ return ((e) => compareEpochNanoseconds(we, e) * compareEpochNanoseconds(ve, e) <= 0)(e) || throwRangeError(me), e;
1702
+ }
1703
+ function getInternalSlotForInstant(e) {
1704
+ return Zt.get(e);
1705
+ }
1706
+ function getInternalSlotOrThrowForInstant(e) {
1707
+ const t = getInternalSlotForInstant(e);
1708
+ return t || throwTypeError(pe), t;
1709
+ }
1710
+ function isInstant(e) {
1711
+ return Zt.has(e);
1712
+ }
1713
+ function clampEpochNanoseconds(e) {
1714
+ return compareEpochNanoseconds(e, ve) > 0 ? ve : compareEpochNanoseconds(e, we) < 0 ? we : e;
1715
+ }
1716
+ function systemTimeZoneIdentifier() {
1717
+ return new Ft().resolvedOptions().timeZone;
1718
+ }
1719
+ function systemUtcEpochNanoseconds() {
1720
+ return createEpochNanosecondsFromEpochMilliseconds(Date.now());
1721
+ }
1722
+ function systemDateTime(e = systemTimeZoneIdentifier()) {
1723
+ return getIsoDateTimeForZonedDateTimeSlot(createZonedDateTimeSlot(systemUtcEpochNanoseconds(), toTemporalTimeZoneIdentifier(e), "iso8601"));
1724
+ }
1725
+ const e = 1e6, t = 6e10, o = 36e11, n = 86400, r = 864e5, a = 864e8, i = 864e11, l = 146097, c = Symbol(), s = Symbol(), d = Symbol(), m = Symbol(), T = Symbol(), u = Symbol(), D = Symbol(), p = "constrain", h = "reject", g = "compatible", f = "later", I = "prefer", O = "reject", S = Symbol(), F = Symbol(), w = Symbol(), v = "ceil", y = "floor", E = "expand", P = "trunc", b = "halfCeil", R = "halfFloor", Z = "halfExpand", N = "halfTrunc", M = "halfEven", U = "auto", j = "always", $ = "never", C = "critical", Y = "auto", A = "never", W = "auto", z = "never", V = "critical", k = 0, H = 1, x = 2, L = 3, B = 4, q = 5, J = 6, G = 9, _ = 0, K = 1, X = 2, Q = 3, ee = 4, te = 5, oe = 6, ne = 7, re = 8, ae = 9, ie = [
1726
+ "year",
1727
+ "month",
1728
+ "week",
1729
+ "day",
1730
+ "hour",
1731
+ "minute",
1732
+ "second",
1733
+ "millisecond",
1734
+ "microsecond",
1735
+ "nanosecond"
1736
+ ], le = ie.map((e) => `${e}s`), ce = [
1737
+ i,
1738
+ o,
1739
+ t,
1740
+ 1e9,
1741
+ 1e6,
1742
+ 1e3,
1743
+ 1
1744
+ ], missingField = (e) => `missing field: ${e}`, invalidField = (e) => `invalid field: ${e}`, se = "parse error", de = "invalid date / time", me = "out-of-bounds date", Te = "out-of-bounds duration", ue = "invalid formatting options", De = "calendar mismatch", disallowedUnit = (e) => `disallowed unit: ${"auto" === e ? e : getNameFromUnit(e)}`, invalidNumber = (e) => `invalid number: ${e}`, invalidTimeZone = (e) => `invalid time zone: ${e}`, pe = "invalid method call", invalidMonthCode = (e) => `invalid month code:${e}`, durationWithDateUnit = (e) => `duration has a date unit: ${getNameFromUnit(e)}`, he = "invalid `largestUnit` and `smallestUnit` options", ge = "mismatch of `month` and `monthCode`", fe = "value is not formattable", notObject = (e) => `not object: ${e}`, Ie = "empty fields", Oe = "can't convert Temporal classes to number", Se = "argument is undefined", Fe = Math.max, we = createEpochNanosecondsFromEpochMilliseconds(-864e13), ve = createEpochNanosecondsFromEpochMilliseconds(864e13), ye = compareEpochNanoseconds, Ee = /* @__PURE__ */ new WeakMap();
1745
+ var Pe = class {
1746
+ constructor(e, t, o = "iso8601") {
1747
+ const n = validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e)));
1748
+ validateString(t);
1749
+ const r = parseTimeZoneIdentifier(t), a = r.J ? getAvailableNamedTimeZoneIdentifier(r.J) : formatOffsetTimeZoneIdentifier(r.G);
1750
+ validateString(o), createTemporalZonedDateTime(n, a, canonicalizeCalendar(o), this);
1751
+ }
1752
+ static from(e, t = void 0) {
1753
+ return createTemporalZonedDateTimeFromSlot(toTemporalZonedDateTime(e, t));
1754
+ }
1755
+ static compare(e, t) {
1756
+ return compareEpochNanoseconds(toTemporalZonedDateTime(e).Y, toTemporalZonedDateTime(t).Y);
1757
+ }
1758
+ get calendarId() {
1759
+ return getInternalSlotOrThrowForZonedDateTime(this).U;
1760
+ }
1761
+ get timeZoneId() {
1762
+ return getInternalSlotOrThrowForZonedDateTime(this).N;
1763
+ }
1764
+ get era() {
1765
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).oe;
1766
+ }
1767
+ get eraYear() {
1768
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ne;
1769
+ }
1770
+ get year() {
1771
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).t;
1772
+ }
1773
+ get month() {
1774
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).u;
1775
+ }
1776
+ get monthCode() {
1777
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).P;
1778
+ }
1779
+ get day() {
1780
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).T;
1781
+ }
1782
+ get hour() {
1783
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.D;
1784
+ }
1785
+ get minute() {
1786
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.I;
1787
+ }
1788
+ get second() {
1789
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.O;
1790
+ }
1791
+ get millisecond() {
1792
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.S;
1793
+ }
1794
+ get microsecond() {
1795
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.F;
1796
+ }
1797
+ get nanosecond() {
1798
+ return getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p.v;
1799
+ }
1800
+ get epochMilliseconds() {
1801
+ return epochMilliseconds(getInternalSlotOrThrowForZonedDateTime(this).Y);
1802
+ }
1803
+ get epochNanoseconds() {
1804
+ return convertEpochNanosecondsToBigInt(getInternalSlotOrThrowForZonedDateTime(this).Y);
1805
+ }
1806
+ get dayOfWeek() {
1807
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ae;
1808
+ }
1809
+ get dayOfYear() {
1810
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ie;
1811
+ }
1812
+ get weekOfYear() {
1813
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).le.re;
1814
+ }
1815
+ get yearOfWeek() {
1816
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).le.t;
1817
+ }
1818
+ get hoursInDay() {
1819
+ const e = getInternalSlotOrThrowForZonedDateTime(this), t = getIsoDateTimeForZonedDateTimeSlot(e).o;
1820
+ return timeDurationToSubsecondsNumber(differenceEpochNanoseconds(getStartOfDay(e.N, t), getStartOfDay(e.N, addDaysToIsoDate(t, 1))), -9) / o;
1821
+ }
1822
+ get daysInWeek() {
1823
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ce;
1824
+ }
1825
+ get daysInMonth() {
1826
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).se;
1827
+ }
1828
+ get daysInYear() {
1829
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).de;
1830
+ }
1831
+ get monthsInYear() {
1832
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).me;
1833
+ }
1834
+ get inLeapYear() {
1835
+ return calendarIsoToDateForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).ue;
1836
+ }
1837
+ get offsetNanoseconds() {
1838
+ return getOffsetNanosecondsForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this));
1839
+ }
1840
+ get offset() {
1841
+ return formatUtcOffsetNanoseconds(getOffsetNanosecondsForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)));
1842
+ }
1843
+ with(e, t = void 0) {
1844
+ const o = getInternalSlotOrThrowForZonedDateTime(this);
1845
+ validatePartialTemporalObject(e);
1846
+ const n = getOffsetNanosecondsForZonedDateTimeSlot(o), r = getIsoDateTimeForZonedDateTimeSlot(o), a = calendarMergeFields(o.U, createNullPrototypeObject({
1847
+ ...isoDateTimeToFields(o.U, r),
1848
+ [Dt.R]: formatUtcOffsetNanoseconds(n)
1849
+ }), prepareCalendarFields(o.U, e, [
1850
+ Dt.t,
1851
+ Dt.u,
1852
+ Dt.P,
1853
+ Dt.T,
1854
+ Dt.D,
1855
+ Dt.I,
1856
+ Dt.O,
1857
+ Dt.S,
1858
+ Dt.F,
1859
+ Dt.v,
1860
+ Dt.R
1861
+ ])), i = getOptionsObject(t), l = getTemporalDisambiguationOption(i), c = getTemporalOffsetOption(i, I), s = getTemporalOverflowOption(i), d = interpretTemporalDateTimeFields(o.U, a, s);
1862
+ return createTemporalZonedDateTime(interpretISODateTimeOffset(d.o, d.p, S, parseDateTimeUtcOffset(a[Dt.R]), o.N, l, c, !0), o.N, o.U);
1863
+ }
1864
+ withPlainTime(e = void 0) {
1865
+ const t = getInternalSlotOrThrowForZonedDateTime(this), o = getIsoDateTimeForZonedDateTimeSlot(t);
1866
+ return createTemporalZonedDateTime(void 0 === e ? getStartOfDay(t.N, o.o) : getEpochNanosecondsFor(t.N, combineIsoDateAndTimeRecord(o.o, toTemporalTime(e)), g), t.N, t.U);
1867
+ }
1868
+ withTimeZone(e) {
1869
+ const t = getInternalSlotOrThrowForZonedDateTime(this);
1870
+ return createTemporalZonedDateTime(t.Y, toTemporalTimeZoneIdentifier(e), t.U);
1871
+ }
1872
+ withCalendar(e) {
1873
+ const t = getInternalSlotOrThrowForZonedDateTime(this);
1874
+ return createTemporalZonedDateTime(t.Y, t.N, toTemporalCalendarIdentifier(e));
1875
+ }
1876
+ add(e, t = void 0) {
1877
+ return addDurationToZonedDateTime(1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
1878
+ }
1879
+ subtract(e, t = void 0) {
1880
+ return addDurationToZonedDateTime(-1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
1881
+ }
1882
+ until(e, t = void 0) {
1883
+ return differenceTemporalZonedDateTime(1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
1884
+ }
1885
+ since(e, t = void 0) {
1886
+ return differenceTemporalZonedDateTime(-1, getInternalSlotOrThrowForZonedDateTime(this), e, t);
1887
+ }
1888
+ round(e) {
1889
+ const t = getInternalSlotOrThrowForZonedDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit", u);
1890
+ if (validateTemporalUnitValue(a, s, [L]), validateTemporalRoundingIncrement(n, a === L ? 1 : maximumTemporalDurationRoundingIncrement(a), a === L), a === G && 1 === n) return createTemporalZonedDateTimeFromSlot(t);
1891
+ const i = getIsoDateTimeForZonedDateTimeSlot(t);
1892
+ if (a === L) {
1893
+ const e = getStartOfDay(t.N, i.o), o = getStartOfDay(t.N, addDaysToIsoDate(i.o, 1));
1894
+ return createTemporalZonedDateTime(addNanosecondsToEpochSeconds(e, roundNumberToIncrement(timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, t.Y), -9), timeDurationToSubsecondsNumber(differenceEpochNanoseconds(e, o), -9), r)), t.N, t.U);
1895
+ }
1896
+ const l = roundIsoDateTime(i, n, a, r), c = getOffsetNanosecondsForZonedDateTimeSlot(t);
1897
+ return createTemporalZonedDateTime(interpretISODateTimeOffset(l.o, l.p, S, c, t.N, g, I, !0), t.N, t.U);
1898
+ }
1899
+ equals(e) {
1900
+ const t = getInternalSlotOrThrowForZonedDateTime(this), o = toTemporalZonedDateTime(e);
1901
+ return !compareEpochNanoseconds(t.Y, o.Y) && timeZoneEquals(t.N, o.N) && calendarEquals(t.U, o.U);
1902
+ }
1903
+ toString(e = void 0) {
1904
+ const t = getInternalSlotOrThrowForZonedDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = ((e) => getOption(e, "offset", [Y, A], Y))(o), i = getRoundingModeOption(o, P), l = getTemporalUnitValuedOption(o, "smallestUnit", void 0), c = ((e) => getOption(e, "timeZoneName", [
1905
+ W,
1906
+ z,
1907
+ V
1908
+ ], W))(o);
1909
+ validateTemporalUnitValue(l, s), l === B && throwRangeError(invalidField("smallestUnit"));
1910
+ const d = toSecondsStringPrecisionRecord(l, r);
1911
+ return temporalZonedDateTimeToString(t, d.ve, n, c, a, d.Ee, d.ye, i);
1912
+ }
1913
+ toLocaleString(e = void 0, t = void 0) {
1914
+ const o = getInternalSlotOrThrowForZonedDateTime(this), n = createDateTimeFormat(e, t, d, o.N), r = getInternalSlotOrThrowForDateTimeFormat(n);
1915
+ return "iso8601" === o.U || calendarEquals(o.U, r.Ne.calendar) || throwRangeError(De), formatDateTime(n, createTemporalInstant(o.Y));
1916
+ }
1917
+ toJSON() {
1918
+ return temporalZonedDateTimeToString(getInternalSlotOrThrowForZonedDateTime(this), void 0, U, W, Y);
1919
+ }
1920
+ valueOf() {
1921
+ throwTypeError(Oe);
1922
+ }
1923
+ startOfDay() {
1924
+ const e = getInternalSlotOrThrowForZonedDateTime(this);
1925
+ return createTemporalZonedDateTime(getStartOfDay(e.N, getIsoDateTimeForZonedDateTimeSlot(e).o), e.N, e.U);
1926
+ }
1927
+ getTimeZoneTransition(e) {
1928
+ const t = getInternalSlotOrThrowForZonedDateTime(this);
1929
+ void 0 === e && throwTypeError(Se);
1930
+ const o = getOption("string" == typeof e ? { direction: e } : getOptionsObject(e), "direction", ["next", "previous"], u), n = ((e, t, o) => {
1931
+ if ("UTC" === e || isOffsetTimeZoneIdentifier(e)) return null;
1932
+ const n = -4e9, r = Math.floor((Date.now() + 31536e7) / 1e3), a = clamp(epochSeconds(addNanosecondsToEpochSeconds(t, o > 0 ? 0 : -1)), n, Infinity);
1933
+ return -1 === o ? a === n ? null : a > r ? searchTimeZoneTransition(e, a, a - 31536e3, o) || searchTimeZoneTransition(e, r, n, o) : searchTimeZoneTransition(e, a, n, o) : searchTimeZoneTransition(e, a, a > r ? a + 31536e3 : r, o);
1934
+ })(t.N, t.Y, "next" === o ? 1 : -1);
1935
+ return null === n ? null : createTemporalZonedDateTime(n, t.N, t.U);
1936
+ }
1937
+ toInstant() {
1938
+ return createTemporalInstant(getInternalSlotOrThrowForZonedDateTime(this).Y);
1939
+ }
1940
+ toPlainDate() {
1941
+ const e = getInternalSlotOrThrowForZonedDateTime(this);
1942
+ return createTemporalDate(getIsoDateTimeForZonedDateTimeSlot(e).o, e.U);
1943
+ }
1944
+ toPlainTime() {
1945
+ return createTemporalTime(getIsoDateTimeForZonedDateTimeSlot(getInternalSlotOrThrowForZonedDateTime(this)).p);
1946
+ }
1947
+ toPlainDateTime() {
1948
+ const e = getInternalSlotOrThrowForZonedDateTime(this);
1949
+ return createTemporalDateTime(getIsoDateTimeForZonedDateTimeSlot(e), e.U);
1950
+ }
1951
+ };
1952
+ defineStringTag(Pe.prototype, "Temporal.ZonedDateTime"), renameFunction(Pe, "ZonedDateTime");
1953
+ const be = createNullPrototypeObject({}), Re = createNullPrototypeObject({}), Ze = /* @__PURE__ */ new WeakMap();
1954
+ var Ne = class {
1955
+ constructor(e, t, o, n = 0, r = 0, a = 0, i = 0, l = 0, c = 0, s = "iso8601") {
1956
+ const d = [
1957
+ e,
1958
+ t,
1959
+ o
1960
+ ].map(toIntegerWithTruncation), m = [
1961
+ n,
1962
+ r,
1963
+ a,
1964
+ i,
1965
+ l,
1966
+ c
1967
+ ].map(toIntegerWithTruncation);
1968
+ validateString(s);
1969
+ const T = canonicalizeCalendar(s);
1970
+ isValidIsoDate(...d) && isValidTime(...m) || throwRangeError(de), createTemporalDateTime(combineIsoDateAndTimeRecord(createIsoDateRecord(...d), createTimeRecord(...m)), T, this);
1971
+ }
1972
+ static from(e, t = void 0) {
1973
+ return toTemporalDateTime(e, t);
1974
+ }
1975
+ static compare(e, t) {
1976
+ return compareIsoDateTime(getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(e))._, getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(t))._);
1977
+ }
1978
+ get calendarId() {
1979
+ return getInternalSlotOrThrowForPlainDateTime(this).U;
1980
+ }
1981
+ get era() {
1982
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
1983
+ return calendarIsoToDate(e.U, e._.o).oe;
1984
+ }
1985
+ get eraYear() {
1986
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
1987
+ return calendarIsoToDate(e.U, e._.o).ne;
1988
+ }
1989
+ get year() {
1990
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
1991
+ return calendarIsoToDate(e.U, e._.o).t;
1992
+ }
1993
+ get month() {
1994
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
1995
+ return calendarIsoToDate(e.U, e._.o).u;
1996
+ }
1997
+ get monthCode() {
1998
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
1999
+ return calendarIsoToDate(e.U, e._.o).P;
2000
+ }
2001
+ get day() {
2002
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2003
+ return calendarIsoToDate(e.U, e._.o).T;
2004
+ }
2005
+ get hour() {
2006
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.D;
2007
+ }
2008
+ get minute() {
2009
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.I;
2010
+ }
2011
+ get second() {
2012
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.O;
2013
+ }
2014
+ get millisecond() {
2015
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.S;
2016
+ }
2017
+ get microsecond() {
2018
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.F;
2019
+ }
2020
+ get nanosecond() {
2021
+ return getInternalSlotOrThrowForPlainDateTime(this)._.p.v;
2022
+ }
2023
+ get dayOfWeek() {
2024
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2025
+ return calendarIsoToDate(e.U, e._.o).ae;
2026
+ }
2027
+ get dayOfYear() {
2028
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2029
+ return calendarIsoToDate(e.U, e._.o).ie;
2030
+ }
2031
+ get weekOfYear() {
2032
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2033
+ return calendarIsoToDate(e.U, e._.o).le.re;
2034
+ }
2035
+ get yearOfWeek() {
2036
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2037
+ return calendarIsoToDate(e.U, e._.o).le.t;
2038
+ }
2039
+ get daysInWeek() {
2040
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2041
+ return calendarIsoToDate(e.U, e._.o).ce;
2042
+ }
2043
+ get daysInMonth() {
2044
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2045
+ return calendarIsoToDate(e.U, e._.o).se;
2046
+ }
2047
+ get daysInYear() {
2048
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2049
+ return calendarIsoToDate(e.U, e._.o).de;
2050
+ }
2051
+ get monthsInYear() {
2052
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2053
+ return calendarIsoToDate(e.U, e._.o).me;
2054
+ }
2055
+ get inLeapYear() {
2056
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2057
+ return calendarIsoToDate(e.U, e._.o).ue;
2058
+ }
2059
+ with(e, t = void 0) {
2060
+ const o = getInternalSlotOrThrowForPlainDateTime(this);
2061
+ validatePartialTemporalObject(e);
2062
+ const n = calendarMergeFields(o.U, isoDateTimeToFields(o.U, o._), prepareCalendarFields(o.U, e, [
2063
+ Dt.t,
2064
+ Dt.u,
2065
+ Dt.P,
2066
+ Dt.T,
2067
+ Dt.D,
2068
+ Dt.I,
2069
+ Dt.O,
2070
+ Dt.S,
2071
+ Dt.F,
2072
+ Dt.v
2073
+ ]));
2074
+ return createTemporalDateTime(interpretTemporalDateTimeFields(o.U, n, getTemporalOverflowOption(getOptionsObject(t))), o.U);
2075
+ }
2076
+ withPlainTime(e = void 0) {
2077
+ const t = getInternalSlotOrThrowForPlainDateTime(this);
2078
+ return createTemporalDateTime(combineIsoDateAndTimeRecord(t._.o, toTimeRecordOrMidnight(e)), t.U);
2079
+ }
2080
+ withCalendar(e) {
2081
+ return createTemporalDateTime(getInternalSlotOrThrowForPlainDateTime(this)._, toTemporalCalendarIdentifier(e));
2082
+ }
2083
+ add(e, t = void 0) {
2084
+ return addDurationToDateTime(1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
2085
+ }
2086
+ subtract(e, t = void 0) {
2087
+ return addDurationToDateTime(-1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
2088
+ }
2089
+ until(e, t = void 0) {
2090
+ return differenceTemporalPlainDateTime(1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
2091
+ }
2092
+ since(e, t = void 0) {
2093
+ return differenceTemporalPlainDateTime(-1, getInternalSlotOrThrowForPlainDateTime(this), e, t);
2094
+ }
2095
+ round(e) {
2096
+ const t = getInternalSlotOrThrowForPlainDateTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, "halfExpand"), a = getTemporalUnitValuedOption(o, "smallestUnit", u);
2097
+ return validateTemporalUnitValue(a, s, [L]), validateTemporalRoundingIncrement(n, a === L ? 1 : maximumTemporalDurationRoundingIncrement(a), a === L), createTemporalDateTime(roundIsoDateTime(t._, n, a, r), t.U);
2098
+ }
2099
+ equals(e) {
2100
+ const t = getInternalSlotOrThrowForPlainDateTime(this), o = getInternalSlotOrThrowForPlainDateTime(toTemporalDateTime(e));
2101
+ return !compareIsoDateTime(t._, o._) && calendarEquals(t.U, o.U);
2102
+ }
2103
+ toString(e = void 0) {
2104
+ const t = getInternalSlotOrThrowForPlainDateTime(this), o = getOptionsObject(e), n = getTemporalShowCalendarNameOption(o), r = getTemporalFractionalSecondDigitsOption(o), a = getRoundingModeOption(o, P), i = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2105
+ validateTemporalUnitValue(i, s), i === B && throwRangeError(invalidField("smallestUnit"));
2106
+ const l = toSecondsStringPrecisionRecord(i, r);
2107
+ return isoDateTimeToString(validateIsoDateTime(roundIsoDateTime(t._, l.Ee, l.ye, a)), t.U, l.ve, n);
2108
+ }
2109
+ toLocaleString(e = void 0, t = void 0) {
2110
+ return getInternalSlotOrThrowForPlainDateTime(this), formatDateTime(createDateTimeFormat(e, t, d), this);
2111
+ }
2112
+ toJSON() {
2113
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2114
+ return isoDateTimeToString(e._, e.U, void 0, U);
2115
+ }
2116
+ valueOf() {
2117
+ throwTypeError(Oe);
2118
+ }
2119
+ toZonedDateTime(e, t = void 0) {
2120
+ const o = getInternalSlotOrThrowForPlainDateTime(this), n = toTemporalTimeZoneIdentifier(e), r = getTemporalDisambiguationOption(getOptionsObject(t));
2121
+ return createTemporalZonedDateTime(getEpochNanosecondsFor(n, o._, r), n, o.U);
2122
+ }
2123
+ toPlainDate() {
2124
+ const e = getInternalSlotOrThrowForPlainDateTime(this);
2125
+ return createTemporalDate(e._.o, e.U);
2126
+ }
2127
+ toPlainTime() {
2128
+ return createTemporalTime(getInternalSlotOrThrowForPlainDateTime(this)._.p);
2129
+ }
2130
+ };
2131
+ defineStringTag(Ne.prototype, "Temporal.PlainDateTime"), renameFunction(Ne, "PlainDateTime");
2132
+ const Me = /* @__PURE__ */ new WeakMap();
2133
+ var Ue = class {
2134
+ constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0) {
2135
+ const i = [
2136
+ e,
2137
+ t,
2138
+ o,
2139
+ n,
2140
+ r,
2141
+ a
2142
+ ].map(toIntegerWithTruncation);
2143
+ isValidTime(...i) || throwRangeError(de), createTemporalTime(createTimeRecord(...i), this);
2144
+ }
2145
+ static from(e, t = void 0) {
2146
+ return createTemporalTime(toTemporalTime(e, t));
2147
+ }
2148
+ static compare(e, t) {
2149
+ return compareTimeRecord(toTemporalTime(e), toTemporalTime(t));
2150
+ }
2151
+ get hour() {
2152
+ return getInternalSlotOrThrowForPlainTime(this).D;
2153
+ }
2154
+ get minute() {
2155
+ return getInternalSlotOrThrowForPlainTime(this).I;
2156
+ }
2157
+ get second() {
2158
+ return getInternalSlotOrThrowForPlainTime(this).O;
2159
+ }
2160
+ get millisecond() {
2161
+ return getInternalSlotOrThrowForPlainTime(this).S;
2162
+ }
2163
+ get microsecond() {
2164
+ return getInternalSlotOrThrowForPlainTime(this).F;
2165
+ }
2166
+ get nanosecond() {
2167
+ return getInternalSlotOrThrowForPlainTime(this).v;
2168
+ }
2169
+ add(e) {
2170
+ return addDurationToTime(1, getInternalSlotOrThrowForPlainTime(this), e);
2171
+ }
2172
+ subtract(e) {
2173
+ return addDurationToTime(-1, getInternalSlotOrThrowForPlainTime(this), e);
2174
+ }
2175
+ with(e, t = void 0) {
2176
+ const o = getInternalSlotOrThrowForPlainTime(this);
2177
+ return validatePartialTemporalObject(e), createTemporalTime(regulateTime(...withArray(toTemporalTimeRecord(e, !0), [
2178
+ o.D,
2179
+ o.I,
2180
+ o.O,
2181
+ o.S,
2182
+ o.F,
2183
+ o.v
2184
+ ]), getTemporalOverflowOption(getOptionsObject(t))));
2185
+ }
2186
+ until(e, t = void 0) {
2187
+ return differenceTemporalPlainTime(1, getInternalSlotOrThrowForPlainTime(this), e, t);
2188
+ }
2189
+ since(e, t = void 0) {
2190
+ return differenceTemporalPlainTime(-1, getInternalSlotOrThrowForPlainTime(this), e, t);
2191
+ }
2192
+ round(e) {
2193
+ const t = getInternalSlotOrThrowForPlainTime(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, Z), a = getTemporalUnitValuedOption(o, "smallestUnit", u);
2194
+ return validateTemporalUnitValue(a, s), validateTemporalRoundingIncrement(n, maximumTemporalDurationRoundingIncrement(a), !1), createTemporalTime(roundTime(t, n, a, r));
2195
+ }
2196
+ equals(e) {
2197
+ return !compareTimeRecord(getInternalSlotOrThrowForPlainTime(this), toTemporalTime(e));
2198
+ }
2199
+ toString(e = void 0) {
2200
+ const t = getInternalSlotOrThrowForPlainTime(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, P), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2201
+ validateTemporalUnitValue(a, s), a === B && throwRangeError(invalidField("smallestUnit"));
2202
+ const i = toSecondsStringPrecisionRecord(a, n);
2203
+ return timeRecordToString(roundTime(t, i.Ee, i.ye, r), i.ve);
2204
+ }
2205
+ toLocaleString(e = void 0, t = void 0) {
2206
+ return getInternalSlotOrThrowForPlainTime(this), formatDateTime(createDateTimeFormat(e, t, s), this);
2207
+ }
2208
+ toJSON() {
2209
+ return timeRecordToString(getInternalSlotOrThrowForPlainTime(this));
2210
+ }
2211
+ valueOf() {
2212
+ throwTypeError(Oe);
2213
+ }
2214
+ };
2215
+ defineStringTag(Ue.prototype, "Temporal.PlainTime"), renameFunction(Ue, "PlainTime");
2216
+ const je = "\\d{4}|[-+]\\d{6}", $e = "0[1-9]|1[0-2]", Ce = "0[1-9]|[12]\\d|30|31", Ye = "[01]\\d|2[0-3]", Ae = "[0-5]\\d", We = `(?<a>${je})(?<x>-?)(?<b>${$e})\\k<x>(?<c>${Ce})`, ze = optionalChain([
2217
+ `(?<d>${Ye})`,
2218
+ `(?<y>:?)(?<e>${Ae})`,
2219
+ "\\k<y>(?<f>[0-5]\\d|60)",
2220
+ "[.,](?<g>\\d{1,9})"
2221
+ ]), Ve = optionalChain([
2222
+ `([+-])(${Ye})`,
2223
+ `(?<z>:?)(${Ae})`,
2224
+ `\\k<z>(${Ae})`,
2225
+ "[.,](\\d{1,9})"
2226
+ ]), ke = optionalChain([
2227
+ We,
2228
+ `[ tT]${ze}`,
2229
+ `(?<h>${Ve})`
2230
+ ]), He = `(?<l>${je})-?(?<m>${$e})`, xe = `(?:--)?(?<m>${$e})-?(?<n>${Ce})`, Le = `(?<h>${Ve})|(?<i>[zZ])`, Be = `([+-])(${Ye})(?::?(${Ae}))?|${join("[a-zA-Z._][a-zA-Z._+-\\d]*", "\\/")}`, qe = `\\[!?(?<j>${Be})\\]`, Je = join("[a-zA-Z\\d]+", "-"), Ge = `\\[(!)?([a-z_][a-z\\d_-]*)=(${Je})\\]`, _e = `(?<k>(${Ge})*)`, Ke = RegExp(Ge, "g"), Xe = createRegExp(`${optionalChain([
2231
+ We,
2232
+ `[ tT]${ze}`,
2233
+ Le
2234
+ ])}${qe}${_e}`), Qe = createRegExp(`${ke}(?:${qe})?${_e}`), et = createRegExp(`${We}[ tT]${ze}(?:${Le})(?:${qe})?${_e}`), tt = createRegExp(`(${We}[ tT]|[tT]?)${ze}(?<h>${Ve})?(?:${qe})?${_e}`), ot = createRegExp(`(${ke}|${xe})(?:${qe})?${_e}`), nt = createRegExp(`(${ke}|${He})(?:${qe})?${_e}`), rt = [createRegExp(`${xe}(${qe})?(${Ge})*`), createRegExp(`${He}(${qe})?(${Ge})*`)], at = createRegExp(Be), it = createRegExp(Je), lt = createRegExp(Ve), ct = /* @__PURE__ */ new WeakMap();
2235
+ var st = class {
2236
+ constructor(e, t, o = "iso8601", n = 1972) {
2237
+ const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
2238
+ validateString(o);
2239
+ const i = canonicalizeCalendar(o), l = toIntegerWithTruncation(n);
2240
+ isValidIsoDate(l, r, a) || throwRangeError(de), createTemporalMonthDay(createIsoDateRecord(l, r, a), i, this);
2241
+ }
2242
+ static from(e, t = void 0) {
2243
+ return toTemporalMonthDay(e, t);
2244
+ }
2245
+ get calendarId() {
2246
+ return getInternalSlotOrThrowForPlainMonthDay(this).U;
2247
+ }
2248
+ get monthCode() {
2249
+ const e = getInternalSlotOrThrowForPlainMonthDay(this);
2250
+ return calendarIsoToDate(e.U, e.o).P;
2251
+ }
2252
+ get day() {
2253
+ const e = getInternalSlotOrThrowForPlainMonthDay(this);
2254
+ return calendarIsoToDate(e.U, e.o).T;
2255
+ }
2256
+ with(e, t = void 0) {
2257
+ const o = getInternalSlotOrThrowForPlainMonthDay(this);
2258
+ return validatePartialTemporalObject(e), createTemporalMonthDay(calendarMonthDayFromFields(o.U, calendarMergeFields(o.U, isoDateToFields(o.U, o.o, T), prepareCalendarFields(o.U, e, [
2259
+ Dt.t,
2260
+ Dt.u,
2261
+ Dt.P,
2262
+ Dt.T
2263
+ ])), getTemporalOverflowOption(getOptionsObject(t))), o.U);
2264
+ }
2265
+ equals(e) {
2266
+ const t = getInternalSlotOrThrowForPlainMonthDay(this), o = getInternalSlotOrThrowForPlainMonthDay(toTemporalMonthDay(e));
2267
+ return 0 === compareIsoDate(t.o, o.o) && calendarEquals(t.U, o.U);
2268
+ }
2269
+ toString(e = void 0) {
2270
+ return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
2271
+ }
2272
+ toLocaleString(e = void 0, t = void 0) {
2273
+ return getInternalSlotOrThrowForPlainMonthDay(this), formatDateTime(createDateTimeFormat(e, t, c), this);
2274
+ }
2275
+ toJSON() {
2276
+ return temporalMonthDayToString(getInternalSlotOrThrowForPlainMonthDay(this), U);
2277
+ }
2278
+ valueOf() {
2279
+ throwTypeError(Oe);
2280
+ }
2281
+ toPlainDate(e) {
2282
+ const t = getInternalSlotOrThrowForPlainMonthDay(this);
2283
+ return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.U, calendarMergeFields(t.U, isoDateToFields(t.U, t.o, T), prepareCalendarFields(t.U, e, [Dt.t], [])), p), t.U);
2284
+ }
2285
+ };
2286
+ defineStringTag(st.prototype, "Temporal.PlainMonthDay"), renameFunction(st, "PlainMonthDay");
2287
+ const dt = /* @__PURE__ */ new WeakMap();
2288
+ var mt = class {
2289
+ constructor(e, t, o = "iso8601", n = 1) {
2290
+ const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t);
2291
+ validateString(o);
2292
+ const i = canonicalizeCalendar(o), l = toIntegerWithTruncation(n);
2293
+ isValidIsoDate(r, a, l) || throwRangeError(de), createTemporalYearMonth(createIsoDateRecord(r, a, l), i, this);
2294
+ }
2295
+ static from(e, t = void 0) {
2296
+ return toTemporalYearMonth(e, t);
2297
+ }
2298
+ static compare(e, t) {
2299
+ return compareIsoDate(getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(e)).o, getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(t)).o);
2300
+ }
2301
+ get calendarId() {
2302
+ return getInternalSlotOrThrowForPlainYearMonth(this).U;
2303
+ }
2304
+ get era() {
2305
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2306
+ return calendarIsoToDate(e.U, e.o).oe;
2307
+ }
2308
+ get eraYear() {
2309
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2310
+ return calendarIsoToDate(e.U, e.o).ne;
2311
+ }
2312
+ get year() {
2313
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2314
+ return calendarIsoToDate(e.U, e.o).t;
2315
+ }
2316
+ get month() {
2317
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2318
+ return calendarIsoToDate(e.U, e.o).u;
2319
+ }
2320
+ get monthCode() {
2321
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2322
+ return calendarIsoToDate(e.U, e.o).P;
2323
+ }
2324
+ get daysInYear() {
2325
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2326
+ return calendarIsoToDate(e.U, e.o).de;
2327
+ }
2328
+ get daysInMonth() {
2329
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2330
+ return calendarIsoToDate(e.U, e.o).se;
2331
+ }
2332
+ get monthsInYear() {
2333
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2334
+ return calendarIsoToDate(e.U, e.o).me;
2335
+ }
2336
+ get inLeapYear() {
2337
+ const e = getInternalSlotOrThrowForPlainYearMonth(this);
2338
+ return calendarIsoToDate(e.U, e.o).ue;
2339
+ }
2340
+ with(e, t = void 0) {
2341
+ const o = getInternalSlotOrThrowForPlainYearMonth(this);
2342
+ validatePartialTemporalObject(e);
2343
+ const n = calendarMergeFields(o.U, isoDateToFields(o.U, o.o, m), prepareCalendarFields(o.U, e, [
2344
+ Dt.t,
2345
+ Dt.u,
2346
+ Dt.P
2347
+ ]));
2348
+ return createTemporalYearMonth(calendarYearMonthFromFields(o.U, n, getTemporalOverflowOption(getOptionsObject(t))), o.U);
2349
+ }
2350
+ add(e, t = void 0) {
2351
+ return addDurationToYearMonth(1, getInternalSlotOrThrowForPlainYearMonth(this), e, t);
2352
+ }
2353
+ subtract(e, t = void 0) {
2354
+ return addDurationToYearMonth(-1, getInternalSlotOrThrowForPlainYearMonth(this), e, t);
2355
+ }
2356
+ until(e, t = void 0) {
2357
+ return differenceTemporalPlainYearMonth(1, getInternalSlotOrThrowForPlainYearMonth(this), e, t);
2358
+ }
2359
+ since(e, t = void 0) {
2360
+ return differenceTemporalPlainYearMonth(-1, getInternalSlotOrThrowForPlainYearMonth(this), e, t);
2361
+ }
2362
+ equals(e) {
2363
+ const t = getInternalSlotOrThrowForPlainYearMonth(this), o = getInternalSlotOrThrowForPlainYearMonth(toTemporalYearMonth(e));
2364
+ return 0 === compareIsoDate(t.o, o.o) && t.U === o.U;
2365
+ }
2366
+ toString(e = void 0) {
2367
+ return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
2368
+ }
2369
+ toLocaleString(e = void 0, t = void 0) {
2370
+ return getInternalSlotOrThrowForPlainYearMonth(this), formatDateTime(createDateTimeFormat(e, t, c), this);
2371
+ }
2372
+ toJSON() {
2373
+ return temporalYearMonthToString(getInternalSlotOrThrowForPlainYearMonth(this), U);
2374
+ }
2375
+ valueOf() {
2376
+ throwTypeError(Oe);
2377
+ }
2378
+ toPlainDate(e) {
2379
+ const t = getInternalSlotOrThrowForPlainYearMonth(this);
2380
+ return isObject(e) || throwTypeError(notObject(e)), createTemporalDate(calendarDateFromFields(t.U, calendarMergeFields(t.U, isoDateToFields(t.U, t.o, m), prepareCalendarFields(t.U, e, [Dt.T], [])), p), t.U);
2381
+ }
2382
+ };
2383
+ defineStringTag(mt.prototype, "Temporal.PlainYearMonth"), renameFunction(mt, "PlainYearMonth");
2384
+ const Tt = /* @__PURE__ */ new WeakMap();
2385
+ var ut = class {
2386
+ constructor(e, t, o, n = "iso8601") {
2387
+ const r = toIntegerWithTruncation(e), a = toIntegerWithTruncation(t), i = toIntegerWithTruncation(o);
2388
+ validateString(n);
2389
+ const l = canonicalizeCalendar(n);
2390
+ isValidIsoDate(r, a, i) || throwRangeError(de), createTemporalDate(createIsoDateRecord(r, a, i), l, this);
2391
+ }
2392
+ static from(e, t = void 0) {
2393
+ return toTemporalDate(e, t);
2394
+ }
2395
+ static compare(e, t) {
2396
+ return compareIsoDate(getInternalSlotOrThrowForPlainDate(toTemporalDate(e)).o, getInternalSlotOrThrowForPlainDate(toTemporalDate(t)).o);
2397
+ }
2398
+ get calendarId() {
2399
+ return getInternalSlotOrThrowForPlainDate(this).U;
2400
+ }
2401
+ get era() {
2402
+ const e = getInternalSlotOrThrowForPlainDate(this);
2403
+ return calendarIsoToDate(e.U, e.o).oe;
2404
+ }
2405
+ get eraYear() {
2406
+ const e = getInternalSlotOrThrowForPlainDate(this);
2407
+ return calendarIsoToDate(e.U, e.o).ne;
2408
+ }
2409
+ get year() {
2410
+ const e = getInternalSlotOrThrowForPlainDate(this);
2411
+ return calendarIsoToDate(e.U, e.o).t;
2412
+ }
2413
+ get month() {
2414
+ const e = getInternalSlotOrThrowForPlainDate(this);
2415
+ return calendarIsoToDate(e.U, e.o).u;
2416
+ }
2417
+ get monthCode() {
2418
+ const e = getInternalSlotOrThrowForPlainDate(this);
2419
+ return calendarIsoToDate(e.U, e.o).P;
2420
+ }
2421
+ get day() {
2422
+ const e = getInternalSlotOrThrowForPlainDate(this);
2423
+ return calendarIsoToDate(e.U, e.o).T;
2424
+ }
2425
+ get dayOfWeek() {
2426
+ const e = getInternalSlotOrThrowForPlainDate(this);
2427
+ return calendarIsoToDate(e.U, e.o).ae;
2428
+ }
2429
+ get dayOfYear() {
2430
+ const e = getInternalSlotOrThrowForPlainDate(this);
2431
+ return calendarIsoToDate(e.U, e.o).ie;
2432
+ }
2433
+ get weekOfYear() {
2434
+ const e = getInternalSlotOrThrowForPlainDate(this);
2435
+ return calendarIsoToDate(e.U, e.o).le.re;
2436
+ }
2437
+ get yearOfWeek() {
2438
+ const e = getInternalSlotOrThrowForPlainDate(this);
2439
+ return calendarIsoToDate(e.U, e.o).le.t;
2440
+ }
2441
+ get daysInWeek() {
2442
+ const e = getInternalSlotOrThrowForPlainDate(this);
2443
+ return calendarIsoToDate(e.U, e.o).ce;
2444
+ }
2445
+ get daysInMonth() {
2446
+ const e = getInternalSlotOrThrowForPlainDate(this);
2447
+ return calendarIsoToDate(e.U, e.o).se;
2448
+ }
2449
+ get daysInYear() {
2450
+ const e = getInternalSlotOrThrowForPlainDate(this);
2451
+ return calendarIsoToDate(e.U, e.o).de;
2452
+ }
2453
+ get monthsInYear() {
2454
+ const e = getInternalSlotOrThrowForPlainDate(this);
2455
+ return calendarIsoToDate(e.U, e.o).me;
2456
+ }
2457
+ get inLeapYear() {
2458
+ const e = getInternalSlotOrThrowForPlainDate(this);
2459
+ return calendarIsoToDate(e.U, e.o).ue;
2460
+ }
2461
+ toPlainYearMonth() {
2462
+ const e = getInternalSlotOrThrowForPlainDate(this);
2463
+ return createTemporalYearMonth(calendarYearMonthFromFields(e.U, isoDateToFields(e.U, e.o, c), p), e.U);
2464
+ }
2465
+ toPlainMonthDay() {
2466
+ const e = getInternalSlotOrThrowForPlainDate(this);
2467
+ return createTemporalMonthDay(calendarMonthDayFromFields(e.U, isoDateToFields(e.U, e.o, c), p), e.U);
2468
+ }
2469
+ add(e, t = void 0) {
2470
+ return addDurationToDate(1, getInternalSlotOrThrowForPlainDate(this), e, t);
2471
+ }
2472
+ subtract(e, t = void 0) {
2473
+ return addDurationToDate(-1, getInternalSlotOrThrowForPlainDate(this), e, t);
2474
+ }
2475
+ with(e, t = void 0) {
2476
+ const o = getInternalSlotOrThrowForPlainDate(this);
2477
+ validatePartialTemporalObject(e);
2478
+ const n = calendarMergeFields(o.U, isoDateToFields(o.U, o.o, c), prepareCalendarFields(o.U, e, [
2479
+ Dt.t,
2480
+ Dt.u,
2481
+ Dt.P,
2482
+ Dt.T
2483
+ ])), r = getTemporalOverflowOption(getOptionsObject(t));
2484
+ return createTemporalDate(calendarDateFromFields(o.U, n, r), o.U);
2485
+ }
2486
+ withCalendar(e) {
2487
+ return createTemporalDate(getInternalSlotOrThrowForPlainDate(this).o, toTemporalCalendarIdentifier(e));
2488
+ }
2489
+ until(e, t = void 0) {
2490
+ return differenceTemporalPlainDate(1, getInternalSlotOrThrowForPlainDate(this), e, t);
2491
+ }
2492
+ since(e, t = void 0) {
2493
+ return differenceTemporalPlainDate(-1, getInternalSlotOrThrowForPlainDate(this), e, t);
2494
+ }
2495
+ equals(e) {
2496
+ const t = getInternalSlotOrThrowForPlainDate(this), o = getInternalSlotOrThrowForPlainDate(toTemporalDate(e));
2497
+ return !compareIsoDate(t.o, o.o) && calendarEquals(t.U, o.U);
2498
+ }
2499
+ toPlainDateTime(e = void 0) {
2500
+ const t = getInternalSlotOrThrowForPlainDate(this);
2501
+ return createTemporalDateTime(combineIsoDateAndTimeRecord(t.o, toTimeRecordOrMidnight(e)), t.U);
2502
+ }
2503
+ toZonedDateTime(e) {
2504
+ const t = getInternalSlotOrThrowForPlainDate(this);
2505
+ let o, n;
2506
+ if (isObject(e)) {
2507
+ const t = e.timeZone;
2508
+ void 0 === t ? n = toTemporalTimeZoneIdentifier(e) : (n = toTemporalTimeZoneIdentifier(t), o = e.plainTime);
2509
+ } else n = toTemporalTimeZoneIdentifier(e);
2510
+ return createTemporalZonedDateTime(void 0 === o ? getStartOfDay(n, t.o) : getEpochNanosecondsFor(n, validateIsoDateTime(combineIsoDateAndTimeRecord(t.o, toTemporalTime(o))), g), n, t.U);
2511
+ }
2512
+ toString(e = void 0) {
2513
+ return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), getTemporalShowCalendarNameOption(getOptionsObject(e)));
2514
+ }
2515
+ toLocaleString(e = void 0, t = void 0) {
2516
+ return getInternalSlotOrThrowForPlainDate(this), formatDateTime(createDateTimeFormat(e, t, c), this);
2517
+ }
2518
+ toJSON() {
2519
+ return temporalDateToString(getInternalSlotOrThrowForPlainDate(this), U);
2520
+ }
2521
+ valueOf() {
2522
+ throwTypeError(Oe);
2523
+ }
2524
+ };
2525
+ defineStringTag(ut.prototype, "Temporal.PlainDate"), renameFunction(ut, "PlainDate");
2526
+ const Dt = {
2527
+ oe: "era",
2528
+ ne: "eraYear",
2529
+ t: "year",
2530
+ u: "month",
2531
+ P: "monthCode",
2532
+ T: "day",
2533
+ D: "hour",
2534
+ I: "minute",
2535
+ O: "second",
2536
+ S: "millisecond",
2537
+ F: "microsecond",
2538
+ v: "nanosecond",
2539
+ R: "offset",
2540
+ N: "timeZone"
2541
+ }, pt = [
2542
+ Dt.oe,
2543
+ Dt.ne,
2544
+ Dt.t,
2545
+ Dt.u,
2546
+ Dt.P,
2547
+ Dt.T,
2548
+ Dt.D,
2549
+ Dt.I,
2550
+ Dt.O,
2551
+ Dt.S,
2552
+ Dt.F,
2553
+ Dt.v,
2554
+ Dt.R,
2555
+ Dt.N
2556
+ ], ht = {
2557
+ [Dt.oe]: [toString],
2558
+ [Dt.ne]: [toIntegerWithTruncation],
2559
+ [Dt.t]: [toIntegerWithTruncation],
2560
+ [Dt.u]: [toPositiveIntegerWithTruncation],
2561
+ [Dt.P]: [(e) => createMonthCode(...parseMonthCode(e))],
2562
+ [Dt.T]: [toPositiveIntegerWithTruncation],
2563
+ [Dt.D]: [toIntegerWithTruncation, 0],
2564
+ [Dt.I]: [toIntegerWithTruncation, 0],
2565
+ [Dt.O]: [toIntegerWithTruncation, 0],
2566
+ [Dt.S]: [toIntegerWithTruncation, 0],
2567
+ [Dt.F]: [toIntegerWithTruncation, 0],
2568
+ [Dt.v]: [toIntegerWithTruncation, 0],
2569
+ [Dt.R]: [(e) => {
2570
+ const t = toPrimitive(e);
2571
+ return validateString(t), parseDateTimeUtcOffset(t), t;
2572
+ }],
2573
+ [Dt.N]: [toTemporalTimeZoneIdentifier]
2574
+ }, gt = /* @__PURE__ */ new WeakMap(), ft = signTimeDuration;
2575
+ var It = class {
2576
+ constructor(e = 0, t = 0, o = 0, n = 0, r = 0, a = 0, i = 0, l = 0, c = 0, s = 0) {
2577
+ createTemporalDuration(createTemporalDurationSlot([
2578
+ e,
2579
+ t,
2580
+ o,
2581
+ n,
2582
+ r,
2583
+ a,
2584
+ i,
2585
+ l,
2586
+ c,
2587
+ s
2588
+ ].map(toIntegerIfIntegral)), this);
2589
+ }
2590
+ static from(e) {
2591
+ return createTemporalDuration(toTemporalDuration(e));
2592
+ }
2593
+ static compare(e, t, o = void 0) {
2594
+ const n = toTemporalDuration(e), r = toTemporalDuration(t), a = getTemporalRelativeToOption(getOptionsObject(o));
2595
+ if (n.every((e, t) => r[t] === e)) return 0;
2596
+ const i = defaultTemporalLargestUnit(n), l = defaultTemporalLargestUnit(r), c = toInternalDurationRecord(n), s = toInternalDurationRecord(r);
2597
+ let d, m;
2598
+ return a.Pe && (isDateUnit(i) || isDateUnit(l)) ? compareEpochNanoseconds(addZonedDateTime(a.Pe, c, p), addZonedDateTime(a.Pe, s, p)) : (isCalendarUnit(i) || isCalendarUnit(l) ? (a.be || throwRangeError(missingField("relativeTo")), d = dateDurationDays(c.W, a.be), m = dateDurationDays(s.W, a.be)) : (d = n[Q], m = r[Q]), ye(add24HourDaysToTimeDuration(c.p, d), add24HourDaysToTimeDuration(s.p, m)));
2599
+ }
2600
+ get years() {
2601
+ return getInternalSlotOrThrowForDuration(this)[_];
2602
+ }
2603
+ get months() {
2604
+ return getInternalSlotOrThrowForDuration(this)[K];
2605
+ }
2606
+ get weeks() {
2607
+ return getInternalSlotOrThrowForDuration(this)[X];
2608
+ }
2609
+ get days() {
2610
+ return getInternalSlotOrThrowForDuration(this)[Q];
2611
+ }
2612
+ get hours() {
2613
+ return getInternalSlotOrThrowForDuration(this)[ee];
2614
+ }
2615
+ get minutes() {
2616
+ return getInternalSlotOrThrowForDuration(this)[te];
2617
+ }
2618
+ get seconds() {
2619
+ return getInternalSlotOrThrowForDuration(this)[oe];
2620
+ }
2621
+ get milliseconds() {
2622
+ return getInternalSlotOrThrowForDuration(this)[ne];
2623
+ }
2624
+ get microseconds() {
2625
+ return getInternalSlotOrThrowForDuration(this)[re];
2626
+ }
2627
+ get nanoseconds() {
2628
+ return getInternalSlotOrThrowForDuration(this)[ae];
2629
+ }
2630
+ get sign() {
2631
+ return durationSign(getInternalSlotOrThrowForDuration(this));
2632
+ }
2633
+ get blank() {
2634
+ return 0 === durationSign(getInternalSlotOrThrowForDuration(this));
2635
+ }
2636
+ with(e) {
2637
+ const t = getInternalSlotOrThrowForDuration(this);
2638
+ return createTemporalDuration(createTemporalDurationSlot(withArray(toTemporalPartialDurationRecord(e), t)));
2639
+ }
2640
+ negated() {
2641
+ return createTemporalDuration(applySignToDurationSlot(getInternalSlotOrThrowForDuration(this), -1));
2642
+ }
2643
+ abs() {
2644
+ return createTemporalDuration(createTemporalDurationSlot(getInternalSlotOrThrowForDuration(this).map(Math.abs)));
2645
+ }
2646
+ add(e) {
2647
+ return addDurations(1, getInternalSlotOrThrowForDuration(this), e);
2648
+ }
2649
+ subtract(e) {
2650
+ return addDurations(-1, getInternalSlotOrThrowForDuration(this), e);
2651
+ }
2652
+ round(e) {
2653
+ const t = getInternalSlotOrThrowForDuration(this), o = getRoundToOptionsObject(e);
2654
+ let n = getTemporalUnitValuedOption(o, "largestUnit", void 0);
2655
+ const r = getTemporalRelativeToOption(o), a = getRoundingIncrementOption(o), i = getRoundingModeOption(o, Z);
2656
+ let l = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2657
+ validateTemporalUnitValue(l, d);
2658
+ const c = void 0 !== l;
2659
+ l ??= G;
2660
+ const s = defaultTemporalLargestUnit(t), m = largerOfTwoTemporalUnits(s, l), T = void 0 !== n;
2661
+ if (void 0 !== n && "auto" !== n || (n = m), (!c && !T || n > l) && throwRangeError(he), isDateUnit(l) || validateTemporalRoundingIncrement(a, maximumTemporalDurationRoundingIncrement(l), !1), a > 1 && n !== l && isDateUnit(l) && throwRangeError(he), r.Pe) return createTemporalDuration(temporalDurationFromInternal(differenceZonedDateTimeWithRounding(r.Pe, createZonedDateTimeSlot(addZonedDateTime(r.Pe, toInternalDurationRecord(t), p), r.Pe.N, r.Pe.U), n, a, l, i), isDateUnit(n) ? B : n));
2662
+ if (r.be) {
2663
+ const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
2664
+ return createTemporalDuration(temporalDurationFromInternal(differencePlainDateTimeWithRounding(combineIsoDateAndTimeRecord(r.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(r.be.U, r.be.o, adjustDateDurationRecord(e.W, o.K), p), o), r.be.U, n, a, l, i), n));
2665
+ }
2666
+ (isCalendarUnit(s) || isCalendarUnit(n)) && throwRangeError(missingField("relativeTo"));
2667
+ const u = toInternalDurationRecordWith24HourDays(t);
2668
+ return createTemporalDuration(temporalDurationFromInternal(l === L ? combineDateAndTimeDuration(createDateDurationRecord(0, 0, 0, roundTimeDurationByDays(u.p, a, i)[0]), createTimeDurationFromSeconds(0)) : combineDateAndTimeDuration(zeroDateDuration(), roundTimeDuration(u.p, a, l, i)), n));
2669
+ }
2670
+ total(e) {
2671
+ const t = getInternalSlotOrThrowForDuration(this);
2672
+ void 0 === e && throwTypeError(Se);
2673
+ const o = "string" == typeof e ? createNullPrototypeObject({ unit: e }) : getOptionsObject(e), n = getTemporalRelativeToOption(o), r = getTemporalUnitValuedOption(o, "unit", u);
2674
+ if (validateTemporalUnitValue(r, d), n.Pe) return ((e, t, o) => isDateUnit(o) ? totalRelativeDuration(differenceZonedDateTime(e, t, o), e.Y, t.Y, getIsoDateTimeForZonedDateTimeSlot(e), e.N, e.U, o) : totalTimeDuration(timeDurationFromEpochNanosecondsDifference(t.Y, e.Y), o))(n.Pe, createZonedDateTimeSlot(addZonedDateTime(n.Pe, toInternalDurationRecord(t), p), n.Pe.N, n.Pe.U), r);
2675
+ if (n.be) {
2676
+ const e = toInternalDurationRecordWith24HourDays(t), o = addTime(midnightTimeRecord(), e.p);
2677
+ return ((e, t, o, n) => compareIsoDateTime(e, t) ? (validateIsoDateTime(e), validateIsoDateTime(t), totalRelativeDuration(differenceISODateTime(e, t, o, n), getUtcEpochNanoseconds(e), getUtcEpochNanoseconds(t), e, void 0, 0, n)) : 0)(combineIsoDateAndTimeRecord(n.be.o, midnightTimeRecord()), combineIsoDateAndTimeRecord(calendarDateAdd(n.be.U, n.be.o, adjustDateDurationRecord(e.W, o.K), p), o), n.be.U, r);
2678
+ }
2679
+ return (isCalendarUnit(defaultTemporalLargestUnit(t)) || isCalendarUnit(r)) && throwRangeError(missingField("relativeTo")), totalTimeDuration(toInternalDurationRecordWith24HourDays(t).p, r);
2680
+ }
2681
+ toString(e = void 0) {
2682
+ const t = getInternalSlotOrThrowForDuration(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, P), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0);
2683
+ validateTemporalUnitValue(a, s), a !== B && a !== q || throwRangeError(disallowedUnit(a));
2684
+ const i = toSecondsStringPrecisionRecord(a, n);
2685
+ if (i.ye === G && 1 === i.Ee) return temporalDurationToString(t, i.ve);
2686
+ const l = toInternalDurationRecord(t);
2687
+ return temporalDurationToString(temporalDurationFromInternal(combineDateAndTimeDuration(l.W, roundTimeDuration(l.p, i.Ee, i.ye, r)), largerOfTwoTemporalUnits(defaultTemporalLargestUnit(t), J)), i.ve);
2688
+ }
2689
+ toJSON() {
2690
+ return temporalDurationToString(getInternalSlotOrThrowForDuration(this));
2691
+ }
2692
+ toLocaleString(e = void 0, t = void 0) {
2693
+ const o = getInternalSlotOrThrowForDuration(this), n = createNullPrototypeObject({});
2694
+ return le.map((e, t) => {
2695
+ n[e] = o[t];
2696
+ }), new Intl.DurationFormat(e, t).format(n);
2697
+ }
2698
+ valueOf() {
2699
+ throwTypeError(Oe);
2700
+ }
2701
+ };
2702
+ defineStringTag(It.prototype, "Temporal.Duration"), renameFunction(It, "Duration");
2703
+ const Ot = {
2704
+ [v]: Math.ceil,
2705
+ [y]: Math.floor,
2706
+ [E]: roundExpand,
2707
+ [P]: Math.trunc,
2708
+ [b]: roundHalfCeil,
2709
+ [R]: roundHalfFloor,
2710
+ [Z]: (e) => (isIntegerAndHalf(e) ? roundExpand(e) : Math.round(e)) + 0,
2711
+ [N]: (e) => (isIntegerAndHalf(e) ? Math.trunc(e) : Math.round(e)) + 0,
2712
+ [M]: roundHalfEven
2713
+ }, St = {
2714
+ [v]: Math.ceil,
2715
+ [y]: Math.floor,
2716
+ [E]: Math.ceil,
2717
+ [P]: Math.floor,
2718
+ [b]: roundHalfCeil,
2719
+ [R]: roundHalfFloor,
2720
+ [Z]: roundHalfCeil,
2721
+ [N]: roundHalfFloor,
2722
+ [M]: roundHalfEven
2723
+ }, Ft = globalThis.Intl.DateTimeFormat, wt = [];
2724
+ new Ft(void 0, new Proxy({}, { get(e, t) {
2725
+ wt.push(t);
2726
+ } }));
2727
+ const vt = /* @__PURE__ */ new WeakMap(), yt = [
2728
+ "year",
2729
+ "month",
2730
+ "day",
2731
+ "weekday",
2732
+ "dateStyle"
2733
+ ], Et = [
2734
+ "hour",
2735
+ "minute",
2736
+ "second",
2737
+ "fractionalSecondDigits",
2738
+ "dayPeriod",
2739
+ "timeStyle"
2740
+ ];
2741
+ var Pt = class {
2742
+ Ae(e) {
2743
+ return formatDateTime(this, e);
2744
+ }
2745
+ }, bt = class {
2746
+ constructor(e, t) {
2747
+ createDateTimeFormat(e, t, d, void 0, this);
2748
+ }
2749
+ get format() {
2750
+ return Object.defineProperty(getInternalSlotOrThrowForDateTimeFormat(this).We ||= Pt.prototype.Ae.bind(this), "name", { value: "" });
2751
+ }
2752
+ formatToParts(e) {
2753
+ return ((e, t) => {
2754
+ const [o, n] = handleDateTimeValue(getInternalSlotOrThrowForDateTimeFormat(e), t);
2755
+ return o.formatToParts(n);
2756
+ })(this, e);
2757
+ }
2758
+ formatRange(e, t) {
2759
+ return void 0 !== e && void 0 !== t || throwTypeError(fe), ((e, t, o) => {
2760
+ const n = getInternalSlotOrThrowForDateTimeFormat(e);
2761
+ validateSameTemporalType(t, o);
2762
+ const [r, a] = handleDateTimeValue(n, t);
2763
+ return r.formatRange(a, handleDateTimeValue(n, o)[1]);
2764
+ })(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
2765
+ }
2766
+ formatRangeToParts(e, t) {
2767
+ return void 0 !== e && void 0 !== t || throwTypeError(fe), ((e, t, o) => {
2768
+ const n = getInternalSlotOrThrowForDateTimeFormat(e);
2769
+ validateSameTemporalType(t, o);
2770
+ const [r, a] = handleDateTimeValue(n, t);
2771
+ return r.formatRangeToParts(a, handleDateTimeValue(n, o)[1]);
2772
+ })(this, toDateTimeFormattable(e), toDateTimeFormattable(t));
2773
+ }
2774
+ resolvedOptions() {
2775
+ return getInternalSlotOrThrowForDateTimeFormat(this).Re.resolvedOptions();
2776
+ }
2777
+ };
2778
+ const Rt = Object.getOwnPropertyDescriptors(Intl.DateTimeFormat);
2779
+ Rt.prototype.value = bt.prototype, Object.defineProperties(DateTimeFormat, Rt), DateTimeFormat.prototype.constructor = DateTimeFormat, defineStringTag(DateTimeFormat.prototype, "Intl.DateTimeFormat");
2780
+ const Zt = /* @__PURE__ */ new WeakMap();
2781
+ var Nt = class {
2782
+ constructor(e) {
2783
+ createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))), this);
2784
+ }
2785
+ static from(e) {
2786
+ return toTemporalInstant$1(e);
2787
+ }
2788
+ static fromEpochMilliseconds(e) {
2789
+ return createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromEpochMilliseconds(toIntegerIfIntegral(e))));
2790
+ }
2791
+ static fromEpochNanoseconds(e) {
2792
+ return createTemporalInstant(validateEpochNanoseconds(createEpochNanosecondsFromBigInt(toBigInt(e))));
2793
+ }
2794
+ static compare(e, t) {
2795
+ return compareEpochNanoseconds(getInternalSlotOrThrowForInstant(toTemporalInstant$1(e)).Y, getInternalSlotOrThrowForInstant(toTemporalInstant$1(t)).Y);
2796
+ }
2797
+ get epochMilliseconds() {
2798
+ return epochMilliseconds(getInternalSlotOrThrowForInstant(this).Y);
2799
+ }
2800
+ get epochNanoseconds() {
2801
+ return convertEpochNanosecondsToBigInt(getInternalSlotOrThrowForInstant(this).Y);
2802
+ }
2803
+ add(e) {
2804
+ return addDurationToInstant(1, getInternalSlotOrThrowForInstant(this), e);
2805
+ }
2806
+ subtract(e) {
2807
+ return addDurationToInstant(-1, getInternalSlotOrThrowForInstant(this), e);
2808
+ }
2809
+ until(e, t = void 0) {
2810
+ return differenceTemporalInstant(1, getInternalSlotOrThrowForInstant(this), e, t);
2811
+ }
2812
+ since(e, t = void 0) {
2813
+ return differenceTemporalInstant(-1, getInternalSlotOrThrowForInstant(this), e, t);
2814
+ }
2815
+ round(e) {
2816
+ const t = getInternalSlotOrThrowForInstant(this), o = getRoundToOptionsObject(e), n = getRoundingIncrementOption(o), r = getRoundingModeOption(o, Z), a = getTemporalUnitValuedOption(o, "smallestUnit", u);
2817
+ return validateTemporalUnitValue(a, s), validateTemporalRoundingIncrement(n, i / nanosecondsForTimeUnit(a), !0), createTemporalInstant(roundTemporalInstant(t.Y, n, a, r));
2818
+ }
2819
+ equals(e) {
2820
+ return !compareEpochNanoseconds(getInternalSlotOrThrowForInstant(this).Y, getInternalSlotOrThrowForInstant(toTemporalInstant$1(e)).Y);
2821
+ }
2822
+ toString(e = void 0) {
2823
+ const t = getInternalSlotOrThrowForInstant(this), o = getOptionsObject(e), n = getTemporalFractionalSecondDigitsOption(o), r = getRoundingModeOption(o, P), a = getTemporalUnitValuedOption(o, "smallestUnit", void 0), i = o.timeZone;
2824
+ validateTemporalUnitValue(a, s), a === B && throwRangeError(invalidField("smallestUnit"));
2825
+ const l = mapUnlessUndefined(i, toTemporalTimeZoneIdentifier), c = toSecondsStringPrecisionRecord(a, n);
2826
+ return temporalInstantToString(roundTemporalInstant(t.Y, c.Ee, c.ye, r), l, c.ve);
2827
+ }
2828
+ toLocaleString(e = void 0, t = void 0) {
2829
+ return getInternalSlotOrThrowForInstant(this), formatDateTime(createDateTimeFormat(e, t, d), this);
2830
+ }
2831
+ toJSON() {
2832
+ return temporalInstantToString(getInternalSlotOrThrowForInstant(this).Y);
2833
+ }
2834
+ valueOf() {
2835
+ throwTypeError(Oe);
2836
+ }
2837
+ toZonedDateTimeISO(e) {
2838
+ return createTemporalZonedDateTime(getInternalSlotOrThrowForInstant(this).Y, toTemporalTimeZoneIdentifier(e), "iso8601");
2839
+ }
2840
+ };
2841
+ defineStringTag(Nt.prototype, "Temporal.Instant"), renameFunction(Nt, "Instant");
2842
+ const Mt = class {
2843
+ toTemporalInstant() {
2844
+ const e = Date.prototype.valueOf.call(this);
2845
+ return isNaN(e) && throwRangeError("invalid date"), createTemporalInstant(createEpochNanosecondsFromEpochMilliseconds(e));
2846
+ }
2847
+ }.prototype.toTemporalInstant, Ut = Object.getOwnPropertyDescriptors(globalThis.Intl);
2848
+ Ut.DateTimeFormat.value = DateTimeFormat;
2849
+ const jt = {};
2850
+ Object.defineProperties(jt, Ut);
2851
+ const $t = {
2852
+ timeZoneId: () => systemTimeZoneIdentifier(),
2853
+ instant: () => createTemporalInstant(systemUtcEpochNanoseconds()),
2854
+ plainDateTimeISO: (e = void 0) => createTemporalDateTime(systemDateTime(e), "iso8601"),
2855
+ zonedDateTimeISO: (e = systemTimeZoneIdentifier()) => createTemporalZonedDateTime(systemUtcEpochNanoseconds(), toTemporalTimeZoneIdentifier(e), "iso8601"),
2856
+ plainDateISO: (e = void 0) => createTemporalDate(systemDateTime(e).o, "iso8601"),
2857
+ plainTimeISO: (e = void 0) => createTemporalTime(systemDateTime(e).p)
2858
+ };
2859
+ defineStringTag($t, "Temporal.Now"), makePropertiesNonEnumerable($t);
2860
+ const Ct = {
2861
+ Instant: Nt,
2862
+ PlainDateTime: Ne,
2863
+ PlainDate: ut,
2864
+ PlainTime: Ue,
2865
+ PlainYearMonth: mt,
2866
+ PlainMonthDay: st,
2867
+ Duration: It,
2868
+ ZonedDateTime: Pe,
2869
+ Now: $t
2870
+ };
2871
+ defineStringTag(Ct, "Temporal"), makePropertiesNonEnumerable(Ct);
2872
+ export { defineNonEnumerableProperty as i, jt as n, Mt as r, Ct as t };