UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

1,678 lines 92 kB
import { jsxs as rn, Fragment as an, jsx as oe } from "react/jsx-runtime"; import { a as Qe } from "./Button-CvQ4tVYH.mjs"; import { c as fe } from "./index-2NvaPZWc.mjs"; import m, { createContext as on, useContext as sn, useCallback as $, useRef as We, useLayoutEffect as cn, useState as He, useEffect as un, useMemo as Pe } from "react"; import { C as fn } from "./chevron-left-Cq9wjD2f.mjs"; import { C as dn } from "./chevron-right-DRPdnJlq.mjs"; const rt = 6048e5, ln = 864e5, Xe = Symbol.for("constructDateFrom"); function F(e, t) { return typeof e == "function" ? e(t) : e && typeof e == "object" && Xe in e ? e[Xe](t) : e instanceof Date ? new e.constructor(t) : new Date(t); } function x(e, t) { return F(t || e, e); } function at(e, t, n) { const r = x(e, n == null ? void 0 : n.in); return isNaN(t) ? F(e, NaN) : (t && r.setDate(r.getDate() + t), r); } function ot(e, t, n) { const r = x(e, n == null ? void 0 : n.in); if (isNaN(t)) return F(e, NaN); if (!t) return r; const a = r.getDate(), o = F(e, r.getTime()); o.setMonth(r.getMonth() + t + 1, 0); const i = o.getDate(); return a >= i ? o : (r.setFullYear( o.getFullYear(), o.getMonth(), a ), r); } let hn = {}; function we() { return hn; } function se(e, t) { var s, c, f, l; const n = we(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = x(e, t == null ? void 0 : t.in), o = a.getDay(), i = (o < r ? 7 : 0) + o - r; return a.setDate(a.getDate() - i), a.setHours(0, 0, 0, 0), a; } function ye(e, t) { return se(e, { ...t, weekStartsOn: 1 }); } function st(e, t) { const n = x(e, t == null ? void 0 : t.in), r = n.getFullYear(), a = F(n, 0); a.setFullYear(r + 1, 0, 4), a.setHours(0, 0, 0, 0); const o = ye(a), i = F(n, 0); i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0); const s = ye(i); return n.getTime() >= o.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1; } function pe(e) { const t = x(e), n = new Date( Date.UTC( t.getFullYear(), t.getMonth(), t.getDate(), t.getHours(), t.getMinutes(), t.getSeconds(), t.getMilliseconds() ) ); return n.setUTCFullYear(t.getFullYear()), +e - +n; } function ie(e, ...t) { const n = F.bind( null, t.find((r) => typeof r == "object") ); return t.map(n); } function ge(e, t) { const n = x(e, t == null ? void 0 : t.in); return n.setHours(0, 0, 0, 0), n; } function it(e, t, n) { const [r, a] = ie( n == null ? void 0 : n.in, e, t ), o = ge(r), i = ge(a), s = +o - pe(o), c = +i - pe(i); return Math.round((s - c) / ln); } function mn(e, t) { const n = st(e, t), r = F(e, 0); return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), ye(r); } function yn(e, t, n) { return at(e, t * 7, n); } function gn(e, t, n) { return ot(e, t * 12, n); } function wn(e, t) { let n, r = t == null ? void 0 : t.in; return e.forEach((a) => { !r && typeof a == "object" && (r = F.bind(null, a)); const o = x(a, r); (!n || n < o || isNaN(+o)) && (n = o); }), F(r, n || NaN); } function bn(e, t) { let n, r = t == null ? void 0 : t.in; return e.forEach((a) => { !r && typeof a == "object" && (r = F.bind(null, a)); const o = x(a, r); (!n || n > o || isNaN(+o)) && (n = o); }), F(r, n || NaN); } function Mn(e, t, n) { const [r, a] = ie( n == null ? void 0 : n.in, e, t ); return +ge(r) == +ge(a); } function Se(e) { return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]"; } function Dn(e) { return !(!Se(e) && typeof e != "number" || isNaN(+x(e))); } function kn(e, t, n) { const [r, a] = ie( n == null ? void 0 : n.in, e, t ), o = r.getFullYear() - a.getFullYear(), i = r.getMonth() - a.getMonth(); return o * 12 + i; } function On(e, t) { const n = x(e, t == null ? void 0 : t.in), r = n.getMonth(); return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n; } function vn(e, t) { const [n, r] = ie(e, t.start, t.end); return { start: n, end: r }; } function Wn(e, t) { const { start: n, end: r } = vn(t == null ? void 0 : t.in, e); let a = +n > +r; const o = a ? +n : +r, i = a ? r : n; i.setHours(0, 0, 0, 0), i.setDate(1); let s = 1; const c = []; for (; +i <= o; ) c.push(F(n, i)), i.setMonth(i.getMonth() + s); return a ? c.reverse() : c; } function Sn(e, t) { const n = x(e, t == null ? void 0 : t.in); return n.setDate(1), n.setHours(0, 0, 0, 0), n; } function Cn(e, t) { const n = x(e, t == null ? void 0 : t.in), r = n.getFullYear(); return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n; } function ct(e, t) { const n = x(e, t == null ? void 0 : t.in); return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n; } function ut(e, t) { var s, c, f, l; const n = we(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.weekStartsOn) ?? n.weekStartsOn ?? ((l = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : l.weekStartsOn) ?? 0, a = x(e, t == null ? void 0 : t.in), o = a.getDay(), i = (o < r ? -7 : 0) + 6 - (o - r); return a.setDate(a.getDate() + i), a.setHours(23, 59, 59, 999), a; } function Nn(e, t) { return ut(e, { ...t, weekStartsOn: 1 }); } const xn = { lessThanXSeconds: { one: "less than a second", other: "less than {{count}} seconds" }, xSeconds: { one: "1 second", other: "{{count}} seconds" }, halfAMinute: "half a minute", lessThanXMinutes: { one: "less than a minute", other: "less than {{count}} minutes" }, xMinutes: { one: "1 minute", other: "{{count}} minutes" }, aboutXHours: { one: "about 1 hour", other: "about {{count}} hours" }, xHours: { one: "1 hour", other: "{{count}} hours" }, xDays: { one: "1 day", other: "{{count}} days" }, aboutXWeeks: { one: "about 1 week", other: "about {{count}} weeks" }, xWeeks: { one: "1 week", other: "{{count}} weeks" }, aboutXMonths: { one: "about 1 month", other: "about {{count}} months" }, xMonths: { one: "1 month", other: "{{count}} months" }, aboutXYears: { one: "about 1 year", other: "about {{count}} years" }, xYears: { one: "1 year", other: "{{count}} years" }, overXYears: { one: "over 1 year", other: "over {{count}} years" }, almostXYears: { one: "almost 1 year", other: "almost {{count}} years" } }, Tn = (e, t, n) => { let r; const a = xn[e]; return typeof a == "string" ? r = a : t === 1 ? r = a.one : r = a.other.replace("{{count}}", t.toString()), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r; }; function Ee(e) { return (t = {}) => { const n = t.width ? String(t.width) : e.defaultWidth; return e.formats[n] || e.formats[e.defaultWidth]; }; } const Yn = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy" }, Pn = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a" }, En = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}" }, _n = { date: Ee({ formats: Yn, defaultWidth: "full" }), time: Ee({ formats: Pn, defaultWidth: "full" }), dateTime: Ee({ formats: En, defaultWidth: "full" }) }, Fn = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P" }, Bn = (e, t, n, r) => Fn[e]; function de(e) { return (t, n) => { const r = n != null && n.context ? String(n.context) : "standalone"; let a; if (r === "formatting" && e.formattingValues) { const i = e.defaultFormattingWidth || e.defaultWidth, s = n != null && n.width ? String(n.width) : i; a = e.formattingValues[s] || e.formattingValues[i]; } else { const i = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth; a = e.values[s] || e.values[i]; } const o = e.argumentCallback ? e.argumentCallback(t) : t; return a[o]; }; } const In = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"] }, Hn = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] }, An = { narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], abbreviated: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], wide: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ] }, qn = { narrow: ["S", "M", "T", "W", "T", "F", "S"], short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], wide: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, jn = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" } }, $n = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night" } }, Gn = (e, t) => { const n = Number(e), r = n % 100; if (r > 20 || r < 10) switch (r % 10) { case 1: return n + "st"; case 2: return n + "nd"; case 3: return n + "rd"; } return n + "th"; }, Rn = { ordinalNumber: Gn, era: de({ values: In, defaultWidth: "wide" }), quarter: de({ values: Hn, defaultWidth: "wide", argumentCallback: (e) => e - 1 }), month: de({ values: An, defaultWidth: "wide" }), day: de({ values: qn, defaultWidth: "wide" }), dayPeriod: de({ values: jn, defaultWidth: "wide", formattingValues: $n, defaultFormattingWidth: "wide" }) }; function le(e) { return (t, n = {}) => { const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], o = t.match(a); if (!o) return null; const i = o[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? Qn(s, (d) => d.test(i)) : ( // [TODO] -- I challenge you to fix the type zn(s, (d) => d.test(i)) ); let f; f = e.valueCallback ? e.valueCallback(c) : c, f = n.valueCallback ? ( // [TODO] -- I challenge you to fix the type n.valueCallback(f) ) : f; const l = t.slice(i.length); return { value: f, rest: l }; }; } function zn(e, t) { for (const n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n; } function Qn(e, t) { for (let n = 0; n < e.length; n++) if (t(e[n])) return n; } function Xn(e) { return (t, n = {}) => { const r = t.match(e.matchPattern); if (!r) return null; const a = r[0], o = t.match(e.parsePattern); if (!o) return null; let i = e.valueCallback ? e.valueCallback(o[0]) : o[0]; i = n.valueCallback ? n.valueCallback(i) : i; const s = t.slice(a.length); return { value: i, rest: s }; }; } const pn = /^(\d+)(th|st|nd|rd)?/i, Vn = /\d+/i, Zn = { narrow: /^(b|a)/i, abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, wide: /^(before christ|before common era|anno domini|common era)/i }, Un = { any: [/^b/i, /^(a|c)/i] }, Jn = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i }, Ln = { any: [/1/i, /2/i, /3/i, /4/i] }, Kn = { narrow: /^[jfmasond]/i, abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i }, er = { narrow: [ /^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i ], any: [ /^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i ] }, tr = { narrow: /^[smtwf]/i, short: /^(su|mo|tu|we|th|fr|sa)/i, abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i }, nr = { narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] }, rr = { narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i }, ar = { any: { am: /^a/i, pm: /^p/i, midnight: /^mi/i, noon: /^no/i, morning: /morning/i, afternoon: /afternoon/i, evening: /evening/i, night: /night/i } }, or = { ordinalNumber: Xn({ matchPattern: pn, parsePattern: Vn, valueCallback: (e) => parseInt(e, 10) }), era: le({ matchPatterns: Zn, defaultMatchWidth: "wide", parsePatterns: Un, defaultParseWidth: "any" }), quarter: le({ matchPatterns: Jn, defaultMatchWidth: "wide", parsePatterns: Ln, defaultParseWidth: "any", valueCallback: (e) => e + 1 }), month: le({ matchPatterns: Kn, defaultMatchWidth: "wide", parsePatterns: er, defaultParseWidth: "any" }), day: le({ matchPatterns: tr, defaultMatchWidth: "wide", parsePatterns: nr, defaultParseWidth: "any" }), dayPeriod: le({ matchPatterns: rr, defaultMatchWidth: "any", parsePatterns: ar, defaultParseWidth: "any" }) }, qe = { code: "en-US", formatDistance: Tn, formatLong: _n, formatRelative: Bn, localize: Rn, match: or, options: { weekStartsOn: 0, firstWeekContainsDate: 1 } }; function sr(e, t) { const n = x(e, t == null ? void 0 : t.in); return it(n, ct(n)) + 1; } function ft(e, t) { const n = x(e, t == null ? void 0 : t.in), r = +ye(n) - +mn(n); return Math.round(r / rt) + 1; } function dt(e, t) { var l, d, h, g; const n = x(e, t == null ? void 0 : t.in), r = n.getFullYear(), a = we(), o = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((d = (l = t == null ? void 0 : t.locale) == null ? void 0 : l.options) == null ? void 0 : d.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((g = (h = a.locale) == null ? void 0 : h.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = F((t == null ? void 0 : t.in) || e, 0); i.setFullYear(r + 1, 0, o), i.setHours(0, 0, 0, 0); const s = se(i, t), c = F((t == null ? void 0 : t.in) || e, 0); c.setFullYear(r, 0, o), c.setHours(0, 0, 0, 0); const f = se(c, t); return +n >= +s ? r + 1 : +n >= +f ? r : r - 1; } function ir(e, t) { var s, c, f, l; const n = we(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((c = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : c.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((l = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : l.firstWeekContainsDate) ?? 1, a = dt(e, t), o = F((t == null ? void 0 : t.in) || e, 0); return o.setFullYear(a, 0, r), o.setHours(0, 0, 0, 0), se(o, t); } function lt(e, t) { const n = x(e, t == null ? void 0 : t.in), r = +se(n, t) - +ir(n, t); return Math.round(r / rt) + 1; } function N(e, t) { const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0"); return n + r; } const L = { // Year y(e, t) { const n = e.getFullYear(), r = n > 0 ? n : 1 - n; return N(t === "yy" ? r % 100 : r, t.length); }, // Month M(e, t) { const n = e.getMonth(); return t === "M" ? String(n + 1) : N(n + 1, 2); }, // Day of the month d(e, t) { return N(e.getDate(), t.length); }, // AM or PM a(e, t) { const n = e.getHours() / 12 >= 1 ? "pm" : "am"; switch (t) { case "a": case "aa": return n.toUpperCase(); case "aaa": return n; case "aaaaa": return n[0]; case "aaaa": default: return n === "am" ? "a.m." : "p.m."; } }, // Hour [1-12] h(e, t) { return N(e.getHours() % 12 || 12, t.length); }, // Hour [0-23] H(e, t) { return N(e.getHours(), t.length); }, // Minute m(e, t) { return N(e.getMinutes(), t.length); }, // Second s(e, t) { return N(e.getSeconds(), t.length); }, // Fraction of second S(e, t) { const n = t.length, r = e.getMilliseconds(), a = Math.trunc( r * Math.pow(10, n - 3) ); return N(a, t.length); } }, ae = { midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night" }, Ve = { // Era G: function(e, t, n) { const r = e.getFullYear() > 0 ? 1 : 0; switch (t) { // AD, BC case "G": case "GG": case "GGG": return n.era(r, { width: "abbreviated" }); // A, B case "GGGGG": return n.era(r, { width: "narrow" }); // Anno Domini, Before Christ case "GGGG": default: return n.era(r, { width: "wide" }); } }, // Year y: function(e, t, n) { if (t === "yo") { const r = e.getFullYear(), a = r > 0 ? r : 1 - r; return n.ordinalNumber(a, { unit: "year" }); } return L.y(e, t); }, // Local week-numbering year Y: function(e, t, n, r) { const a = dt(e, r), o = a > 0 ? a : 1 - a; if (t === "YY") { const i = o % 100; return N(i, 2); } return t === "Yo" ? n.ordinalNumber(o, { unit: "year" }) : N(o, t.length); }, // ISO week-numbering year R: function(e, t) { const n = st(e); return N(n, t.length); }, // Extended year. This is a single number designating the year of this calendar system. // The main difference between `y` and `u` localizers are B.C. years: // | Year | `y` | `u` | // |------|-----|-----| // | AC 1 | 1 | 1 | // | BC 1 | 1 | 0 | // | BC 2 | 2 | -1 | // Also `yy` always returns the last two digits of a year, // while `uu` pads single digit years to 2 characters and returns other years unchanged. u: function(e, t) { const n = e.getFullYear(); return N(n, t.length); }, // Quarter Q: function(e, t, n) { const r = Math.ceil((e.getMonth() + 1) / 3); switch (t) { // 1, 2, 3, 4 case "Q": return String(r); // 01, 02, 03, 04 case "QQ": return N(r, 2); // 1st, 2nd, 3rd, 4th case "Qo": return n.ordinalNumber(r, { unit: "quarter" }); // Q1, Q2, Q3, Q4 case "QQQ": return n.quarter(r, { width: "abbreviated", context: "formatting" }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case "QQQQQ": return n.quarter(r, { width: "narrow", context: "formatting" }); // 1st quarter, 2nd quarter, ... case "QQQQ": default: return n.quarter(r, { width: "wide", context: "formatting" }); } }, // Stand-alone quarter q: function(e, t, n) { const r = Math.ceil((e.getMonth() + 1) / 3); switch (t) { // 1, 2, 3, 4 case "q": return String(r); // 01, 02, 03, 04 case "qq": return N(r, 2); // 1st, 2nd, 3rd, 4th case "qo": return n.ordinalNumber(r, { unit: "quarter" }); // Q1, Q2, Q3, Q4 case "qqq": return n.quarter(r, { width: "abbreviated", context: "standalone" }); // 1, 2, 3, 4 (narrow quarter; could be not numerical) case "qqqqq": return n.quarter(r, { width: "narrow", context: "standalone" }); // 1st quarter, 2nd quarter, ... case "qqqq": default: return n.quarter(r, { width: "wide", context: "standalone" }); } }, // Month M: function(e, t, n) { const r = e.getMonth(); switch (t) { case "M": case "MM": return L.M(e, t); // 1st, 2nd, ..., 12th case "Mo": return n.ordinalNumber(r + 1, { unit: "month" }); // Jan, Feb, ..., Dec case "MMM": return n.month(r, { width: "abbreviated", context: "formatting" }); // J, F, ..., D case "MMMMM": return n.month(r, { width: "narrow", context: "formatting" }); // January, February, ..., December case "MMMM": default: return n.month(r, { width: "wide", context: "formatting" }); } }, // Stand-alone month L: function(e, t, n) { const r = e.getMonth(); switch (t) { // 1, 2, ..., 12 case "L": return String(r + 1); // 01, 02, ..., 12 case "LL": return N(r + 1, 2); // 1st, 2nd, ..., 12th case "Lo": return n.ordinalNumber(r + 1, { unit: "month" }); // Jan, Feb, ..., Dec case "LLL": return n.month(r, { width: "abbreviated", context: "standalone" }); // J, F, ..., D case "LLLLL": return n.month(r, { width: "narrow", context: "standalone" }); // January, February, ..., December case "LLLL": default: return n.month(r, { width: "wide", context: "standalone" }); } }, // Local week of year w: function(e, t, n, r) { const a = lt(e, r); return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : N(a, t.length); }, // ISO week of year I: function(e, t, n) { const r = ft(e); return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : N(r, t.length); }, // Day of the month d: function(e, t, n) { return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : L.d(e, t); }, // Day of year D: function(e, t, n) { const r = sr(e); return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : N(r, t.length); }, // Day of week E: function(e, t, n) { const r = e.getDay(); switch (t) { // Tue case "E": case "EE": case "EEE": return n.day(r, { width: "abbreviated", context: "formatting" }); // T case "EEEEE": return n.day(r, { width: "narrow", context: "formatting" }); // Tu case "EEEEEE": return n.day(r, { width: "short", context: "formatting" }); // Tuesday case "EEEE": default: return n.day(r, { width: "wide", context: "formatting" }); } }, // Local day of week e: function(e, t, n, r) { const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7; switch (t) { // Numerical value (Nth day of week with current locale or weekStartsOn) case "e": return String(o); // Padded numerical value case "ee": return N(o, 2); // 1st, 2nd, ..., 7th case "eo": return n.ordinalNumber(o, { unit: "day" }); case "eee": return n.day(a, { width: "abbreviated", context: "formatting" }); // T case "eeeee": return n.day(a, { width: "narrow", context: "formatting" }); // Tu case "eeeeee": return n.day(a, { width: "short", context: "formatting" }); // Tuesday case "eeee": default: return n.day(a, { width: "wide", context: "formatting" }); } }, // Stand-alone local day of week c: function(e, t, n, r) { const a = e.getDay(), o = (a - r.weekStartsOn + 8) % 7 || 7; switch (t) { // Numerical value (same as in `e`) case "c": return String(o); // Padded numerical value case "cc": return N(o, t.length); // 1st, 2nd, ..., 7th case "co": return n.ordinalNumber(o, { unit: "day" }); case "ccc": return n.day(a, { width: "abbreviated", context: "standalone" }); // T case "ccccc": return n.day(a, { width: "narrow", context: "standalone" }); // Tu case "cccccc": return n.day(a, { width: "short", context: "standalone" }); // Tuesday case "cccc": default: return n.day(a, { width: "wide", context: "standalone" }); } }, // ISO day of week i: function(e, t, n) { const r = e.getDay(), a = r === 0 ? 7 : r; switch (t) { // 2 case "i": return String(a); // 02 case "ii": return N(a, t.length); // 2nd case "io": return n.ordinalNumber(a, { unit: "day" }); // Tue case "iii": return n.day(r, { width: "abbreviated", context: "formatting" }); // T case "iiiii": return n.day(r, { width: "narrow", context: "formatting" }); // Tu case "iiiiii": return n.day(r, { width: "short", context: "formatting" }); // Tuesday case "iiii": default: return n.day(r, { width: "wide", context: "formatting" }); } }, // AM or PM a: function(e, t, n) { const a = e.getHours() / 12 >= 1 ? "pm" : "am"; switch (t) { case "a": case "aa": return n.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "aaa": return n.dayPeriod(a, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "aaaaa": return n.dayPeriod(a, { width: "narrow", context: "formatting" }); case "aaaa": default: return n.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // AM, PM, midnight, noon b: function(e, t, n) { const r = e.getHours(); let a; switch (r === 12 ? a = ae.noon : r === 0 ? a = ae.midnight : a = r / 12 >= 1 ? "pm" : "am", t) { case "b": case "bb": return n.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "bbb": return n.dayPeriod(a, { width: "abbreviated", context: "formatting" }).toLowerCase(); case "bbbbb": return n.dayPeriod(a, { width: "narrow", context: "formatting" }); case "bbbb": default: return n.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // in the morning, in the afternoon, in the evening, at night B: function(e, t, n) { const r = e.getHours(); let a; switch (r >= 17 ? a = ae.evening : r >= 12 ? a = ae.afternoon : r >= 4 ? a = ae.morning : a = ae.night, t) { case "B": case "BB": case "BBB": return n.dayPeriod(a, { width: "abbreviated", context: "formatting" }); case "BBBBB": return n.dayPeriod(a, { width: "narrow", context: "formatting" }); case "BBBB": default: return n.dayPeriod(a, { width: "wide", context: "formatting" }); } }, // Hour [1-12] h: function(e, t, n) { if (t === "ho") { let r = e.getHours() % 12; return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" }); } return L.h(e, t); }, // Hour [0-23] H: function(e, t, n) { return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : L.H(e, t); }, // Hour [0-11] K: function(e, t, n) { const r = e.getHours() % 12; return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : N(r, t.length); }, // Hour [1-24] k: function(e, t, n) { let r = e.getHours(); return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : N(r, t.length); }, // Minute m: function(e, t, n) { return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : L.m(e, t); }, // Second s: function(e, t, n) { return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : L.s(e, t); }, // Fraction of second S: function(e, t) { return L.S(e, t); }, // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) X: function(e, t, n) { const r = e.getTimezoneOffset(); if (r === 0) return "Z"; switch (t) { // Hours and optional minutes case "X": return Ue(r); // Hours, minutes and optional seconds without `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `XX` case "XXXX": case "XX": return ee(r); // Hours, minutes and optional seconds with `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `XXX` case "XXXXX": case "XXX": // Hours and minutes with `:` delimiter default: return ee(r, ":"); } }, // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) x: function(e, t, n) { const r = e.getTimezoneOffset(); switch (t) { // Hours and optional minutes case "x": return Ue(r); // Hours, minutes and optional seconds without `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `xx` case "xxxx": case "xx": return ee(r); // Hours, minutes and optional seconds with `:` delimiter // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets // so this token always has the same output as `xxx` case "xxxxx": case "xxx": // Hours and minutes with `:` delimiter default: return ee(r, ":"); } }, // Timezone (GMT) O: function(e, t, n) { const r = e.getTimezoneOffset(); switch (t) { // Short case "O": case "OO": case "OOO": return "GMT" + Ze(r, ":"); // Long case "OOOO": default: return "GMT" + ee(r, ":"); } }, // Timezone (specific non-location) z: function(e, t, n) { const r = e.getTimezoneOffset(); switch (t) { // Short case "z": case "zz": case "zzz": return "GMT" + Ze(r, ":"); // Long case "zzzz": default: return "GMT" + ee(r, ":"); } }, // Seconds timestamp t: function(e, t, n) { const r = Math.trunc(+e / 1e3); return N(r, t.length); }, // Milliseconds timestamp T: function(e, t, n) { return N(+e, t.length); } }; function Ze(e, t = "") { const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), o = r % 60; return o === 0 ? n + String(a) : n + String(a) + t + N(o, 2); } function Ue(e, t) { return e % 60 === 0 ? (e > 0 ? "-" : "+") + N(Math.abs(e) / 60, 2) : ee(e, t); } function ee(e, t = "") { const n = e > 0 ? "-" : "+", r = Math.abs(e), a = N(Math.trunc(r / 60), 2), o = N(r % 60, 2); return n + a + t + o; } const Je = (e, t) => { switch (e) { case "P": return t.date({ width: "short" }); case "PP": return t.date({ width: "medium" }); case "PPP": return t.date({ width: "long" }); case "PPPP": default: return t.date({ width: "full" }); } }, ht = (e, t) => { switch (e) { case "p": return t.time({ width: "short" }); case "pp": return t.time({ width: "medium" }); case "ppp": return t.time({ width: "long" }); case "pppp": default: return t.time({ width: "full" }); } }, cr = (e, t) => { const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2]; if (!a) return Je(e, t); let o; switch (r) { case "P": o = t.dateTime({ width: "short" }); break; case "PP": o = t.dateTime({ width: "medium" }); break; case "PPP": o = t.dateTime({ width: "long" }); break; case "PPPP": default: o = t.dateTime({ width: "full" }); break; } return o.replace("{{date}}", Je(r, t)).replace("{{time}}", ht(a, t)); }, ur = { p: ht, P: cr }, fr = /^D+$/, dr = /^Y+$/, lr = ["D", "DD", "YY", "YYYY"]; function hr(e) { return fr.test(e); } function mr(e) { return dr.test(e); } function yr(e, t, n) { const r = gr(e, t, n); if (console.warn(r), lr.includes(e)) throw new RangeError(r); } function gr(e, t, n) { const r = e[0] === "Y" ? "years" : "days of the month"; return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; } const wr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, br = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Mr = /^'([^]*?)'?$/, Dr = /''/g, kr = /[a-zA-Z]/; function Or(e, t, n) { var l, d, h, g, b, O, M, D; const r = we(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? qe, o = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((d = (l = n == null ? void 0 : n.locale) == null ? void 0 : l.options) == null ? void 0 : d.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((g = (h = r.locale) == null ? void 0 : h.options) == null ? void 0 : g.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((O = (b = n == null ? void 0 : n.locale) == null ? void 0 : b.options) == null ? void 0 : O.weekStartsOn) ?? r.weekStartsOn ?? ((D = (M = r.locale) == null ? void 0 : M.options) == null ? void 0 : D.weekStartsOn) ?? 0, s = x(e, n == null ? void 0 : n.in); if (!Dn(s)) throw new RangeError("Invalid time value"); let c = t.match(br).map((u) => { const y = u[0]; if (y === "p" || y === "P") { const S = ur[y]; return S(u, a.formatLong); } return u; }).join("").match(wr).map((u) => { if (u === "''") return { isToken: !1, value: "'" }; const y = u[0]; if (y === "'") return { isToken: !1, value: vr(u) }; if (Ve[y]) return { isToken: !0, value: u }; if (y.match(kr)) throw new RangeError( "Format string contains an unescaped latin alphabet character `" + y + "`" ); return { isToken: !1, value: u }; }); a.localize.preprocessor && (c = a.localize.preprocessor(s, c)); const f = { firstWeekContainsDate: o, weekStartsOn: i, locale: a }; return c.map((u) => { if (!u.isToken) return u.value; const y = u.value; (!(n != null && n.useAdditionalWeekYearTokens) && mr(y) || !(n != null && n.useAdditionalDayOfYearTokens) && hr(y)) && yr(y, t, String(e)); const S = Ve[y[0]]; return S(s, y, a.localize, f); }).join(""); } function vr(e) { const t = e.match(Mr); return t ? t[1].replace(Dr, "'") : e; } function Wr(e, t) { const n = x(e, t == null ? void 0 : t.in), r = n.getFullYear(), a = n.getMonth(), o = F(n, 0); return o.setFullYear(r, a + 1, 0), o.setHours(0, 0, 0, 0), o.getDate(); } function Sr(e, t) { return x(e, t == null ? void 0 : t.in).getMonth(); } function Cr(e, t) { return x(e, t == null ? void 0 : t.in).getFullYear(); } function Nr(e, t) { return +x(e) > +x(t); } function xr(e, t) { return +x(e) < +x(t); } function Tr(e, t, n) { const [r, a] = ie( n == null ? void 0 : n.in, e, t ); return r.getFullYear() === a.getFullYear() && r.getMonth() === a.getMonth(); } function Yr(e, t, n) { const [r, a] = ie( n == null ? void 0 : n.in, e, t ); return r.getFullYear() === a.getFullYear(); } function mt(e, t, n) { const r = x(e, n == null ? void 0 : n.in), a = r.getFullYear(), o = r.getDate(), i = F(e, 0); i.setFullYear(a, t, 15), i.setHours(0, 0, 0, 0); const s = Wr(i); return r.setMonth(t, Math.min(o, s)), r; } function Pr(e, t, n) { let r = x(e, n == null ? void 0 : n.in); return isNaN(+r) ? F(e, NaN) : (t.year != null && r.setFullYear(t.year), t.month != null && (r = mt(r, t.month)), t.date != null && r.setDate(t.date), t.hours != null && r.setHours(t.hours), t.minutes != null && r.setMinutes(t.minutes), t.seconds != null && r.setSeconds(t.seconds), t.milliseconds != null && r.setMilliseconds(t.milliseconds), r); } function Er(e, t, n) { const r = x(e, n == null ? void 0 : n.in); return isNaN(+r) ? F(e, NaN) : (r.setFullYear(t), r); } var w; (function(e) { e.Root = "root", e.Chevron = "chevron", e.Day = "day", e.DayButton = "day_button", e.CaptionLabel = "caption_label", e.Dropdowns = "dropdowns", e.Dropdown = "dropdown", e.DropdownRoot = "dropdown_root", e.Footer = "footer", e.MonthGrid = "month_grid", e.MonthCaption = "month_caption", e.MonthsDropdown = "months_dropdown", e.Month = "month", e.Months = "months", e.Nav = "nav", e.NextMonthButton = "button_next", e.PreviousMonthButton = "button_previous", e.Week = "week", e.Weeks = "weeks", e.Weekday = "weekday", e.Weekdays = "weekdays", e.WeekNumber = "week_number", e.WeekNumberHeader = "week_number_header", e.YearsDropdown = "years_dropdown"; })(w || (w = {})); var P; (function(e) { e.disabled = "disabled", e.hidden = "hidden", e.outside = "outside", e.focused = "focused", e.today = "today"; })(P || (P = {})); var R; (function(e) { e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected"; })(R || (R = {})); var q; (function(e) { e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit"; })(q || (q = {})); const _e = {}, he = {}; function me(e, t) { try { const r = (_e[e] || (_e[e] = new Intl.DateTimeFormat("en-GB", { timeZone: e, hour: "numeric", timeZoneName: "longOffset" }).format))(t).split("GMT")[1] || ""; return r in he ? he[r] : Le(r, r.split(":")); } catch { if (e in he) return he[e]; const n = e == null ? void 0 : e.match(_r); return n ? Le(e, n.slice(1)) : NaN; } } const _r = /([+-]\d\d):?(\d\d)?/; function Le(e, t) { const n = +t[0], r = +(t[1] || 0); return he[e] = n > 0 ? n * 60 + r : n * 60 - r; } class Q extends Date { //#region static constructor(...t) { super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(me(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), yt(this), Ae(this)) : this.setTime(Date.now()); } static tz(t, ...n) { return n.length ? new Q(...n, t) : new Q(Date.now(), t); } //#endregion //#region time zone withTimeZone(t) { return new Q(+this, t); } getTimezoneOffset() { return -me(this.timeZone, this); } //#endregion //#region time setTime(t) { return Date.prototype.setTime.apply(this, arguments), Ae(this), +this; } //#endregion //#region date-fns integration [Symbol.for("constructDateFrom")](t) { return new Q(+new Date(t), this.timeZone); } //#endregion } const Ke = /^(get|set)(?!UTC)/; Object.getOwnPropertyNames(Date.prototype).forEach((e) => { if (!Ke.test(e)) return; const t = e.replace(Ke, "$1UTC"); Q.prototype[t] && (e.startsWith("get") ? Q.prototype[e] = function() { return this.internal[t](); } : (Q.prototype[e] = function() { return Date.prototype[t].apply(this.internal, arguments), Fr(this), +this; }, Q.prototype[t] = function() { return Date.prototype[t].apply(this, arguments), Ae(this), +this; })); }); function Ae(e) { e.internal.setTime(+e), e.internal.setUTCMinutes(e.internal.getUTCMinutes() - e.getTimezoneOffset()); } function Fr(e) { Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), yt(e); } function yt(e) { const t = me(e.timeZone, e), n = /* @__PURE__ */ new Date(+e); n.setUTCHours(n.getUTCHours() - 1); const r = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), a = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), o = r - a, i = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours(); o && i && e.internal.setUTCMinutes(e.internal.getUTCMinutes() + o); const s = r - t; s && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + s); const c = me(e.timeZone, e), l = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - c, d = c !== t, h = l - s; if (d && h) { Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + h); const g = me(e.timeZone, e), b = c - g; b && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + b), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + b)); } } class te extends Q { //#region static static tz(t, ...n) { return n.length ? new te(...n, t) : new te(Date.now(), t); } //#endregion //#region representation toISOString() { const [t, n, r] = this.tzComponents(), a = `${t}${n}:${r}`; return this.internal.toISOString().slice(0, -1) + a; } toString() { return `${this.toDateString()} ${this.toTimeString()}`; } toDateString() { const [t, n, r, a] = this.internal.toUTCString().split(" "); return `${t == null ? void 0 : t.slice(0, -1)} ${r} ${n} ${a}`; } toTimeString() { const t = this.internal.toUTCString().split(" ")[4], [n, r, a] = this.tzComponents(); return `${t} GMT${n}${r}${a} (${Br(this.timeZone, this)})`; } toLocaleString(t, n) { return Date.prototype.toLocaleString.call(this, t, { ...n, timeZone: (n == null ? void 0 : n.timeZone) || this.timeZone }); } toLocaleDateString(t, n) { return Date.prototype.toLocaleDateString.call(this, t, { ...n, timeZone: (n == null ? void 0 : n.timeZone) || this.timeZone }); } toLocaleTimeString(t, n) { return Date.prototype.toLocaleTimeString.call(this, t, { ...n, timeZone: (n == null ? void 0 : n.timeZone) || this.timeZone }); } //#endregion //#region private tzComponents() { const t = this.getTimezoneOffset(), n = t > 0 ? "-" : "+", r = String(Math.floor(Math.abs(t) / 60)).padStart(2, "0"), a = String(Math.abs(t) % 60).padStart(2, "0"); return [n, r, a]; } //#endregion withTimeZone(t) { return new te(+this, t); } //#region date-fns integration [Symbol.for("constructDateFrom")](t) { return new te(+new Date(t), this.timeZone); } //#endregion } function Br(e, t) { return new Intl.DateTimeFormat("en-GB", { timeZone: e, timeZoneName: "long" }).format(t).slice(12); } const et = 5, Ir = 4; function Hr(e, t) { const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, a = t.addDays(e, -r + 1), o = t.addDays(a, et * 7 - 1); return t.getMonth(e) === t.getMonth(o) ? et : Ir; } function gt(e, t) { const n = t.startOfMonth(e), r = n.getDay(); return r === 1 ? n : r === 0 ? t.addDays(n, -1 * 6) : t.addDays(n, -1 * (r - 1)); } function Ar(e, t) { const n = gt(e, t), r = Hr(e, t); return t.addDays(n, r * 7 - 1); } class Z { /** * Creates an instance of DateLib. * * @param options The options for the date library. * @param overrides Overrides for the date library functions. */ constructor(t, n) { this.Date = Date, this.today = () => { var r; return (r = this.overrides) != null && r.today ? this.overrides.today() : this.options.timeZone ? te.tz(this.options.timeZone) : new this.Date(); }, this.newDate = (r, a, o) => { var i; return (i = this.overrides) != null && i.newDate ? this.overrides.newDate(r, a, o) : this.options.timeZone ? new te(r, a, o, this.options.timeZone) : new Date(r, a, o); }, this.addDays = (r, a) => { var o; return (o = this.overrides) != null && o.addDays ? this.overrides.addDays(r, a) : at(r, a); }, this.addMonths = (r, a) => { var o; return (o = this.overrides) != null && o.addMonths ? this.overrides.addMonths(r, a) : ot(r, a); }, this.addWeeks = (r, a) => { var o; return (o = this.overrides) != null && o.addWeeks ? this.overrides.addWeeks(r, a) : yn(r, a); }, this.addYears = (r, a) => { var o; return (o = this.overrides) != null && o.addYears ? this.overrides.addYears(r, a) : gn(r, a); }, this.differenceInCalendarDays = (r, a) => { var o; return (o = this.overrides) != null && o.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, a) : it(r, a); }, this.differenceInCalendarMonths = (r, a) => { var o; return (o = this.overrides) != null && o.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, a) : kn(r, a); }, this.eachMonthOfInterval = (r) => { var a; return (a = this.overrides) != null && a.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : Wn(r); }, this.endOfBroadcastWeek = (r) => { var a; return (a = this.overrides) != null && a.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r, this) : Ar(r, this); }, this.endOfISOWeek = (r) => { var a; return (a = this.overrides) != null && a.endOfISOWeek ? this.overrides.endOfISOWeek(r) : Nn(r); }, this.endOfMonth = (r) => { var a; return (a = this.overrides) != null && a.endOfMonth ? this.overrides.endOfMonth(r) : On(r); }, this.endOfWeek = (r) => { var a; return (a = this.overrides) != null && a.endOfWeek ? this.overrides.endOfWeek(r, this.options) : ut(r, this.options); }, this.endOfYear = (r) => { var a; return (a = this.overrides) != null && a.endOfYear ? this.overrides.endOfYear(r) : Cn(r); }, this.format = (r, a) => { var i; const o = (i = this.overrides) != null && i.format ? this.overrides.format(r, a, this.options) : Or(r, a, this.options); return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(o) : o; }, this.getISOWeek = (r) => { var a; return (a = this.overrides) != null && a.getISOWeek ? this.overrides.getISOWeek(r) : ft(r); }, this.getMonth = (r) => { var a; return (a = this.overrides) != null && a.getMonth ? this.overrides.getMonth(r, this.options) : Sr(r, this.options); }, this.getYear = (r) => { var a; return (a = this.overrides) != null && a.getYear ? this.overrides.getYear(r, this.options) : Cr(r, this.options); }, this.getWeek = (r) => { var a; return (a = this.overrides) != null && a.getWeek ? this.overrides.getWeek(r, this.options) : lt(r, this.options); }, this.isAfter = (r, a) => { var o; return (o = this.overrides) != null && o.isAfter ? this.overrides.isAfter(r, a) : Nr(r, a); }, this.isBefore = (r, a) => { var o; return (o = this.overrides) != null && o.isBefore ? this.overrides.isBefore(r, a) : xr(r, a); }, this.isDate = (r) => { var a; return (a = this.overrides) != null && a.isDate ? this.overrides.isDate(r) : Se(r); }, this.isSameDay = (r, a) => { var o; return (o = this.overrides) != null && o.isSameDay ? this.overrides.isSameDay(r, a) : Mn(r, a); }, this.isSameMonth = (r, a) => { var o; return (o = this.overrides) != null && o.isSameMonth ? this.overrides.isSameMonth(r, a) : Tr(r, a); }, this.isSameYear = (r, a) => { var o; return (o = this.overrides) != null && o.isSameYear ? this.overrides.isSameYear(r, a) : Yr(r, a); }, this.max = (r) => { var a; return (a = this.overrides) != null && a.max ? this.overrides.max(r) : wn(r); }, this.min = (r) => { var a; return (a = this.overrides) != null && a.min ? this.overrides.min(r) : bn(r); }, this.setMonth = (r, a) => { var o; return (o = this.overrides) != null && o.setMonth ? this.overrides.setMonth(r, a) : mt(r, a); }, this.s