@tempots/beatui 0.19.1 → 0.20.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/{2019-D0n7sHsB.js → 2019-B4Mw3glM.js} +2 -2
- package/dist/{2019-CfIF9XVA.cjs → 2019-u0Cs1ZdE.cjs} +1 -1
- package/dist/{2020-D1ziwonq.cjs → 2020-BcwEHv2O.cjs} +1 -1
- package/dist/{2020-BkXWq9F8.js → 2020-BvFyb4Gy.js} +2 -2
- package/dist/{ar-DYmDITuw.cjs → ar-DyhaQaJU.cjs} +1 -1
- package/dist/{ar-CMndb3tf.js → ar-RkpJ2n6w.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +646 -651
- package/dist/beatui.css +1 -1
- package/dist/{de-Cgy7XJBg.js → de-BdSVR4Zm.js} +1 -1
- package/dist/{de-ClQgQrXM.cjs → de-CnZ4Ik2a.cjs} +1 -1
- package/dist/{es-j0qszDAW.js → es-B_Qn5EUy.js} +1 -1
- package/dist/{es-BN5Mihv0.cjs → es-ZKraCneL.cjs} +1 -1
- package/dist/{fa-BUQvM0nj.cjs → fa-D2p_ch4Q.cjs} +1 -1
- package/dist/{fa-COUp2ofv.js → fa-jBaLjqfG.js} +1 -1
- package/dist/{fr-B5Ar6QcE.js → fr-B0KaMM2j.js} +1 -1
- package/dist/{fr-CwvsJDIZ.cjs → fr-CBeo42lQ.cjs} +1 -1
- package/dist/{he-HZvvmFUB.cjs → he-BmqEF3o-.cjs} +1 -1
- package/dist/{he-D5HTHvKh.js → he-DjeYjcW7.js} +1 -1
- package/dist/{hi-Cnr1RtgA.cjs → hi-BAfIFl1n.cjs} +1 -1
- package/dist/{hi-Bcc7iEXp.js → hi-DxBQV0uz.js} +1 -1
- package/dist/index-4NoQLiJo.cjs +2 -0
- package/dist/{index-DSvEBuy-.cjs → index-9UO7Pd64.cjs} +1 -1
- package/dist/{index-tuwLQMCb.js → index-B001qopB.js} +3 -3
- package/dist/{index-ykojBEwT.js → index-BIUeLQJ1.js} +4 -4
- package/dist/{index-FEy4Hwnx.cjs → index-BInDdLXi.cjs} +1 -1
- package/dist/{index-BUKtbimR.cjs → index-BWiQR9j3.cjs} +1 -1
- package/dist/{index-Dben4dbo.js → index-BX_AooS9.js} +2 -2
- package/dist/{index-CRfUh74G.cjs → index-Blq-MoAk.cjs} +1 -1
- package/dist/{index-rWglN8IQ.js → index-BnaafQ9o.js} +1 -1
- package/dist/{index-BJfVmi_X.js → index-BnbEC2zq.js} +2 -2
- package/dist/{index-CHgx0rFt.js → index-C4jYy0NW.js} +2 -2
- package/dist/{index-B-d5blto.js → index-C4xio93t.js} +3 -3
- package/dist/{index-CFo2nnaI.js → index-C5l1mFuD.js} +2 -2
- package/dist/{index-BYk56bqR.cjs → index-CDYYXcsk.cjs} +2 -2
- package/dist/{index-CIfx_bs7.cjs → index-CJM_lW9n.cjs} +1 -1
- package/dist/{index-D0-d-xdJ.js → index-CaNnYmEs.js} +6 -6
- package/dist/{index-BZHMnjr6.cjs → index-CaOzAsWD.cjs} +1 -1
- package/dist/{index-BF4pXHo-.js → index-CdvplJG6.js} +4 -4
- package/dist/{index-CUs1c8a9.js → index-ClvbjqJL.js} +8 -8
- package/dist/{index-DgUJYXoy.cjs → index-CpB78PPQ.cjs} +1 -1
- package/dist/{index-B16dbwxM.cjs → index-CpKAa22o.cjs} +1 -1
- package/dist/{index-DJ-avKHU.js → index-CpMCZBAl.js} +2 -2
- package/dist/{index-2DKUYRWr.js → index-Cs_PxtnZ.js} +1 -1
- package/dist/{index-DxG_avr8.cjs → index-CvRJPSEv.cjs} +1 -1
- package/dist/{index-DD-MOsCa.js → index-D5nWhHZv.js} +2 -2
- package/dist/{index-Cohec4rB.cjs → index-D7o5LhMm.cjs} +1 -1
- package/dist/{index-DYIv5X6N.js → index-DC5Cn-TM.js} +2 -2
- package/dist/{index-CKRuo2DB.js → index-DCpnqWRN.js} +3 -3
- package/dist/{index-BirEb-BA.js → index-DOlgncMG.js} +2178 -2193
- package/dist/{index-kk6qFeC5.cjs → index-DOyppfix.cjs} +1 -1
- package/dist/{index-DjNMMz5-.cjs → index-DXUQTPON.cjs} +1 -1
- package/dist/{index-C9XAXTDx.cjs → index-DdlxwtnE.cjs} +1 -1
- package/dist/{index-_OaxQJX1.js → index-DhJIuRg9.js} +4 -4
- package/dist/{index-Bg1QLlyj.js → index-DiV6JJiS.js} +3 -3
- package/dist/{index-DD8_efWr.cjs → index-Dl-wY6fc.cjs} +1 -1
- package/dist/{index-BguvTLHu.cjs → index-DlaVE6S2.cjs} +1 -1
- package/dist/index-JHbFZFZF.cjs +8 -0
- package/dist/{index-dsitEt8M.cjs → index-Jt6D3QJ7.cjs} +1 -1
- package/dist/{index-85k3bgcY.cjs → index-KcBlGDqr.cjs} +1 -1
- package/dist/{index-dV4F3c70.js → index-MyVoESdk.js} +3 -3
- package/dist/{index-DC4nzG_w.js → index-NysVuvZA.js} +5 -5
- package/dist/{index-D-Rzl363.cjs → index-RGCDszX8.cjs} +1 -1
- package/dist/{index-CoBM7UvE.js → index-c-O5R5i2.js} +2 -2
- package/dist/{index-C4UzgyIA.cjs → index-cjtIcxwt.cjs} +1 -1
- package/dist/{index-faGepKVA.js → index-fnMeddEM.js} +2 -2
- package/dist/{index-DV7tB1MN.cjs → index-uR3OZ_8K.cjs} +1 -1
- package/dist/index.cjs.js +25 -25
- package/dist/index.es.js +2248 -2264
- package/dist/index.esm-DJRz9AE-.cjs +1 -0
- package/dist/{index.esm-CSotgpVw.js → index.esm-DPNh6inz.js} +410 -420
- package/dist/{it-CTCKFU5g.js → it-B4qZsicu.js} +1 -1
- package/dist/{it-B7KeOLBm.cjs → it-CzKrFTFY.cjs} +1 -1
- package/dist/{ja-BGoETTZv.js → ja-BnCSmhkg.js} +1 -1
- package/dist/{ja-0ldomgID.cjs → ja-i_9MZ1j0.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-C4WEkArz.cjs → ko-CF9il-Az.cjs} +1 -1
- package/dist/{ko-xHeRs9LU.js → ko-D_gGkjrC.js} +1 -1
- package/dist/milkdown/index.cjs.js +1 -1
- package/dist/milkdown/index.es.js +1 -1
- package/dist/{milkdown-input-BbbZJGDl.js → milkdown-input-CYme9OBn.js} +14757 -14822
- package/dist/milkdown-input-KjtVqDzi.cjs +941 -0
- package/dist/modal-B-f3LBKr.cjs +1 -0
- package/dist/modal-BItfEmu0.js +600 -0
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +114 -116
- package/dist/{nl-ey2Li7DF.js → nl-CsLCWUFF.js} +1 -1
- package/dist/{nl-D-y231ZO.cjs → nl-DfWlqR6T.cjs} +1 -1
- package/dist/notice-B7JqE59s.cjs +1 -0
- package/dist/notice-CmmpobJd.js +2415 -0
- package/dist/{pl-Bf0QaCGx.js → pl-Bsmj1KbZ.js} +1 -1
- package/dist/{pl-G6e4Mybr.cjs → pl-wK2sgv7l.cjs} +1 -1
- package/dist/{pt-D-_KxA9g.js → pt-BR_NuRJS.js} +1 -1
- package/dist/{pt-CD2Eqazl.cjs → pt-DAQIuOPW.cjs} +1 -1
- package/dist/{ru-CKh2xgqC.cjs → ru-BnoiCxrw.cjs} +1 -1
- package/dist/{ru-Dzbl29K2.js → ru-CiQ_qKD_.js} +1 -1
- package/dist/timer-BdH4cK6a.cjs +1 -0
- package/dist/timer-CQlK5LhW.js +47 -0
- package/dist/{tr-BbpC5gzM.cjs → tr-Bme5PfaE.cjs} +1 -1
- package/dist/{tr-yMHT8n7z.js → tr-Q9xP1nE4.js} +1 -1
- package/dist/translations-ClgoCEFC.js +1969 -0
- package/dist/{translations-DbN-OSLv.js → translations-D4hFMU4P.js} +1 -1
- package/dist/translations-DRBh70w8.cjs +2 -0
- package/dist/{translations-CXE8Z_Ac.cjs → translations-lnK_6RdU.cjs} +1 -1
- package/dist/{ur-kkik6-_r.cjs → ur-B4b39hNV.cjs} +1 -1
- package/dist/{ur-CdQA0epV.js → ur-CGTjSoJt.js} +1 -1
- package/dist/{vi-A8UmZU3L.js → vi-BF3HTFU9.js} +1 -1
- package/dist/{vi-1xtFXJc0.cjs → vi-CSpW181L.cjs} +1 -1
- package/dist/{zh-D0nnvX8T.js → zh-BreM8U2w.js} +1 -1
- package/dist/{zh-DC_SsXdk.cjs → zh-PeL8FN2c.cjs} +1 -1
- package/package.json +5 -5
- package/dist/index-B66rNs5i.cjs +0 -2
- package/dist/index-DXFKCiah.cjs +0 -8
- package/dist/index.esm-8xolKogd.cjs +0 -1
- package/dist/milkdown-input-C-Muq7PQ.cjs +0 -941
- package/dist/modal-nbZW44XS.js +0 -614
- package/dist/modal-wbG_oGOr.cjs +0 -1
- package/dist/notice-CIPcSfD5.js +0 -2432
- package/dist/notice-Cq02YHoN.cjs +0 -1
- package/dist/timer-CcMCjYrq.cjs +0 -1
- package/dist/timer-CkgWORR9.js +0 -42
- package/dist/translations-DBtfTNnM.js +0 -2005
- package/dist/translations-EQ1qPZ0_.cjs +0 -2
|
@@ -1035,14 +1035,14 @@ l.__kMaxLength = 33554432, l.__kMaxLengthBits = l.__kMaxLength << 5, l.__kMaxBit
|
|
|
1035
1035
|
}, l.__imul = Math.imul || function(n, t) {
|
|
1036
1036
|
return 0 | n * t;
|
|
1037
1037
|
};
|
|
1038
|
-
const Nt = l.BigInt(0), On = l.BigInt(1), Br = l.BigInt(2),
|
|
1038
|
+
const Nt = l.BigInt(0), On = l.BigInt(1), Br = l.BigInt(2), ia = l.BigInt(10), aa = l.BigInt(24), sa = l.BigInt(60), ca = l.BigInt(1e3), Pn = l.BigInt(1e6), Dn = l.BigInt(1e9), Bo = l.multiply(l.BigInt(3600), Dn), ua = l.multiply(sa, Dn), ve = l.multiply(Bo, aa);
|
|
1039
1039
|
function ne(n) {
|
|
1040
1040
|
return typeof n == "bigint" ? l.BigInt(n.toString(10)) : n;
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function Jo(n) {
|
|
1043
1043
|
return l.equal(l.remainder(n, Br), Nt);
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1045
|
+
function Te(n) {
|
|
1046
1046
|
return l.lessThan(n, Nt) ? l.unaryMinus(n) : n;
|
|
1047
1047
|
}
|
|
1048
1048
|
function er(n, t) {
|
|
@@ -1052,13 +1052,13 @@ function mn(n, t) {
|
|
|
1052
1052
|
return { quotient: l.divide(n, t), remainder: l.remainder(n, t) };
|
|
1053
1053
|
}
|
|
1054
1054
|
var wo, bo;
|
|
1055
|
-
const T = "slot-epochNanoSeconds", C = "slot-iso-date", A = "slot-iso-date-time", Z = "slot-time", D = "slot-calendar",
|
|
1055
|
+
const T = "slot-epochNanoSeconds", C = "slot-iso-date", A = "slot-iso-date-time", Z = "slot-time", D = "slot-calendar", ti = "slot-date-brand", ei = "slot-year-month-brand", ni = "slot-month-day-brand", j = "slot-time-zone", ut = "slot-years", lt = "slot-months", Mt = "slot-weeks", ht = "slot-days", dt = "slot-hours", mt = "slot-minutes", ft = "slot-seconds", gt = "slot-milliseconds", yt = "slot-microseconds", Tt = "slot-nanoseconds", ri = "date", oi = "ym", ii = "md", ai = "time", si = "datetime", ci = "instant", je = "original", qe = "timezone-canonical", Nr = "timezone-original", fn = "calendar-id", ui = "locale", Lr = "options", li = /* @__PURE__ */ new WeakMap(), xr = Symbol.for("@@Temporal__GetSlots");
|
|
1056
1056
|
(wo = globalThis)[xr] || (wo[xr] = function(n) {
|
|
1057
|
-
return
|
|
1057
|
+
return li.get(n);
|
|
1058
1058
|
});
|
|
1059
1059
|
const mr = globalThis[xr], jr = Symbol.for("@@Temporal__CreateSlots");
|
|
1060
1060
|
(bo = globalThis)[jr] || (bo[jr] = function(n) {
|
|
1061
|
-
|
|
1061
|
+
li.set(n, /* @__PURE__ */ Object.create(null));
|
|
1062
1062
|
});
|
|
1063
1063
|
const de = globalThis[jr];
|
|
1064
1064
|
function Dt(n, ...t) {
|
|
@@ -1067,8 +1067,7 @@ function Dt(n, ...t) {
|
|
|
1067
1067
|
return !!e && t.every((r) => r in e);
|
|
1068
1068
|
}
|
|
1069
1069
|
function h(n, t) {
|
|
1070
|
-
|
|
1071
|
-
const e = (r = mr(n)) == null ? void 0 : r[t];
|
|
1070
|
+
const e = mr(n)?.[t];
|
|
1072
1071
|
if (e === void 0) throw new TypeError(`Missing internal slot ${t}`);
|
|
1073
1072
|
return e;
|
|
1074
1073
|
}
|
|
@@ -1101,7 +1100,7 @@ function Pr(n, t) {
|
|
|
1101
1100
|
function et(n) {
|
|
1102
1101
|
return Ir[n];
|
|
1103
1102
|
}
|
|
1104
|
-
function
|
|
1103
|
+
function We(n, t) {
|
|
1105
1104
|
let e = n;
|
|
1106
1105
|
if (e === 0) return { div: e, mod: e };
|
|
1107
1106
|
const r = Math.sign(e);
|
|
@@ -1153,7 +1152,7 @@ class N {
|
|
|
1153
1152
|
this.totalNs = ne(t), this.sec = l.toNumber(l.divide(this.totalNs, Dn)), this.subsec = l.toNumber(l.remainder(this.totalNs, Dn));
|
|
1154
1153
|
}
|
|
1155
1154
|
static validateNew(t, e) {
|
|
1156
|
-
if (l.greaterThan(
|
|
1155
|
+
if (l.greaterThan(Te(t), N.MAX)) throw new RangeError(`${e} of duration time units cannot exceed ${N.MAX} s`);
|
|
1157
1156
|
return new N(t);
|
|
1158
1157
|
}
|
|
1159
1158
|
static fromEpochNsDiff(t, e) {
|
|
@@ -1161,11 +1160,11 @@ class N {
|
|
|
1161
1160
|
return new N(r);
|
|
1162
1161
|
}
|
|
1163
1162
|
static fromComponents(t, e, r, o, i, a) {
|
|
1164
|
-
const s = l.add(l.add(l.add(l.add(l.add(l.BigInt(a), l.multiply(l.BigInt(i),
|
|
1163
|
+
const s = l.add(l.add(l.add(l.add(l.add(l.BigInt(a), l.multiply(l.BigInt(i), ca)), l.multiply(l.BigInt(o), Pn)), l.multiply(l.BigInt(r), Dn)), l.multiply(l.BigInt(e), ua)), l.multiply(l.BigInt(t), Bo));
|
|
1165
1164
|
return N.validateNew(s, "total");
|
|
1166
1165
|
}
|
|
1167
1166
|
abs() {
|
|
1168
|
-
return new N(
|
|
1167
|
+
return new N(Te(this.totalNs));
|
|
1169
1168
|
}
|
|
1170
1169
|
add(t) {
|
|
1171
1170
|
return N.validateNew(l.add(this.totalNs, t.totalNs), "sum");
|
|
@@ -1189,8 +1188,8 @@ class N {
|
|
|
1189
1188
|
const a = [];
|
|
1190
1189
|
let s;
|
|
1191
1190
|
const c = (l.lessThan(this.totalNs, Nt) ? -1 : 1) * Math.sign(l.toNumber(e));
|
|
1192
|
-
for (; !l.equal(i, Nt) && a.length < 50; ) i = l.multiply(i,
|
|
1193
|
-
return c * +(
|
|
1191
|
+
for (; !l.equal(i, Nt) && a.length < 50; ) i = l.multiply(i, ia), { quotient: s, remainder: i } = mn(i, r), a.push(Math.abs(l.toNumber(s)));
|
|
1192
|
+
return c * +(Te(o).toString() + "." + a.join(""));
|
|
1194
1193
|
}
|
|
1195
1194
|
isZero() {
|
|
1196
1195
|
return l.equal(this.totalNs, Nt);
|
|
@@ -1198,7 +1197,7 @@ class N {
|
|
|
1198
1197
|
round(t, e) {
|
|
1199
1198
|
const r = ne(t);
|
|
1200
1199
|
if (l.equal(r, On)) return this;
|
|
1201
|
-
const { quotient: o, remainder: i } = mn(this.totalNs, r), a = l.lessThan(this.totalNs, Nt) ? "negative" : "positive", s = l.multiply(
|
|
1200
|
+
const { quotient: o, remainder: i } = mn(this.totalNs, r), a = l.lessThan(this.totalNs, Nt) ? "negative" : "positive", s = l.multiply(Te(o), r), c = l.add(s, r), u = er(Te(l.multiply(i, Br)), r), d = fr(e, a), m = l.equal(Te(this.totalNs), s) ? s : gr(s, c, u, Jo(o), d), f = a === "positive" ? m : l.unaryMinus(m);
|
|
1202
1201
|
return N.validateNew(f, "rounding");
|
|
1203
1202
|
}
|
|
1204
1203
|
sign() {
|
|
@@ -1209,7 +1208,7 @@ class N {
|
|
|
1209
1208
|
}
|
|
1210
1209
|
}
|
|
1211
1210
|
N.MAX = l.BigInt("9007199254740991999999999"), N.ZERO = new N(Nt);
|
|
1212
|
-
const vo = /[A-Za-z._][A-Za-z._0-9+-]*/, An = new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${vo.source})(?:\\/(?:${vo.source}))*)`),
|
|
1211
|
+
const vo = /[A-Za-z._][A-Za-z._0-9+-]*/, An = new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${vo.source})(?:\\/(?:${vo.source}))*)`), hi = /(?:[+-]\d{6}|\d{4})/, nr = /(?:0[1-9]|1[0-2])/, Ar = /(?:0[1-9]|[12]\d|3[01])/, la = new RegExp(`(${hi.source})(?:-(${nr.source})-(${Ar.source})|(${nr.source})(${Ar.source}))`), di = /(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/, mi = /((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/, fi = new RegExp(`([zZ])|${mi.source}?`), Se = /\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g, ha = new RegExp([`^${la.source}`, `(?:(?:[tT]|\\s+)${di.source}(?:${fi.source})?)?`, `(?:\\[!?(${An.source})\\])?`, `((?:${Se.source})*)$`].join("")), da = new RegExp([`^[tT]?${di.source}`, `(?:${fi.source})?`, `(?:\\[!?${An.source}\\])?`, `((?:${Se.source})*)$`].join("")), ma = new RegExp(`^(${hi.source})-?(${nr.source})(?:\\[!?${An.source}\\])?((?:${Se.source})*)$`), fa = new RegExp(`^(?:--)?(${nr.source})-?(${Ar.source})(?:\\[!?${An.source}\\])?((?:${Se.source})*)$`), $r = /(\d+)(?:[.,](\d{1,9}))?/, ga = new RegExp(`(?:${$r.source}H)?(?:${$r.source}M)?(?:${$r.source}S)?`), ya = new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${ga.source})?$`, "i"), De = 864e5, rr = 1e6 * De, pa = 6e10, gi = 1e8 * De, Ke = St(gi), $n = l.unaryMinus(Ke), wa = l.add(l.subtract($n, ve), On), ba = l.subtract(l.add(Ke, ve), On), va = 146097 * De, Do = -271821, _o = 275760, _n = Date.UTC(1847, 0, 1), Da = ["iso8601", "hebrew", "islamic", "islamic-umalqura", "islamic-tbla", "islamic-civil", "islamic-rgsa", "islamicc", "persian", "ethiopic", "ethioaa", "ethiopic-amete-alem", "coptic", "chinese", "dangi", "roc", "indian", "buddhist", "japanese", "gregory"], _a = /* @__PURE__ */ new Set(["ACT", "AET", "AGT", "ART", "AST", "BET", "BST", "CAT", "CNT", "CST", "CTT", "EAT", "ECT", "IET", "IST", "JST", "MIT", "NET", "NST", "PLT", "PNT", "PRT", "PST", "SST", "VST"]);
|
|
1213
1212
|
function q(n) {
|
|
1214
1213
|
return typeof n == "object" && n !== null || typeof n == "function";
|
|
1215
1214
|
}
|
|
@@ -1254,24 +1253,24 @@ function V(n) {
|
|
|
1254
1253
|
}
|
|
1255
1254
|
function Ur(n, t) {
|
|
1256
1255
|
if (q(n)) {
|
|
1257
|
-
const e = n
|
|
1256
|
+
const e = n?.toString();
|
|
1258
1257
|
if (typeof e == "string" || typeof e == "number") return e;
|
|
1259
1258
|
throw new TypeError("Cannot convert object to primitive value");
|
|
1260
1259
|
}
|
|
1261
1260
|
return n;
|
|
1262
1261
|
}
|
|
1263
|
-
const zr = ["era", "eraYear", "year", "month", "monthCode", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond", "offset", "timeZone"],
|
|
1262
|
+
const zr = ["era", "eraYear", "year", "month", "monthCode", "day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond", "offset", "timeZone"], Ea = { era: pr, eraYear: $, year: $, month: Eo, monthCode: function(n) {
|
|
1264
1263
|
const t = V(Ur(n));
|
|
1265
1264
|
if (t.length < 3 || t.length > 4 || t[0] !== "M" || "0123456789".indexOf(t[1]) === -1 || "0123456789".indexOf(t[2]) === -1 || t[1] + t[2] === "00" && t[3] !== "L" || t[3] !== "L" && t[3] !== void 0) throw new RangeError(`bad month code ${t}; must match M01-M99 or M00L-M99L`);
|
|
1266
1265
|
return t;
|
|
1267
1266
|
}, day: Eo, hour: $, minute: $, second: $, millisecond: $, microsecond: $, nanosecond: $, offset: function(n) {
|
|
1268
1267
|
const t = V(Ur(n));
|
|
1269
|
-
return
|
|
1270
|
-
}, timeZone: bt },
|
|
1271
|
-
function
|
|
1268
|
+
return sn(t), t;
|
|
1269
|
+
}, timeZone: bt }, Ma = { hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 }, Qe = [["years", "year", "date"], ["months", "month", "date"], ["weeks", "week", "date"], ["days", "day", "date"], ["hours", "hour", "time"], ["minutes", "minute", "time"], ["seconds", "second", "time"], ["milliseconds", "millisecond", "time"], ["microseconds", "microsecond", "time"], ["nanoseconds", "nanosecond", "time"]], Mo = Object.fromEntries(Qe.map((n) => [n[0], n[1]])), Ta = Object.fromEntries(Qe.map(([n, t]) => [t, n])), En = Qe.map(([, n]) => n), Be = { day: rr, hour: 36e11, minute: 6e10, second: 1e9, millisecond: 1e6, microsecond: 1e3, nanosecond: 1 }, or = ["days", "hours", "microseconds", "milliseconds", "minutes", "months", "nanoseconds", "seconds", "weeks", "years"], Ca = Intl.DateTimeFormat, To = /* @__PURE__ */ new Map();
|
|
1270
|
+
function yi(n) {
|
|
1272
1271
|
const t = xn(n);
|
|
1273
1272
|
let e = To.get(t);
|
|
1274
|
-
return e === void 0 && (e = new
|
|
1273
|
+
return e === void 0 && (e = new Ca("en-us", { timeZone: t, hour12: !1, era: "short", year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }), To.set(t, e)), e;
|
|
1275
1274
|
}
|
|
1276
1275
|
function B(n) {
|
|
1277
1276
|
return Dt(n, T) && !Dt(n, j, D);
|
|
@@ -1280,7 +1279,7 @@ function z(n) {
|
|
|
1280
1279
|
return Dt(n, ut, lt, ht, dt, mt, ft, gt, yt, Tt);
|
|
1281
1280
|
}
|
|
1282
1281
|
function F(n) {
|
|
1283
|
-
return Dt(n,
|
|
1282
|
+
return Dt(n, ti);
|
|
1284
1283
|
}
|
|
1285
1284
|
function H(n) {
|
|
1286
1285
|
return Dt(n, Z);
|
|
@@ -1289,10 +1288,10 @@ function I(n) {
|
|
|
1289
1288
|
return Dt(n, A);
|
|
1290
1289
|
}
|
|
1291
1290
|
function J(n) {
|
|
1292
|
-
return Dt(n,
|
|
1291
|
+
return Dt(n, ei);
|
|
1293
1292
|
}
|
|
1294
1293
|
function Yt(n) {
|
|
1295
|
-
return Dt(n,
|
|
1294
|
+
return Dt(n, ni);
|
|
1296
1295
|
}
|
|
1297
1296
|
function Y(n) {
|
|
1298
1297
|
return Dt(n, T, j, D);
|
|
@@ -1300,7 +1299,7 @@ function Y(n) {
|
|
|
1300
1299
|
function b(n, t) {
|
|
1301
1300
|
if (!t(n)) throw new TypeError("invalid receiver: method called with the wrong type of this-object");
|
|
1302
1301
|
}
|
|
1303
|
-
function
|
|
1302
|
+
function rn(n) {
|
|
1304
1303
|
if (Dt(n, D) || Dt(n, j)) throw new TypeError("with() does not support a calendar or timeZone property");
|
|
1305
1304
|
if (H(n)) throw new TypeError("with() does not accept Temporal.PlainTime, use withPlainTime() instead");
|
|
1306
1305
|
if (n.calendar !== void 0) throw new TypeError("with() does not support a calendar property");
|
|
@@ -1311,7 +1310,7 @@ function Un(n, t) {
|
|
|
1311
1310
|
}
|
|
1312
1311
|
function wr(n) {
|
|
1313
1312
|
let t, e, r = !1;
|
|
1314
|
-
for (
|
|
1313
|
+
for (Se.lastIndex = 0; e = Se.exec(n); ) {
|
|
1315
1314
|
const { 1: o, 2: i, 3: a } = e;
|
|
1316
1315
|
if (i === "u-ca") {
|
|
1317
1316
|
if (t === void 0) t = a, r = o === "!";
|
|
@@ -1321,7 +1320,7 @@ function wr(n) {
|
|
|
1321
1320
|
return t;
|
|
1322
1321
|
}
|
|
1323
1322
|
function te(n) {
|
|
1324
|
-
const t =
|
|
1323
|
+
const t = ha.exec(n);
|
|
1325
1324
|
if (!t) throw new RangeError(`invalid RFC 9557 string: ${n}`);
|
|
1326
1325
|
const e = wr(t[16]);
|
|
1327
1326
|
let r = t[1];
|
|
@@ -1335,8 +1334,8 @@ function te(n) {
|
|
|
1335
1334
|
const v = t[15];
|
|
1336
1335
|
return oo(o, i, a, c, u, d, f, g, y), { year: o, month: i, day: a, time: s ? { hour: c, minute: u, second: d, millisecond: f, microsecond: g, nanosecond: y } : "start-of-day", tzAnnotation: v, offset: p, z: w, calendar: e };
|
|
1337
1336
|
}
|
|
1338
|
-
function
|
|
1339
|
-
const t =
|
|
1337
|
+
function pi(n) {
|
|
1338
|
+
const t = da.exec(n);
|
|
1340
1339
|
let e, r, o, i, a, s, c;
|
|
1341
1340
|
if (t) {
|
|
1342
1341
|
c = wr(t[10]), e = +(t[1] ?? 0), r = +(t[2] ?? t[5] ?? 0), o = +(t[3] ?? t[6] ?? 0), o === 60 && (o = 59);
|
|
@@ -1351,11 +1350,11 @@ function bi(n) {
|
|
|
1351
1350
|
if (_r(e, r, o, i, a, s), /[tT ][0-9][0-9]/.test(n)) return { hour: e, minute: r, second: o, millisecond: i, microsecond: a, nanosecond: s, calendar: c };
|
|
1352
1351
|
try {
|
|
1353
1352
|
const { month: u, day: d } = to(n);
|
|
1354
|
-
|
|
1353
|
+
ke(1972, u, d);
|
|
1355
1354
|
} catch {
|
|
1356
1355
|
try {
|
|
1357
1356
|
const { year: u, month: d } = Jr(n);
|
|
1358
|
-
|
|
1357
|
+
ke(u, d, 1);
|
|
1359
1358
|
} catch {
|
|
1360
1359
|
return { hour: e, minute: r, second: o, millisecond: i, microsecond: a, nanosecond: s, calendar: c };
|
|
1361
1360
|
}
|
|
@@ -1363,7 +1362,7 @@ function bi(n) {
|
|
|
1363
1362
|
throw new RangeError(`invalid RFC 9557 time-only string ${n}; may need a T prefix`);
|
|
1364
1363
|
}
|
|
1365
1364
|
function Jr(n) {
|
|
1366
|
-
const t =
|
|
1365
|
+
const t = ma.exec(n);
|
|
1367
1366
|
let e, r, o, i;
|
|
1368
1367
|
if (t) {
|
|
1369
1368
|
o = wr(t[3]);
|
|
@@ -1377,7 +1376,7 @@ function Jr(n) {
|
|
|
1377
1376
|
return { year: e, month: r, calendar: o, referenceISODay: i };
|
|
1378
1377
|
}
|
|
1379
1378
|
function to(n) {
|
|
1380
|
-
const t =
|
|
1379
|
+
const t = fa.exec(n);
|
|
1381
1380
|
let e, r, o, i;
|
|
1382
1381
|
if (t) {
|
|
1383
1382
|
if (o = wr(t[3]), e = +t[1], r = +t[2], o !== void 0 && o !== "iso8601") throw new RangeError("MM-DD format is only valid with iso8601 calendar");
|
|
@@ -1387,22 +1386,22 @@ function to(n) {
|
|
|
1387
1386
|
}
|
|
1388
1387
|
return { month: e, day: r, calendar: o, referenceISOYear: i };
|
|
1389
1388
|
}
|
|
1390
|
-
const
|
|
1391
|
-
function
|
|
1392
|
-
const t =
|
|
1389
|
+
const wi = new RegExp(`^${An.source}$`, "i"), bi = new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);
|
|
1390
|
+
function vi(n) {
|
|
1391
|
+
const t = $a.test(n) ? "Seconds not allowed in offset time zone" : "Invalid time zone";
|
|
1393
1392
|
throw new RangeError(`${t}: ${n}`);
|
|
1394
1393
|
}
|
|
1395
1394
|
function be(n) {
|
|
1396
|
-
return
|
|
1395
|
+
return wi.test(n) || vi(n), bi.test(n) ? { offsetMinutes: sn(n) / 6e10 } : { tzName: n };
|
|
1397
1396
|
}
|
|
1398
1397
|
function Mn(n, t, e, r) {
|
|
1399
1398
|
let o = n, i = t, a = e;
|
|
1400
1399
|
switch (r) {
|
|
1401
1400
|
case "reject":
|
|
1402
|
-
|
|
1401
|
+
ke(o, i, a);
|
|
1403
1402
|
break;
|
|
1404
1403
|
case "constrain":
|
|
1405
|
-
({ year: o, month: i, day: a } =
|
|
1404
|
+
({ year: o, month: i, day: a } = Pi(o, i, a));
|
|
1406
1405
|
}
|
|
1407
1406
|
return { year: o, month: i, day: a };
|
|
1408
1407
|
}
|
|
@@ -1417,7 +1416,7 @@ function br(n, t, e, r, o, i, a) {
|
|
|
1417
1416
|
}
|
|
1418
1417
|
return { hour: s, minute: c, second: u, millisecond: d, microsecond: m, nanosecond: f };
|
|
1419
1418
|
}
|
|
1420
|
-
function
|
|
1419
|
+
function Di(n) {
|
|
1421
1420
|
if (!q(n)) throw new TypeError("invalid duration-like");
|
|
1422
1421
|
const t = { years: void 0, months: void 0, weeks: void 0, days: void 0, hours: void 0, minutes: void 0, seconds: void 0, milliseconds: void 0, microseconds: void 0, nanoseconds: void 0 };
|
|
1423
1422
|
let e = !1;
|
|
@@ -1449,14 +1448,14 @@ function tr(n, t) {
|
|
|
1449
1448
|
function zn(n) {
|
|
1450
1449
|
return ue(n, "calendarName", ["auto", "always", "never", "critical"], "auto");
|
|
1451
1450
|
}
|
|
1452
|
-
function
|
|
1451
|
+
function on(n) {
|
|
1453
1452
|
let t = n.roundingIncrement;
|
|
1454
1453
|
if (t === void 0) return 1;
|
|
1455
1454
|
const e = $(t);
|
|
1456
1455
|
if (e < 1 || e > 1e9) throw new RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${t}`);
|
|
1457
1456
|
return e;
|
|
1458
1457
|
}
|
|
1459
|
-
function
|
|
1458
|
+
function an(n, t, e) {
|
|
1460
1459
|
const r = e ? t : t - 1;
|
|
1461
1460
|
if (n > r) throw new RangeError(`roundingIncrement must be at least 1 and less than ${r}, not ${n}`);
|
|
1462
1461
|
if (t % n != 0) throw new RangeError(`Rounding increment must divide evenly into ${t}`);
|
|
@@ -1509,8 +1508,8 @@ function Zn(n, t) {
|
|
|
1509
1508
|
const he = Symbol("~required~");
|
|
1510
1509
|
function Ot(n, t, e, r, o = []) {
|
|
1511
1510
|
let i = [];
|
|
1512
|
-
for (let u = 0; u <
|
|
1513
|
-
const d =
|
|
1511
|
+
for (let u = 0; u < Qe.length; u++) {
|
|
1512
|
+
const d = Qe[u], m = d[1], f = d[2];
|
|
1514
1513
|
e !== "datetime" && e !== f || i.push(m);
|
|
1515
1514
|
}
|
|
1516
1515
|
i = i.concat(o);
|
|
@@ -1519,7 +1518,7 @@ function Ot(n, t, e, r, o = []) {
|
|
|
1519
1518
|
let s = [];
|
|
1520
1519
|
s = s.concat(i);
|
|
1521
1520
|
for (let u = 0; u < i.length; u++) {
|
|
1522
|
-
const d = i[u], m =
|
|
1521
|
+
const d = i[u], m = Ta[d];
|
|
1523
1522
|
m !== void 0 && s.push(m);
|
|
1524
1523
|
}
|
|
1525
1524
|
let c = ue(n, t, s, a);
|
|
@@ -1543,7 +1542,7 @@ function Rr(n) {
|
|
|
1543
1542
|
else if (d) throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");
|
|
1544
1543
|
o || (o = "iso8601"), o = _t(o), e = { year: m, month: f, day: g };
|
|
1545
1544
|
}
|
|
1546
|
-
return i === void 0 ? { plainRelativeTo: wt(e, o) } : { zonedRelativeTo: nt(ir(e, r, s, s === "option" ?
|
|
1545
|
+
return i === void 0 ? { plainRelativeTo: wt(e, o) } : { zonedRelativeTo: nt(ir(e, r, s, s === "option" ? sn(a) : 0, i, "compatible", "reject", c), i, o) };
|
|
1547
1546
|
}
|
|
1548
1547
|
function re(n) {
|
|
1549
1548
|
return h(n, ut) !== 0 ? "year" : h(n, lt) !== 0 ? "month" : h(n, Mt) !== 0 ? "week" : h(n, ht) !== 0 ? "day" : h(n, dt) !== 0 ? "hour" : h(n, mt) !== 0 ? "minute" : h(n, ft) !== 0 ? "second" : h(n, gt) !== 0 ? "millisecond" : h(n, yt) !== 0 ? "microsecond" : "nanosecond";
|
|
@@ -1573,10 +1572,10 @@ function jt(n, t, e, r, o) {
|
|
|
1573
1572
|
a.sort();
|
|
1574
1573
|
for (let u = 0; u < a.length; u++) {
|
|
1575
1574
|
const d = a[u], m = t[d];
|
|
1576
|
-
if (m !== void 0) c = !0, s[d] = (0,
|
|
1575
|
+
if (m !== void 0) c = !0, s[d] = (0, Ea[d])(m);
|
|
1577
1576
|
else if (o !== "partial") {
|
|
1578
1577
|
if (o.includes(d)) throw new TypeError(`required property '${d}' missing or undefined`);
|
|
1579
|
-
s[d] =
|
|
1578
|
+
s[d] = Ma[d];
|
|
1580
1579
|
}
|
|
1581
1580
|
}
|
|
1582
1581
|
if (o === "partial" && !c) throw new TypeError("no supported properties found");
|
|
@@ -1635,9 +1634,9 @@ function Ut(n) {
|
|
|
1635
1634
|
if (z(n)) return new t(h(n, ut), h(n, lt), h(n, Mt), h(n, ht), h(n, dt), h(n, mt), h(n, ft), h(n, gt), h(n, yt), h(n, Tt));
|
|
1636
1635
|
if (!q(n)) return function(o) {
|
|
1637
1636
|
const { years: i, months: a, weeks: s, days: c, hours: u, minutes: d, seconds: m, milliseconds: f, microseconds: g, nanoseconds: y } = function(p) {
|
|
1638
|
-
const w =
|
|
1637
|
+
const w = ya.exec(p);
|
|
1639
1638
|
if (!w) throw new RangeError(`invalid duration: ${p}`);
|
|
1640
|
-
if (w.every((
|
|
1639
|
+
if (w.every((ra, oa) => oa < 2 || ra === void 0)) throw new RangeError(`invalid duration: ${p}`);
|
|
1641
1640
|
const v = w[1] === "-" ? -1 : 1, _ = w[2] === void 0 ? 0 : $(w[2]) * v, E = w[3] === void 0 ? 0 : $(w[3]) * v, O = w[4] === void 0 ? 0 : $(w[4]) * v, R = w[5] === void 0 ? 0 : $(w[5]) * v, W = w[6] === void 0 ? 0 : $(w[6]) * v, K = w[7], G = w[8], U = w[9], Et = w[10], Q = w[11];
|
|
1642
1641
|
let P = 0, it = 0, kt = 0;
|
|
1643
1642
|
if (K !== void 0) {
|
|
@@ -1647,13 +1646,13 @@ function Ut(n) {
|
|
|
1647
1646
|
if (Et ?? Q) throw new RangeError("only the smallest unit can be fractional");
|
|
1648
1647
|
kt = 60 * $((U + "000000000").slice(0, 9)) * v;
|
|
1649
1648
|
} else it = Et === void 0 ? 0 : $(Et) * v, Q !== void 0 && (kt = $((Q + "000000000").slice(0, 9)) * v);
|
|
1650
|
-
const fe = kt % 1e3,
|
|
1651
|
-
return it += Math.trunc(kt / 1e9) % 60, P += Math.trunc(kt / 6e10), Er(_, E, O, R, W, P, it,
|
|
1649
|
+
const fe = kt % 1e3, Ae = Math.trunc(kt / 1e3) % 1e3, Ue = Math.trunc(kt / 1e6) % 1e3;
|
|
1650
|
+
return it += Math.trunc(kt / 1e9) % 60, P += Math.trunc(kt / 6e10), Er(_, E, O, R, W, P, it, Ue, Ae, fe), { years: _, months: E, weeks: O, days: R, hours: W, minutes: P, seconds: it, milliseconds: Ue, microseconds: Ae, nanoseconds: fe };
|
|
1652
1651
|
}(o);
|
|
1653
1652
|
return new (et("%Temporal.Duration%"))(i, a, s, c, u, d, m, f, g, y);
|
|
1654
1653
|
}(V(n));
|
|
1655
1654
|
const e = { years: 0, months: 0, weeks: 0, days: 0, hours: 0, minutes: 0, seconds: 0, milliseconds: 0, microseconds: 0, nanoseconds: 0 };
|
|
1656
|
-
let r =
|
|
1655
|
+
let r = Di(n);
|
|
1657
1656
|
for (let o = 0; o < or.length; o++) {
|
|
1658
1657
|
const i = or[o], a = r[i];
|
|
1659
1658
|
a !== void 0 && (e[i] = a);
|
|
@@ -1670,19 +1669,19 @@ function pn(n) {
|
|
|
1670
1669
|
const w = te(p);
|
|
1671
1670
|
if (!w.z && !w.offset) throw new RangeError("Temporal.Instant requires a time zone offset");
|
|
1672
1671
|
return w;
|
|
1673
|
-
}(V(t)), { hour: c = 0, minute: u = 0, second: d = 0, millisecond: m = 0, microsecond: f = 0, nanosecond: g = 0 } = i === "start-of-day" ? {} : i, y = Ln(e, r, o, c, u, d, m, f, g - (s ? 0 :
|
|
1674
|
-
return
|
|
1672
|
+
}(V(t)), { hour: c = 0, minute: u = 0, second: d = 0, millisecond: m = 0, microsecond: f = 0, nanosecond: g = 0 } = i === "start-of-day" ? {} : i, y = Ln(e, r, o, c, u, d, m, f, g - (s ? 0 : sn(a)));
|
|
1673
|
+
return Xe(y.isoDate), Vt(tt(y));
|
|
1675
1674
|
}
|
|
1676
1675
|
function Co(n, t) {
|
|
1677
1676
|
if (q(n)) {
|
|
1678
|
-
if (Yt(n)) return L(M(t)),
|
|
1677
|
+
if (Yt(n)) return L(M(t)), Ge(h(n, C), h(n, D));
|
|
1679
1678
|
let s;
|
|
1680
|
-
return Dt(n, D) ? s = h(n, D) : (s = n.calendar, s === void 0 && (s = "iso8601"), s = Gn(s)),
|
|
1679
|
+
return Dt(n, D) ? s = h(n, D) : (s = n.calendar, s === void 0 && (s = "iso8601"), s = Gn(s)), Ge(ar(s, jt(s, n, ["year", "month", "monthCode", "day"], [], []), L(M(t))), s);
|
|
1681
1680
|
}
|
|
1682
1681
|
let { month: e, day: r, referenceISOYear: o, calendar: i } = to(V(n));
|
|
1683
|
-
if (i === void 0 && (i = "iso8601"), i = _t(i), L(M(t)), i === "iso8601") return
|
|
1682
|
+
if (i === void 0 && (i = "iso8601"), i = _t(i), L(M(t)), i === "iso8601") return Ge({ year: 1972, month: e, day: r }, i);
|
|
1684
1683
|
let a = { year: o, month: e, day: r };
|
|
1685
|
-
return
|
|
1684
|
+
return Ie(a), a = ar(i, vt(i, a, "month-day"), "constrain"), Ge(a, i);
|
|
1686
1685
|
}
|
|
1687
1686
|
function pe(n, t) {
|
|
1688
1687
|
let e;
|
|
@@ -1695,22 +1694,22 @@ function pe(n, t) {
|
|
|
1695
1694
|
}
|
|
1696
1695
|
const { hour: r, minute: o, second: i, millisecond: a, microsecond: s, nanosecond: c } = Fr(n);
|
|
1697
1696
|
e = br(r, o, i, a, s, c, L(M(t)));
|
|
1698
|
-
} else e =
|
|
1697
|
+
} else e = pi(V(n)), L(M(t));
|
|
1699
1698
|
return ie(e);
|
|
1700
1699
|
}
|
|
1701
|
-
function
|
|
1700
|
+
function _i(n) {
|
|
1702
1701
|
return n === void 0 ? { deltaDays: 0, hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 } : h(pe(n), Z);
|
|
1703
1702
|
}
|
|
1704
1703
|
function wn(n, t) {
|
|
1705
1704
|
if (q(n)) {
|
|
1706
|
-
if (J(n)) return L(M(t)),
|
|
1705
|
+
if (J(n)) return L(M(t)), Ve(h(n, C), h(n, D));
|
|
1707
1706
|
const s = Vn(n);
|
|
1708
|
-
return
|
|
1707
|
+
return Ve(kn(s, jt(s, n, ["year", "month", "monthCode"], [], []), L(M(t))), s);
|
|
1709
1708
|
}
|
|
1710
1709
|
let { year: e, month: r, referenceISODay: o, calendar: i } = Jr(V(n));
|
|
1711
1710
|
i === void 0 && (i = "iso8601"), i = _t(i), L(M(t));
|
|
1712
1711
|
let a = { year: e, month: r, day: o };
|
|
1713
|
-
return io(a), a = kn(i, vt(i, a, "year-month"), "constrain"),
|
|
1712
|
+
return io(a), a = kn(i, vt(i, a, "year-month"), "constrain"), Ve(a, i);
|
|
1714
1713
|
}
|
|
1715
1714
|
function ir(n, t, e, r, o, i, a, s) {
|
|
1716
1715
|
if (t === "start-of-day") return ge(o, n);
|
|
@@ -1718,11 +1717,11 @@ function ir(n, t, e, r, o, i, a, s) {
|
|
|
1718
1717
|
if (e === "wall" || a === "ignore") return ot(o, c, i);
|
|
1719
1718
|
if (e === "exact" || a === "use") {
|
|
1720
1719
|
const m = Ln(n.year, n.month, n.day, t.hour, t.minute, t.second, t.millisecond, t.microsecond, t.nanosecond - r);
|
|
1721
|
-
|
|
1720
|
+
Xe(m.isoDate);
|
|
1722
1721
|
const f = tt(m);
|
|
1723
1722
|
return Bt(f), f;
|
|
1724
1723
|
}
|
|
1725
|
-
|
|
1724
|
+
Xe(n);
|
|
1726
1725
|
const u = tt(c), d = Yn(o, c);
|
|
1727
1726
|
for (let m = 0; m < d.length; m++) {
|
|
1728
1727
|
const f = d[m], g = l.toNumber(l.subtract(u, f)), y = we(g, 6e10, "halfExpand");
|
|
@@ -1732,7 +1731,7 @@ function ir(n, t, e, r, o, i, a, s) {
|
|
|
1732
1731
|
const m = Zr(r), f = Nn(c, "iso8601", "auto");
|
|
1733
1732
|
throw new RangeError(`Offset ${m} is invalid for ${f} in ${o}`);
|
|
1734
1733
|
}
|
|
1735
|
-
return
|
|
1734
|
+
return Yi(d, o, c, i);
|
|
1736
1735
|
}
|
|
1737
1736
|
function bn(n, t) {
|
|
1738
1737
|
let e, r, o, i, a, s, c, u = !1, d = "option";
|
|
@@ -1759,61 +1758,61 @@ function bn(n, t) {
|
|
|
1759
1758
|
s = Tn(v), c = tr(v, "reject"), L(v), e = { year: y, month: p, day: w };
|
|
1760
1759
|
}
|
|
1761
1760
|
let m = 0;
|
|
1762
|
-
return d === "option" && (m =
|
|
1761
|
+
return d === "option" && (m = sn(i)), nt(ir(e, r, d, m, o, s, c, u), o, a);
|
|
1763
1762
|
}
|
|
1764
|
-
function
|
|
1765
|
-
|
|
1763
|
+
function Ei(n, t, e) {
|
|
1764
|
+
Ie(t), de(n), k(n, C, t), k(n, D, e), k(n, ti, !0);
|
|
1766
1765
|
}
|
|
1767
1766
|
function wt(n, t) {
|
|
1768
1767
|
const e = et("%Temporal.PlainDate%"), r = Object.create(e.prototype);
|
|
1769
|
-
return
|
|
1768
|
+
return Ei(r, n, t), r;
|
|
1770
1769
|
}
|
|
1771
|
-
function
|
|
1772
|
-
|
|
1770
|
+
function Mi(n, t, e) {
|
|
1771
|
+
Ye(t), de(n), k(n, A, t), k(n, D, e);
|
|
1773
1772
|
}
|
|
1774
1773
|
function It(n, t) {
|
|
1775
1774
|
const e = et("%Temporal.PlainDateTime%"), r = Object.create(e.prototype);
|
|
1776
|
-
return
|
|
1775
|
+
return Mi(r, n, t), r;
|
|
1777
1776
|
}
|
|
1778
|
-
function
|
|
1779
|
-
|
|
1777
|
+
function Ti(n, t, e) {
|
|
1778
|
+
Ie(t), de(n), k(n, C, t), k(n, D, e), k(n, ni, !0);
|
|
1780
1779
|
}
|
|
1781
|
-
function
|
|
1780
|
+
function Ge(n, t) {
|
|
1782
1781
|
const e = et("%Temporal.PlainMonthDay%"), r = Object.create(e.prototype);
|
|
1783
|
-
return
|
|
1782
|
+
return Ti(r, n, t), r;
|
|
1784
1783
|
}
|
|
1785
|
-
function
|
|
1784
|
+
function Ci(n, t) {
|
|
1786
1785
|
de(n), k(n, Z, t);
|
|
1787
1786
|
}
|
|
1788
1787
|
function ie(n) {
|
|
1789
1788
|
const t = et("%Temporal.PlainTime%"), e = Object.create(t.prototype);
|
|
1790
|
-
return
|
|
1789
|
+
return Ci(e, n), e;
|
|
1791
1790
|
}
|
|
1792
|
-
function
|
|
1793
|
-
io(t), de(n), k(n, C, t), k(n, D, e), k(n,
|
|
1791
|
+
function Oi(n, t, e) {
|
|
1792
|
+
io(t), de(n), k(n, C, t), k(n, D, e), k(n, ei, !0);
|
|
1794
1793
|
}
|
|
1795
|
-
function
|
|
1794
|
+
function Ve(n, t) {
|
|
1796
1795
|
const e = et("%Temporal.PlainYearMonth%"), r = Object.create(e.prototype);
|
|
1797
|
-
return
|
|
1796
|
+
return Oi(r, n, t), r;
|
|
1798
1797
|
}
|
|
1799
|
-
function
|
|
1798
|
+
function $i(n, t) {
|
|
1800
1799
|
Bt(t), de(n), k(n, T, t);
|
|
1801
1800
|
}
|
|
1802
1801
|
function Vt(n) {
|
|
1803
1802
|
const t = et("%Temporal.Instant%"), e = Object.create(t.prototype);
|
|
1804
|
-
return
|
|
1803
|
+
return $i(e, n), e;
|
|
1805
1804
|
}
|
|
1806
|
-
function
|
|
1805
|
+
function Ri(n, t, e, r) {
|
|
1807
1806
|
Bt(t), de(n), k(n, T, t), k(n, j, e), k(n, D, r);
|
|
1808
1807
|
}
|
|
1809
1808
|
function nt(n, t, e = "iso8601") {
|
|
1810
1809
|
const r = et("%Temporal.ZonedDateTime%"), o = Object.create(r.prototype);
|
|
1811
|
-
return
|
|
1810
|
+
return Ri(o, n, t, e), o;
|
|
1812
1811
|
}
|
|
1813
1812
|
function Oo(n) {
|
|
1814
1813
|
return zr.filter((t) => n[t] !== void 0);
|
|
1815
1814
|
}
|
|
1816
|
-
function
|
|
1815
|
+
function Re(n, t, e) {
|
|
1817
1816
|
const r = Oo(e), o = Ee(n).fieldKeysToIgnore(r), i = /* @__PURE__ */ Object.create(null), a = Oo(t);
|
|
1818
1817
|
for (let s = 0; s < zr.length; s++) {
|
|
1819
1818
|
let c;
|
|
@@ -1824,7 +1823,7 @@ function ke(n, t, e) {
|
|
|
1824
1823
|
}
|
|
1825
1824
|
function Lt(n, t, e, r) {
|
|
1826
1825
|
const o = Ee(n).dateAdd(t, e, r);
|
|
1827
|
-
return
|
|
1826
|
+
return Ie(o), o;
|
|
1828
1827
|
}
|
|
1829
1828
|
function Wn(n, t, e, r) {
|
|
1830
1829
|
return Ee(n).dateUntil(t, e, r);
|
|
@@ -1841,7 +1840,7 @@ function Gn(n) {
|
|
|
1841
1840
|
({ calendar: e } = te(t));
|
|
1842
1841
|
} catch {
|
|
1843
1842
|
try {
|
|
1844
|
-
({ calendar: e } =
|
|
1843
|
+
({ calendar: e } = pi(t));
|
|
1845
1844
|
} catch {
|
|
1846
1845
|
try {
|
|
1847
1846
|
({ calendar: e } = Jr(t));
|
|
@@ -1864,7 +1863,7 @@ function _e(n, t, e) {
|
|
|
1864
1863
|
const r = Ee(n);
|
|
1865
1864
|
r.resolveFields(t, "date");
|
|
1866
1865
|
const o = r.dateToISO(t, e);
|
|
1867
|
-
return
|
|
1866
|
+
return Ie(o), o;
|
|
1868
1867
|
}
|
|
1869
1868
|
function kn(n, t, e) {
|
|
1870
1869
|
const r = Ee(n);
|
|
@@ -1876,7 +1875,7 @@ function ar(n, t, e) {
|
|
|
1876
1875
|
const r = Ee(n);
|
|
1877
1876
|
r.resolveFields(t, "month-day");
|
|
1878
1877
|
const o = r.monthDayToISOReferenceDate(t, e);
|
|
1879
|
-
return
|
|
1878
|
+
return Ie(o), o;
|
|
1880
1879
|
}
|
|
1881
1880
|
function bt(n) {
|
|
1882
1881
|
if (q(n) && Y(n)) return h(n, j);
|
|
@@ -1884,13 +1883,13 @@ function bt(n) {
|
|
|
1884
1883
|
if (t === "UTC") return "UTC";
|
|
1885
1884
|
const { tzName: e, offsetMinutes: r } = function(i) {
|
|
1886
1885
|
const { tzAnnotation: a, offset: s, z: c } = function(u) {
|
|
1887
|
-
if (
|
|
1886
|
+
if (wi.test(u)) return { tzAnnotation: u, offset: void 0, z: !1 };
|
|
1888
1887
|
try {
|
|
1889
1888
|
const { tzAnnotation: d, offset: m, z: f } = te(u);
|
|
1890
1889
|
if (f || d || m) return { tzAnnotation: d, offset: m, z: f };
|
|
1891
1890
|
} catch {
|
|
1892
1891
|
}
|
|
1893
|
-
|
|
1892
|
+
vi(u);
|
|
1894
1893
|
}(i);
|
|
1895
1894
|
return a ? be(a) : c ? be("UTC") : s ? be(s) : void 0;
|
|
1896
1895
|
}(t);
|
|
@@ -1899,7 +1898,7 @@ function bt(n) {
|
|
|
1899
1898
|
if (!o) throw new RangeError(`Unrecognized time zone ${e}`);
|
|
1900
1899
|
return o.identifier;
|
|
1901
1900
|
}
|
|
1902
|
-
function
|
|
1901
|
+
function ki(n, t) {
|
|
1903
1902
|
if (n === t) return !0;
|
|
1904
1903
|
const e = be(n).offsetMinutes, r = be(t).offsetMinutes;
|
|
1905
1904
|
if (e === void 0 && r === void 0) {
|
|
@@ -1920,13 +1919,13 @@ function Zr(n) {
|
|
|
1920
1919
|
}
|
|
1921
1920
|
function zt(n, t) {
|
|
1922
1921
|
const e = ae(n, t);
|
|
1923
|
-
let { isoDate: { year: r, month: o, day: i }, time: { hour: a, minute: s, second: c, millisecond: u, microsecond: d, nanosecond: m } } =
|
|
1922
|
+
let { isoDate: { year: r, month: o, day: i }, time: { hour: a, minute: s, second: c, millisecond: u, microsecond: d, nanosecond: m } } = xi(t);
|
|
1924
1923
|
return Ln(r, o, i, a, s, c, u, d, m + e);
|
|
1925
1924
|
}
|
|
1926
1925
|
function ot(n, t, e) {
|
|
1927
|
-
return
|
|
1926
|
+
return Yi(Yn(n, t), n, t, e);
|
|
1928
1927
|
}
|
|
1929
|
-
function
|
|
1928
|
+
function Yi(n, t, e, r) {
|
|
1930
1929
|
const o = n.length;
|
|
1931
1930
|
if (o === 1) return n[0];
|
|
1932
1931
|
if (o) switch (r) {
|
|
@@ -1946,37 +1945,37 @@ function Li(n, t, e, r) {
|
|
|
1946
1945
|
const u = ae(t, c) - s;
|
|
1947
1946
|
switch (r) {
|
|
1948
1947
|
case "earlier": {
|
|
1949
|
-
const d = N.fromComponents(0, 0, 0, 0, 0, -u), m =
|
|
1948
|
+
const d = N.fromComponents(0, 0, 0, 0, 0, -u), m = Je(e.time, d);
|
|
1950
1949
|
return Yn(t, x($t(e.isoDate.year, e.isoDate.month, e.isoDate.day + m.deltaDays), m))[0];
|
|
1951
1950
|
}
|
|
1952
1951
|
case "compatible":
|
|
1953
1952
|
case "later": {
|
|
1954
|
-
const d = N.fromComponents(0, 0, 0, 0, 0, u), m =
|
|
1953
|
+
const d = N.fromComponents(0, 0, 0, 0, 0, u), m = Je(e.time, d), f = Yn(t, x($t(e.isoDate.year, e.isoDate.month, e.isoDate.day + m.deltaDays), m));
|
|
1955
1954
|
return f[f.length - 1];
|
|
1956
1955
|
}
|
|
1957
1956
|
}
|
|
1958
1957
|
}
|
|
1959
1958
|
function Yn(n, t) {
|
|
1960
|
-
if (n === "UTC") return
|
|
1959
|
+
if (n === "UTC") return Xe(t.isoDate), [tt(t)];
|
|
1961
1960
|
const e = be(n).offsetMinutes;
|
|
1962
1961
|
if (e !== void 0) {
|
|
1963
1962
|
const r = Ln(t.isoDate.year, t.isoDate.month, t.isoDate.day, t.time.hour, t.time.minute - e, t.time.second, t.time.millisecond, t.time.microsecond, t.time.nanosecond);
|
|
1964
|
-
|
|
1963
|
+
Xe(r.isoDate);
|
|
1965
1964
|
const o = tt(r);
|
|
1966
1965
|
return Bt(o), [o];
|
|
1967
1966
|
}
|
|
1968
|
-
return
|
|
1967
|
+
return Xe(t.isoDate), function(r, o) {
|
|
1969
1968
|
let i = tt(o), a = l.subtract(i, ve);
|
|
1970
1969
|
l.lessThan(a, $n) && (a = i);
|
|
1971
1970
|
let s = l.add(i, ve);
|
|
1972
|
-
l.greaterThan(s,
|
|
1971
|
+
l.greaterThan(s, Ke) && (s = i);
|
|
1973
1972
|
const c = qr(r, a), u = qr(r, s);
|
|
1974
1973
|
return (c === u ? [c] : [c, u]).map((m) => {
|
|
1975
1974
|
const f = l.subtract(i, l.BigInt(m)), g = function(y, p) {
|
|
1976
|
-
const { epochMilliseconds: w, time: { millisecond: v, microsecond: _, nanosecond: E } } =
|
|
1975
|
+
const { epochMilliseconds: w, time: { millisecond: v, microsecond: _, nanosecond: E } } = xi(p), { year: O, month: R, day: W, hour: K, minute: G, second: U } = ji(y, w);
|
|
1977
1976
|
return Ln(O, R, W, K, G, U, v, _, E);
|
|
1978
1977
|
}(r, f);
|
|
1979
|
-
if (
|
|
1978
|
+
if (tn(o, g) === 0) return Bt(f), f;
|
|
1980
1979
|
}).filter((m) => m !== void 0);
|
|
1981
1980
|
}(n, t);
|
|
1982
1981
|
}
|
|
@@ -1993,7 +1992,7 @@ function Xn(n) {
|
|
|
1993
1992
|
function xt(n) {
|
|
1994
1993
|
return Rn(n, 2);
|
|
1995
1994
|
}
|
|
1996
|
-
function
|
|
1995
|
+
function Ni(n, t) {
|
|
1997
1996
|
let e;
|
|
1998
1997
|
if (t === "auto") {
|
|
1999
1998
|
if (n === 0) return "";
|
|
@@ -2006,14 +2005,14 @@ function xi(n, t) {
|
|
|
2006
2005
|
}
|
|
2007
2006
|
function vr(n, t, e, r, o) {
|
|
2008
2007
|
let i = `${xt(n)}:${xt(t)}`;
|
|
2009
|
-
return o === "minute" || (i += `:${xt(e)}`, i +=
|
|
2008
|
+
return o === "minute" || (i += `:${xt(e)}`, i += Ni(r, o)), i;
|
|
2010
2009
|
}
|
|
2011
2010
|
function $o(n, t, e) {
|
|
2012
2011
|
let r = t;
|
|
2013
2012
|
r === void 0 && (r = "UTC");
|
|
2014
2013
|
const o = h(n, T), i = Nn(zt(r, o), "iso8601", e, "never");
|
|
2015
2014
|
let a = "Z";
|
|
2016
|
-
return t !== void 0 && (a =
|
|
2015
|
+
return t !== void 0 && (a = Li(ae(r, o))), `${i}${a}`;
|
|
2017
2016
|
}
|
|
2018
2017
|
function Jn(n, t) {
|
|
2019
2018
|
const e = h(n, ut), r = h(n, lt), o = h(n, Mt), i = h(n, ht), a = h(n, dt), s = h(n, mt), c = ur(n);
|
|
@@ -2022,7 +2021,7 @@ function Jn(n, t) {
|
|
|
2022
2021
|
let d = "";
|
|
2023
2022
|
a !== 0 && (d += `${Math.abs(a)}H`), s !== 0 && (d += `${Math.abs(s)}M`);
|
|
2024
2023
|
const m = N.fromComponents(0, 0, h(n, ft), h(n, gt), h(n, yt), h(n, Tt));
|
|
2025
|
-
m.isZero() && !["second", "millisecond", "microsecond", "nanosecond"].includes(re(n)) && t === "auto" || (d += `${Math.abs(m.sec)}${
|
|
2024
|
+
m.isZero() && !["second", "millisecond", "microsecond", "nanosecond"].includes(re(n)) && t === "auto" || (d += `${Math.abs(m.sec)}${Ni(Math.abs(m.subsec), t)}S`);
|
|
2026
2025
|
let f = `${c < 0 ? "-" : ""}P${u}`;
|
|
2027
2026
|
return d && (f = `${f}T${d}`), f;
|
|
2028
2027
|
}
|
|
@@ -2061,70 +2060,69 @@ function Lo(n, t, e = "auto", r = "auto", o = "auto", i = void 0) {
|
|
|
2061
2060
|
}
|
|
2062
2061
|
const s = h(n, j), c = ae(s, a);
|
|
2063
2062
|
let u = Nn(zt(s, a), "iso8601", t, "never");
|
|
2064
|
-
return o !== "never" && (u +=
|
|
2063
|
+
return o !== "never" && (u += Li(c)), r !== "never" && (u += `[${r === "critical" ? "!" : ""}${s}]`), u += Un(h(n, D), e), u;
|
|
2065
2064
|
}
|
|
2066
2065
|
function xo(n) {
|
|
2067
|
-
return
|
|
2066
|
+
return bi.test(n);
|
|
2068
2067
|
}
|
|
2069
|
-
function
|
|
2070
|
-
const t =
|
|
2068
|
+
function sn(n) {
|
|
2069
|
+
const t = Ra.exec(n);
|
|
2071
2070
|
if (!t) throw new RangeError(`invalid time zone offset: ${n}; must match ±HH:MM[:SS.SSSSSSSSS]`);
|
|
2072
2071
|
return (t[1] === "-" ? -1 : 1) * (1e9 * (60 * (60 * +t[2] + +(t[3] || 0)) + +(t[4] || 0)) + +((t[5] || 0) + "000000000").slice(0, 9));
|
|
2073
2072
|
}
|
|
2074
|
-
let
|
|
2075
|
-
const
|
|
2073
|
+
let ln;
|
|
2074
|
+
const Oa = Object.assign(/* @__PURE__ */ Object.create(null), { "/": !0, "-": !0, _: !0 });
|
|
2076
2075
|
function sr(n) {
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
Te.set(xn(c), c);
|
|
2076
|
+
if (ln === void 0) {
|
|
2077
|
+
const i = Intl.supportedValuesOf?.("timeZone");
|
|
2078
|
+
if (i) {
|
|
2079
|
+
ln = /* @__PURE__ */ new Map();
|
|
2080
|
+
for (let a = 0; a < i.length; a++) {
|
|
2081
|
+
const s = i[a];
|
|
2082
|
+
ln.set(xn(s), s);
|
|
2085
2083
|
}
|
|
2086
|
-
} else
|
|
2084
|
+
} else ln = null;
|
|
2087
2085
|
}
|
|
2088
2086
|
const t = xn(n);
|
|
2089
|
-
let e =
|
|
2087
|
+
let e = ln?.get(t);
|
|
2090
2088
|
if (e) return { identifier: e, primaryIdentifier: e };
|
|
2091
2089
|
try {
|
|
2092
|
-
e =
|
|
2090
|
+
e = yi(n).resolvedOptions().timeZone;
|
|
2093
2091
|
} catch {
|
|
2094
2092
|
return;
|
|
2095
2093
|
}
|
|
2096
|
-
if (t === "antarctica/south_pole" && (e = "Antarctica/McMurdo"),
|
|
2097
|
-
const r = [...t].map((
|
|
2094
|
+
if (t === "antarctica/south_pole" && (e = "Antarctica/McMurdo"), _a.has(n)) throw new RangeError(`${n} is a legacy time zone identifier from ICU. Use ${e} instead`);
|
|
2095
|
+
const r = [...t].map((i, a) => a === 0 || Oa[t[a - 1]] ? i.toUpperCase() : i).join("").split("/");
|
|
2098
2096
|
if (r.length === 1) return t === "gb-eire" ? { identifier: "GB-Eire", primaryIdentifier: e } : { identifier: t.length <= 3 || /[-0-9]/.test(t) ? t.toUpperCase() : r[0], primaryIdentifier: e };
|
|
2099
2097
|
if (r[0] === "Etc") return { identifier: `Etc/${["Zulu", "Greenwich", "Universal"].includes(r[1]) ? r[1] : r[1].toUpperCase()}`, primaryIdentifier: e };
|
|
2100
2098
|
if (r[0] === "Us") return { identifier: `US/${r[1]}`, primaryIdentifier: e };
|
|
2101
2099
|
const o = /* @__PURE__ */ new Map([["Act", "ACT"], ["Lhi", "LHI"], ["Nsw", "NSW"], ["Dar_Es_Salaam", "Dar_es_Salaam"], ["Port_Of_Spain", "Port_of_Spain"], ["Port-Au-Prince", "Port-au-Prince"], ["Isle_Of_Man", "Isle_of_Man"], ["Comodrivadavia", "ComodRivadavia"], ["Knox_In", "Knox_IN"], ["Dumontdurville", "DumontDUrville"], ["Mcmurdo", "McMurdo"], ["Denoronha", "DeNoronha"], ["Easterisland", "EasterIsland"], ["Bajanorte", "BajaNorte"], ["Bajasur", "BajaSur"]]);
|
|
2102
2100
|
return r[1] = o.get(r[1]) ?? r[1], r.length > 2 && (r[2] = o.get(r[2]) ?? r[2]), { identifier: r.join("/"), primaryIdentifier: e };
|
|
2103
2101
|
}
|
|
2104
|
-
function
|
|
2105
|
-
const { year: e, month: r, day: o, hour: i, minute: a, second: s } =
|
|
2102
|
+
function Oe(n, t) {
|
|
2103
|
+
const { year: e, month: r, day: o, hour: i, minute: a, second: s } = ji(n, t);
|
|
2106
2104
|
let c = t % 1e3;
|
|
2107
2105
|
return c < 0 && (c += 1e3), 1e6 * (no({ isoDate: { year: e, month: r, day: o }, time: { hour: i, minute: a, second: s, millisecond: c } }) - t);
|
|
2108
2106
|
}
|
|
2109
2107
|
function qr(n, t) {
|
|
2110
|
-
return
|
|
2108
|
+
return Oe(n, Ft(t, "floor"));
|
|
2111
2109
|
}
|
|
2112
2110
|
function eo(n) {
|
|
2113
2111
|
const t = n < 0 ? "-" : "+", e = Math.abs(n);
|
|
2114
2112
|
return `${t}${vr(Math.floor(e / 60), e % 60, 0, 0, "minute")}`;
|
|
2115
2113
|
}
|
|
2116
|
-
function
|
|
2117
|
-
return eo(we(n,
|
|
2114
|
+
function Li(n) {
|
|
2115
|
+
return eo(we(n, pa, "halfExpand") / 6e10);
|
|
2118
2116
|
}
|
|
2119
2117
|
function no({ isoDate: { year: n, month: t, day: e }, time: { hour: r, minute: o, second: i, millisecond: a } }) {
|
|
2120
2118
|
const s = n % 400, c = (n - s) / 400, u = /* @__PURE__ */ new Date();
|
|
2121
|
-
return u.setUTCHours(r, o, i, a), u.setUTCFullYear(s, t - 1, e), u.getTime() +
|
|
2119
|
+
return u.setUTCHours(r, o, i, a), u.setUTCFullYear(s, t - 1, e), u.getTime() + va * c;
|
|
2122
2120
|
}
|
|
2123
2121
|
function tt(n) {
|
|
2124
2122
|
const t = no(n), e = 1e3 * n.time.microsecond + n.time.nanosecond;
|
|
2125
2123
|
return l.add(St(t), l.BigInt(e));
|
|
2126
2124
|
}
|
|
2127
|
-
function
|
|
2125
|
+
function xi(n) {
|
|
2128
2126
|
let t = Ft(n, "trunc"), e = l.toNumber(l.remainder(n, Pn));
|
|
2129
2127
|
e < 0 && (e += 1e6, t -= 1);
|
|
2130
2128
|
const r = Math.floor(e / 1e3) % 1e3, o = e % 1e3, i = new Date(t);
|
|
@@ -2135,12 +2133,12 @@ function ro(n, t) {
|
|
|
2135
2133
|
const e = Ft(t, "floor");
|
|
2136
2134
|
if (e < _n) return ro(n, St(_n));
|
|
2137
2135
|
const r = Date.now(), o = Math.max(e, r) + 366 * De * 3;
|
|
2138
|
-
let i = e, a =
|
|
2136
|
+
let i = e, a = Oe(n, i), s = i, c = a;
|
|
2139
2137
|
for (; a === c && i < o; ) {
|
|
2140
|
-
if (s = i + 2 * De * 7, s >
|
|
2141
|
-
c =
|
|
2138
|
+
if (s = i + 2 * De * 7, s > gi) return null;
|
|
2139
|
+
c = Oe(n, s), a === c && (i = s);
|
|
2142
2140
|
}
|
|
2143
|
-
return a === c ? null : St(
|
|
2141
|
+
return a === c ? null : St(Wi((u) => Oe(n, u), i, s, a, c));
|
|
2144
2142
|
}
|
|
2145
2143
|
function Hr(n, t) {
|
|
2146
2144
|
if (n === "UTC") return null;
|
|
@@ -2155,14 +2153,14 @@ function Hr(n, t) {
|
|
|
2155
2153
|
}
|
|
2156
2154
|
let i = e - 1;
|
|
2157
2155
|
if (i < _n) return null;
|
|
2158
|
-
let a =
|
|
2156
|
+
let a = Oe(n, i), s = i, c = a;
|
|
2159
2157
|
for (; a === c && i > _n; ) {
|
|
2160
2158
|
if (s = i - 2 * De * 7, s < _n) return null;
|
|
2161
|
-
c =
|
|
2159
|
+
c = Oe(n, s), a === c && (i = s);
|
|
2162
2160
|
}
|
|
2163
|
-
return a === c ? null : St(
|
|
2161
|
+
return a === c ? null : St(Wi((u) => Oe(n, u), s, i, c, a));
|
|
2164
2162
|
}
|
|
2165
|
-
function
|
|
2163
|
+
function ji(n, t) {
|
|
2166
2164
|
return function(e) {
|
|
2167
2165
|
const r = e.split(/[^\w]+/);
|
|
2168
2166
|
if (r.length !== 7) throw new RangeError(`expected 7 parts in "${e}`);
|
|
@@ -2174,12 +2172,12 @@ function Pi(n, t) {
|
|
|
2174
2172
|
const c = r[4] === "24" ? 0 : +r[4], u = +r[5], d = +r[6];
|
|
2175
2173
|
if (!(Number.isFinite(a) && Number.isFinite(o) && Number.isFinite(i) && Number.isFinite(c) && Number.isFinite(u) && Number.isFinite(d))) throw new RangeError(`Invalid number in "${e}`);
|
|
2176
2174
|
return { year: a, month: o, day: i, hour: c, minute: u, second: d };
|
|
2177
|
-
}(
|
|
2175
|
+
}(yi(n).format(t));
|
|
2178
2176
|
}
|
|
2179
2177
|
function cr(n) {
|
|
2180
2178
|
return n !== void 0 && !(n % 4 != 0 || n % 100 == 0 && n % 400 != 0);
|
|
2181
2179
|
}
|
|
2182
|
-
function
|
|
2180
|
+
function $e(n, t) {
|
|
2183
2181
|
return { standard: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], leapyear: [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] }[cr(n) ? "leapyear" : "standard"][t - 1];
|
|
2184
2182
|
}
|
|
2185
2183
|
function ur(n) {
|
|
@@ -2198,11 +2196,11 @@ function Dr(n) {
|
|
|
2198
2196
|
}
|
|
2199
2197
|
return 0;
|
|
2200
2198
|
}
|
|
2201
|
-
function
|
|
2199
|
+
function Ii(n) {
|
|
2202
2200
|
const t = Dr(n.date);
|
|
2203
2201
|
return t !== 0 ? t : n.time.sign();
|
|
2204
2202
|
}
|
|
2205
|
-
function
|
|
2203
|
+
function Ce(n, t) {
|
|
2206
2204
|
let e = n, r = t;
|
|
2207
2205
|
if (!Number.isFinite(e) || !Number.isFinite(r)) throw new RangeError("infinity is out of range");
|
|
2208
2206
|
return r -= 1, e += Math.floor(r / 12), r %= 12, r < 0 && (r += 12), r += 1, { year: e, month: r };
|
|
@@ -2210,7 +2208,7 @@ function Oe(n, t) {
|
|
|
2210
2208
|
function $t(n, t, e) {
|
|
2211
2209
|
let r = n, o = t, i = e;
|
|
2212
2210
|
if (!Number.isFinite(i)) throw new RangeError("infinity is out of range");
|
|
2213
|
-
({ year: r, month: o } =
|
|
2211
|
+
({ year: r, month: o } = Ce(r, o));
|
|
2214
2212
|
const a = 146097;
|
|
2215
2213
|
if (Math.abs(i) > a) {
|
|
2216
2214
|
const u = Math.trunc(i / a);
|
|
@@ -2219,8 +2217,8 @@ function $t(n, t, e) {
|
|
|
2219
2217
|
let s = 0, c = o > 2 ? r : r - 1;
|
|
2220
2218
|
for (; s = cr(c) ? 366 : 365, i < -s; ) r -= 1, c -= 1, i += s;
|
|
2221
2219
|
for (c += 1; s = cr(c) ? 366 : 365, i > s; ) r += 1, c += 1, i -= s;
|
|
2222
|
-
for (; i < 1; ) ({ year: r, month: o } =
|
|
2223
|
-
for (; i >
|
|
2220
|
+
for (; i < 1; ) ({ year: r, month: o } = Ce(r, o - 1)), i += $e(r, o);
|
|
2221
|
+
for (; i > $e(r, o); ) i -= $e(r, o), { year: r, month: o } = Ce(r, o + 1);
|
|
2224
2222
|
return { year: r, month: o, day: i };
|
|
2225
2223
|
}
|
|
2226
2224
|
function Ln(n, t, e, r, o, i, a, s, c) {
|
|
@@ -2229,14 +2227,14 @@ function Ln(n, t, e, r, o, i, a, s, c) {
|
|
|
2229
2227
|
}
|
|
2230
2228
|
function ye(n, t, e, r, o, i) {
|
|
2231
2229
|
let a, s = n, c = t, u = e, d = r, m = o, f = i;
|
|
2232
|
-
({ div: a, mod: f } =
|
|
2230
|
+
({ div: a, mod: f } = We(f, 3)), m += a, f < 0 && (m -= 1, f += 1e3), { div: a, mod: m } = We(m, 3), d += a, m < 0 && (d -= 1, m += 1e3), u += Math.trunc(d / 1e3), d %= 1e3, d < 0 && (u -= 1, d += 1e3), c += Math.trunc(u / 60), u %= 60, u < 0 && (c -= 1, u += 60), s += Math.trunc(c / 60), c %= 60, c < 0 && (s -= 1, c += 60);
|
|
2233
2231
|
let g = Math.trunc(s / 24);
|
|
2234
2232
|
return s %= 24, s < 0 && (g -= 1, s += 24), g += 0, s += 0, c += 0, u += 0, d += 0, m += 0, f += 0, { deltaDays: g, hour: s, minute: c, second: u, millisecond: d, microsecond: m, nanosecond: f };
|
|
2235
2233
|
}
|
|
2236
2234
|
function jo(n, t) {
|
|
2237
2235
|
const e = rt(n, 0);
|
|
2238
2236
|
if (Dr(e) === 0) return n.days;
|
|
2239
|
-
const r = h(t, C), o = Lt(h(t, D), r, e, "constrain"), i =
|
|
2237
|
+
const r = h(t, C), o = Lt(h(t, D), r, e, "constrain"), i = Ne(r.year, r.month - 1, r.day), a = Ne(o.year, o.month - 1, o.day) - i;
|
|
2240
2238
|
return n.days + a;
|
|
2241
2239
|
}
|
|
2242
2240
|
function Rt(n) {
|
|
@@ -2245,34 +2243,34 @@ function Rt(n) {
|
|
|
2245
2243
|
function pt(n, t, e) {
|
|
2246
2244
|
return Math.min(e, Math.max(t, n));
|
|
2247
2245
|
}
|
|
2248
|
-
function
|
|
2246
|
+
function Pi(n, t, e) {
|
|
2249
2247
|
const r = pt(t, 1, 12);
|
|
2250
|
-
return { year: n, month: r, day: pt(e, 1,
|
|
2248
|
+
return { year: n, month: r, day: pt(e, 1, $e(n, r)) };
|
|
2251
2249
|
}
|
|
2252
2250
|
function S(n, t, e) {
|
|
2253
2251
|
if (n < t || n > e) throw new RangeError(`value out of range: ${t} <= ${n} <= ${e}`);
|
|
2254
2252
|
}
|
|
2255
|
-
function
|
|
2256
|
-
S(t, 1, 12), S(e, 1,
|
|
2253
|
+
function ke(n, t, e) {
|
|
2254
|
+
S(t, 1, 12), S(e, 1, $e(n, t));
|
|
2257
2255
|
}
|
|
2258
|
-
function
|
|
2259
|
-
|
|
2256
|
+
function Ie(n) {
|
|
2257
|
+
Ye(x(n, { deltaDays: 0, hour: 12, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 }));
|
|
2260
2258
|
}
|
|
2261
2259
|
function _r(n, t, e, r, o, i) {
|
|
2262
2260
|
S(n, 0, 23), S(t, 0, 59), S(e, 0, 59), S(r, 0, 999), S(o, 0, 999), S(i, 0, 999);
|
|
2263
2261
|
}
|
|
2264
2262
|
function oo(n, t, e, r, o, i, a, s, c) {
|
|
2265
|
-
|
|
2263
|
+
ke(n, t, e), _r(r, o, i, a, s, c);
|
|
2266
2264
|
}
|
|
2267
|
-
function
|
|
2265
|
+
function Ye(n) {
|
|
2268
2266
|
const t = tt(n);
|
|
2269
|
-
(l.lessThan(t,
|
|
2267
|
+
(l.lessThan(t, wa) || l.greaterThan(t, ba)) && Bt(t);
|
|
2270
2268
|
}
|
|
2271
2269
|
function Wr(n) {
|
|
2272
2270
|
tt(n);
|
|
2273
2271
|
}
|
|
2274
2272
|
function Bt(n) {
|
|
2275
|
-
if (l.lessThan(n, $n) || l.greaterThan(n,
|
|
2273
|
+
if (l.lessThan(n, $n) || l.greaterThan(n, Ke)) throw new RangeError("date/time value is outside of supported range");
|
|
2276
2274
|
}
|
|
2277
2275
|
function io({ year: n, month: t }) {
|
|
2278
2276
|
S(n, Do, _o), n === Do ? S(t, 4, 12) : n === _o && S(t, 1, 9);
|
|
@@ -2290,17 +2288,17 @@ function Er(n, t, e, r, o, i, a, s, c, u) {
|
|
|
2290
2288
|
}
|
|
2291
2289
|
}
|
|
2292
2290
|
if (Math.abs(n) >= 2 ** 32 || Math.abs(t) >= 2 ** 32 || Math.abs(e) >= 2 ** 32) throw new RangeError("years, months, and weeks must be < 2³²");
|
|
2293
|
-
const f =
|
|
2291
|
+
const f = We(s, 3), g = We(c, 6), y = We(u, 9), p = We(1e6 * f.mod + 1e3 * g.mod + y.mod, 9).div, w = 86400 * r + 3600 * o + 60 * i + a + f.div + g.div + y.div + p;
|
|
2294
2292
|
if (!Number.isSafeInteger(w)) throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s");
|
|
2295
2293
|
}
|
|
2296
|
-
function
|
|
2294
|
+
function He(n) {
|
|
2297
2295
|
return { date: { years: h(n, ut), months: h(n, lt), weeks: h(n, Mt), days: h(n, ht) }, time: N.fromComponents(h(n, dt), h(n, mt), h(n, ft), h(n, gt), h(n, yt), h(n, Tt)) };
|
|
2298
2296
|
}
|
|
2299
2297
|
function Xt(n) {
|
|
2300
2298
|
const t = N.fromComponents(h(n, dt), h(n, mt), h(n, ft), h(n, gt), h(n, yt), h(n, Tt)).add24HourDays(h(n, ht));
|
|
2301
2299
|
return { date: { years: h(n, ut), months: h(n, lt), weeks: h(n, Mt), days: 0 }, time: t };
|
|
2302
2300
|
}
|
|
2303
|
-
function
|
|
2301
|
+
function Ai(n) {
|
|
2304
2302
|
const t = Xt(n), e = Math.trunc(t.time.sec / 86400);
|
|
2305
2303
|
return Er(t.date.years, t.date.months, t.date.weeks, e, 0, 0, 0, 0, 0, 0), { ...t.date, days: e };
|
|
2306
2304
|
}
|
|
@@ -2337,11 +2335,11 @@ function Pt(n, t) {
|
|
|
2337
2335
|
function ce(n, t) {
|
|
2338
2336
|
return Dr(n), t.sign(), { date: n, time: t };
|
|
2339
2337
|
}
|
|
2340
|
-
function
|
|
2338
|
+
function Ne(n, t, e) {
|
|
2341
2339
|
return no({ isoDate: { year: n, month: t + 1, day: e }, time: { hour: 0, minute: 0, second: 0, millisecond: 0 } }) / De;
|
|
2342
2340
|
}
|
|
2343
|
-
function
|
|
2344
|
-
if (Math.abs(
|
|
2341
|
+
function Xe({ year: n, month: t, day: e }) {
|
|
2342
|
+
if (Math.abs(Ne(n, t - 1, e)) > 1e8) throw new RangeError("date/time value is outside the supported range");
|
|
2345
2343
|
}
|
|
2346
2344
|
function ao(n, t) {
|
|
2347
2345
|
const e = t.hour - n.hour, r = t.minute - n.minute, o = t.second - n.second, i = t.millisecond - n.millisecond, a = t.microsecond - n.microsecond, s = t.nanosecond - n.nanosecond;
|
|
@@ -2351,7 +2349,7 @@ function so(n, t, e, r, o) {
|
|
|
2351
2349
|
let i = N.fromEpochNsDiff(t, n);
|
|
2352
2350
|
return i = lr(i, e, r, o), ce({ years: 0, months: 0, weeks: 0, days: 0 }, i);
|
|
2353
2351
|
}
|
|
2354
|
-
function
|
|
2352
|
+
function Ui(n, t, e, r) {
|
|
2355
2353
|
Wr(n), Wr(t);
|
|
2356
2354
|
let o = ao(n.time, t.time);
|
|
2357
2355
|
const i = o.sign(), a = Jt(n.isoDate, t.isoDate);
|
|
@@ -2360,7 +2358,7 @@ function Fi(n, t, e, r) {
|
|
|
2360
2358
|
const c = se("day", r), u = Wn(e, n.isoDate, s, c);
|
|
2361
2359
|
return r !== c && (o = o.add24HourDays(u.days), u.days = 0), ce(u, o);
|
|
2362
2360
|
}
|
|
2363
|
-
function
|
|
2361
|
+
function zi(n, t, e, r, o) {
|
|
2364
2362
|
const i = l.subtract(t, n);
|
|
2365
2363
|
if (l.equal(i, Nt)) return { date: { years: 0, months: 0, weeks: 0, days: 0 }, time: N.ZERO };
|
|
2366
2364
|
const a = l.lessThan(i, Nt) ? -1 : 1, s = zt(e, n), c = zt(e, t);
|
|
@@ -2373,7 +2371,7 @@ function Zi(n, t, e, r, o) {
|
|
|
2373
2371
|
const g = se("day", o);
|
|
2374
2372
|
return ce(Wn(r, s.isoDate, u.isoDate, g), f);
|
|
2375
2373
|
}
|
|
2376
|
-
function
|
|
2374
|
+
function Fi(n, t, e, r, o, i, a, s, c) {
|
|
2377
2375
|
let u, d, m, f, g = t;
|
|
2378
2376
|
switch (s) {
|
|
2379
2377
|
case "year": {
|
|
@@ -2406,20 +2404,20 @@ function qi(n, t, e, r, o, i, a, s, c) {
|
|
|
2406
2404
|
}
|
|
2407
2405
|
function Mr(n, t, e, r, o, i, a, s, c) {
|
|
2408
2406
|
let u = n;
|
|
2409
|
-
const d = Wt(s) || r && s === "day", m =
|
|
2407
|
+
const d = Wt(s) || r && s === "day", m = Ii(u) < 0 ? -1 : 1;
|
|
2410
2408
|
let f;
|
|
2411
|
-
return d ? { nudgeResult: f } =
|
|
2409
|
+
return d ? { nudgeResult: f } = Fi(m, u, t, e, r, o, a, s, c) : f = r ? function(g, y, p, w, v, _, E, O) {
|
|
2412
2410
|
let R = y;
|
|
2413
2411
|
const W = Lt(v, p.isoDate, R.date, "constrain"), K = x(W, p.time), G = x($t(W.year, W.month, W.day + g), p.time), U = ot(w, K, "compatible"), Et = ot(w, G, "compatible"), Q = N.fromEpochNsDiff(Et, U);
|
|
2414
2412
|
if (Q.sign() !== g) throw new RangeError("time zone returned inconsistent Instants");
|
|
2415
|
-
const P = l.BigInt(
|
|
2413
|
+
const P = l.BigInt(Be[E] * _);
|
|
2416
2414
|
let it = R.time.round(P, O);
|
|
2417
2415
|
const kt = it.subtract(Q), fe = kt.sign() !== -g;
|
|
2418
|
-
let
|
|
2419
|
-
return fe ? (
|
|
2416
|
+
let Ae, Ue;
|
|
2417
|
+
return fe ? (Ae = g, it = kt.round(P, O), Ue = it.addToEpochNs(Et)) : (Ae = 0, Ue = it.addToEpochNs(U)), { duration: ce(rt(R.date, R.date.days + Ae), it), nudgedEpochNs: Ue, didExpandCalendarUnit: fe };
|
|
2420
2418
|
}(m, u, e, r, o, a, s, c) : function(g, y, p, w, v, _) {
|
|
2421
2419
|
let E = g;
|
|
2422
|
-
const O = E.time.add24HourDays(E.date.days), R = O.round(l.BigInt(w *
|
|
2420
|
+
const O = E.time.add24HourDays(E.date.days), R = O.round(l.BigInt(w * Be[v]), _), W = R.subtract(O), { quotient: K } = O.divmod(rr), { quotient: G } = R.divmod(rr), U = Math.sign(G - K) === O.sign(), Et = W.addToEpochNs(y);
|
|
2423
2421
|
let Q = 0, P = R;
|
|
2424
2422
|
return oe(p) === "date" && (Q = G, P = R.add(N.fromComponents(24 * -G, 0, 0, 0, 0, 0))), { duration: { date: rt(E.date, Q), time: P }, nudgedEpochNs: Et, didExpandCalendarUnit: U };
|
|
2425
2423
|
}(u, t, i, a, s, c), u = f.duration, f.didExpandCalendarUnit && s !== "week" && (u = function(g, y, p, w, v, _, E, O) {
|
|
@@ -2454,27 +2452,27 @@ function Mr(n, t, e, r, o, i, a, s, c) {
|
|
|
2454
2452
|
}(m, u, f.nudgedEpochNs, e, r, o, i, se(s, "day"))), u;
|
|
2455
2453
|
}
|
|
2456
2454
|
function Io(n, t, e, r, o, i) {
|
|
2457
|
-
return Wt(i) || r && i === "day" ?
|
|
2455
|
+
return Wt(i) || r && i === "day" ? Fi(Ii(n) < 0 ? -1 : 1, n, t, e, r, o, 1, i, "trunc").total : Cn(n.time.add24HourDays(n.date.days), i);
|
|
2458
2456
|
}
|
|
2459
|
-
function
|
|
2460
|
-
if (
|
|
2461
|
-
|
|
2462
|
-
const s =
|
|
2457
|
+
function Zi(n, t, e, r, o, i, a) {
|
|
2458
|
+
if (tn(n, t) == 0) return { date: { years: 0, months: 0, weeks: 0, days: 0 }, time: N.ZERO };
|
|
2459
|
+
Ye(n), Ye(t);
|
|
2460
|
+
const s = Ui(n, t, e, r);
|
|
2463
2461
|
return i === "nanosecond" && o === 1 ? s : Mr(s, tt(t), n, null, e, r, o, i, a);
|
|
2464
2462
|
}
|
|
2465
|
-
function
|
|
2463
|
+
function qi(n, t, e, r, o, i, a, s) {
|
|
2466
2464
|
if (oe(o) === "time") return so(n, t, i, a, s);
|
|
2467
|
-
const c =
|
|
2465
|
+
const c = zi(n, t, e, r, o);
|
|
2468
2466
|
return a === "nanosecond" && i === 1 ? c : Mr(c, t, zt(e, n), e, r, o, i, a, s);
|
|
2469
2467
|
}
|
|
2470
|
-
function
|
|
2471
|
-
const a =
|
|
2468
|
+
function cn(n, t, e, r, o, i) {
|
|
2469
|
+
const a = Qe.reduce((g, y) => {
|
|
2472
2470
|
const p = y[0], w = y[1], v = y[2];
|
|
2473
2471
|
return e !== "datetime" && v !== e || r.includes(w) || g.push(w, p), g;
|
|
2474
2472
|
}, []);
|
|
2475
2473
|
let s = Ot(t, "largestUnit", e, "auto");
|
|
2476
2474
|
if (r.includes(s)) throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);
|
|
2477
|
-
const c =
|
|
2475
|
+
const c = on(t);
|
|
2478
2476
|
let u = qt(t, "trunc");
|
|
2479
2477
|
n === "since" && (u = function(g) {
|
|
2480
2478
|
switch (g) {
|
|
@@ -2495,17 +2493,17 @@ function un(n, t, e, r, o, i) {
|
|
|
2495
2493
|
const m = se(i, d);
|
|
2496
2494
|
if (s === "auto" && (s = m), se(s, d) !== s) throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${d}`);
|
|
2497
2495
|
const f = { hour: 24, minute: 60, second: 60, millisecond: 1e3, microsecond: 1e3, nanosecond: 1e3 }[d];
|
|
2498
|
-
return f !== void 0 &&
|
|
2496
|
+
return f !== void 0 && an(c, f, !1), { largestUnit: s, roundingIncrement: c, roundingMode: u, smallestUnit: d };
|
|
2499
2497
|
}
|
|
2500
2498
|
function Po(n, t, e, r) {
|
|
2501
|
-
const o = pn(e), i =
|
|
2499
|
+
const o = pn(e), i = cn(n, M(r), "time", [], "nanosecond", "second");
|
|
2502
2500
|
let a = Pt(so(h(t, T), h(o, T), i.roundingIncrement, i.smallestUnit, i.roundingMode), i.largestUnit);
|
|
2503
2501
|
return n === "since" && (a = Rt(a)), a;
|
|
2504
2502
|
}
|
|
2505
2503
|
function Ao(n, t, e, r) {
|
|
2506
2504
|
const o = gn(e), i = h(t, D), a = h(o, D);
|
|
2507
2505
|
if (!Qt(i, a)) throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);
|
|
2508
|
-
const s =
|
|
2506
|
+
const s = cn(n, M(r), "date", [], "day", "day"), c = et("%Temporal.Duration%"), u = h(t, C), d = h(o, C);
|
|
2509
2507
|
if (Jt(u, d) === 0) return new c();
|
|
2510
2508
|
let m = { date: Wn(i, u, d, s.largestUnit), time: N.ZERO };
|
|
2511
2509
|
if (s.smallestUnit !== "day" || s.roundingIncrement !== 1) {
|
|
@@ -2518,13 +2516,13 @@ function Ao(n, t, e, r) {
|
|
|
2518
2516
|
function Uo(n, t, e, r) {
|
|
2519
2517
|
const o = yn(e), i = h(t, D), a = h(o, D);
|
|
2520
2518
|
if (!Qt(i, a)) throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);
|
|
2521
|
-
const s =
|
|
2522
|
-
if (
|
|
2523
|
-
let m = Pt(
|
|
2519
|
+
const s = cn(n, M(r), "datetime", [], "nanosecond", "day"), c = et("%Temporal.Duration%"), u = h(t, A), d = h(o, A);
|
|
2520
|
+
if (tn(u, d) === 0) return new c();
|
|
2521
|
+
let m = Pt(Zi(u, d, i, s.largestUnit, s.roundingIncrement, s.smallestUnit, s.roundingMode), s.largestUnit);
|
|
2524
2522
|
return n === "since" && (m = Rt(m)), m;
|
|
2525
2523
|
}
|
|
2526
2524
|
function zo(n, t, e, r) {
|
|
2527
|
-
const o = pe(e), i =
|
|
2525
|
+
const o = pe(e), i = cn(n, M(r), "time", [], "nanosecond", "hour");
|
|
2528
2526
|
let a = ao(h(t, Z), h(o, Z));
|
|
2529
2527
|
a = lr(a, i.roundingIncrement, i.smallestUnit, i.roundingMode);
|
|
2530
2528
|
let s = Pt(ce({ years: 0, months: 0, weeks: 0, days: 0 }, a), i.largestUnit);
|
|
@@ -2533,7 +2531,7 @@ function zo(n, t, e, r) {
|
|
|
2533
2531
|
function Fo(n, t, e, r) {
|
|
2534
2532
|
const o = wn(e), i = h(t, D), a = h(o, D);
|
|
2535
2533
|
if (!Qt(i, a)) throw new RangeError(`cannot compute difference between months of ${i} and ${a} calendars`);
|
|
2536
|
-
const s =
|
|
2534
|
+
const s = cn(n, M(r), "date", ["week", "day"], "month", "year"), c = et("%Temporal.Duration%");
|
|
2537
2535
|
if (Jt(h(t, C), h(o, C)) == 0) return new c();
|
|
2538
2536
|
const u = vt(i, h(t, C), "year-month");
|
|
2539
2537
|
u.day = 1;
|
|
@@ -2551,18 +2549,18 @@ function Fo(n, t, e, r) {
|
|
|
2551
2549
|
function Zo(n, t, e, r) {
|
|
2552
2550
|
const o = bn(e), i = h(t, D), a = h(o, D);
|
|
2553
2551
|
if (!Qt(i, a)) throw new RangeError(`cannot compute difference between dates of ${i} and ${a} calendars`);
|
|
2554
|
-
const s =
|
|
2552
|
+
const s = cn(n, M(r), "datetime", [], "nanosecond", "hour"), c = h(t, T), u = h(o, T), d = et("%Temporal.Duration%");
|
|
2555
2553
|
let m;
|
|
2556
2554
|
if (oe(s.largestUnit) !== "date") m = Pt(so(c, u, s.roundingIncrement, s.smallestUnit, s.roundingMode), s.largestUnit);
|
|
2557
2555
|
else {
|
|
2558
2556
|
const f = h(t, j);
|
|
2559
|
-
if (!
|
|
2557
|
+
if (!ki(f, h(o, j))) throw new RangeError("When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.");
|
|
2560
2558
|
if (l.equal(c, u)) return new d();
|
|
2561
|
-
m = Pt(
|
|
2559
|
+
m = Pt(qi(c, u, f, i, s.largestUnit, s.roundingIncrement, s.smallestUnit, s.roundingMode), "hour");
|
|
2562
2560
|
}
|
|
2563
2561
|
return n === "since" && (m = Rt(m)), m;
|
|
2564
2562
|
}
|
|
2565
|
-
function
|
|
2563
|
+
function Je({ hour: n, minute: t, second: e, millisecond: r, microsecond: o, nanosecond: i }, a) {
|
|
2566
2564
|
let s = e, c = i;
|
|
2567
2565
|
return s += a.sec, c += a.subsec, ye(n, t, s, r, o, c);
|
|
2568
2566
|
}
|
|
@@ -2595,19 +2593,19 @@ function Wo(n, t, e, r) {
|
|
|
2595
2593
|
const o = h(t, D);
|
|
2596
2594
|
let i = Ut(e);
|
|
2597
2595
|
n === "subtract" && (i = Rt(i));
|
|
2598
|
-
const a =
|
|
2596
|
+
const a = Ai(i), s = L(M(r));
|
|
2599
2597
|
return wt(Lt(o, h(t, C), a, s), o);
|
|
2600
2598
|
}
|
|
2601
2599
|
function Go(n, t, e, r) {
|
|
2602
2600
|
let o = Ut(e);
|
|
2603
2601
|
n === "subtract" && (o = Rt(o));
|
|
2604
|
-
const i = L(M(r)), a = h(t, D), s = Xt(o), c = h(t, A), u =
|
|
2602
|
+
const i = L(M(r)), a = h(t, D), s = Xt(o), c = h(t, A), u = Je(c.time, s.time), d = rt(s.date, u.deltaDays);
|
|
2605
2603
|
return Er(d.years, d.months, d.weeks, d.days, 0, 0, 0, 0, 0, 0), It(x(Lt(a, c.isoDate, d, i), u), a);
|
|
2606
2604
|
}
|
|
2607
2605
|
function Vo(n, t, e) {
|
|
2608
2606
|
let r = Ut(e);
|
|
2609
2607
|
n === "subtract" && (r = Rt(r));
|
|
2610
|
-
const o = Xt(r), { hour: i, minute: a, second: s, millisecond: c, microsecond: u, nanosecond: d } =
|
|
2608
|
+
const o = Xt(r), { hour: i, minute: a, second: s, millisecond: c, microsecond: u, nanosecond: d } = Je(h(t, Z), o.time);
|
|
2611
2609
|
return ie(br(i, a, s, c, u, d, "reject"));
|
|
2612
2610
|
}
|
|
2613
2611
|
function Xo(n, t, e, r) {
|
|
@@ -2620,13 +2618,13 @@ function Xo(n, t, e, r) {
|
|
|
2620
2618
|
const m = Lt(s, u, { months: 1 }, "constrain");
|
|
2621
2619
|
u = $t(m.year, m.month, m.day - 1);
|
|
2622
2620
|
}
|
|
2623
|
-
const d =
|
|
2624
|
-
return
|
|
2621
|
+
const d = Ai(o);
|
|
2622
|
+
return Ie(u), Ve(kn(s, vt(s, Lt(s, u, d, i), "year-month"), i), s);
|
|
2625
2623
|
}
|
|
2626
2624
|
function So(n, t, e, r) {
|
|
2627
2625
|
let o = Ut(e);
|
|
2628
2626
|
n === "subtract" && (o = Rt(o));
|
|
2629
|
-
const i = L(M(r)), a = h(t, j), s = h(t, D), c =
|
|
2627
|
+
const i = L(M(r)), a = h(t, j), s = h(t, D), c = He(o);
|
|
2630
2628
|
return nt(vn(h(t, T), a, s, c, i), a, s);
|
|
2631
2629
|
}
|
|
2632
2630
|
function we(n, t, e) {
|
|
@@ -2634,12 +2632,12 @@ function we(n, t, e) {
|
|
|
2634
2632
|
return t * (i === "positive" ? m : -m);
|
|
2635
2633
|
}
|
|
2636
2634
|
function Vr(n, t, e, r) {
|
|
2637
|
-
const o =
|
|
2635
|
+
const o = Be[e] * t;
|
|
2638
2636
|
return function(i, a, s) {
|
|
2639
2637
|
const c = ne(i), u = ne(a), d = l.divide(c, u), m = l.remainder(c, u), f = fr(s, "positive");
|
|
2640
2638
|
let g, y;
|
|
2641
2639
|
l.lessThan(c, Nt) ? (g = l.subtract(d, On), y = d) : (g = d, y = l.add(d, On));
|
|
2642
|
-
const p = er(
|
|
2640
|
+
const p = er(Te(l.multiply(m, Br)), u) * (l.lessThan(c, Nt) ? -1 : 1) + 0, w = l.equal(m, Nt) ? d : gr(g, y, p, Jo(g), f);
|
|
2643
2641
|
return l.multiply(w, u);
|
|
2644
2642
|
}(n, l.BigInt(o), r);
|
|
2645
2643
|
}
|
|
@@ -2670,7 +2668,7 @@ function Sr({ hour: n, minute: t, second: e, millisecond: r, microsecond: o, nan
|
|
|
2670
2668
|
case "nanosecond":
|
|
2671
2669
|
u = i;
|
|
2672
2670
|
}
|
|
2673
|
-
const d =
|
|
2671
|
+
const d = Be[s], m = we(u, d * a, c) / d;
|
|
2674
2672
|
switch (s) {
|
|
2675
2673
|
case "day":
|
|
2676
2674
|
return { deltaDays: m, hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 };
|
|
@@ -2691,11 +2689,11 @@ function Sr({ hour: n, minute: t, second: e, millisecond: r, microsecond: o, nan
|
|
|
2691
2689
|
}
|
|
2692
2690
|
}
|
|
2693
2691
|
function lr(n, t, e, r) {
|
|
2694
|
-
const o =
|
|
2692
|
+
const o = Be[e];
|
|
2695
2693
|
return n.round(l.BigInt(o * t), r);
|
|
2696
2694
|
}
|
|
2697
2695
|
function Cn(n, t) {
|
|
2698
|
-
const e =
|
|
2696
|
+
const e = Be[t];
|
|
2699
2697
|
return n.fdiv(l.BigInt(e));
|
|
2700
2698
|
}
|
|
2701
2699
|
function Jt(n, t) {
|
|
@@ -2704,11 +2702,11 @@ function Jt(n, t) {
|
|
|
2704
2702
|
function Kr(n, t) {
|
|
2705
2703
|
return n.hour !== t.hour ? Ct(n.hour - t.hour) : n.minute !== t.minute ? Ct(n.minute - t.minute) : n.second !== t.second ? Ct(n.second - t.second) : n.millisecond !== t.millisecond ? Ct(n.millisecond - t.millisecond) : n.microsecond !== t.microsecond ? Ct(n.microsecond - t.microsecond) : n.nanosecond !== t.nanosecond ? Ct(n.nanosecond - t.nanosecond) : 0;
|
|
2706
2704
|
}
|
|
2707
|
-
function
|
|
2705
|
+
function tn(n, t) {
|
|
2708
2706
|
const e = Jt(n.isoDate, t.isoDate);
|
|
2709
2707
|
return e !== 0 ? e : Kr(n.time, t.time);
|
|
2710
2708
|
}
|
|
2711
|
-
function
|
|
2709
|
+
function Hi(n) {
|
|
2712
2710
|
const t = hr(n);
|
|
2713
2711
|
return globalThis.BigInt !== void 0 ? globalThis.BigInt(t.toString(10)) : t;
|
|
2714
2712
|
}
|
|
@@ -2734,7 +2732,7 @@ const Qr = (() => {
|
|
|
2734
2732
|
let n = l.BigInt(Date.now() % 1e6);
|
|
2735
2733
|
return () => {
|
|
2736
2734
|
const t = Date.now(), e = l.BigInt(t), r = l.add(St(t), n);
|
|
2737
|
-
return n = l.remainder(e, Pn), l.greaterThan(r,
|
|
2735
|
+
return n = l.remainder(e, Pn), l.greaterThan(r, Ke) ? Ke : l.lessThan(r, $n) ? $n : r;
|
|
2738
2736
|
};
|
|
2739
2737
|
})();
|
|
2740
2738
|
function hn() {
|
|
@@ -2748,7 +2746,7 @@ function M(n) {
|
|
|
2748
2746
|
if (q(n) && n !== null) return n;
|
|
2749
2747
|
throw new TypeError("Options parameter must be an object, not " + (n === null ? "null" : typeof n));
|
|
2750
2748
|
}
|
|
2751
|
-
function
|
|
2749
|
+
function Le(n, t) {
|
|
2752
2750
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2753
2751
|
return e[n] = t, e;
|
|
2754
2752
|
}
|
|
@@ -2763,7 +2761,7 @@ function ue(n, t, e, r) {
|
|
|
2763
2761
|
}
|
|
2764
2762
|
function _t(n) {
|
|
2765
2763
|
const t = xn(n);
|
|
2766
|
-
if (!
|
|
2764
|
+
if (!Da.includes(xn(t))) throw new RangeError(`invalid calendar identifier ${t}`);
|
|
2767
2765
|
switch (t) {
|
|
2768
2766
|
case "ethiopic-amete-alem":
|
|
2769
2767
|
return "ethioaa";
|
|
@@ -2783,8 +2781,8 @@ function xn(n) {
|
|
|
2783
2781
|
function Me(n) {
|
|
2784
2782
|
throw new TypeError(`Do not use built-in arithmetic operators with Temporal objects. When comparing, use ${n === "PlainMonthDay" ? "Temporal.PlainDate.compare(obj1.toPlainDate(year), obj2.toPlainDate(year))" : `Temporal.${n}.compare(obj1, obj2)`}, not obj1 > obj2. When coercing to strings, use \`\${obj}\` or String(obj), not '' + obj. When coercing to numbers, use properties or methods of the object, not \`+obj\`. When concatenating with strings, use \`\${str}\${obj}\` or str.concat(obj), not str + obj. In React, coerce to a string before rendering a Temporal object.`);
|
|
2785
2783
|
}
|
|
2786
|
-
const
|
|
2787
|
-
function
|
|
2784
|
+
const $a = new RegExp(`^${mi.source}$`), Ra = new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);
|
|
2785
|
+
function Wi(n, t, e, r = n(t), o = n(e)) {
|
|
2788
2786
|
let i = t, a = e, s = r, c = o;
|
|
2789
2787
|
for (; a - i > 1; ) {
|
|
2790
2788
|
let u = Math.trunc((i + a) / 2);
|
|
@@ -2793,10 +2791,10 @@ function Vi(n, t, e, r = n(t), o = n(e)) {
|
|
|
2793
2791
|
}
|
|
2794
2792
|
return a;
|
|
2795
2793
|
}
|
|
2796
|
-
function
|
|
2794
|
+
function Gi(n) {
|
|
2797
2795
|
return [...n];
|
|
2798
2796
|
}
|
|
2799
|
-
function
|
|
2797
|
+
function Vi(n, t) {
|
|
2800
2798
|
if (n !== "gregory" && n !== "iso8601") return;
|
|
2801
2799
|
const e = Sn[n];
|
|
2802
2800
|
let r = t.year;
|
|
@@ -2823,7 +2821,7 @@ function Ko(n, t, e, r, o) {
|
|
|
2823
2821
|
return !1;
|
|
2824
2822
|
}
|
|
2825
2823
|
const Sn = {};
|
|
2826
|
-
function
|
|
2824
|
+
function xe(n) {
|
|
2827
2825
|
if (!n.startsWith("M")) throw new RangeError(`Invalid month code: ${n}. Month codes must start with M.`);
|
|
2828
2826
|
const t = +n.slice(1);
|
|
2829
2827
|
if (Number.isNaN(t)) throw new RangeError(`Invalid month code: ${n}`);
|
|
@@ -2838,7 +2836,7 @@ function co(n, t = void 0, e = 12) {
|
|
|
2838
2836
|
if (r === void 0) throw new TypeError("Either month or monthCode are required");
|
|
2839
2837
|
t === "reject" && S(r, 1, e), t === "constrain" && (r = pt(r, 1, e)), o = Kt(r);
|
|
2840
2838
|
} else {
|
|
2841
|
-
const i =
|
|
2839
|
+
const i = xe(o);
|
|
2842
2840
|
if (o !== Kt(i)) throw new RangeError(`Invalid month code: ${o}`);
|
|
2843
2841
|
if (r !== void 0 && r !== i) throw new RangeError(`monthCode ${o} and month ${r} must match if both are present`);
|
|
2844
2842
|
if (r = i, r < 1 || r > e) throw new RangeError(`Invalid monthCode: ${o}`);
|
|
@@ -2858,10 +2856,10 @@ Sn.iso8601 = { resolveFields(n, t) {
|
|
|
2858
2856
|
const r = n[e];
|
|
2859
2857
|
t.add(r), r === "month" ? t.add("monthCode") : r === "monthCode" && t.add("month");
|
|
2860
2858
|
}
|
|
2861
|
-
return
|
|
2859
|
+
return Gi(t);
|
|
2862
2860
|
}, dateAdd(n, { years: t = 0, months: e = 0, weeks: r = 0, days: o = 0 }, i) {
|
|
2863
2861
|
let { year: a, month: s, day: c } = n;
|
|
2864
|
-
return a += t, s += e, { year: a, month: s } =
|
|
2862
|
+
return a += t, s += e, { year: a, month: s } = Ce(a, s), { year: a, month: s, day: c } = Mn(a, s, c, i), c += o + 7 * r, $t(a, s, c);
|
|
2865
2863
|
}, dateUntil(n, t, e) {
|
|
2866
2864
|
const r = -Jt(n, t);
|
|
2867
2865
|
if (r === 0) return { years: 0, months: 0, weeks: 0, days: 0 };
|
|
@@ -2870,12 +2868,12 @@ Sn.iso8601 = { resolveFields(n, t) {
|
|
|
2870
2868
|
let d = t.year - n.year;
|
|
2871
2869
|
for (d !== 0 && (d -= r); !Ko(r, n.year + d, n.month, n.day, t); ) i = d, d += r;
|
|
2872
2870
|
let m = r;
|
|
2873
|
-
for (o =
|
|
2871
|
+
for (o = Ce(n.year + i, n.month + m); !Ko(r, o.year, o.month, n.day, t); ) a = m, m += r, o = Ce(o.year, o.month + r);
|
|
2874
2872
|
e === "month" && (a += 12 * i, i = 0);
|
|
2875
2873
|
}
|
|
2876
|
-
o =
|
|
2877
|
-
const s =
|
|
2878
|
-
let c = 0, u =
|
|
2874
|
+
o = Ce(n.year + i, n.month + a);
|
|
2875
|
+
const s = Pi(o.year, o.month, n.day);
|
|
2876
|
+
let c = 0, u = Ne(t.year, t.month - 1, t.day) - Ne(s.year, s.month - 1, s.day);
|
|
2879
2877
|
return e === "week" && (c = Math.trunc(u / 7), u %= 7), { years: i, months: a, weeks: c, days: u };
|
|
2880
2878
|
}, isoToDate({ year: n, month: t, day: e }, r) {
|
|
2881
2879
|
const o = { era: void 0, eraYear: void 0, year: n, month: t, day: e, daysInWeek: 7, monthsInYear: 12 };
|
|
@@ -2885,10 +2883,10 @@ Sn.iso8601 = { resolveFields(n, t) {
|
|
|
2885
2883
|
}
|
|
2886
2884
|
if (r.dayOfYear) {
|
|
2887
2885
|
let i = e;
|
|
2888
|
-
for (let a = t - 1; a > 0; a--) i +=
|
|
2886
|
+
for (let a = t - 1; a > 0; a--) i += $e(n, a);
|
|
2889
2887
|
o.dayOfYear = i;
|
|
2890
2888
|
}
|
|
2891
|
-
return r.weekOfYear && (o.weekOfYear =
|
|
2889
|
+
return r.weekOfYear && (o.weekOfYear = Vi("iso8601", { year: n, month: t, day: e })), r.daysInMonth && (o.daysInMonth = $e(n, t)), (r.daysInYear || r.inLeapYear) && (o.inLeapYear = cr(n), o.daysInYear = o.inLeapYear ? 366 : 365), o;
|
|
2892
2890
|
}, getFirstDayOfWeek: () => 1, getMinimalDaysInFirstWeek: () => 4 };
|
|
2893
2891
|
class X {
|
|
2894
2892
|
constructor(t) {
|
|
@@ -2918,14 +2916,14 @@ class X {
|
|
|
2918
2916
|
return e || (e = new X(), X.objectMap.set(t, e)), e;
|
|
2919
2917
|
}
|
|
2920
2918
|
}
|
|
2921
|
-
function
|
|
2919
|
+
function Xi({ isoYear: n, isoMonth: t, isoDay: e }) {
|
|
2922
2920
|
return `${Xn(n)}-${xt(t)}-${xt(e)}T00:00Z`;
|
|
2923
2921
|
}
|
|
2924
2922
|
function kr(n, t) {
|
|
2925
2923
|
return { years: n.year - t.year, months: n.month - t.month, days: n.day - t.day };
|
|
2926
2924
|
}
|
|
2927
2925
|
X.objectMap = /* @__PURE__ */ new WeakMap(), X.MAX_CACHE_ENTRIES = 1e3;
|
|
2928
|
-
class
|
|
2926
|
+
class Pe {
|
|
2929
2927
|
constructor() {
|
|
2930
2928
|
this.eras = [], this.hasEra = !1, this.erasBeginMidYear = !1;
|
|
2931
2929
|
}
|
|
@@ -2947,7 +2945,7 @@ class Ae {
|
|
|
2947
2945
|
isoToCalendarDate(t, e) {
|
|
2948
2946
|
const { year: r, month: o, day: i } = t, a = JSON.stringify({ func: "isoToCalendarDate", isoYear: r, isoMonth: o, isoDay: i, id: this.id }), s = e.get(a);
|
|
2949
2947
|
if (s) return s;
|
|
2950
|
-
const c =
|
|
2948
|
+
const c = Xi({ isoYear: r, isoMonth: o, isoDay: i }), u = this.getCalendarParts(c), d = {};
|
|
2951
2949
|
for (let f = 0; f < u.length; f++) {
|
|
2952
2950
|
const { type: g, value: y } = u[f];
|
|
2953
2951
|
if (g !== "year" && g !== "relatedYear" || (this.hasEra ? d.eraYear = +y : d.year = +y), g === "month") {
|
|
@@ -3132,7 +3130,7 @@ class Ae {
|
|
|
3132
3130
|
}
|
|
3133
3131
|
calendarDaysUntil(t, e, r) {
|
|
3134
3132
|
const o = this.calendarToIsoDate(t, "constrain", r), i = this.calendarToIsoDate(e, "constrain", r);
|
|
3135
|
-
return
|
|
3133
|
+
return Ne(i.year, i.month - 1, i.day) - Ne(o.year, o.month - 1, o.day);
|
|
3136
3134
|
}
|
|
3137
3135
|
monthDaySearchStartYear(t, e) {
|
|
3138
3136
|
return 1972;
|
|
@@ -3159,7 +3157,7 @@ class Ae {
|
|
|
3159
3157
|
getMinimalDaysInFirstWeek() {
|
|
3160
3158
|
}
|
|
3161
3159
|
}
|
|
3162
|
-
class
|
|
3160
|
+
class ka extends Pe {
|
|
3163
3161
|
constructor() {
|
|
3164
3162
|
super(...arguments), this.id = "hebrew", this.calendarType = "lunisolar", this.months = { Tishri: { leap: 1, regular: 1, monthCode: "M01", days: 30 }, Heshvan: { leap: 2, regular: 2, monthCode: "M02", days: { min: 29, max: 30 } }, Kislev: { leap: 3, regular: 3, monthCode: "M03", days: { min: 29, max: 30 } }, Tevet: { leap: 4, regular: 4, monthCode: "M04", days: 29 }, Shevat: { leap: 5, regular: 5, monthCode: "M05", days: 30 }, Adar: { leap: void 0, regular: 6, monthCode: "M06", days: 29 }, "Adar I": { leap: 6, regular: void 0, monthCode: "M05L", days: 30 }, "Adar II": { leap: 7, regular: void 0, monthCode: "M06", days: 29 }, Nisan: { leap: 8, regular: 7, monthCode: "M07", days: 30 }, Iyar: { leap: 9, regular: 8, monthCode: "M08", days: 29 }, Sivan: { leap: 10, regular: 9, monthCode: "M09", days: 30 }, Tamuz: { leap: 11, regular: 10, monthCode: "M10", days: 29 }, Av: { leap: 12, regular: 11, monthCode: "M11", days: 30 }, Elul: { leap: 13, regular: 12, monthCode: "M12", days: 29 } };
|
|
3165
3163
|
}
|
|
@@ -3210,7 +3208,7 @@ class Na extends Ae {
|
|
|
3210
3208
|
a = 6, s = "M06";
|
|
3211
3209
|
}
|
|
3212
3210
|
} else {
|
|
3213
|
-
a =
|
|
3211
|
+
a = xe(s), this.inLeapYear({ year: i }) && a >= 6 && a++;
|
|
3214
3212
|
const d = this.monthsInYear({ year: i });
|
|
3215
3213
|
if (a < 1 || a > d) throw new RangeError(`Invalid monthCode: ${s}`);
|
|
3216
3214
|
}
|
|
@@ -3219,7 +3217,7 @@ class Na extends Ae {
|
|
|
3219
3217
|
return { ...t, day: c, month: a, monthCode: s, year: i };
|
|
3220
3218
|
}
|
|
3221
3219
|
}
|
|
3222
|
-
class
|
|
3220
|
+
class un extends Pe {
|
|
3223
3221
|
constructor() {
|
|
3224
3222
|
super(...arguments), this.calendarType = "lunar", this.DAYS_PER_ISLAMIC_YEAR = 354 + 11 / 30, this.DAYS_PER_ISO_YEAR = 365.2425;
|
|
3225
3223
|
}
|
|
@@ -3244,37 +3242,37 @@ class ln extends Ae {
|
|
|
3244
3242
|
return { year: Math.floor(e * this.DAYS_PER_ISLAMIC_YEAR / this.DAYS_PER_ISO_YEAR) + 622, month: 1, day: 1 };
|
|
3245
3243
|
}
|
|
3246
3244
|
}
|
|
3247
|
-
class
|
|
3245
|
+
class Ya extends un {
|
|
3248
3246
|
constructor() {
|
|
3249
3247
|
super(...arguments), this.id = "islamic";
|
|
3250
3248
|
}
|
|
3251
3249
|
}
|
|
3252
|
-
class
|
|
3250
|
+
class Na extends un {
|
|
3253
3251
|
constructor() {
|
|
3254
3252
|
super(...arguments), this.id = "islamic-umalqura";
|
|
3255
3253
|
}
|
|
3256
3254
|
}
|
|
3257
|
-
class
|
|
3255
|
+
class La extends un {
|
|
3258
3256
|
constructor() {
|
|
3259
3257
|
super(...arguments), this.id = "islamic-tbla";
|
|
3260
3258
|
}
|
|
3261
3259
|
}
|
|
3262
|
-
class
|
|
3260
|
+
class xa extends un {
|
|
3263
3261
|
constructor() {
|
|
3264
3262
|
super(...arguments), this.id = "islamic-civil";
|
|
3265
3263
|
}
|
|
3266
3264
|
}
|
|
3267
|
-
class
|
|
3265
|
+
class ja extends un {
|
|
3268
3266
|
constructor() {
|
|
3269
3267
|
super(...arguments), this.id = "islamic-rgsa";
|
|
3270
3268
|
}
|
|
3271
3269
|
}
|
|
3272
|
-
class
|
|
3270
|
+
class Ia extends un {
|
|
3273
3271
|
constructor() {
|
|
3274
3272
|
super(...arguments), this.id = "islamicc";
|
|
3275
3273
|
}
|
|
3276
3274
|
}
|
|
3277
|
-
class
|
|
3275
|
+
class Pa extends Pe {
|
|
3278
3276
|
constructor() {
|
|
3279
3277
|
super(...arguments), this.id = "persian", this.calendarType = "solar";
|
|
3280
3278
|
}
|
|
@@ -3293,14 +3291,14 @@ class Ua extends Ae {
|
|
|
3293
3291
|
return e === 12 ? 30 : e <= 6 ? 31 : 30;
|
|
3294
3292
|
}
|
|
3295
3293
|
maxLengthOfMonthCodeInAnyYear(t) {
|
|
3296
|
-
return
|
|
3294
|
+
return xe(t) <= 6 ? 31 : 30;
|
|
3297
3295
|
}
|
|
3298
3296
|
estimateIsoDate(t) {
|
|
3299
3297
|
const { year: e } = this.adjustCalendarDate(t);
|
|
3300
3298
|
return { year: e + 621, month: 1, day: 1 };
|
|
3301
3299
|
}
|
|
3302
3300
|
}
|
|
3303
|
-
class
|
|
3301
|
+
class Aa extends Pe {
|
|
3304
3302
|
constructor() {
|
|
3305
3303
|
super(...arguments), this.id = "indian", this.calendarType = "solar", this.months = { 1: { length: 30, month: 3, day: 22, leap: { length: 31, month: 3, day: 21 } }, 2: { length: 31, month: 4, day: 21 }, 3: { length: 31, month: 5, day: 22 }, 4: { length: 31, month: 6, day: 22 }, 5: { length: 31, month: 7, day: 23 }, 6: { length: 31, month: 8, day: 23 }, 7: { length: 30, month: 9, day: 23 }, 8: { length: 30, month: 10, day: 23 }, 9: { length: 30, month: 11, day: 22 }, 10: { length: 30, month: 12, day: 22 }, 11: { length: 30, month: 1, nextYear: !0, day: 21 }, 12: { length: 30, month: 2, nextYear: !0, day: 20 } }, this.vulnerableToBceBug = (/* @__PURE__ */ new Date("0000-01-01T00:00Z")).toLocaleDateString("en-US-u-ca-indian", { timeZone: "UTC" }) !== "10/11/-79 Saka";
|
|
3306
3304
|
}
|
|
@@ -3317,7 +3315,7 @@ class za extends Ae {
|
|
|
3317
3315
|
return this.getMonthInfo(t).length;
|
|
3318
3316
|
}
|
|
3319
3317
|
maxLengthOfMonthCodeInAnyYear(t) {
|
|
3320
|
-
const e =
|
|
3318
|
+
const e = xe(t);
|
|
3321
3319
|
let r = this.months[e];
|
|
3322
3320
|
return r = r.leap ?? r, r.length;
|
|
3323
3321
|
}
|
|
@@ -3338,7 +3336,7 @@ class za extends Ae {
|
|
|
3338
3336
|
function uo(n) {
|
|
3339
3337
|
return n % 4 == 0 && (n % 100 != 0 || n % 400 == 0);
|
|
3340
3338
|
}
|
|
3341
|
-
class
|
|
3339
|
+
class Si extends Pe {
|
|
3342
3340
|
constructor(t, e) {
|
|
3343
3341
|
super(), this.calendarType = "solar", this.id = t, this.isoEpoch = e;
|
|
3344
3342
|
}
|
|
@@ -3357,14 +3355,14 @@ class Qi extends Ae {
|
|
|
3357
3355
|
return this.minimumMonthLength(t);
|
|
3358
3356
|
}
|
|
3359
3357
|
maxLengthOfMonthCodeInAnyYear(t) {
|
|
3360
|
-
return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][
|
|
3358
|
+
return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][xe(t) - 1];
|
|
3361
3359
|
}
|
|
3362
3360
|
estimateIsoDate(t) {
|
|
3363
3361
|
const e = this.adjustCalendarDate(t);
|
|
3364
3362
|
return Mn(e.year + this.isoEpoch.year, e.month + this.isoEpoch.month, e.day + this.isoEpoch.day, "constrain");
|
|
3365
3363
|
}
|
|
3366
3364
|
}
|
|
3367
|
-
class
|
|
3365
|
+
class Ki extends Pe {
|
|
3368
3366
|
constructor(t, e) {
|
|
3369
3367
|
super(), this.hasEra = !0, this.calendarType = "solar", this.id = t;
|
|
3370
3368
|
const { eras: r, anchorEra: o } = function(i) {
|
|
@@ -3415,13 +3413,13 @@ class Bi extends Ae {
|
|
|
3415
3413
|
return this.minimumMonthLength(t);
|
|
3416
3414
|
}
|
|
3417
3415
|
maxLengthOfMonthCodeInAnyYear(t) {
|
|
3418
|
-
return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][
|
|
3416
|
+
return [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][xe(t) - 1];
|
|
3419
3417
|
}
|
|
3420
3418
|
completeEraYear(t) {
|
|
3421
3419
|
const e = (s, c, u) => {
|
|
3422
3420
|
const d = t[s];
|
|
3423
3421
|
if (d != null && d != c && !(u || []).includes(d)) {
|
|
3424
|
-
const m = u
|
|
3422
|
+
const m = u?.[0];
|
|
3425
3423
|
throw new RangeError(`Input ${s} ${d} doesn't match calculated value ${m ? `${c} (also called ${m})` : c}`);
|
|
3426
3424
|
}
|
|
3427
3425
|
}, r = (s) => {
|
|
@@ -3442,7 +3440,7 @@ class Bi extends Ae {
|
|
|
3442
3440
|
let { year: o, eraYear: i, era: a } = t;
|
|
3443
3441
|
if (o != null) {
|
|
3444
3442
|
const s = r(o);
|
|
3445
|
-
({ eraYear: i, era: a } = s), e("era", a, s
|
|
3443
|
+
({ eraYear: i, era: a } = s), e("era", a, s?.eraNames), e("eraYear", i);
|
|
3446
3444
|
} else {
|
|
3447
3445
|
if (i == null) throw new RangeError("Either year or eraYear and era are required");
|
|
3448
3446
|
{
|
|
@@ -3457,14 +3455,14 @@ class Bi extends Ae {
|
|
|
3457
3455
|
adjustCalendarDate(t, e, r = "constrain") {
|
|
3458
3456
|
let o = t;
|
|
3459
3457
|
const { month: i, monthCode: a } = o;
|
|
3460
|
-
return i === void 0 && (o = { ...o, month:
|
|
3458
|
+
return i === void 0 && (o = { ...o, month: xe(a) }), this.validateCalendarDate(o), o = this.completeEraYear(o), super.adjustCalendarDate(o, e, r);
|
|
3461
3459
|
}
|
|
3462
3460
|
estimateIsoDate(t) {
|
|
3463
3461
|
const e = this.adjustCalendarDate(t), { year: r, month: o, day: i } = e, { anchorEra: a } = this;
|
|
3464
3462
|
return Mn(r + a.isoEpoch.year - (a.hasYearZero ? 0 : 1), o, i, "constrain");
|
|
3465
3463
|
}
|
|
3466
3464
|
}
|
|
3467
|
-
class lo extends
|
|
3465
|
+
class lo extends Ki {
|
|
3468
3466
|
constructor(t, e) {
|
|
3469
3467
|
super(t, e);
|
|
3470
3468
|
}
|
|
@@ -3482,42 +3480,42 @@ const Gt = { inLeapYear(n) {
|
|
|
3482
3480
|
}, maximumMonthLength(n) {
|
|
3483
3481
|
return this.minimumMonthLength(n);
|
|
3484
3482
|
}, maxLengthOfMonthCodeInAnyYear: (n) => n === "M13" ? 6 : 30 };
|
|
3485
|
-
class
|
|
3483
|
+
class Ua extends Si {
|
|
3486
3484
|
constructor(t, e) {
|
|
3487
3485
|
super(t, e), this.inLeapYear = Gt.inLeapYear, this.monthsInYear = Gt.monthsInYear, this.minimumMonthLength = Gt.minimumMonthLength, this.maximumMonthLength = Gt.maximumMonthLength, this.maxLengthOfMonthCodeInAnyYear = Gt.maxLengthOfMonthCodeInAnyYear;
|
|
3488
3486
|
}
|
|
3489
3487
|
}
|
|
3490
|
-
class
|
|
3488
|
+
class Qi extends Ki {
|
|
3491
3489
|
constructor(t, e) {
|
|
3492
3490
|
super(t, e), this.inLeapYear = Gt.inLeapYear, this.monthsInYear = Gt.monthsInYear, this.minimumMonthLength = Gt.minimumMonthLength, this.maximumMonthLength = Gt.maximumMonthLength, this.maxLengthOfMonthCodeInAnyYear = Gt.maxLengthOfMonthCodeInAnyYear;
|
|
3493
3491
|
}
|
|
3494
3492
|
}
|
|
3495
|
-
class
|
|
3493
|
+
class za extends Ua {
|
|
3496
3494
|
constructor() {
|
|
3497
3495
|
super("ethioaa", { year: -5492, month: 7, day: 17 });
|
|
3498
3496
|
}
|
|
3499
3497
|
}
|
|
3500
|
-
class
|
|
3498
|
+
class Fa extends Qi {
|
|
3501
3499
|
constructor() {
|
|
3502
3500
|
super("coptic", [{ code: "coptic", isoEpoch: { year: 284, month: 8, day: 29 } }, { code: "coptic-inverse", reverseOf: "coptic" }]);
|
|
3503
3501
|
}
|
|
3504
3502
|
}
|
|
3505
|
-
class
|
|
3503
|
+
class Za extends Qi {
|
|
3506
3504
|
constructor() {
|
|
3507
3505
|
super("ethiopic", [{ code: "ethioaa", names: ["ethiopic-amete-alem", "mundi"], isoEpoch: { year: -5492, month: 7, day: 17 } }, { code: "ethiopic", names: ["incar"], isoEpoch: { year: 8, month: 8, day: 27 }, anchorEpoch: { year: 5501 } }]);
|
|
3508
3506
|
}
|
|
3509
3507
|
}
|
|
3510
|
-
class
|
|
3508
|
+
class qa extends lo {
|
|
3511
3509
|
constructor() {
|
|
3512
3510
|
super("roc", [{ code: "roc", names: ["minguo"], isoEpoch: { year: 1912, month: 1, day: 1 } }, { code: "roc-inverse", names: ["before-roc"], reverseOf: "roc" }]);
|
|
3513
3511
|
}
|
|
3514
3512
|
}
|
|
3515
|
-
class
|
|
3513
|
+
class Ha extends Si {
|
|
3516
3514
|
constructor() {
|
|
3517
3515
|
super("buddhist", { year: -543, month: 1, day: 1 });
|
|
3518
3516
|
}
|
|
3519
3517
|
}
|
|
3520
|
-
class
|
|
3518
|
+
class Wa extends lo {
|
|
3521
3519
|
constructor() {
|
|
3522
3520
|
super("gregory", [{ code: "gregory", names: ["ad", "ce"], isoEpoch: { year: 1, month: 1, day: 1 } }, { code: "gregory-inverse", names: ["be", "bce"], reverseOf: "gregory" }]);
|
|
3523
3521
|
}
|
|
@@ -3532,7 +3530,7 @@ class Va extends lo {
|
|
|
3532
3530
|
return 1;
|
|
3533
3531
|
}
|
|
3534
3532
|
}
|
|
3535
|
-
class
|
|
3533
|
+
class Ga extends lo {
|
|
3536
3534
|
constructor() {
|
|
3537
3535
|
super("japanese", [{ code: "reiwa", isoEpoch: { year: 2019, month: 5, day: 1 }, anchorEpoch: { year: 2019, month: 5, day: 1 } }, { code: "heisei", isoEpoch: { year: 1989, month: 1, day: 8 }, anchorEpoch: { year: 1989, month: 1, day: 8 } }, { code: "showa", isoEpoch: { year: 1926, month: 12, day: 25 }, anchorEpoch: { year: 1926, month: 12, day: 25 } }, { code: "taisho", isoEpoch: { year: 1912, month: 7, day: 30 }, anchorEpoch: { year: 1912, month: 7, day: 30 } }, { code: "meiji", isoEpoch: { year: 1868, month: 9, day: 8 }, anchorEpoch: { year: 1868, month: 9, day: 8 } }, { code: "japanese", names: ["japanese", "gregory", "ad", "ce"], isoEpoch: { year: 1, month: 1, day: 1 } }, { code: "japanese-inverse", names: ["japanese-inverse", "gregory-inverse", "bc", "bce"], reverseOf: "japanese" }]), this.erasBeginMidYear = !0;
|
|
3538
3536
|
}
|
|
@@ -3541,7 +3539,7 @@ class Xa extends lo {
|
|
|
3541
3539
|
return this.eras.find((a) => a.code === r) ? { era: r, eraYear: o } : i < 1 ? { era: "japanese-inverse", eraYear: 1 - i } : { era: "japanese", eraYear: i };
|
|
3542
3540
|
}
|
|
3543
3541
|
}
|
|
3544
|
-
class
|
|
3542
|
+
class Bi extends Pe {
|
|
3545
3543
|
constructor() {
|
|
3546
3544
|
super(...arguments), this.calendarType = "lunisolar";
|
|
3547
3545
|
}
|
|
@@ -3570,7 +3568,7 @@ class ta extends Ae {
|
|
|
3570
3568
|
const r = JSON.stringify({ func: "getMonthList", calendarYear: t, id: this.id }), o = e.get(r);
|
|
3571
3569
|
if (o) return o;
|
|
3572
3570
|
const i = this.getFormatter(), a = (w, v) => {
|
|
3573
|
-
const _ =
|
|
3571
|
+
const _ = Xi({ isoYear: w, isoMonth: 2, isoDay: 1 }), E = new Date(_);
|
|
3574
3572
|
E.setUTCDate(v + 1);
|
|
3575
3573
|
const O = i.formatToParts(E), R = O.find((U) => U.type === "month").value, W = +O.find((U) => U.type === "day").value, K = O.find((U) => U.type === "relatedYear");
|
|
3576
3574
|
let G;
|
|
@@ -3626,17 +3624,17 @@ class ta extends Ae {
|
|
|
3626
3624
|
return { ...t, year: i, month: a, monthCode: u, day: c };
|
|
3627
3625
|
}
|
|
3628
3626
|
}
|
|
3629
|
-
class
|
|
3627
|
+
class Va extends Bi {
|
|
3630
3628
|
constructor() {
|
|
3631
3629
|
super(...arguments), this.id = "chinese";
|
|
3632
3630
|
}
|
|
3633
3631
|
}
|
|
3634
|
-
class
|
|
3632
|
+
class Xa extends Bi {
|
|
3635
3633
|
constructor() {
|
|
3636
3634
|
super(...arguments), this.id = "dangi";
|
|
3637
3635
|
}
|
|
3638
3636
|
}
|
|
3639
|
-
class
|
|
3637
|
+
class Sa {
|
|
3640
3638
|
constructor(t) {
|
|
3641
3639
|
this.helper = t;
|
|
3642
3640
|
}
|
|
@@ -3681,7 +3679,7 @@ class Qa {
|
|
|
3681
3679
|
this.helper.erasBeginMidYear && (e.add("era"), e.add("eraYear"));
|
|
3682
3680
|
}
|
|
3683
3681
|
}
|
|
3684
|
-
return
|
|
3682
|
+
return Gi(e);
|
|
3685
3683
|
}
|
|
3686
3684
|
dateAdd(t, { years: e, months: r, weeks: o, days: i }, a) {
|
|
3687
3685
|
const s = X.getCacheForObject(t), c = this.helper.isoToCalendarDate(t, s), u = this.helper.addCalendar(c, { years: e, months: r, weeks: o, days: i }, a, s), d = this.helper.calendarToIsoDate(u, "constrain", s);
|
|
@@ -3697,7 +3695,7 @@ class Qa {
|
|
|
3697
3695
|
const i = this.helper.startOfCalendarYear(o), a = this.helper.calendarDaysUntil(i, o, r);
|
|
3698
3696
|
o.dayOfYear = a + 1;
|
|
3699
3697
|
}
|
|
3700
|
-
if (e.weekOfYear && (o.weekOfYear =
|
|
3698
|
+
if (e.weekOfYear && (o.weekOfYear = Vi(this.helper.id, t)), o.daysInWeek = 7, e.daysInMonth && (o.daysInMonth = this.helper.daysInMonth(o, r)), e.daysInYear) {
|
|
3701
3699
|
const i = this.helper.startOfCalendarYear(o), a = this.helper.addCalendar(i, { years: 1 }, "constrain", r);
|
|
3702
3700
|
o.daysInYear = this.helper.calendarDaysUntil(i, a, r);
|
|
3703
3701
|
}
|
|
@@ -3710,17 +3708,17 @@ class Qa {
|
|
|
3710
3708
|
return this.helper.getMinimalDaysInFirstWeek();
|
|
3711
3709
|
}
|
|
3712
3710
|
}
|
|
3713
|
-
for (const n of [
|
|
3711
|
+
for (const n of [ka, Pa, Za, za, Fa, Va, Xa, qa, Aa, Ha, Wa, Ga, Ya, Na, La, xa, ja, Ia]) {
|
|
3714
3712
|
const t = new n();
|
|
3715
|
-
Sn[t.id] = new
|
|
3713
|
+
Sn[t.id] = new Sa(t);
|
|
3716
3714
|
}
|
|
3717
3715
|
Pr("calendarImpl", function(n) {
|
|
3718
3716
|
return Sn[n];
|
|
3719
3717
|
});
|
|
3720
3718
|
const jn = Intl.DateTimeFormat;
|
|
3721
|
-
function
|
|
3719
|
+
function ze(n, t) {
|
|
3722
3720
|
let e = h(n, t);
|
|
3723
|
-
return typeof e == "function" && (e = new jn(h(n,
|
|
3721
|
+
return typeof e == "function" && (e = new jn(h(n, ui), e(h(n, Lr))), function(r, o, i) {
|
|
3724
3722
|
const a = mr(r);
|
|
3725
3723
|
if (a === void 0) throw new TypeError("Missing slots for the given container");
|
|
3726
3724
|
if (a[o] === void 0) throw new TypeError(`tried to reset ${o} which was not set`);
|
|
@@ -3728,7 +3726,7 @@ function Fe(n, t) {
|
|
|
3728
3726
|
}(n, t, e)), e;
|
|
3729
3727
|
}
|
|
3730
3728
|
function dn(n) {
|
|
3731
|
-
return Dt(n,
|
|
3729
|
+
return Dt(n, je);
|
|
3732
3730
|
}
|
|
3733
3731
|
class In {
|
|
3734
3732
|
constructor(t = void 0, e = void 0) {
|
|
@@ -3754,7 +3752,7 @@ class In {
|
|
|
3754
3752
|
for (const f in m) Object.prototype.hasOwnProperty.call(s, f) || delete m[f];
|
|
3755
3753
|
m.hour12 = s.hour12, m.hourCycle = s.hourCycle, k(r, Lr, m);
|
|
3756
3754
|
} else k(r, Lr, s);
|
|
3757
|
-
k(r,
|
|
3755
|
+
k(r, ui, u.locale), k(r, je, c), k(r, qe, u.timeZone), k(r, fn, u.calendar), k(r, ri, os), k(r, oi, ns), k(r, ii, rs), k(r, ai, es), k(r, si, is), k(r, ci, as);
|
|
3758
3756
|
const d = a ? s.timeZone : void 0;
|
|
3759
3757
|
if (d === void 0) k(r, Nr, u.timeZone);
|
|
3760
3758
|
else {
|
|
@@ -3766,61 +3764,61 @@ class In {
|
|
|
3766
3764
|
}
|
|
3767
3765
|
get format() {
|
|
3768
3766
|
b(this, dn);
|
|
3769
|
-
const t =
|
|
3767
|
+
const t = Qa.bind(this);
|
|
3770
3768
|
return Object.defineProperties(t, { length: { value: 1, enumerable: !1, writable: !1, configurable: !0 }, name: { value: "", enumerable: !1, writable: !1, configurable: !0 } }), t;
|
|
3771
3769
|
}
|
|
3772
3770
|
formatRange(t, e) {
|
|
3773
|
-
return b(this, dn),
|
|
3771
|
+
return b(this, dn), Ja.call(this, t, e);
|
|
3774
3772
|
}
|
|
3775
3773
|
formatToParts(t, ...e) {
|
|
3776
|
-
return b(this, dn),
|
|
3774
|
+
return b(this, dn), Ba.call(this, t, ...e);
|
|
3777
3775
|
}
|
|
3778
3776
|
formatRangeToParts(t, e) {
|
|
3779
|
-
return b(this, dn),
|
|
3777
|
+
return b(this, dn), ts.call(this, t, e);
|
|
3780
3778
|
}
|
|
3781
3779
|
resolvedOptions() {
|
|
3782
|
-
return b(this, dn),
|
|
3780
|
+
return b(this, dn), Ka.call(this);
|
|
3783
3781
|
}
|
|
3784
3782
|
}
|
|
3785
3783
|
"formatToParts" in jn.prototype || delete In.prototype.formatToParts, "formatRangeToParts" in jn.prototype || delete In.prototype.formatRangeToParts;
|
|
3786
3784
|
const At = function(n = void 0, t = void 0) {
|
|
3787
3785
|
return new In(n, t);
|
|
3788
3786
|
};
|
|
3789
|
-
function
|
|
3790
|
-
const n = h(this,
|
|
3787
|
+
function Ka() {
|
|
3788
|
+
const n = h(this, je).resolvedOptions();
|
|
3791
3789
|
return n.timeZone = h(this, Nr), n;
|
|
3792
3790
|
}
|
|
3793
|
-
function
|
|
3794
|
-
let e, r, o =
|
|
3795
|
-
return o.formatter ? (e = o.formatter, r = [Ft(o.epochNs, "floor")]) : (e = h(this,
|
|
3791
|
+
function Qa(n, ...t) {
|
|
3792
|
+
let e, r, o = en(n, this);
|
|
3793
|
+
return o.formatter ? (e = o.formatter, r = [Ft(o.epochNs, "floor")]) : (e = h(this, je), r = [n, ...t]), e.format(...r);
|
|
3796
3794
|
}
|
|
3797
|
-
function
|
|
3798
|
-
let e, r, o =
|
|
3799
|
-
return o.formatter ? (e = o.formatter, r = [Ft(o.epochNs, "floor")]) : (e = h(this,
|
|
3795
|
+
function Ba(n, ...t) {
|
|
3796
|
+
let e, r, o = en(n, this);
|
|
3797
|
+
return o.formatter ? (e = o.formatter, r = [Ft(o.epochNs, "floor")]) : (e = h(this, je), r = [n, ...t]), e.formatToParts(...r);
|
|
3800
3798
|
}
|
|
3801
|
-
function
|
|
3799
|
+
function Ja(n, t) {
|
|
3802
3800
|
if (n === void 0 || t === void 0) throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");
|
|
3803
3801
|
const e = dr(n), r = dr(t);
|
|
3804
3802
|
let o, i = [e, r];
|
|
3805
3803
|
if (le(e) !== le(r)) throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");
|
|
3806
3804
|
if (le(e)) {
|
|
3807
|
-
if (!
|
|
3808
|
-
const { epochNs: a, formatter: s } =
|
|
3805
|
+
if (!Ji(e, r)) throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");
|
|
3806
|
+
const { epochNs: a, formatter: s } = en(e, this), { epochNs: c, formatter: u } = en(r, this);
|
|
3809
3807
|
s && (o = s, i = [Ft(a, "floor"), Ft(c, "floor")]);
|
|
3810
3808
|
}
|
|
3811
|
-
return o || (o = h(this,
|
|
3809
|
+
return o || (o = h(this, je)), o.formatRange(...i);
|
|
3812
3810
|
}
|
|
3813
|
-
function
|
|
3811
|
+
function ts(n, t) {
|
|
3814
3812
|
if (n === void 0 || t === void 0) throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");
|
|
3815
3813
|
const e = dr(n), r = dr(t);
|
|
3816
3814
|
let o, i = [e, r];
|
|
3817
3815
|
if (le(e) !== le(r)) throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");
|
|
3818
3816
|
if (le(e)) {
|
|
3819
|
-
if (!
|
|
3820
|
-
const { epochNs: a, formatter: s } =
|
|
3817
|
+
if (!Ji(e, r)) throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");
|
|
3818
|
+
const { epochNs: a, formatter: s } = en(e, this), { epochNs: c, formatter: u } = en(r, this);
|
|
3821
3819
|
s && (o = s, i = [Ft(a, "floor"), Ft(c, "floor")]);
|
|
3822
3820
|
}
|
|
3823
|
-
return o || (o = h(this,
|
|
3821
|
+
return o || (o = h(this, je)), o.formatRangeToParts(...i);
|
|
3824
3822
|
}
|
|
3825
3823
|
function Kn(n = {}, t = {}) {
|
|
3826
3824
|
const e = Object.assign({}, n), r = ["year", "month", "day", "hour", "minute", "second", "weekday", "dayPeriod", "timeZoneName", "dateStyle", "timeStyle"];
|
|
@@ -3830,7 +3828,7 @@ function Kn(n = {}, t = {}) {
|
|
|
3830
3828
|
}
|
|
3831
3829
|
return e;
|
|
3832
3830
|
}
|
|
3833
|
-
function
|
|
3831
|
+
function es(n) {
|
|
3834
3832
|
const t = Kn(n, { year: !1, month: !1, day: !1, weekday: !1, timeZoneName: !1, dateStyle: !1 });
|
|
3835
3833
|
if (t.timeStyle !== "long" && t.timeStyle !== "full" || (delete t.timeStyle, Object.assign(t, { hour: "numeric", minute: "2-digit", second: "2-digit" })), !Cr(t)) {
|
|
3836
3834
|
if (Qn(n)) throw new TypeError(`cannot format Temporal.PlainTime with options [${Object.keys(n)}]`);
|
|
@@ -3838,7 +3836,7 @@ function rs(n) {
|
|
|
3838
3836
|
}
|
|
3839
3837
|
return t;
|
|
3840
3838
|
}
|
|
3841
|
-
function
|
|
3839
|
+
function ns(n) {
|
|
3842
3840
|
const t = { short: { year: "2-digit", month: "numeric" }, medium: { year: "numeric", month: "short" }, long: { year: "numeric", month: "long" }, full: { year: "numeric", month: "long" } }, e = Kn(n, { day: !1, hour: !1, minute: !1, second: !1, weekday: !1, dayPeriod: !1, timeZoneName: !1, timeStyle: !1 });
|
|
3843
3841
|
if ("dateStyle" in e && e.dateStyle) {
|
|
3844
3842
|
const r = e.dateStyle;
|
|
@@ -3850,7 +3848,7 @@ function os(n) {
|
|
|
3850
3848
|
}
|
|
3851
3849
|
return e;
|
|
3852
3850
|
}
|
|
3853
|
-
function
|
|
3851
|
+
function rs(n) {
|
|
3854
3852
|
const t = { short: { month: "numeric", day: "numeric" }, medium: { month: "short", day: "numeric" }, long: { month: "long", day: "numeric" }, full: { month: "long", day: "numeric" } }, e = Kn(n, { year: !1, hour: !1, minute: !1, second: !1, weekday: !1, dayPeriod: !1, timeZoneName: !1, timeStyle: !1 });
|
|
3855
3853
|
if ("dateStyle" in e && e.dateStyle) {
|
|
3856
3854
|
const r = e.dateStyle;
|
|
@@ -3862,7 +3860,7 @@ function is(n) {
|
|
|
3862
3860
|
}
|
|
3863
3861
|
return e;
|
|
3864
3862
|
}
|
|
3865
|
-
function
|
|
3863
|
+
function os(n) {
|
|
3866
3864
|
const t = Kn(n, { hour: !1, minute: !1, second: !1, dayPeriod: !1, timeZoneName: !1, timeStyle: !1 });
|
|
3867
3865
|
if (!Tr(t)) {
|
|
3868
3866
|
if (Qn(n)) throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);
|
|
@@ -3870,7 +3868,7 @@ function as(n) {
|
|
|
3870
3868
|
}
|
|
3871
3869
|
return t;
|
|
3872
3870
|
}
|
|
3873
|
-
function
|
|
3871
|
+
function is(n) {
|
|
3874
3872
|
const t = Kn(n, { timeZoneName: !1 });
|
|
3875
3873
|
if ((t.timeStyle === "long" || t.timeStyle === "full") && (delete t.timeStyle, Object.assign(t, { hour: "numeric", minute: "2-digit", second: "2-digit" }), t.dateStyle) && (Object.assign(t, { short: { year: "numeric", month: "numeric", day: "numeric" }, medium: { year: "numeric", month: "short", day: "numeric" }, long: { year: "numeric", month: "long", day: "numeric" }, full: { year: "numeric", month: "long", day: "numeric", weekday: "long" } }[t.dateStyle]), delete t.dateStyle), !Cr(t) && !Tr(t)) {
|
|
3876
3874
|
if (Qn(n)) throw new TypeError(`cannot format PlainDateTime with options [${Object.keys(n)}]`);
|
|
@@ -3878,7 +3876,7 @@ function ss(n) {
|
|
|
3878
3876
|
}
|
|
3879
3877
|
return t;
|
|
3880
3878
|
}
|
|
3881
|
-
function
|
|
3879
|
+
function as(n) {
|
|
3882
3880
|
let t = n;
|
|
3883
3881
|
return Cr(t) || Tr(t) || (t = Object.assign({}, t, { year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" })), t;
|
|
3884
3882
|
}
|
|
@@ -3897,69 +3895,67 @@ function le(n) {
|
|
|
3897
3895
|
function dr(n) {
|
|
3898
3896
|
return le(n) ? n : yr(n);
|
|
3899
3897
|
}
|
|
3900
|
-
function
|
|
3898
|
+
function Ji(n, t) {
|
|
3901
3899
|
return !(!le(n) || !le(t) || H(n) && !H(t) || F(n) && !F(t) || I(n) && !I(t) || Y(n) && !Y(t) || J(n) && !J(t) || Yt(n) && !Yt(t) || B(n) && !B(t));
|
|
3902
3900
|
}
|
|
3903
|
-
function
|
|
3901
|
+
function en(n, t) {
|
|
3904
3902
|
if (H(n)) {
|
|
3905
3903
|
const e = { isoDate: { year: 1970, month: 1, day: 1 }, time: h(n, Z) };
|
|
3906
|
-
return { epochNs: ot(h(t,
|
|
3904
|
+
return { epochNs: ot(h(t, qe), e, "compatible"), formatter: ze(t, ai) };
|
|
3907
3905
|
}
|
|
3908
3906
|
if (J(n)) {
|
|
3909
3907
|
const e = h(n, D), r = h(t, fn);
|
|
3910
3908
|
if (e !== r) throw new RangeError(`cannot format PlainYearMonth with calendar ${e} in locale with calendar ${r}`);
|
|
3911
3909
|
const o = x(h(n, C), { deltaDays: 0, hour: 12, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 });
|
|
3912
|
-
return { epochNs: ot(h(t,
|
|
3910
|
+
return { epochNs: ot(h(t, qe), o, "compatible"), formatter: ze(t, oi) };
|
|
3913
3911
|
}
|
|
3914
3912
|
if (Yt(n)) {
|
|
3915
3913
|
const e = h(n, D), r = h(t, fn);
|
|
3916
3914
|
if (e !== r) throw new RangeError(`cannot format PlainMonthDay with calendar ${e} in locale with calendar ${r}`);
|
|
3917
3915
|
const o = x(h(n, C), { deltaDays: 0, hour: 12, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 });
|
|
3918
|
-
return { epochNs: ot(h(t,
|
|
3916
|
+
return { epochNs: ot(h(t, qe), o, "compatible"), formatter: ze(t, ii) };
|
|
3919
3917
|
}
|
|
3920
3918
|
if (F(n)) {
|
|
3921
3919
|
const e = h(n, D), r = h(t, fn);
|
|
3922
3920
|
if (e !== "iso8601" && e !== r) throw new RangeError(`cannot format PlainDate with calendar ${e} in locale with calendar ${r}`);
|
|
3923
3921
|
const o = x(h(n, C), { deltaDays: 0, hour: 12, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 });
|
|
3924
|
-
return { epochNs: ot(h(t,
|
|
3922
|
+
return { epochNs: ot(h(t, qe), o, "compatible"), formatter: ze(t, ri) };
|
|
3925
3923
|
}
|
|
3926
3924
|
if (I(n)) {
|
|
3927
3925
|
const e = h(n, D), r = h(t, fn);
|
|
3928
3926
|
if (e !== "iso8601" && e !== r) throw new RangeError(`cannot format PlainDateTime with calendar ${e} in locale with calendar ${r}`);
|
|
3929
3927
|
const o = h(n, A);
|
|
3930
|
-
return { epochNs: ot(h(t,
|
|
3928
|
+
return { epochNs: ot(h(t, qe), o, "compatible"), formatter: ze(t, si) };
|
|
3931
3929
|
}
|
|
3932
3930
|
if (Y(n)) throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");
|
|
3933
|
-
return B(n) ? { epochNs: h(n, T), formatter:
|
|
3931
|
+
return B(n) ? { epochNs: h(n, T), formatter: ze(t, ci) } : {};
|
|
3934
3932
|
}
|
|
3935
|
-
function
|
|
3933
|
+
function ta(n) {
|
|
3936
3934
|
const t = /* @__PURE__ */ Object.create(null);
|
|
3937
3935
|
return t.years = h(n, ut), t.months = h(n, lt), t.weeks = h(n, Mt), t.days = h(n, ht), t.hours = h(n, dt), t.minutes = h(n, mt), t.seconds = h(n, ft), t.milliseconds = h(n, gt), t.microseconds = h(n, yt), t.nanoseconds = h(n, Tt), t;
|
|
3938
3936
|
}
|
|
3939
3937
|
In.prototype.constructor = At, Object.defineProperty(At, "prototype", { value: In.prototype, writable: !1, enumerable: !1, configurable: !1 }), At.supportedLocalesOf = jn.supportedLocalesOf, me(At, "Intl.DateTimeFormat");
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
function ra(n) {
|
|
3938
|
+
const { format: ss, formatToParts: cs } = Intl.DurationFormat?.prototype ?? /* @__PURE__ */ Object.create(null);
|
|
3939
|
+
function ea(n) {
|
|
3943
3940
|
Intl.DurationFormat.prototype.resolvedOptions.call(this);
|
|
3944
|
-
const t =
|
|
3945
|
-
return
|
|
3941
|
+
const t = ta(Ut(n));
|
|
3942
|
+
return ss.call(this, t);
|
|
3946
3943
|
}
|
|
3947
|
-
|
|
3948
|
-
(Jo = Intl.DurationFormat) != null && Jo.prototype && (Intl.DurationFormat.prototype.format = ra, Intl.DurationFormat.prototype.formatToParts = function(n) {
|
|
3944
|
+
Intl.DurationFormat?.prototype && (Intl.DurationFormat.prototype.format = ea, Intl.DurationFormat.prototype.formatToParts = function(n) {
|
|
3949
3945
|
Intl.DurationFormat.prototype.resolvedOptions.call(this);
|
|
3950
|
-
const t =
|
|
3951
|
-
return
|
|
3946
|
+
const t = ta(Ut(n));
|
|
3947
|
+
return cs.call(this, t);
|
|
3952
3948
|
});
|
|
3953
3949
|
class ho {
|
|
3954
3950
|
constructor(t) {
|
|
3955
3951
|
if (arguments.length < 1) throw new TypeError("missing argument: epochNanoseconds is required");
|
|
3956
|
-
|
|
3952
|
+
$i(this, hr(t));
|
|
3957
3953
|
}
|
|
3958
3954
|
get epochMilliseconds() {
|
|
3959
3955
|
return b(this, B), Ft(h(this, T), "floor");
|
|
3960
3956
|
}
|
|
3961
3957
|
get epochNanoseconds() {
|
|
3962
|
-
return b(this, B),
|
|
3958
|
+
return b(this, B), Hi(l.BigInt(h(this, T)));
|
|
3963
3959
|
}
|
|
3964
3960
|
add(t) {
|
|
3965
3961
|
return b(this, B), Ho("add", this, t);
|
|
@@ -3975,8 +3971,8 @@ class ho {
|
|
|
3975
3971
|
}
|
|
3976
3972
|
round(t) {
|
|
3977
3973
|
if (b(this, B), t === void 0) throw new TypeError("options parameter is required");
|
|
3978
|
-
const e = typeof t == "string" ?
|
|
3979
|
-
return
|
|
3974
|
+
const e = typeof t == "string" ? Le("smallestUnit", t) : M(t), r = on(e), o = qt(e, "halfExpand"), i = Ot(e, "smallestUnit", "time", he);
|
|
3975
|
+
return an(r, { hour: 24, minute: 1440, second: 86400, millisecond: 864e5, microsecond: 864e8, nanosecond: 864e11 }[i], !0), Vt(Vr(h(this, T), r, i, o));
|
|
3980
3976
|
}
|
|
3981
3977
|
equals(t) {
|
|
3982
3978
|
b(this, B);
|
|
@@ -4024,7 +4020,7 @@ me(ho, "Temporal.Instant");
|
|
|
4024
4020
|
class mo {
|
|
4025
4021
|
constructor(t, e, r, o = "iso8601") {
|
|
4026
4022
|
const i = $(t), a = $(e), s = $(r), c = _t(o === void 0 ? "iso8601" : V(o));
|
|
4027
|
-
|
|
4023
|
+
ke(i, a, s), Ei(this, { year: i, month: a, day: s }, c);
|
|
4028
4024
|
}
|
|
4029
4025
|
get calendarId() {
|
|
4030
4026
|
return b(this, F), h(this, D);
|
|
@@ -4054,12 +4050,10 @@ class mo {
|
|
|
4054
4050
|
return at(this, "dayOfYear");
|
|
4055
4051
|
}
|
|
4056
4052
|
get weekOfYear() {
|
|
4057
|
-
|
|
4058
|
-
return (t = at(this, "weekOfYear")) == null ? void 0 : t.week;
|
|
4053
|
+
return at(this, "weekOfYear")?.week;
|
|
4059
4054
|
}
|
|
4060
4055
|
get yearOfWeek() {
|
|
4061
|
-
|
|
4062
|
-
return (t = at(this, "weekOfYear")) == null ? void 0 : t.year;
|
|
4056
|
+
return at(this, "weekOfYear")?.year;
|
|
4063
4057
|
}
|
|
4064
4058
|
get daysInWeek() {
|
|
4065
4059
|
return at(this, "daysInWeek");
|
|
@@ -4078,10 +4072,10 @@ class mo {
|
|
|
4078
4072
|
}
|
|
4079
4073
|
with(t, e = void 0) {
|
|
4080
4074
|
if (b(this, F), !q(t)) throw new TypeError("invalid argument");
|
|
4081
|
-
|
|
4075
|
+
rn(t);
|
|
4082
4076
|
const r = h(this, D);
|
|
4083
4077
|
let o = vt(r, h(this, C));
|
|
4084
|
-
return o =
|
|
4078
|
+
return o = Re(r, o, jt(r, t, ["year", "month", "monthCode", "day"], [], "partial")), wt(_e(r, o, L(M(e))), r);
|
|
4085
4079
|
}
|
|
4086
4080
|
withCalendar(t) {
|
|
4087
4081
|
b(this, F);
|
|
@@ -4119,7 +4113,7 @@ class mo {
|
|
|
4119
4113
|
}
|
|
4120
4114
|
toPlainDateTime(t = void 0) {
|
|
4121
4115
|
b(this, F);
|
|
4122
|
-
const e =
|
|
4116
|
+
const e = _i(t);
|
|
4123
4117
|
return It(x(h(this, C), e), h(this, D));
|
|
4124
4118
|
}
|
|
4125
4119
|
toZonedDateTime(t) {
|
|
@@ -4135,12 +4129,12 @@ class mo {
|
|
|
4135
4129
|
toPlainYearMonth() {
|
|
4136
4130
|
b(this, F);
|
|
4137
4131
|
const t = h(this, D);
|
|
4138
|
-
return
|
|
4132
|
+
return Ve(kn(t, vt(t, h(this, C)), "constrain"), t);
|
|
4139
4133
|
}
|
|
4140
4134
|
toPlainMonthDay() {
|
|
4141
4135
|
b(this, F);
|
|
4142
4136
|
const t = h(this, D);
|
|
4143
|
-
return
|
|
4137
|
+
return Ge(ar(t, vt(t, h(this, C)), "constrain"), t);
|
|
4144
4138
|
}
|
|
4145
4139
|
static from(t, e = void 0) {
|
|
4146
4140
|
return gn(t, e);
|
|
@@ -4159,7 +4153,7 @@ me(mo, "Temporal.PlainDate");
|
|
|
4159
4153
|
class fo {
|
|
4160
4154
|
constructor(t, e, r, o = 0, i = 0, a = 0, s = 0, c = 0, u = 0, d = "iso8601") {
|
|
4161
4155
|
const m = $(t), f = $(e), g = $(r), y = o === void 0 ? 0 : $(o), p = i === void 0 ? 0 : $(i), w = a === void 0 ? 0 : $(a), v = s === void 0 ? 0 : $(s), _ = c === void 0 ? 0 : $(c), E = u === void 0 ? 0 : $(u), O = _t(d === void 0 ? "iso8601" : V(d));
|
|
4162
|
-
oo(m, f, g, y, p, w, v, _, E),
|
|
4156
|
+
oo(m, f, g, y, p, w, v, _, E), Mi(this, { isoDate: { year: m, month: f, day: g }, time: { hour: y, minute: p, second: w, millisecond: v, microsecond: _, nanosecond: E } }, O);
|
|
4163
4157
|
}
|
|
4164
4158
|
get calendarId() {
|
|
4165
4159
|
return b(this, I), h(this, D);
|
|
@@ -4177,22 +4171,22 @@ class fo {
|
|
|
4177
4171
|
return st(this, "day");
|
|
4178
4172
|
}
|
|
4179
4173
|
get hour() {
|
|
4180
|
-
return
|
|
4174
|
+
return Fe(this, "hour");
|
|
4181
4175
|
}
|
|
4182
4176
|
get minute() {
|
|
4183
|
-
return
|
|
4177
|
+
return Fe(this, "minute");
|
|
4184
4178
|
}
|
|
4185
4179
|
get second() {
|
|
4186
|
-
return
|
|
4180
|
+
return Fe(this, "second");
|
|
4187
4181
|
}
|
|
4188
4182
|
get millisecond() {
|
|
4189
|
-
return
|
|
4183
|
+
return Fe(this, "millisecond");
|
|
4190
4184
|
}
|
|
4191
4185
|
get microsecond() {
|
|
4192
|
-
return
|
|
4186
|
+
return Fe(this, "microsecond");
|
|
4193
4187
|
}
|
|
4194
4188
|
get nanosecond() {
|
|
4195
|
-
return
|
|
4189
|
+
return Fe(this, "nanosecond");
|
|
4196
4190
|
}
|
|
4197
4191
|
get era() {
|
|
4198
4192
|
return st(this, "era");
|
|
@@ -4207,12 +4201,10 @@ class fo {
|
|
|
4207
4201
|
return st(this, "dayOfYear");
|
|
4208
4202
|
}
|
|
4209
4203
|
get weekOfYear() {
|
|
4210
|
-
|
|
4211
|
-
return (t = st(this, "weekOfYear")) == null ? void 0 : t.week;
|
|
4204
|
+
return st(this, "weekOfYear")?.week;
|
|
4212
4205
|
}
|
|
4213
4206
|
get yearOfWeek() {
|
|
4214
|
-
|
|
4215
|
-
return (t = st(this, "weekOfYear")) == null ? void 0 : t.year;
|
|
4207
|
+
return st(this, "weekOfYear")?.year;
|
|
4216
4208
|
}
|
|
4217
4209
|
get daysInWeek() {
|
|
4218
4210
|
return st(this, "daysInWeek");
|
|
@@ -4231,14 +4223,14 @@ class fo {
|
|
|
4231
4223
|
}
|
|
4232
4224
|
with(t, e = void 0) {
|
|
4233
4225
|
if (b(this, I), !q(t)) throw new TypeError("invalid argument");
|
|
4234
|
-
|
|
4226
|
+
rn(t);
|
|
4235
4227
|
const r = h(this, D), o = h(this, A);
|
|
4236
4228
|
let i = { ...vt(r, o.isoDate), ...o.time };
|
|
4237
|
-
return i =
|
|
4229
|
+
return i = Re(r, i, jt(r, t, ["year", "month", "monthCode", "day"], ["hour", "minute", "second", "millisecond", "microsecond", "nanosecond"], "partial")), It(Hn(r, i, L(M(e))), r);
|
|
4238
4230
|
}
|
|
4239
4231
|
withPlainTime(t = void 0) {
|
|
4240
4232
|
b(this, I);
|
|
4241
|
-
const e =
|
|
4233
|
+
const e = _i(t);
|
|
4242
4234
|
return It(x(h(this, A).isoDate, e), h(this, D));
|
|
4243
4235
|
}
|
|
4244
4236
|
withCalendar(t) {
|
|
@@ -4260,22 +4252,22 @@ class fo {
|
|
|
4260
4252
|
}
|
|
4261
4253
|
round(t) {
|
|
4262
4254
|
if (b(this, I), t === void 0) throw new TypeError("options parameter is required");
|
|
4263
|
-
const e = typeof t == "string" ?
|
|
4264
|
-
|
|
4255
|
+
const e = typeof t == "string" ? Le("smallestUnit", t) : M(t), r = on(e), o = qt(e, "halfExpand"), i = Ot(e, "smallestUnit", "time", he, ["day"]), a = { day: 1, hour: 24, minute: 60, second: 60, millisecond: 1e3, microsecond: 1e3, nanosecond: 1e3 }[i];
|
|
4256
|
+
an(r, a, a === 1);
|
|
4265
4257
|
const s = h(this, A);
|
|
4266
4258
|
return It(r === 1 && i === "nanosecond" ? s : Xr(s, r, i, o), h(this, D));
|
|
4267
4259
|
}
|
|
4268
4260
|
equals(t) {
|
|
4269
4261
|
b(this, I);
|
|
4270
4262
|
const e = yn(t);
|
|
4271
|
-
return
|
|
4263
|
+
return tn(h(this, A), h(e, A)) === 0 && Qt(h(this, D), h(e, D));
|
|
4272
4264
|
}
|
|
4273
4265
|
toString(t = void 0) {
|
|
4274
4266
|
b(this, I);
|
|
4275
4267
|
const e = M(t), r = zn(e), o = Fn(e), i = qt(e, "trunc"), a = Ot(e, "smallestUnit", "time", void 0);
|
|
4276
4268
|
if (a === "hour") throw new RangeError('smallestUnit must be a time unit other than "hour"');
|
|
4277
4269
|
const { precision: s, unit: c, increment: u } = Zn(a, o), d = Xr(h(this, A), u, c, i);
|
|
4278
|
-
return
|
|
4270
|
+
return Ye(d), Nn(d, h(this, D), s, r);
|
|
4279
4271
|
}
|
|
4280
4272
|
toJSON() {
|
|
4281
4273
|
return b(this, I), Nn(h(this, A), h(this, D), "auto");
|
|
@@ -4302,7 +4294,7 @@ class fo {
|
|
|
4302
4294
|
}
|
|
4303
4295
|
static compare(t, e) {
|
|
4304
4296
|
const r = yn(t), o = yn(e);
|
|
4305
|
-
return
|
|
4297
|
+
return tn(h(r, A), h(o, A));
|
|
4306
4298
|
}
|
|
4307
4299
|
}
|
|
4308
4300
|
function st(n, t) {
|
|
@@ -4310,11 +4302,11 @@ function st(n, t) {
|
|
|
4310
4302
|
const e = h(n, A).isoDate;
|
|
4311
4303
|
return qn(n).isoToDate(e, { [t]: !0 })[t];
|
|
4312
4304
|
}
|
|
4313
|
-
function
|
|
4305
|
+
function Fe(n, t) {
|
|
4314
4306
|
return b(n, I), h(n, A).time[t];
|
|
4315
4307
|
}
|
|
4316
4308
|
me(fo, "Temporal.PlainDateTime");
|
|
4317
|
-
class
|
|
4309
|
+
class nn {
|
|
4318
4310
|
constructor(t = 0, e = 0, r = 0, o = 0, i = 0, a = 0, s = 0, c = 0, u = 0, d = 0) {
|
|
4319
4311
|
const m = t === void 0 ? 0 : Zt(t), f = e === void 0 ? 0 : Zt(e), g = r === void 0 ? 0 : Zt(r), y = o === void 0 ? 0 : Zt(o), p = i === void 0 ? 0 : Zt(i), w = a === void 0 ? 0 : Zt(a), v = s === void 0 ? 0 : Zt(s), _ = c === void 0 ? 0 : Zt(c), E = u === void 0 ? 0 : Zt(u), O = d === void 0 ? 0 : Zt(d);
|
|
4320
4312
|
Er(m, f, g, y, p, w, v, _, E, O), de(this), k(this, ut, m), k(this, lt, f), k(this, Mt, g), k(this, ht, y), k(this, dt, p), k(this, mt, w), k(this, ft, v), k(this, gt, _), k(this, yt, E), k(this, Tt, O);
|
|
@@ -4357,14 +4349,14 @@ class rn {
|
|
|
4357
4349
|
}
|
|
4358
4350
|
with(t) {
|
|
4359
4351
|
b(this, z);
|
|
4360
|
-
const e =
|
|
4361
|
-
return new
|
|
4352
|
+
const e = Di(t), { years: r = h(this, ut), months: o = h(this, lt), weeks: i = h(this, Mt), days: a = h(this, ht), hours: s = h(this, dt), minutes: c = h(this, mt), seconds: u = h(this, ft), milliseconds: d = h(this, gt), microseconds: m = h(this, yt), nanoseconds: f = h(this, Tt) } = e;
|
|
4353
|
+
return new nn(r, o, i, a, s, c, u, d, m, f);
|
|
4362
4354
|
}
|
|
4363
4355
|
negated() {
|
|
4364
4356
|
return b(this, z), Rt(this);
|
|
4365
4357
|
}
|
|
4366
4358
|
abs() {
|
|
4367
|
-
return b(this, z), new
|
|
4359
|
+
return b(this, z), new nn(Math.abs(h(this, ut)), Math.abs(h(this, lt)), Math.abs(h(this, Mt)), Math.abs(h(this, ht)), Math.abs(h(this, dt)), Math.abs(h(this, mt)), Math.abs(h(this, ft)), Math.abs(h(this, gt)), Math.abs(h(this, yt)), Math.abs(h(this, Tt)));
|
|
4368
4360
|
}
|
|
4369
4361
|
add(t) {
|
|
4370
4362
|
return b(this, z), qo("add", this, t);
|
|
@@ -4374,9 +4366,9 @@ class rn {
|
|
|
4374
4366
|
}
|
|
4375
4367
|
round(t) {
|
|
4376
4368
|
if (b(this, z), t === void 0) throw new TypeError("options parameter is required");
|
|
4377
|
-
const e = re(this), r = typeof t == "string" ?
|
|
4369
|
+
const e = re(this), r = typeof t == "string" ? Le("smallestUnit", t) : M(t);
|
|
4378
4370
|
let o = Ot(r, "largestUnit", "datetime", void 0, ["auto"]), { plainRelativeTo: i, zonedRelativeTo: a } = Rr(r);
|
|
4379
|
-
const s =
|
|
4371
|
+
const s = on(r), c = qt(r, "halfExpand");
|
|
4380
4372
|
let u = Ot(r, "smallestUnit", "datetime", void 0), d = !0;
|
|
4381
4373
|
u || (d = !1, u = "nanosecond");
|
|
4382
4374
|
const m = se(e, u);
|
|
@@ -4384,16 +4376,16 @@ class rn {
|
|
|
4384
4376
|
if (o || (f = !1, o = m), o === "auto" && (o = m), !d && !f) throw new RangeError("at least one of smallestUnit or largestUnit is required");
|
|
4385
4377
|
if (se(o, u) !== o) throw new RangeError(`largestUnit ${o} cannot be smaller than smallestUnit ${u}`);
|
|
4386
4378
|
const g = { hour: 24, minute: 60, second: 60, millisecond: 1e3, microsecond: 1e3, nanosecond: 1e3 }[u];
|
|
4387
|
-
if (g !== void 0 &&
|
|
4379
|
+
if (g !== void 0 && an(s, g, !1), s > 1 && oe(u) === "date" && o !== u) throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");
|
|
4388
4380
|
if (a) {
|
|
4389
|
-
let p =
|
|
4381
|
+
let p = He(this);
|
|
4390
4382
|
const w = h(a, j), v = h(a, D), _ = h(a, T);
|
|
4391
|
-
return p =
|
|
4383
|
+
return p = qi(_, vn(_, w, v, p), w, v, o, s, u, c), oe(o) === "date" && (o = "hour"), Pt(p, o);
|
|
4392
4384
|
}
|
|
4393
4385
|
if (i) {
|
|
4394
4386
|
let p = Xt(this);
|
|
4395
|
-
const w =
|
|
4396
|
-
return p =
|
|
4387
|
+
const w = Je({ hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 }, p.time), v = h(i, C), _ = h(i, D), E = Lt(_, v, rt(p.date, w.deltaDays), "constrain");
|
|
4388
|
+
return p = Zi(x(v, { deltaDays: 0, hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 }), x(E, w), _, o, s, u, c), Pt(p, o);
|
|
4397
4389
|
}
|
|
4398
4390
|
if (Wt(e)) throw new RangeError(`a starting point is required for ${e}s balancing`);
|
|
4399
4391
|
if (Wt(o)) throw new RangeError(`a starting point is required for ${o}s balancing`);
|
|
@@ -4407,23 +4399,23 @@ class rn {
|
|
|
4407
4399
|
}
|
|
4408
4400
|
total(t) {
|
|
4409
4401
|
if (b(this, z), t === void 0) throw new TypeError("options argument is required");
|
|
4410
|
-
const e = typeof t == "string" ?
|
|
4402
|
+
const e = typeof t == "string" ? Le("unit", t) : M(t);
|
|
4411
4403
|
let { plainRelativeTo: r, zonedRelativeTo: o } = Rr(e);
|
|
4412
4404
|
const i = Ot(e, "unit", "datetime", he);
|
|
4413
4405
|
if (o) {
|
|
4414
|
-
const s =
|
|
4406
|
+
const s = He(this), c = h(o, j), u = h(o, D), d = h(o, T);
|
|
4415
4407
|
return function(m, f, g, y, p) {
|
|
4416
|
-
return oe(p) === "time" ? Cn(N.fromEpochNsDiff(f, m), p) : Io(
|
|
4408
|
+
return oe(p) === "time" ? Cn(N.fromEpochNsDiff(f, m), p) : Io(zi(m, f, g, y, p), f, zt(g, m), g, y, p);
|
|
4417
4409
|
}(d, vn(d, c, u, s), c, u, i);
|
|
4418
4410
|
}
|
|
4419
4411
|
if (r) {
|
|
4420
4412
|
const s = Xt(this);
|
|
4421
|
-
let c =
|
|
4413
|
+
let c = Je({ hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 }, s.time);
|
|
4422
4414
|
const u = h(r, C), d = h(r, D), m = Lt(d, u, rt(s.date, c.deltaDays), "constrain");
|
|
4423
4415
|
return function(f, g, y, p) {
|
|
4424
|
-
if (
|
|
4425
|
-
|
|
4426
|
-
const w =
|
|
4416
|
+
if (tn(f, g) == 0) return 0;
|
|
4417
|
+
Ye(f), Ye(g);
|
|
4418
|
+
const w = Ui(f, g, y, p);
|
|
4427
4419
|
return p === "nanosecond" ? l.toNumber(w.time.totalNs) : Io(w, tt(g), f, null, y, p);
|
|
4428
4420
|
}(x(u, { deltaDays: 0, hour: 0, minute: 0, second: 0, millisecond: 0, microsecond: 0, nanosecond: 0 }), x(m, c), d, i);
|
|
4429
4421
|
}
|
|
@@ -4439,7 +4431,7 @@ class rn {
|
|
|
4439
4431
|
const { precision: a, unit: s, increment: c } = Zn(i, r);
|
|
4440
4432
|
if (s === "nanosecond" && c === 1) return Jn(this, a);
|
|
4441
4433
|
const u = re(this);
|
|
4442
|
-
let d =
|
|
4434
|
+
let d = He(this);
|
|
4443
4435
|
const m = lr(d.time, c, s, o);
|
|
4444
4436
|
return d = ce(d.date, m), Jn(Pt(d, se(u, "second")), a);
|
|
4445
4437
|
}
|
|
@@ -4449,7 +4441,7 @@ class rn {
|
|
|
4449
4441
|
toLocaleString(t = void 0, e = void 0) {
|
|
4450
4442
|
if (b(this, z), typeof Intl.DurationFormat == "function") {
|
|
4451
4443
|
const r = new Intl.DurationFormat(t, e);
|
|
4452
|
-
return
|
|
4444
|
+
return ea.call(r, this);
|
|
4453
4445
|
}
|
|
4454
4446
|
return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."), Jn(this, "auto");
|
|
4455
4447
|
}
|
|
@@ -4462,7 +4454,7 @@ class rn {
|
|
|
4462
4454
|
static compare(t, e, r = void 0) {
|
|
4463
4455
|
const o = Ut(t), i = Ut(e), a = M(r), { plainRelativeTo: s, zonedRelativeTo: c } = Rr(a);
|
|
4464
4456
|
if (h(o, ut) === h(i, ut) && h(o, lt) === h(i, lt) && h(o, Mt) === h(i, Mt) && h(o, ht) === h(i, ht) && h(o, dt) === h(i, dt) && h(o, mt) === h(i, mt) && h(o, ft) === h(i, ft) && h(o, gt) === h(i, gt) && h(o, yt) === h(i, yt) && h(o, Tt) === h(i, Tt)) return 0;
|
|
4465
|
-
const u = re(o), d = re(i), m =
|
|
4457
|
+
const u = re(o), d = re(i), m = He(o), f = He(i);
|
|
4466
4458
|
if (c && (oe(u) === "date" || oe(d) === "date")) {
|
|
4467
4459
|
const v = h(c, j), _ = h(c, D), E = h(c, T), O = vn(E, v, _, m), R = vn(E, v, _, f);
|
|
4468
4460
|
return Ct(l.toNumber(l.subtract(O, R)));
|
|
@@ -4476,11 +4468,11 @@ class rn {
|
|
|
4476
4468
|
return p.cmp(w);
|
|
4477
4469
|
}
|
|
4478
4470
|
}
|
|
4479
|
-
me(
|
|
4471
|
+
me(nn, "Temporal.Duration");
|
|
4480
4472
|
class go {
|
|
4481
4473
|
constructor(t, e, r = "iso8601", o = 1972) {
|
|
4482
4474
|
const i = $(t), a = $(e), s = _t(r === void 0 ? "iso8601" : V(r)), c = $(o);
|
|
4483
|
-
|
|
4475
|
+
ke(c, i, a), Ti(this, { year: c, month: i, day: a }, s);
|
|
4484
4476
|
}
|
|
4485
4477
|
get monthCode() {
|
|
4486
4478
|
return Qo(this, "monthCode");
|
|
@@ -4493,10 +4485,10 @@ class go {
|
|
|
4493
4485
|
}
|
|
4494
4486
|
with(t, e = void 0) {
|
|
4495
4487
|
if (b(this, Yt), !q(t)) throw new TypeError("invalid argument");
|
|
4496
|
-
|
|
4488
|
+
rn(t);
|
|
4497
4489
|
const r = h(this, D);
|
|
4498
4490
|
let o = vt(r, h(this, C), "month-day");
|
|
4499
|
-
return o =
|
|
4491
|
+
return o = Re(r, o, jt(r, t, ["year", "month", "monthCode", "day"], [], "partial")), Ge(ar(r, o, L(M(e))), r);
|
|
4500
4492
|
}
|
|
4501
4493
|
equals(t) {
|
|
4502
4494
|
b(this, Yt);
|
|
@@ -4518,7 +4510,7 @@ class go {
|
|
|
4518
4510
|
toPlainDate(t) {
|
|
4519
4511
|
if (b(this, Yt), !q(t)) throw new TypeError("argument should be an object");
|
|
4520
4512
|
const e = h(this, D);
|
|
4521
|
-
return wt(_e(e,
|
|
4513
|
+
return wt(_e(e, Re(e, vt(e, h(this, C), "month-day"), jt(e, t, ["year"], [], [])), "constrain"), e);
|
|
4522
4514
|
}
|
|
4523
4515
|
static from(t, e = void 0) {
|
|
4524
4516
|
return Co(t, e);
|
|
@@ -4533,15 +4525,15 @@ function Yr(n) {
|
|
|
4533
4525
|
return zt(n, Qr());
|
|
4534
4526
|
}
|
|
4535
4527
|
me(go, "Temporal.PlainMonthDay");
|
|
4536
|
-
const
|
|
4528
|
+
const na = { instant: () => Vt(Qr()), plainDateTimeISO: (n = hn()) => It(Yr(bt(n)), "iso8601"), plainDateISO: (n = hn()) => wt(Yr(bt(n)).isoDate, "iso8601"), plainTimeISO: (n = hn()) => ie(Yr(bt(n)).time), timeZoneId: () => hn(), zonedDateTimeISO: (n = hn()) => {
|
|
4537
4529
|
const t = bt(n);
|
|
4538
4530
|
return nt(Qr(), t, "iso8601");
|
|
4539
4531
|
}, [Symbol.toStringTag]: "Temporal.Now" };
|
|
4540
|
-
Object.defineProperty(
|
|
4532
|
+
Object.defineProperty(na, Symbol.toStringTag, { value: "Temporal.Now", writable: !1, enumerable: !1, configurable: !0 });
|
|
4541
4533
|
class Bn {
|
|
4542
4534
|
constructor(t = 0, e = 0, r = 0, o = 0, i = 0, a = 0) {
|
|
4543
4535
|
const s = t === void 0 ? 0 : $(t), c = e === void 0 ? 0 : $(e), u = r === void 0 ? 0 : $(r), d = o === void 0 ? 0 : $(o), m = i === void 0 ? 0 : $(i), f = a === void 0 ? 0 : $(a);
|
|
4544
|
-
_r(s, c, u, d, m, f),
|
|
4536
|
+
_r(s, c, u, d, m, f), Ci(this, { hour: s, minute: c, second: u, millisecond: d, microsecond: m, nanosecond: f });
|
|
4545
4537
|
}
|
|
4546
4538
|
get hour() {
|
|
4547
4539
|
return b(this, H), h(this, Z).hour;
|
|
@@ -4563,7 +4555,7 @@ class Bn {
|
|
|
4563
4555
|
}
|
|
4564
4556
|
with(t, e = void 0) {
|
|
4565
4557
|
if (b(this, H), !q(t)) throw new TypeError("invalid argument");
|
|
4566
|
-
|
|
4558
|
+
rn(t);
|
|
4567
4559
|
const r = Fr(t, "partial"), o = Fr(this);
|
|
4568
4560
|
let { hour: i, minute: a, second: s, millisecond: c, microsecond: u, nanosecond: d } = Object.assign(o, r);
|
|
4569
4561
|
const m = L(M(e));
|
|
@@ -4583,8 +4575,8 @@ class Bn {
|
|
|
4583
4575
|
}
|
|
4584
4576
|
round(t) {
|
|
4585
4577
|
if (b(this, H), t === void 0) throw new TypeError("options parameter is required");
|
|
4586
|
-
const e = typeof t == "string" ?
|
|
4587
|
-
return
|
|
4578
|
+
const e = typeof t == "string" ? Le("smallestUnit", t) : M(t), r = on(e), o = qt(e, "halfExpand"), i = Ot(e, "smallestUnit", "time", he);
|
|
4579
|
+
return an(r, { hour: 24, minute: 60, second: 60, millisecond: 1e3, microsecond: 1e3, nanosecond: 1e3 }[i], !1), ie(Sr(h(this, Z), r, i, o));
|
|
4588
4580
|
}
|
|
4589
4581
|
equals(t) {
|
|
4590
4582
|
b(this, H);
|
|
@@ -4619,7 +4611,7 @@ me(Bn, "Temporal.PlainTime");
|
|
|
4619
4611
|
class yo {
|
|
4620
4612
|
constructor(t, e, r = "iso8601", o = 1) {
|
|
4621
4613
|
const i = $(t), a = $(e), s = _t(r === void 0 ? "iso8601" : V(r)), c = $(o);
|
|
4622
|
-
|
|
4614
|
+
ke(i, a, c), Oi(this, { year: i, month: a, day: c }, s);
|
|
4623
4615
|
}
|
|
4624
4616
|
get year() {
|
|
4625
4617
|
return ee(this, "year");
|
|
@@ -4653,10 +4645,10 @@ class yo {
|
|
|
4653
4645
|
}
|
|
4654
4646
|
with(t, e = void 0) {
|
|
4655
4647
|
if (b(this, J), !q(t)) throw new TypeError("invalid argument");
|
|
4656
|
-
|
|
4648
|
+
rn(t);
|
|
4657
4649
|
const r = h(this, D);
|
|
4658
4650
|
let o = vt(r, h(this, C), "year-month");
|
|
4659
|
-
return o =
|
|
4651
|
+
return o = Re(r, o, jt(r, t, ["year", "month", "monthCode"], [], "partial")), Ve(kn(r, o, L(M(e))), r);
|
|
4660
4652
|
}
|
|
4661
4653
|
add(t, e = void 0) {
|
|
4662
4654
|
return b(this, J), Xo("add", this, t, e);
|
|
@@ -4690,7 +4682,7 @@ class yo {
|
|
|
4690
4682
|
toPlainDate(t) {
|
|
4691
4683
|
if (b(this, J), !q(t)) throw new TypeError("argument should be an object");
|
|
4692
4684
|
const e = h(this, D);
|
|
4693
|
-
return wt(_e(e,
|
|
4685
|
+
return wt(_e(e, Re(e, vt(e, h(this, C), "year-month"), jt(e, t, ["day"], [], [])), "constrain"), e);
|
|
4694
4686
|
}
|
|
4695
4687
|
static from(t, e = void 0) {
|
|
4696
4688
|
return wn(t, e);
|
|
@@ -4706,7 +4698,7 @@ function ee(n, t) {
|
|
|
4706
4698
|
return qn(n).isoToDate(e, { [t]: !0 })[t];
|
|
4707
4699
|
}
|
|
4708
4700
|
me(yo, "Temporal.PlainYearMonth");
|
|
4709
|
-
const
|
|
4701
|
+
const us = At.prototype.resolvedOptions;
|
|
4710
4702
|
class po {
|
|
4711
4703
|
constructor(t, e, r = "iso8601") {
|
|
4712
4704
|
if (arguments.length < 1) throw new TypeError("missing argument: epochNanoseconds is required");
|
|
@@ -4718,7 +4710,7 @@ class po {
|
|
|
4718
4710
|
if (!c) throw new RangeError(`unknown time zone ${a}`);
|
|
4719
4711
|
i = c.identifier;
|
|
4720
4712
|
} else i = eo(s);
|
|
4721
|
-
|
|
4713
|
+
Ri(this, o, i, _t(r === void 0 ? "iso8601" : V(r)));
|
|
4722
4714
|
}
|
|
4723
4715
|
get calendarId() {
|
|
4724
4716
|
return b(this, Y), h(this, D);
|
|
@@ -4739,22 +4731,22 @@ class po {
|
|
|
4739
4731
|
return ct(this, "day");
|
|
4740
4732
|
}
|
|
4741
4733
|
get hour() {
|
|
4742
|
-
return
|
|
4734
|
+
return Ze(this, "hour");
|
|
4743
4735
|
}
|
|
4744
4736
|
get minute() {
|
|
4745
|
-
return
|
|
4737
|
+
return Ze(this, "minute");
|
|
4746
4738
|
}
|
|
4747
4739
|
get second() {
|
|
4748
|
-
return
|
|
4740
|
+
return Ze(this, "second");
|
|
4749
4741
|
}
|
|
4750
4742
|
get millisecond() {
|
|
4751
|
-
return
|
|
4743
|
+
return Ze(this, "millisecond");
|
|
4752
4744
|
}
|
|
4753
4745
|
get microsecond() {
|
|
4754
|
-
return
|
|
4746
|
+
return Ze(this, "microsecond");
|
|
4755
4747
|
}
|
|
4756
4748
|
get nanosecond() {
|
|
4757
|
-
return
|
|
4749
|
+
return Ze(this, "nanosecond");
|
|
4758
4750
|
}
|
|
4759
4751
|
get era() {
|
|
4760
4752
|
return ct(this, "era");
|
|
@@ -4766,7 +4758,7 @@ class po {
|
|
|
4766
4758
|
return b(this, Y), Ft(h(this, T), "floor");
|
|
4767
4759
|
}
|
|
4768
4760
|
get epochNanoseconds() {
|
|
4769
|
-
return b(this, Y),
|
|
4761
|
+
return b(this, Y), Hi(h(this, T));
|
|
4770
4762
|
}
|
|
4771
4763
|
get dayOfWeek() {
|
|
4772
4764
|
return ct(this, "dayOfWeek");
|
|
@@ -4775,12 +4767,10 @@ class po {
|
|
|
4775
4767
|
return ct(this, "dayOfYear");
|
|
4776
4768
|
}
|
|
4777
4769
|
get weekOfYear() {
|
|
4778
|
-
|
|
4779
|
-
return (t = ct(this, "weekOfYear")) == null ? void 0 : t.week;
|
|
4770
|
+
return ct(this, "weekOfYear")?.week;
|
|
4780
4771
|
}
|
|
4781
4772
|
get yearOfWeek() {
|
|
4782
|
-
|
|
4783
|
-
return (t = ct(this, "weekOfYear")) == null ? void 0 : t.year;
|
|
4773
|
+
return ct(this, "weekOfYear")?.year;
|
|
4784
4774
|
}
|
|
4785
4775
|
get hoursInDay() {
|
|
4786
4776
|
b(this, Y);
|
|
@@ -4810,11 +4800,11 @@ class po {
|
|
|
4810
4800
|
}
|
|
4811
4801
|
with(t, e = void 0) {
|
|
4812
4802
|
if (b(this, Y), !q(t)) throw new TypeError("invalid zoned-date-time-like");
|
|
4813
|
-
|
|
4803
|
+
rn(t);
|
|
4814
4804
|
const r = h(this, D), o = h(this, j), i = ae(o, h(this, T)), a = Ht(this);
|
|
4815
4805
|
let s = { ...vt(r, a.isoDate), ...a.time, offset: Zr(i) };
|
|
4816
|
-
s =
|
|
4817
|
-
const c = M(e), u = Tn(c), d = tr(c, "prefer"), m = Hn(r, s, L(c)), f =
|
|
4806
|
+
s = Re(r, s, jt(r, t, ["year", "month", "monthCode", "day"], ["hour", "minute", "second", "millisecond", "microsecond", "nanosecond", "offset"], "partial"));
|
|
4807
|
+
const c = M(e), u = Tn(c), d = tr(c, "prefer"), m = Hn(r, s, L(c)), f = sn(s.offset);
|
|
4818
4808
|
return nt(ir(m.isoDate, m.time, "option", f, o, u, d, !1), o, r);
|
|
4819
4809
|
}
|
|
4820
4810
|
withPlainTime(t = void 0) {
|
|
@@ -4847,8 +4837,8 @@ class po {
|
|
|
4847
4837
|
}
|
|
4848
4838
|
round(t) {
|
|
4849
4839
|
if (b(this, Y), t === void 0) throw new TypeError("options parameter is required");
|
|
4850
|
-
const e = typeof t == "string" ?
|
|
4851
|
-
if (
|
|
4840
|
+
const e = typeof t == "string" ? Le("smallestUnit", t) : M(t), r = on(e), o = qt(e, "halfExpand"), i = Ot(e, "smallestUnit", "time", he, ["day"]), a = { day: 1, hour: 24, minute: 60, second: 60, millisecond: 1e3, microsecond: 1e3, nanosecond: 1e3 }[i];
|
|
4841
|
+
if (an(r, a, a === 1), i === "nanosecond" && r === 1) return nt(h(this, T), h(this, j), h(this, D));
|
|
4852
4842
|
const s = h(this, j), c = h(this, T), u = Ht(this);
|
|
4853
4843
|
let d;
|
|
4854
4844
|
if (i === "day") {
|
|
@@ -4863,7 +4853,7 @@ class po {
|
|
|
4863
4853
|
equals(t) {
|
|
4864
4854
|
b(this, Y);
|
|
4865
4855
|
const e = bn(t), r = h(this, T), o = h(e, T);
|
|
4866
|
-
return !!l.equal(l.BigInt(r), l.BigInt(o)) && !!
|
|
4856
|
+
return !!l.equal(l.BigInt(r), l.BigInt(o)) && !!ki(h(this, j), h(e, j)) && Qt(h(this, D), h(e, D));
|
|
4867
4857
|
}
|
|
4868
4858
|
toString(t = void 0) {
|
|
4869
4859
|
b(this, Y);
|
|
@@ -4891,7 +4881,7 @@ class po {
|
|
|
4891
4881
|
}
|
|
4892
4882
|
}(o, r, ["timeZone"]), r.timeZone !== void 0) throw new TypeError("ZonedDateTime toLocaleString does not accept a timeZone option");
|
|
4893
4883
|
if (o.year === void 0 && o.month === void 0 && o.day === void 0 && o.era === void 0 && o.weekday === void 0 && o.dateStyle === void 0 && o.hour === void 0 && o.minute === void 0 && o.second === void 0 && o.fractionalSecondDigits === void 0 && o.timeStyle === void 0 && o.dayPeriod === void 0 && o.timeZoneName === void 0 && (o.timeZoneName = "short"), o.timeZone = h(this, j), xo(o.timeZone)) throw new RangeError("toLocaleString does not currently support offset time zones");
|
|
4894
|
-
const i = new At(t, o), a =
|
|
4884
|
+
const i = new At(t, o), a = us.call(i).calendar, s = h(this, D);
|
|
4895
4885
|
if (s !== "iso8601" && a !== "iso8601" && !Qt(a, s)) throw new RangeError(`cannot format ZonedDateTime with calendar ${s} in locale with calendar ${a}`);
|
|
4896
4886
|
return i.format(Vt(h(this, T)));
|
|
4897
4887
|
}
|
|
@@ -4910,7 +4900,7 @@ class po {
|
|
|
4910
4900
|
b(this, Y);
|
|
4911
4901
|
const e = h(this, j);
|
|
4912
4902
|
if (t === void 0) throw new TypeError("options parameter is required");
|
|
4913
|
-
const r = ue(typeof t == "string" ?
|
|
4903
|
+
const r = ue(typeof t == "string" ? Le("direction", t) : M(t), "direction", ["next", "previous"], he);
|
|
4914
4904
|
if (r === void 0) throw new TypeError("direction option is required");
|
|
4915
4905
|
if (xo(e) || e === "UTC") return null;
|
|
4916
4906
|
const o = h(this, T), i = r === "next" ? ro(e, o) : Hr(e, o);
|
|
@@ -4944,16 +4934,16 @@ function ct(n, t) {
|
|
|
4944
4934
|
const e = Ht(n).isoDate;
|
|
4945
4935
|
return qn(n).isoToDate(e, { [t]: !0 })[t];
|
|
4946
4936
|
}
|
|
4947
|
-
function
|
|
4937
|
+
function Ze(n, t) {
|
|
4948
4938
|
return b(n, Y), Ht(n).time[t];
|
|
4949
4939
|
}
|
|
4950
4940
|
me(po, "Temporal.ZonedDateTime");
|
|
4951
|
-
var
|
|
4952
|
-
const
|
|
4953
|
-
for (const n of
|
|
4941
|
+
var hs = Object.freeze({ __proto__: null, Duration: nn, Instant: ho, Now: na, PlainDate: mo, PlainDateTime: fo, PlainMonthDay: go, PlainTime: Bn, PlainYearMonth: yo, ZonedDateTime: po });
|
|
4942
|
+
const ls = [ho, mo, fo, nn, go, Bn, yo, po];
|
|
4943
|
+
for (const n of ls) {
|
|
4954
4944
|
const t = Object.getOwnPropertyDescriptor(n, "prototype");
|
|
4955
4945
|
(t.configurable || t.enumerable || t.writable) && (t.configurable = !1, t.enumerable = !1, t.writable = !1, Object.defineProperty(n, "prototype", t));
|
|
4956
4946
|
}
|
|
4957
4947
|
export {
|
|
4958
|
-
|
|
4948
|
+
hs as Temporal
|
|
4959
4949
|
};
|