import { commonjsGlobal as R, getDefaultExportFromCjs as W } from "../../../_virtual/_commonjsHelpers.mjs";
import { __module as G } from "../../../_virtual/customParseFormat.mjs";
(function(V, rt) {
  (function(b, Z) {
    V.exports = Z();
  })(R, function() {
    var b = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, Z = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, $ = /\d\d/, i = /\d\d?/, y = /\d*[^-_:/,()\s\d]+/, m = {}, U = function(t) {
      return (t = +t) + (t > 68 ? 1900 : 2e3);
    }, o = function(t) {
      return function(r) {
        this[t] = +r;
      };
    }, j = [/[+-]\d\d:?(\d\d)?|Z/, function(t) {
      (this.zone || (this.zone = {})).offset = function(r) {
        if (!r || r === "Z")
          return 0;
        var n = r.match(/([+-]|\d\d)/g), e = 60 * n[1] + (+n[2] || 0);
        return e === 0 ? 0 : n[0] === "+" ? -e : e;
      }(t);
    }], F = function(t) {
      var r = m[t];
      return r && (r.indexOf ? r : r.s.concat(r.f));
    }, k = function(t, r) {
      var n, e = m.meridiem;
      if (e) {
        for (var c = 1; c <= 24; c += 1)
          if (t.indexOf(e(c, 0, r)) > -1) {
            n = c > 12;
            break;
          }
      } else
        n = t === (r ? "pm" : "PM");
      return n;
    }, q = { A: [y, function(t) {
      this.afternoon = k(t, !1);
    }], a: [y, function(t) {
      this.afternoon = k(t, !0);
    }], S: [/\d/, function(t) {
      this.milliseconds = 100 * +t;
    }], SS: [$, function(t) {
      this.milliseconds = 10 * +t;
    }], SSS: [/\d{3}/, function(t) {
      this.milliseconds = +t;
    }], s: [i, o("seconds")], ss: [i, o("seconds")], m: [i, o("minutes")], mm: [i, o("minutes")], H: [i, o("hours")], h: [i, o("hours")], HH: [i, o("hours")], hh: [i, o("hours")], D: [i, o("day")], DD: [$, o("day")], Do: [y, function(t) {
      var r = m.ordinal, n = t.match(/\d+/);
      if (this.day = n[0], r)
        for (var e = 1; e <= 31; e += 1)
          r(e).replace(/\[|\]/g, "") === t && (this.day = e);
    }], M: [i, o("month")], MM: [$, o("month")], MMM: [y, function(t) {
      var r = F("months"), n = (F("monthsShort") || r.map(function(e) {
        return e.slice(0, 3);
      })).indexOf(t) + 1;
      if (n < 1)
        throw new Error();
      this.month = n % 12 || n;
    }], MMMM: [y, function(t) {
      var r = F("months").indexOf(t) + 1;
      if (r < 1)
        throw new Error();
      this.month = r % 12 || r;
    }], Y: [/[+-]?\d+/, o("year")], YY: [$, function(t) {
      this.year = U(t);
    }], YYYY: [/\d{4}/, o("year")], Z: j, ZZ: j };
    function B(t) {
      var r, n;
      r = t, n = m && m.formats;
      for (var e = (t = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(v, l, f) {
        var a = f && f.toUpperCase();
        return l || n[f] || b[f] || n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(M, Y, D) {
          return Y || D.slice(1);
        });
      })).match(Z), c = e.length, h = 0; h < c; h += 1) {
        var w = e[h], p = q[w], u = p && p[0], d = p && p[1];
        e[h] = d ? { regex: u, parser: d } : w.replace(/^\[|\]$/g, "");
      }
      return function(v) {
        for (var l = {}, f = 0, a = 0; f < c; f += 1) {
          var M = e[f];
          if (typeof M == "string")
            a += M.length;
          else {
            var Y = M.regex, D = M.parser, S = v.slice(a), g = Y.exec(S)[0];
            D.call(l, g), v = v.replace(g, "");
          }
        }
        return function(L) {
          var s = L.afternoon;
          if (s !== void 0) {
            var x = L.hours;
            s ? x < 12 && (L.hours += 12) : x === 12 && (L.hours = 0), delete L.afternoon;
          }
        }(l), l;
      };
    }
    return function(t, r, n) {
      n.p.customParseFormat = !0, t && t.parseTwoDigitYear && (U = t.parseTwoDigitYear);
      var e = r.prototype, c = e.parse;
      e.parse = function(h) {
        var w = h.date, p = h.utc, u = h.args;
        this.$u = p;
        var d = u[1];
        if (typeof d == "string") {
          var v = u[2] === !0, l = u[3] === !0, f = v || l, a = u[2];
          l && (a = u[2]), m = this.$locale(), !v && a && (m = n.Ls[a]), this.$d = function(S, g, L) {
            try {
              if (["x", "X"].indexOf(g) > -1)
                return new Date((g === "X" ? 1e3 : 1) * S);
              var s = B(g)(S), x = s.year, A = s.month, I = s.day, J = s.hours, K = s.minutes, N = s.seconds, Q = s.milliseconds, X = s.zone, H = /* @__PURE__ */ new Date(), O = I || (x || A ? 1 : H.getDate()), P = x || H.getFullYear(), T = 0;
              x && !A || (T = A > 0 ? A - 1 : H.getMonth());
              var z = J || 0, C = K || 0, E = N || 0, _ = Q || 0;
              return X ? new Date(Date.UTC(P, T, O, z, C, E, _ + 60 * X.offset * 1e3)) : L ? new Date(Date.UTC(P, T, O, z, C, E, _)) : new Date(P, T, O, z, C, E, _);
            } catch {
              return /* @__PURE__ */ new Date("");
            }
          }(w, d, p), this.init(), a && a !== !0 && (this.$L = this.locale(a).$L), f && w != this.format(d) && (this.$d = /* @__PURE__ */ new Date("")), m = {};
        } else if (d instanceof Array)
          for (var M = d.length, Y = 1; Y <= M; Y += 1) {
            u[1] = d[Y - 1];
            var D = n.apply(this, u);
            if (D.isValid()) {
              this.$d = D.$d, this.$L = D.$L, this.init();
              break;
            }
            Y === M && (this.$d = /* @__PURE__ */ new Date(""));
          }
        else
          c.call(this, h);
      };
    };
  });
})(G);
var tt = G.exports;
const at = /* @__PURE__ */ W(tt);
export {
  at as default
};
