@fedify/redis 2.4.0-dev.1583 → 2.4.0-dev.1599

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,854 @@
1
+
2
+ const require_utils = require("../../../../temporal-utils@1.0.1/node_modules/temporal-utils/dist/utils.cjs");
3
+ const require_internal = require("./internal.cjs");
4
+ const require_apiHelpers = require("./apiHelpers.cjs");
5
+ //#region ../../node_modules/.pnpm/temporal-polyfill@1.0.1/node_modules/temporal-polyfill/chunks/classApi-basic.js
6
+ function resolveBasicCalendarId(rawCalendarId) {
7
+ const lowerRawCalendarId = require_internal.requireString(rawCalendarId).toLowerCase();
8
+ return lowerRawCalendarId === "iso8601" ? void 0 : lowerRawCalendarId === "gregory" ? 0 : void require_internal.throwRangeError(require_internal.exoticCalendarRequired(rawCalendarId, "temporal-polyfill/full"));
9
+ }
10
+ function resolveBasicCalendarArg(rawCalendarId = require_internal.isoCalendarId) {
11
+ return resolveBasicCalendarId(rawCalendarId);
12
+ }
13
+ const zonedDateTimeSlotsMap = /* @__PURE__ */ new WeakMap();
14
+ const ZonedDateTime = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.ZonedDateTimeBranding, class {
15
+ constructor(epochNanoseconds, timeZoneId, calendar = void 0) {
16
+ const epochNano = require_internal.checkEpochNanoInBounds(require_internal.toBigInt(epochNanoseconds));
17
+ const timeZone = require_internal.queryTimeZone(require_internal.refineTimeZoneId(timeZoneId));
18
+ const calendarImpl = resolveBasicCalendarArg(calendar);
19
+ initZonedDateTime(this, require_internal.createZonedEpochNanoSlots(epochNano, timeZone, calendarImpl));
20
+ }
21
+ static from(arg, options = void 0) {
22
+ return createZonedDateTime(toZonedDateTimeSlots(arg, options));
23
+ }
24
+ static compare(arg0, arg1) {
25
+ return require_internal.compareZonedDateTimes(toZonedDateTimeSlots(arg0), toZonedDateTimeSlots(arg1));
26
+ }
27
+ get calendarId() {
28
+ return require_internal.getCalendarSlotId(getZonedDateTimeSlots(this).calendar);
29
+ }
30
+ get timeZoneId() {
31
+ return getZonedDateTimeSlots(this).timeZone.id;
32
+ }
33
+ get epochMilliseconds() {
34
+ return require_internal.getEpochMilli(getZonedDateTimeSlots(this));
35
+ }
36
+ get epochNanoseconds() {
37
+ return require_internal.getEpochNano(getZonedDateTimeSlots(this));
38
+ }
39
+ get offset() {
40
+ return require_internal.formatOffsetNano(require_internal.zonedEpochSlotsToIso(getZonedDateTimeSlots(this)).offsetNanoseconds);
41
+ }
42
+ get offsetNanoseconds() {
43
+ return require_internal.zonedEpochSlotsToIso(getZonedDateTimeSlots(this)).offsetNanoseconds;
44
+ }
45
+ get hoursInDay() {
46
+ return require_internal.computeZonedHoursInDay(getZonedDateTimeSlots(this));
47
+ }
48
+ with(mod, options = void 0) {
49
+ return createZonedDateTime(require_internal.mergeZonedDateTimeFields(getZonedDateTimeSlots(this), validateBag(mod), options));
50
+ }
51
+ withCalendar(calendarArg) {
52
+ return createZonedDateTime({
53
+ ...getZonedDateTimeSlots(this),
54
+ calendar: refineCalendarArg(calendarArg)
55
+ });
56
+ }
57
+ withTimeZone(timeZoneArg) {
58
+ return createZonedDateTime({
59
+ ...getZonedDateTimeSlots(this),
60
+ timeZone: require_internal.queryTimeZone(refineTimeZoneArg(timeZoneArg))
61
+ });
62
+ }
63
+ withPlainTime(plainTimeArg = void 0) {
64
+ return createZonedDateTime(require_internal.zonedDateTimeWithPlainTime(getZonedDateTimeSlots(this), optionalToPlainTimeFields(plainTimeArg)));
65
+ }
66
+ add(durationArg, options = void 0) {
67
+ return createZonedDateTime(require_internal.moveZonedEpochSlots(getZonedDateTimeSlots(this), toDurationSlots(durationArg), options));
68
+ }
69
+ subtract(durationArg, options = void 0) {
70
+ return createZonedDateTime(require_internal.moveZonedEpochSlots(getZonedDateTimeSlots(this), require_internal.negateDurationFields(toDurationSlots(durationArg)), options));
71
+ }
72
+ until(otherArg, options = void 0) {
73
+ const slots = getZonedDateTimeSlots(this);
74
+ const other = toZonedDateTimeSlots(otherArg);
75
+ return createDuration(require_internal.createDurationSlots(require_internal.diffZonedDateTimes(0, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options)));
76
+ }
77
+ since(otherArg, options = void 0) {
78
+ const slots = getZonedDateTimeSlots(this);
79
+ const other = toZonedDateTimeSlots(otherArg);
80
+ return createDuration(require_internal.createDurationSlots(require_internal.diffZonedDateTimes(1, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options)));
81
+ }
82
+ round(options) {
83
+ const slots = getZonedDateTimeSlots(this);
84
+ const [smallestUnit, roundingInc, roundingMode] = require_internal.refineRoundingOptions(options);
85
+ return createZonedDateTime(require_internal.roundZonedEpochSlotsToUnit(slots, smallestUnit, roundingInc, roundingMode));
86
+ }
87
+ startOfDay() {
88
+ return createZonedDateTime(require_internal.computeZonedStartOfDay(getZonedDateTimeSlots(this)));
89
+ }
90
+ equals(otherArg) {
91
+ return require_internal.zonedDateTimesEqual(getZonedDateTimeSlots(this), toZonedDateTimeSlots(otherArg));
92
+ }
93
+ toInstant() {
94
+ return createInstant(require_internal.zonedDateTimeToInstant(getZonedDateTimeSlots(this)));
95
+ }
96
+ toPlainDateTime() {
97
+ return createPlainDateTime(require_internal.zonedDateTimeToPlainDateTime(getZonedDateTimeSlots(this)));
98
+ }
99
+ toPlainDate() {
100
+ return createPlainDate(require_internal.zonedDateTimeToPlainDate(getZonedDateTimeSlots(this)));
101
+ }
102
+ toPlainTime() {
103
+ return createPlainTime(require_internal.zonedDateTimeToPlainTime(getZonedDateTimeSlots(this)));
104
+ }
105
+ toLocaleString(locales = void 0, options = {}) {
106
+ const slots = getZonedDateTimeSlots(this);
107
+ const format = new require_internal.RawDateTimeFormat(locales, require_internal.applyZonedFormatTimeZone(require_internal.transformZonedOptions(options), require_internal.getZonedTimeZoneId(slots)));
108
+ return require_internal.checkResolvedCalendarCompatible(format, slots), format.format(require_internal.getEpochMilli(slots));
109
+ }
110
+ toString(options = void 0) {
111
+ return require_internal.formatZonedDateTimeIso(getZonedDateTimeSlots(this), options);
112
+ }
113
+ toJSON() {
114
+ return require_internal.formatZonedDateTimeIso(getZonedDateTimeSlots(this));
115
+ }
116
+ getTimeZoneTransition(options) {
117
+ const slots = getZonedDateTimeSlots(this);
118
+ const newEpochNano = require_internal.getTimeZoneTransitionEpochNanoseconds(slots, options);
119
+ return newEpochNano ? createZonedDateTime({
120
+ ...slots,
121
+ epochNanoseconds: newEpochNano
122
+ }) : null;
123
+ }
124
+ valueOf() {
125
+ return require_apiHelpers.forbiddenValueOf();
126
+ }
127
+ }, getZonedDateTimeIsoSlots, require_apiHelpers.dateFieldGetters$1, require_apiHelpers.dateDerivedGetters, require_internal.timeGetters);
128
+ function createZonedDateTime(slots) {
129
+ return initZonedDateTime(Object.create(ZonedDateTime.prototype), slots);
130
+ }
131
+ function getZonedDateTimeSlots(obj) {
132
+ return getZonedDateTimeSlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
133
+ }
134
+ function getZonedDateTimeIsoSlots(obj) {
135
+ const slots = getZonedDateTimeSlots(obj);
136
+ return {
137
+ ...require_internal.zonedEpochSlotsToIso(slots),
138
+ calendar: slots.calendar
139
+ };
140
+ }
141
+ function getZonedDateTimeSlotsIfPresent(obj) {
142
+ return zonedDateTimeSlotsMap.get(obj);
143
+ }
144
+ function toZonedDateTimeSlots(arg, options) {
145
+ if (require_internal.isObjectLike(arg)) {
146
+ const ownSlots = getZonedDateTimeSlotsIfPresent(arg);
147
+ if (ownSlots) return require_internal.refineZonedFieldOptions(options), ownSlots;
148
+ return require_internal.refineZonedDateTimeObjectLike(refineTimeZoneArg, getCalendarFromBag(arg), arg, options);
149
+ }
150
+ return require_internal.parseZonedDateTime(arg, resolveBasicCalendarId, options);
151
+ }
152
+ function initZonedDateTime(instance, slots) {
153
+ return zonedDateTimeSlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
154
+ }
155
+ function refineTimeZoneArg(arg) {
156
+ if (require_internal.isObjectLike(arg)) {
157
+ const slots = getZonedDateTimeSlotsIfPresent(arg);
158
+ return slots || require_internal.throwTypeError(require_internal.invalidTimeZone(arg)), slots.timeZone.id;
159
+ }
160
+ return ((arg) => require_internal.resolveTimeZoneId(require_internal.parseTimeZoneId(require_internal.requireString(arg))))(arg);
161
+ }
162
+ const instantSlotsMap = /* @__PURE__ */ new WeakMap();
163
+ const Instant = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.InstantBranding, class {
164
+ constructor(epochNanoseconds) {
165
+ const epochNano = require_internal.checkEpochNanoInBounds(require_internal.toBigInt(epochNanoseconds));
166
+ initInstant(this, require_internal.createEpochNanoSlots(epochNano));
167
+ }
168
+ static from(arg) {
169
+ return createInstant(toInstantSlots(arg));
170
+ }
171
+ static fromEpochMilliseconds(epochMilli) {
172
+ return createInstant(require_internal.epochMilliToInstant(epochMilli));
173
+ }
174
+ static fromEpochNanoseconds(epochNano) {
175
+ return createInstant(require_internal.epochNanoToInstant(epochNano));
176
+ }
177
+ static compare(a, b) {
178
+ return require_internal.compareInstants(toInstantSlots(a), toInstantSlots(b));
179
+ }
180
+ get epochMilliseconds() {
181
+ return require_internal.getEpochMilli(getInstantSlots(this));
182
+ }
183
+ get epochNanoseconds() {
184
+ return require_internal.getEpochNano(getInstantSlots(this));
185
+ }
186
+ add(durationArg) {
187
+ return createInstant(require_internal.createEpochNanoSlots(require_internal.moveEpochNano(getInstantSlots(this).epochNanoseconds, toDurationSlots(durationArg))));
188
+ }
189
+ subtract(durationArg) {
190
+ return createInstant(require_internal.createEpochNanoSlots(require_internal.moveEpochNano(getInstantSlots(this).epochNanoseconds, require_internal.negateDurationFields(toDurationSlots(durationArg)))));
191
+ }
192
+ until(otherArg, options = void 0) {
193
+ return createDuration(require_internal.diffInstants(0, getInstantSlots(this), toInstantSlots(otherArg), options));
194
+ }
195
+ since(otherArg, options = void 0) {
196
+ return createDuration(require_internal.diffInstants(1, getInstantSlots(this), toInstantSlots(otherArg), options));
197
+ }
198
+ round(options) {
199
+ const slots = getInstantSlots(this);
200
+ const [smallestUnit, roundingInc, roundingMode] = require_internal.refineRoundingOptions(options, 5, 1);
201
+ return createInstant(require_internal.createEpochNanoSlots(require_internal.roundBigNanoToDayOriginInc(slots.epochNanoseconds, require_internal.computeBigNanoInc(smallestUnit, roundingInc), roundingMode)));
202
+ }
203
+ equals(otherArg) {
204
+ return require_internal.instantsEqual(getInstantSlots(this), toInstantSlots(otherArg));
205
+ }
206
+ toZonedDateTimeISO(timeZoneArg) {
207
+ return createZonedDateTime(require_internal.instantToZonedDateTime(getInstantSlots(this), require_internal.queryTimeZone(refineTimeZoneArg(timeZoneArg))));
208
+ }
209
+ toLocaleString(locales = void 0, options = {}) {
210
+ const slots = getInstantSlots(this);
211
+ return new require_internal.RawDateTimeFormat(locales, require_internal.transformInstantOptions(options)).format(require_internal.getEpochMilli(slots));
212
+ }
213
+ toString(options = void 0) {
214
+ return require_internal.formatInstantIso(refineTimeZoneArg, getInstantSlots(this), options);
215
+ }
216
+ toJSON() {
217
+ return require_internal.formatInstantIso(refineTimeZoneArg, getInstantSlots(this));
218
+ }
219
+ valueOf() {
220
+ return require_apiHelpers.forbiddenValueOf();
221
+ }
222
+ });
223
+ function createInstant(slots) {
224
+ return initInstant(Object.create(Instant.prototype), slots);
225
+ }
226
+ function getInstantSlots(obj) {
227
+ return getInstantSlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
228
+ }
229
+ function getInstantSlotsIfPresent(obj) {
230
+ return instantSlotsMap.get(obj);
231
+ }
232
+ function toInstantSlots(arg) {
233
+ if (require_internal.isObjectLike(arg)) {
234
+ const ownSlots = getInstantSlotsIfPresent(arg);
235
+ if (ownSlots) return ownSlots;
236
+ const zonedDateTimeSlots = getZonedDateTimeSlotsIfPresent(arg);
237
+ if (zonedDateTimeSlots) return require_internal.createEpochNanoSlots(zonedDateTimeSlots.epochNanoseconds);
238
+ }
239
+ return require_internal.parseInstant(arg);
240
+ }
241
+ const { toTemporalInstant } = { toTemporalInstant() {
242
+ const epochMilli = Date.prototype.valueOf.call(this);
243
+ return createInstant(require_internal.createEpochNanoSlots(BigInt(require_internal.requireNumberIsInteger(epochMilli)) * require_internal.bigNanoInMilli));
244
+ } };
245
+ function initInstant(instance, slots) {
246
+ return instantSlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
247
+ }
248
+ const plainMonthDaySlotsMap = /* @__PURE__ */ new WeakMap();
249
+ const PlainMonthDay = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.PlainMonthDayBranding, class {
250
+ constructor(isoMonth, isoDay, calendar = void 0, referenceIsoYear) {
251
+ const isoMonthInt = require_utils.toIntegerWithTrunc(isoMonth);
252
+ const isoDayInt = require_utils.toIntegerWithTrunc(isoDay);
253
+ const calendarImpl = resolveBasicCalendarArg(calendar);
254
+ const fields = require_internal.checkIsoDateInBounds(require_internal.validateIsoDateFields({
255
+ year: require_utils.toIntegerWithTrunc(referenceIsoYear ?? 1972),
256
+ month: isoMonthInt,
257
+ day: isoDayInt
258
+ }));
259
+ initPlainMonthDay(this, require_internal.createDateSlots(fields, calendarImpl));
260
+ }
261
+ static from(arg, options = void 0) {
262
+ return createPlainMonthDay(toPlainMonthDaySlots(arg, options));
263
+ }
264
+ get calendarId() {
265
+ return require_internal.getCalendarSlotId(getPlainMonthDaySlots(this).calendar);
266
+ }
267
+ with(mod, options = void 0) {
268
+ return createPlainMonthDay(require_internal.mergePlainMonthDayFields(getPlainMonthDaySlots(this), validateBag(mod), options));
269
+ }
270
+ equals(otherArg) {
271
+ return require_internal.plainMonthDaysEqual(getPlainMonthDaySlots(this), toPlainMonthDaySlots(otherArg));
272
+ }
273
+ toPlainDate(bag) {
274
+ return createPlainDate(require_internal.convertPlainMonthDayToDate(getPlainMonthDaySlots(this).calendar, this, bag));
275
+ }
276
+ toLocaleString(locales = void 0, options = {}) {
277
+ const slots = getPlainMonthDaySlots(this);
278
+ const format = new require_internal.RawDateTimeFormat(locales, require_internal.applyPlainFormatTimeZone(require_internal.transformMonthDayOptions(options)));
279
+ return require_internal.checkResolvedCalendarCompatible(format, slots, 1), format.format(require_internal.isoDateToEpochMilli(slots));
280
+ }
281
+ toString(options = void 0) {
282
+ return require_internal.formatPlainMonthDayIso(getPlainMonthDaySlots(this), options);
283
+ }
284
+ toJSON() {
285
+ return require_internal.formatPlainMonthDayIso(getPlainMonthDaySlots(this));
286
+ }
287
+ valueOf() {
288
+ return require_apiHelpers.forbiddenValueOf();
289
+ }
290
+ }, getPlainMonthDaySlots, require_apiHelpers.monthDayFieldGetters$1);
291
+ function createPlainMonthDay(slots) {
292
+ return initPlainMonthDay(Object.create(PlainMonthDay.prototype), slots);
293
+ }
294
+ function getPlainMonthDaySlots(obj) {
295
+ return getPlainMonthDaySlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
296
+ }
297
+ function getPlainMonthDaySlotsIfPresent(obj) {
298
+ return plainMonthDaySlotsMap.get(obj);
299
+ }
300
+ function toPlainMonthDaySlots(arg, options) {
301
+ if (require_internal.isObjectLike(arg)) {
302
+ const ownSlots = getPlainMonthDaySlotsIfPresent(arg);
303
+ if (ownSlots) return require_internal.refineOverflowOptions(options), ownSlots;
304
+ const calendarMaybe = extractCalendarFromBag(arg);
305
+ return require_internal.refinePlainMonthDayObjectLike(void 0 === calendarMaybe ? void 0 : calendarMaybe, void 0 === calendarMaybe, arg, options);
306
+ }
307
+ const res = require_internal.parsePlainMonthDay(arg, resolveBasicCalendarId);
308
+ return require_internal.refineOverflowOptions(options), res;
309
+ }
310
+ function initPlainMonthDay(instance, slots) {
311
+ return plainMonthDaySlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
312
+ }
313
+ const plainYearMonthSlotsMap = /* @__PURE__ */ new WeakMap();
314
+ const PlainYearMonth = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.PlainYearMonthBranding, class {
315
+ constructor(isoYear, isoMonth, calendar = void 0, referenceIsoDay) {
316
+ const isoYearInt = require_utils.toIntegerWithTrunc(isoYear);
317
+ const isoMonthInt = require_utils.toIntegerWithTrunc(isoMonth);
318
+ const calendarImpl = resolveBasicCalendarArg(calendar);
319
+ const fields = require_internal.checkIsoYearMonthInBounds(require_internal.validateIsoDateFields({
320
+ year: isoYearInt,
321
+ month: isoMonthInt,
322
+ day: require_utils.toIntegerWithTrunc(referenceIsoDay ?? 1)
323
+ }));
324
+ initPlainYearMonth(this, require_internal.createDateSlots(fields, calendarImpl));
325
+ }
326
+ static from(arg, options = void 0) {
327
+ return createPlainYearMonth(toPlainYearMonthSlots(arg, options));
328
+ }
329
+ static compare(arg0, arg1) {
330
+ return require_internal.compareIsoDateFields(toPlainYearMonthSlots(arg0), toPlainYearMonthSlots(arg1));
331
+ }
332
+ get calendarId() {
333
+ return require_internal.getCalendarSlotId(getPlainYearMonthSlots(this).calendar);
334
+ }
335
+ with(mod, options = void 0) {
336
+ return createPlainYearMonth(require_internal.mergePlainYearMonthFields(getPlainYearMonthSlots(this), validateBag(mod), options));
337
+ }
338
+ add(durationArg, options = void 0) {
339
+ const slots = getPlainYearMonthSlots(this);
340
+ return createPlainYearMonth(require_internal.createDateSlots(require_internal.moveYearMonth(0, slots.calendar, slots, toDurationSlots(durationArg), options), slots.calendar));
341
+ }
342
+ subtract(durationArg, options = void 0) {
343
+ const slots = getPlainYearMonthSlots(this);
344
+ return createPlainYearMonth(require_internal.createDateSlots(require_internal.moveYearMonth(1, slots.calendar, slots, toDurationSlots(durationArg), options), slots.calendar));
345
+ }
346
+ until(otherArg, options = void 0) {
347
+ const slots = getPlainYearMonthSlots(this);
348
+ const other = toPlainYearMonthSlots(otherArg);
349
+ return createDuration(require_internal.diffPlainYearMonth(0, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options));
350
+ }
351
+ since(otherArg, options = void 0) {
352
+ const slots = getPlainYearMonthSlots(this);
353
+ const other = toPlainYearMonthSlots(otherArg);
354
+ return createDuration(require_internal.diffPlainYearMonth(1, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options));
355
+ }
356
+ equals(otherArg) {
357
+ return require_internal.plainYearMonthsEqual(getPlainYearMonthSlots(this), toPlainYearMonthSlots(otherArg));
358
+ }
359
+ toPlainDate(bag) {
360
+ return createPlainDate(require_internal.convertPlainYearMonthToDate(getPlainYearMonthSlots(this).calendar, this, bag));
361
+ }
362
+ toLocaleString(locales = void 0, options = {}) {
363
+ const slots = getPlainYearMonthSlots(this);
364
+ const format = new require_internal.RawDateTimeFormat(locales, require_internal.applyPlainFormatTimeZone(require_internal.transformYearMonthOptions(options)));
365
+ return require_internal.checkResolvedCalendarCompatible(format, slots, 1), format.format(require_internal.isoDateToEpochMilli(slots));
366
+ }
367
+ toString(options = void 0) {
368
+ return require_internal.formatPlainYearMonthIso(getPlainYearMonthSlots(this), options);
369
+ }
370
+ toJSON() {
371
+ return require_internal.formatPlainYearMonthIso(getPlainYearMonthSlots(this));
372
+ }
373
+ valueOf() {
374
+ return require_apiHelpers.forbiddenValueOf();
375
+ }
376
+ }, getPlainYearMonthSlots, require_apiHelpers.yearMonthFieldGetters$1, require_apiHelpers.yearMonthDerivedGetters);
377
+ function createPlainYearMonth(slots) {
378
+ return initPlainYearMonth(Object.create(PlainYearMonth.prototype), slots);
379
+ }
380
+ function getPlainYearMonthSlots(obj) {
381
+ return getPlainYearMonthSlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
382
+ }
383
+ function getPlainYearMonthSlotsIfPresent(obj) {
384
+ return plainYearMonthSlotsMap.get(obj);
385
+ }
386
+ function toPlainYearMonthSlots(arg, options) {
387
+ if (require_internal.isObjectLike(arg)) {
388
+ const ownSlots = getPlainYearMonthSlotsIfPresent(arg);
389
+ if (ownSlots) return require_internal.refineOverflowOptions(options), ownSlots;
390
+ return require_internal.refinePlainYearMonthObjectLike(getCalendarFromBag(arg), arg, options);
391
+ }
392
+ const res = require_internal.parsePlainYearMonth(arg, resolveBasicCalendarId);
393
+ return require_internal.refineOverflowOptions(options), res;
394
+ }
395
+ function initPlainYearMonth(instance, slots) {
396
+ return plainYearMonthSlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
397
+ }
398
+ function getTemporalBrandingAndSlots(obj) {
399
+ if (!require_internal.isObjectLike(obj)) return;
400
+ let slots = getInstantSlotsIfPresent(obj);
401
+ return slots ? [require_apiHelpers.InstantBranding, slots] : (slots = getZonedDateTimeSlotsIfPresent(obj), slots ? [require_apiHelpers.ZonedDateTimeBranding, slots] : (slots = getPlainDateTimeSlotsIfPresent(obj), slots ? [require_apiHelpers.PlainDateTimeBranding, slots] : (slots = getPlainDateSlotsIfPresent(obj), slots ? [require_apiHelpers.PlainDateBranding, slots] : (slots = getPlainTimeSlotsIfPresent(obj), slots ? [require_apiHelpers.PlainTimeBranding, slots] : (slots = getPlainYearMonthSlotsIfPresent(obj), slots ? [require_apiHelpers.PlainYearMonthBranding, slots] : (slots = getPlainMonthDaySlotsIfPresent(obj), slots ? [require_apiHelpers.PlainMonthDayBranding, slots] : (slots = getDurationSlotsIfPresent(obj), slots ? [require_apiHelpers.DurationBranding, slots] : void 0)))))));
402
+ }
403
+ function validateBag(bag) {
404
+ return (getTemporalBrandingAndSlots(bag) || void 0 !== bag.calendar || void 0 !== bag.timeZone) && require_internal.throwTypeError("Invalid bag"), bag;
405
+ }
406
+ const plainTimeSlotsMap = /* @__PURE__ */ new WeakMap();
407
+ const PlainTime = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.PlainTimeBranding, class {
408
+ constructor(hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0) {
409
+ const fields = require_internal.validateTimeFields(require_internal.mapProps(require_utils.toIntegerWithTrunc, {
410
+ hour,
411
+ minute,
412
+ second,
413
+ millisecond,
414
+ microsecond,
415
+ nanosecond
416
+ }));
417
+ initPlainTime(this, require_internal.createTimeSlots(fields));
418
+ }
419
+ static from(arg, options = void 0) {
420
+ return createPlainTime(toPlainTimeSlots(arg, options));
421
+ }
422
+ static compare(arg0, arg1) {
423
+ return require_internal.compareTimeFields(toPlainTimeSlots(arg0), toPlainTimeSlots(arg1));
424
+ }
425
+ with(mod, options = void 0) {
426
+ return createPlainTime(require_internal.mergePlainTimeFields(getPlainTimeSlots(this), validateBag(mod), options));
427
+ }
428
+ add(durationArg) {
429
+ return createPlainTime(require_internal.moveTime(getPlainTimeSlots(this), toDurationSlots(durationArg))[0]);
430
+ }
431
+ subtract(durationArg) {
432
+ return createPlainTime(require_internal.moveTime(getPlainTimeSlots(this), require_internal.negateDurationFields(toDurationSlots(durationArg)))[0]);
433
+ }
434
+ until(otherArg, options = void 0) {
435
+ return createDuration(require_internal.diffPlainTimes(0, getPlainTimeSlots(this), toPlainTimeSlots(otherArg), options));
436
+ }
437
+ since(otherArg, options = void 0) {
438
+ return createDuration(require_internal.diffPlainTimes(1, getPlainTimeSlots(this), toPlainTimeSlots(otherArg), options));
439
+ }
440
+ round(options) {
441
+ const slots = getPlainTimeSlots(this);
442
+ const [smallestUnit, roundingInc, roundingMode] = require_internal.refineRoundingOptions(options, 5);
443
+ return createPlainTime(require_internal.roundTimeToNano(slots, require_internal.computeNanoInc(smallestUnit, roundingInc), roundingMode)[0]);
444
+ }
445
+ equals(other) {
446
+ return require_internal.plainTimesEqual(getPlainTimeSlots(this), toPlainTimeSlots(other));
447
+ }
448
+ toLocaleString(locales = void 0, options = {}) {
449
+ const slots = getPlainTimeSlots(this);
450
+ return new require_internal.RawDateTimeFormat(locales, require_internal.applyPlainFormatTimeZone(require_internal.transformTimeOptions(options))).format(require_internal.timeFieldsToMilli(slots));
451
+ }
452
+ toString(options = void 0) {
453
+ return require_internal.formatPlainTimeIso(getPlainTimeSlots(this), options);
454
+ }
455
+ toJSON() {
456
+ return require_internal.formatPlainTimeIso(getPlainTimeSlots(this));
457
+ }
458
+ valueOf() {
459
+ return require_apiHelpers.forbiddenValueOf();
460
+ }
461
+ }, getPlainTimeSlots, require_internal.timeGetters);
462
+ function createPlainTime(slots) {
463
+ return initPlainTime(Object.create(PlainTime.prototype), slots);
464
+ }
465
+ function getPlainTimeSlots(obj) {
466
+ return getPlainTimeSlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
467
+ }
468
+ function getPlainTimeSlotsIfPresent(obj) {
469
+ return plainTimeSlotsMap.get(obj);
470
+ }
471
+ function toPlainTimeSlots(arg, options) {
472
+ if (require_internal.isObjectLike(arg)) {
473
+ const ownSlots = getPlainTimeSlotsIfPresent(arg);
474
+ if (ownSlots) return require_internal.refineOverflowOptions(options), ownSlots;
475
+ const dateTimeSlots = getPlainDateTimeSlotsIfPresent(arg);
476
+ if (dateTimeSlots) return require_internal.refineOverflowOptions(options), require_internal.createTimeSlots(dateTimeSlots);
477
+ const zonedDateTimeSlots = getZonedDateTimeSlotsIfPresent(arg);
478
+ return zonedDateTimeSlots ? (require_internal.refineOverflowOptions(options), require_internal.zonedDateTimeToPlainTime(zonedDateTimeSlots)) : require_internal.refinePlainTimeObjectLike(arg, options);
479
+ }
480
+ const timeSlots = require_internal.parsePlainTime(arg);
481
+ return require_internal.refineOverflowOptions(options), timeSlots;
482
+ }
483
+ function optionalToPlainTimeFields(timeArg) {
484
+ return void 0 === timeArg ? void 0 : toPlainTimeSlots(timeArg);
485
+ }
486
+ function initPlainTime(instance, slots) {
487
+ return plainTimeSlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
488
+ }
489
+ const plainDateTimeSlotsMap = /* @__PURE__ */ new WeakMap();
490
+ const PlainDateTime = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.PlainDateTimeBranding, class {
491
+ constructor(isoYear, isoMonth, isoDay, hour = 0, minute = 0, second = 0, millisecond = 0, microsecond = 0, nanosecond = 0, calendar = void 0) {
492
+ const fields = require_internal.checkIsoDateTimeInBounds(require_internal.validateIsoDateTimeFields(require_internal.mapProps(require_utils.toIntegerWithTrunc, {
493
+ year: isoYear,
494
+ month: isoMonth,
495
+ day: isoDay,
496
+ hour,
497
+ minute,
498
+ second,
499
+ millisecond,
500
+ microsecond,
501
+ nanosecond
502
+ })));
503
+ const calendarImpl = resolveBasicCalendarArg(calendar);
504
+ initPlainDateTime(this, require_internal.createDateTimeSlots(fields, calendarImpl));
505
+ }
506
+ static from(arg, options = void 0) {
507
+ return createPlainDateTime(toPlainDateTimeSlots(arg, options));
508
+ }
509
+ static compare(arg0, arg1) {
510
+ return require_internal.compareIsoDateTimeFields(toPlainDateTimeSlots(arg0), toPlainDateTimeSlots(arg1));
511
+ }
512
+ get calendarId() {
513
+ return require_internal.getCalendarSlotId(getPlainDateTimeSlots(this).calendar);
514
+ }
515
+ with(mod, options = void 0) {
516
+ return createPlainDateTime(require_internal.mergePlainDateTimeFields(getPlainDateTimeSlots(this), validateBag(mod), options));
517
+ }
518
+ withCalendar(calendarArg) {
519
+ return createPlainDateTime(require_internal.createDateTimeSlots(getPlainDateTimeSlots(this), refineCalendarArg(calendarArg)));
520
+ }
521
+ withPlainTime(plainTimeArg = void 0) {
522
+ const slots = getPlainDateTimeSlots(this);
523
+ return createPlainDateTime(require_internal.createPlainDateTimeFromRefinedFields(slots, optionalToPlainTimeFields(plainTimeArg), slots.calendar));
524
+ }
525
+ add(durationArg, options = void 0) {
526
+ const slots = getPlainDateTimeSlots(this);
527
+ return createPlainDateTime(require_internal.createDateTimeSlots(require_internal.moveDateTime(slots.calendar, slots, toDurationSlots(durationArg), options), slots.calendar));
528
+ }
529
+ subtract(durationArg, options = void 0) {
530
+ const slots = getPlainDateTimeSlots(this);
531
+ return createPlainDateTime(require_internal.createDateTimeSlots(require_internal.moveDateTime(slots.calendar, slots, require_internal.negateDurationFields(toDurationSlots(durationArg)), options), slots.calendar));
532
+ }
533
+ until(otherArg, options = void 0) {
534
+ const slots = getPlainDateTimeSlots(this);
535
+ const other = toPlainDateTimeSlots(otherArg);
536
+ return createDuration(require_internal.diffPlainDateTimes(0, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options));
537
+ }
538
+ since(otherArg, options = void 0) {
539
+ const slots = getPlainDateTimeSlots(this);
540
+ const other = toPlainDateTimeSlots(otherArg);
541
+ return createDuration(require_internal.diffPlainDateTimes(1, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options));
542
+ }
543
+ round(options) {
544
+ const slots = getPlainDateTimeSlots(this);
545
+ const [smallestUnit, roundingInc, roundingMode] = require_internal.refineRoundingOptions(options);
546
+ return createPlainDateTime(require_internal.createDateTimeSlots(require_internal.roundDateTimeToNano(slots, require_internal.computeNanoInc(smallestUnit, roundingInc), roundingMode), slots.calendar));
547
+ }
548
+ equals(otherArg) {
549
+ return require_internal.plainDateTimesEqual(getPlainDateTimeSlots(this), toPlainDateTimeSlots(otherArg));
550
+ }
551
+ toZonedDateTime(timeZoneArg, options = void 0) {
552
+ return createZonedDateTime(require_internal.plainDateTimeToZonedDateTime(getPlainDateTimeSlots(this), require_internal.queryTimeZone(refineTimeZoneArg(timeZoneArg)), options));
553
+ }
554
+ toPlainDate() {
555
+ const slots = getPlainDateTimeSlots(this);
556
+ return createPlainDate(require_internal.createDateSlots(slots, slots.calendar));
557
+ }
558
+ toPlainTime() {
559
+ return createPlainTime(require_internal.createTimeSlots(getPlainDateTimeSlots(this)));
560
+ }
561
+ toLocaleString(locales = void 0, options = {}) {
562
+ const slots = getPlainDateTimeSlots(this);
563
+ const format = new require_internal.RawDateTimeFormat(locales, require_internal.applyPlainFormatTimeZone(require_internal.transformDateTimeOptions(options)));
564
+ return require_internal.checkResolvedCalendarCompatible(format, slots), format.format(require_internal.isoDateTimeToEpochMilli(slots));
565
+ }
566
+ toString(options = void 0) {
567
+ return require_internal.formatPlainDateTimeIso(getPlainDateTimeSlots(this), options);
568
+ }
569
+ toJSON() {
570
+ return require_internal.formatPlainDateTimeIso(getPlainDateTimeSlots(this));
571
+ }
572
+ valueOf() {
573
+ return require_apiHelpers.forbiddenValueOf();
574
+ }
575
+ }, getPlainDateTimeSlots, require_apiHelpers.dateFieldGetters$1, require_apiHelpers.dateDerivedGetters, require_internal.timeGetters);
576
+ function createPlainDateTime(slots) {
577
+ return initPlainDateTime(Object.create(PlainDateTime.prototype), slots);
578
+ }
579
+ function getPlainDateTimeSlots(obj) {
580
+ return getPlainDateTimeSlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
581
+ }
582
+ function getPlainDateTimeSlotsIfPresent(obj) {
583
+ return plainDateTimeSlotsMap.get(obj);
584
+ }
585
+ function toPlainDateTimeSlots(arg, options) {
586
+ if (require_internal.isObjectLike(arg)) {
587
+ const ownSlots = getPlainDateTimeSlotsIfPresent(arg);
588
+ if (ownSlots) return require_internal.refineOverflowOptions(options), ownSlots;
589
+ const dateSlots = getPlainDateSlotsIfPresent(arg);
590
+ if (dateSlots) return require_internal.refineOverflowOptions(options), require_internal.createDateTimeSlots(require_internal.combineDateAndTime(dateSlots, require_internal.timeFieldDefaults), dateSlots.calendar);
591
+ const zonedDateTimeSlots = getZonedDateTimeSlotsIfPresent(arg);
592
+ if (zonedDateTimeSlots) return require_internal.refineOverflowOptions(options), require_internal.zonedDateTimeToPlainDateTime(zonedDateTimeSlots);
593
+ return require_internal.refinePlainDateTimeObjectLike(getCalendarFromBag(arg), arg, options);
594
+ }
595
+ const res = require_internal.parsePlainDateTime(arg, resolveBasicCalendarId);
596
+ return require_internal.refineOverflowOptions(options), res;
597
+ }
598
+ function initPlainDateTime(instance, slots) {
599
+ return plainDateTimeSlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
600
+ }
601
+ const plainDateSlotsMap = /* @__PURE__ */ new WeakMap();
602
+ const PlainDate = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.PlainDateBranding, class {
603
+ constructor(isoYear, isoMonth, isoDay, calendar = void 0) {
604
+ const fields = require_internal.checkIsoDateInBounds(require_internal.validateIsoDateFields(require_internal.mapProps(require_utils.toIntegerWithTrunc, {
605
+ year: isoYear,
606
+ month: isoMonth,
607
+ day: isoDay
608
+ })));
609
+ const calendarImpl = resolveBasicCalendarArg(calendar);
610
+ initPlainDate(this, require_internal.createDateSlots(fields, calendarImpl));
611
+ }
612
+ static from(arg, options = void 0) {
613
+ return createPlainDate(toPlainDateSlots(arg, options));
614
+ }
615
+ static compare(arg0, arg1) {
616
+ return require_internal.compareIsoDateFields(toPlainDateSlots(arg0), toPlainDateSlots(arg1));
617
+ }
618
+ get calendarId() {
619
+ return require_internal.getCalendarSlotId(getPlainDateSlots(this).calendar);
620
+ }
621
+ with(mod, options = void 0) {
622
+ return createPlainDate(require_internal.mergePlainDateFields(getPlainDateSlots(this), validateBag(mod), options));
623
+ }
624
+ withCalendar(calendarArg) {
625
+ return createPlainDate(require_internal.createDateSlots(getPlainDateSlots(this), refineCalendarArg(calendarArg)));
626
+ }
627
+ add(durationArg, options = void 0) {
628
+ const slots = getPlainDateSlots(this);
629
+ return createPlainDate(require_internal.createDateSlots(require_internal.moveDate(slots.calendar, slots, toDurationSlots(durationArg), options), slots.calendar));
630
+ }
631
+ subtract(durationArg, options = void 0) {
632
+ const slots = getPlainDateSlots(this);
633
+ return createPlainDate(require_internal.createDateSlots(require_internal.moveDate(slots.calendar, slots, require_internal.negateDurationFields(toDurationSlots(durationArg)), options), slots.calendar));
634
+ }
635
+ until(otherArg, options = void 0) {
636
+ const slots = getPlainDateSlots(this);
637
+ const other = toPlainDateSlots(otherArg);
638
+ return createDuration(require_internal.diffPlainDates(0, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options));
639
+ }
640
+ since(otherArg, options = void 0) {
641
+ const slots = getPlainDateSlots(this);
642
+ const other = toPlainDateSlots(otherArg);
643
+ return createDuration(require_internal.diffPlainDates(1, require_internal.getCommonCalendar(slots.calendar, other.calendar), slots, other, options));
644
+ }
645
+ equals(otherArg) {
646
+ return require_internal.plainDatesEqual(getPlainDateSlots(this), toPlainDateSlots(otherArg));
647
+ }
648
+ toZonedDateTime(options) {
649
+ const optionsObj = require_internal.isObjectLike(options) ? {
650
+ timeZone: options.timeZone,
651
+ plainTime: options.plainTime
652
+ } : { timeZone: options };
653
+ return createZonedDateTime(require_internal.plainDateToZonedDateTime(refineTimeZoneArg, toPlainTimeSlots, getPlainDateSlots(this), optionsObj));
654
+ }
655
+ toPlainDateTime(plainTimeArg = void 0) {
656
+ const slots = getPlainDateSlots(this);
657
+ return createPlainDateTime(require_internal.createPlainDateTimeFromRefinedFields(slots, optionalToPlainTimeFields(plainTimeArg), slots.calendar));
658
+ }
659
+ toPlainYearMonth() {
660
+ return createPlainYearMonth(require_internal.convertToPlainYearMonth(getPlainDateSlots(this).calendar, this));
661
+ }
662
+ toPlainMonthDay() {
663
+ return createPlainMonthDay(require_internal.convertToPlainMonthDay(getPlainDateSlots(this).calendar, this));
664
+ }
665
+ toLocaleString(locales = void 0, options = {}) {
666
+ const slots = getPlainDateSlots(this);
667
+ const format = new require_internal.RawDateTimeFormat(locales, require_internal.applyPlainFormatTimeZone(require_internal.transformDateOptions(options)));
668
+ return require_internal.checkResolvedCalendarCompatible(format, slots), format.format(require_internal.isoDateToEpochMilli(slots));
669
+ }
670
+ toString(options = void 0) {
671
+ return require_internal.formatPlainDateIso(getPlainDateSlots(this), options);
672
+ }
673
+ toJSON() {
674
+ return require_internal.formatPlainDateIso(getPlainDateSlots(this));
675
+ }
676
+ valueOf() {
677
+ return require_apiHelpers.forbiddenValueOf();
678
+ }
679
+ }, getPlainDateSlots, require_apiHelpers.dateFieldGetters$1, require_apiHelpers.dateDerivedGetters);
680
+ function createPlainDate(slots) {
681
+ return initPlainDate(Object.create(PlainDate.prototype), slots);
682
+ }
683
+ function getPlainDateSlots(obj) {
684
+ return getPlainDateSlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
685
+ }
686
+ function getPlainDateSlotsIfPresent(obj) {
687
+ return plainDateSlotsMap.get(obj);
688
+ }
689
+ function toPlainDateSlots(arg, options) {
690
+ if (require_internal.isObjectLike(arg)) {
691
+ const ownSlots = getPlainDateSlotsIfPresent(arg);
692
+ if (ownSlots) return require_internal.refineOverflowOptions(options), ownSlots;
693
+ const dateTimeSlots = getPlainDateTimeSlotsIfPresent(arg);
694
+ if (dateTimeSlots) return require_internal.refineOverflowOptions(options), require_internal.createDateSlots(dateTimeSlots, dateTimeSlots.calendar);
695
+ const zonedDateTimeSlots = getZonedDateTimeSlotsIfPresent(arg);
696
+ if (zonedDateTimeSlots) return require_internal.refineOverflowOptions(options), require_internal.zonedDateTimeToPlainDate(zonedDateTimeSlots);
697
+ return require_internal.refinePlainDateObjectLike(getCalendarFromBag(arg), arg, options);
698
+ }
699
+ const res = require_internal.parsePlainDate(arg, resolveBasicCalendarId);
700
+ return require_internal.refineOverflowOptions(options), res;
701
+ }
702
+ function initPlainDate(instance, slots) {
703
+ return plainDateSlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
704
+ }
705
+ function getCalendarFromBag(bag) {
706
+ const calendar = extractCalendarFromBag(bag);
707
+ return void 0 === calendar ? void 0 : calendar;
708
+ }
709
+ function extractCalendarFromBag(bag) {
710
+ const { calendar: calendarArg } = bag;
711
+ if (void 0 !== calendarArg) return refineCalendarArg(calendarArg);
712
+ }
713
+ function refineCalendarArg(arg) {
714
+ if (require_internal.isObjectLike(arg)) {
715
+ const slots = getPlainDateSlotsIfPresent(arg) || getPlainDateTimeSlotsIfPresent(arg) || getZonedDateTimeSlotsIfPresent(arg) || getPlainMonthDaySlotsIfPresent(arg) || getPlainYearMonthSlotsIfPresent(arg);
716
+ return slots || require_internal.throwTypeError(require_internal.invalidCalendar(arg)), slots.calendar;
717
+ }
718
+ return ((arg) => resolveBasicCalendarId(require_internal.parseCalendarId(require_internal.requireString(arg))))(arg);
719
+ }
720
+ const durationSlotsMap = /* @__PURE__ */ new WeakMap();
721
+ const Duration = /* @__PURE__ */ require_apiHelpers.defineTemporalClass(require_apiHelpers.DurationBranding, class {
722
+ constructor(years = 0, months = 0, weeks = 0, days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, microseconds = 0, nanoseconds = 0) {
723
+ const fields = require_internal.validateDurationFields(require_internal.mapProps(require_internal.toStrictInteger, {
724
+ years,
725
+ months,
726
+ weeks,
727
+ days,
728
+ hours,
729
+ minutes,
730
+ seconds,
731
+ milliseconds,
732
+ microseconds,
733
+ nanoseconds
734
+ }));
735
+ initDuration(this, require_internal.createDurationSlots(fields));
736
+ }
737
+ static from(arg) {
738
+ return createDuration(toDurationSlots(arg));
739
+ }
740
+ static compare(durationArg0, durationArg1, options = void 0) {
741
+ return require_internal.compareDurations(refinePublicRelativeTo, toDurationSlots(durationArg0), toDurationSlots(durationArg1), options);
742
+ }
743
+ get sign() {
744
+ return getDurationSlots(this).sign;
745
+ }
746
+ get blank() {
747
+ return !getDurationSlots(this).sign;
748
+ }
749
+ with(mod) {
750
+ return createDuration(require_internal.mergeDurationFields(getDurationSlots(this), mod));
751
+ }
752
+ negated() {
753
+ return createDuration(require_internal.negateDuration(getDurationSlots(this)));
754
+ }
755
+ abs() {
756
+ return createDuration(require_internal.absDuration(getDurationSlots(this)));
757
+ }
758
+ add(otherArg, options = void 0) {
759
+ return createDuration(require_internal.addDurations(refinePublicRelativeTo, 0, getDurationSlots(this), toDurationSlots(otherArg), options));
760
+ }
761
+ subtract(otherArg, options = void 0) {
762
+ return createDuration(require_internal.addDurations(refinePublicRelativeTo, 1, getDurationSlots(this), toDurationSlots(otherArg), options));
763
+ }
764
+ round(roundTo) {
765
+ return createDuration(require_internal.roundDuration(refinePublicRelativeTo, getDurationSlots(this), roundTo));
766
+ }
767
+ total(totalOf) {
768
+ return require_internal.totalDuration(refinePublicRelativeTo, getDurationSlots(this), totalOf);
769
+ }
770
+ toLocaleString(locales = void 0, options) {
771
+ const slots = getDurationSlots(this);
772
+ return Intl.DurationFormat ? new Intl.DurationFormat(locales, options).format(slots) : require_internal.formatDurationIso(slots, options);
773
+ }
774
+ toString(options = void 0) {
775
+ return require_internal.formatDurationIso(getDurationSlots(this), options);
776
+ }
777
+ toJSON() {
778
+ return require_internal.formatDurationIso(getDurationSlots(this));
779
+ }
780
+ valueOf() {
781
+ return require_apiHelpers.forbiddenValueOf();
782
+ }
783
+ }, getDurationSlots, require_internal.durationGetters);
784
+ function createDuration(slots) {
785
+ return initDuration(Object.create(Duration.prototype), slots);
786
+ }
787
+ function getDurationSlots(obj) {
788
+ return getDurationSlotsIfPresent(obj) || require_apiHelpers.invalidRecordType();
789
+ }
790
+ function getDurationSlotsIfPresent(obj) {
791
+ return durationSlotsMap.get(obj);
792
+ }
793
+ function toDurationSlots(arg) {
794
+ if (require_internal.isObjectLike(arg)) return getDurationSlotsIfPresent(arg) || require_internal.refineDurationObjectLike(arg);
795
+ return require_internal.parseDuration(arg);
796
+ }
797
+ function refinePublicRelativeTo(relativeTo) {
798
+ if (void 0 !== relativeTo) {
799
+ if (require_internal.isObjectLike(relativeTo)) {
800
+ const zonedDateTimeSlots = getZonedDateTimeSlotsIfPresent(relativeTo);
801
+ if (zonedDateTimeSlots) return zonedDateTimeSlots;
802
+ const dateSlots = getPlainDateSlotsIfPresent(relativeTo);
803
+ if (dateSlots) return dateSlots;
804
+ const dateTimeSlots = getPlainDateTimeSlotsIfPresent(relativeTo);
805
+ if (dateTimeSlots) return require_internal.createDateSlots(dateTimeSlots, dateTimeSlots.calendar);
806
+ return require_internal.refineMaybeZonedDateTimeObjectLike(refineTimeZoneArg, getCalendarFromBag(relativeTo), relativeTo);
807
+ }
808
+ return require_internal.parseRelativeToSlots(relativeTo, resolveBasicCalendarId);
809
+ }
810
+ }
811
+ function initDuration(instance, slots) {
812
+ return durationSlotsMap.set(instance, slots), require_apiHelpers.attachDebugString(instance), instance;
813
+ }
814
+ const Now = /* @__PURE__ */ Object.defineProperties({}, {
815
+ ...require_internal.createStringTagDescriptors("Temporal.Now"),
816
+ ...require_internal.createPropDescriptors({
817
+ timeZoneId() {
818
+ return require_internal.getCurrentTimeZoneId();
819
+ },
820
+ instant() {
821
+ return createInstant(require_internal.createEpochNanoSlots(require_internal.getCurrentEpochNano()));
822
+ },
823
+ zonedDateTimeISO(timeZoneArg = require_internal.getCurrentTimeZoneId()) {
824
+ const timeZone = require_internal.queryTimeZone(refineTimeZoneArg(timeZoneArg));
825
+ return createZonedDateTime(require_internal.createZonedEpochNanoSlots(require_internal.getCurrentEpochNano(), timeZone));
826
+ },
827
+ plainDateTimeISO(timeZoneArg = require_internal.getCurrentTimeZoneId()) {
828
+ return createPlainDateTime(require_internal.createDateTimeSlots(require_internal.getCurrentIsoDateTime(require_internal.queryTimeZone(refineTimeZoneArg(timeZoneArg)))));
829
+ },
830
+ plainDateISO(timeZoneArg = require_internal.getCurrentTimeZoneId()) {
831
+ return createPlainDate(require_internal.createDateSlots(require_internal.getCurrentIsoDateTime(require_internal.queryTimeZone(refineTimeZoneArg(timeZoneArg)))));
832
+ },
833
+ plainTimeISO(timeZoneArg = require_internal.getCurrentTimeZoneId()) {
834
+ return createPlainTime(require_internal.createTimeSlots(require_internal.getCurrentIsoDateTime(require_internal.queryTimeZone(refineTimeZoneArg(timeZoneArg)))));
835
+ }
836
+ })
837
+ });
838
+ const Temporal = /* @__PURE__ */ Object.defineProperties({}, {
839
+ ...require_internal.createStringTagDescriptors("Temporal"),
840
+ ...require_internal.createPropDescriptors({
841
+ PlainYearMonth,
842
+ PlainMonthDay,
843
+ PlainDate,
844
+ PlainTime,
845
+ PlainDateTime,
846
+ ZonedDateTime,
847
+ Instant,
848
+ Duration,
849
+ Now
850
+ })
851
+ });
852
+ //#endregion
853
+ exports.Temporal = Temporal;
854
+ exports.toTemporalInstant = toTemporalInstant;