const he = {
  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"
  }
}, ge = (e, t, n) => {
  let r;
  const a = he[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 C(e) {
  return (t = {}) => {
    const n = t.width ? String(t.width) : e.defaultWidth;
    return e.formats[n] || e.formats[e.defaultWidth];
  };
}
const we = {
  full: "EEEE, MMMM do, y",
  long: "MMMM do, y",
  medium: "MMM d, y",
  short: "MM/dd/yyyy"
}, ye = {
  full: "h:mm:ss a zzzz",
  long: "h:mm:ss a z",
  medium: "h:mm:ss a",
  short: "h:mm a"
}, be = {
  full: "{{date}} 'at' {{time}}",
  long: "{{date}} 'at' {{time}}",
  medium: "{{date}}, {{time}}",
  short: "{{date}}, {{time}}"
}, De = {
  date: C({
    formats: we,
    defaultWidth: "full"
  }),
  time: C({
    formats: ye,
    defaultWidth: "full"
  }),
  dateTime: C({
    formats: be,
    defaultWidth: "full"
  })
}, Me = {
  lastWeek: "'last' eeee 'at' p",
  yesterday: "'yesterday at' p",
  today: "'today at' p",
  tomorrow: "'tomorrow at' p",
  nextWeek: "eeee 'at' p",
  other: "P"
}, Oe = (e, t, n, r) => Me[e];
function Y(e) {
  return (t, n) => {
    const r = n != null && n.context ? String(n.context) : "standalone";
    let a;
    if (r === "formatting" && e.formattingValues) {
      const o = e.defaultFormattingWidth || e.defaultWidth, s = n != null && n.width ? String(n.width) : o;
      a = e.formattingValues[s] || e.formattingValues[o];
    } else {
      const o = e.defaultWidth, s = n != null && n.width ? String(n.width) : e.defaultWidth;
      a = e.values[s] || e.values[o];
    }
    const i = e.argumentCallback ? e.argumentCallback(t) : t;
    return a[i];
  };
}
const Te = {
  narrow: ["B", "A"],
  abbreviated: ["BC", "AD"],
  wide: ["Before Christ", "Anno Domini"]
}, xe = {
  narrow: ["1", "2", "3", "4"],
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
}, Ye = {
  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"
  ]
}, Ne = {
  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"
  ]
}, Pe = {
  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"
  }
}, pe = {
  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"
  }
}, ke = (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";
}, We = {
  ordinalNumber: ke,
  era: Y({
    values: Te,
    defaultWidth: "wide"
  }),
  quarter: Y({
    values: xe,
    defaultWidth: "wide",
    argumentCallback: (e) => e - 1
  }),
  month: Y({
    values: Ye,
    defaultWidth: "wide"
  }),
  day: Y({
    values: Ne,
    defaultWidth: "wide"
  }),
  dayPeriod: Y({
    values: Pe,
    defaultWidth: "wide",
    formattingValues: pe,
    defaultFormattingWidth: "wide"
  })
};
function N(e) {
  return (t, n = {}) => {
    const r = n.width, a = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], i = t.match(a);
    if (!i)
      return null;
    const o = i[0], s = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(s) ? Se(s, (w) => w.test(o)) : (
      // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
      ve(s, (w) => w.test(o))
    );
    let f;
    f = e.valueCallback ? e.valueCallback(c) : c, f = n.valueCallback ? (
      // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
      n.valueCallback(f)
    ) : f;
    const m = t.slice(o.length);
    return { value: f, rest: m };
  };
}
function ve(e, t) {
  for (const n in e)
    if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
      return n;
}
function Se(e, t) {
  for (let n = 0; n < e.length; n++)
    if (t(e[n]))
      return n;
}
function Ie(e) {
  return (t, n = {}) => {
    const r = t.match(e.matchPattern);
    if (!r) return null;
    const a = r[0], i = t.match(e.parsePattern);
    if (!i) return null;
    let o = e.valueCallback ? e.valueCallback(i[0]) : i[0];
    o = n.valueCallback ? n.valueCallback(o) : o;
    const s = t.slice(a.length);
    return { value: o, rest: s };
  };
}
const Ce = /^(\d+)(th|st|nd|rd)?/i, Fe = /\d+/i, Ee = {
  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
}, He = {
  any: [/^b/i, /^(a|c)/i]
}, _e = {
  narrow: /^[1234]/i,
  abbreviated: /^q[1234]/i,
  wide: /^[1234](th|st|nd|rd)? quarter/i
}, Xe = {
  any: [/1/i, /2/i, /3/i, /4/i]
}, $e = {
  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
}, Le = {
  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
  ]
}, qe = {
  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
}, ze = {
  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]
}, Ue = {
  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
}, Ae = {
  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
  }
}, je = {
  ordinalNumber: Ie({
    matchPattern: Ce,
    parsePattern: Fe,
    valueCallback: (e) => parseInt(e, 10)
  }),
  era: N({
    matchPatterns: Ee,
    defaultMatchWidth: "wide",
    parsePatterns: He,
    defaultParseWidth: "any"
  }),
  quarter: N({
    matchPatterns: _e,
    defaultMatchWidth: "wide",
    parsePatterns: Xe,
    defaultParseWidth: "any",
    valueCallback: (e) => e + 1
  }),
  month: N({
    matchPatterns: $e,
    defaultMatchWidth: "wide",
    parsePatterns: Le,
    defaultParseWidth: "any"
  }),
  day: N({
    matchPatterns: qe,
    defaultMatchWidth: "wide",
    parsePatterns: ze,
    defaultParseWidth: "any"
  }),
  dayPeriod: N({
    matchPatterns: Ue,
    defaultMatchWidth: "any",
    parsePatterns: Ae,
    defaultParseWidth: "any"
  })
}, Ze = {
  code: "en-US",
  formatDistance: ge,
  formatLong: De,
  formatRelative: Oe,
  localize: We,
  match: je,
  options: {
    weekStartsOn: 0,
    firstWeekContainsDate: 1
  }
};
let Re = {};
function p() {
  return Re;
}
const ue = 6048e5, Qe = 864e5, Qt = 6e4, Gt = 36e5, Bt = 43200, Vt = 1440;
function g(e) {
  const t = Object.prototype.toString.call(e);
  return e instanceof Date || typeof e == "object" && t === "[object Date]" ? new e.constructor(+e) : typeof e == "number" || t === "[object Number]" || typeof e == "string" || t === "[object String]" ? new Date(e) : /* @__PURE__ */ new Date(NaN);
}
function j(e) {
  const t = g(e);
  return t.setHours(0, 0, 0, 0), t;
}
function Z(e) {
  const t = g(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 Ge(e, t) {
  const n = j(e), r = j(t), a = +n - Z(n), i = +r - Z(r);
  return Math.round((a - i) / Qe);
}
function D(e, t) {
  return e instanceof Date ? new e.constructor(t) : new Date(t);
}
function Be(e) {
  const t = g(e), n = D(e, 0);
  return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
}
function Ve(e) {
  const t = g(e);
  return Ge(t, Be(t)) + 1;
}
function P(e, t) {
  var s, c, f, m;
  const n = p(), 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 ?? ((m = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : m.weekStartsOn) ?? 0, a = g(e), i = a.getDay(), o = (i < r ? 7 : 0) + i - r;
  return a.setDate(a.getDate() - o), a.setHours(0, 0, 0, 0), a;
}
function k(e) {
  return P(e, { weekStartsOn: 1 });
}
function ce(e) {
  const t = g(e), n = t.getFullYear(), r = D(e, 0);
  r.setFullYear(n + 1, 0, 4), r.setHours(0, 0, 0, 0);
  const a = k(r), i = D(e, 0);
  i.setFullYear(n, 0, 4), i.setHours(0, 0, 0, 0);
  const o = k(i);
  return t.getTime() >= a.getTime() ? n + 1 : t.getTime() >= o.getTime() ? n : n - 1;
}
function Je(e) {
  const t = ce(e), n = D(e, 0);
  return n.setFullYear(t, 0, 4), n.setHours(0, 0, 0, 0), k(n);
}
function Ke(e) {
  const t = g(e), n = +k(t) - +Je(t);
  return Math.round(n / ue) + 1;
}
function fe(e, t) {
  var m, w, T, x;
  const n = g(e), r = n.getFullYear(), a = p(), i = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((w = (m = t == null ? void 0 : t.locale) == null ? void 0 : m.options) == null ? void 0 : w.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((x = (T = a.locale) == null ? void 0 : T.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, o = D(e, 0);
  o.setFullYear(r + 1, 0, i), o.setHours(0, 0, 0, 0);
  const s = P(o, t), c = D(e, 0);
  c.setFullYear(r, 0, i), c.setHours(0, 0, 0, 0);
  const f = P(c, t);
  return n.getTime() >= s.getTime() ? r + 1 : n.getTime() >= f.getTime() ? r : r - 1;
}
function et(e, t) {
  var s, c, f, m;
  const n = p(), 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 ?? ((m = (f = n.locale) == null ? void 0 : f.options) == null ? void 0 : m.firstWeekContainsDate) ?? 1, a = fe(e, t), i = D(e, 0);
  return i.setFullYear(a, 0, r), i.setHours(0, 0, 0, 0), P(i, t);
}
function tt(e, t) {
  const n = g(e), r = +P(n, t) - +et(n, t);
  return Math.round(r / ue) + 1;
}
function u(e, t) {
  const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
  return n + r;
}
const y = {
  // Year
  y(e, t) {
    const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
    return u(t === "yy" ? r % 100 : r, t.length);
  },
  // Month
  M(e, t) {
    const n = e.getMonth();
    return t === "M" ? String(n + 1) : u(n + 1, 2);
  },
  // Day of the month
  d(e, t) {
    return u(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 u(e.getHours() % 12 || 12, t.length);
  },
  // Hour [0-23]
  H(e, t) {
    return u(e.getHours(), t.length);
  },
  // Minute
  m(e, t) {
    return u(e.getMinutes(), t.length);
  },
  // Second
  s(e, t) {
    return u(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 u(a, t.length);
  }
}, M = {
  midnight: "midnight",
  noon: "noon",
  morning: "morning",
  afternoon: "afternoon",
  evening: "evening",
  night: "night"
}, R = {
  // Era
  G: function(e, t, n) {
    const r = e.getFullYear() > 0 ? 1 : 0;
    switch (t) {
      case "G":
      case "GG":
      case "GGG":
        return n.era(r, { width: "abbreviated" });
      case "GGGGG":
        return n.era(r, { width: "narrow" });
      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 y.y(e, t);
  },
  // Local week-numbering year
  Y: function(e, t, n, r) {
    const a = fe(e, r), i = a > 0 ? a : 1 - a;
    if (t === "YY") {
      const o = i % 100;
      return u(o, 2);
    }
    return t === "Yo" ? n.ordinalNumber(i, { unit: "year" }) : u(i, t.length);
  },
  // ISO week-numbering year
  R: function(e, t) {
    const n = ce(e);
    return u(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 u(n, t.length);
  },
  // Quarter
  Q: function(e, t, n) {
    const r = Math.ceil((e.getMonth() + 1) / 3);
    switch (t) {
      case "Q":
        return String(r);
      case "QQ":
        return u(r, 2);
      case "Qo":
        return n.ordinalNumber(r, { unit: "quarter" });
      case "QQQ":
        return n.quarter(r, {
          width: "abbreviated",
          context: "formatting"
        });
      case "QQQQQ":
        return n.quarter(r, {
          width: "narrow",
          context: "formatting"
        });
      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) {
      case "q":
        return String(r);
      case "qq":
        return u(r, 2);
      case "qo":
        return n.ordinalNumber(r, { unit: "quarter" });
      case "qqq":
        return n.quarter(r, {
          width: "abbreviated",
          context: "standalone"
        });
      case "qqqqq":
        return n.quarter(r, {
          width: "narrow",
          context: "standalone"
        });
      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 y.M(e, t);
      case "Mo":
        return n.ordinalNumber(r + 1, { unit: "month" });
      case "MMM":
        return n.month(r, {
          width: "abbreviated",
          context: "formatting"
        });
      case "MMMMM":
        return n.month(r, {
          width: "narrow",
          context: "formatting"
        });
      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) {
      case "L":
        return String(r + 1);
      case "LL":
        return u(r + 1, 2);
      case "Lo":
        return n.ordinalNumber(r + 1, { unit: "month" });
      case "LLL":
        return n.month(r, {
          width: "abbreviated",
          context: "standalone"
        });
      case "LLLLL":
        return n.month(r, {
          width: "narrow",
          context: "standalone"
        });
      case "LLLL":
      default:
        return n.month(r, { width: "wide", context: "standalone" });
    }
  },
  // Local week of year
  w: function(e, t, n, r) {
    const a = tt(e, r);
    return t === "wo" ? n.ordinalNumber(a, { unit: "week" }) : u(a, t.length);
  },
  // ISO week of year
  I: function(e, t, n) {
    const r = Ke(e);
    return t === "Io" ? n.ordinalNumber(r, { unit: "week" }) : u(r, t.length);
  },
  // Day of the month
  d: function(e, t, n) {
    return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : y.d(e, t);
  },
  // Day of year
  D: function(e, t, n) {
    const r = Ve(e);
    return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : u(r, t.length);
  },
  // Day of week
  E: function(e, t, n) {
    const r = e.getDay();
    switch (t) {
      case "E":
      case "EE":
      case "EEE":
        return n.day(r, {
          width: "abbreviated",
          context: "formatting"
        });
      case "EEEEE":
        return n.day(r, {
          width: "narrow",
          context: "formatting"
        });
      case "EEEEEE":
        return n.day(r, {
          width: "short",
          context: "formatting"
        });
      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(), i = (a - r.weekStartsOn + 8) % 7 || 7;
    switch (t) {
      case "e":
        return String(i);
      case "ee":
        return u(i, 2);
      case "eo":
        return n.ordinalNumber(i, { unit: "day" });
      case "eee":
        return n.day(a, {
          width: "abbreviated",
          context: "formatting"
        });
      case "eeeee":
        return n.day(a, {
          width: "narrow",
          context: "formatting"
        });
      case "eeeeee":
        return n.day(a, {
          width: "short",
          context: "formatting"
        });
      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(), i = (a - r.weekStartsOn + 8) % 7 || 7;
    switch (t) {
      case "c":
        return String(i);
      case "cc":
        return u(i, t.length);
      case "co":
        return n.ordinalNumber(i, { unit: "day" });
      case "ccc":
        return n.day(a, {
          width: "abbreviated",
          context: "standalone"
        });
      case "ccccc":
        return n.day(a, {
          width: "narrow",
          context: "standalone"
        });
      case "cccccc":
        return n.day(a, {
          width: "short",
          context: "standalone"
        });
      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) {
      case "i":
        return String(a);
      case "ii":
        return u(a, t.length);
      case "io":
        return n.ordinalNumber(a, { unit: "day" });
      case "iii":
        return n.day(r, {
          width: "abbreviated",
          context: "formatting"
        });
      case "iiiii":
        return n.day(r, {
          width: "narrow",
          context: "formatting"
        });
      case "iiiiii":
        return n.day(r, {
          width: "short",
          context: "formatting"
        });
      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 = M.noon : r === 0 ? a = M.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 = M.evening : r >= 12 ? a = M.afternoon : r >= 4 ? a = M.morning : a = M.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 y.h(e, t);
  },
  // Hour [0-23]
  H: function(e, t, n) {
    return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : y.H(e, t);
  },
  // Hour [0-11]
  K: function(e, t, n) {
    const r = e.getHours() % 12;
    return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : u(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" }) : u(r, t.length);
  },
  // Minute
  m: function(e, t, n) {
    return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : y.m(e, t);
  },
  // Second
  s: function(e, t, n) {
    return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : y.s(e, t);
  },
  // Fraction of second
  S: function(e, t) {
    return y.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) {
      case "X":
        return G(r);
      case "XXXX":
      case "XX":
        return b(r);
      case "XXXXX":
      case "XXX":
      default:
        return b(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) {
      case "x":
        return G(r);
      case "xxxx":
      case "xx":
        return b(r);
      case "xxxxx":
      case "xxx":
      default:
        return b(r, ":");
    }
  },
  // Timezone (GMT)
  O: function(e, t, n) {
    const r = e.getTimezoneOffset();
    switch (t) {
      case "O":
      case "OO":
      case "OOO":
        return "GMT" + Q(r, ":");
      case "OOOO":
      default:
        return "GMT" + b(r, ":");
    }
  },
  // Timezone (specific non-location)
  z: function(e, t, n) {
    const r = e.getTimezoneOffset();
    switch (t) {
      case "z":
      case "zz":
      case "zzz":
        return "GMT" + Q(r, ":");
      case "zzzz":
      default:
        return "GMT" + b(r, ":");
    }
  },
  // Seconds timestamp
  t: function(e, t, n) {
    const r = Math.trunc(e.getTime() / 1e3);
    return u(r, t.length);
  },
  // Milliseconds timestamp
  T: function(e, t, n) {
    const r = e.getTime();
    return u(r, t.length);
  }
};
function Q(e, t = "") {
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.trunc(r / 60), i = r % 60;
  return i === 0 ? n + String(a) : n + String(a) + t + u(i, 2);
}
function G(e, t) {
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + u(Math.abs(e) / 60, 2) : b(e, t);
}
function b(e, t = "") {
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = u(Math.trunc(r / 60), 2), i = u(r % 60, 2);
  return n + a + t + i;
}
const B = (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" });
  }
}, de = (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" });
  }
}, nt = (e, t) => {
  const n = e.match(/(P+)(p+)?/) || [], r = n[1], a = n[2];
  if (!a)
    return B(e, t);
  let i;
  switch (r) {
    case "P":
      i = t.dateTime({ width: "short" });
      break;
    case "PP":
      i = t.dateTime({ width: "medium" });
      break;
    case "PPP":
      i = t.dateTime({ width: "long" });
      break;
    case "PPPP":
    default:
      i = t.dateTime({ width: "full" });
      break;
  }
  return i.replace("{{date}}", B(r, t)).replace("{{time}}", de(a, t));
}, rt = {
  p: de,
  P: nt
}, at = /^D+$/, it = /^Y+$/, ot = ["D", "DD", "YY", "YYYY"];
function st(e) {
  return at.test(e);
}
function ut(e) {
  return it.test(e);
}
function ct(e, t, n) {
  const r = ft(e, t, n);
  if (console.warn(r), ot.includes(e)) throw new RangeError(r);
}
function ft(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`;
}
function dt(e) {
  return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
}
function lt(e) {
  if (!dt(e) && typeof e != "number")
    return !1;
  const t = g(e);
  return !isNaN(Number(t));
}
const mt = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ht = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, gt = /^'([^]*?)'?$/, wt = /''/g, yt = /[a-zA-Z]/;
function bt(e, t, n) {
  var m, w, T, x, q, z, U, A;
  const r = p(), a = (n == null ? void 0 : n.locale) ?? r.locale ?? Ze, i = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((w = (m = n == null ? void 0 : n.locale) == null ? void 0 : m.options) == null ? void 0 : w.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((x = (T = r.locale) == null ? void 0 : T.options) == null ? void 0 : x.firstWeekContainsDate) ?? 1, o = (n == null ? void 0 : n.weekStartsOn) ?? ((z = (q = n == null ? void 0 : n.locale) == null ? void 0 : q.options) == null ? void 0 : z.weekStartsOn) ?? r.weekStartsOn ?? ((A = (U = r.locale) == null ? void 0 : U.options) == null ? void 0 : A.weekStartsOn) ?? 0, s = g(e);
  if (!lt(s))
    throw new RangeError("Invalid time value");
  let c = t.match(ht).map((h) => {
    const l = h[0];
    if (l === "p" || l === "P") {
      const I = rt[l];
      return I(h, a.formatLong);
    }
    return h;
  }).join("").match(mt).map((h) => {
    if (h === "''")
      return { isToken: !1, value: "'" };
    const l = h[0];
    if (l === "'")
      return { isToken: !1, value: Dt(h) };
    if (R[l])
      return { isToken: !0, value: h };
    if (l.match(yt))
      throw new RangeError(
        "Format string contains an unescaped latin alphabet character `" + l + "`"
      );
    return { isToken: !1, value: h };
  });
  a.localize.preprocessor && (c = a.localize.preprocessor(s, c));
  const f = {
    firstWeekContainsDate: i,
    weekStartsOn: o,
    locale: a
  };
  return c.map((h) => {
    if (!h.isToken) return h.value;
    const l = h.value;
    (!(n != null && n.useAdditionalWeekYearTokens) && ut(l) || !(n != null && n.useAdditionalDayOfYearTokens) && st(l)) && ct(l, t, String(e));
    const I = R[l[0]];
    return I(s, l, a.localize, f);
  }).join("");
}
function Dt(e) {
  const t = e.match(gt);
  return t ? t[1].replace(wt, "'") : e;
}
function Mt() {
  return Object.assign({}, p());
}
function V(e, t, n) {
  const r = Mt(), a = xt(e, n.timeZone, n.locale ?? r.locale);
  return "formatToParts" in a ? Ot(a, t) : Tt(a, t);
}
function Ot(e, t) {
  const n = e.formatToParts(t);
  for (let r = n.length - 1; r >= 0; --r)
    if (n[r].type === "timeZoneName")
      return n[r].value;
}
function Tt(e, t) {
  const n = e.format(t).replace(/\u200E/g, ""), r = / [\w-+ ]+$/.exec(n);
  return r ? r[0].substr(1) : "";
}
function xt(e, t, n) {
  return new Intl.DateTimeFormat(n ? [n.code, "en-US"] : void 0, {
    timeZone: t,
    timeZoneName: e
  });
}
function Yt(e, t) {
  const n = Wt(t);
  return "formatToParts" in n ? Pt(n, e) : pt(n, e);
}
const Nt = {
  year: 0,
  month: 1,
  day: 2,
  hour: 3,
  minute: 4,
  second: 5
};
function Pt(e, t) {
  try {
    const n = e.formatToParts(t), r = [];
    for (let a = 0; a < n.length; a++) {
      const i = Nt[n[a].type];
      i !== void 0 && (r[i] = parseInt(n[a].value, 10));
    }
    return r;
  } catch (n) {
    if (n instanceof RangeError)
      return [NaN];
    throw n;
  }
}
function pt(e, t) {
  const n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
  return [
    parseInt(r[3], 10),
    parseInt(r[1], 10),
    parseInt(r[2], 10),
    parseInt(r[4], 10),
    parseInt(r[5], 10),
    parseInt(r[6], 10)
  ];
}
const F = {}, J = new Intl.DateTimeFormat("en-US", {
  hourCycle: "h23",
  timeZone: "America/New_York",
  year: "numeric",
  month: "2-digit",
  day: "2-digit",
  hour: "2-digit",
  minute: "2-digit",
  second: "2-digit"
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), kt = J === "06/25/2014, 00:00:00" || J === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
function Wt(e) {
  return F[e] || (F[e] = kt ? new Intl.DateTimeFormat("en-US", {
    hourCycle: "h23",
    timeZone: e,
    year: "numeric",
    month: "numeric",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit",
    second: "2-digit"
  }) : new Intl.DateTimeFormat("en-US", {
    hour12: !1,
    timeZone: e,
    year: "numeric",
    month: "numeric",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit",
    second: "2-digit"
  })), F[e];
}
function L(e, t, n, r, a, i, o) {
  const s = /* @__PURE__ */ new Date(0);
  return s.setUTCFullYear(e, t, n), s.setUTCHours(r, a, i, o), s;
}
const K = 36e5, vt = 6e4, E = {
  timezoneZ: /^(Z)$/,
  timezoneHH: /^([+-]\d{2})$/,
  timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
};
function S(e, t, n) {
  if (!e)
    return 0;
  let r = E.timezoneZ.exec(e);
  if (r)
    return 0;
  let a, i;
  if (r = E.timezoneHH.exec(e), r)
    return a = parseInt(r[1], 10), ee(a) ? -(a * K) : NaN;
  if (r = E.timezoneHHMM.exec(e), r) {
    a = parseInt(r[2], 10);
    const o = parseInt(r[3], 10);
    return ee(a, o) ? (i = Math.abs(a) * K + o * vt, r[1] === "+" ? -i : i) : NaN;
  }
  if (Ct(e)) {
    t = new Date(t || Date.now());
    const o = n ? t : St(t), s = $(o, e);
    return -(n ? s : It(t, s, e));
  }
  return NaN;
}
function St(e) {
  return L(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
}
function $(e, t) {
  const n = Yt(e, t), r = L(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
  let a = e.getTime();
  const i = a % 1e3;
  return a -= i >= 0 ? i : 1e3 + i, r - a;
}
function It(e, t, n) {
  let a = e.getTime() - t;
  const i = $(new Date(a), n);
  if (t === i)
    return t;
  a -= i - t;
  const o = $(new Date(a), n);
  return i === o ? i : Math.max(i, o);
}
function ee(e, t) {
  return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
}
const te = {};
function Ct(e) {
  if (te[e])
    return !0;
  try {
    return new Intl.DateTimeFormat(void 0, { timeZone: e }), te[e] = !0, !0;
  } catch {
    return !1;
  }
}
const Ft = 60 * 1e3, Et = {
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
  X: function(e, t, n) {
    const r = H(n.timeZone, e);
    if (r === 0)
      return "Z";
    switch (t) {
      case "X":
        return ne(r);
      case "XXXX":
      case "XX":
        return O(r);
      case "XXXXX":
      case "XXX":
      default:
        return O(r, ":");
    }
  },
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
  x: function(e, t, n) {
    const r = H(n.timeZone, e);
    switch (t) {
      case "x":
        return ne(r);
      case "xxxx":
      case "xx":
        return O(r);
      case "xxxxx":
      case "xxx":
      default:
        return O(r, ":");
    }
  },
  // Timezone (GMT)
  O: function(e, t, n) {
    const r = H(n.timeZone, e);
    switch (t) {
      case "O":
      case "OO":
      case "OOO":
        return "GMT" + Ht(r, ":");
      case "OOOO":
      default:
        return "GMT" + O(r, ":");
    }
  },
  // Timezone (specific non-location)
  z: function(e, t, n) {
    switch (t) {
      case "z":
      case "zz":
      case "zzz":
        return V("short", e, n);
      case "zzzz":
      default:
        return V("long", e, n);
    }
  }
};
function H(e, t) {
  const n = e ? S(e, t, !0) / Ft : (t == null ? void 0 : t.getTimezoneOffset()) ?? 0;
  if (Number.isNaN(n))
    throw new RangeError("Invalid time zone specified: " + e);
  return n;
}
function W(e, t) {
  const n = e < 0 ? "-" : "";
  let r = Math.abs(e).toString();
  for (; r.length < t; )
    r = "0" + r;
  return n + r;
}
function O(e, t = "") {
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = W(Math.floor(r / 60), 2), i = W(Math.floor(r % 60), 2);
  return n + a + t + i;
}
function ne(e, t) {
  return e % 60 === 0 ? (e > 0 ? "-" : "+") + W(Math.abs(e) / 60, 2) : O(e, t);
}
function Ht(e, t = "") {
  const n = e > 0 ? "-" : "+", r = Math.abs(e), a = Math.floor(r / 60), i = r % 60;
  return i === 0 ? n + String(a) : n + String(a) + t + W(i, 2);
}
function re(e) {
  const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
  return t.setUTCFullYear(e.getFullYear()), +e - +t;
}
const le = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, _ = 36e5, ae = 6e4, _t = 2, d = {
  dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
  datePattern: /^([0-9W+-]+)(.*)/,
  // year tokens
  YY: /^(\d{2})$/,
  YYY: [
    /^([+-]\d{2})$/,
    // 0 additional digits
    /^([+-]\d{3})$/,
    // 1 additional digit
    /^([+-]\d{4})$/
    // 2 additional digits
  ],
  YYYY: /^(\d{4})/,
  YYYYY: [
    /^([+-]\d{4})/,
    // 0 additional digits
    /^([+-]\d{5})/,
    // 1 additional digit
    /^([+-]\d{6})/
    // 2 additional digits
  ],
  // date tokens
  MM: /^-(\d{2})$/,
  DDD: /^-?(\d{3})$/,
  MMDD: /^-?(\d{2})-?(\d{2})$/,
  Www: /^-?W(\d{2})$/,
  WwwD: /^-?W(\d{2})-?(\d{1})$/,
  HH: /^(\d{2}([.,]\d*)?)$/,
  HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
  HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
  // time zone tokens (to identify the presence of a tz)
  timeZone: le
};
function v(e, t = {}) {
  if (arguments.length < 1)
    throw new TypeError("1 argument required, but only " + arguments.length + " present");
  if (e === null)
    return /* @__PURE__ */ new Date(NaN);
  const n = t.additionalDigits == null ? _t : Number(t.additionalDigits);
  if (n !== 2 && n !== 1 && n !== 0)
    throw new RangeError("additionalDigits must be 0, 1 or 2");
  if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
    return new Date(e.getTime());
  if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]")
    return new Date(e);
  if (Object.prototype.toString.call(e) !== "[object String]")
    return /* @__PURE__ */ new Date(NaN);
  const r = Xt(e), { year: a, restDateString: i } = $t(r.date, n), o = Lt(i, a);
  if (o === null || isNaN(o.getTime()))
    return /* @__PURE__ */ new Date(NaN);
  if (o) {
    const s = o.getTime();
    let c = 0, f;
    if (r.time && (c = qt(r.time), c === null || isNaN(c)))
      return /* @__PURE__ */ new Date(NaN);
    if (r.timeZone || t.timeZone) {
      if (f = S(r.timeZone || t.timeZone, new Date(s + c)), isNaN(f))
        return /* @__PURE__ */ new Date(NaN);
    } else
      f = re(new Date(s + c)), f = re(new Date(s + c + f));
    return new Date(s + c + f);
  } else
    return /* @__PURE__ */ new Date(NaN);
}
function Xt(e) {
  const t = {};
  let n = d.dateTimePattern.exec(e), r;
  if (n ? (t.date = n[1], r = n[3]) : (n = d.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
    const a = d.timeZone.exec(r);
    a ? (t.time = r.replace(a[1], ""), t.timeZone = a[1].trim()) : t.time = r;
  }
  return t;
}
function $t(e, t) {
  if (e) {
    const n = d.YYY[t], r = d.YYYYY[t];
    let a = d.YYYY.exec(e) || r.exec(e);
    if (a) {
      const i = a[1];
      return {
        year: parseInt(i, 10),
        restDateString: e.slice(i.length)
      };
    }
    if (a = d.YY.exec(e) || n.exec(e), a) {
      const i = a[1];
      return {
        year: parseInt(i, 10) * 100,
        restDateString: e.slice(i.length)
      };
    }
  }
  return {
    year: null
  };
}
function Lt(e, t) {
  if (t === null)
    return null;
  let n, r, a;
  if (!e || !e.length)
    return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
  let i = d.MM.exec(e);
  if (i)
    return n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1, oe(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
  if (i = d.DDD.exec(e), i) {
    n = /* @__PURE__ */ new Date(0);
    const o = parseInt(i[1], 10);
    return At(t, o) ? (n.setUTCFullYear(t, 0, o), n) : /* @__PURE__ */ new Date(NaN);
  }
  if (i = d.MMDD.exec(e), i) {
    n = /* @__PURE__ */ new Date(0), r = parseInt(i[1], 10) - 1;
    const o = parseInt(i[2], 10);
    return oe(t, r, o) ? (n.setUTCFullYear(t, r, o), n) : /* @__PURE__ */ new Date(NaN);
  }
  if (i = d.Www.exec(e), i)
    return a = parseInt(i[1], 10) - 1, se(a) ? ie(t, a) : /* @__PURE__ */ new Date(NaN);
  if (i = d.WwwD.exec(e), i) {
    a = parseInt(i[1], 10) - 1;
    const o = parseInt(i[2], 10) - 1;
    return se(a, o) ? ie(t, a, o) : /* @__PURE__ */ new Date(NaN);
  }
  return null;
}
function qt(e) {
  let t, n, r = d.HH.exec(e);
  if (r)
    return t = parseFloat(r[1].replace(",", ".")), X(t) ? t % 24 * _ : NaN;
  if (r = d.HHMM.exec(e), r)
    return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), X(t, n) ? t % 24 * _ + n * ae : NaN;
  if (r = d.HHMMSS.exec(e), r) {
    t = parseInt(r[1], 10), n = parseInt(r[2], 10);
    const a = parseFloat(r[3].replace(",", "."));
    return X(t, n, a) ? t % 24 * _ + n * ae + a * 1e3 : NaN;
  }
  return null;
}
function ie(e, t, n) {
  t = t || 0, n = n || 0;
  const r = /* @__PURE__ */ new Date(0);
  r.setUTCFullYear(e, 0, 4);
  const a = r.getUTCDay() || 7, i = t * 7 + n + 1 - a;
  return r.setUTCDate(r.getUTCDate() + i), r;
}
const zt = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ut = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function me(e) {
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
}
function oe(e, t, n) {
  if (t < 0 || t > 11)
    return !1;
  if (n != null) {
    if (n < 1)
      return !1;
    const r = me(e);
    if (r && n > Ut[t] || !r && n > zt[t])
      return !1;
  }
  return !0;
}
function At(e, t) {
  if (t < 1)
    return !1;
  const n = me(e);
  return !(n && t > 366 || !n && t > 365);
}
function se(e, t) {
  return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
}
function X(e, t, n) {
  return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
}
const jt = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
function Zt(e, t, n = {}) {
  t = String(t);
  const r = t.match(jt);
  if (r) {
    const a = v(n.originalDate || e, n);
    t = r.reduce(function(i, o) {
      if (o[0] === "'")
        return i;
      const s = i.indexOf(o), c = i[s - 1] === "'", f = i.replace(o, "'" + Et[o[0]](a, o, n) + "'");
      return c ? f.substring(0, s - 1) + f.substring(s + 1) : f;
    }, t);
  }
  return bt(e, t, n);
}
function Rt(e, t, n) {
  e = v(e, n);
  const r = S(t, e, !0), a = new Date(e.getTime() - r), i = /* @__PURE__ */ new Date(0);
  return i.setFullYear(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate()), i.setHours(a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()), i;
}
function Jt(e, t, n, r) {
  return r = {
    ...r,
    timeZone: t,
    originalDate: e
  }, Zt(Rt(e, t, { timeZone: r.timeZone }), n, r);
}
function Kt(e, t, n) {
  if (typeof e == "string" && !e.match(le))
    return v(e, { ...n, timeZone: t });
  e = v(e, n);
  const r = L(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()).getTime(), a = S(t, new Date(r));
  return new Date(r + a);
}
export {
  Z as a,
  Bt as b,
  D as c,
  bt as d,
  Ze as e,
  Jt as f,
  p as g,
  Kt as h,
  Rt as i,
  Gt as j,
  Qt as k,
  Vt as m,
  g as t
};
