@hebcal/core 5.2.2 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +1423 -1366
- package/dist/bundle.min.js +2 -2
- package/dist/index.cjs +1112 -1070
- package/dist/index.mjs +1112 -1070
- package/package.json +8 -8
- package/po/he.po +3 -0
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/core v5.
|
|
1
|
+
/*! @hebcal/core v5.3.0 */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
/** @private */
|
|
@@ -2028,18 +2028,18 @@ class HebrewDateEvent extends Event {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
}
|
|
2030
2030
|
|
|
2031
|
-
function clampEntity(e, n, t, o, r) {
|
|
2032
|
-
const i = clampNumber(n, t, o);
|
|
2033
|
-
if (r && n !== i) {
|
|
2034
|
-
throw new RangeError(numberOutOfRange(e, n, t, o));
|
|
2035
|
-
}
|
|
2036
|
-
return i;
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
2031
|
function clampProp(e, n, t, o, r) {
|
|
2040
2032
|
return clampEntity(n, getDefinedProp(e, n), t, o, r);
|
|
2041
2033
|
}
|
|
2042
2034
|
|
|
2035
|
+
function clampEntity(e, n, t, o, r, i) {
|
|
2036
|
+
const a = clampNumber(n, t, o);
|
|
2037
|
+
if (r && n !== a) {
|
|
2038
|
+
throw new RangeError(numberOutOfRange(e, n, t, o, i));
|
|
2039
|
+
}
|
|
2040
|
+
return a;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
2043
|
function getDefinedProp(e, n) {
|
|
2044
2044
|
const t = e[n];
|
|
2045
2045
|
if (void 0 === t) {
|
|
@@ -2052,7 +2052,7 @@ function isObjectLike(e) {
|
|
|
2052
2052
|
return null !== e && /object|function/.test(typeof e);
|
|
2053
2053
|
}
|
|
2054
2054
|
|
|
2055
|
-
function
|
|
2055
|
+
function memoize(e, n = Map) {
|
|
2056
2056
|
const t = new n;
|
|
2057
2057
|
return (n, ...o) => {
|
|
2058
2058
|
if (t.has(n)) {
|
|
@@ -2176,10 +2176,6 @@ function bindArgs(e, ...n) {
|
|
|
2176
2176
|
return (...t) => e(...n, ...t);
|
|
2177
2177
|
}
|
|
2178
2178
|
|
|
2179
|
-
function identity(e) {
|
|
2180
|
-
return e;
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
2179
|
function capitalize(e) {
|
|
2184
2180
|
return e[0].toUpperCase() + e.substring(1);
|
|
2185
2181
|
}
|
|
@@ -2224,82 +2220,82 @@ function hasHalf(e) {
|
|
|
2224
2220
|
return .5 === Math.abs(e % 1);
|
|
2225
2221
|
}
|
|
2226
2222
|
|
|
2227
|
-
function
|
|
2223
|
+
function givenFieldsToBigNano(e, n, t) {
|
|
2228
2224
|
let o = 0, r = 0;
|
|
2229
2225
|
for (let i = 0; i <= n; i++) {
|
|
2230
|
-
const n = e[t[i]], a =
|
|
2226
|
+
const n = e[t[i]], a = j[i], s = W / a, [c, u] = divModTrunc(n, s);
|
|
2231
2227
|
o += u * a, r += c;
|
|
2232
2228
|
}
|
|
2233
|
-
const [i, a] = divModTrunc(o,
|
|
2229
|
+
const [i, a] = divModTrunc(o, W);
|
|
2234
2230
|
return [ r + i, a ];
|
|
2235
2231
|
}
|
|
2236
2232
|
|
|
2237
2233
|
function nanoToGivenFields(e, n, t) {
|
|
2238
2234
|
const o = {};
|
|
2239
2235
|
for (let r = n; r >= 0; r--) {
|
|
2240
|
-
const n =
|
|
2236
|
+
const n = j[r];
|
|
2241
2237
|
o[t[r]] = divTrunc(e, n), e = modTrunc(e, n);
|
|
2242
2238
|
}
|
|
2243
2239
|
return o;
|
|
2244
2240
|
}
|
|
2245
2241
|
|
|
2246
2242
|
function getRequiredYearMonthFields(e) {
|
|
2247
|
-
return e ===
|
|
2243
|
+
return e === ce ? Q : [];
|
|
2248
2244
|
}
|
|
2249
2245
|
|
|
2250
2246
|
function getRequiredMonthDayFields(e) {
|
|
2251
|
-
return e ===
|
|
2247
|
+
return e === ce ? ne : [];
|
|
2252
2248
|
}
|
|
2253
2249
|
|
|
2254
2250
|
function getRequiredDateFields(e) {
|
|
2255
|
-
return e ===
|
|
2251
|
+
return e === ce ? [ "year", "day" ] : [];
|
|
2256
2252
|
}
|
|
2257
2253
|
|
|
2258
|
-
function
|
|
2259
|
-
let [t, o] = divModTrunc(n,
|
|
2254
|
+
function createBigNano(e, n) {
|
|
2255
|
+
let [t, o] = divModTrunc(n, W), r = e + t;
|
|
2260
2256
|
const i = Math.sign(r);
|
|
2261
|
-
return i && i === -Math.sign(o) && (r -= i, o += i *
|
|
2257
|
+
return i && i === -Math.sign(o) && (r -= i, o += i * W), [ r, o ];
|
|
2262
2258
|
}
|
|
2263
2259
|
|
|
2264
|
-
function
|
|
2265
|
-
return
|
|
2260
|
+
function addBigNanoAndNumber(e, n) {
|
|
2261
|
+
return createBigNano(e[0], e[1] + n);
|
|
2266
2262
|
}
|
|
2267
2263
|
|
|
2268
|
-
function
|
|
2269
|
-
return
|
|
2264
|
+
function addBigNanos(e, n, t = 1) {
|
|
2265
|
+
return createBigNano(e[0] + n[0] * t, e[1] + n[1] * t);
|
|
2270
2266
|
}
|
|
2271
2267
|
|
|
2272
|
-
function
|
|
2273
|
-
return
|
|
2268
|
+
function diffBigNanos(e, n) {
|
|
2269
|
+
return addBigNanos(n, e, -1);
|
|
2274
2270
|
}
|
|
2275
2271
|
|
|
2276
|
-
function
|
|
2272
|
+
function compareBigNanos(e, n) {
|
|
2277
2273
|
return compareNumbers(e[0], n[0]) || compareNumbers(e[1], n[1]);
|
|
2278
2274
|
}
|
|
2279
2275
|
|
|
2280
|
-
function
|
|
2281
|
-
const t = BigInt(
|
|
2276
|
+
function bigIntToBigNano(e, n = 1) {
|
|
2277
|
+
const t = BigInt(W / n);
|
|
2282
2278
|
return [ Number(e / t), Number(e % t) * n ];
|
|
2283
2279
|
}
|
|
2284
2280
|
|
|
2285
|
-
function
|
|
2286
|
-
const t =
|
|
2281
|
+
function numberToBigNano(e, n = 1) {
|
|
2282
|
+
const t = W / n, [o, r] = divModTrunc(e, t);
|
|
2287
2283
|
return [ o, r * n ];
|
|
2288
2284
|
}
|
|
2289
2285
|
|
|
2290
|
-
function
|
|
2291
|
-
const [t, o] = e, r = Math.floor(o / n), i =
|
|
2286
|
+
function bigNanoToBigInt(e, n = 1) {
|
|
2287
|
+
const [t, o] = e, r = Math.floor(o / n), i = W / n;
|
|
2292
2288
|
return BigInt(t) * BigInt(i) + BigInt(r);
|
|
2293
2289
|
}
|
|
2294
2290
|
|
|
2295
|
-
function
|
|
2296
|
-
const [o, r] =
|
|
2297
|
-
return o + (t ?
|
|
2291
|
+
function bigNanoToNumber(e, n = 1, t) {
|
|
2292
|
+
const [o, r] = e, [i, a] = divModTrunc(r, n);
|
|
2293
|
+
return o * (W / n) + (i + (t ? a / n : 0));
|
|
2298
2294
|
}
|
|
2299
2295
|
|
|
2300
|
-
function
|
|
2301
|
-
const [
|
|
2302
|
-
return [
|
|
2296
|
+
function divModBigNano(e, n, t = divModFloor) {
|
|
2297
|
+
const [o, r] = e, [i, a] = t(r, n);
|
|
2298
|
+
return [ o * (W / n) + i, a ];
|
|
2303
2299
|
}
|
|
2304
2300
|
|
|
2305
2301
|
function hashIntlFormatParts(e, n) {
|
|
@@ -2311,20 +2307,20 @@ function hashIntlFormatParts(e, n) {
|
|
|
2311
2307
|
}
|
|
2312
2308
|
|
|
2313
2309
|
function checkIsoYearMonthInBounds(e) {
|
|
2314
|
-
return clampProp(e, "isoYear",
|
|
2310
|
+
return clampProp(e, "isoYear", Ze, Re, 1), e.isoYear === Ze ? clampProp(e, "isoMonth", 4, 12, 1) : e.isoYear === Re && clampProp(e, "isoMonth", 1, 9, 1),
|
|
2315
2311
|
e;
|
|
2316
2312
|
}
|
|
2317
2313
|
|
|
2318
2314
|
function checkIsoDateInBounds(e) {
|
|
2319
2315
|
return checkIsoDateTimeInBounds({
|
|
2320
2316
|
...e,
|
|
2321
|
-
...
|
|
2317
|
+
...be,
|
|
2322
2318
|
isoHour: 12
|
|
2323
2319
|
}), e;
|
|
2324
2320
|
}
|
|
2325
2321
|
|
|
2326
2322
|
function checkIsoDateTimeInBounds(e) {
|
|
2327
|
-
const n = clampProp(e, "isoYear",
|
|
2323
|
+
const n = clampProp(e, "isoYear", Ze, Re, 1), t = n === Ze ? 1 : n === Re ? -1 : 0;
|
|
2328
2324
|
return t && checkEpochNanoInBounds(isoToEpochNano({
|
|
2329
2325
|
...e,
|
|
2330
2326
|
isoDay: e.isoDay + t,
|
|
@@ -2333,27 +2329,31 @@ function checkIsoDateTimeInBounds(e) {
|
|
|
2333
2329
|
}
|
|
2334
2330
|
|
|
2335
2331
|
function checkEpochNanoInBounds(e) {
|
|
2336
|
-
if (!e || -1 ===
|
|
2337
|
-
throw new RangeError(
|
|
2332
|
+
if (!e || -1 === compareBigNanos(e, Ce) || 1 === compareBigNanos(e, Ye)) {
|
|
2333
|
+
throw new RangeError(N);
|
|
2338
2334
|
}
|
|
2339
2335
|
return e;
|
|
2340
2336
|
}
|
|
2341
2337
|
|
|
2342
2338
|
function isoTimeFieldsToNano(e) {
|
|
2343
|
-
return
|
|
2339
|
+
return givenFieldsToBigNano(e, 5, ye)[1];
|
|
2344
2340
|
}
|
|
2345
2341
|
|
|
2346
2342
|
function nanoToIsoTimeAndDay(e) {
|
|
2347
|
-
const [n, t] = divModFloor(e,
|
|
2348
|
-
return [ nanoToGivenFields(t, 5,
|
|
2343
|
+
const [n, t] = divModFloor(e, W);
|
|
2344
|
+
return [ nanoToGivenFields(t, 5, ye), n ];
|
|
2349
2345
|
}
|
|
2350
2346
|
|
|
2351
2347
|
function epochNanoToSec(e) {
|
|
2352
|
-
return
|
|
2348
|
+
return epochNanoToSecMod(e)[0];
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
function epochNanoToSecMod(e) {
|
|
2352
|
+
return divModBigNano(e, A);
|
|
2353
2353
|
}
|
|
2354
2354
|
|
|
2355
2355
|
function epochNanoToMilli(e) {
|
|
2356
|
-
return
|
|
2356
|
+
return divModBigNano(e, q)[0];
|
|
2357
2357
|
}
|
|
2358
2358
|
|
|
2359
2359
|
function isoToEpochMilli(e) {
|
|
@@ -2363,8 +2363,8 @@ function isoToEpochMilli(e) {
|
|
|
2363
2363
|
function isoToEpochNano(e) {
|
|
2364
2364
|
const n = isoToEpochMilli(e);
|
|
2365
2365
|
if (void 0 !== n) {
|
|
2366
|
-
const [t, o] = divModTrunc(n,
|
|
2367
|
-
return [ t, o *
|
|
2366
|
+
const [t, o] = divModTrunc(n, R);
|
|
2367
|
+
return [ t, o * q + (e.isoMicrosecond || 0) * z + (e.isoNanosecond || 0) ];
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
2370
2370
|
|
|
@@ -2378,39 +2378,39 @@ function isoToEpochNanoWithOffset(e, n) {
|
|
|
2378
2378
|
}
|
|
2379
2379
|
|
|
2380
2380
|
function isoArgsToEpochSec(...e) {
|
|
2381
|
-
return isoArgsToEpochMilli(...e) /
|
|
2381
|
+
return isoArgsToEpochMilli(...e) / Z;
|
|
2382
2382
|
}
|
|
2383
2383
|
|
|
2384
2384
|
function isoArgsToEpochMilli(...e) {
|
|
2385
2385
|
const [n, t] = isoToLegacyDate(...e), o = n.getTime();
|
|
2386
2386
|
if (!isNaN(o)) {
|
|
2387
|
-
return o - t *
|
|
2387
|
+
return o - t * R;
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
2390
|
|
|
2391
2391
|
function isoToLegacyDate(e, n = 1, t = 1, o = 0, r = 0, i = 0, a = 0) {
|
|
2392
|
-
const s = e ===
|
|
2392
|
+
const s = e === Ze ? 1 : e === Re ? -1 : 0, c = new Date;
|
|
2393
2393
|
return c.setUTCHours(o, r, i, a), c.setUTCFullYear(e, n - 1, t + s), [ c, s ];
|
|
2394
2394
|
}
|
|
2395
2395
|
|
|
2396
2396
|
function epochNanoToIso(e, n) {
|
|
2397
|
-
let [t, o] =
|
|
2398
|
-
o < 0 && (o +=
|
|
2399
|
-
const [r, i] = divModFloor(o,
|
|
2397
|
+
let [t, o] = addBigNanoAndNumber(e, n);
|
|
2398
|
+
o < 0 && (o += W, t -= 1);
|
|
2399
|
+
const [r, i] = divModFloor(o, q), [a, s] = divModFloor(i, z);
|
|
2400
2400
|
return {
|
|
2401
|
-
...epochMilliToIso(t *
|
|
2401
|
+
...epochMilliToIso(t * R + r),
|
|
2402
2402
|
isoMicrosecond: a,
|
|
2403
2403
|
isoNanosecond: s
|
|
2404
2404
|
};
|
|
2405
2405
|
}
|
|
2406
2406
|
|
|
2407
2407
|
function epochMilliToIso(e) {
|
|
2408
|
-
const n = e
|
|
2409
|
-
return zipProps(
|
|
2408
|
+
const n = Math.ceil(Math.max(0, Math.abs(e) - ke) / R) * Math.sign(e), t = new Date(e - n * R);
|
|
2409
|
+
return zipProps(Pe, [ t.getUTCFullYear(), t.getUTCMonth() + 1, t.getUTCDate() + n, t.getUTCHours(), t.getUTCMinutes(), t.getUTCSeconds(), t.getUTCMilliseconds() ]);
|
|
2410
2410
|
}
|
|
2411
2411
|
|
|
2412
2412
|
function computeIsoMonthsInYear() {
|
|
2413
|
-
return
|
|
2413
|
+
return Ae;
|
|
2414
2414
|
}
|
|
2415
2415
|
|
|
2416
2416
|
function computeIsoDaysInMonth(e, n) {
|
|
@@ -2436,9 +2436,14 @@ function computeIsoInLeapYear(e) {
|
|
|
2436
2436
|
}
|
|
2437
2437
|
|
|
2438
2438
|
function computeIsoDayOfYear(e) {
|
|
2439
|
-
return diffEpochMilliByDay(isoToEpochMilli(
|
|
2439
|
+
return diffEpochMilliByDay(isoToEpochMilli((e => ({
|
|
2440
|
+
...e,
|
|
2441
|
+
isoMonth: 1,
|
|
2442
|
+
isoDay: 1,
|
|
2443
|
+
...be
|
|
2444
|
+
}))(e)), isoToEpochMilli({
|
|
2440
2445
|
...e,
|
|
2441
|
-
...
|
|
2446
|
+
...be
|
|
2442
2447
|
})) + 1;
|
|
2443
2448
|
}
|
|
2444
2449
|
|
|
@@ -2447,30 +2452,16 @@ function computeIsoDayOfWeek(e) {
|
|
|
2447
2452
|
return modFloor(n.getUTCDay() - t, 7) || 7;
|
|
2448
2453
|
}
|
|
2449
2454
|
|
|
2450
|
-
function computeIsoWeekParts(e) {
|
|
2451
|
-
const n = computeIsoDayOfYear(e), t = computeIsoDayOfWeek(e), o = computeIsoDayOfWeek(isoDateYearStart(e)), r = Math.floor((n - t + 10) / Ze), {isoYear: i} = e;
|
|
2452
|
-
return r < 1 ? [ i - 1, 5 === o || 6 === o && computeIsoInLeapYear(i - 1) ? 53 : 52 ] : 53 === r && computeIsoDaysInYear(i) - n < 4 - t ? [ i + 1, 1 ] : [ i, r ];
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
function isoDateYearStart(e) {
|
|
2456
|
-
return {
|
|
2457
|
-
...e,
|
|
2458
|
-
isoMonth: 1,
|
|
2459
|
-
isoDay: 1,
|
|
2460
|
-
...ve
|
|
2461
|
-
};
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
2455
|
function computeGregoryEraParts({isoYear: e}) {
|
|
2465
2456
|
return e < 1 ? [ "bce", 1 - e ] : [ "ce", e ];
|
|
2466
2457
|
}
|
|
2467
2458
|
|
|
2468
2459
|
function computeJapaneseEraParts(e) {
|
|
2469
2460
|
const n = isoToEpochMilli(e);
|
|
2470
|
-
if (n <
|
|
2461
|
+
if (n < Le) {
|
|
2471
2462
|
return computeGregoryEraParts(e);
|
|
2472
2463
|
}
|
|
2473
|
-
const t = hashIntlFormatParts(
|
|
2464
|
+
const t = hashIntlFormatParts(Kn(le), n), {era: o, eraYear: r} = parseIntlYear(t, le);
|
|
2474
2465
|
return [ o, r ];
|
|
2475
2466
|
}
|
|
2476
2467
|
|
|
@@ -2483,7 +2474,7 @@ function checkIsoDateFields(e) {
|
|
|
2483
2474
|
}
|
|
2484
2475
|
|
|
2485
2476
|
function isIsoDateFieldsValid(e) {
|
|
2486
|
-
return allPropsEqual(
|
|
2477
|
+
return allPropsEqual(ve, e, constrainIsoDateFields(e));
|
|
2487
2478
|
}
|
|
2488
2479
|
|
|
2489
2480
|
function constrainIsoDateFields(e, n) {
|
|
@@ -2496,45 +2487,61 @@ function constrainIsoDateFields(e, n) {
|
|
|
2496
2487
|
}
|
|
2497
2488
|
|
|
2498
2489
|
function constrainIsoTimeFields(e, n) {
|
|
2499
|
-
return zipProps(
|
|
2490
|
+
return zipProps(ye, [ clampProp(e, "isoHour", 0, 23, n), clampProp(e, "isoMinute", 0, 59, n), clampProp(e, "isoSecond", 0, 59, n), clampProp(e, "isoMillisecond", 0, 999, n), clampProp(e, "isoMicrosecond", 0, 999, n), clampProp(e, "isoNanosecond", 0, 999, n) ]);
|
|
2500
2491
|
}
|
|
2501
2492
|
|
|
2502
|
-
function
|
|
2503
|
-
if (
|
|
2504
|
-
|
|
2493
|
+
function requireStringOrUndefined(e) {
|
|
2494
|
+
if (void 0 !== e) {
|
|
2495
|
+
return We(e);
|
|
2505
2496
|
}
|
|
2506
|
-
return e;
|
|
2507
2497
|
}
|
|
2508
2498
|
|
|
2509
|
-
function
|
|
2510
|
-
if (
|
|
2511
|
-
|
|
2499
|
+
function requirePositiveIntegerOrUndefined(e) {
|
|
2500
|
+
if (void 0 !== e) {
|
|
2501
|
+
return requirePositiveInteger(e);
|
|
2512
2502
|
}
|
|
2513
|
-
return n;
|
|
2514
2503
|
}
|
|
2515
2504
|
|
|
2516
|
-
function
|
|
2517
|
-
if (void 0 !== e
|
|
2518
|
-
|
|
2505
|
+
function requireIntegerOrUndefined(e) {
|
|
2506
|
+
if (void 0 !== e) {
|
|
2507
|
+
return requireInteger(e);
|
|
2519
2508
|
}
|
|
2520
|
-
return e;
|
|
2521
2509
|
}
|
|
2522
2510
|
|
|
2523
|
-
function
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2511
|
+
function requirePositiveInteger(e) {
|
|
2512
|
+
return requireNumberIsPositive(requireInteger(e));
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
function requireInteger(e) {
|
|
2516
|
+
return requireNumberIsInteger($e(e));
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
function requireNonNullish(e) {
|
|
2520
|
+
if (null == e) {
|
|
2521
|
+
throw new TypeError("Cannot be null or undefined");
|
|
2528
2522
|
}
|
|
2529
2523
|
return e;
|
|
2530
2524
|
}
|
|
2531
2525
|
|
|
2532
|
-
function
|
|
2533
|
-
|
|
2526
|
+
function requirePropDefined(e, n) {
|
|
2527
|
+
if (null == n) {
|
|
2528
|
+
throw new RangeError(missingField(e));
|
|
2529
|
+
}
|
|
2530
|
+
return n;
|
|
2534
2531
|
}
|
|
2535
2532
|
|
|
2536
|
-
function
|
|
2537
|
-
|
|
2533
|
+
function requireObjectLike(e) {
|
|
2534
|
+
if (!isObjectLike(e)) {
|
|
2535
|
+
throw new TypeError(n);
|
|
2536
|
+
}
|
|
2537
|
+
return e;
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
function requireType(e, n, t = e) {
|
|
2541
|
+
if (typeof n !== e) {
|
|
2542
|
+
throw new TypeError(invalidEntity(t, n));
|
|
2543
|
+
}
|
|
2544
|
+
return n;
|
|
2538
2545
|
}
|
|
2539
2546
|
|
|
2540
2547
|
function requireNumberIsInteger(e, n = "number") {
|
|
@@ -2551,20 +2558,6 @@ function requireNumberIsPositive(e, n = "number") {
|
|
|
2551
2558
|
return e;
|
|
2552
2559
|
}
|
|
2553
2560
|
|
|
2554
|
-
function requireNonNullish(e) {
|
|
2555
|
-
if (null == e) {
|
|
2556
|
-
throw new TypeError("Cannot be null or undefined");
|
|
2557
|
-
}
|
|
2558
|
-
return e;
|
|
2559
|
-
}
|
|
2560
|
-
|
|
2561
|
-
function requirePropDefined(e, n) {
|
|
2562
|
-
if (null == n) {
|
|
2563
|
-
throw new RangeError(missingField(e));
|
|
2564
|
-
}
|
|
2565
|
-
return n;
|
|
2566
|
-
}
|
|
2567
|
-
|
|
2568
2561
|
function toString(n) {
|
|
2569
2562
|
if ("symbol" == typeof n) {
|
|
2570
2563
|
throw new TypeError(e);
|
|
@@ -2573,7 +2566,7 @@ function toString(n) {
|
|
|
2573
2566
|
}
|
|
2574
2567
|
|
|
2575
2568
|
function toStringViaPrimitive(e, n) {
|
|
2576
|
-
return isObjectLike(e) ? String(e) :
|
|
2569
|
+
return isObjectLike(e) ? String(e) : We(e, n);
|
|
2577
2570
|
}
|
|
2578
2571
|
|
|
2579
2572
|
function toBigInt(e) {
|
|
@@ -2609,40 +2602,40 @@ function toPositiveInteger(e, n) {
|
|
|
2609
2602
|
}
|
|
2610
2603
|
|
|
2611
2604
|
function refineOverflowOptions(e) {
|
|
2612
|
-
return void 0 === e ? 0 :
|
|
2605
|
+
return void 0 === e ? 0 : un(requireObjectLike(e));
|
|
2613
2606
|
}
|
|
2614
2607
|
|
|
2615
2608
|
function refineZonedFieldOptions(e, n = 0) {
|
|
2616
2609
|
e = normalizeOptions(e);
|
|
2617
|
-
const t =
|
|
2618
|
-
return [
|
|
2610
|
+
const t = ln(e), o = fn(e, n);
|
|
2611
|
+
return [ un(e), o, t ];
|
|
2619
2612
|
}
|
|
2620
2613
|
|
|
2621
2614
|
function refineEpochDisambigOptions(e) {
|
|
2622
|
-
return
|
|
2615
|
+
return ln(normalizeOptions(e));
|
|
2623
2616
|
}
|
|
2624
2617
|
|
|
2625
2618
|
function refineCalendarDiffOptions(e) {
|
|
2626
|
-
return e = normalizeOptions(e),
|
|
2619
|
+
return e = normalizeOptions(e), sn(e, 9, 6, 1);
|
|
2627
2620
|
}
|
|
2628
2621
|
|
|
2629
2622
|
function refineDiffOptions(e, n, t, o = 9, r = 0, i = 4) {
|
|
2630
2623
|
n = normalizeOptions(n);
|
|
2631
|
-
let a =
|
|
2632
|
-
const u =
|
|
2624
|
+
let a = sn(n, o, r), s = parseRoundingIncInteger(n), c = hn(n, i);
|
|
2625
|
+
const u = an(n, o, r, 1);
|
|
2633
2626
|
return null == a ? a = Math.max(t, u) : checkLargestSmallestUnit(a, u), s = refineRoundingInc(s, u, 1),
|
|
2634
2627
|
e && (c = (e => e < 4 ? (e + 2) % 4 : e)(c)), [ a, u, s, c ];
|
|
2635
2628
|
}
|
|
2636
2629
|
|
|
2637
2630
|
function refineRoundOptions(e, n = 6, t) {
|
|
2638
|
-
let o = parseRoundingIncInteger(e = normalizeUnitNameOptions(e,
|
|
2639
|
-
const r =
|
|
2640
|
-
let i =
|
|
2641
|
-
return i = requirePropDefined(
|
|
2631
|
+
let o = parseRoundingIncInteger(e = normalizeUnitNameOptions(e, He));
|
|
2632
|
+
const r = hn(e, 7);
|
|
2633
|
+
let i = an(e, n);
|
|
2634
|
+
return i = requirePropDefined(He, i), o = refineRoundingInc(o, i, void 0, t), [ i, o, r ];
|
|
2642
2635
|
}
|
|
2643
2636
|
|
|
2644
2637
|
function refineDateDisplayOptions(e) {
|
|
2645
|
-
return
|
|
2638
|
+
return dn(normalizeOptions(e));
|
|
2646
2639
|
}
|
|
2647
2640
|
|
|
2648
2641
|
function refineTimeDisplayOptions(e, n) {
|
|
@@ -2651,41 +2644,41 @@ function refineTimeDisplayOptions(e, n) {
|
|
|
2651
2644
|
|
|
2652
2645
|
function refineTimeDisplayTuple(e, n = 4) {
|
|
2653
2646
|
const t = refineSubsecDigits(e);
|
|
2654
|
-
return [
|
|
2647
|
+
return [ hn(e, 4), ...refineSmallestUnitAndSubsecDigits(an(e, n), t) ];
|
|
2655
2648
|
}
|
|
2656
2649
|
|
|
2657
2650
|
function refineSmallestUnitAndSubsecDigits(e, n) {
|
|
2658
|
-
return null != e ? [
|
|
2651
|
+
return null != e ? [ j[e], e < 4 ? 9 - 3 * e : -1 ] : [ void 0 === n ? 1 : 10 ** (9 - n), n ];
|
|
2659
2652
|
}
|
|
2660
2653
|
|
|
2661
2654
|
function parseRoundingIncInteger(e) {
|
|
2662
|
-
const n = e[
|
|
2663
|
-
return void 0 === n ? 1 : toInteger(n,
|
|
2655
|
+
const n = e[Ve];
|
|
2656
|
+
return void 0 === n ? 1 : toInteger(n, Ve);
|
|
2664
2657
|
}
|
|
2665
2658
|
|
|
2666
2659
|
function refineRoundingInc(e, n, t, o) {
|
|
2667
|
-
const r = o ?
|
|
2660
|
+
const r = o ? W : j[n + 1];
|
|
2668
2661
|
if (r) {
|
|
2669
|
-
const t =
|
|
2670
|
-
if (r % ((e = clampEntity(
|
|
2671
|
-
throw new RangeError(invalidEntity(
|
|
2662
|
+
const t = j[n];
|
|
2663
|
+
if (r % ((e = clampEntity(Ve, e, 1, r / t - (o ? 0 : 1), 1)) * t)) {
|
|
2664
|
+
throw new RangeError(invalidEntity(Ve, e));
|
|
2672
2665
|
}
|
|
2673
2666
|
} else {
|
|
2674
|
-
e = clampEntity(
|
|
2667
|
+
e = clampEntity(Ve, e, 1, t ? 10 ** 9 : 1, 1);
|
|
2675
2668
|
}
|
|
2676
2669
|
return e;
|
|
2677
2670
|
}
|
|
2678
2671
|
|
|
2679
2672
|
function refineSubsecDigits(e) {
|
|
2680
|
-
let n = e[
|
|
2673
|
+
let n = e[_e];
|
|
2681
2674
|
if (void 0 !== n) {
|
|
2682
2675
|
if ("number" != typeof n) {
|
|
2683
2676
|
if ("auto" === toString(n)) {
|
|
2684
2677
|
return;
|
|
2685
2678
|
}
|
|
2686
|
-
throw new RangeError(invalidEntity(
|
|
2679
|
+
throw new RangeError(invalidEntity(_e, n));
|
|
2687
2680
|
}
|
|
2688
|
-
n = clampEntity(
|
|
2681
|
+
n = clampEntity(_e, Math.floor(n), 0, 9, 1);
|
|
2689
2682
|
}
|
|
2690
2683
|
return n;
|
|
2691
2684
|
}
|
|
@@ -2711,7 +2704,7 @@ function copyOptions(e) {
|
|
|
2711
2704
|
|
|
2712
2705
|
function overrideOverflowOptions(e, n) {
|
|
2713
2706
|
return e && Object.assign(Object.create(null), e, {
|
|
2714
|
-
overflow:
|
|
2707
|
+
overflow: Qe[n]
|
|
2715
2708
|
});
|
|
2716
2709
|
}
|
|
2717
2710
|
|
|
@@ -2724,10 +2717,10 @@ function refineUnitOption(e, n, t = 9, o = 0, r) {
|
|
|
2724
2717
|
return r ? o : null;
|
|
2725
2718
|
}
|
|
2726
2719
|
let a = Y[i];
|
|
2727
|
-
if (void 0 === a && (a =
|
|
2728
|
-
throw new RangeError(
|
|
2720
|
+
if (void 0 === a && (a = Ie[i]), void 0 === a) {
|
|
2721
|
+
throw new RangeError(invalidChoice(e, i, Y));
|
|
2729
2722
|
}
|
|
2730
|
-
return clampEntity(e, a, o, t, 1), a;
|
|
2723
|
+
return clampEntity(e, a, o, t, 1, C), a;
|
|
2731
2724
|
}
|
|
2732
2725
|
|
|
2733
2726
|
function refineChoiceOption(e, n, t, o = 0) {
|
|
@@ -2737,27 +2730,27 @@ function refineChoiceOption(e, n, t, o = 0) {
|
|
|
2737
2730
|
}
|
|
2738
2731
|
const i = toString(r), a = n[i];
|
|
2739
2732
|
if (void 0 === a) {
|
|
2740
|
-
throw new RangeError(
|
|
2733
|
+
throw new RangeError(invalidChoice(e, i, n));
|
|
2741
2734
|
}
|
|
2742
2735
|
return a;
|
|
2743
2736
|
}
|
|
2744
2737
|
|
|
2745
2738
|
function checkLargestSmallestUnit(e, n) {
|
|
2746
2739
|
if (n > e) {
|
|
2747
|
-
throw new RangeError(
|
|
2740
|
+
throw new RangeError(F);
|
|
2748
2741
|
}
|
|
2749
2742
|
}
|
|
2750
2743
|
|
|
2751
2744
|
function createInstantSlots(e) {
|
|
2752
2745
|
return {
|
|
2753
|
-
branding:
|
|
2746
|
+
branding: yn,
|
|
2754
2747
|
epochNanoseconds: e
|
|
2755
2748
|
};
|
|
2756
2749
|
}
|
|
2757
2750
|
|
|
2758
2751
|
function createZonedDateTimeSlots(e, n, t) {
|
|
2759
2752
|
return {
|
|
2760
|
-
branding:
|
|
2753
|
+
branding: Nn,
|
|
2761
2754
|
calendar: t,
|
|
2762
2755
|
timeZone: n,
|
|
2763
2756
|
epochNanoseconds: e
|
|
@@ -2766,47 +2759,48 @@ function createZonedDateTimeSlots(e, n, t) {
|
|
|
2766
2759
|
|
|
2767
2760
|
function createPlainDateTimeSlots(e, n = e.calendar) {
|
|
2768
2761
|
return {
|
|
2769
|
-
branding:
|
|
2762
|
+
branding: In,
|
|
2770
2763
|
calendar: n,
|
|
2771
|
-
...pluckProps(
|
|
2764
|
+
...pluckProps(Fe, e)
|
|
2772
2765
|
};
|
|
2773
2766
|
}
|
|
2774
2767
|
|
|
2775
2768
|
function createPlainDateSlots(e, n = e.calendar) {
|
|
2776
2769
|
return {
|
|
2777
|
-
branding:
|
|
2770
|
+
branding: Dn,
|
|
2778
2771
|
calendar: n,
|
|
2779
|
-
...pluckProps(
|
|
2772
|
+
...pluckProps(Ee, e)
|
|
2780
2773
|
};
|
|
2781
2774
|
}
|
|
2782
2775
|
|
|
2783
2776
|
function createPlainYearMonthSlots(e, n = e.calendar) {
|
|
2784
2777
|
return {
|
|
2785
|
-
branding:
|
|
2778
|
+
branding: Tn,
|
|
2786
2779
|
calendar: n,
|
|
2787
|
-
...pluckProps(
|
|
2780
|
+
...pluckProps(Ee, e)
|
|
2788
2781
|
};
|
|
2789
2782
|
}
|
|
2790
2783
|
|
|
2791
2784
|
function createPlainMonthDaySlots(e, n = e.calendar) {
|
|
2792
2785
|
return {
|
|
2793
|
-
branding:
|
|
2786
|
+
branding: gn,
|
|
2794
2787
|
calendar: n,
|
|
2795
|
-
...pluckProps(
|
|
2788
|
+
...pluckProps(Ee, e)
|
|
2796
2789
|
};
|
|
2797
2790
|
}
|
|
2798
2791
|
|
|
2799
2792
|
function createPlainTimeSlots(e) {
|
|
2800
2793
|
return {
|
|
2801
|
-
branding:
|
|
2802
|
-
...pluckProps(
|
|
2794
|
+
branding: Mn,
|
|
2795
|
+
...pluckProps(Se, e)
|
|
2803
2796
|
};
|
|
2804
2797
|
}
|
|
2805
2798
|
|
|
2806
2799
|
function createDurationSlots(e) {
|
|
2807
2800
|
return {
|
|
2808
|
-
branding:
|
|
2809
|
-
|
|
2801
|
+
branding: vn,
|
|
2802
|
+
sign: computeDurationSign(e),
|
|
2803
|
+
...pluckProps(he, e)
|
|
2810
2804
|
};
|
|
2811
2805
|
}
|
|
2812
2806
|
|
|
@@ -2819,63 +2813,75 @@ function getEpochMilliseconds(e) {
|
|
|
2819
2813
|
}
|
|
2820
2814
|
|
|
2821
2815
|
function getEpochMicroseconds(e) {
|
|
2822
|
-
return
|
|
2816
|
+
return bigNanoToBigInt(e.epochNanoseconds, z);
|
|
2823
2817
|
}
|
|
2824
2818
|
|
|
2825
2819
|
function getEpochNanoseconds(e) {
|
|
2826
|
-
return
|
|
2820
|
+
return bigNanoToBigInt(e.epochNanoseconds);
|
|
2827
2821
|
}
|
|
2828
2822
|
|
|
2829
2823
|
function getId(e) {
|
|
2830
|
-
return "string" == typeof e ? e :
|
|
2824
|
+
return "string" == typeof e ? e : We(e.id);
|
|
2831
2825
|
}
|
|
2832
2826
|
|
|
2833
2827
|
function isIdLikeEqual(e, n) {
|
|
2834
2828
|
return e === n || getId(e) === getId(n);
|
|
2835
2829
|
}
|
|
2836
2830
|
|
|
2831
|
+
function createRelativeSystem(e, n, t) {
|
|
2832
|
+
const o = e(t.calendar);
|
|
2833
|
+
return t.epochNanoseconds ? [ t, o, n(t.timeZone) ] : [ {
|
|
2834
|
+
...t,
|
|
2835
|
+
...be
|
|
2836
|
+
}, o ];
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
function relativeMarkerToEpochNano(e, n) {
|
|
2840
|
+
return n ? e.epochNanoseconds : isoToEpochNano(e);
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2837
2843
|
function totalDuration(e, n, t, o, r) {
|
|
2838
2844
|
const i = getLargestDurationUnit(o), [a, s] = ((e, n) => {
|
|
2839
|
-
const t = n((e = normalizeUnitNameOptions(e,
|
|
2840
|
-
let o =
|
|
2841
|
-
return o = requirePropDefined(
|
|
2845
|
+
const t = n((e = normalizeUnitNameOptions(e, Ge))[Je]);
|
|
2846
|
+
let o = cn(e);
|
|
2847
|
+
return o = requirePropDefined(Ge, o), [ o, t ];
|
|
2842
2848
|
})(r, e), c = Math.max(a, i);
|
|
2843
2849
|
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
2844
|
-
return ((e, n) =>
|
|
2850
|
+
return ((e, n) => totalBigNano(durationFieldsToBigNano(e), n))(o, a);
|
|
2845
2851
|
}
|
|
2846
2852
|
if (!s) {
|
|
2847
|
-
throw new RangeError(
|
|
2853
|
+
throw new RangeError(P);
|
|
2848
2854
|
}
|
|
2849
|
-
const u =
|
|
2855
|
+
const u = createRelativeSystem(n, t, s);
|
|
2850
2856
|
return ((e, n, t, o, r, i) => {
|
|
2851
|
-
const a =
|
|
2852
|
-
return e[
|
|
2857
|
+
const a = computeDurationSign(e), [s, c] = clampRelativeDuration(clearDurationFields(e, t - 1), t, a, o, r, i), u = computeEpochNanoFrac(s, c, n);
|
|
2858
|
+
return e[pe[t]] + u * a;
|
|
2853
2859
|
})(...spanDuration(o, void 0, a, ...u), a, ...u);
|
|
2854
2860
|
}
|
|
2855
2861
|
|
|
2856
|
-
function
|
|
2857
|
-
return
|
|
2862
|
+
function totalBigNano(e, n) {
|
|
2863
|
+
return bigNanoToNumber(e, j[n], 1);
|
|
2858
2864
|
}
|
|
2859
2865
|
|
|
2860
2866
|
function clampRelativeDuration(e, n, t, o, r, i) {
|
|
2861
2867
|
const a = {
|
|
2862
|
-
...
|
|
2863
|
-
[
|
|
2864
|
-
}, s =
|
|
2865
|
-
return [
|
|
2868
|
+
...Me,
|
|
2869
|
+
[pe[n]]: t
|
|
2870
|
+
}, s = moveRelativeMarker(e, o, r, i), c = moveRelativeMarker(a, s, r, i);
|
|
2871
|
+
return [ relativeMarkerToEpochNano(s, i), relativeMarkerToEpochNano(c, i) ];
|
|
2866
2872
|
}
|
|
2867
2873
|
|
|
2868
2874
|
function computeEpochNanoFrac(e, n, t) {
|
|
2869
|
-
const o =
|
|
2875
|
+
const o = bigNanoToNumber(diffBigNanos(e, n));
|
|
2870
2876
|
if (!o) {
|
|
2871
|
-
throw new RangeError(
|
|
2877
|
+
throw new RangeError(m);
|
|
2872
2878
|
}
|
|
2873
|
-
return
|
|
2879
|
+
return bigNanoToNumber(diffBigNanos(e, t)) / o;
|
|
2874
2880
|
}
|
|
2875
2881
|
|
|
2876
2882
|
function roundInstant(e, n) {
|
|
2877
2883
|
const [t, o, r] = refineRoundOptions(n, 5, 1);
|
|
2878
|
-
return createInstantSlots(
|
|
2884
|
+
return createInstantSlots(roundBigNano(e.epochNanoseconds, t, o, r, 1));
|
|
2879
2885
|
}
|
|
2880
2886
|
|
|
2881
2887
|
function roundZonedDateTime(e, n, t) {
|
|
@@ -2906,13 +2912,13 @@ function roundPlainTime(e, n) {
|
|
|
2906
2912
|
function roundDateTime(e, n, t, o, r) {
|
|
2907
2913
|
return 6 === n ? ((e, n, t) => {
|
|
2908
2914
|
if (n) {
|
|
2909
|
-
const o =
|
|
2915
|
+
const o = computeTimeInDay(n, e);
|
|
2910
2916
|
return checkIsoDateTimeInBounds({
|
|
2911
2917
|
...moveByIsoDays(e, roundByInc(isoTimeFieldsToNano(e), o, t) / o),
|
|
2912
|
-
...
|
|
2918
|
+
...be
|
|
2913
2919
|
});
|
|
2914
2920
|
}
|
|
2915
|
-
return roundDateTimeToNano(e,
|
|
2921
|
+
return roundDateTimeToNano(e, W, t);
|
|
2916
2922
|
})(e, r, o) : roundDateTimeToNano(e, computeNanoInc(n, t), o);
|
|
2917
2923
|
}
|
|
2918
2924
|
|
|
@@ -2929,25 +2935,25 @@ function roundTimeToNano(e, n, t) {
|
|
|
2929
2935
|
}
|
|
2930
2936
|
|
|
2931
2937
|
function balanceDayTimeDuration(e, n, t, o, r) {
|
|
2932
|
-
return nanoToDurationDayTimeFields(
|
|
2938
|
+
return nanoToDurationDayTimeFields(roundBigNano(durationFieldsToBigNano(e), t, o, r), n);
|
|
2933
2939
|
}
|
|
2934
2940
|
|
|
2935
2941
|
function balanceDayTimeDurationByInc(e, n, t, o) {
|
|
2936
|
-
return nanoToDurationDayTimeFields(
|
|
2942
|
+
return nanoToDurationDayTimeFields(roundBigNanoByInc(durationFieldsToBigNano(e, n), t, o), n);
|
|
2937
2943
|
}
|
|
2938
2944
|
|
|
2939
2945
|
function roundRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
2940
|
-
const u =
|
|
2946
|
+
const u = o > 6 ? nudgeRelativeDuration : c && o < 6 ? nudgeRelativeDurationTime : nudgeDurationDayTime;
|
|
2941
2947
|
let [l, f, d] = u(e, n, t, o, r, i, a, s, c);
|
|
2942
2948
|
return d && (l = ((e, n, t, o, r, i, a) => {
|
|
2943
|
-
const s =
|
|
2949
|
+
const s = computeDurationSign(e);
|
|
2944
2950
|
for (let c = o + 1; c <= t; c++) {
|
|
2945
2951
|
if (7 === c && 7 !== t) {
|
|
2946
2952
|
continue;
|
|
2947
2953
|
}
|
|
2948
2954
|
const o = clearDurationFields(e, c - 1);
|
|
2949
|
-
o[
|
|
2950
|
-
const u =
|
|
2955
|
+
o[pe[c]] += s;
|
|
2956
|
+
const u = bigNanoToNumber(diffBigNanos(relativeMarkerToEpochNano(moveRelativeMarker(o, r, i, a), a), n));
|
|
2951
2957
|
if (u && Math.sign(u) !== s) {
|
|
2952
2958
|
break;
|
|
2953
2959
|
}
|
|
@@ -2958,60 +2964,60 @@ function roundRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
|
2958
2964
|
}
|
|
2959
2965
|
|
|
2960
2966
|
function computeNanoInc(e, n) {
|
|
2961
|
-
return
|
|
2967
|
+
return j[e] * n;
|
|
2962
2968
|
}
|
|
2963
2969
|
|
|
2964
2970
|
function roundByInc(e, n, t) {
|
|
2965
|
-
return ((e, n) =>
|
|
2971
|
+
return ((e, n) => Pn[n](e))(e / n, t) * n;
|
|
2966
2972
|
}
|
|
2967
2973
|
|
|
2968
2974
|
function roundToMinute(e) {
|
|
2969
|
-
return roundByInc(e,
|
|
2975
|
+
return roundByInc(e, L, 7);
|
|
2970
2976
|
}
|
|
2971
2977
|
|
|
2972
|
-
function
|
|
2973
|
-
return 6 === n ? [ roundByInc(
|
|
2978
|
+
function roundBigNano(e, n, t, o, r) {
|
|
2979
|
+
return 6 === n ? [ roundByInc(totalBigNano(e, 6), t, o), 0 ] : roundBigNanoByInc(e, computeNanoInc(n, t), o, r);
|
|
2974
2980
|
}
|
|
2975
2981
|
|
|
2976
|
-
function
|
|
2982
|
+
function roundBigNanoByInc(e, n, t, o) {
|
|
2977
2983
|
let [r, i] = e;
|
|
2978
|
-
o && i < 0 && (i +=
|
|
2979
|
-
const [a, s] = divModFloor(roundByInc(i, n, t),
|
|
2980
|
-
return
|
|
2984
|
+
o && i < 0 && (i += W, r -= 1);
|
|
2985
|
+
const [a, s] = divModFloor(roundByInc(i, n, t), W);
|
|
2986
|
+
return createBigNano(r + a, s);
|
|
2981
2987
|
}
|
|
2982
2988
|
|
|
2983
2989
|
function nudgeDurationDayTime(e, n, t, o, r, i) {
|
|
2984
|
-
const a =
|
|
2990
|
+
const a = computeDurationSign(e), s = durationFieldsToBigNano(e), c = roundBigNano(s, o, r, i), u = diffBigNanos(s, c), l = Math.sign(c[0] - s[0]) === a, f = nanoToDurationDayTimeFields(c, Math.min(t, 6));
|
|
2985
2991
|
return [ {
|
|
2986
2992
|
...e,
|
|
2987
2993
|
...f
|
|
2988
|
-
},
|
|
2994
|
+
}, addBigNanos(n, u), l ];
|
|
2989
2995
|
}
|
|
2990
2996
|
|
|
2991
2997
|
function nudgeRelativeDurationTime(e, n, t, o, r, i, a, s, c) {
|
|
2992
|
-
const u =
|
|
2993
|
-
let [l, f] =
|
|
2998
|
+
const u = computeDurationSign(e);
|
|
2999
|
+
let [l, f] = givenFieldsToBigNano(e, 5, pe);
|
|
2994
3000
|
const d = computeNanoInc(o, r);
|
|
2995
3001
|
let m = roundByInc(f, d, i);
|
|
2996
3002
|
const [p, h] = clampRelativeDuration({
|
|
2997
3003
|
...e,
|
|
2998
|
-
...
|
|
2999
|
-
}, 6, u, a, s, c), T = m -
|
|
3000
|
-
T && Math.sign(T) !== u ? n =
|
|
3001
|
-
n =
|
|
3002
|
-
const
|
|
3004
|
+
...Ne
|
|
3005
|
+
}, 6, u, a, s, c), T = m - bigNanoToNumber(diffBigNanos(p, h));
|
|
3006
|
+
T && Math.sign(T) !== u ? n = addBigNanoAndNumber(p, m) : (l += u, m = roundByInc(T, d, i),
|
|
3007
|
+
n = addBigNanoAndNumber(h, m));
|
|
3008
|
+
const g = nanoToDurationTimeFields(m);
|
|
3003
3009
|
return [ {
|
|
3004
3010
|
...e,
|
|
3005
|
-
...
|
|
3011
|
+
...g,
|
|
3006
3012
|
days: e.days + l
|
|
3007
3013
|
}, n, Boolean(l) ];
|
|
3008
3014
|
}
|
|
3009
3015
|
|
|
3010
3016
|
function nudgeRelativeDuration(e, n, t, o, r, i, a, s, c) {
|
|
3011
|
-
const u =
|
|
3017
|
+
const u = computeDurationSign(e), l = pe[o], f = clearDurationFields(e, o - 1), d = divTrunc(e[l], r) * r;
|
|
3012
3018
|
f[l] = d;
|
|
3013
|
-
const [m, p] = clampRelativeDuration(f, o, r * u, a, s, c), h = d + computeEpochNanoFrac(m, p, n) * u * r, T = roundByInc(h, r, i),
|
|
3014
|
-
return f[l] = T, [ f,
|
|
3019
|
+
const [m, p] = clampRelativeDuration(f, o, r * u, a, s, c), h = d + computeEpochNanoFrac(m, p, n) * u * r, T = roundByInc(h, r, i), g = Math.sign(T - h) === u;
|
|
3020
|
+
return f[l] = T, [ f, g ? p : m, g ];
|
|
3015
3021
|
}
|
|
3016
3022
|
|
|
3017
3023
|
function formatInstantIso(e, n, t, o) {
|
|
@@ -3020,27 +3026,27 @@ function formatInstantIso(e, n, t, o) {
|
|
|
3020
3026
|
return [ e.timeZone, ...n ];
|
|
3021
3027
|
})(o), c = void 0 !== r;
|
|
3022
3028
|
return ((e, n, t, o, r, i) => {
|
|
3023
|
-
t =
|
|
3029
|
+
t = roundBigNanoByInc(t, r, o, 1);
|
|
3024
3030
|
const a = n.getOffsetNanosecondsFor(t);
|
|
3025
3031
|
return formatIsoDateTimeFields(epochNanoToIso(t, a), i) + (e ? formatOffsetNano(roundToMinute(a)) : "Z");
|
|
3026
|
-
})(c, n(c ? e(r) :
|
|
3032
|
+
})(c, n(c ? e(r) : En), t.epochNanoseconds, i, a, s);
|
|
3027
3033
|
}
|
|
3028
3034
|
|
|
3029
3035
|
function formatZonedDateTimeIso(e, n, t) {
|
|
3030
3036
|
return ((e, n, t, o, r, i, a, s, c, u) => {
|
|
3031
|
-
o =
|
|
3037
|
+
o = roundBigNanoByInc(o, c, s, 1);
|
|
3032
3038
|
const l = e(t).getOffsetNanosecondsFor(o);
|
|
3033
3039
|
return formatIsoDateTimeFields(epochNanoToIso(o, l), u) + formatOffsetNano(roundToMinute(l), a) + ((e, n) => 1 !== n ? "[" + (2 === n ? "!" : "") + getId(e) + "]" : "")(t, i) + formatCalendar(n, r);
|
|
3034
3040
|
})(e, n.calendar, n.timeZone, n.epochNanoseconds, ...(e => {
|
|
3035
3041
|
e = normalizeOptions(e);
|
|
3036
|
-
const n =
|
|
3037
|
-
return [ n,
|
|
3042
|
+
const n = dn(e), t = refineSubsecDigits(e), o = pn(e), r = hn(e, 4), i = an(e, 4);
|
|
3043
|
+
return [ n, mn(e), o, r, ...refineSmallestUnitAndSubsecDigits(i, t) ];
|
|
3038
3044
|
})(t));
|
|
3039
3045
|
}
|
|
3040
3046
|
|
|
3041
3047
|
function formatPlainDateTimeIso(e, n) {
|
|
3042
3048
|
return ((e, n, t, o, r, i) => formatIsoDateTimeFields(roundDateTimeToNano(n, r, o), i) + formatCalendar(e, t))(e.calendar, e, ...(e => (e = normalizeOptions(e),
|
|
3043
|
-
[
|
|
3049
|
+
[ dn(e), ...refineTimeDisplayTuple(e) ]))(n));
|
|
3044
3050
|
}
|
|
3045
3051
|
|
|
3046
3052
|
function formatPlainDateIso(e, n) {
|
|
@@ -3066,23 +3072,25 @@ function formatDurationIso(e, n) {
|
|
|
3066
3072
|
...e,
|
|
3067
3073
|
...balanceDayTimeDurationByInc(e, Math.min(getLargestDurationUnit(e), 6), o, t)
|
|
3068
3074
|
}), ((e, n) => {
|
|
3069
|
-
const t =
|
|
3075
|
+
const {sign: t} = e, o = -1 === t ? negateDurationFields(e) : e, {hours: r, minutes: i} = o, [a, s] = divModBigNano(givenFieldsToBigNano(o, 3, pe), A, divModTrunc);
|
|
3076
|
+
checkDurationTimeUnit(a);
|
|
3077
|
+
const c = formatSubsecNano(s, n), u = n >= 0 || !t || c;
|
|
3070
3078
|
return (t < 0 ? "-" : "") + "P" + formatDurationFragments({
|
|
3071
|
-
Y:
|
|
3072
|
-
M:
|
|
3073
|
-
W:
|
|
3074
|
-
D:
|
|
3079
|
+
Y: formatDurationNumber(o.years),
|
|
3080
|
+
M: formatDurationNumber(o.months),
|
|
3081
|
+
W: formatDurationNumber(o.weeks),
|
|
3082
|
+
D: formatDurationNumber(o.days)
|
|
3075
3083
|
}) + (r || i || a || u ? "T" + formatDurationFragments({
|
|
3076
|
-
H:
|
|
3077
|
-
M:
|
|
3078
|
-
S:
|
|
3084
|
+
H: formatDurationNumber(r),
|
|
3085
|
+
M: formatDurationNumber(i),
|
|
3086
|
+
S: formatDurationNumber(a, u) + c
|
|
3079
3087
|
}) : "");
|
|
3080
3088
|
})(e, r);
|
|
3081
3089
|
}
|
|
3082
3090
|
|
|
3083
3091
|
function formatDateLikeIso(e, n, t, o) {
|
|
3084
|
-
const r = getId(e), i = o > 1 || 0 === o && r !==
|
|
3085
|
-
return 1 === o ? r ===
|
|
3092
|
+
const r = getId(e), i = o > 1 || 0 === o && r !== ce;
|
|
3093
|
+
return 1 === o ? r === ce ? n(t) : formatIsoDateFields(t) : i ? formatIsoDateFields(t) + formatCalendarId(r, 2 === o) : n(t);
|
|
3086
3094
|
}
|
|
3087
3095
|
|
|
3088
3096
|
function formatDurationFragments(e) {
|
|
@@ -3099,21 +3107,21 @@ function formatIsoDateTimeFields(e, n) {
|
|
|
3099
3107
|
}
|
|
3100
3108
|
|
|
3101
3109
|
function formatIsoDateFields(e) {
|
|
3102
|
-
return formatIsoYearMonthFields(e) + "-" +
|
|
3110
|
+
return formatIsoYearMonthFields(e) + "-" + k(e.isoDay);
|
|
3103
3111
|
}
|
|
3104
3112
|
|
|
3105
3113
|
function formatIsoYearMonthFields(e) {
|
|
3106
3114
|
const {isoYear: n} = e;
|
|
3107
|
-
return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + "-" +
|
|
3115
|
+
return (n < 0 || n > 9999 ? getSignStr(n) + padNumber(6, Math.abs(n)) : padNumber(4, n)) + "-" + k(e.isoMonth);
|
|
3108
3116
|
}
|
|
3109
3117
|
|
|
3110
3118
|
function formatIsoMonthDayFields(e) {
|
|
3111
|
-
return
|
|
3119
|
+
return k(e.isoMonth) + "-" + k(e.isoDay);
|
|
3112
3120
|
}
|
|
3113
3121
|
|
|
3114
3122
|
function formatIsoTimeFields(e, n) {
|
|
3115
|
-
const t = [
|
|
3116
|
-
return -1 !== n && t.push(
|
|
3123
|
+
const t = [ k(e.isoHour), k(e.isoMinute) ];
|
|
3124
|
+
return -1 !== n && t.push(k(e.isoSecond) + ((e, n, t, o) => formatSubsecNano(e * q + n * z + t, o))(e.isoMillisecond, e.isoMicrosecond, e.isoNanosecond, n)),
|
|
3117
3125
|
t.join(":");
|
|
3118
3126
|
}
|
|
3119
3127
|
|
|
@@ -3121,14 +3129,14 @@ function formatOffsetNano(e, n = 0) {
|
|
|
3121
3129
|
if (1 === n) {
|
|
3122
3130
|
return "";
|
|
3123
3131
|
}
|
|
3124
|
-
const [t, o] = divModFloor(Math.abs(e),
|
|
3125
|
-
return getSignStr(e) +
|
|
3132
|
+
const [t, o] = divModFloor(Math.abs(e), U), [r, i] = divModFloor(o, L), [a, s] = divModFloor(i, A);
|
|
3133
|
+
return getSignStr(e) + k(t) + ":" + k(r) + (a || s ? ":" + k(a) + formatSubsecNano(s) : "");
|
|
3126
3134
|
}
|
|
3127
3135
|
|
|
3128
3136
|
function formatCalendar(e, n) {
|
|
3129
3137
|
if (1 !== n) {
|
|
3130
3138
|
const t = getId(e);
|
|
3131
|
-
if (n > 1 || 0 === n && t !==
|
|
3139
|
+
if (n > 1 || 0 === n && t !== ce) {
|
|
3132
3140
|
return formatCalendarId(t, 2 === n);
|
|
3133
3141
|
}
|
|
3134
3142
|
}
|
|
@@ -3141,23 +3149,19 @@ function formatCalendarId(e, n) {
|
|
|
3141
3149
|
|
|
3142
3150
|
function formatSubsecNano(e, n) {
|
|
3143
3151
|
let t = padNumber(9, e);
|
|
3144
|
-
return t = void 0 === n ? t.replace(
|
|
3152
|
+
return t = void 0 === n ? t.replace(On, "") : t.slice(0, n), t ? "." + t : "";
|
|
3145
3153
|
}
|
|
3146
3154
|
|
|
3147
3155
|
function getSignStr(e) {
|
|
3148
3156
|
return e < 0 ? "-" : "+";
|
|
3149
3157
|
}
|
|
3150
3158
|
|
|
3151
|
-
function
|
|
3159
|
+
function formatDurationNumber(e, n) {
|
|
3152
3160
|
return e || n ? e.toLocaleString("fullwide", {
|
|
3153
3161
|
useGrouping: 0
|
|
3154
3162
|
}) : "";
|
|
3155
3163
|
}
|
|
3156
3164
|
|
|
3157
|
-
function zonedEpochNanoToIso(e, n) {
|
|
3158
|
-
return epochNanoToIso(n, e.getOffsetNanosecondsFor(n));
|
|
3159
|
-
}
|
|
3160
|
-
|
|
3161
3165
|
function _zonedEpochSlotsToIso(e, n) {
|
|
3162
3166
|
const {epochNanoseconds: t} = e, o = (n.getOffsetNanosecondsFor ? n : n(e.timeZone)).getOffsetNanosecondsFor(t), r = epochNanoToIso(t, o);
|
|
3163
3167
|
return {
|
|
@@ -3168,10 +3172,10 @@ function _zonedEpochSlotsToIso(e, n) {
|
|
|
3168
3172
|
}
|
|
3169
3173
|
|
|
3170
3174
|
function buildZonedIsoFields(e, n) {
|
|
3171
|
-
const t =
|
|
3175
|
+
const t = wn(n, e);
|
|
3172
3176
|
return {
|
|
3173
3177
|
calendar: n.calendar,
|
|
3174
|
-
...pluckProps(
|
|
3178
|
+
...pluckProps(Fe, t),
|
|
3175
3179
|
offset: formatOffsetNano(t.offsetNanoseconds),
|
|
3176
3180
|
timeZone: n.timeZone
|
|
3177
3181
|
};
|
|
@@ -3187,7 +3191,7 @@ function getMatchingInstantFor(e, n, t, o = 0, r = 0, i, a) {
|
|
|
3187
3191
|
const r = isoToEpochNano(n);
|
|
3188
3192
|
o && (t = roundToMinute(t));
|
|
3189
3193
|
for (const n of e) {
|
|
3190
|
-
let e =
|
|
3194
|
+
let e = bigNanoToNumber(diffBigNanos(n, r));
|
|
3191
3195
|
if (o && (e = roundToMinute(e)), e === t) {
|
|
3192
3196
|
return n;
|
|
3193
3197
|
}
|
|
@@ -3208,14 +3212,14 @@ function getSingleInstantFor(e, n, t = 0, o = e.getPossibleInstantsFor(n)) {
|
|
|
3208
3212
|
return o[0];
|
|
3209
3213
|
}
|
|
3210
3214
|
if (1 === t) {
|
|
3211
|
-
throw new RangeError(
|
|
3215
|
+
throw new RangeError(M);
|
|
3212
3216
|
}
|
|
3213
3217
|
if (o.length) {
|
|
3214
3218
|
return o[3 === t ? 1 : 0];
|
|
3215
3219
|
}
|
|
3216
3220
|
const r = isoToEpochNano(n), i = ((e, n) => {
|
|
3217
|
-
const t = e.getOffsetNanosecondsFor(
|
|
3218
|
-
return e.getOffsetNanosecondsFor(
|
|
3221
|
+
const t = e.getOffsetNanosecondsFor(addBigNanoAndNumber(n, -W));
|
|
3222
|
+
return validateTimeZoneGap(e.getOffsetNanosecondsFor(addBigNanoAndNumber(n, W)) - t);
|
|
3219
3223
|
})(e, r), a = i * (2 === t ? -1 : 1);
|
|
3220
3224
|
return (o = e.getPossibleInstantsFor(epochNanoToIso(r, a)))[2 === t ? 0 : o.length - 1];
|
|
3221
3225
|
}
|
|
@@ -3224,52 +3228,59 @@ function computeStartOfDay(e, n) {
|
|
|
3224
3228
|
let {epochNanoseconds: t, timeZone: o, calendar: r} = n;
|
|
3225
3229
|
const i = e(o);
|
|
3226
3230
|
return t = getMatchingInstantFor(i, {
|
|
3227
|
-
...
|
|
3228
|
-
...
|
|
3231
|
+
...wn(n, i),
|
|
3232
|
+
...be
|
|
3229
3233
|
}, void 0, 0, 0, 1), createZonedDateTimeSlots(t, o, r);
|
|
3230
3234
|
}
|
|
3231
3235
|
|
|
3232
3236
|
function computeHoursInDay(e, n) {
|
|
3233
3237
|
const t = e(n.timeZone);
|
|
3234
|
-
return
|
|
3238
|
+
return computeTimeInDay(t, wn(n, t), U);
|
|
3235
3239
|
}
|
|
3236
3240
|
|
|
3237
|
-
function
|
|
3241
|
+
function computeTimeInDay(e, n, t) {
|
|
3238
3242
|
n = {
|
|
3239
3243
|
...n,
|
|
3240
|
-
...
|
|
3244
|
+
...be
|
|
3241
3245
|
};
|
|
3242
|
-
const
|
|
3246
|
+
const o = bigNanoToNumber(diffBigNanos(getSingleInstantFor(e, {
|
|
3243
3247
|
...n,
|
|
3244
|
-
...
|
|
3248
|
+
...be
|
|
3245
3249
|
}), getSingleInstantFor(e, {
|
|
3246
3250
|
...moveByIsoDays(n, 1),
|
|
3247
|
-
...
|
|
3248
|
-
})));
|
|
3249
|
-
if (
|
|
3250
|
-
throw new RangeError(
|
|
3251
|
+
...be
|
|
3252
|
+
})), t, 1);
|
|
3253
|
+
if (o <= 0) {
|
|
3254
|
+
throw new RangeError(m);
|
|
3251
3255
|
}
|
|
3252
|
-
return
|
|
3256
|
+
return o;
|
|
3253
3257
|
}
|
|
3254
3258
|
|
|
3255
3259
|
function validateTimeZoneOffset(e) {
|
|
3256
|
-
if (Math.abs(e) >=
|
|
3260
|
+
if (Math.abs(e) >= W) {
|
|
3261
|
+
throw new RangeError(g);
|
|
3262
|
+
}
|
|
3263
|
+
return e;
|
|
3264
|
+
}
|
|
3265
|
+
|
|
3266
|
+
function validateTimeZoneGap(e) {
|
|
3267
|
+
if (e > W) {
|
|
3257
3268
|
throw new RangeError(D$1);
|
|
3258
3269
|
}
|
|
3259
3270
|
return e;
|
|
3260
3271
|
}
|
|
3261
3272
|
|
|
3262
3273
|
function moveInstant(e, n, t) {
|
|
3263
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
3274
|
+
return createInstantSlots(checkEpochNanoInBounds(addBigNanos(n.epochNanoseconds, (e => {
|
|
3264
3275
|
if (durationHasDateParts(e)) {
|
|
3265
|
-
throw new RangeError(
|
|
3276
|
+
throw new RangeError(E);
|
|
3266
3277
|
}
|
|
3267
|
-
return
|
|
3278
|
+
return durationFieldsToBigNano(e, 5);
|
|
3268
3279
|
})(e ? negateDurationFields(t) : t))));
|
|
3269
3280
|
}
|
|
3270
3281
|
|
|
3271
3282
|
function moveZonedDateTime(e, n, t, o, r, i = Object.create(null)) {
|
|
3272
|
-
const a = n(o.timeZone), s =
|
|
3283
|
+
const a = n(o.timeZone), s = moveZonedEpochSlots(e(o.calendar), a, o, t ? negateDurationFields(r) : r, i);
|
|
3273
3284
|
return {
|
|
3274
3285
|
...o,
|
|
3275
3286
|
epochNanoseconds: s
|
|
@@ -3277,24 +3288,20 @@ function moveZonedDateTime(e, n, t, o, r, i = Object.create(null)) {
|
|
|
3277
3288
|
}
|
|
3278
3289
|
|
|
3279
3290
|
function movePlainDateTime(e, n, t, o, r = Object.create(null)) {
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
...moveDateTime(e(t.calendar), t, n ? negateDurationFields(o) : o, r)
|
|
3283
|
-
});
|
|
3291
|
+
const {calendar: i} = t;
|
|
3292
|
+
return createPlainDateTimeSlots(moveDateTime(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
3284
3293
|
}
|
|
3285
3294
|
|
|
3286
3295
|
function movePlainDate(e, n, t, o, r) {
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
...moveDateEfficient(e(t.calendar), t, n ? negateDurationFields(o) : o, r)
|
|
3290
|
-
};
|
|
3296
|
+
const {calendar: i} = t;
|
|
3297
|
+
return createPlainDateSlots(moveDateEfficient(e(i), t, n ? negateDurationFields(o) : o, r), i);
|
|
3291
3298
|
}
|
|
3292
3299
|
|
|
3293
3300
|
function movePlainYearMonth(e, n, t, o, r = Object.create(null)) {
|
|
3294
3301
|
const i = t.calendar, a = e(i);
|
|
3295
3302
|
let s = moveToMonthStart(a, t);
|
|
3296
|
-
n && (o = negateDuration(o)),
|
|
3297
|
-
...
|
|
3303
|
+
n && (o = negateDuration(o)), o.sign < 0 && (s = a.dateAdd(s, {
|
|
3304
|
+
...Me,
|
|
3298
3305
|
months: 1
|
|
3299
3306
|
}), s = moveByIsoDays(s, -1));
|
|
3300
3307
|
const c = a.dateAdd(s, o, r);
|
|
@@ -3305,22 +3312,29 @@ function movePlainTime(e, n, t) {
|
|
|
3305
3312
|
return createPlainTimeSlots(moveTime(n, e ? negateDurationFields(t) : t)[0]);
|
|
3306
3313
|
}
|
|
3307
3314
|
|
|
3308
|
-
function
|
|
3309
|
-
|
|
3315
|
+
function moveRelativeMarker(e, n, t, o) {
|
|
3316
|
+
return o ? {
|
|
3317
|
+
epochNanoseconds: moveZonedEpochSlots(t, o, n, e)
|
|
3318
|
+
} : moveDateTime(t, n, e);
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
function moveZonedEpochSlots(e, n, t, o, r) {
|
|
3322
|
+
const i = durationFieldsToBigNano(o, 5);
|
|
3323
|
+
let a = t.epochNanoseconds;
|
|
3310
3324
|
if (durationHasDateParts(o)) {
|
|
3311
|
-
const
|
|
3312
|
-
|
|
3313
|
-
...moveDateEfficient(e,
|
|
3325
|
+
const s = wn(t, n);
|
|
3326
|
+
a = addBigNanos(getSingleInstantFor(n, {
|
|
3327
|
+
...moveDateEfficient(e, s, {
|
|
3314
3328
|
...o,
|
|
3315
|
-
...
|
|
3329
|
+
...Ne
|
|
3316
3330
|
}, r),
|
|
3317
|
-
...pluckProps(
|
|
3318
|
-
calendar:
|
|
3331
|
+
...pluckProps(ye, s),
|
|
3332
|
+
calendar: ce
|
|
3319
3333
|
}), i);
|
|
3320
3334
|
} else {
|
|
3321
|
-
|
|
3335
|
+
a = addBigNanos(a, i), refineOverflowOptions(r);
|
|
3322
3336
|
}
|
|
3323
|
-
return checkEpochNanoInBounds(
|
|
3337
|
+
return checkEpochNanoInBounds(a);
|
|
3324
3338
|
}
|
|
3325
3339
|
|
|
3326
3340
|
function moveDateTime(e, n, t, o) {
|
|
@@ -3328,7 +3342,7 @@ function moveDateTime(e, n, t, o) {
|
|
|
3328
3342
|
return checkIsoDateTimeInBounds({
|
|
3329
3343
|
...moveDateEfficient(e, n, {
|
|
3330
3344
|
...t,
|
|
3331
|
-
...
|
|
3345
|
+
...Ne,
|
|
3332
3346
|
days: t.days + i
|
|
3333
3347
|
}, o),
|
|
3334
3348
|
...r
|
|
@@ -3340,7 +3354,7 @@ function moveDateEfficient(e, n, t, o) {
|
|
|
3340
3354
|
return e.dateAdd(n, t, o);
|
|
3341
3355
|
}
|
|
3342
3356
|
refineOverflowOptions(o);
|
|
3343
|
-
const r = t.days +
|
|
3357
|
+
const r = t.days + givenFieldsToBigNano(t, 5, pe)[0];
|
|
3344
3358
|
return r ? checkIsoDateInBounds(moveByIsoDays(n, r)) : n;
|
|
3345
3359
|
}
|
|
3346
3360
|
|
|
@@ -3349,87 +3363,87 @@ function moveToMonthStart(e, n) {
|
|
|
3349
3363
|
}
|
|
3350
3364
|
|
|
3351
3365
|
function moveTime(e, n) {
|
|
3352
|
-
const [t, o] =
|
|
3366
|
+
const [t, o] = givenFieldsToBigNano(n, 5, pe), [r, i] = nanoToIsoTimeAndDay(isoTimeFieldsToNano(e) + o);
|
|
3353
3367
|
return [ r, t + i ];
|
|
3354
3368
|
}
|
|
3355
3369
|
|
|
3356
3370
|
function moveByIsoDays(e, n) {
|
|
3357
|
-
return n && (e = epochMilliToIso(isoToEpochMilli(e) + n *
|
|
3371
|
+
return n && (e = epochMilliToIso(isoToEpochMilli(e) + n * R)), e;
|
|
3358
3372
|
}
|
|
3359
3373
|
|
|
3360
|
-
function
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
},
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
function spanDuration(e, n, t, o, r, i, a) {
|
|
3373
|
-
let s = i(o, e);
|
|
3374
|
-
return n && (s = i(s, n)), [ a(o, s, t), r(s) ];
|
|
3374
|
+
function spanDuration(e, n, t, o, r, i) {
|
|
3375
|
+
let a = moveRelativeMarker(e, o, r, i);
|
|
3376
|
+
n && (a = moveRelativeMarker(n, a, r, i));
|
|
3377
|
+
const s = ((e, n, t, o, r) => r ? ((e, n, t, o, r) => {
|
|
3378
|
+
const i = compareBigNanos(o.epochNanoseconds, t.epochNanoseconds);
|
|
3379
|
+
return i ? r < 6 ? diffEpochNanoExact(t.epochNanoseconds, o.epochNanoseconds, r) : diffZonedEpochNanoViaCalendar(e, n, i, t, o, r, void 0) : Me;
|
|
3380
|
+
})(o, r, n, t, e) : ((e, n, t, o) => {
|
|
3381
|
+
const r = isoToEpochNano(n), i = isoToEpochNano(t), a = compareBigNanos(i, r);
|
|
3382
|
+
return a ? o <= 6 ? diffEpochNanoExact(r, i, o) : diffDateTimesViaCalendar(e, a, n, t, o, void 0) : Me;
|
|
3383
|
+
})(o, n, t, e))(t, o, a, r, i);
|
|
3384
|
+
return [ s, relativeMarkerToEpochNano(a, i) ];
|
|
3375
3385
|
}
|
|
3376
3386
|
|
|
3377
3387
|
function addDurations(e, n, t, o, r, i, a) {
|
|
3378
3388
|
const s = e(normalizeOptions(a).relativeTo), c = Math.max(getLargestDurationUnit(r), getLargestDurationUnit(i));
|
|
3379
3389
|
if (c < 6 || 6 === c && (!s || !s.epochNanoseconds)) {
|
|
3380
|
-
return createDurationSlots(((e, n, t, o) => {
|
|
3381
|
-
const r =
|
|
3390
|
+
return createDurationSlots(checkDurationUnits(((e, n, t, o) => {
|
|
3391
|
+
const r = addBigNanos(durationFieldsToBigNano(e), durationFieldsToBigNano(n), o ? -1 : 1);
|
|
3382
3392
|
if (!Number.isFinite(r[0])) {
|
|
3383
|
-
throw new RangeError(
|
|
3393
|
+
throw new RangeError(N);
|
|
3384
3394
|
}
|
|
3385
3395
|
return {
|
|
3386
|
-
...
|
|
3396
|
+
...Me,
|
|
3387
3397
|
...nanoToDurationDayTimeFields(r, t)
|
|
3388
3398
|
};
|
|
3389
|
-
})(r, i, c, o));
|
|
3399
|
+
})(r, i, c, o)));
|
|
3390
3400
|
}
|
|
3391
3401
|
if (!s) {
|
|
3392
|
-
throw new RangeError(
|
|
3402
|
+
throw new RangeError(P);
|
|
3393
3403
|
}
|
|
3394
|
-
return o && (i = negateDurationFields(i)), createDurationSlots(spanDuration(r, i, c, ...
|
|
3404
|
+
return o && (i = negateDurationFields(i)), createDurationSlots(spanDuration(r, i, c, ...createRelativeSystem(n, t, s))[0]);
|
|
3395
3405
|
}
|
|
3396
3406
|
|
|
3397
3407
|
function roundDuration(e, n, t, o, r) {
|
|
3398
3408
|
const i = getLargestDurationUnit(o), [a, s, c, u, l] = ((e, n, t) => {
|
|
3399
|
-
e = normalizeUnitNameOptions(e,
|
|
3400
|
-
let o =
|
|
3401
|
-
const r = t(e[
|
|
3409
|
+
e = normalizeUnitNameOptions(e, He);
|
|
3410
|
+
let o = sn(e);
|
|
3411
|
+
const r = t(e[Je]);
|
|
3402
3412
|
let i = parseRoundingIncInteger(e);
|
|
3403
|
-
const a =
|
|
3404
|
-
let s =
|
|
3413
|
+
const a = hn(e, 7);
|
|
3414
|
+
let s = an(e);
|
|
3405
3415
|
if (void 0 === o && void 0 === s) {
|
|
3406
|
-
throw new RangeError(
|
|
3416
|
+
throw new RangeError(S);
|
|
3407
3417
|
}
|
|
3408
3418
|
return null == s && (s = 0), null == o && (o = Math.max(s, n)), checkLargestSmallestUnit(o, s),
|
|
3409
3419
|
i = refineRoundingInc(i, s, 1), [ o, s, i, a, r ];
|
|
3410
3420
|
})(r, i, e), f = Math.max(i, a);
|
|
3411
3421
|
if (f < 6 || 6 === f && (!l || !l.epochNanoseconds)) {
|
|
3412
|
-
return createDurationSlots(((e, n, t, o, r) => ({
|
|
3413
|
-
...
|
|
3422
|
+
return createDurationSlots(checkDurationUnits(((e, n, t, o, r) => ({
|
|
3423
|
+
...Me,
|
|
3414
3424
|
...balanceDayTimeDuration(e, n, t, o, r)
|
|
3415
|
-
}))(o, a, s, c, u));
|
|
3425
|
+
}))(o, a, s, c, u)));
|
|
3416
3426
|
}
|
|
3417
3427
|
if (!l) {
|
|
3418
|
-
throw new RangeError(
|
|
3428
|
+
throw new RangeError(P);
|
|
3419
3429
|
}
|
|
3420
|
-
const d =
|
|
3421
|
-
let
|
|
3422
|
-
o.weeks && 7 === s && (
|
|
3430
|
+
const d = createRelativeSystem(n, t, l);
|
|
3431
|
+
let p = 0;
|
|
3432
|
+
o.weeks && 7 === s && (p = o.weeks, o = {
|
|
3423
3433
|
...o,
|
|
3424
3434
|
weeks: 0
|
|
3425
3435
|
});
|
|
3426
3436
|
let [h, T] = spanDuration(o, void 0, a, ...d);
|
|
3427
|
-
const
|
|
3428
|
-
if (
|
|
3429
|
-
throw new RangeError(
|
|
3437
|
+
const g = o.sign, D = computeDurationSign(h);
|
|
3438
|
+
if (g && D && g !== D) {
|
|
3439
|
+
throw new RangeError(m);
|
|
3430
3440
|
}
|
|
3431
|
-
return !
|
|
3432
|
-
h.weeks +=
|
|
3441
|
+
return !D || 0 === s && 1 === c || (h = roundRelativeDuration(h, T, a, s, c, u, ...d)),
|
|
3442
|
+
h.weeks += p, createDurationSlots(h);
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
function absDuration(e) {
|
|
3446
|
+
return -1 === e.sign ? negateDuration(e) : e;
|
|
3433
3447
|
}
|
|
3434
3448
|
|
|
3435
3449
|
function negateDuration(e) {
|
|
@@ -3438,28 +3452,23 @@ function negateDuration(e) {
|
|
|
3438
3452
|
|
|
3439
3453
|
function negateDurationFields(e) {
|
|
3440
3454
|
const n = {};
|
|
3441
|
-
for (const t of
|
|
3455
|
+
for (const t of pe) {
|
|
3442
3456
|
n[t] = -1 * e[t] || 0;
|
|
3443
3457
|
}
|
|
3444
3458
|
return n;
|
|
3445
3459
|
}
|
|
3446
3460
|
|
|
3447
|
-
function
|
|
3448
|
-
return
|
|
3449
|
-
var n;
|
|
3450
|
-
}
|
|
3451
|
-
|
|
3452
|
-
function queryDurationBlank(e) {
|
|
3453
|
-
return !Sn(e);
|
|
3461
|
+
function getDurationBlank(e) {
|
|
3462
|
+
return !e.sign;
|
|
3454
3463
|
}
|
|
3455
3464
|
|
|
3456
|
-
function computeDurationSign(e, n =
|
|
3465
|
+
function computeDurationSign(e, n = pe) {
|
|
3457
3466
|
let t = 0;
|
|
3458
3467
|
for (const o of n) {
|
|
3459
3468
|
const n = Math.sign(e[o]);
|
|
3460
3469
|
if (n) {
|
|
3461
3470
|
if (t && t !== n) {
|
|
3462
|
-
throw new RangeError(
|
|
3471
|
+
throw new RangeError(v);
|
|
3463
3472
|
}
|
|
3464
3473
|
t = n;
|
|
3465
3474
|
}
|
|
@@ -3467,24 +3476,33 @@ function computeDurationSign(e, n = de) {
|
|
|
3467
3476
|
return t;
|
|
3468
3477
|
}
|
|
3469
3478
|
|
|
3470
|
-
function
|
|
3471
|
-
|
|
3479
|
+
function checkDurationUnits(e) {
|
|
3480
|
+
for (const n of De) {
|
|
3481
|
+
clampEntity(n, e[n], -Bn, Bn, 1);
|
|
3482
|
+
}
|
|
3483
|
+
return checkDurationTimeUnit(bigNanoToNumber(durationFieldsToBigNano(e), A)), e;
|
|
3472
3484
|
}
|
|
3473
3485
|
|
|
3474
|
-
function
|
|
3475
|
-
|
|
3486
|
+
function checkDurationTimeUnit(e) {
|
|
3487
|
+
if (!Number.isSafeInteger(e)) {
|
|
3488
|
+
throw new RangeError(y);
|
|
3489
|
+
}
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3492
|
+
function durationFieldsToBigNano(e, n = 6) {
|
|
3493
|
+
return givenFieldsToBigNano(e, n, pe);
|
|
3476
3494
|
}
|
|
3477
3495
|
|
|
3478
3496
|
function nanoToDurationDayTimeFields(e, n = 6) {
|
|
3479
|
-
const [t, o] = e, r = nanoToGivenFields(o, n,
|
|
3480
|
-
if (r[
|
|
3481
|
-
throw new RangeError(
|
|
3497
|
+
const [t, o] = e, r = nanoToGivenFields(o, n, pe);
|
|
3498
|
+
if (r[pe[n]] += t * (W / j[n]), !Number.isFinite(r[pe[n]])) {
|
|
3499
|
+
throw new RangeError(N);
|
|
3482
3500
|
}
|
|
3483
3501
|
return r;
|
|
3484
3502
|
}
|
|
3485
3503
|
|
|
3486
3504
|
function nanoToDurationTimeFields(e, n = 5) {
|
|
3487
|
-
return nanoToGivenFields(e, n,
|
|
3505
|
+
return nanoToGivenFields(e, n, pe);
|
|
3488
3506
|
}
|
|
3489
3507
|
|
|
3490
3508
|
function clearDurationFields(e, n) {
|
|
@@ -3492,18 +3510,18 @@ function clearDurationFields(e, n) {
|
|
|
3492
3510
|
...e
|
|
3493
3511
|
};
|
|
3494
3512
|
for (let e = 0; e <= n; e++) {
|
|
3495
|
-
t[
|
|
3513
|
+
t[pe[e]] = 0;
|
|
3496
3514
|
}
|
|
3497
3515
|
return t;
|
|
3498
3516
|
}
|
|
3499
3517
|
|
|
3500
3518
|
function durationHasDateParts(e) {
|
|
3501
|
-
return Boolean(computeDurationSign(e,
|
|
3519
|
+
return Boolean(computeDurationSign(e, ge));
|
|
3502
3520
|
}
|
|
3503
3521
|
|
|
3504
3522
|
function getLargestDurationUnit(e) {
|
|
3505
3523
|
let n = 9;
|
|
3506
|
-
for (;n > 0 && !e[
|
|
3524
|
+
for (;n > 0 && !e[pe[n]]; n--) {}
|
|
3507
3525
|
return n;
|
|
3508
3526
|
}
|
|
3509
3527
|
|
|
@@ -3512,8 +3530,8 @@ function createSplitTuple(e, n) {
|
|
|
3512
3530
|
}
|
|
3513
3531
|
|
|
3514
3532
|
function computePeriod(e) {
|
|
3515
|
-
const n = Math.floor(e /
|
|
3516
|
-
return [ n, n +
|
|
3533
|
+
const n = Math.floor(e / Sn) * Sn;
|
|
3534
|
+
return [ n, n + Sn ];
|
|
3517
3535
|
}
|
|
3518
3536
|
|
|
3519
3537
|
function parseInstant(e) {
|
|
@@ -3533,8 +3551,8 @@ function parseInstant(e) {
|
|
|
3533
3551
|
return n.timeZone && parseOffsetNanoMaybe(n.timeZone, 1), createInstantSlots(isoToEpochNanoWithOffset(checkIsoDateTimeFields(n), t));
|
|
3534
3552
|
}
|
|
3535
3553
|
|
|
3536
|
-
function
|
|
3537
|
-
const n = parseDateTimeLike(
|
|
3554
|
+
function parseRelativeToSlots(e) {
|
|
3555
|
+
const n = parseDateTimeLike(We(e));
|
|
3538
3556
|
if (!n) {
|
|
3539
3557
|
throw new RangeError(failedParse(e));
|
|
3540
3558
|
}
|
|
@@ -3548,7 +3566,7 @@ function parseZonedOrPlainDateTime(e) {
|
|
|
3548
3566
|
}
|
|
3549
3567
|
|
|
3550
3568
|
function parseZonedDateTime(e, n) {
|
|
3551
|
-
const t = parseDateTimeLike(
|
|
3569
|
+
const t = parseDateTimeLike(We(e));
|
|
3552
3570
|
if (!t || !t.timeZone) {
|
|
3553
3571
|
throw new RangeError(failedParse(e));
|
|
3554
3572
|
}
|
|
@@ -3565,7 +3583,7 @@ function parseOffsetNano(e) {
|
|
|
3565
3583
|
}
|
|
3566
3584
|
|
|
3567
3585
|
function parsePlainDateTime(e) {
|
|
3568
|
-
const n = parseDateTimeLike(
|
|
3586
|
+
const n = parseDateTimeLike(We(e));
|
|
3569
3587
|
if (!n || n.o) {
|
|
3570
3588
|
throw new RangeError(failedParse(e));
|
|
3571
3589
|
}
|
|
@@ -3573,7 +3591,7 @@ function parsePlainDateTime(e) {
|
|
|
3573
3591
|
}
|
|
3574
3592
|
|
|
3575
3593
|
function parsePlainDate(e) {
|
|
3576
|
-
const n = parseDateTimeLike(
|
|
3594
|
+
const n = parseDateTimeLike(We(e));
|
|
3577
3595
|
if (!n || n.o) {
|
|
3578
3596
|
throw new RangeError(failedParse(e));
|
|
3579
3597
|
}
|
|
@@ -3581,7 +3599,7 @@ function parsePlainDate(e) {
|
|
|
3581
3599
|
}
|
|
3582
3600
|
|
|
3583
3601
|
function parsePlainYearMonth(e, n) {
|
|
3584
|
-
const t = parseYearMonthOnly(
|
|
3602
|
+
const t = parseYearMonthOnly(We(n));
|
|
3585
3603
|
if (t) {
|
|
3586
3604
|
return requireIsoCalendar(t), createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields(t)));
|
|
3587
3605
|
}
|
|
@@ -3593,13 +3611,13 @@ function parsePlainYearMonth(e, n) {
|
|
|
3593
3611
|
}
|
|
3594
3612
|
|
|
3595
3613
|
function requireIsoCalendar(e) {
|
|
3596
|
-
if (e.calendar !==
|
|
3614
|
+
if (e.calendar !== ce) {
|
|
3597
3615
|
throw new RangeError(invalidSubstring(e.calendar));
|
|
3598
3616
|
}
|
|
3599
3617
|
}
|
|
3600
3618
|
|
|
3601
3619
|
function parsePlainMonthDay(e, n) {
|
|
3602
|
-
const t = parseMonthDayOnly(
|
|
3620
|
+
const t = parseMonthDayOnly(We(n));
|
|
3603
3621
|
if (t) {
|
|
3604
3622
|
return requireIsoCalendar(t), createPlainMonthDaySlots(checkIsoDateFields(t));
|
|
3605
3623
|
}
|
|
@@ -3609,9 +3627,9 @@ function parsePlainMonthDay(e, n) {
|
|
|
3609
3627
|
|
|
3610
3628
|
function parsePlainTime(e) {
|
|
3611
3629
|
let n, t = (e => {
|
|
3612
|
-
const n =
|
|
3630
|
+
const n = $n.exec(e);
|
|
3613
3631
|
return n ? (organizeAnnotationParts(n[10]), organizeTimeParts(n)) : void 0;
|
|
3614
|
-
})(
|
|
3632
|
+
})(We(e));
|
|
3615
3633
|
if (!t) {
|
|
3616
3634
|
if (t = parseDateTimeLike(e), !t) {
|
|
3617
3635
|
throw new RangeError(failedParse(e));
|
|
@@ -3635,12 +3653,12 @@ function parsePlainTime(e) {
|
|
|
3635
3653
|
|
|
3636
3654
|
function parseDuration(e) {
|
|
3637
3655
|
const n = (e => {
|
|
3638
|
-
const n =
|
|
3656
|
+
const n = Gn.exec(e);
|
|
3639
3657
|
return n ? (e => {
|
|
3640
|
-
function parseUnit(e,
|
|
3658
|
+
function parseUnit(e, r, i) {
|
|
3641
3659
|
let a = 0, s = 0;
|
|
3642
|
-
if (i && ([a,
|
|
3643
|
-
if (
|
|
3660
|
+
if (i && ([a, o] = divModFloor(o, j[i])), void 0 !== e) {
|
|
3661
|
+
if (t) {
|
|
3644
3662
|
throw new RangeError(invalidSubstring(e));
|
|
3645
3663
|
}
|
|
3646
3664
|
s = (e => {
|
|
@@ -3649,24 +3667,24 @@ function parseDuration(e) {
|
|
|
3649
3667
|
throw new RangeError(invalidSubstring(e));
|
|
3650
3668
|
}
|
|
3651
3669
|
return n;
|
|
3652
|
-
})(e), n = 1,
|
|
3670
|
+
})(e), n = 1, r && (o = parseSubsecNano(r) * (j[i] / A), t = 1);
|
|
3653
3671
|
}
|
|
3654
3672
|
return a + s;
|
|
3655
3673
|
}
|
|
3656
|
-
let n = 0,
|
|
3657
|
-
...zipProps(
|
|
3658
|
-
...nanoToGivenFields(
|
|
3674
|
+
let n = 0, t = 0, o = 0, r = {
|
|
3675
|
+
...zipProps(pe, [ parseUnit(e[2]), parseUnit(e[3]), parseUnit(e[4]), parseUnit(e[5]), parseUnit(e[6], e[7], 5), parseUnit(e[8], e[9], 4), parseUnit(e[10], e[11], 3) ]),
|
|
3676
|
+
...nanoToGivenFields(o, 2, pe)
|
|
3659
3677
|
};
|
|
3660
3678
|
if (!n) {
|
|
3661
|
-
throw new RangeError(
|
|
3679
|
+
throw new RangeError(noValidFields(pe));
|
|
3662
3680
|
}
|
|
3663
|
-
return parseSign(e[1]) < 0 && (
|
|
3681
|
+
return parseSign(e[1]) < 0 && (r = negateDurationFields(r)), r;
|
|
3664
3682
|
})(n) : void 0;
|
|
3665
|
-
})(
|
|
3683
|
+
})(We(e));
|
|
3666
3684
|
if (!n) {
|
|
3667
3685
|
throw new RangeError(failedParse(e));
|
|
3668
3686
|
}
|
|
3669
|
-
return createDurationSlots(n);
|
|
3687
|
+
return createDurationSlots(checkDurationUnits(n));
|
|
3670
3688
|
}
|
|
3671
3689
|
|
|
3672
3690
|
function parseCalendarId(e) {
|
|
@@ -3676,11 +3694,11 @@ function parseCalendarId(e) {
|
|
|
3676
3694
|
|
|
3677
3695
|
function parseTimeZoneId(e) {
|
|
3678
3696
|
const n = parseDateTimeLike(e);
|
|
3679
|
-
return n && (n.timeZone || n.o &&
|
|
3697
|
+
return n && (n.timeZone || n.o && En || n.offset) || e;
|
|
3680
3698
|
}
|
|
3681
3699
|
|
|
3682
3700
|
function finalizeZonedDateTime(e, n, t = 0, o = 0) {
|
|
3683
|
-
const r = resolveTimeZoneId(e.timeZone), i =
|
|
3701
|
+
const r = resolveTimeZoneId(e.timeZone), i = kn(r);
|
|
3684
3702
|
return createZonedDateTimeSlots(getMatchingInstantFor(i, checkIsoDateTimeFields(e), n, t, o, !i.h, e.o), r, resolveCalendarId(e.calendar));
|
|
3685
3703
|
}
|
|
3686
3704
|
|
|
@@ -3700,7 +3718,7 @@ function resolveSlotsCalendar(e) {
|
|
|
3700
3718
|
}
|
|
3701
3719
|
|
|
3702
3720
|
function parseDateTimeLike(e) {
|
|
3703
|
-
const n =
|
|
3721
|
+
const n = jn.exec(e);
|
|
3704
3722
|
return n ? (e => {
|
|
3705
3723
|
const n = e[10], t = "Z" === (n || "").toUpperCase();
|
|
3706
3724
|
return {
|
|
@@ -3717,7 +3735,7 @@ function parseDateTimeLike(e) {
|
|
|
3717
3735
|
}
|
|
3718
3736
|
|
|
3719
3737
|
function parseYearMonthOnly(e) {
|
|
3720
|
-
const n =
|
|
3738
|
+
const n = Un.exec(e);
|
|
3721
3739
|
return n ? (e => ({
|
|
3722
3740
|
isoYear: organizeIsoYearParts(e),
|
|
3723
3741
|
isoMonth: parseInt(e[4]),
|
|
@@ -3727,9 +3745,9 @@ function parseYearMonthOnly(e) {
|
|
|
3727
3745
|
}
|
|
3728
3746
|
|
|
3729
3747
|
function parseMonthDayOnly(e) {
|
|
3730
|
-
const n =
|
|
3748
|
+
const n = Wn.exec(e);
|
|
3731
3749
|
return n ? (e => ({
|
|
3732
|
-
isoYear:
|
|
3750
|
+
isoYear: qe,
|
|
3733
3751
|
isoMonth: parseInt(e[1]),
|
|
3734
3752
|
isoDay: parseInt(e[2]),
|
|
3735
3753
|
...organizeAnnotationParts(e[3])
|
|
@@ -3737,13 +3755,13 @@ function parseMonthDayOnly(e) {
|
|
|
3737
3755
|
}
|
|
3738
3756
|
|
|
3739
3757
|
function parseOffsetNanoMaybe(e, n) {
|
|
3740
|
-
const t =
|
|
3758
|
+
const t = xn.exec(e);
|
|
3741
3759
|
return t ? ((e, n) => {
|
|
3742
3760
|
const t = e[4] || e[5];
|
|
3743
3761
|
if (n && t) {
|
|
3744
3762
|
throw new RangeError(invalidSubstring(t));
|
|
3745
3763
|
}
|
|
3746
|
-
return validateTimeZoneOffset((parseInt0(e[2]) *
|
|
3764
|
+
return validateTimeZoneOffset((parseInt0(e[2]) * U + parseInt0(e[3]) * L + parseInt0(e[4]) * A + parseSubsecNano(e[5] || "")) * parseSign(e[1]));
|
|
3747
3765
|
})(t, n) : void 0;
|
|
3748
3766
|
}
|
|
3749
3767
|
|
|
@@ -3768,7 +3786,7 @@ function organizeTimeParts(e) {
|
|
|
3768
3786
|
function organizeAnnotationParts(e) {
|
|
3769
3787
|
let n, t;
|
|
3770
3788
|
const o = [];
|
|
3771
|
-
if (e.replace(
|
|
3789
|
+
if (e.replace(Hn, ((e, r, i) => {
|
|
3772
3790
|
const a = Boolean(r), [s, c] = i.split("=").reverse();
|
|
3773
3791
|
if (c) {
|
|
3774
3792
|
if ("u-ca" === c) {
|
|
@@ -3788,7 +3806,7 @@ function organizeAnnotationParts(e) {
|
|
|
3788
3806
|
}
|
|
3789
3807
|
return {
|
|
3790
3808
|
timeZone: t,
|
|
3791
|
-
calendar: o[0] ||
|
|
3809
|
+
calendar: o[0] || ce
|
|
3792
3810
|
};
|
|
3793
3811
|
}
|
|
3794
3812
|
|
|
@@ -3810,40 +3828,45 @@ function parseInt0(e) {
|
|
|
3810
3828
|
|
|
3811
3829
|
function resolveTimeZoneId(e) {
|
|
3812
3830
|
const n = getTimeZoneEssence(e);
|
|
3813
|
-
return "number" == typeof n ? formatOffsetNano(n) : n ? (e =>
|
|
3831
|
+
return "number" == typeof n ? formatOffsetNano(n) : n ? (e => {
|
|
3832
|
+
if (_n.test(e)) {
|
|
3833
|
+
throw new RangeError(T);
|
|
3834
|
+
}
|
|
3835
|
+
return e.toLowerCase().split("/").map(((e, n) => (e.length <= 3 || /\d/.test(e)) && !/etc|yap/.test(e) ? e.toUpperCase() : e.replace(/baja|dumont|[a-z]+/g, ((e, t) => e.length <= 2 && !n || "in" === e || "chat" === e ? e.toUpperCase() : e.length > 2 || !t ? capitalize(e).replace(/island|noronha|murdo|rivadavia|urville/, capitalize) : e)))).join("/");
|
|
3836
|
+
})(e) : En;
|
|
3814
3837
|
}
|
|
3815
3838
|
|
|
3816
3839
|
function getTimeZoneAtomic(e) {
|
|
3817
3840
|
const n = getTimeZoneEssence(e);
|
|
3818
|
-
return "number" == typeof n ? n : n ? n.resolvedOptions().timeZone :
|
|
3841
|
+
return "number" == typeof n ? n : n ? n.resolvedOptions().timeZone : En;
|
|
3819
3842
|
}
|
|
3820
3843
|
|
|
3821
3844
|
function getTimeZoneEssence(e) {
|
|
3822
3845
|
const n = parseOffsetNanoMaybe(e = e.toUpperCase(), 1);
|
|
3823
|
-
return void 0 !== n ? n : e !==
|
|
3846
|
+
return void 0 !== n ? n : e !== En ? Vn(e) : void 0;
|
|
3824
3847
|
}
|
|
3825
3848
|
|
|
3826
3849
|
function compareInstants(e, n) {
|
|
3827
|
-
return
|
|
3850
|
+
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3828
3851
|
}
|
|
3829
3852
|
|
|
3830
3853
|
function compareZonedDateTimes(e, n) {
|
|
3831
|
-
return
|
|
3854
|
+
return compareBigNanos(e.epochNanoseconds, n.epochNanoseconds);
|
|
3832
3855
|
}
|
|
3833
3856
|
|
|
3834
3857
|
function compareDurations(e, n, t, o, r, i) {
|
|
3835
3858
|
const a = e(normalizeOptions(i).relativeTo), s = Math.max(getLargestDurationUnit(o), getLargestDurationUnit(r));
|
|
3836
|
-
if (allPropsEqual(
|
|
3859
|
+
if (allPropsEqual(pe, o, r)) {
|
|
3837
3860
|
return 0;
|
|
3838
3861
|
}
|
|
3839
3862
|
if (s < 6 || 6 === s && (!a || !a.epochNanoseconds)) {
|
|
3840
|
-
return
|
|
3863
|
+
return compareBigNanos(givenFieldsToBigNano(o, 6, pe), givenFieldsToBigNano(r, 6, pe));
|
|
3841
3864
|
}
|
|
3842
3865
|
if (!a) {
|
|
3843
|
-
throw new RangeError(
|
|
3866
|
+
throw new RangeError(P);
|
|
3844
3867
|
}
|
|
3845
|
-
const [c, u, l] =
|
|
3846
|
-
return
|
|
3868
|
+
const [c, u, l] = createRelativeSystem(n, t, a);
|
|
3869
|
+
return compareBigNanos(relativeMarkerToEpochNano(moveRelativeMarker(o, c, u, l), l), relativeMarkerToEpochNano(moveRelativeMarker(r, c, u, l), l));
|
|
3847
3870
|
}
|
|
3848
3871
|
|
|
3849
3872
|
function compareIsoDateTimeFields(e, n) {
|
|
@@ -3905,38 +3928,38 @@ function diffInstants(e, n, t, o) {
|
|
|
3905
3928
|
}
|
|
3906
3929
|
|
|
3907
3930
|
function diffZonedDateTimes(e, n, t, o, r, i) {
|
|
3908
|
-
const a = getCommonCalendarSlot(o.calendar, r.calendar), s = copyOptions(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p =
|
|
3909
|
-
let
|
|
3931
|
+
const a = getCommonCalendarSlot(o.calendar, r.calendar), s = copyOptions(i), [c, u, l, f] = refineDiffOptions(t, s, 5), d = o.epochNanoseconds, m = r.epochNanoseconds, p = compareBigNanos(m, d);
|
|
3932
|
+
let T;
|
|
3910
3933
|
if (p) {
|
|
3911
3934
|
if (c < 6) {
|
|
3912
|
-
|
|
3935
|
+
T = diffEpochNano(d, m, c, u, l, f);
|
|
3913
3936
|
} else {
|
|
3914
3937
|
const t = n(((e, n) => {
|
|
3915
3938
|
if (!isTimeZoneSlotsEqual(e, n)) {
|
|
3916
|
-
throw new RangeError(
|
|
3939
|
+
throw new RangeError(h);
|
|
3917
3940
|
}
|
|
3918
3941
|
return e;
|
|
3919
3942
|
})(o.timeZone, r.timeZone)), i = e(a);
|
|
3920
|
-
|
|
3943
|
+
T = diffZonedEpochNanoViaCalendar(i, t, p, o, r, c, s), !p || 0 === u && 1 === l || (T = roundRelativeDuration(T, m, c, u, l, f, o, i, t));
|
|
3921
3944
|
}
|
|
3922
3945
|
} else {
|
|
3923
|
-
|
|
3946
|
+
T = Me;
|
|
3924
3947
|
}
|
|
3925
|
-
return createDurationSlots(t ? negateDurationFields(
|
|
3948
|
+
return createDurationSlots(t ? negateDurationFields(T) : T);
|
|
3926
3949
|
}
|
|
3927
3950
|
|
|
3928
3951
|
function diffPlainDateTimes(e, n, t, o, r) {
|
|
3929
|
-
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m =
|
|
3952
|
+
const i = getCommonCalendarSlot(t.calendar, o.calendar), a = copyOptions(r), [s, c, u, l] = refineDiffOptions(n, a, 6), f = isoToEpochNano(t), d = isoToEpochNano(o), m = compareBigNanos(d, f);
|
|
3930
3953
|
let p;
|
|
3931
3954
|
if (m) {
|
|
3932
3955
|
if (s <= 6) {
|
|
3933
3956
|
p = diffEpochNano(f, d, s, c, u, l);
|
|
3934
3957
|
} else {
|
|
3935
3958
|
const n = e(i);
|
|
3936
|
-
p = diffDateTimesViaCalendar(n, m, t, o, s, a), !m || 0 === c && 1 === u || (p = roundRelativeDuration(p, d, s, c, u, l, t,
|
|
3959
|
+
p = diffDateTimesViaCalendar(n, m, t, o, s, a), !m || 0 === c && 1 === u || (p = roundRelativeDuration(p, d, s, c, u, l, t, n));
|
|
3937
3960
|
}
|
|
3938
3961
|
} else {
|
|
3939
|
-
p =
|
|
3962
|
+
p = Me;
|
|
3940
3963
|
}
|
|
3941
3964
|
return createDurationSlots(n ? negateDurationFields(p) : p);
|
|
3942
3965
|
}
|
|
@@ -3954,62 +3977,55 @@ function diffPlainYearMonth(e, n, t, o, r) {
|
|
|
3954
3977
|
function diffDateLike(e, n, t, o, r, i, a, s, c) {
|
|
3955
3978
|
const u = isoToEpochNano(t), l = isoToEpochNano(o);
|
|
3956
3979
|
let f;
|
|
3957
|
-
if (
|
|
3980
|
+
if (compareBigNanos(l, u)) {
|
|
3958
3981
|
let e;
|
|
3959
3982
|
6 === r ? f = diffByDay(t, o) : (e = n(), f = e.dateUntil(t, o, r, c)), 6 === i && 1 === a || (e || (e = n()),
|
|
3960
|
-
f = roundRelativeDuration(f, l, r, i, a, s,
|
|
3983
|
+
f = roundRelativeDuration(f, l, r, i, a, s, {
|
|
3984
|
+
...t,
|
|
3985
|
+
...be
|
|
3986
|
+
}, e));
|
|
3961
3987
|
} else {
|
|
3962
|
-
f =
|
|
3988
|
+
f = Me;
|
|
3963
3989
|
}
|
|
3964
3990
|
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3965
3991
|
}
|
|
3966
3992
|
|
|
3967
3993
|
function diffPlainTimes(e, n, t, o) {
|
|
3968
3994
|
const r = copyOptions(o), [i, a, s, c] = refineDiffOptions(e, r, 5, 5), u = isoTimeFieldsToNano(n), l = roundByInc(isoTimeFieldsToNano(t) - u, computeNanoInc(a, s), c), f = {
|
|
3969
|
-
...
|
|
3995
|
+
...Me,
|
|
3970
3996
|
...nanoToDurationTimeFields(l, i)
|
|
3971
3997
|
};
|
|
3972
3998
|
return createDurationSlots(e ? negateDurationFields(f) : f);
|
|
3973
3999
|
}
|
|
3974
4000
|
|
|
3975
|
-
function diffZonedEpochNanoExact(e, n, t, o, r, i) {
|
|
3976
|
-
const a = compareDayTimeNanos(o, t);
|
|
3977
|
-
return a ? r < 6 ? diffEpochNanoExact(t, o, r) : diffZonedEpochNanoViaCalendar(e, n, a, t, o, r, i) : De;
|
|
3978
|
-
}
|
|
3979
|
-
|
|
3980
|
-
function diffDateTimesExact(e, n, t, o, r) {
|
|
3981
|
-
const i = isoToEpochNano(n), a = isoToEpochNano(t), s = compareDayTimeNanos(a, i);
|
|
3982
|
-
return s ? o <= 6 ? diffEpochNanoExact(i, a, o) : diffDateTimesViaCalendar(e, s, n, t, o, r) : De;
|
|
3983
|
-
}
|
|
3984
|
-
|
|
3985
4001
|
function diffZonedEpochNanoViaCalendar(e, n, t, o, r, i, a) {
|
|
3986
|
-
const s =
|
|
3987
|
-
let
|
|
4002
|
+
const s = wn(o, n), c = pluckProps(ye, s), u = wn(r, n), l = r.epochNanoseconds, f = bindArgs(getSingleInstantFor, n);
|
|
4003
|
+
let d, p, h, T = 0;
|
|
3988
4004
|
do {
|
|
3989
|
-
if (
|
|
3990
|
-
throw new RangeError(
|
|
4005
|
+
if (T > 2) {
|
|
4006
|
+
throw new RangeError(m);
|
|
3991
4007
|
}
|
|
3992
|
-
|
|
3993
|
-
...moveByIsoDays(u,
|
|
4008
|
+
d = {
|
|
4009
|
+
...moveByIsoDays(u, T++ * -t),
|
|
3994
4010
|
...c
|
|
3995
|
-
},
|
|
3996
|
-
} while (
|
|
4011
|
+
}, p = f(d), h = compareBigNanos(l, p);
|
|
4012
|
+
} while (h === -t);
|
|
3997
4013
|
return {
|
|
3998
|
-
...6 === i ? diffByDay(s,
|
|
3999
|
-
...nanoToDurationTimeFields(
|
|
4014
|
+
...6 === i ? diffByDay(s, d) : e.dateUntil(s, d, i, a),
|
|
4015
|
+
...nanoToDurationTimeFields(bigNanoToNumber(diffBigNanos(p, l)))
|
|
4000
4016
|
};
|
|
4001
4017
|
}
|
|
4002
4018
|
|
|
4003
4019
|
function diffDateTimesViaCalendar(e, n, t, o, r, i) {
|
|
4004
4020
|
const a = isoTimeFieldsToNano(t);
|
|
4005
4021
|
let s = isoTimeFieldsToNano(o) - a, c = t;
|
|
4006
|
-
return Math.sign(s) === -n && (c = moveByIsoDays(t, n), s +=
|
|
4022
|
+
return Math.sign(s) === -n && (c = moveByIsoDays(t, n), s += W * n), {
|
|
4007
4023
|
...e.dateUntil({
|
|
4008
4024
|
...c,
|
|
4009
|
-
...
|
|
4025
|
+
...be
|
|
4010
4026
|
}, {
|
|
4011
4027
|
...o,
|
|
4012
|
-
...
|
|
4028
|
+
...be
|
|
4013
4029
|
}, r, i),
|
|
4014
4030
|
...nanoToDurationTimeFields(s)
|
|
4015
4031
|
};
|
|
@@ -4017,21 +4033,21 @@ function diffDateTimesViaCalendar(e, n, t, o, r, i) {
|
|
|
4017
4033
|
|
|
4018
4034
|
function diffEpochNano(e, n, t, o, r, i) {
|
|
4019
4035
|
return {
|
|
4020
|
-
...
|
|
4021
|
-
...nanoToDurationDayTimeFields(
|
|
4036
|
+
...Me,
|
|
4037
|
+
...nanoToDurationDayTimeFields(roundBigNano(diffBigNanos(e, n), o, r, i), t)
|
|
4022
4038
|
};
|
|
4023
4039
|
}
|
|
4024
4040
|
|
|
4025
4041
|
function diffEpochNanoExact(e, n, t) {
|
|
4026
4042
|
return {
|
|
4027
|
-
...
|
|
4028
|
-
...nanoToDurationDayTimeFields(
|
|
4043
|
+
...Me,
|
|
4044
|
+
...nanoToDurationDayTimeFields(diffBigNanos(e, n), t)
|
|
4029
4045
|
};
|
|
4030
4046
|
}
|
|
4031
4047
|
|
|
4032
4048
|
function diffByDay(e, n) {
|
|
4033
4049
|
return {
|
|
4034
|
-
...
|
|
4050
|
+
...Me,
|
|
4035
4051
|
days: diffDays(e, n)
|
|
4036
4052
|
};
|
|
4037
4053
|
}
|
|
@@ -4041,12 +4057,12 @@ function diffDays(e, n) {
|
|
|
4041
4057
|
}
|
|
4042
4058
|
|
|
4043
4059
|
function diffEpochMilliByDay(e, n) {
|
|
4044
|
-
return Math.round((n - e) /
|
|
4060
|
+
return Math.round((n - e) / R);
|
|
4045
4061
|
}
|
|
4046
4062
|
|
|
4047
4063
|
function getCommonCalendarSlot(e, n) {
|
|
4048
4064
|
if (!isIdLikeEqual(e, n)) {
|
|
4049
|
-
throw new RangeError(
|
|
4065
|
+
throw new RangeError(p);
|
|
4050
4066
|
}
|
|
4051
4067
|
return e;
|
|
4052
4068
|
}
|
|
@@ -4059,7 +4075,7 @@ function createIntlCalendar(e) {
|
|
|
4059
4075
|
day: parseInt(e.day)
|
|
4060
4076
|
}))(hashIntlFormatParts(n, e), t);
|
|
4061
4077
|
}
|
|
4062
|
-
const n =
|
|
4078
|
+
const n = Kn(e), t = computeCalendarIdBase(e);
|
|
4063
4079
|
return {
|
|
4064
4080
|
id: e,
|
|
4065
4081
|
I: createIntlFieldCache(epochMilliToIntlFields),
|
|
@@ -4068,26 +4084,26 @@ function createIntlCalendar(e) {
|
|
|
4068
4084
|
}
|
|
4069
4085
|
|
|
4070
4086
|
function createIntlFieldCache(e) {
|
|
4071
|
-
return
|
|
4087
|
+
return memoize((n => {
|
|
4072
4088
|
const t = isoToEpochMilli(n);
|
|
4073
4089
|
return e(t);
|
|
4074
4090
|
}), WeakMap);
|
|
4075
4091
|
}
|
|
4076
4092
|
|
|
4077
4093
|
function createIntlYearMonthCache(e) {
|
|
4078
|
-
const n = e(0).year -
|
|
4079
|
-
return
|
|
4094
|
+
const n = e(0).year - ze;
|
|
4095
|
+
return memoize((t => {
|
|
4080
4096
|
let o, r = isoArgsToEpochMilli(t - n);
|
|
4081
4097
|
const i = [], a = [];
|
|
4082
4098
|
do {
|
|
4083
|
-
r += 400 *
|
|
4099
|
+
r += 400 * R;
|
|
4084
4100
|
} while ((o = e(r)).year <= t);
|
|
4085
4101
|
do {
|
|
4086
|
-
r += (1 - o.day) *
|
|
4102
|
+
r += (1 - o.day) * R, o.year === t && (i.push(r), a.push(o.month)), r -= R;
|
|
4087
4103
|
} while ((o = e(r)).year >= t);
|
|
4088
4104
|
return {
|
|
4089
|
-
|
|
4090
|
-
|
|
4105
|
+
v: i.reverse(),
|
|
4106
|
+
P: w(a.reverse())
|
|
4091
4107
|
};
|
|
4092
4108
|
}));
|
|
4093
4109
|
}
|
|
@@ -4095,9 +4111,9 @@ function createIntlYearMonthCache(e) {
|
|
|
4095
4111
|
function parseIntlYear(e, n) {
|
|
4096
4112
|
let t, o, r = parseIntlPartsYear(e);
|
|
4097
4113
|
if (e.era) {
|
|
4098
|
-
const a =
|
|
4114
|
+
const a = fe[n];
|
|
4099
4115
|
void 0 !== a && (i = (i = e.era).normalize("NFD").toLowerCase().replace(/[^a-z0-9]/g, ""),
|
|
4100
|
-
t =
|
|
4116
|
+
t = de[i] || i, o = r, r = eraYearToYear(o, a[t] || 0));
|
|
4101
4117
|
}
|
|
4102
4118
|
var i;
|
|
4103
4119
|
return {
|
|
@@ -4112,12 +4128,12 @@ function parseIntlPartsYear(e) {
|
|
|
4112
4128
|
}
|
|
4113
4129
|
|
|
4114
4130
|
function computeIntlDateParts(e) {
|
|
4115
|
-
const {year: n, month: t, day: o} = this.I(e), {
|
|
4131
|
+
const {year: n, month: t, day: o} = this.I(e), {P: r} = this.N(n);
|
|
4116
4132
|
return [ n, r[t] + 1, o ];
|
|
4117
4133
|
}
|
|
4118
4134
|
|
|
4119
4135
|
function computeIntlEpochMilli(e, n = 1, t = 1) {
|
|
4120
|
-
return this.N(e).
|
|
4136
|
+
return this.N(e).v[n - 1] + (t - 1) * R;
|
|
4121
4137
|
}
|
|
4122
4138
|
|
|
4123
4139
|
function computeIntlLeapMonth(e) {
|
|
@@ -4140,32 +4156,40 @@ function computeIntlDaysInYear(e) {
|
|
|
4140
4156
|
}
|
|
4141
4157
|
|
|
4142
4158
|
function computeIntlDaysInMonth(e, n) {
|
|
4143
|
-
const {
|
|
4159
|
+
const {v: t} = this.N(e);
|
|
4144
4160
|
let o = n + 1, r = t;
|
|
4145
|
-
return o > t.length && (o = 1, r = this.N(e + 1).
|
|
4161
|
+
return o > t.length && (o = 1, r = this.N(e + 1).v), diffEpochMilliByDay(t[n - 1], r[o - 1]);
|
|
4146
4162
|
}
|
|
4147
4163
|
|
|
4148
4164
|
function computeIntlMonthsInYear(e) {
|
|
4149
|
-
return this.N(e).
|
|
4165
|
+
return this.N(e).v.length;
|
|
4150
4166
|
}
|
|
4151
4167
|
|
|
4152
4168
|
function queryMonthStrs(e, n) {
|
|
4153
|
-
return Object.keys(e.N(n).
|
|
4169
|
+
return Object.keys(e.N(n).P);
|
|
4154
4170
|
}
|
|
4155
4171
|
|
|
4156
4172
|
function resolveCalendarId(e) {
|
|
4157
|
-
if ((e =
|
|
4173
|
+
if ((e = e.toLowerCase()) !== ce && e !== ue && computeCalendarIdBase(e) !== computeCalendarIdBase(Kn(e).resolvedOptions().calendar)) {
|
|
4158
4174
|
throw new RangeError(invalidCalendar(e));
|
|
4159
4175
|
}
|
|
4160
4176
|
return e;
|
|
4161
4177
|
}
|
|
4162
4178
|
|
|
4163
4179
|
function computeCalendarIdBase(e) {
|
|
4164
|
-
return e.split("-")[0];
|
|
4180
|
+
return "islamicc" === e && (e = "islamic"), e.split("-")[0];
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
function computeNativeWeekOfYear(e) {
|
|
4184
|
+
return this.F(e)[0];
|
|
4185
|
+
}
|
|
4186
|
+
|
|
4187
|
+
function computeNativeYearOfWeek(e) {
|
|
4188
|
+
return this.F(e)[1];
|
|
4165
4189
|
}
|
|
4166
4190
|
|
|
4167
4191
|
function parseMonthCode(e) {
|
|
4168
|
-
const n =
|
|
4192
|
+
const n = Qn.exec(e);
|
|
4169
4193
|
if (!n) {
|
|
4170
4194
|
throw new RangeError(invalidMonthCode(e));
|
|
4171
4195
|
}
|
|
@@ -4185,19 +4209,19 @@ function eraYearToYear(e, n) {
|
|
|
4185
4209
|
}
|
|
4186
4210
|
|
|
4187
4211
|
function getCalendarEraOrigins(e) {
|
|
4188
|
-
return
|
|
4212
|
+
return fe[getCalendarIdBase(e)];
|
|
4189
4213
|
}
|
|
4190
4214
|
|
|
4191
4215
|
function getCalendarLeapMonthMeta(e) {
|
|
4192
|
-
return
|
|
4216
|
+
return me[getCalendarIdBase(e)];
|
|
4193
4217
|
}
|
|
4194
4218
|
|
|
4195
4219
|
function getCalendarIdBase(e) {
|
|
4196
|
-
return computeCalendarIdBase(e.id ||
|
|
4220
|
+
return computeCalendarIdBase(e.id || ce);
|
|
4197
4221
|
}
|
|
4198
4222
|
|
|
4199
4223
|
function refineMaybeZonedDateTimeBag(e, n, t, o) {
|
|
4200
|
-
const r = refineCalendarFields(t, o,
|
|
4224
|
+
const r = refineCalendarFields(t, o, re, [], _);
|
|
4201
4225
|
if (void 0 !== r.timeZone) {
|
|
4202
4226
|
const o = t.dateFromFields(r), i = refineTimeBag(r), a = e(r.timeZone);
|
|
4203
4227
|
return {
|
|
@@ -4210,12 +4234,12 @@ function refineMaybeZonedDateTimeBag(e, n, t, o) {
|
|
|
4210
4234
|
}
|
|
4211
4235
|
return {
|
|
4212
4236
|
...t.dateFromFields(r),
|
|
4213
|
-
...
|
|
4237
|
+
...be
|
|
4214
4238
|
};
|
|
4215
4239
|
}
|
|
4216
4240
|
|
|
4217
4241
|
function refineZonedDateTimeBag(e, n, t, o, r, i) {
|
|
4218
|
-
const a = refineCalendarFields(t, r,
|
|
4242
|
+
const a = refineCalendarFields(t, r, re, G, _), s = e(a.timeZone), [c, u, l] = refineZonedFieldOptions(i), f = t.dateFromFields(a, overrideOverflowOptions(i, c)), d = refineTimeBag(a, c);
|
|
4219
4243
|
return createZonedDateTimeSlots(getMatchingInstantFor(n(s), {
|
|
4220
4244
|
...f,
|
|
4221
4245
|
...d
|
|
@@ -4223,7 +4247,7 @@ function refineZonedDateTimeBag(e, n, t, o, r, i) {
|
|
|
4223
4247
|
}
|
|
4224
4248
|
|
|
4225
4249
|
function refinePlainDateTimeBag(e, n, t) {
|
|
4226
|
-
const o = refineCalendarFields(e, n,
|
|
4250
|
+
const o = refineCalendarFields(e, n, re, [], $), r = refineOverflowOptions(t);
|
|
4227
4251
|
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4228
4252
|
...e.dateFromFields(o, overrideOverflowOptions(t, r)),
|
|
4229
4253
|
...refineTimeBag(o, r)
|
|
@@ -4231,30 +4255,30 @@ function refinePlainDateTimeBag(e, n, t) {
|
|
|
4231
4255
|
}
|
|
4232
4256
|
|
|
4233
4257
|
function refinePlainDateBag(e, n, t, o = []) {
|
|
4234
|
-
const r = refineCalendarFields(e, n,
|
|
4258
|
+
const r = refineCalendarFields(e, n, re, o);
|
|
4235
4259
|
return e.dateFromFields(r, t);
|
|
4236
4260
|
}
|
|
4237
4261
|
|
|
4238
4262
|
function refinePlainYearMonthBag(e, n, t, o) {
|
|
4239
|
-
const r = refineCalendarFields(e, n,
|
|
4263
|
+
const r = refineCalendarFields(e, n, te, o);
|
|
4240
4264
|
return e.yearMonthFromFields(r, t);
|
|
4241
4265
|
}
|
|
4242
4266
|
|
|
4243
4267
|
function refinePlainMonthDayBag(e, n, t, o, r = []) {
|
|
4244
|
-
const i = refineCalendarFields(e, t,
|
|
4245
|
-
return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year =
|
|
4268
|
+
const i = refineCalendarFields(e, t, re, r);
|
|
4269
|
+
return n && void 0 !== i.month && void 0 === i.monthCode && void 0 === i.year && (i.year = qe),
|
|
4246
4270
|
e.monthDayFromFields(i, o);
|
|
4247
4271
|
}
|
|
4248
4272
|
|
|
4249
4273
|
function refinePlainTimeBag(e, n) {
|
|
4250
4274
|
const t = refineOverflowOptions(n);
|
|
4251
|
-
return createPlainTimeSlots(refineTimeBag(refineFields(e,
|
|
4275
|
+
return createPlainTimeSlots(refineTimeBag(refineFields(e, x, [], 1), t));
|
|
4252
4276
|
}
|
|
4253
4277
|
|
|
4254
4278
|
function refineDurationBag(e) {
|
|
4255
|
-
const n = refineFields(e,
|
|
4256
|
-
return createDurationSlots(
|
|
4257
|
-
...
|
|
4279
|
+
const n = refineFields(e, he);
|
|
4280
|
+
return createDurationSlots(checkDurationUnits({
|
|
4281
|
+
...Me,
|
|
4258
4282
|
...n
|
|
4259
4283
|
}));
|
|
4260
4284
|
}
|
|
@@ -4263,36 +4287,36 @@ function refineCalendarFields(e, n, t, o = [], r = []) {
|
|
|
4263
4287
|
return refineFields(n, [ ...e.fields(t), ...r ].sort(), o);
|
|
4264
4288
|
}
|
|
4265
4289
|
|
|
4266
|
-
function refineFields(e, n,
|
|
4267
|
-
const
|
|
4268
|
-
let
|
|
4269
|
-
for (const
|
|
4270
|
-
if (
|
|
4271
|
-
throw new RangeError(duplicateFields(
|
|
4290
|
+
function refineFields(e, n, t, o = !t) {
|
|
4291
|
+
const r = {};
|
|
4292
|
+
let i, a = 0;
|
|
4293
|
+
for (const o of n) {
|
|
4294
|
+
if (o === i) {
|
|
4295
|
+
throw new RangeError(duplicateFields(o));
|
|
4272
4296
|
}
|
|
4273
|
-
if ("constructor" ===
|
|
4274
|
-
throw new RangeError(forbiddenField(
|
|
4297
|
+
if ("constructor" === o || "__proto__" === o) {
|
|
4298
|
+
throw new RangeError(forbiddenField(o));
|
|
4275
4299
|
}
|
|
4276
|
-
let n = e[
|
|
4300
|
+
let n = e[o];
|
|
4277
4301
|
if (void 0 !== n) {
|
|
4278
|
-
|
|
4279
|
-
} else if (
|
|
4280
|
-
if (
|
|
4281
|
-
throw new TypeError(missingField(
|
|
4302
|
+
a = 1, tt[o] && (n = tt[o](n, o)), r[o] = n;
|
|
4303
|
+
} else if (t) {
|
|
4304
|
+
if (t.includes(o)) {
|
|
4305
|
+
throw new TypeError(missingField(o));
|
|
4282
4306
|
}
|
|
4283
|
-
|
|
4307
|
+
r[o] = se[o];
|
|
4284
4308
|
}
|
|
4285
|
-
|
|
4309
|
+
i = o;
|
|
4286
4310
|
}
|
|
4287
|
-
if (
|
|
4288
|
-
throw new TypeError(
|
|
4311
|
+
if (o && !a) {
|
|
4312
|
+
throw new TypeError(noValidFields(n));
|
|
4289
4313
|
}
|
|
4290
|
-
return
|
|
4314
|
+
return r;
|
|
4291
4315
|
}
|
|
4292
4316
|
|
|
4293
4317
|
function refineTimeBag(e, n) {
|
|
4294
|
-
return constrainIsoTimeFields(
|
|
4295
|
-
...
|
|
4318
|
+
return constrainIsoTimeFields(ot({
|
|
4319
|
+
...se,
|
|
4296
4320
|
...e
|
|
4297
4321
|
}), n);
|
|
4298
4322
|
}
|
|
@@ -4300,7 +4324,7 @@ function refineTimeBag(e, n) {
|
|
|
4300
4324
|
function zonedDateTimeWithFields(e, n, t, o, r, i) {
|
|
4301
4325
|
const a = copyOptions(i), {calendar: s, timeZone: c} = t;
|
|
4302
4326
|
return createZonedDateTimeSlots(((e, n, t, o, r) => {
|
|
4303
|
-
const i = mergeCalendarFields(e, t, o,
|
|
4327
|
+
const i = mergeCalendarFields(e, t, o, re, V, H), [a, s, c] = refineZonedFieldOptions(r, 2);
|
|
4304
4328
|
return getMatchingInstantFor(n, {
|
|
4305
4329
|
...e.dateFromFields(i, overrideOverflowOptions(r, a)),
|
|
4306
4330
|
...refineTimeBag(i, a)
|
|
@@ -4311,7 +4335,7 @@ function zonedDateTimeWithFields(e, n, t, o, r, i) {
|
|
|
4311
4335
|
function plainDateTimeWithFields(e, n, t, o, r) {
|
|
4312
4336
|
const i = copyOptions(r);
|
|
4313
4337
|
return createPlainDateTimeSlots(((e, n, t, o) => {
|
|
4314
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4338
|
+
const r = mergeCalendarFields(e, n, t, re, $), i = refineOverflowOptions(o);
|
|
4315
4339
|
return checkIsoDateTimeInBounds({
|
|
4316
4340
|
...e.dateFromFields(r, overrideOverflowOptions(o, i)),
|
|
4317
4341
|
...refineTimeBag(r, i)
|
|
@@ -4322,7 +4346,7 @@ function plainDateTimeWithFields(e, n, t, o, r) {
|
|
|
4322
4346
|
function plainDateWithFields(e, n, t, o, r) {
|
|
4323
4347
|
const i = copyOptions(r);
|
|
4324
4348
|
return ((e, n, t, o) => {
|
|
4325
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4349
|
+
const r = mergeCalendarFields(e, n, t, re);
|
|
4326
4350
|
return e.dateFromFields(r, o);
|
|
4327
4351
|
})(e(n.calendar), t, o, i);
|
|
4328
4352
|
}
|
|
@@ -4330,7 +4354,7 @@ function plainDateWithFields(e, n, t, o, r) {
|
|
|
4330
4354
|
function plainYearMonthWithFields(e, n, t, o, r) {
|
|
4331
4355
|
const i = copyOptions(r);
|
|
4332
4356
|
return createPlainYearMonthSlots(((e, n, t, o) => {
|
|
4333
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4357
|
+
const r = mergeCalendarFields(e, n, t, te);
|
|
4334
4358
|
return e.yearMonthFromFields(r, o);
|
|
4335
4359
|
})(e(n.calendar), t, o, i));
|
|
4336
4360
|
}
|
|
@@ -4338,7 +4362,7 @@ function plainYearMonthWithFields(e, n, t, o, r) {
|
|
|
4338
4362
|
function plainMonthDayWithFields(e, n, t, o, r) {
|
|
4339
4363
|
const i = copyOptions(r);
|
|
4340
4364
|
return ((e, n, t, o) => {
|
|
4341
|
-
const r = mergeCalendarFields(e, n, t,
|
|
4365
|
+
const r = mergeCalendarFields(e, n, t, re);
|
|
4342
4366
|
return e.monthDayFromFields(r, o);
|
|
4343
4367
|
})(e(n.calendar), t, o, i);
|
|
4344
4368
|
}
|
|
@@ -4347,16 +4371,16 @@ function plainTimeWithFields(e, n, t) {
|
|
|
4347
4371
|
return createPlainTimeSlots(((e, n, t) => {
|
|
4348
4372
|
const o = refineOverflowOptions(t);
|
|
4349
4373
|
return refineTimeBag({
|
|
4350
|
-
...pluckProps(
|
|
4351
|
-
...refineFields(n,
|
|
4374
|
+
...pluckProps(x, e),
|
|
4375
|
+
...refineFields(n, x)
|
|
4352
4376
|
}, o);
|
|
4353
4377
|
})(e, n, t));
|
|
4354
4378
|
}
|
|
4355
4379
|
|
|
4356
4380
|
function durationWithFields(e, n) {
|
|
4357
|
-
return createDurationSlots((t = e, o = n,
|
|
4381
|
+
return createDurationSlots((t = e, o = n, checkDurationUnits({
|
|
4358
4382
|
...t,
|
|
4359
|
-
...refineFields(o,
|
|
4383
|
+
...refineFields(o, he)
|
|
4360
4384
|
})));
|
|
4361
4385
|
var t, o;
|
|
4362
4386
|
}
|
|
@@ -4369,12 +4393,12 @@ function mergeCalendarFields(e, n, t, o, r = [], i = []) {
|
|
|
4369
4393
|
}
|
|
4370
4394
|
|
|
4371
4395
|
function convertToPlainMonthDay(e, n) {
|
|
4372
|
-
const t = refineCalendarFields(e, n,
|
|
4396
|
+
const t = refineCalendarFields(e, n, ae);
|
|
4373
4397
|
return e.monthDayFromFields(t);
|
|
4374
4398
|
}
|
|
4375
4399
|
|
|
4376
4400
|
function convertToPlainYearMonth(e, n, t) {
|
|
4377
|
-
const o = refineCalendarFields(e, n,
|
|
4401
|
+
const o = refineCalendarFields(e, n, oe);
|
|
4378
4402
|
return e.yearMonthFromFields(o, t);
|
|
4379
4403
|
}
|
|
4380
4404
|
|
|
@@ -4386,25 +4410,25 @@ function convertToIso(e, n, t, o, r) {
|
|
|
4386
4410
|
|
|
4387
4411
|
function refineYear(e, n) {
|
|
4388
4412
|
let {era: t, eraYear: o, year: r} = n;
|
|
4389
|
-
const
|
|
4413
|
+
const c = getCalendarEraOrigins(e);
|
|
4390
4414
|
if (void 0 !== t || void 0 !== o) {
|
|
4391
4415
|
if (void 0 === t || void 0 === o) {
|
|
4392
|
-
throw new TypeError(
|
|
4416
|
+
throw new TypeError(a);
|
|
4393
4417
|
}
|
|
4394
|
-
if (!
|
|
4395
|
-
throw new RangeError(
|
|
4418
|
+
if (!c) {
|
|
4419
|
+
throw new RangeError(i);
|
|
4396
4420
|
}
|
|
4397
|
-
const e =
|
|
4421
|
+
const e = c[t];
|
|
4398
4422
|
if (void 0 === e) {
|
|
4399
4423
|
throw new RangeError(invalidEra(t));
|
|
4400
4424
|
}
|
|
4401
4425
|
const n = eraYearToYear(o, e);
|
|
4402
4426
|
if (void 0 !== r && r !== n) {
|
|
4403
|
-
throw new RangeError(
|
|
4427
|
+
throw new RangeError(s);
|
|
4404
4428
|
}
|
|
4405
4429
|
r = n;
|
|
4406
4430
|
} else if (void 0 === r) {
|
|
4407
|
-
throw new TypeError(missingYear(
|
|
4431
|
+
throw new TypeError(missingYear(c));
|
|
4408
4432
|
}
|
|
4409
4433
|
return r;
|
|
4410
4434
|
}
|
|
@@ -4413,42 +4437,42 @@ function refineMonth(e, n, t, o) {
|
|
|
4413
4437
|
let {month: r, monthCode: i} = n;
|
|
4414
4438
|
if (void 0 !== i) {
|
|
4415
4439
|
const n = ((e, n, t, o) => {
|
|
4416
|
-
const r = e.
|
|
4440
|
+
const r = e.O(t), [i, a] = parseMonthCode(n);
|
|
4417
4441
|
let s = monthCodeNumberToMonth(i, a, r);
|
|
4418
4442
|
if (a) {
|
|
4419
4443
|
const n = getCalendarLeapMonthMeta(e);
|
|
4420
4444
|
if (void 0 === n) {
|
|
4421
|
-
throw new RangeError(
|
|
4445
|
+
throw new RangeError(f);
|
|
4422
4446
|
}
|
|
4423
4447
|
if (n > 0) {
|
|
4424
4448
|
if (s > n) {
|
|
4425
|
-
throw new RangeError(
|
|
4449
|
+
throw new RangeError(f);
|
|
4426
4450
|
}
|
|
4427
4451
|
if (void 0 === r) {
|
|
4428
4452
|
if (1 === o) {
|
|
4429
|
-
throw new RangeError(
|
|
4453
|
+
throw new RangeError(f);
|
|
4430
4454
|
}
|
|
4431
4455
|
s--;
|
|
4432
4456
|
}
|
|
4433
4457
|
} else {
|
|
4434
4458
|
if (s !== -n) {
|
|
4435
|
-
throw new RangeError(
|
|
4459
|
+
throw new RangeError(f);
|
|
4436
4460
|
}
|
|
4437
4461
|
if (void 0 === r && 1 === o) {
|
|
4438
|
-
throw new RangeError(
|
|
4462
|
+
throw new RangeError(f);
|
|
4439
4463
|
}
|
|
4440
4464
|
}
|
|
4441
4465
|
}
|
|
4442
4466
|
return s;
|
|
4443
4467
|
})(e, i, t, o);
|
|
4444
4468
|
if (void 0 !== r && r !== n) {
|
|
4445
|
-
throw new RangeError(
|
|
4469
|
+
throw new RangeError(c);
|
|
4446
4470
|
}
|
|
4447
4471
|
r = n, o = 1;
|
|
4448
4472
|
} else if (void 0 === r) {
|
|
4449
|
-
throw new TypeError(
|
|
4473
|
+
throw new TypeError(u);
|
|
4450
4474
|
}
|
|
4451
|
-
return clampEntity("month", r, 1, e.
|
|
4475
|
+
return clampEntity("month", r, 1, e.B(t), o);
|
|
4452
4476
|
}
|
|
4453
4477
|
|
|
4454
4478
|
function refineDay(e, n, t, o, r) {
|
|
@@ -4468,25 +4492,19 @@ function spliceFields(e, n, t, o) {
|
|
|
4468
4492
|
}
|
|
4469
4493
|
}
|
|
4470
4494
|
|
|
4471
|
-
function createNativeOpsCreator(e, n) {
|
|
4472
|
-
return t => t === ae ? e : t === se || t === ce ? Object.assign(Object.create(e), {
|
|
4473
|
-
id: t
|
|
4474
|
-
}) : Object.assign(Object.create(n), Gn(t));
|
|
4475
|
-
}
|
|
4476
|
-
|
|
4477
4495
|
function constructInstantSlots(e) {
|
|
4478
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4496
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
4479
4497
|
}
|
|
4480
4498
|
|
|
4481
|
-
function constructZonedDateTimeSlots(e, n, t, o, r =
|
|
4482
|
-
return createZonedDateTimeSlots(checkEpochNanoInBounds(
|
|
4499
|
+
function constructZonedDateTimeSlots(e, n, t, o, r = ce) {
|
|
4500
|
+
return createZonedDateTimeSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(t))), n(o), e(r));
|
|
4483
4501
|
}
|
|
4484
4502
|
|
|
4485
|
-
function constructPlainDateTimeSlots(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l =
|
|
4486
|
-
return createPlainDateTimeSlots(checkIsoDateTimeInBounds(checkIsoDateTimeFields(mapProps(toInteger, zipProps(
|
|
4503
|
+
function constructPlainDateTimeSlots(e, n, t, o, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0, l = ce) {
|
|
4504
|
+
return createPlainDateTimeSlots(checkIsoDateTimeInBounds(checkIsoDateTimeFields(mapProps(toInteger, zipProps(Pe, [ n, t, o, r, i, a, s, c, u ])))), e(l));
|
|
4487
4505
|
}
|
|
4488
4506
|
|
|
4489
|
-
function constructPlainDateSlots(e, n, t, o, r =
|
|
4507
|
+
function constructPlainDateSlots(e, n, t, o, r = ce) {
|
|
4490
4508
|
return createPlainDateSlots(checkIsoDateInBounds(checkIsoDateFields(mapProps(toInteger, {
|
|
4491
4509
|
isoYear: n,
|
|
4492
4510
|
isoMonth: t,
|
|
@@ -4494,7 +4512,7 @@ function constructPlainDateSlots(e, n, t, o, r = ae) {
|
|
|
4494
4512
|
}))), e(r));
|
|
4495
4513
|
}
|
|
4496
4514
|
|
|
4497
|
-
function constructPlainYearMonthSlots(e, n, t, o =
|
|
4515
|
+
function constructPlainYearMonthSlots(e, n, t, o = ce, r = 1) {
|
|
4498
4516
|
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4499
4517
|
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(checkIsoDateFields({
|
|
4500
4518
|
isoYear: i,
|
|
@@ -4503,7 +4521,7 @@ function constructPlainYearMonthSlots(e, n, t, o = ae, r = 1) {
|
|
|
4503
4521
|
})), s);
|
|
4504
4522
|
}
|
|
4505
4523
|
|
|
4506
|
-
function constructPlainMonthDaySlots(e, n, t, o =
|
|
4524
|
+
function constructPlainMonthDaySlots(e, n, t, o = ce, r = qe) {
|
|
4507
4525
|
const i = toInteger(n), a = toInteger(t), s = e(o);
|
|
4508
4526
|
return createPlainMonthDaySlots(checkIsoDateInBounds(checkIsoDateFields({
|
|
4509
4527
|
isoYear: toInteger(r),
|
|
@@ -4513,14 +4531,14 @@ function constructPlainMonthDaySlots(e, n, t, o = ae, r = Be) {
|
|
|
4513
4531
|
}
|
|
4514
4532
|
|
|
4515
4533
|
function constructPlainTimeSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0) {
|
|
4516
|
-
return createPlainTimeSlots(constrainIsoTimeFields(mapProps(toInteger, zipProps(
|
|
4534
|
+
return createPlainTimeSlots(constrainIsoTimeFields(mapProps(toInteger, zipProps(ye, [ e, n, t, o, r, i ])), 1));
|
|
4517
4535
|
}
|
|
4518
4536
|
|
|
4519
4537
|
function constructDurationSlots(e = 0, n = 0, t = 0, o = 0, r = 0, i = 0, a = 0, s = 0, c = 0, u = 0) {
|
|
4520
|
-
return createDurationSlots(
|
|
4538
|
+
return createDurationSlots(checkDurationUnits(mapProps(toStrictInteger, zipProps(pe, [ e, n, t, o, r, i, a, s, c, u ]))));
|
|
4521
4539
|
}
|
|
4522
4540
|
|
|
4523
|
-
function instantToZonedDateTime(e, n, t =
|
|
4541
|
+
function instantToZonedDateTime(e, n, t = ce) {
|
|
4524
4542
|
return createZonedDateTimeSlots(e.epochNanoseconds, n, t);
|
|
4525
4543
|
}
|
|
4526
4544
|
|
|
@@ -4529,11 +4547,11 @@ function zonedDateTimeToInstant(e) {
|
|
|
4529
4547
|
}
|
|
4530
4548
|
|
|
4531
4549
|
function zonedDateTimeToPlainDateTime(e, n) {
|
|
4532
|
-
return createPlainDateTimeSlots(
|
|
4550
|
+
return createPlainDateTimeSlots(wn(n, e));
|
|
4533
4551
|
}
|
|
4534
4552
|
|
|
4535
4553
|
function zonedDateTimeToPlainDate(e, n) {
|
|
4536
|
-
return createPlainDateSlots(
|
|
4554
|
+
return createPlainDateSlots(wn(n, e));
|
|
4537
4555
|
}
|
|
4538
4556
|
|
|
4539
4557
|
function zonedDateTimeToPlainYearMonth(e, n, t) {
|
|
@@ -4545,7 +4563,7 @@ function zonedDateTimeToPlainMonthDay(e, n, t) {
|
|
|
4545
4563
|
}
|
|
4546
4564
|
|
|
4547
4565
|
function zonedDateTimeToPlainTime(e, n) {
|
|
4548
|
-
return createPlainTimeSlots(
|
|
4566
|
+
return createPlainTimeSlots(wn(n, e));
|
|
4549
4567
|
}
|
|
4550
4568
|
|
|
4551
4569
|
function plainDateTimeToZonedDateTime(e, n, t, o) {
|
|
@@ -4568,14 +4586,14 @@ function plainDateTimeToPlainMonthDay(e, n, t) {
|
|
|
4568
4586
|
}
|
|
4569
4587
|
|
|
4570
4588
|
function plainDateToZonedDateTime(e, n, t, o, r) {
|
|
4571
|
-
const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) :
|
|
4589
|
+
const i = e(r.timeZone), a = r.plainTime, s = void 0 !== a ? n(a) : be;
|
|
4572
4590
|
return createZonedDateTimeSlots(getSingleInstantFor(t(i), {
|
|
4573
4591
|
...o,
|
|
4574
4592
|
...s
|
|
4575
4593
|
}), i, o.calendar);
|
|
4576
4594
|
}
|
|
4577
4595
|
|
|
4578
|
-
function plainDateToPlainDateTime(e, n =
|
|
4596
|
+
function plainDateToPlainDateTime(e, n = be) {
|
|
4579
4597
|
return createPlainDateTimeSlots(checkIsoDateTimeInBounds({
|
|
4580
4598
|
...e,
|
|
4581
4599
|
...n
|
|
@@ -4591,11 +4609,11 @@ function plainDateToPlainMonthDay(e, n, t) {
|
|
|
4591
4609
|
}
|
|
4592
4610
|
|
|
4593
4611
|
function plainYearMonthToPlainDate(e, n, t, o) {
|
|
4594
|
-
return ((e, n, t) => convertToIso(e, n,
|
|
4612
|
+
return ((e, n, t) => convertToIso(e, n, oe, requireObjectLike(t), ne))(e(n.calendar), t, o);
|
|
4595
4613
|
}
|
|
4596
4614
|
|
|
4597
4615
|
function plainMonthDayToPlainDate(e, n, t, o) {
|
|
4598
|
-
return ((e, n, t) => convertToIso(e, n,
|
|
4616
|
+
return ((e, n, t) => convertToIso(e, n, ae, requireObjectLike(t), Q))(e(n.calendar), t, o);
|
|
4599
4617
|
}
|
|
4600
4618
|
|
|
4601
4619
|
function plainTimeToZonedDateTime(e, n, t, o, r) {
|
|
@@ -4614,24 +4632,24 @@ function plainTimeToPlainDateTime(e, n) {
|
|
|
4614
4632
|
}
|
|
4615
4633
|
|
|
4616
4634
|
function epochSecToInstant(e) {
|
|
4617
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4635
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToBigNano(e, A)));
|
|
4618
4636
|
}
|
|
4619
4637
|
|
|
4620
4638
|
function epochMilliToInstant(e) {
|
|
4621
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4639
|
+
return createInstantSlots(checkEpochNanoInBounds(numberToBigNano(e, q)));
|
|
4622
4640
|
}
|
|
4623
4641
|
|
|
4624
4642
|
function epochMicroToInstant(e) {
|
|
4625
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4643
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e), z)));
|
|
4626
4644
|
}
|
|
4627
4645
|
|
|
4628
4646
|
function epochNanoToInstant(e) {
|
|
4629
|
-
return createInstantSlots(checkEpochNanoInBounds(
|
|
4647
|
+
return createInstantSlots(checkEpochNanoInBounds(bigIntToBigNano(toBigInt(e))));
|
|
4630
4648
|
}
|
|
4631
4649
|
|
|
4632
|
-
function zonedDateTimeWithPlainTime(e, n, t =
|
|
4650
|
+
function zonedDateTimeWithPlainTime(e, n, t = be) {
|
|
4633
4651
|
const o = n.timeZone, r = e(o), i = {
|
|
4634
|
-
...
|
|
4652
|
+
...wn(n, r),
|
|
4635
4653
|
...t
|
|
4636
4654
|
};
|
|
4637
4655
|
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, n.calendar);
|
|
@@ -4639,13 +4657,13 @@ function zonedDateTimeWithPlainTime(e, n, t = ve) {
|
|
|
4639
4657
|
|
|
4640
4658
|
function zonedDateTimeWithPlainDate(e, n, t) {
|
|
4641
4659
|
const o = n.timeZone, r = e(o), i = {
|
|
4642
|
-
...
|
|
4660
|
+
...wn(n, r),
|
|
4643
4661
|
...t
|
|
4644
4662
|
}, a = getPreferredCalendarSlot(n.calendar, t.calendar);
|
|
4645
4663
|
return createZonedDateTimeSlots(getMatchingInstantFor(r, i, i.offsetNanoseconds, 2), o, a);
|
|
4646
4664
|
}
|
|
4647
4665
|
|
|
4648
|
-
function plainDateTimeWithPlainTime(e, n =
|
|
4666
|
+
function plainDateTimeWithPlainTime(e, n = be) {
|
|
4649
4667
|
return createPlainDateTimeSlots({
|
|
4650
4668
|
...e,
|
|
4651
4669
|
...n
|
|
@@ -4678,13 +4696,19 @@ function getPreferredCalendarSlot(e, n) {
|
|
|
4678
4696
|
return e;
|
|
4679
4697
|
}
|
|
4680
4698
|
const t = getId(e), o = getId(n);
|
|
4681
|
-
if (t === o || t ===
|
|
4699
|
+
if (t === o || t === ce) {
|
|
4682
4700
|
return n;
|
|
4683
4701
|
}
|
|
4684
|
-
if (o ===
|
|
4702
|
+
if (o === ce) {
|
|
4685
4703
|
return e;
|
|
4686
4704
|
}
|
|
4687
|
-
throw new RangeError(
|
|
4705
|
+
throw new RangeError(p);
|
|
4706
|
+
}
|
|
4707
|
+
|
|
4708
|
+
function createNativeOpsCreator(e, n) {
|
|
4709
|
+
return t => t === ce ? e : t === ue || t === le ? Object.assign(Object.create(e), {
|
|
4710
|
+
id: t
|
|
4711
|
+
}) : Object.assign(Object.create(n), Jn(t));
|
|
4688
4712
|
}
|
|
4689
4713
|
|
|
4690
4714
|
function createOptionsTransformer(e, n, t = []) {
|
|
@@ -4700,8 +4724,8 @@ function createOptionsTransformer(e, n, t = []) {
|
|
|
4700
4724
|
}
|
|
4701
4725
|
|
|
4702
4726
|
function isoDateFieldsToEpochNano(e, n) {
|
|
4703
|
-
return getSingleInstantFor(
|
|
4704
|
-
...
|
|
4727
|
+
return getSingleInstantFor(kn(n.timeZone), {
|
|
4728
|
+
...be,
|
|
4705
4729
|
isoHour: 12,
|
|
4706
4730
|
...e
|
|
4707
4731
|
});
|
|
@@ -4713,7 +4737,7 @@ function extractEpochNano(e) {
|
|
|
4713
4737
|
|
|
4714
4738
|
function createFormatPrepper(e, n = createFormatForPrep) {
|
|
4715
4739
|
const [t, , , o] = e;
|
|
4716
|
-
return (r, i =
|
|
4740
|
+
return (r, i = Rt, ...a) => {
|
|
4717
4741
|
const s = n(o ? o(...a) : void 0, r, i, t), c = s.resolvedOptions();
|
|
4718
4742
|
return [ s, ...toEpochMillis(e, c, ...a) ];
|
|
4719
4743
|
};
|
|
@@ -4722,36 +4746,36 @@ function createFormatPrepper(e, n = createFormatForPrep) {
|
|
|
4722
4746
|
function createFormatForPrep(e, n, t, o) {
|
|
4723
4747
|
if (t = o(t), e) {
|
|
4724
4748
|
if (void 0 !== t.timeZone) {
|
|
4725
|
-
throw new TypeError(
|
|
4749
|
+
throw new TypeError(O);
|
|
4726
4750
|
}
|
|
4727
4751
|
t.timeZone = e;
|
|
4728
4752
|
}
|
|
4729
|
-
return new
|
|
4753
|
+
return new Oe(n, t);
|
|
4730
4754
|
}
|
|
4731
4755
|
|
|
4732
4756
|
function toEpochMillis(e, n, ...t) {
|
|
4733
4757
|
const [, o, r] = e;
|
|
4734
4758
|
return t.map((e => (e.calendar && ((e, n, t) => {
|
|
4735
|
-
if ((t || e !==
|
|
4736
|
-
throw new RangeError(
|
|
4759
|
+
if ((t || e !== ce) && e !== n) {
|
|
4760
|
+
throw new RangeError(p);
|
|
4737
4761
|
}
|
|
4738
4762
|
})(getId(e.calendar), n.calendar, r), epochNanoToMilli(o(e, n)))));
|
|
4739
4763
|
}
|
|
4740
4764
|
|
|
4741
4765
|
function getCurrentIsoDateTime(e) {
|
|
4742
|
-
const n =
|
|
4743
|
-
return
|
|
4766
|
+
const n = getCurrentEpochNano();
|
|
4767
|
+
return epochNanoToIso(n, e.getOffsetNanosecondsFor(n));
|
|
4744
4768
|
}
|
|
4745
4769
|
|
|
4746
|
-
function
|
|
4747
|
-
return
|
|
4770
|
+
function getCurrentEpochNano() {
|
|
4771
|
+
return numberToBigNano(Date.now(), q);
|
|
4748
4772
|
}
|
|
4749
4773
|
|
|
4750
4774
|
function getCurrentTimeZoneId() {
|
|
4751
|
-
return
|
|
4775
|
+
return Zt || (Zt = (new Oe).resolvedOptions().timeZone);
|
|
4752
4776
|
}
|
|
4753
4777
|
|
|
4754
|
-
const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, e = "Cannot convert Symbol to string", n = "Invalid object", numberOutOfRange = (e, n, t, o) =>
|
|
4778
|
+
const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (e, n) => `Non-positive ${e}: ${n}`, expectedFinite = (e, n) => `Non-finite ${e}: ${n}`, forbiddenBigIntToNumber = e => `Cannot convert bigint to ${e}`, invalidBigInt = e => `Invalid bigint: ${e}`, e = "Cannot convert Symbol to string", n = "Invalid object", numberOutOfRange = (e, n, t, o, r) => r ? numberOutOfRange(e, r[n], r[t], r[o]) : invalidEntity(e, n) + `; must be between ${t}-${o}`, invalidEntity = (e, n) => `Invalid ${e}: ${n}`, missingField = e => `Missing ${e}`, forbiddenField = e => `Invalid field ${e}`, duplicateFields = e => `Duplicate field ${e}`, noValidFields = e => "No valid fields: " + e.join(), t = "Invalid bag", invalidChoice = (e, n, t) => invalidEntity(e, n) + "; must be " + Object.keys(t).join(), o = "Cannot use valueOf", r = "Invalid calling context", i = "Forbidden era/eraYear", a = "Mismatching era/eraYear", s = "Mismatching year/eraYear", invalidEra = e => `Invalid era: ${e}`, missingYear = e => "Missing year" + (e ? "/era/eraYear" : ""), invalidMonthCode = e => `Invalid monthCode: ${e}`, c = "Mismatching month/monthCode", u = "Missing month/monthCode", l = "Cannot guess year", f = "Invalid leap month", d = "Invalid protocol", m = "Invalid protocol results", p = "Mismatching Calendars", invalidCalendar = e => `Invalid Calendar: ${e}`, h = "Mismatching TimeZones", T = "Forbidden ICU TimeZone", g = "Out-of-bounds offset", D$1 = "Out-of-bounds TimeZone gap", I = "Invalid TimeZone offset", M = "Ambiguous offset", N = "Out-of-bounds date", y = "Out-of-bounds duration", v = "Cannot mix duration signs", P = "Missing relativeTo", E = "Cannot use large units", S = "Required smallestUnit or largestUnit", F = "smallestUnit > largestUnit", failedParse = e => `Cannot parse: ${e}`, invalidSubstring = e => `Invalid substring: ${e}`, invalidFormatType = e => `Cannot format ${e}`, b = "Mismatching types for formatting", O = "Cannot specify TimeZone", w = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n) => n)), B = /*@__PURE__*/ bindArgs(mapPropNames, ((e, n, t) => t)), k = /*@__PURE__*/ bindArgs(padNumber, 2), Y = {
|
|
4755
4779
|
nanosecond: 0,
|
|
4756
4780
|
microsecond: 1,
|
|
4757
4781
|
millisecond: 2,
|
|
@@ -4762,12 +4786,12 @@ const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (
|
|
|
4762
4786
|
week: 7,
|
|
4763
4787
|
month: 8,
|
|
4764
4788
|
year: 9
|
|
4765
|
-
},
|
|
4766
|
-
[
|
|
4789
|
+
}, C = /*@__PURE__*/ Object.keys(Y), R = 864e5, Z = 1e3, z = 1e3, q = 1e6, A = 1e9, L = 6e10, U = 36e11, W = 864e11, j = [ 1, z, q, A, L, U, W ], $ = /*@__PURE__*/ C.slice(0, 6), x = /*@__PURE__*/ sortStrings($), H = [ "offset" ], G = [ "timeZone" ], V = /*@__PURE__*/ $.concat(H), _ = /*@__PURE__*/ V.concat(G), J = [ "era", "eraYear" ], K = /*@__PURE__*/ J.concat([ "year" ]), Q = [ "year" ], X = [ "monthCode" ], ee = /*@__PURE__*/ [ "month" ].concat(X), ne = [ "day" ], te = /*@__PURE__*/ ee.concat(Q), oe = /*@__PURE__*/ X.concat(Q), re = /*@__PURE__*/ ne.concat(te), ie = /*@__PURE__*/ ne.concat(ee), ae = /*@__PURE__*/ ne.concat(X), se = /*@__PURE__*/ B($, 0), ce = "iso8601", ue = "gregory", le = "japanese", fe = {
|
|
4790
|
+
[ue]: {
|
|
4767
4791
|
bce: -1,
|
|
4768
4792
|
ce: 0
|
|
4769
4793
|
},
|
|
4770
|
-
[
|
|
4794
|
+
[le]: {
|
|
4771
4795
|
bce: -1,
|
|
4772
4796
|
ce: 0,
|
|
4773
4797
|
meiji: 1867,
|
|
@@ -4803,39 +4827,39 @@ const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (
|
|
|
4803
4827
|
persian: {
|
|
4804
4828
|
ap: 0
|
|
4805
4829
|
}
|
|
4806
|
-
},
|
|
4830
|
+
}, de = {
|
|
4807
4831
|
bc: "bce",
|
|
4808
4832
|
ad: "ce"
|
|
4809
|
-
},
|
|
4833
|
+
}, me = {
|
|
4810
4834
|
chinese: 13,
|
|
4811
4835
|
dangi: 13,
|
|
4812
4836
|
hebrew: -6
|
|
4813
|
-
},
|
|
4837
|
+
}, pe = /*@__PURE__*/ C.map((e => e + "s")), he = /*@__PURE__*/ sortStrings(pe), Te = /*@__PURE__*/ pe.slice(0, 6), ge = /*@__PURE__*/ pe.slice(6), De = /*@__PURE__*/ ge.slice(1), Ie = /*@__PURE__*/ w(pe), Me = /*@__PURE__*/ B(pe, 0), Ne = /*@__PURE__*/ B(Te, 0), ye = [ "isoNanosecond", "isoMicrosecond", "isoMillisecond", "isoSecond", "isoMinute", "isoHour" ], ve = [ "isoDay", "isoMonth", "isoYear" ], Pe = /*@__PURE__*/ ye.concat(ve), Ee = /*@__PURE__*/ sortStrings(ve), Se = /*@__PURE__*/ sortStrings(ye), Fe = /*@__PURE__*/ sortStrings(Pe), be = /*@__PURE__*/ B(Se, 0), Oe = Intl.DateTimeFormat, we = "en-GB", Be = 1e8, ke = Be * R, Ye = [ Be, 0 ], Ce = [ -Be, 0 ], Re = 275760, Ze = -271821, ze = 1970, qe = 1972, Ae = 12, Le = /*@__PURE__*/ isoArgsToEpochMilli(1868, 9, 8), Ue = /*@__PURE__*/ memoize(computeJapaneseEraParts, WeakMap), We = /*@__PURE__*/ bindArgs(requireType, "string"), je = /*@__PURE__*/ bindArgs(requireType, "boolean"), $e = /*@__PURE__*/ bindArgs(requireType, "number"), xe = /*@__PURE__*/ bindArgs(requireType, "function"), He = "smallestUnit", Ge = "unit", Ve = "roundingIncrement", _e = "fractionalSecondDigits", Je = "relativeTo", Ke = {
|
|
4814
4838
|
constrain: 0,
|
|
4815
4839
|
reject: 1
|
|
4816
|
-
},
|
|
4840
|
+
}, Qe = /*@__PURE__*/ Object.keys(Ke), Xe = {
|
|
4817
4841
|
compatible: 0,
|
|
4818
4842
|
reject: 1,
|
|
4819
4843
|
earlier: 2,
|
|
4820
4844
|
later: 3
|
|
4821
|
-
},
|
|
4845
|
+
}, en = {
|
|
4822
4846
|
reject: 0,
|
|
4823
4847
|
use: 1,
|
|
4824
4848
|
prefer: 2,
|
|
4825
4849
|
ignore: 3
|
|
4826
|
-
},
|
|
4850
|
+
}, nn = {
|
|
4827
4851
|
auto: 0,
|
|
4828
4852
|
never: 1,
|
|
4829
4853
|
critical: 2,
|
|
4830
4854
|
always: 3
|
|
4831
|
-
},
|
|
4855
|
+
}, tn = {
|
|
4832
4856
|
auto: 0,
|
|
4833
4857
|
never: 1,
|
|
4834
4858
|
critical: 2
|
|
4835
|
-
},
|
|
4859
|
+
}, on = {
|
|
4836
4860
|
auto: 0,
|
|
4837
4861
|
never: 1
|
|
4838
|
-
},
|
|
4862
|
+
}, rn = {
|
|
4839
4863
|
floor: 0,
|
|
4840
4864
|
halfFloor: 1,
|
|
4841
4865
|
ceil: 2,
|
|
@@ -4845,7 +4869,7 @@ const expectedInteger = (e, n) => `Non-integer ${e}: ${n}`, expectedPositive = (
|
|
|
4845
4869
|
expand: 6,
|
|
4846
4870
|
halfExpand: 7,
|
|
4847
4871
|
halfEven: 8
|
|
4848
|
-
},
|
|
4872
|
+
}, an = /*@__PURE__*/ bindArgs(refineUnitOption, He), sn = /*@__PURE__*/ bindArgs(refineUnitOption, "largestUnit"), cn = /*@__PURE__*/ bindArgs(refineUnitOption, Ge), un = /*@__PURE__*/ bindArgs(refineChoiceOption, "overflow", Ke), ln = /*@__PURE__*/ bindArgs(refineChoiceOption, "disambiguation", Xe), fn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", en), dn = /*@__PURE__*/ bindArgs(refineChoiceOption, "calendarName", nn), mn = /*@__PURE__*/ bindArgs(refineChoiceOption, "timeZoneName", tn), pn = /*@__PURE__*/ bindArgs(refineChoiceOption, "offset", on), hn = /*@__PURE__*/ bindArgs(refineChoiceOption, "roundingMode", rn), Tn = "PlainYearMonth", gn = "PlainMonthDay", Dn = "PlainDate", In = "PlainDateTime", Mn = "PlainTime", Nn = "ZonedDateTime", yn = "Instant", vn = "Duration", Pn = [ Math.floor, e => hasHalf(e) ? Math.floor(e) : Math.round(e), Math.ceil, e => hasHalf(e) ? Math.ceil(e) : Math.round(e), Math.trunc, e => hasHalf(e) ? Math.trunc(e) || 0 : Math.round(e), e => e < 0 ? Math.floor(e) : Math.ceil(e), e => Math.sign(e) * Math.round(Math.abs(e)) || 0, e => hasHalf(e) ? (e = Math.trunc(e) || 0) + e % 2 : Math.round(e) ], En = "UTC", Sn = 5184e3, Fn = /*@__PURE__*/ isoArgsToEpochSec(1847), bn = /*@__PURE__*/ isoArgsToEpochSec(/*@__PURE__*/ (/*@__PURE__*/ new Date).getUTCFullYear() + 10), On = /0+$/, wn = /*@__PURE__*/ memoize(_zonedEpochSlotsToIso, WeakMap), Bn = 2 ** 32 - 1, kn = /*@__PURE__*/ memoize((e => {
|
|
4849
4873
|
const n = getTimeZoneEssence(e);
|
|
4850
4874
|
return "object" == typeof n ? new IntlTimeZone(n) : new FixedTimeZone(n || 0);
|
|
4851
4875
|
}));
|
|
@@ -4865,7 +4889,7 @@ class FixedTimeZone {
|
|
|
4865
4889
|
|
|
4866
4890
|
class IntlTimeZone {
|
|
4867
4891
|
constructor(e) {
|
|
4868
|
-
this.
|
|
4892
|
+
this.R = (e => {
|
|
4869
4893
|
function getOffsetSec(e) {
|
|
4870
4894
|
const i = clampNumber(e, o, r), [a, s] = computePeriod(i), c = n(a), u = n(s);
|
|
4871
4895
|
return c === u ? c : pinch(t(a, s), c, u, e);
|
|
@@ -4878,10 +4902,10 @@ class IntlTimeZone {
|
|
|
4878
4902
|
}
|
|
4879
4903
|
return i;
|
|
4880
4904
|
}
|
|
4881
|
-
const n =
|
|
4882
|
-
let o =
|
|
4905
|
+
const n = memoize(e), t = memoize(createSplitTuple);
|
|
4906
|
+
let o = Fn, r = bn;
|
|
4883
4907
|
return {
|
|
4884
|
-
|
|
4908
|
+
q(e) {
|
|
4885
4909
|
const n = getOffsetSec(e - 86400), t = getOffsetSec(e + 86400), o = e - n, r = e - t;
|
|
4886
4910
|
if (n === t) {
|
|
4887
4911
|
return [ o ];
|
|
@@ -4889,11 +4913,11 @@ class IntlTimeZone {
|
|
|
4889
4913
|
const i = getOffsetSec(o);
|
|
4890
4914
|
return i === getOffsetSec(r) ? [ e - i ] : n > t ? [ o, r ] : [];
|
|
4891
4915
|
},
|
|
4892
|
-
|
|
4916
|
+
L: getOffsetSec,
|
|
4893
4917
|
C(e, i) {
|
|
4894
4918
|
const a = clampNumber(e, o, r);
|
|
4895
4919
|
let [s, c] = computePeriod(a);
|
|
4896
|
-
const u =
|
|
4920
|
+
const u = Sn * i, l = i < 0 ? () => c > o || (o = a, 0) : () => s < r || (r = a,
|
|
4897
4921
|
0);
|
|
4898
4922
|
for (;l(); ) {
|
|
4899
4923
|
const o = n(s), r = n(c);
|
|
@@ -4910,27 +4934,27 @@ class IntlTimeZone {
|
|
|
4910
4934
|
}
|
|
4911
4935
|
};
|
|
4912
4936
|
})((e => n => {
|
|
4913
|
-
const t = hashIntlFormatParts(e, n *
|
|
4937
|
+
const t = hashIntlFormatParts(e, n * Z);
|
|
4914
4938
|
return isoArgsToEpochSec(parseIntlPartsYear(t), parseInt(t.month), parseInt(t.day), parseInt(t.hour), parseInt(t.minute), parseInt(t.second)) - n;
|
|
4915
4939
|
})(e));
|
|
4916
4940
|
}
|
|
4917
4941
|
getOffsetNanosecondsFor(e) {
|
|
4918
|
-
return this.
|
|
4942
|
+
return this.R.L(epochNanoToSec(e)) * A;
|
|
4919
4943
|
}
|
|
4920
4944
|
getPossibleInstantsFor(e) {
|
|
4921
|
-
const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond *
|
|
4945
|
+
const [n, t] = [ isoArgsToEpochSec((o = e).isoYear, o.isoMonth, o.isoDay, o.isoHour, o.isoMinute, o.isoSecond), o.isoMillisecond * q + o.isoMicrosecond * z + o.isoNanosecond ];
|
|
4922
4946
|
var o;
|
|
4923
|
-
return this.
|
|
4947
|
+
return this.R.q(n).map((e => checkEpochNanoInBounds(addBigNanoAndNumber(numberToBigNano(e, A), t))));
|
|
4924
4948
|
}
|
|
4925
4949
|
C(e, n) {
|
|
4926
|
-
const [t, o] = (e
|
|
4950
|
+
const [t, o] = epochNanoToSecMod(e), r = this.R.C(t + (n > 0 || o ? 1 : 0), n);
|
|
4927
4951
|
if (void 0 !== r) {
|
|
4928
|
-
return
|
|
4952
|
+
return numberToBigNano(r, A);
|
|
4929
4953
|
}
|
|
4930
4954
|
}
|
|
4931
4955
|
}
|
|
4932
4956
|
|
|
4933
|
-
const
|
|
4957
|
+
const Yn = "([+−-])", Cn = "(?:[.,](\\d{1,9}))?", Rn = `(?:(?:${Yn}(\\d{6}))|(\\d{4}))-?(\\d{2})`, Zn = "(\\d{2})(?::?(\\d{2})(?::?(\\d{2})" + Cn + ")?)?", zn = Yn + Zn, qn = Rn + "-?(\\d{2})(?:[T ]" + Zn + "(Z|" + zn + ")?)?", An = "\\[(!?)([^\\]]*)\\]", Ln = `((?:${An}){0,9})`, Un = /*@__PURE__*/ createRegExp(Rn + Ln), Wn = /*@__PURE__*/ createRegExp("(?:--)?(\\d{2})-?(\\d{2})" + Ln), jn = /*@__PURE__*/ createRegExp(qn + Ln), $n = /*@__PURE__*/ createRegExp("T?" + Zn + "(?:" + zn + ")?" + Ln), xn = /*@__PURE__*/ createRegExp(zn), Hn = /*@__PURE__*/ new RegExp(An, "g"), Gn = /*@__PURE__*/ createRegExp(`${Yn}?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?:(\\d+)${Cn}H)?(?:(\\d+)${Cn}M)?(?:(\\d+)${Cn}S)?)?`), Vn = /*@__PURE__*/ memoize((e => new Oe(we, {
|
|
4934
4958
|
timeZone: e,
|
|
4935
4959
|
era: "short",
|
|
4936
4960
|
year: "numeric",
|
|
@@ -4939,68 +4963,73 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
4939
4963
|
hour: "numeric",
|
|
4940
4964
|
minute: "numeric",
|
|
4941
4965
|
second: "numeric"
|
|
4942
|
-
}))),
|
|
4966
|
+
}))), _n = /^(AC|AE|AG|AR|AS|BE|BS|CA|CN|CS|CT|EA|EC|IE|IS|JS|MI|NE|NS|PL|PN|PR|PS|SS|VS)T$/, Jn = /*@__PURE__*/ memoize(createIntlCalendar), Kn = /*@__PURE__*/ memoize((e => new Oe(we, {
|
|
4943
4967
|
calendar: e,
|
|
4944
|
-
timeZone:
|
|
4968
|
+
timeZone: En,
|
|
4945
4969
|
era: "short",
|
|
4946
4970
|
year: "numeric",
|
|
4947
4971
|
month: "short",
|
|
4948
4972
|
day: "numeric"
|
|
4949
|
-
}))),
|
|
4973
|
+
}))), Qn = /^M(\d{2})(L?)$/, Xn = {
|
|
4974
|
+
era: toStringViaPrimitive,
|
|
4975
|
+
eraYear: toInteger,
|
|
4976
|
+
year: toInteger,
|
|
4977
|
+
month: toPositiveInteger,
|
|
4978
|
+
monthCode: toStringViaPrimitive,
|
|
4979
|
+
day: toPositiveInteger
|
|
4980
|
+
}, et = /*@__PURE__*/ B($, toInteger), nt = /*@__PURE__*/ B(pe, toStrictInteger), tt = /*@__PURE__*/ Object.assign({}, Xn, et, nt, {
|
|
4981
|
+
offset: toStringViaPrimitive
|
|
4982
|
+
}), ot = /*@__PURE__*/ bindArgs(remapProps, $, ye), rt = {
|
|
4950
4983
|
dateAdd(e, n, t) {
|
|
4951
4984
|
const o = refineOverflowOptions(t);
|
|
4952
4985
|
let r, {years: i, months: a, weeks: s, days: c} = n;
|
|
4953
|
-
if (c +=
|
|
4986
|
+
if (c += givenFieldsToBigNano(n, 5, pe)[0], i || a) {
|
|
4954
4987
|
let [n, t, s] = this.u(e);
|
|
4955
4988
|
if (i) {
|
|
4956
4989
|
const [e, r] = this.l(n, t);
|
|
4957
|
-
n += i, t = monthCodeNumberToMonth(e, r, this.
|
|
4990
|
+
n += i, t = monthCodeNumberToMonth(e, r, this.O(n)), t = clampEntity("month", t, 1, this.B(n), o);
|
|
4958
4991
|
}
|
|
4959
|
-
a && ([n, t] = this.
|
|
4960
|
-
r = this.
|
|
4992
|
+
a && ([n, t] = this.U(n, t, a)), s = clampEntity("day", s, 1, this.k(n, t), o),
|
|
4993
|
+
r = this.j(n, t, s);
|
|
4961
4994
|
} else {
|
|
4962
4995
|
if (!s && !c) {
|
|
4963
4996
|
return e;
|
|
4964
4997
|
}
|
|
4965
4998
|
r = isoToEpochMilli(e);
|
|
4966
4999
|
}
|
|
4967
|
-
return r += (
|
|
5000
|
+
return r += (7 * s + c) * R, checkIsoDateInBounds(epochMilliToIso(r));
|
|
4968
5001
|
},
|
|
4969
5002
|
dateUntil(e, n, t) {
|
|
4970
5003
|
if (t <= 7) {
|
|
4971
5004
|
let o = 0, r = diffDays(e, n);
|
|
4972
|
-
return 7 === t && ([o, r] = divModTrunc(r,
|
|
4973
|
-
...
|
|
5005
|
+
return 7 === t && ([o, r] = divModTrunc(r, 7)), {
|
|
5006
|
+
...Me,
|
|
4974
5007
|
weeks: o,
|
|
4975
5008
|
days: r
|
|
4976
5009
|
};
|
|
4977
5010
|
}
|
|
4978
5011
|
const o = this.u(e), r = this.u(n);
|
|
4979
5012
|
let [i, a, s] = ((e, n, t, o, r, i, a) => {
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
let s, c, u, l, f;
|
|
4988
|
-
updateYearMonthDay();
|
|
4989
|
-
const d = Math.sign(f), m = Math.sign(s) || Math.sign(u) || d;
|
|
4990
|
-
if (m) {
|
|
4991
|
-
if (d === -m) {
|
|
4992
|
-
const n = l;
|
|
4993
|
-
[r, i] = e.L(r, i, -m), updateYearMonthDay(), f += m < 0 ? -n : l;
|
|
5013
|
+
let s = r - n, c = i - t, u = a - o;
|
|
5014
|
+
if (s || c) {
|
|
5015
|
+
const l = Math.sign(s || c);
|
|
5016
|
+
let f = e.k(r, i), d = 0;
|
|
5017
|
+
if (Math.sign(u) === -l) {
|
|
5018
|
+
const o = f;
|
|
5019
|
+
[r, i] = e.U(r, i, -l), s = r - n, c = i - t, f = e.k(r, i), d = l < 0 ? -o : f;
|
|
4994
5020
|
}
|
|
4995
|
-
if (Math.
|
|
4996
|
-
const e =
|
|
4997
|
-
|
|
5021
|
+
if (u = a - Math.min(o, f) + d, s) {
|
|
5022
|
+
const [o, a] = e.l(n, t), [u, f] = e.l(r, i);
|
|
5023
|
+
if (c = u - o || Number(f) - Number(a), Math.sign(c) === -l) {
|
|
5024
|
+
const t = l < 0 && -e.B(r);
|
|
5025
|
+
s = (r -= l) - n, c = i - monthCodeNumberToMonth(o, a, e.O(r)) + (t || e.B(r));
|
|
5026
|
+
}
|
|
4998
5027
|
}
|
|
4999
5028
|
}
|
|
5000
|
-
return [ s,
|
|
5029
|
+
return [ s, c, u ];
|
|
5001
5030
|
})(this, ...o, ...r);
|
|
5002
|
-
return 8 === t && (a += this
|
|
5003
|
-
...
|
|
5031
|
+
return 8 === t && (a += this.$(i, o[0]), i = 0), {
|
|
5032
|
+
...Me,
|
|
5004
5033
|
years: i,
|
|
5005
5034
|
months: a,
|
|
5006
5035
|
days: s
|
|
@@ -5008,53 +5037,53 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5008
5037
|
},
|
|
5009
5038
|
dateFromFields(e, n) {
|
|
5010
5039
|
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t), i = refineDay(this, e, r, o, t);
|
|
5011
|
-
return createPlainDateSlots(checkIsoDateInBounds(this.p(o, r, i)), this.id ||
|
|
5040
|
+
return createPlainDateSlots(checkIsoDateInBounds(this.p(o, r, i)), this.id || ce);
|
|
5012
5041
|
},
|
|
5013
5042
|
yearMonthFromFields(e, n) {
|
|
5014
5043
|
const t = refineOverflowOptions(n), o = refineYear(this, e), r = refineMonth(this, e, o, t);
|
|
5015
|
-
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.p(o, r, 1)), this.id ||
|
|
5044
|
+
return createPlainYearMonthSlots(checkIsoYearMonthInBounds(this.p(o, r, 1)), this.id || ce);
|
|
5016
5045
|
},
|
|
5017
5046
|
monthDayFromFields(e, n) {
|
|
5018
5047
|
const t = refineOverflowOptions(n), o = !this.id, {monthCode: r, year: i, month: a} = e;
|
|
5019
|
-
let s,
|
|
5048
|
+
let s, u, f, d, m;
|
|
5020
5049
|
if (void 0 !== r) {
|
|
5021
|
-
[s,
|
|
5022
|
-
const n = this.m(s,
|
|
5050
|
+
[s, u] = parseMonthCode(r), m = getDefinedProp(e, "day");
|
|
5051
|
+
const n = this.m(s, u, m);
|
|
5023
5052
|
if (!n) {
|
|
5024
|
-
throw new RangeError(
|
|
5053
|
+
throw new RangeError(l);
|
|
5025
5054
|
}
|
|
5026
|
-
if ([
|
|
5027
|
-
throw new RangeError(
|
|
5055
|
+
if ([f, d] = n, void 0 !== a && a !== d) {
|
|
5056
|
+
throw new RangeError(c);
|
|
5028
5057
|
}
|
|
5029
|
-
o && (d = clampEntity("month", d, 1,
|
|
5058
|
+
o && (d = clampEntity("month", d, 1, Ae, 1), m = clampEntity("day", m, 1, computeIsoDaysInMonth(void 0 !== i ? i : f, d), t));
|
|
5030
5059
|
} else {
|
|
5031
|
-
|
|
5032
|
-
m = refineDay(this, e, d,
|
|
5033
|
-
const n = this.
|
|
5034
|
-
|
|
5035
|
-
const r = this.m(s,
|
|
5060
|
+
f = void 0 === i && o ? qe : refineYear(this, e), d = refineMonth(this, e, f, t),
|
|
5061
|
+
m = refineDay(this, e, d, f, t);
|
|
5062
|
+
const n = this.O(f);
|
|
5063
|
+
u = d === n, s = monthToMonthCodeNumber(d, n);
|
|
5064
|
+
const r = this.m(s, u, m);
|
|
5036
5065
|
if (!r) {
|
|
5037
|
-
throw new RangeError(
|
|
5066
|
+
throw new RangeError(l);
|
|
5038
5067
|
}
|
|
5039
|
-
[
|
|
5068
|
+
[f, d] = r;
|
|
5040
5069
|
}
|
|
5041
|
-
return createPlainMonthDaySlots(this.p(
|
|
5070
|
+
return createPlainMonthDaySlots(this.p(f, d, m), this.id || ce);
|
|
5042
5071
|
},
|
|
5043
5072
|
fields(e) {
|
|
5044
|
-
return getCalendarEraOrigins(this) && e.includes("year") ? [ ...e, ...
|
|
5073
|
+
return getCalendarEraOrigins(this) && e.includes("year") ? [ ...e, ...J ] : e;
|
|
5045
5074
|
},
|
|
5046
5075
|
mergeFields(e, n) {
|
|
5047
5076
|
const t = Object.assign(Object.create(null), e);
|
|
5048
|
-
return spliceFields(t, n,
|
|
5049
|
-
this.id ===
|
|
5077
|
+
return spliceFields(t, n, ee), getCalendarEraOrigins(this) && (spliceFields(t, n, K),
|
|
5078
|
+
this.id === le && spliceFields(t, n, ie, J)), t;
|
|
5050
5079
|
},
|
|
5051
5080
|
inLeapYear(e) {
|
|
5052
5081
|
const [n] = this.u(e);
|
|
5053
|
-
return this
|
|
5082
|
+
return this.G(n);
|
|
5054
5083
|
},
|
|
5055
5084
|
monthsInYear(e) {
|
|
5056
5085
|
const [n] = this.u(e);
|
|
5057
|
-
return this.
|
|
5086
|
+
return this.B(n);
|
|
5058
5087
|
},
|
|
5059
5088
|
daysInMonth(e) {
|
|
5060
5089
|
const [n, t] = this.u(e);
|
|
@@ -5062,63 +5091,70 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5062
5091
|
},
|
|
5063
5092
|
daysInYear(e) {
|
|
5064
5093
|
const [n] = this.u(e);
|
|
5065
|
-
return this.
|
|
5094
|
+
return this.V(n);
|
|
5066
5095
|
},
|
|
5067
5096
|
era(e) {
|
|
5068
|
-
return this.
|
|
5097
|
+
return this._(e)[0];
|
|
5069
5098
|
},
|
|
5070
5099
|
eraYear(e) {
|
|
5071
|
-
return this.
|
|
5100
|
+
return this._(e)[1];
|
|
5072
5101
|
},
|
|
5073
5102
|
monthCode(e) {
|
|
5074
5103
|
const [n, t] = this.u(e), [o, r] = this.l(n, t);
|
|
5075
|
-
return ((e, n) => "M" +
|
|
5104
|
+
return ((e, n) => "M" + k(e) + (n ? "L" : ""))(o, r);
|
|
5076
5105
|
},
|
|
5077
5106
|
dayOfWeek: computeIsoDayOfWeek,
|
|
5078
|
-
weekOfYear(e) {
|
|
5079
|
-
return computeIsoWeekParts(e)[1];
|
|
5080
|
-
},
|
|
5081
|
-
yearOfWeek(e) {
|
|
5082
|
-
return computeIsoWeekParts(e)[0];
|
|
5083
|
-
},
|
|
5084
5107
|
daysInWeek() {
|
|
5085
|
-
return
|
|
5108
|
+
return 7;
|
|
5086
5109
|
}
|
|
5087
|
-
},
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5110
|
+
}, it = {
|
|
5111
|
+
weekOfYear: computeNativeWeekOfYear,
|
|
5112
|
+
yearOfWeek: computeNativeYearOfWeek,
|
|
5113
|
+
F(e) {
|
|
5114
|
+
function computeWeekShift(e) {
|
|
5115
|
+
return (7 - e < n ? 7 : 0) - e;
|
|
5116
|
+
}
|
|
5117
|
+
function computeWeeksInYear(e) {
|
|
5118
|
+
const n = computeIsoDaysInYear(u + e), t = e || 1;
|
|
5119
|
+
return (n + (computeWeekShift(modFloor(a + n * t, 7)) - s) * t) / 7;
|
|
5120
|
+
}
|
|
5121
|
+
const n = this.id ? 1 : 4, t = computeIsoDayOfWeek(e), o = computeIsoDayOfYear(e), r = modFloor(t - 1, 7), i = o - 1, a = modFloor(r - i, 7), s = computeWeekShift(a);
|
|
5122
|
+
let c = Math.floor((i - s) / 7) + 1, u = e.isoYear;
|
|
5123
|
+
return c ? c > computeWeeksInYear(0) && (c = 1, u++) : (c = computeWeeksInYear(-1),
|
|
5124
|
+
u--), [ c, u ];
|
|
5125
|
+
}
|
|
5126
|
+
}, at = {
|
|
5127
|
+
weekOfYear: computeNativeWeekOfYear,
|
|
5128
|
+
yearOfWeek: computeNativeYearOfWeek,
|
|
5129
|
+
F() {
|
|
5130
|
+
return [];
|
|
5131
|
+
}
|
|
5132
|
+
}, st = /*@__PURE__*/ createNativeOpsCreator(/*@__PURE__*/ Object.assign({}, rt, it, {
|
|
5097
5133
|
u: e => [ e.isoYear, e.isoMonth, e.isoDay ],
|
|
5098
|
-
|
|
5099
|
-
return this.id ===
|
|
5134
|
+
_(e) {
|
|
5135
|
+
return this.id === ue ? computeGregoryEraParts(e) : this.id === le ? Ue(e) : [];
|
|
5100
5136
|
},
|
|
5101
5137
|
l: (e, n) => [ n, 0 ],
|
|
5102
5138
|
m(e, n) {
|
|
5103
5139
|
if (!n) {
|
|
5104
|
-
return [
|
|
5140
|
+
return [ qe, e ];
|
|
5105
5141
|
}
|
|
5106
5142
|
},
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5143
|
+
G: computeIsoInLeapYear,
|
|
5144
|
+
O() {},
|
|
5145
|
+
B: computeIsoMonthsInYear,
|
|
5146
|
+
$: e => e * Ae,
|
|
5111
5147
|
k: computeIsoDaysInMonth,
|
|
5112
|
-
|
|
5148
|
+
V: computeIsoDaysInYear,
|
|
5113
5149
|
dayOfYear: computeIsoDayOfYear,
|
|
5114
5150
|
p: (e, n, t) => ({
|
|
5115
5151
|
isoYear: e,
|
|
5116
5152
|
isoMonth: n,
|
|
5117
5153
|
isoDay: t
|
|
5118
5154
|
}),
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
n -=
|
|
5155
|
+
j: isoArgsToEpochMilli,
|
|
5156
|
+
U: (e, n, t) => (e += divTrunc(t, Ae), (n += modTrunc(t, Ae)) < 1 ? (e--, n += Ae) : n > Ae && (e++,
|
|
5157
|
+
n -= Ae), [ e, n ]),
|
|
5122
5158
|
year(e) {
|
|
5123
5159
|
return e.isoYear;
|
|
5124
5160
|
},
|
|
@@ -5126,9 +5162,9 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5126
5162
|
return e.isoMonth;
|
|
5127
5163
|
},
|
|
5128
5164
|
day: e => e.isoDay
|
|
5129
|
-
}), /*@__PURE__*/ Object.assign({},
|
|
5165
|
+
}), /*@__PURE__*/ Object.assign({}, rt, at, {
|
|
5130
5166
|
u: computeIntlDateParts,
|
|
5131
|
-
|
|
5167
|
+
_(e) {
|
|
5132
5168
|
const n = this.I(e);
|
|
5133
5169
|
return [ n.era, n.eraYear ];
|
|
5134
5170
|
},
|
|
@@ -5138,8 +5174,8 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5138
5174
|
},
|
|
5139
5175
|
m(e, n, t) {
|
|
5140
5176
|
let [o, r, i] = computeIntlDateParts.call(this, {
|
|
5141
|
-
isoYear:
|
|
5142
|
-
isoMonth:
|
|
5177
|
+
isoYear: qe,
|
|
5178
|
+
isoMonth: Ae,
|
|
5143
5179
|
isoDay: 31
|
|
5144
5180
|
});
|
|
5145
5181
|
const a = computeIntlLeapMonth.call(this, o), s = r === a;
|
|
@@ -5151,13 +5187,13 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5151
5187
|
}
|
|
5152
5188
|
}
|
|
5153
5189
|
},
|
|
5154
|
-
|
|
5190
|
+
G(e) {
|
|
5155
5191
|
const n = computeIntlDaysInYear.call(this, e);
|
|
5156
5192
|
return n > computeIntlDaysInYear.call(this, e - 1) && n > computeIntlDaysInYear.call(this, e + 1);
|
|
5157
5193
|
},
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5194
|
+
O: computeIntlLeapMonth,
|
|
5195
|
+
B: computeIntlMonthsInYear,
|
|
5196
|
+
$(e, n) {
|
|
5161
5197
|
const t = n + e, o = Math.sign(e), r = o < 0 ? -1 : 0;
|
|
5162
5198
|
let i = 0;
|
|
5163
5199
|
for (let e = n; e !== t; e += o) {
|
|
@@ -5166,33 +5202,30 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5166
5202
|
return i;
|
|
5167
5203
|
},
|
|
5168
5204
|
k: computeIntlDaysInMonth,
|
|
5169
|
-
|
|
5205
|
+
V: computeIntlDaysInYear,
|
|
5170
5206
|
dayOfYear(e) {
|
|
5171
5207
|
const n = isoToEpochMilli({
|
|
5172
5208
|
...e,
|
|
5173
|
-
...
|
|
5209
|
+
...be
|
|
5174
5210
|
}), {year: t} = this.I(e);
|
|
5175
|
-
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, t), n);
|
|
5211
|
+
return diffEpochMilliByDay(computeIntlEpochMilli.call(this, t), n) + 1;
|
|
5176
5212
|
},
|
|
5177
5213
|
p(e, n, t) {
|
|
5178
5214
|
return checkIsoDateInBounds({
|
|
5179
5215
|
...epochMilliToIso(computeIntlEpochMilli.call(this, e, n, t))
|
|
5180
5216
|
});
|
|
5181
5217
|
},
|
|
5182
|
-
|
|
5183
|
-
|
|
5218
|
+
j: computeIntlEpochMilli,
|
|
5219
|
+
U(e, n, t) {
|
|
5184
5220
|
if (t) {
|
|
5185
|
-
if (n += t,
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5221
|
+
if (n += t, !Number.isSafeInteger(n)) {
|
|
5222
|
+
throw new RangeError(N);
|
|
5223
|
+
}
|
|
5224
|
+
if (t < 0) {
|
|
5189
5225
|
for (;n < 1; ) {
|
|
5190
5226
|
n += computeIntlMonthsInYear.call(this, --e);
|
|
5191
5227
|
}
|
|
5192
5228
|
} else {
|
|
5193
|
-
if (n > Number.MAX_SAFE_INTEGER) {
|
|
5194
|
-
throw new RangeError(y);
|
|
5195
|
-
}
|
|
5196
5229
|
let t;
|
|
5197
5230
|
for (;n > (t = computeIntlMonthsInYear.call(this, e)); ) {
|
|
5198
5231
|
n -= t, e++;
|
|
@@ -5205,47 +5238,47 @@ const On = "([+−-])", Yn = "(?:[.,](\\d{1,9}))?", kn = `(?:(?:${On}(\\d{6}))|(
|
|
|
5205
5238
|
return this.I(e).year;
|
|
5206
5239
|
},
|
|
5207
5240
|
month(e) {
|
|
5208
|
-
const {year: n, month: t} = this.I(e), {
|
|
5241
|
+
const {year: n, month: t} = this.I(e), {P: o} = this.N(n);
|
|
5209
5242
|
return o[t] + 1;
|
|
5210
5243
|
},
|
|
5211
5244
|
day(e) {
|
|
5212
5245
|
return this.I(e).day;
|
|
5213
5246
|
}
|
|
5214
|
-
})),
|
|
5215
|
-
month:
|
|
5216
|
-
day:
|
|
5217
|
-
},
|
|
5218
|
-
year:
|
|
5219
|
-
month:
|
|
5220
|
-
},
|
|
5221
|
-
day:
|
|
5222
|
-
}),
|
|
5223
|
-
hour:
|
|
5224
|
-
minute:
|
|
5225
|
-
second:
|
|
5226
|
-
},
|
|
5247
|
+
})), ct = "numeric", ut = [ "timeZoneName" ], lt = {
|
|
5248
|
+
month: ct,
|
|
5249
|
+
day: ct
|
|
5250
|
+
}, ft = {
|
|
5251
|
+
year: ct,
|
|
5252
|
+
month: ct
|
|
5253
|
+
}, dt = /*@__PURE__*/ Object.assign({}, ft, {
|
|
5254
|
+
day: ct
|
|
5255
|
+
}), mt = {
|
|
5256
|
+
hour: ct,
|
|
5257
|
+
minute: ct,
|
|
5258
|
+
second: ct
|
|
5259
|
+
}, pt = /*@__PURE__*/ Object.assign({}, dt, mt), ht = /*@__PURE__*/ Object.assign({}, pt, {
|
|
5227
5260
|
timeZoneName: "short"
|
|
5228
|
-
}),
|
|
5229
|
-
isoYear:
|
|
5261
|
+
}), Tt = /*@__PURE__*/ Object.keys(lt), gt = /*@__PURE__*/ Object.keys(ft), Dt = /*@__PURE__*/ Object.keys(dt), It = /*@__PURE__*/ Object.keys(mt), Mt = /*@__PURE__*/ Dt.concat([ "weekday", "dateStyle" ]), Nt = /*@__PURE__*/ It.concat([ "dayPeriod", "timeStyle" ]), yt = /*@__PURE__*/ Mt.concat(Nt), vt = /*@__PURE__*/ yt.concat(ut), Pt = /*@__PURE__*/ ut.concat(Nt), Et = /*@__PURE__*/ ut.concat(Mt), St = /*@__PURE__*/ ut.concat([ "day", "weekday", "dateStyle" ], Nt), Ft = /*@__PURE__*/ createOptionsTransformer(Tt, lt, /*@__PURE__*/ ut.concat([ "year", "weekday", "dateStyle" ], Nt)), bt = [ /*@__PURE__*/ createOptionsTransformer(gt, ft, St), isoDateFieldsToEpochNano, 1 ], Ot = [ Ft, isoDateFieldsToEpochNano, 1 ], wt = [ /*@__PURE__*/ createOptionsTransformer(Mt, dt, Pt), isoDateFieldsToEpochNano ], Bt = [ /*@__PURE__*/ createOptionsTransformer(yt, pt, ut), isoDateFieldsToEpochNano ], kt = [ /*@__PURE__*/ createOptionsTransformer(Nt, mt, Et), (e, n) => getSingleInstantFor(kn(n.timeZone), {
|
|
5262
|
+
isoYear: ze,
|
|
5230
5263
|
isoMonth: 1,
|
|
5231
5264
|
isoDay: 1,
|
|
5232
5265
|
...e
|
|
5233
|
-
}) ],
|
|
5266
|
+
}) ], Yt = [ /*@__PURE__*/ createOptionsTransformer(yt, pt), extractEpochNano ], Ct = [ /*@__PURE__*/ createOptionsTransformer(vt, ht), extractEpochNano, 0, (e, n) => {
|
|
5234
5267
|
const t = getId(e.timeZone);
|
|
5235
5268
|
if (n && getId(n.timeZone) !== t) {
|
|
5236
|
-
throw new RangeError(
|
|
5269
|
+
throw new RangeError(h);
|
|
5237
5270
|
}
|
|
5238
5271
|
return t;
|
|
5239
|
-
} ],
|
|
5272
|
+
} ], Rt = {};
|
|
5240
5273
|
|
|
5241
|
-
let
|
|
5274
|
+
let Zt;
|
|
5242
5275
|
|
|
5243
|
-
function createSlotClass(e, t, n, o,
|
|
5276
|
+
function createSlotClass(e, t, n, o, a) {
|
|
5244
5277
|
function Class(...e) {
|
|
5245
5278
|
if (!(this instanceof Class)) {
|
|
5246
|
-
throw new TypeError(
|
|
5279
|
+
throw new TypeError(r);
|
|
5247
5280
|
}
|
|
5248
|
-
|
|
5281
|
+
za(this, t(...e));
|
|
5249
5282
|
}
|
|
5250
5283
|
function bindMethod(e, t) {
|
|
5251
5284
|
return Object.defineProperties((function(...t) {
|
|
@@ -5253,9 +5286,9 @@ function createSlotClass(e, t, n, o, r) {
|
|
|
5253
5286
|
}), createNameDescriptors(t));
|
|
5254
5287
|
}
|
|
5255
5288
|
function getSpecificSlots(t) {
|
|
5256
|
-
const n =
|
|
5289
|
+
const n = Ua(t);
|
|
5257
5290
|
if (!n || n.branding !== e) {
|
|
5258
|
-
throw new TypeError(
|
|
5291
|
+
throw new TypeError(r);
|
|
5259
5292
|
}
|
|
5260
5293
|
return n;
|
|
5261
5294
|
}
|
|
@@ -5264,42 +5297,42 @@ function createSlotClass(e, t, n, o, r) {
|
|
|
5264
5297
|
...createPropDescriptors(mapProps(bindMethod, o)),
|
|
5265
5298
|
...createStringTagDescriptors("Temporal." + e)
|
|
5266
5299
|
}), Object.defineProperties(Class, {
|
|
5267
|
-
...createPropDescriptors(
|
|
5300
|
+
...createPropDescriptors(a),
|
|
5268
5301
|
...createNameDescriptors(e)
|
|
5269
5302
|
}), [ Class, e => {
|
|
5270
5303
|
const t = Object.create(Class.prototype);
|
|
5271
|
-
return
|
|
5304
|
+
return za(t, e), t;
|
|
5272
5305
|
}, getSpecificSlots ];
|
|
5273
5306
|
}
|
|
5274
5307
|
|
|
5275
5308
|
function createProtocolValidator(e) {
|
|
5276
5309
|
return e = e.concat("id").sort(), t => {
|
|
5277
5310
|
if (!hasAllPropsByName(t, e)) {
|
|
5278
|
-
throw new TypeError(
|
|
5311
|
+
throw new TypeError(d);
|
|
5279
5312
|
}
|
|
5280
5313
|
return t;
|
|
5281
5314
|
};
|
|
5282
5315
|
}
|
|
5283
5316
|
|
|
5284
5317
|
function rejectInvalidBag(e) {
|
|
5285
|
-
if (
|
|
5286
|
-
throw new TypeError(
|
|
5318
|
+
if (Ua(e) || void 0 !== e.calendar || void 0 !== e.timeZone) {
|
|
5319
|
+
throw new TypeError(t);
|
|
5287
5320
|
}
|
|
5288
5321
|
return e;
|
|
5289
5322
|
}
|
|
5290
5323
|
|
|
5291
5324
|
function createDateTimeFormatClass() {
|
|
5292
|
-
const e =
|
|
5325
|
+
const e = Oe.prototype, t = Object.getOwnPropertyDescriptors(e), n = Object.getOwnPropertyDescriptors(Oe), DateTimeFormat = function(e, t = {}) {
|
|
5293
5326
|
if (!(this instanceof DateTimeFormat)) {
|
|
5294
5327
|
return new DateTimeFormat(e, t);
|
|
5295
5328
|
}
|
|
5296
|
-
|
|
5297
|
-
const n = new
|
|
5329
|
+
Ha.set(this, ((e, t = {}) => {
|
|
5330
|
+
const n = new Oe(e, t), o = n.resolvedOptions(), r = o.locale, a = pluckProps(Object.keys(t), o), i = memoize(createFormatPrepperForBranding), prepFormat = (...e) => {
|
|
5298
5331
|
let t;
|
|
5299
5332
|
const o = e.map(((e, n) => {
|
|
5300
|
-
const o =
|
|
5333
|
+
const o = Ua(e), r = (o || {}).branding;
|
|
5301
5334
|
if (n && t && t !== r) {
|
|
5302
|
-
throw new TypeError(
|
|
5335
|
+
throw new TypeError(b);
|
|
5303
5336
|
}
|
|
5304
5337
|
return t = r, o;
|
|
5305
5338
|
}));
|
|
@@ -5320,30 +5353,30 @@ function createDateTimeFormatClass() {
|
|
|
5320
5353
|
|
|
5321
5354
|
function createFormatMethod(e) {
|
|
5322
5355
|
return function(...t) {
|
|
5323
|
-
const n =
|
|
5356
|
+
const n = Ha.get(this), [o, ...r] = n(...t);
|
|
5324
5357
|
return o[e](...r);
|
|
5325
5358
|
};
|
|
5326
5359
|
}
|
|
5327
5360
|
|
|
5328
5361
|
function createProxiedMethod(e) {
|
|
5329
5362
|
return function(...t) {
|
|
5330
|
-
return
|
|
5363
|
+
return Ha.get(this).J[e](...t);
|
|
5331
5364
|
};
|
|
5332
5365
|
}
|
|
5333
5366
|
|
|
5334
5367
|
function createFormatPrepperForBranding(e) {
|
|
5335
|
-
const t =
|
|
5368
|
+
const t = Ka[e];
|
|
5336
5369
|
if (!t) {
|
|
5337
5370
|
throw new TypeError(invalidFormatType(e));
|
|
5338
5371
|
}
|
|
5339
|
-
return createFormatPrepper(t,
|
|
5372
|
+
return createFormatPrepper(t, memoize(createFormatForPrep));
|
|
5340
5373
|
}
|
|
5341
5374
|
|
|
5342
5375
|
function createCalendarFieldMethods(e, t) {
|
|
5343
5376
|
const n = {};
|
|
5344
5377
|
for (const o in e) {
|
|
5345
5378
|
n[o] = ({K: e}, n) => {
|
|
5346
|
-
const r =
|
|
5379
|
+
const r = Ua(n) || {}, {branding: a} = r, i = a === Dn || t.includes(a) ? r : toPlainDateSlots(n);
|
|
5347
5380
|
return e[o](i);
|
|
5348
5381
|
};
|
|
5349
5382
|
}
|
|
@@ -5355,7 +5388,7 @@ function createCalendarGetters(e) {
|
|
|
5355
5388
|
for (const n in e) {
|
|
5356
5389
|
t[n] = e => {
|
|
5357
5390
|
const {calendar: t} = e;
|
|
5358
|
-
return (o = t, "string" == typeof o ?
|
|
5391
|
+
return (o = t, "string" == typeof o ? st(o) : (r = o, Object.assign(Object.create(mi), {
|
|
5359
5392
|
X: r
|
|
5360
5393
|
})))[n](e);
|
|
5361
5394
|
var o, r;
|
|
@@ -5365,85 +5398,56 @@ function createCalendarGetters(e) {
|
|
|
5365
5398
|
}
|
|
5366
5399
|
|
|
5367
5400
|
function neverValueOf() {
|
|
5368
|
-
throw new TypeError(
|
|
5401
|
+
throw new TypeError(o);
|
|
5369
5402
|
}
|
|
5370
5403
|
|
|
5371
5404
|
function createCalendarFromSlots({calendar: e}) {
|
|
5372
|
-
return "string" == typeof e ? new
|
|
5405
|
+
return "string" == typeof e ? new ds(e) : e;
|
|
5373
5406
|
}
|
|
5374
5407
|
|
|
5375
5408
|
function toPlainMonthDaySlots(e, t) {
|
|
5376
5409
|
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5377
|
-
const n =
|
|
5378
|
-
if (n && n.branding ===
|
|
5410
|
+
const n = Ua(e);
|
|
5411
|
+
if (n && n.branding === gn) {
|
|
5379
5412
|
return refineOverflowOptions(t), n;
|
|
5380
5413
|
}
|
|
5381
5414
|
const o = extractCalendarSlotFromBag(e);
|
|
5382
|
-
return refinePlainMonthDayBag(
|
|
5415
|
+
return refinePlainMonthDayBag(_i(o || ce), !o, e, t);
|
|
5383
5416
|
}
|
|
5384
|
-
const n = parsePlainMonthDay(
|
|
5417
|
+
const n = parsePlainMonthDay(st, e);
|
|
5385
5418
|
return refineOverflowOptions(t), n;
|
|
5386
5419
|
}
|
|
5387
5420
|
|
|
5388
5421
|
function getOffsetNanosecondsForAdapter(e, t, n) {
|
|
5389
|
-
return o = t.call(e,
|
|
5422
|
+
return o = t.call(e, bi(createInstantSlots(n))), validateTimeZoneOffset(requireInteger(o));
|
|
5390
5423
|
var o;
|
|
5391
5424
|
}
|
|
5392
5425
|
|
|
5393
|
-
function createAdapterOps(e, t =
|
|
5426
|
+
function createAdapterOps(e, t = Ci) {
|
|
5394
5427
|
const n = Object.keys(t).sort(), o = {};
|
|
5395
5428
|
for (const r of n) {
|
|
5396
|
-
o[r] = bindArgs(t[r], e,
|
|
5429
|
+
o[r] = bindArgs(t[r], e, xe(e[r]));
|
|
5397
5430
|
}
|
|
5398
5431
|
return o;
|
|
5399
5432
|
}
|
|
5400
5433
|
|
|
5401
5434
|
function createTimeZoneOps(e, t) {
|
|
5402
|
-
return "string" == typeof e ?
|
|
5435
|
+
return "string" == typeof e ? kn(e) : createAdapterOps(e, t);
|
|
5403
5436
|
}
|
|
5404
5437
|
|
|
5405
5438
|
function createTimeZoneOffsetOps(e) {
|
|
5406
|
-
return createTimeZoneOps(e,
|
|
5407
|
-
}
|
|
5408
|
-
|
|
5409
|
-
function toPlainYearMonthSlots(e, t) {
|
|
5410
|
-
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5411
|
-
const n = Aa(e);
|
|
5412
|
-
return n && n.branding === mn ? (refineOverflowOptions(t), n) : refinePlainYearMonthBag(xi(getCalendarSlotFromBag(e)), e, t);
|
|
5413
|
-
}
|
|
5414
|
-
const n = parsePlainYearMonth(nt, e);
|
|
5415
|
-
return refineOverflowOptions(t), n;
|
|
5416
|
-
}
|
|
5417
|
-
|
|
5418
|
-
function toZonedDateTimeSlots(e, t) {
|
|
5419
|
-
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5420
|
-
const n = Aa(e);
|
|
5421
|
-
if (n && n.branding === In) {
|
|
5422
|
-
return refineZonedFieldOptions(t), n;
|
|
5423
|
-
}
|
|
5424
|
-
const o = getCalendarSlotFromBag(e);
|
|
5425
|
-
return refineZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, Ri(o), o, e, t);
|
|
5426
|
-
}
|
|
5427
|
-
return parseZonedDateTime(e, t);
|
|
5428
|
-
}
|
|
5429
|
-
|
|
5430
|
-
function slotsToIso(e) {
|
|
5431
|
-
return bn(e, createTimeZoneOffsetOps);
|
|
5432
|
-
}
|
|
5433
|
-
|
|
5434
|
-
function adaptDateMethods(e) {
|
|
5435
|
-
return mapProps((e => t => e(slotsToIso(t))), e);
|
|
5439
|
+
return createTimeZoneOps(e, gi);
|
|
5436
5440
|
}
|
|
5437
5441
|
|
|
5438
5442
|
function toInstantSlots(e) {
|
|
5439
5443
|
if (isObjectLike(e)) {
|
|
5440
|
-
const t =
|
|
5444
|
+
const t = Ua(e);
|
|
5441
5445
|
if (t) {
|
|
5442
5446
|
switch (t.branding) {
|
|
5443
|
-
case
|
|
5447
|
+
case yn:
|
|
5444
5448
|
return t;
|
|
5445
5449
|
|
|
5446
|
-
case
|
|
5450
|
+
case Nn:
|
|
5447
5451
|
return createInstantSlots(t.epochNanoseconds);
|
|
5448
5452
|
}
|
|
5449
5453
|
}
|
|
@@ -5451,30 +5455,30 @@ function toInstantSlots(e) {
|
|
|
5451
5455
|
return parseInstant(e);
|
|
5452
5456
|
}
|
|
5453
5457
|
|
|
5454
|
-
function
|
|
5455
|
-
return
|
|
5458
|
+
function xt() {
|
|
5459
|
+
return bi(createInstantSlots(numberToBigNano(this.valueOf(), q)));
|
|
5456
5460
|
}
|
|
5457
5461
|
|
|
5458
5462
|
function getImplTransition(e, t, n) {
|
|
5459
5463
|
const o = t.C(toInstantSlots(n).epochNanoseconds, e);
|
|
5460
|
-
return o ?
|
|
5464
|
+
return o ? bi(createInstantSlots(o)) : null;
|
|
5461
5465
|
}
|
|
5462
5466
|
|
|
5463
5467
|
function refineTimeZoneSlot(e) {
|
|
5464
|
-
return isObjectLike(e) ? (
|
|
5468
|
+
return isObjectLike(e) ? (Ua(e) || {}).timeZone || wi(e) : (e => resolveTimeZoneId(parseTimeZoneId(We(e))))(e);
|
|
5465
5469
|
}
|
|
5466
5470
|
|
|
5467
5471
|
function toPlainTimeSlots(e, t) {
|
|
5468
5472
|
if (isObjectLike(e)) {
|
|
5469
|
-
const n =
|
|
5473
|
+
const n = Ua(e) || {};
|
|
5470
5474
|
switch (n.branding) {
|
|
5471
|
-
case
|
|
5475
|
+
case Mn:
|
|
5472
5476
|
return refineOverflowOptions(t), n;
|
|
5473
5477
|
|
|
5474
|
-
case
|
|
5478
|
+
case In:
|
|
5475
5479
|
return refineOverflowOptions(t), createPlainTimeSlots(n);
|
|
5476
5480
|
|
|
5477
|
-
case
|
|
5481
|
+
case Nn:
|
|
5478
5482
|
return refineOverflowOptions(t), zonedDateTimeToPlainTime(createTimeZoneOffsetOps, n);
|
|
5479
5483
|
}
|
|
5480
5484
|
return refinePlainTimeBag(e, t);
|
|
@@ -5486,23 +5490,32 @@ function optionalToPlainTimeFields(e) {
|
|
|
5486
5490
|
return void 0 === e ? void 0 : toPlainTimeSlots(e);
|
|
5487
5491
|
}
|
|
5488
5492
|
|
|
5493
|
+
function toPlainYearMonthSlots(e, t) {
|
|
5494
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5495
|
+
const n = Ua(e);
|
|
5496
|
+
return n && n.branding === Tn ? (refineOverflowOptions(t), n) : refinePlainYearMonthBag(Xi(getCalendarSlotFromBag(e)), e, t);
|
|
5497
|
+
}
|
|
5498
|
+
const n = parsePlainYearMonth(st, e);
|
|
5499
|
+
return refineOverflowOptions(t), n;
|
|
5500
|
+
}
|
|
5501
|
+
|
|
5489
5502
|
function toPlainDateTimeSlots(e, t) {
|
|
5490
5503
|
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5491
|
-
const n =
|
|
5504
|
+
const n = Ua(e) || {};
|
|
5492
5505
|
switch (n.branding) {
|
|
5493
|
-
case
|
|
5506
|
+
case In:
|
|
5494
5507
|
return refineOverflowOptions(t), n;
|
|
5495
5508
|
|
|
5496
|
-
case
|
|
5509
|
+
case Dn:
|
|
5497
5510
|
return refineOverflowOptions(t), createPlainDateTimeSlots({
|
|
5498
5511
|
...n,
|
|
5499
|
-
...
|
|
5512
|
+
...be
|
|
5500
5513
|
});
|
|
5501
5514
|
|
|
5502
|
-
case
|
|
5515
|
+
case Nn:
|
|
5503
5516
|
return refineOverflowOptions(t), zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, n);
|
|
5504
5517
|
}
|
|
5505
|
-
return refinePlainDateTimeBag(
|
|
5518
|
+
return refinePlainDateTimeBag($i(getCalendarSlotFromBag(e)), e, t);
|
|
5506
5519
|
}
|
|
5507
5520
|
const n = parsePlainDateTime(e);
|
|
5508
5521
|
return refineOverflowOptions(t), n;
|
|
@@ -5510,29 +5523,29 @@ function toPlainDateTimeSlots(e, t) {
|
|
|
5510
5523
|
|
|
5511
5524
|
function toPlainDateSlots(e, t) {
|
|
5512
5525
|
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5513
|
-
const n =
|
|
5526
|
+
const n = Ua(e) || {};
|
|
5514
5527
|
switch (n.branding) {
|
|
5515
|
-
case
|
|
5528
|
+
case Dn:
|
|
5516
5529
|
return refineOverflowOptions(t), n;
|
|
5517
5530
|
|
|
5518
|
-
case
|
|
5531
|
+
case In:
|
|
5519
5532
|
return refineOverflowOptions(t), createPlainDateSlots(n);
|
|
5520
5533
|
|
|
5521
|
-
case
|
|
5534
|
+
case Nn:
|
|
5522
5535
|
return refineOverflowOptions(t), zonedDateTimeToPlainDate(createTimeZoneOffsetOps, n);
|
|
5523
5536
|
}
|
|
5524
|
-
return refinePlainDateBag(
|
|
5537
|
+
return refinePlainDateBag($i(getCalendarSlotFromBag(e)), e, t);
|
|
5525
5538
|
}
|
|
5526
5539
|
const n = parsePlainDate(e);
|
|
5527
5540
|
return refineOverflowOptions(t), n;
|
|
5528
5541
|
}
|
|
5529
5542
|
|
|
5530
5543
|
function dayAdapter(e, t, n) {
|
|
5531
|
-
return requirePositiveInteger(t.call(e,
|
|
5544
|
+
return requirePositiveInteger(t.call(e, Vi(createPlainDateSlots(n, e))));
|
|
5532
5545
|
}
|
|
5533
5546
|
|
|
5534
5547
|
function createCompoundOpsCreator(e) {
|
|
5535
|
-
return t => "string" == typeof t ?
|
|
5548
|
+
return t => "string" == typeof t ? st(t) : ((e, t) => {
|
|
5536
5549
|
const n = Object.keys(t).sort(), o = {};
|
|
5537
5550
|
for (const r of n) {
|
|
5538
5551
|
o[r] = bindArgs(t[r], e, e[r]);
|
|
@@ -5543,8 +5556,8 @@ function createCompoundOpsCreator(e) {
|
|
|
5543
5556
|
|
|
5544
5557
|
function toDurationSlots(e) {
|
|
5545
5558
|
if (isObjectLike(e)) {
|
|
5546
|
-
const t =
|
|
5547
|
-
return t && t.branding ===
|
|
5559
|
+
const t = Ua(e);
|
|
5560
|
+
return t && t.branding === vn ? t : refineDurationBag(e);
|
|
5548
5561
|
}
|
|
5549
5562
|
return parseDuration(e);
|
|
5550
5563
|
}
|
|
@@ -5552,27 +5565,27 @@ function toDurationSlots(e) {
|
|
|
5552
5565
|
function refinePublicRelativeTo(e) {
|
|
5553
5566
|
if (void 0 !== e) {
|
|
5554
5567
|
if (isObjectLike(e)) {
|
|
5555
|
-
const t =
|
|
5568
|
+
const t = Ua(e) || {};
|
|
5556
5569
|
switch (t.branding) {
|
|
5557
|
-
case
|
|
5558
|
-
case
|
|
5570
|
+
case Nn:
|
|
5571
|
+
case Dn:
|
|
5559
5572
|
return t;
|
|
5560
5573
|
|
|
5561
|
-
case
|
|
5574
|
+
case In:
|
|
5562
5575
|
return createPlainDateSlots(t);
|
|
5563
5576
|
}
|
|
5564
5577
|
const n = getCalendarSlotFromBag(e);
|
|
5565
5578
|
return {
|
|
5566
|
-
...refineMaybeZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps,
|
|
5579
|
+
...refineMaybeZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, $i(n), e),
|
|
5567
5580
|
calendar: n
|
|
5568
5581
|
};
|
|
5569
5582
|
}
|
|
5570
|
-
return
|
|
5583
|
+
return parseRelativeToSlots(e);
|
|
5571
5584
|
}
|
|
5572
5585
|
}
|
|
5573
5586
|
|
|
5574
5587
|
function getCalendarSlotFromBag(e) {
|
|
5575
|
-
return extractCalendarSlotFromBag(e) ||
|
|
5588
|
+
return extractCalendarSlotFromBag(e) || ce;
|
|
5576
5589
|
}
|
|
5577
5590
|
|
|
5578
5591
|
function extractCalendarSlotFromBag(e) {
|
|
@@ -5583,210 +5596,157 @@ function extractCalendarSlotFromBag(e) {
|
|
|
5583
5596
|
}
|
|
5584
5597
|
|
|
5585
5598
|
function refineCalendarSlot(e) {
|
|
5586
|
-
return isObjectLike(e) ? (
|
|
5599
|
+
return isObjectLike(e) ? (Ua(e) || {}).calendar || fs(e) : (e => resolveCalendarId(parseCalendarId(We(e))))(e);
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
function toZonedDateTimeSlots(e, t) {
|
|
5603
|
+
if (t = copyOptions(t), isObjectLike(e)) {
|
|
5604
|
+
const n = Ua(e);
|
|
5605
|
+
if (n && n.branding === Nn) {
|
|
5606
|
+
return refineZonedFieldOptions(t), n;
|
|
5607
|
+
}
|
|
5608
|
+
const o = getCalendarSlotFromBag(e);
|
|
5609
|
+
return refineZonedDateTimeBag(refineTimeZoneSlot, createTimeZoneOps, $i(o), o, e, t);
|
|
5610
|
+
}
|
|
5611
|
+
return parseZonedDateTime(e, t);
|
|
5612
|
+
}
|
|
5613
|
+
|
|
5614
|
+
function slotsToIso(e) {
|
|
5615
|
+
return wn(e, createTimeZoneOffsetOps);
|
|
5616
|
+
}
|
|
5617
|
+
|
|
5618
|
+
function adaptDateMethods(e) {
|
|
5619
|
+
return mapProps((e => t => e(slotsToIso(t))), e);
|
|
5587
5620
|
}
|
|
5588
5621
|
|
|
5589
|
-
const
|
|
5590
|
-
PlainYearMonth:
|
|
5591
|
-
PlainMonthDay:
|
|
5592
|
-
PlainDate:
|
|
5593
|
-
PlainDateTime:
|
|
5594
|
-
PlainTime:
|
|
5595
|
-
Instant:
|
|
5596
|
-
},
|
|
5622
|
+
const Ga = /*@__PURE__*/ new WeakMap, Ua = /*@__PURE__*/ Ga.get.bind(Ga), za = /*@__PURE__*/ Ga.set.bind(Ga), qt = /*@__PURE__*/ createDateTimeFormatClass(), Ha = /*@__PURE__*/ new WeakMap, Ka = {
|
|
5623
|
+
PlainYearMonth: bt,
|
|
5624
|
+
PlainMonthDay: Ot,
|
|
5625
|
+
PlainDate: wt,
|
|
5626
|
+
PlainDateTime: Bt,
|
|
5627
|
+
PlainTime: kt,
|
|
5628
|
+
Instant: Yt
|
|
5629
|
+
}, Qa = /*@__PURE__*/ createFormatPrepper(bt), Xa = /*@__PURE__*/ createFormatPrepper(Ot), $a = /*@__PURE__*/ createFormatPrepper(wt), _a = /*@__PURE__*/ createFormatPrepper(Bt), ei = /*@__PURE__*/ createFormatPrepper(kt), ti = /*@__PURE__*/ createFormatPrepper(Yt), ni = /*@__PURE__*/ createFormatPrepper(Ct), oi = {
|
|
5597
5630
|
era: requireStringOrUndefined,
|
|
5598
5631
|
eraYear: requireIntegerOrUndefined,
|
|
5599
5632
|
year: requireInteger,
|
|
5600
5633
|
month: requirePositiveInteger,
|
|
5601
5634
|
daysInMonth: requirePositiveInteger,
|
|
5602
5635
|
daysInYear: requirePositiveInteger,
|
|
5603
|
-
inLeapYear:
|
|
5636
|
+
inLeapYear: je,
|
|
5604
5637
|
monthsInYear: requirePositiveInteger
|
|
5605
|
-
},
|
|
5606
|
-
monthCode:
|
|
5607
|
-
},
|
|
5638
|
+
}, ri = {
|
|
5639
|
+
monthCode: We
|
|
5640
|
+
}, ai = {
|
|
5608
5641
|
day: requirePositiveInteger
|
|
5609
|
-
},
|
|
5642
|
+
}, ii = {
|
|
5610
5643
|
dayOfWeek: requirePositiveInteger,
|
|
5611
5644
|
dayOfYear: requirePositiveInteger,
|
|
5612
|
-
weekOfYear:
|
|
5613
|
-
yearOfWeek:
|
|
5645
|
+
weekOfYear: requirePositiveIntegerOrUndefined,
|
|
5646
|
+
yearOfWeek: requireIntegerOrUndefined,
|
|
5614
5647
|
daysInWeek: requirePositiveInteger
|
|
5615
|
-
},
|
|
5616
|
-
...createCalendarFieldMethods(
|
|
5617
|
-
...createCalendarFieldMethods(
|
|
5618
|
-
...createCalendarFieldMethods(
|
|
5619
|
-
...createCalendarFieldMethods(
|
|
5620
|
-
},
|
|
5621
|
-
...
|
|
5622
|
-
...
|
|
5623
|
-
}),
|
|
5624
|
-
...
|
|
5625
|
-
...
|
|
5626
|
-
}),
|
|
5648
|
+
}, si = /*@__PURE__*/ Object.assign({}, oi, ri, ai, ii), li = {
|
|
5649
|
+
...createCalendarFieldMethods(oi, [ Tn ]),
|
|
5650
|
+
...createCalendarFieldMethods(ii, []),
|
|
5651
|
+
...createCalendarFieldMethods(ri, [ Tn, gn ]),
|
|
5652
|
+
...createCalendarFieldMethods(ai, [ gn ])
|
|
5653
|
+
}, ci = /*@__PURE__*/ createCalendarGetters(si), ui = /*@__PURE__*/ createCalendarGetters({
|
|
5654
|
+
...oi,
|
|
5655
|
+
...ri
|
|
5656
|
+
}), di = /*@__PURE__*/ createCalendarGetters({
|
|
5657
|
+
...ri,
|
|
5658
|
+
...ai
|
|
5659
|
+
}), fi = {
|
|
5627
5660
|
calendarId: e => getId(e.calendar)
|
|
5628
|
-
},
|
|
5661
|
+
}, mi = /*@__PURE__*/ mapProps(((e, t) => function(n) {
|
|
5629
5662
|
const {X: o} = this;
|
|
5630
|
-
return e(o[t](
|
|
5631
|
-
}),
|
|
5663
|
+
return e(o[t](Vi(createPlainDateSlots(n, o))));
|
|
5664
|
+
}), si), Si = /*@__PURE__*/ mapPropNames((e => t => t[e]), pe.concat("sign")), Oi = /*@__PURE__*/ mapPropNames(((e, t) => e => e[ye[t]]), $), Ti = {
|
|
5632
5665
|
epochSeconds: getEpochSeconds,
|
|
5633
5666
|
epochMilliseconds: getEpochMilliseconds,
|
|
5634
5667
|
epochMicroseconds: getEpochMicroseconds,
|
|
5635
5668
|
epochNanoseconds: getEpochNanoseconds
|
|
5636
|
-
},
|
|
5637
|
-
...
|
|
5638
|
-
...
|
|
5669
|
+
}, pi = /*@__PURE__*/ bindArgs(excludePropsByName, new Set([ "branding" ])), [hi, Pi, Di] = createSlotClass(gn, bindArgs(constructPlainMonthDaySlots, refineCalendarSlot), {
|
|
5670
|
+
...fi,
|
|
5671
|
+
...di
|
|
5639
5672
|
}, {
|
|
5640
5673
|
with(e, t, n) {
|
|
5641
|
-
return
|
|
5674
|
+
return Pi(plainMonthDayWithFields(ns, e, this, rejectInvalidBag(t), n));
|
|
5642
5675
|
},
|
|
5643
5676
|
equals: (e, t) => plainMonthDaysEqual(e, toPlainMonthDaySlots(t)),
|
|
5644
5677
|
toString: formatPlainMonthDayIso,
|
|
5645
5678
|
toJSON: e => formatPlainMonthDayIso(e),
|
|
5646
5679
|
toLocaleString(e, t, n) {
|
|
5647
|
-
const [o, r] =
|
|
5680
|
+
const [o, r] = Xa(t, n, e);
|
|
5648
5681
|
return o.format(r);
|
|
5649
5682
|
},
|
|
5650
5683
|
toPlainDate(e, t) {
|
|
5651
|
-
return
|
|
5684
|
+
return Vi(plainMonthDayToPlainDate(ts, e, this, t));
|
|
5652
5685
|
},
|
|
5653
|
-
getISOFields:
|
|
5686
|
+
getISOFields: pi,
|
|
5654
5687
|
getCalendar: createCalendarFromSlots,
|
|
5655
5688
|
valueOf: neverValueOf
|
|
5656
5689
|
}, {
|
|
5657
|
-
from: (e, t) =>
|
|
5658
|
-
}),
|
|
5690
|
+
from: (e, t) => Pi(toPlainMonthDaySlots(e, t))
|
|
5691
|
+
}), Ci = {
|
|
5659
5692
|
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter,
|
|
5660
5693
|
getPossibleInstantsFor(e, t, n) {
|
|
5661
|
-
|
|
5694
|
+
const o = [ ...t.call(e, Ai(createPlainDateTimeSlots(n, ce))) ].map((e => Fi(e).epochNanoseconds)), r = o.length;
|
|
5695
|
+
return r > 1 && (o.sort(compareBigNanos), validateTimeZoneGap(bigNanoToNumber(diffBigNanos(o[0], o[r - 1])))), o;
|
|
5662
5696
|
}
|
|
5663
|
-
},
|
|
5697
|
+
}, gi = {
|
|
5664
5698
|
getOffsetNanosecondsFor: getOffsetNanosecondsForAdapter
|
|
5665
|
-
}, [
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
},
|
|
5672
|
-
add: (e, t, n) => mi(movePlainYearMonth(Qi, 0, e, toDurationSlots(t), n)),
|
|
5673
|
-
subtract: (e, t, n) => mi(movePlainYearMonth(Qi, 1, e, toDurationSlots(t), n)),
|
|
5674
|
-
until: (e, t, n) => _i(diffPlainYearMonth(Xi, 0, e, toPlainYearMonthSlots(t), n)),
|
|
5675
|
-
since: (e, t, n) => _i(diffPlainYearMonth(Xi, 1, e, toPlainYearMonthSlots(t), n)),
|
|
5676
|
-
equals: (e, t) => plainYearMonthsEqual(e, toPlainYearMonthSlots(t)),
|
|
5677
|
-
toString: formatPlainYearMonthIso,
|
|
5678
|
-
toJSON: e => formatPlainYearMonthIso(e),
|
|
5679
|
-
toLocaleString(e, t, n) {
|
|
5680
|
-
const [o, r] = La(t, n, e);
|
|
5681
|
-
return o.format(r);
|
|
5682
|
-
},
|
|
5683
|
-
toPlainDate(e, t) {
|
|
5684
|
-
return wi(plainYearMonthToPlainDate(Ui, e, this, t));
|
|
5685
|
-
},
|
|
5686
|
-
getISOFields: ii,
|
|
5687
|
-
getCalendar: createCalendarFromSlots,
|
|
5688
|
-
valueOf: neverValueOf
|
|
5689
|
-
}, {
|
|
5690
|
-
from: (e, t) => mi(toPlainYearMonthSlots(e, t)),
|
|
5691
|
-
compare: (e, t) => compareIsoDateFields(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))
|
|
5692
|
-
}), [Oi, Ti] = createSlotClass(In, bindArgs(constructZonedDateTimeSlots, refineCalendarSlot, refineTimeZoneSlot), {
|
|
5693
|
-
...ai,
|
|
5694
|
-
...ti,
|
|
5695
|
-
...adaptDateMethods($a),
|
|
5696
|
-
...adaptDateMethods(ri),
|
|
5697
|
-
hoursInDay: e => computeHoursInDay(createTimeZoneOps, e),
|
|
5698
|
-
offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,
|
|
5699
|
-
offset: e => formatOffsetNano(slotsToIso(e).offsetNanoseconds),
|
|
5700
|
-
timeZoneId: e => getId(e.timeZone)
|
|
5701
|
-
}, {
|
|
5702
|
-
with(e, t, n) {
|
|
5703
|
-
return Ti(zonedDateTimeWithFields(Ui, createTimeZoneOps, e, this, rejectInvalidBag(t), n));
|
|
5704
|
-
},
|
|
5705
|
-
withPlainTime: (e, t) => Ti(zonedDateTimeWithPlainTime(createTimeZoneOps, e, optionalToPlainTimeFields(t))),
|
|
5706
|
-
withPlainDate: (e, t) => Ti(zonedDateTimeWithPlainDate(createTimeZoneOps, e, toPlainDateSlots(t))),
|
|
5707
|
-
withTimeZone: (e, t) => Ti(slotsWithTimeZone(e, refineTimeZoneSlot(t))),
|
|
5708
|
-
withCalendar: (e, t) => Ti(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5709
|
-
add: (e, t, n) => Ti(moveZonedDateTime(Hi, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5710
|
-
subtract: (e, t, n) => Ti(moveZonedDateTime(Hi, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5711
|
-
until: (e, t, n) => _i(createDurationSlots(diffZonedDateTimes(Ki, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),
|
|
5712
|
-
since: (e, t, n) => _i(createDurationSlots(diffZonedDateTimes(Ki, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),
|
|
5713
|
-
round: (e, t) => Ti(roundZonedDateTime(createTimeZoneOps, e, t)),
|
|
5714
|
-
startOfDay: e => Ti(computeStartOfDay(createTimeZoneOps, e)),
|
|
5715
|
-
equals: (e, t) => zonedDateTimesEqual(e, toZonedDateTimeSlots(t)),
|
|
5716
|
-
toString: (e, t) => formatZonedDateTimeIso(createTimeZoneOffsetOps, e, t),
|
|
5717
|
-
toJSON: e => formatZonedDateTimeIso(createTimeZoneOffsetOps, e),
|
|
5718
|
-
toLocaleString(e, t, n = {}) {
|
|
5719
|
-
const [o, r] = Ga(t, n, e);
|
|
5720
|
-
return o.format(r);
|
|
5721
|
-
},
|
|
5722
|
-
toInstant: e => hi(zonedDateTimeToInstant(e)),
|
|
5723
|
-
toPlainDate: e => wi(zonedDateTimeToPlainDate(createTimeZoneOffsetOps, e)),
|
|
5724
|
-
toPlainTime: e => bi(zonedDateTimeToPlainTime(createTimeZoneOffsetOps, e)),
|
|
5725
|
-
toPlainDateTime: e => Ii(zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, e)),
|
|
5726
|
-
toPlainYearMonth(e) {
|
|
5727
|
-
return mi(zonedDateTimeToPlainYearMonth(xi, e, this));
|
|
5728
|
-
},
|
|
5729
|
-
toPlainMonthDay(e) {
|
|
5730
|
-
return li(zonedDateTimeToPlainMonthDay(Wi, e, this));
|
|
5731
|
-
},
|
|
5732
|
-
getISOFields: e => buildZonedIsoFields(createTimeZoneOffsetOps, e),
|
|
5733
|
-
getCalendar: createCalendarFromSlots,
|
|
5734
|
-
getTimeZone: ({timeZone: e}) => "string" == typeof e ? new Di(e) : e,
|
|
5735
|
-
valueOf: neverValueOf
|
|
5736
|
-
}, {
|
|
5737
|
-
from: (e, t) => Ti(toZonedDateTimeSlots(e, t)),
|
|
5738
|
-
compare: (e, t) => compareZonedDateTimes(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))
|
|
5739
|
-
}), [pi, hi, Pi] = createSlotClass(gn, constructInstantSlots, ai, {
|
|
5740
|
-
add: (e, t) => hi(moveInstant(0, e, toDurationSlots(t))),
|
|
5741
|
-
subtract: (e, t) => hi(moveInstant(1, e, toDurationSlots(t))),
|
|
5742
|
-
until: (e, t, n) => _i(diffInstants(0, e, toInstantSlots(t), n)),
|
|
5743
|
-
since: (e, t, n) => _i(diffInstants(1, e, toInstantSlots(t), n)),
|
|
5744
|
-
round: (e, t) => hi(roundInstant(e, t)),
|
|
5699
|
+
}, [Zi, bi, Fi] = createSlotClass(yn, constructInstantSlots, Ti, {
|
|
5700
|
+
add: (e, t) => bi(moveInstant(0, e, toDurationSlots(t))),
|
|
5701
|
+
subtract: (e, t) => bi(moveInstant(1, e, toDurationSlots(t))),
|
|
5702
|
+
until: (e, t, n) => ls(diffInstants(0, e, toInstantSlots(t), n)),
|
|
5703
|
+
since: (e, t, n) => ls(diffInstants(1, e, toInstantSlots(t), n)),
|
|
5704
|
+
round: (e, t) => bi(roundInstant(e, t)),
|
|
5745
5705
|
equals: (e, t) => instantsEqual(e, toInstantSlots(t)),
|
|
5746
5706
|
toString: (e, t) => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e, t),
|
|
5747
5707
|
toJSON: e => formatInstantIso(refineTimeZoneSlot, createTimeZoneOffsetOps, e),
|
|
5748
5708
|
toLocaleString(e, t, n) {
|
|
5749
|
-
const [o, r] =
|
|
5709
|
+
const [o, r] = ti(t, n, e);
|
|
5750
5710
|
return o.format(r);
|
|
5751
5711
|
},
|
|
5752
|
-
toZonedDateTimeISO: (e, t) =>
|
|
5712
|
+
toZonedDateTimeISO: (e, t) => Ss(instantToZonedDateTime(e, refineTimeZoneSlot(t))),
|
|
5753
5713
|
toZonedDateTime(e, t) {
|
|
5754
5714
|
const n = requireObjectLike(t);
|
|
5755
|
-
return
|
|
5715
|
+
return Ss(instantToZonedDateTime(e, refineTimeZoneSlot(n.timeZone), refineCalendarSlot(n.calendar)));
|
|
5756
5716
|
},
|
|
5757
5717
|
valueOf: neverValueOf
|
|
5758
5718
|
}, {
|
|
5759
|
-
from: e =>
|
|
5760
|
-
fromEpochSeconds: e =>
|
|
5761
|
-
fromEpochMilliseconds: e =>
|
|
5762
|
-
fromEpochMicroseconds: e =>
|
|
5763
|
-
fromEpochNanoseconds: e =>
|
|
5719
|
+
from: e => bi(toInstantSlots(e)),
|
|
5720
|
+
fromEpochSeconds: e => bi(epochSecToInstant(e)),
|
|
5721
|
+
fromEpochMilliseconds: e => bi(epochMilliToInstant(e)),
|
|
5722
|
+
fromEpochMicroseconds: e => bi(epochMicroToInstant(e)),
|
|
5723
|
+
fromEpochNanoseconds: e => bi(epochNanoToInstant(e)),
|
|
5764
5724
|
compare: (e, t) => compareInstants(toInstantSlots(e), toInstantSlots(t))
|
|
5765
|
-
}), [
|
|
5725
|
+
}), [Ii, vi] = createSlotClass("TimeZone", (e => {
|
|
5766
5726
|
const t = resolveTimeZoneId(e);
|
|
5767
5727
|
return {
|
|
5768
5728
|
branding: "TimeZone",
|
|
5769
5729
|
id: t,
|
|
5770
|
-
K:
|
|
5730
|
+
K: kn(t)
|
|
5771
5731
|
};
|
|
5772
5732
|
}), {
|
|
5773
5733
|
id: e => e.id
|
|
5774
5734
|
}, {
|
|
5775
5735
|
toString: e => e.id,
|
|
5776
5736
|
toJSON: e => e.id,
|
|
5777
|
-
getPossibleInstantsFor: ({K: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e =>
|
|
5737
|
+
getPossibleInstantsFor: ({K: e}, t) => e.getPossibleInstantsFor(toPlainDateTimeSlots(t)).map((e => bi(createInstantSlots(e)))),
|
|
5778
5738
|
getOffsetNanosecondsFor: ({K: e}, t) => e.getOffsetNanosecondsFor(toInstantSlots(t).epochNanoseconds),
|
|
5779
5739
|
getOffsetStringFor(e, t) {
|
|
5780
|
-
const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this,
|
|
5740
|
+
const n = toInstantSlots(t).epochNanoseconds, o = createAdapterOps(this, gi).getOffsetNanosecondsFor(n);
|
|
5781
5741
|
return formatOffsetNano(o);
|
|
5782
5742
|
},
|
|
5783
|
-
getPlainDateTimeFor(e, t, n =
|
|
5784
|
-
const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this,
|
|
5785
|
-
return
|
|
5743
|
+
getPlainDateTimeFor(e, t, n = ce) {
|
|
5744
|
+
const o = toInstantSlots(t).epochNanoseconds, r = createAdapterOps(this, gi).getOffsetNanosecondsFor(o);
|
|
5745
|
+
return Ai(createPlainDateTimeSlots(epochNanoToIso(o, r), refineCalendarSlot(n)));
|
|
5786
5746
|
},
|
|
5787
5747
|
getInstantFor(e, t, n) {
|
|
5788
5748
|
const o = toPlainDateTimeSlots(t), r = refineEpochDisambigOptions(n), a = createAdapterOps(this);
|
|
5789
|
-
return
|
|
5749
|
+
return bi(createInstantSlots(getSingleInstantFor(a, o, r)));
|
|
5790
5750
|
},
|
|
5791
5751
|
getNextTransition: ({K: e}, t) => getImplTransition(1, e, t),
|
|
5792
5752
|
getPreviousTransition: ({K: e}, t) => getImplTransition(-1, e, t),
|
|
@@ -5796,153 +5756,179 @@ const Ya = /*@__PURE__*/ new WeakMap, Aa = /*@__PURE__*/ Ya.get.bind(Ya), Ea = /
|
|
|
5796
5756
|
}, {
|
|
5797
5757
|
from(e) {
|
|
5798
5758
|
const t = refineTimeZoneSlot(e);
|
|
5799
|
-
return "string" == typeof t ? new
|
|
5759
|
+
return "string" == typeof t ? new Ii(t) : t;
|
|
5800
5760
|
}
|
|
5801
|
-
}),
|
|
5761
|
+
}), wi = /*@__PURE__*/ createProtocolValidator(Object.keys(Ci)), [ji, Mi] = createSlotClass(Mn, constructPlainTimeSlots, Oi, {
|
|
5802
5762
|
with(e, t, n) {
|
|
5803
|
-
return
|
|
5763
|
+
return Mi(plainTimeWithFields(this, rejectInvalidBag(t), n));
|
|
5804
5764
|
},
|
|
5805
|
-
add: (e, t) =>
|
|
5806
|
-
subtract: (e, t) =>
|
|
5807
|
-
until: (e, t, n) =>
|
|
5808
|
-
since: (e, t, n) =>
|
|
5809
|
-
round: (e, t) =>
|
|
5765
|
+
add: (e, t) => Mi(movePlainTime(0, e, toDurationSlots(t))),
|
|
5766
|
+
subtract: (e, t) => Mi(movePlainTime(1, e, toDurationSlots(t))),
|
|
5767
|
+
until: (e, t, n) => ls(diffPlainTimes(0, e, toPlainTimeSlots(t), n)),
|
|
5768
|
+
since: (e, t, n) => ls(diffPlainTimes(1, e, toPlainTimeSlots(t), n)),
|
|
5769
|
+
round: (e, t) => Mi(roundPlainTime(e, t)),
|
|
5810
5770
|
equals: (e, t) => plainTimesEqual(e, toPlainTimeSlots(t)),
|
|
5811
5771
|
toString: formatPlainTimeIso,
|
|
5812
5772
|
toJSON: e => formatPlainTimeIso(e),
|
|
5813
5773
|
toLocaleString(e, t, n) {
|
|
5814
|
-
const [o, r] =
|
|
5774
|
+
const [o, r] = ei(t, n, e);
|
|
5815
5775
|
return o.format(r);
|
|
5816
5776
|
},
|
|
5817
|
-
toZonedDateTime: (e, t) =>
|
|
5818
|
-
toPlainDateTime: (e, t) =>
|
|
5819
|
-
getISOFields:
|
|
5777
|
+
toZonedDateTime: (e, t) => Ss(plainTimeToZonedDateTime(refineTimeZoneSlot, toPlainDateSlots, createTimeZoneOps, e, t)),
|
|
5778
|
+
toPlainDateTime: (e, t) => Ai(plainTimeToPlainDateTime(e, toPlainDateSlots(t))),
|
|
5779
|
+
getISOFields: pi,
|
|
5820
5780
|
valueOf: neverValueOf
|
|
5821
5781
|
}, {
|
|
5822
|
-
from: (e, t) =>
|
|
5782
|
+
from: (e, t) => Mi(toPlainTimeSlots(e, t)),
|
|
5823
5783
|
compare: (e, t) => compareIsoTimeFields(toPlainTimeSlots(e), toPlainTimeSlots(t))
|
|
5824
|
-
}), [
|
|
5825
|
-
...
|
|
5826
|
-
|
|
5827
|
-
...ri
|
|
5784
|
+
}), [yi, Ni, Bi] = createSlotClass(Tn, bindArgs(constructPlainYearMonthSlots, refineCalendarSlot), {
|
|
5785
|
+
...fi,
|
|
5786
|
+
...ui
|
|
5828
5787
|
}, {
|
|
5829
5788
|
with(e, t, n) {
|
|
5830
|
-
return
|
|
5789
|
+
return Ni(plainYearMonthWithFields(es, e, this, rejectInvalidBag(t), n));
|
|
5790
|
+
},
|
|
5791
|
+
add: (e, t, n) => Ni(movePlainYearMonth(as, 0, e, toDurationSlots(t), n)),
|
|
5792
|
+
subtract: (e, t, n) => Ni(movePlainYearMonth(as, 1, e, toDurationSlots(t), n)),
|
|
5793
|
+
until: (e, t, n) => ls(diffPlainYearMonth(is, 0, e, toPlainYearMonthSlots(t), n)),
|
|
5794
|
+
since: (e, t, n) => ls(diffPlainYearMonth(is, 1, e, toPlainYearMonthSlots(t), n)),
|
|
5795
|
+
equals: (e, t) => plainYearMonthsEqual(e, toPlainYearMonthSlots(t)),
|
|
5796
|
+
toString: formatPlainYearMonthIso,
|
|
5797
|
+
toJSON: e => formatPlainYearMonthIso(e),
|
|
5798
|
+
toLocaleString(e, t, n) {
|
|
5799
|
+
const [o, r] = Qa(t, n, e);
|
|
5800
|
+
return o.format(r);
|
|
5831
5801
|
},
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5802
|
+
toPlainDate(e, t) {
|
|
5803
|
+
return Vi(plainYearMonthToPlainDate(ts, e, this, t));
|
|
5804
|
+
},
|
|
5805
|
+
getISOFields: pi,
|
|
5806
|
+
getCalendar: createCalendarFromSlots,
|
|
5807
|
+
valueOf: neverValueOf
|
|
5808
|
+
}, {
|
|
5809
|
+
from: (e, t) => Ni(toPlainYearMonthSlots(e, t)),
|
|
5810
|
+
compare: (e, t) => compareIsoDateFields(toPlainYearMonthSlots(e), toPlainYearMonthSlots(t))
|
|
5811
|
+
}), [Yi, Ai] = createSlotClass(In, bindArgs(constructPlainDateTimeSlots, refineCalendarSlot), {
|
|
5812
|
+
...fi,
|
|
5813
|
+
...ci,
|
|
5814
|
+
...Oi
|
|
5815
|
+
}, {
|
|
5816
|
+
with(e, t, n) {
|
|
5817
|
+
return Ai(plainDateTimeWithFields(ts, e, this, rejectInvalidBag(t), n));
|
|
5818
|
+
},
|
|
5819
|
+
withPlainTime: (e, t) => Ai(plainDateTimeWithPlainTime(e, optionalToPlainTimeFields(t))),
|
|
5820
|
+
withPlainDate: (e, t) => Ai(plainDateTimeWithPlainDate(e, toPlainDateSlots(t))),
|
|
5821
|
+
withCalendar: (e, t) => Ai(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5822
|
+
add: (e, t, n) => Ai(movePlainDateTime(os, 0, e, toDurationSlots(t), n)),
|
|
5823
|
+
subtract: (e, t, n) => Ai(movePlainDateTime(os, 1, e, toDurationSlots(t), n)),
|
|
5824
|
+
until: (e, t, n) => ls(diffPlainDateTimes(rs, 0, e, toPlainDateTimeSlots(t), n)),
|
|
5825
|
+
since: (e, t, n) => ls(diffPlainDateTimes(rs, 1, e, toPlainDateTimeSlots(t), n)),
|
|
5826
|
+
round: (e, t) => Ai(roundPlainDateTime(e, t)),
|
|
5840
5827
|
equals: (e, t) => plainDateTimesEqual(e, toPlainDateTimeSlots(t)),
|
|
5841
5828
|
toString: (e, t) => formatPlainDateTimeIso(e, t),
|
|
5842
5829
|
toJSON: e => formatPlainDateTimeIso(e),
|
|
5843
5830
|
toLocaleString(e, t, n) {
|
|
5844
|
-
const [o, r] =
|
|
5831
|
+
const [o, r] = _a(t, n, e);
|
|
5845
5832
|
return o.format(r);
|
|
5846
5833
|
},
|
|
5847
|
-
toZonedDateTime: (e, t, n) =>
|
|
5848
|
-
toPlainDate: e =>
|
|
5834
|
+
toZonedDateTime: (e, t, n) => Ss(plainDateTimeToZonedDateTime(createTimeZoneOps, e, refineTimeZoneSlot(t), n)),
|
|
5835
|
+
toPlainDate: e => Vi(createPlainDateSlots(e)),
|
|
5849
5836
|
toPlainYearMonth(e) {
|
|
5850
|
-
return
|
|
5837
|
+
return Ni(plainDateTimeToPlainYearMonth(Xi, e, this));
|
|
5851
5838
|
},
|
|
5852
5839
|
toPlainMonthDay(e) {
|
|
5853
|
-
return
|
|
5840
|
+
return Pi(plainDateTimeToPlainMonthDay(_i, e, this));
|
|
5854
5841
|
},
|
|
5855
|
-
toPlainTime: e =>
|
|
5856
|
-
getISOFields:
|
|
5842
|
+
toPlainTime: e => Mi(createPlainTimeSlots(e)),
|
|
5843
|
+
getISOFields: pi,
|
|
5857
5844
|
getCalendar: createCalendarFromSlots,
|
|
5858
5845
|
valueOf: neverValueOf
|
|
5859
5846
|
}, {
|
|
5860
|
-
from: (e, t) =>
|
|
5847
|
+
from: (e, t) => Ai(toPlainDateTimeSlots(e, t)),
|
|
5861
5848
|
compare: (e, t) => compareIsoDateTimeFields(toPlainDateTimeSlots(e), toPlainDateTimeSlots(t))
|
|
5862
|
-
}), [
|
|
5863
|
-
...
|
|
5864
|
-
|
|
5849
|
+
}), [Ei, Vi, Ji] = createSlotClass(Dn, bindArgs(constructPlainDateSlots, refineCalendarSlot), {
|
|
5850
|
+
...fi,
|
|
5851
|
+
...ci
|
|
5865
5852
|
}, {
|
|
5866
5853
|
with(e, t, n) {
|
|
5867
|
-
return
|
|
5854
|
+
return Vi(plainDateWithFields(ts, e, this, rejectInvalidBag(t), n));
|
|
5868
5855
|
},
|
|
5869
|
-
withCalendar: (e, t) =>
|
|
5870
|
-
add: (e, t, n) =>
|
|
5871
|
-
subtract: (e, t, n) =>
|
|
5872
|
-
until: (e, t, n) =>
|
|
5873
|
-
since: (e, t, n) =>
|
|
5856
|
+
withCalendar: (e, t) => Vi(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5857
|
+
add: (e, t, n) => Vi(movePlainDate(os, 0, e, toDurationSlots(t), n)),
|
|
5858
|
+
subtract: (e, t, n) => Vi(movePlainDate(os, 1, e, toDurationSlots(t), n)),
|
|
5859
|
+
until: (e, t, n) => ls(diffPlainDates(rs, 0, e, toPlainDateSlots(t), n)),
|
|
5860
|
+
since: (e, t, n) => ls(diffPlainDates(rs, 1, e, toPlainDateSlots(t), n)),
|
|
5874
5861
|
equals: (e, t) => plainDatesEqual(e, toPlainDateSlots(t)),
|
|
5875
5862
|
toString: formatPlainDateIso,
|
|
5876
5863
|
toJSON: e => formatPlainDateIso(e),
|
|
5877
5864
|
toLocaleString(e, t, n) {
|
|
5878
|
-
const [o, r] =
|
|
5865
|
+
const [o, r] = $a(t, n, e);
|
|
5879
5866
|
return o.format(r);
|
|
5880
5867
|
},
|
|
5881
5868
|
toZonedDateTime(e, t) {
|
|
5882
|
-
const n = !isObjectLike(t) || t instanceof
|
|
5869
|
+
const n = !isObjectLike(t) || t instanceof Ii ? {
|
|
5883
5870
|
timeZone: t
|
|
5884
5871
|
} : t;
|
|
5885
|
-
return
|
|
5872
|
+
return Ss(plainDateToZonedDateTime(refineTimeZoneSlot, toPlainTimeSlots, createTimeZoneOps, e, n));
|
|
5886
5873
|
},
|
|
5887
|
-
toPlainDateTime: (e, t) =>
|
|
5874
|
+
toPlainDateTime: (e, t) => Ai(plainDateToPlainDateTime(e, optionalToPlainTimeFields(t))),
|
|
5888
5875
|
toPlainYearMonth(e) {
|
|
5889
|
-
return
|
|
5876
|
+
return Ni(plainDateToPlainYearMonth(Xi, e, this));
|
|
5890
5877
|
},
|
|
5891
5878
|
toPlainMonthDay(e) {
|
|
5892
|
-
return
|
|
5879
|
+
return Pi(plainDateToPlainMonthDay(_i, e, this));
|
|
5893
5880
|
},
|
|
5894
|
-
getISOFields:
|
|
5881
|
+
getISOFields: pi,
|
|
5895
5882
|
getCalendar: createCalendarFromSlots,
|
|
5896
5883
|
valueOf: neverValueOf
|
|
5897
5884
|
}, {
|
|
5898
|
-
from: (e, t) =>
|
|
5885
|
+
from: (e, t) => Vi(toPlainDateSlots(e, t)),
|
|
5899
5886
|
compare: (e, t) => compareIsoDateFields(toPlainDateSlots(e), toPlainDateSlots(t))
|
|
5900
|
-
}),
|
|
5887
|
+
}), Li = {
|
|
5901
5888
|
fields(e, t, n) {
|
|
5902
5889
|
return [ ...t.call(e, n) ];
|
|
5903
5890
|
}
|
|
5904
|
-
},
|
|
5891
|
+
}, qi = /*@__PURE__*/ Object.assign({
|
|
5905
5892
|
dateFromFields(e, t, n, o) {
|
|
5906
|
-
return
|
|
5893
|
+
return Ji(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5907
5894
|
}
|
|
5908
|
-
},
|
|
5895
|
+
}, Li), ki = /*@__PURE__*/ Object.assign({
|
|
5909
5896
|
yearMonthFromFields(e, t, n, o) {
|
|
5910
|
-
return
|
|
5897
|
+
return Bi(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5911
5898
|
}
|
|
5912
|
-
},
|
|
5899
|
+
}, Li), xi = /*@__PURE__*/ Object.assign({
|
|
5913
5900
|
monthDayFromFields(e, t, n, o) {
|
|
5914
|
-
return
|
|
5901
|
+
return Di(t.call(e, Object.assign(Object.create(null), n), o));
|
|
5915
5902
|
}
|
|
5916
|
-
},
|
|
5903
|
+
}, Li), Ri = {
|
|
5917
5904
|
mergeFields(e, t, n, o) {
|
|
5918
5905
|
return requireObjectLike(t.call(e, Object.assign(Object.create(null), n), Object.assign(Object.create(null), o)));
|
|
5919
5906
|
}
|
|
5920
|
-
},
|
|
5907
|
+
}, Wi = /*@__PURE__*/ Object.assign({}, qi, Ri), Gi = /*@__PURE__*/ Object.assign({}, ki, Ri), Ui = /*@__PURE__*/ Object.assign({}, xi, Ri), zi = {
|
|
5921
5908
|
dateAdd(e, t, n, o, r) {
|
|
5922
|
-
return
|
|
5909
|
+
return Ji(t.call(e, Vi(createPlainDateSlots(n, e)), ls(createDurationSlots(o)), r));
|
|
5923
5910
|
}
|
|
5924
|
-
},
|
|
5911
|
+
}, Hi = /*@__PURE__*/ Object.assign({}, zi, {
|
|
5925
5912
|
dateUntil(e, t, n, o, r, a) {
|
|
5926
|
-
return
|
|
5927
|
-
largestUnit:
|
|
5913
|
+
return cs(t.call(e, Vi(createPlainDateSlots(n, e)), Vi(createPlainDateSlots(o, e)), Object.assign(Object.create(null), a, {
|
|
5914
|
+
largestUnit: C[r]
|
|
5928
5915
|
})));
|
|
5929
5916
|
}
|
|
5930
|
-
}),
|
|
5917
|
+
}), Ki = /*@__PURE__*/ Object.assign({}, zi, {
|
|
5931
5918
|
day: dayAdapter
|
|
5932
|
-
}),
|
|
5919
|
+
}), Qi = /*@__PURE__*/ Object.assign({}, Hi, {
|
|
5933
5920
|
day: dayAdapter
|
|
5934
|
-
}),
|
|
5935
|
-
...
|
|
5936
|
-
blank:
|
|
5937
|
-
sign: e => Sn(e)
|
|
5921
|
+
}), Xi = /*@__PURE__*/ createCompoundOpsCreator(ki), $i = /*@__PURE__*/ createCompoundOpsCreator(qi), _i = /*@__PURE__*/ createCompoundOpsCreator(xi), es = /*@__PURE__*/ createCompoundOpsCreator(Gi), ts = /*@__PURE__*/ createCompoundOpsCreator(Wi), ns = /*@__PURE__*/ createCompoundOpsCreator(Ui), os = /*@__PURE__*/ createCompoundOpsCreator(zi), rs = /*@__PURE__*/ createCompoundOpsCreator(Hi), as = /*@__PURE__*/ createCompoundOpsCreator(Ki), is = /*@__PURE__*/ createCompoundOpsCreator(Qi), [ss, ls, cs] = createSlotClass(vn, constructDurationSlots, {
|
|
5922
|
+
...Si,
|
|
5923
|
+
blank: getDurationBlank
|
|
5938
5924
|
}, {
|
|
5939
|
-
with: (e, t) =>
|
|
5940
|
-
add: (e, t, n) =>
|
|
5941
|
-
subtract: (e, t, n) =>
|
|
5942
|
-
negated: e =>
|
|
5943
|
-
abs: e =>
|
|
5944
|
-
round: (e, t) =>
|
|
5945
|
-
total: (e, t) => totalDuration(refinePublicRelativeTo,
|
|
5925
|
+
with: (e, t) => ls(durationWithFields(e, t)),
|
|
5926
|
+
add: (e, t, n) => ls(addDurations(refinePublicRelativeTo, rs, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5927
|
+
subtract: (e, t, n) => ls(addDurations(refinePublicRelativeTo, rs, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5928
|
+
negated: e => ls(negateDuration(e)),
|
|
5929
|
+
abs: e => ls(absDuration(e)),
|
|
5930
|
+
round: (e, t) => ls(roundDuration(refinePublicRelativeTo, rs, createTimeZoneOps, e, t)),
|
|
5931
|
+
total: (e, t) => totalDuration(refinePublicRelativeTo, rs, createTimeZoneOps, e, t),
|
|
5946
5932
|
toString: formatDurationIso,
|
|
5947
5933
|
toLocaleString(e, t, n) {
|
|
5948
5934
|
return Intl.DurationFormat ? new Intl.DurationFormat(t, n).format(this) : formatDurationIso(e);
|
|
@@ -5950,21 +5936,21 @@ const Ya = /*@__PURE__*/ new WeakMap, Aa = /*@__PURE__*/ Ya.get.bind(Ya), Ea = /
|
|
|
5950
5936
|
toJSON: e => formatDurationIso(e),
|
|
5951
5937
|
valueOf: neverValueOf
|
|
5952
5938
|
}, {
|
|
5953
|
-
from: e =>
|
|
5954
|
-
compare: (e, t, n) => compareDurations(refinePublicRelativeTo,
|
|
5955
|
-
}),
|
|
5939
|
+
from: e => ls(toDurationSlots(e)),
|
|
5940
|
+
compare: (e, t, n) => compareDurations(refinePublicRelativeTo, os, createTimeZoneOps, toDurationSlots(e), toDurationSlots(t), n)
|
|
5941
|
+
}), us = {
|
|
5956
5942
|
toString: e => e.id,
|
|
5957
5943
|
toJSON: e => e.id,
|
|
5958
|
-
...
|
|
5959
|
-
dateAdd: ({id: e, K: t}, n, o, r) =>
|
|
5960
|
-
dateUntil: ({K: e}, t, n, o) =>
|
|
5961
|
-
dateFromFields: ({id: e, K: t}, n, o) =>
|
|
5962
|
-
yearMonthFromFields: ({id: e, K: t}, n, o) =>
|
|
5963
|
-
monthDayFromFields: ({id: e, K: t}, n, o) =>
|
|
5944
|
+
...li,
|
|
5945
|
+
dateAdd: ({id: e, K: t}, n, o, r) => Vi(createPlainDateSlots(t.dateAdd(toPlainDateSlots(n), toDurationSlots(o), r), e)),
|
|
5946
|
+
dateUntil: ({K: e}, t, n, o) => ls(createDurationSlots(e.dateUntil(toPlainDateSlots(t), toPlainDateSlots(n), refineCalendarDiffOptions(o)))),
|
|
5947
|
+
dateFromFields: ({id: e, K: t}, n, o) => Vi(refinePlainDateBag(t, n, o, getRequiredDateFields(e))),
|
|
5948
|
+
yearMonthFromFields: ({id: e, K: t}, n, o) => Ni(refinePlainYearMonthBag(t, n, o, getRequiredYearMonthFields(e))),
|
|
5949
|
+
monthDayFromFields: ({id: e, K: t}, n, o) => Pi(refinePlainMonthDayBag(t, 0, n, o, getRequiredMonthDayFields(e))),
|
|
5964
5950
|
fields({K: e}, t) {
|
|
5965
|
-
const n = new Set(
|
|
5951
|
+
const n = new Set(re), o = [];
|
|
5966
5952
|
for (const e of t) {
|
|
5967
|
-
if (
|
|
5953
|
+
if (We(e), !n.has(e)) {
|
|
5968
5954
|
throw new RangeError(forbiddenField(e));
|
|
5969
5955
|
}
|
|
5970
5956
|
n.delete(e), o.push(e);
|
|
@@ -5972,47 +5958,94 @@ const Ya = /*@__PURE__*/ new WeakMap, Aa = /*@__PURE__*/ Ya.get.bind(Ya), Ea = /
|
|
|
5972
5958
|
return e.fields(o);
|
|
5973
5959
|
},
|
|
5974
5960
|
mergeFields: ({K: e}, t, n) => e.mergeFields(excludeUndefinedProps(requireNonNullish(t)), excludeUndefinedProps(requireNonNullish(n)))
|
|
5975
|
-
}, [
|
|
5976
|
-
const t = resolveCalendarId(
|
|
5961
|
+
}, [ds] = createSlotClass("Calendar", (e => {
|
|
5962
|
+
const t = resolveCalendarId(We(e));
|
|
5977
5963
|
return {
|
|
5978
5964
|
branding: "Calendar",
|
|
5979
5965
|
id: t,
|
|
5980
|
-
K:
|
|
5966
|
+
K: st(t)
|
|
5981
5967
|
};
|
|
5982
5968
|
}), {
|
|
5983
5969
|
id: e => e.id
|
|
5984
|
-
},
|
|
5970
|
+
}, us, {
|
|
5985
5971
|
from(e) {
|
|
5986
5972
|
const t = refineCalendarSlot(e);
|
|
5987
|
-
return "string" == typeof t ? new
|
|
5973
|
+
return "string" == typeof t ? new ds(t) : t;
|
|
5988
5974
|
}
|
|
5989
|
-
}),
|
|
5975
|
+
}), fs = /*@__PURE__*/ createProtocolValidator(Object.keys(us).slice(4)), [ms, Ss] = createSlotClass(Nn, bindArgs(constructZonedDateTimeSlots, refineCalendarSlot, refineTimeZoneSlot), {
|
|
5976
|
+
...Ti,
|
|
5977
|
+
...fi,
|
|
5978
|
+
...adaptDateMethods(ci),
|
|
5979
|
+
...adaptDateMethods(Oi),
|
|
5980
|
+
hoursInDay: e => computeHoursInDay(createTimeZoneOps, e),
|
|
5981
|
+
offsetNanoseconds: e => slotsToIso(e).offsetNanoseconds,
|
|
5982
|
+
offset: e => formatOffsetNano(slotsToIso(e).offsetNanoseconds),
|
|
5983
|
+
timeZoneId: e => getId(e.timeZone)
|
|
5984
|
+
}, {
|
|
5985
|
+
with(e, t, n) {
|
|
5986
|
+
return Ss(zonedDateTimeWithFields(ts, createTimeZoneOps, e, this, rejectInvalidBag(t), n));
|
|
5987
|
+
},
|
|
5988
|
+
withPlainTime: (e, t) => Ss(zonedDateTimeWithPlainTime(createTimeZoneOps, e, optionalToPlainTimeFields(t))),
|
|
5989
|
+
withPlainDate: (e, t) => Ss(zonedDateTimeWithPlainDate(createTimeZoneOps, e, toPlainDateSlots(t))),
|
|
5990
|
+
withTimeZone: (e, t) => Ss(slotsWithTimeZone(e, refineTimeZoneSlot(t))),
|
|
5991
|
+
withCalendar: (e, t) => Ss(slotsWithCalendar(e, refineCalendarSlot(t))),
|
|
5992
|
+
add: (e, t, n) => Ss(moveZonedDateTime(os, createTimeZoneOps, 0, e, toDurationSlots(t), n)),
|
|
5993
|
+
subtract: (e, t, n) => Ss(moveZonedDateTime(os, createTimeZoneOps, 1, e, toDurationSlots(t), n)),
|
|
5994
|
+
until: (e, t, n) => ls(createDurationSlots(diffZonedDateTimes(rs, createTimeZoneOps, 0, e, toZonedDateTimeSlots(t), n))),
|
|
5995
|
+
since: (e, t, n) => ls(createDurationSlots(diffZonedDateTimes(rs, createTimeZoneOps, 1, e, toZonedDateTimeSlots(t), n))),
|
|
5996
|
+
round: (e, t) => Ss(roundZonedDateTime(createTimeZoneOps, e, t)),
|
|
5997
|
+
startOfDay: e => Ss(computeStartOfDay(createTimeZoneOps, e)),
|
|
5998
|
+
equals: (e, t) => zonedDateTimesEqual(e, toZonedDateTimeSlots(t)),
|
|
5999
|
+
toString: (e, t) => formatZonedDateTimeIso(createTimeZoneOffsetOps, e, t),
|
|
6000
|
+
toJSON: e => formatZonedDateTimeIso(createTimeZoneOffsetOps, e),
|
|
6001
|
+
toLocaleString(e, t, n = {}) {
|
|
6002
|
+
const [o, r] = ni(t, n, e);
|
|
6003
|
+
return o.format(r);
|
|
6004
|
+
},
|
|
6005
|
+
toInstant: e => bi(zonedDateTimeToInstant(e)),
|
|
6006
|
+
toPlainDate: e => Vi(zonedDateTimeToPlainDate(createTimeZoneOffsetOps, e)),
|
|
6007
|
+
toPlainTime: e => Mi(zonedDateTimeToPlainTime(createTimeZoneOffsetOps, e)),
|
|
6008
|
+
toPlainDateTime: e => Ai(zonedDateTimeToPlainDateTime(createTimeZoneOffsetOps, e)),
|
|
6009
|
+
toPlainYearMonth(e) {
|
|
6010
|
+
return Ni(zonedDateTimeToPlainYearMonth(Xi, e, this));
|
|
6011
|
+
},
|
|
6012
|
+
toPlainMonthDay(e) {
|
|
6013
|
+
return Pi(zonedDateTimeToPlainMonthDay(_i, e, this));
|
|
6014
|
+
},
|
|
6015
|
+
getISOFields: e => buildZonedIsoFields(createTimeZoneOffsetOps, e),
|
|
6016
|
+
getCalendar: createCalendarFromSlots,
|
|
6017
|
+
getTimeZone: ({timeZone: e}) => "string" == typeof e ? new Ii(e) : e,
|
|
6018
|
+
valueOf: neverValueOf
|
|
6019
|
+
}, {
|
|
6020
|
+
from: (e, t) => Ss(toZonedDateTimeSlots(e, t)),
|
|
6021
|
+
compare: (e, t) => compareZonedDateTimes(toZonedDateTimeSlots(e), toZonedDateTimeSlots(t))
|
|
6022
|
+
}), Os = /*@__PURE__*/ Object.defineProperties({}, {
|
|
5990
6023
|
...createStringTagDescriptors("Temporal.Now"),
|
|
5991
6024
|
...createPropDescriptors({
|
|
5992
6025
|
timeZoneId: () => getCurrentTimeZoneId(),
|
|
5993
|
-
instant: () =>
|
|
5994
|
-
zonedDateTime: (e, t = getCurrentTimeZoneId()) =>
|
|
5995
|
-
zonedDateTimeISO: (e = getCurrentTimeZoneId()) =>
|
|
5996
|
-
plainDateTime: (e, t = getCurrentTimeZoneId()) =>
|
|
5997
|
-
plainDateTimeISO: (e = getCurrentTimeZoneId()) =>
|
|
5998
|
-
plainDate: (e, t = getCurrentTimeZoneId()) =>
|
|
5999
|
-
plainDateISO: (e = getCurrentTimeZoneId()) =>
|
|
6000
|
-
plainTimeISO: (e = getCurrentTimeZoneId()) =>
|
|
6026
|
+
instant: () => bi(createInstantSlots(getCurrentEpochNano())),
|
|
6027
|
+
zonedDateTime: (e, t = getCurrentTimeZoneId()) => Ss(createZonedDateTimeSlots(getCurrentEpochNano(), refineTimeZoneSlot(t), refineCalendarSlot(e))),
|
|
6028
|
+
zonedDateTimeISO: (e = getCurrentTimeZoneId()) => Ss(createZonedDateTimeSlots(getCurrentEpochNano(), refineTimeZoneSlot(e), ce)),
|
|
6029
|
+
plainDateTime: (e, t = getCurrentTimeZoneId()) => Ai(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
6030
|
+
plainDateTimeISO: (e = getCurrentTimeZoneId()) => Ai(createPlainDateTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ce)),
|
|
6031
|
+
plainDate: (e, t = getCurrentTimeZoneId()) => Vi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(t))), refineCalendarSlot(e))),
|
|
6032
|
+
plainDateISO: (e = getCurrentTimeZoneId()) => Vi(createPlainDateSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e))), ce)),
|
|
6033
|
+
plainTimeISO: (e = getCurrentTimeZoneId()) => Mi(createPlainTimeSlots(getCurrentIsoDateTime(createTimeZoneOffsetOps(refineTimeZoneSlot(e)))))
|
|
6001
6034
|
})
|
|
6002
6035
|
}), jt = /*@__PURE__*/ Object.defineProperties({}, {
|
|
6003
6036
|
...createStringTagDescriptors("Temporal"),
|
|
6004
6037
|
...createPropDescriptors({
|
|
6005
|
-
PlainYearMonth:
|
|
6006
|
-
PlainMonthDay:
|
|
6007
|
-
PlainDate:
|
|
6008
|
-
PlainTime:
|
|
6009
|
-
PlainDateTime:
|
|
6010
|
-
ZonedDateTime:
|
|
6011
|
-
Instant:
|
|
6012
|
-
Calendar:
|
|
6013
|
-
TimeZone:
|
|
6014
|
-
Duration:
|
|
6015
|
-
Now:
|
|
6038
|
+
PlainYearMonth: yi,
|
|
6039
|
+
PlainMonthDay: hi,
|
|
6040
|
+
PlainDate: Ei,
|
|
6041
|
+
PlainTime: ji,
|
|
6042
|
+
PlainDateTime: Yi,
|
|
6043
|
+
ZonedDateTime: ms,
|
|
6044
|
+
Instant: Zi,
|
|
6045
|
+
Calendar: ds,
|
|
6046
|
+
TimeZone: Ii,
|
|
6047
|
+
Duration: ss,
|
|
6048
|
+
Now: Os
|
|
6016
6049
|
})
|
|
6017
6050
|
});
|
|
6018
6051
|
|
|
@@ -7479,9 +7512,9 @@ function pad4(number) {
|
|
|
7479
7512
|
Object.defineProperties(globalThis, createPropDescriptors({
|
|
7480
7513
|
Temporal: jt
|
|
7481
7514
|
})), Object.defineProperties(Intl, createPropDescriptors({
|
|
7482
|
-
DateTimeFormat:
|
|
7515
|
+
DateTimeFormat: qt
|
|
7483
7516
|
})), Object.defineProperties(Date.prototype, createPropDescriptors({
|
|
7484
|
-
toTemporalInstant:
|
|
7517
|
+
toTemporalInstant: xt
|
|
7485
7518
|
}));
|
|
7486
7519
|
|
|
7487
7520
|
/**
|
|
@@ -9784,6 +9817,14 @@ const staticModernHolidays = [{
|
|
|
9784
9817
|
mm: Cheshvan,
|
|
9785
9818
|
dd: 7,
|
|
9786
9819
|
desc: 'Yom HaAliyah School Observance'
|
|
9820
|
+
},
|
|
9821
|
+
// https://www.gov.il/he/departments/policies/2012_des5234
|
|
9822
|
+
{
|
|
9823
|
+
firstYear: 5773,
|
|
9824
|
+
mm: months.TEVET,
|
|
9825
|
+
dd: 21,
|
|
9826
|
+
desc: 'Hebrew Language Day',
|
|
9827
|
+
friSatMovetoThu: true
|
|
9787
9828
|
}];
|
|
9788
9829
|
|
|
9789
9830
|
/*
|
|
@@ -10322,7 +10363,7 @@ class DailyLearning {
|
|
|
10322
10363
|
}
|
|
10323
10364
|
|
|
10324
10365
|
// DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
10325
|
-
const version = '5.
|
|
10366
|
+
const version = '5.3.0';
|
|
10326
10367
|
|
|
10327
10368
|
const NONE$1 = 0;
|
|
10328
10369
|
const HALF = 1;
|
|
@@ -10686,6 +10727,7 @@ var poHe = {
|
|
|
10686
10727
|
"Jabotinsky Day": ["יוֹם ז׳בוטינסקי"],
|
|
10687
10728
|
"Herzl Day": ["יוֹם הרצל"],
|
|
10688
10729
|
"Ben-Gurion Day": ["יוֹם בן־גוריון"],
|
|
10730
|
+
"Hebrew Language Day": ["יוֹם הַשָׂפָה הַעִברִית"],
|
|
10689
10731
|
"Birkat Hachamah": ["בִרְכַּת הַחַמָּה"],
|
|
10690
10732
|
"Shushan Purim Katan": ["שׁוּשָׁן פּוּרִים קָטָן"],
|
|
10691
10733
|
"Purim Meshulash": ["פּוּרִים מְשׁוּלָּשׁ"],
|