import { _ as d, a6 as Fn, a5 as Un, aj as En, ak as In, a7 as Ln, a8 as Wn, g as _t, a9 as Bt, aa as Hn, aI as et, l as Jt, ag as Pn, ae as Nn, aq as On, aJ as ne, ao as zn, aK as en, aL as Vn, aM as nn, aN as rn, aO as an, aP as Bn, aQ as xe } from "./index-CMZig9xg.js";
import { Z as Zn, X as jn, O as qn, _ as Gn, w as Le } from "./linear-C2PheBya-BHVXLcru.js";
import { t as Jn } from "./init-DjUOC4st-C8Nwz6AJ.js";
function Rn(t, e) {
  let n;
  if (e === void 0)
    for (const r of t)
      r != null && (n < r || n === void 0 && r >= r) && (n = r);
  else {
    let r = -1;
    for (let a of t)
      (a = e(a, ++r, t)) != null && (n < a || n === void 0 && a >= a) && (n = a);
  }
  return n;
}
function Kn(t, e) {
  let n;
  if (e === void 0)
    for (const r of t)
      r != null && (n > r || n === void 0 && r >= r) && (n = r);
  else {
    let r = -1;
    for (let a of t)
      (a = e(a, ++r, t)) != null && (n > a || n === void 0 && a >= a) && (n = a);
  }
  return n;
}
function Qn(t) {
  return t;
}
var jt = 1, re = 2, fe = 3, Zt = 4, We = 1e-6;
function Xn(t) {
  return "translate(" + t + ",0)";
}
function tr(t) {
  return "translate(0," + t + ")";
}
function er(t) {
  return (e) => +t(e);
}
function nr(t, e) {
  return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
}
function rr() {
  return !this.__axis;
}
function sn(t, e) {
  var n = [], r = null, a = null, s = 6, c = 6, m = 3, $ = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, f = t === jt || t === Zt ? -1 : 1, D = t === Zt || t === re ? "x" : "y", A = t === jt || t === fe ? Xn : tr;
  function x(w) {
    var j = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), y = a ?? (e.tickFormat ? e.tickFormat.apply(e, n) : Qn), F = Math.max(s, 0) + m, P = e.range(), H = +P[0] + $, V = +P[P.length - 1] + $, B = (e.bandwidth ? nr : er)(e.copy(), $), R = w.selection ? w.selection() : w, b = R.selectAll(".domain").data([null]), E = R.selectAll(".tick").data(j, e).order(), T = E.exit(), Y = E.enter().append("g").attr("class", "tick"), M = E.select("line"), C = E.select("text");
    b = b.merge(b.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), E = E.merge(Y), M = M.merge(Y.append("line").attr("stroke", "currentColor").attr(D + "2", f * s)), C = C.merge(Y.append("text").attr("fill", "currentColor").attr(D, f * F).attr("dy", t === jt ? "0em" : t === fe ? "0.71em" : "0.32em")), w !== R && (b = b.transition(w), E = E.transition(w), M = M.transition(w), C = C.transition(w), T = T.transition(w).attr("opacity", We).attr("transform", function(k) {
      return isFinite(k = B(k)) ? A(k + $) : this.getAttribute("transform");
    }), Y.attr("opacity", We).attr("transform", function(k) {
      var _ = this.parentNode.__axis;
      return A((_ && isFinite(_ = _(k)) ? _ : B(k)) + $);
    })), T.remove(), b.attr("d", t === Zt || t === re ? c ? "M" + f * c + "," + H + "H" + $ + "V" + V + "H" + f * c : "M" + $ + "," + H + "V" + V : c ? "M" + H + "," + f * c + "V" + $ + "H" + V + "V" + f * c : "M" + H + "," + $ + "H" + V), E.attr("opacity", 1).attr("transform", function(k) {
      return A(B(k) + $);
    }), M.attr(D + "2", f * s), C.attr(D, f * F).text(y), R.filter(rr).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === re ? "start" : t === Zt ? "end" : "middle"), R.each(function() {
      this.__axis = B;
    });
  }
  return x.scale = function(w) {
    return arguments.length ? (e = w, x) : e;
  }, x.ticks = function() {
    return n = Array.from(arguments), x;
  }, x.tickArguments = function(w) {
    return arguments.length ? (n = w == null ? [] : Array.from(w), x) : n.slice();
  }, x.tickValues = function(w) {
    return arguments.length ? (r = w == null ? null : Array.from(w), x) : r && r.slice();
  }, x.tickFormat = function(w) {
    return arguments.length ? (a = w, x) : a;
  }, x.tickSize = function(w) {
    return arguments.length ? (s = c = +w, x) : s;
  }, x.tickSizeInner = function(w) {
    return arguments.length ? (s = +w, x) : s;
  }, x.tickSizeOuter = function(w) {
    return arguments.length ? (c = +w, x) : c;
  }, x.tickPadding = function(w) {
    return arguments.length ? (m = +w, x) : m;
  }, x.offset = function(w) {
    return arguments.length ? ($ = +w, x) : $;
  }, x;
}
function ir(t) {
  return sn(jt, t);
}
function ar(t) {
  return sn(fe, t);
}
const sr = Math.PI / 180, or = 180 / Math.PI, Rt = 18, on = 0.96422, cn = 1, ln = 0.82521, un = 4 / 29, Mt = 6 / 29, dn = 3 * Mt * Mt, cr = Mt * Mt * Mt;
function hn(t) {
  if (t instanceof ot) return new ot(t.l, t.a, t.b, t.opacity);
  if (t instanceof dt) return fn(t);
  t instanceof en || (t = Vn(t));
  var e = oe(t.r), n = oe(t.g), r = oe(t.b), a = ie((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / cn), s, c;
  return e === n && n === r ? s = c = a : (s = ie((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / on), c = ie((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / ln)), new ot(116 * a - 16, 500 * (s - a), 200 * (a - c), t.opacity);
}
function lr(t, e, n, r) {
  return arguments.length === 1 ? hn(t) : new ot(t, e, n, r ?? 1);
}
function ot(t, e, n, r) {
  this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
}
nn(ot, lr, rn(an, {
  brighter(t) {
    return new ot(this.l + Rt * (t ?? 1), this.a, this.b, this.opacity);
  },
  darker(t) {
    return new ot(this.l - Rt * (t ?? 1), this.a, this.b, this.opacity);
  },
  rgb() {
    var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
    return e = on * ae(e), t = cn * ae(t), n = ln * ae(n), new en(
      se(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
      se(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
      se(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
      this.opacity
    );
  }
}));
function ie(t) {
  return t > cr ? Math.pow(t, 1 / 3) : t / dn + un;
}
function ae(t) {
  return t > Mt ? t * t * t : dn * (t - un);
}
function se(t) {
  return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
}
function oe(t) {
  return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
}
function ur(t) {
  if (t instanceof dt) return new dt(t.h, t.c, t.l, t.opacity);
  if (t instanceof ot || (t = hn(t)), t.a === 0 && t.b === 0) return new dt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
  var e = Math.atan2(t.b, t.a) * or;
  return new dt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
}
function ge(t, e, n, r) {
  return arguments.length === 1 ? ur(t) : new dt(t, e, n, r ?? 1);
}
function dt(t, e, n, r) {
  this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
}
function fn(t) {
  if (isNaN(t.h)) return new ot(t.l, 0, 0, t.opacity);
  var e = t.h * sr;
  return new ot(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
}
nn(dt, ge, rn(an, {
  brighter(t) {
    return new dt(this.h, this.c, this.l + Rt * (t ?? 1), this.opacity);
  },
  darker(t) {
    return new dt(this.h, this.c, this.l - Rt * (t ?? 1), this.opacity);
  },
  rgb() {
    return fn(this).rgb();
  }
}));
function dr(t) {
  return function(e, n) {
    var r = t((e = ge(e)).h, (n = ge(n)).h), a = ne(e.c, n.c), s = ne(e.l, n.l), c = ne(e.opacity, n.opacity);
    return function(m) {
      return e.h = r(m), e.c = a(m), e.l = s(m), e.opacity = c(m), e + "";
    };
  };
}
const hr = dr(Bn);
function fr(t, e) {
  t = t.slice();
  var n = 0, r = t.length - 1, a = t[n], s = t[r], c;
  return s < a && (c = n, n = r, r = c, c = a, a = s, s = c), t[n] = e.floor(a), t[r] = e.ceil(s), t;
}
const ce = /* @__PURE__ */ new Date(), le = /* @__PURE__ */ new Date();
function Q(t, e, n, r) {
  function a(s) {
    return t(s = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+s)), s;
  }
  return a.floor = (s) => (t(s = /* @__PURE__ */ new Date(+s)), s), a.ceil = (s) => (t(s = new Date(s - 1)), e(s, 1), t(s), s), a.round = (s) => {
    const c = a(s), m = a.ceil(s);
    return s - c < m - s ? c : m;
  }, a.offset = (s, c) => (e(s = /* @__PURE__ */ new Date(+s), c == null ? 1 : Math.floor(c)), s), a.range = (s, c, m) => {
    const $ = [];
    if (s = a.ceil(s), m = m == null ? 1 : Math.floor(m), !(s < c) || !(m > 0)) return $;
    let f;
    do
      $.push(f = /* @__PURE__ */ new Date(+s)), e(s, m), t(s);
    while (f < s && s < c);
    return $;
  }, a.filter = (s) => Q((c) => {
    if (c >= c) for (; t(c), !s(c); ) c.setTime(c - 1);
  }, (c, m) => {
    if (c >= c)
      if (m < 0) for (; ++m <= 0; )
        for (; e(c, -1), !s(c); )
          ;
      else for (; --m >= 0; )
        for (; e(c, 1), !s(c); )
          ;
  }), n && (a.count = (s, c) => (ce.setTime(+s), le.setTime(+c), t(ce), t(le), Math.floor(n(ce, le))), a.every = (s) => (s = Math.floor(s), !isFinite(s) || !(s > 0) ? null : s > 1 ? a.filter(r ? (c) => r(c) % s === 0 : (c) => a.count(0, c) % s === 0) : a)), a;
}
const $t = Q(() => {
}, (t, e) => {
  t.setTime(+t + e);
}, (t, e) => e - t);
$t.every = (t) => (t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? Q((e) => {
  e.setTime(Math.floor(e / t) * t);
}, (e, n) => {
  e.setTime(+e + n * t);
}, (e, n) => (n - e) / t) : $t);
$t.range;
const ht = 1e3, at = ht * 60, ft = at * 60, gt = ft * 24, we = gt * 7, He = gt * 30, ue = gt * 365, mt = Q((t) => {
  t.setTime(t - t.getMilliseconds());
}, (t, e) => {
  t.setTime(+t + e * ht);
}, (t, e) => (e - t) / ht, (t) => t.getUTCSeconds());
mt.range;
const It = Q((t) => {
  t.setTime(t - t.getMilliseconds() - t.getSeconds() * ht);
}, (t, e) => {
  t.setTime(+t + e * at);
}, (t, e) => (e - t) / at, (t) => t.getMinutes());
It.range;
const gr = Q((t) => {
  t.setUTCSeconds(0, 0);
}, (t, e) => {
  t.setTime(+t + e * at);
}, (t, e) => (e - t) / at, (t) => t.getUTCMinutes());
gr.range;
const Lt = Q((t) => {
  t.setTime(t - t.getMilliseconds() - t.getSeconds() * ht - t.getMinutes() * at);
}, (t, e) => {
  t.setTime(+t + e * ft);
}, (t, e) => (e - t) / ft, (t) => t.getHours());
Lt.range;
const yr = Q((t) => {
  t.setUTCMinutes(0, 0, 0);
}, (t, e) => {
  t.setTime(+t + e * ft);
}, (t, e) => (e - t) / ft, (t) => t.getUTCHours());
yr.range;
const vt = Q(
  (t) => t.setHours(0, 0, 0, 0),
  (t, e) => t.setDate(t.getDate() + e),
  (t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * at) / gt,
  (t) => t.getDate() - 1
);
vt.range;
const De = Q((t) => {
  t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCDate(t.getUTCDate() + e);
}, (t, e) => (e - t) / gt, (t) => t.getUTCDate() - 1);
De.range;
const mr = Q((t) => {
  t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCDate(t.getUTCDate() + e);
}, (t, e) => (e - t) / gt, (t) => Math.floor(t / gt));
mr.range;
function xt(t) {
  return Q((e) => {
    e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
  }, (e, n) => {
    e.setDate(e.getDate() + n * 7);
  }, (e, n) => (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * at) / we);
}
const Pt = xt(0), Wt = xt(1), gn = xt(2), yn = xt(3), Tt = xt(4), mn = xt(5), kn = xt(6);
Pt.range;
Wt.range;
gn.range;
yn.range;
Tt.range;
mn.range;
kn.range;
function wt(t) {
  return Q((e) => {
    e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
  }, (e, n) => {
    e.setUTCDate(e.getUTCDate() + n * 7);
  }, (e, n) => (n - e) / we);
}
const pn = wt(0), Kt = wt(1), kr = wt(2), pr = wt(3), Yt = wt(4), vr = wt(5), Tr = wt(6);
pn.range;
Kt.range;
kr.range;
pr.range;
Yt.range;
vr.range;
Tr.range;
const Ht = Q((t) => {
  t.setDate(1), t.setHours(0, 0, 0, 0);
}, (t, e) => {
  t.setMonth(t.getMonth() + e);
}, (t, e) => e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12, (t) => t.getMonth());
Ht.range;
const br = Q((t) => {
  t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCMonth(t.getUTCMonth() + e);
}, (t, e) => e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12, (t) => t.getUTCMonth());
br.range;
const yt = Q((t) => {
  t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
}, (t, e) => {
  t.setFullYear(t.getFullYear() + e);
}, (t, e) => e.getFullYear() - t.getFullYear(), (t) => t.getFullYear());
yt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Q((e) => {
  e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, (e, n) => {
  e.setFullYear(e.getFullYear() + n * t);
});
yt.range;
const bt = Q((t) => {
  t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCFullYear(t.getUTCFullYear() + e);
}, (t, e) => e.getUTCFullYear() - t.getUTCFullYear(), (t) => t.getUTCFullYear());
bt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Q((e) => {
  e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, (e, n) => {
  e.setUTCFullYear(e.getUTCFullYear() + n * t);
});
bt.range;
function xr(t, e, n, r, a, s) {
  const c = [
    [mt, 1, ht],
    [mt, 5, 5 * ht],
    [mt, 15, 15 * ht],
    [mt, 30, 30 * ht],
    [s, 1, at],
    [s, 5, 5 * at],
    [s, 15, 15 * at],
    [s, 30, 30 * at],
    [a, 1, ft],
    [a, 3, 3 * ft],
    [a, 6, 6 * ft],
    [a, 12, 12 * ft],
    [r, 1, gt],
    [r, 2, 2 * gt],
    [n, 1, we],
    [e, 1, He],
    [e, 3, 3 * He],
    [t, 1, ue]
  ];
  function m(f, D, A) {
    const x = D < f;
    x && ([f, D] = [D, f]);
    const w = A && typeof A.range == "function" ? A : $(f, D, A), j = w ? w.range(f, +D + 1) : [];
    return x ? j.reverse() : j;
  }
  function $(f, D, A) {
    const x = Math.abs(D - f) / A, w = Gn(([, , F]) => F).right(c, x);
    if (w === c.length) return t.every(Le(f / ue, D / ue, A));
    if (w === 0) return $t.every(Math.max(Le(f, D, A), 1));
    const [j, y] = c[x / c[w - 1][2] < c[w][2] / x ? w - 1 : w];
    return j.every(y);
  }
  return [m, $];
}
const [wr, Dr] = xr(yt, Ht, Pt, vt, Lt, It);
function de(t) {
  if (0 <= t.y && t.y < 100) {
    var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
    return e.setFullYear(t.y), e;
  }
  return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
}
function he(t) {
  if (0 <= t.y && t.y < 100) {
    var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
    return e.setUTCFullYear(t.y), e;
  }
  return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
}
function Ft(t, e, n) {
  return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 };
}
function Cr(t) {
  var e = t.dateTime, n = t.date, r = t.time, a = t.periods, s = t.days, c = t.shortDays, m = t.months, $ = t.shortMonths, f = Ut(a), D = Et(a), A = Ut(s), x = Et(s), w = Ut(c), j = Et(c), y = Ut(m), F = Et(m), P = Ut($), H = Et($), V = {
    a: S,
    A: i,
    b: v,
    B: l,
    c: null,
    d: Be,
    e: Be,
    f: Gr,
    g: ii,
    G: si,
    H: Zr,
    I: jr,
    j: qr,
    L: vn,
    m: Jr,
    M: Rr,
    p: N,
    q: I,
    Q: qe,
    s: Ge,
    S: Kr,
    u: Qr,
    U: Xr,
    V: ti,
    w: ei,
    W: ni,
    x: null,
    X: null,
    y: ri,
    Y: ai,
    Z: oi,
    "%": je
  }, B = {
    a: G,
    A: q,
    b: kt,
    B: J,
    c: null,
    d: Ze,
    e: Ze,
    f: di,
    g: bi,
    G: wi,
    H: ci,
    I: li,
    j: ui,
    L: bn,
    m: hi,
    M: fi,
    p: it,
    q: ct,
    Q: qe,
    s: Ge,
    S: gi,
    u: yi,
    U: mi,
    V: ki,
    w: pi,
    W: vi,
    x: null,
    X: null,
    y: Ti,
    Y: xi,
    Z: Di,
    "%": je
  }, R = {
    a: M,
    A: C,
    b: k,
    B: _,
    c: o,
    d: ze,
    e: ze,
    f: Or,
    g: Oe,
    G: Ne,
    H: Ve,
    I: Ve,
    j: Wr,
    L: Nr,
    m: Lr,
    M: Hr,
    p: Y,
    q: Ir,
    Q: Vr,
    s: Br,
    S: Pr,
    u: Yr,
    U: Ar,
    V: Fr,
    w: $r,
    W: Ur,
    x: g,
    X: h,
    y: Oe,
    Y: Ne,
    Z: Er,
    "%": zr
  };
  V.x = b(n, V), V.X = b(r, V), V.c = b(e, V), B.x = b(n, B), B.X = b(r, B), B.c = b(e, B);
  function b(p, U) {
    return function(L) {
      var u = [], O = -1, W = 0, Z = p.length, tt, nt, pt;
      for (L instanceof Date || (L = /* @__PURE__ */ new Date(+L)); ++O < Z; )
        p.charCodeAt(O) === 37 && (u.push(p.slice(W, O)), (nt = Pe[tt = p.charAt(++O)]) != null ? tt = p.charAt(++O) : nt = tt === "e" ? " " : "0", (pt = U[tt]) && (tt = pt(L, nt)), u.push(tt), W = O + 1);
      return u.push(p.slice(W, O)), u.join("");
    };
  }
  function E(p, U) {
    return function(L) {
      var u = Ft(1900, void 0, 1), O = T(u, p, L += "", 0), W, Z;
      if (O != L.length) return null;
      if ("Q" in u) return new Date(u.Q);
      if ("s" in u) return new Date(u.s * 1e3 + ("L" in u ? u.L : 0));
      if (U && !("Z" in u) && (u.Z = 0), "p" in u && (u.H = u.H % 12 + u.p * 12), u.m === void 0 && (u.m = "q" in u ? u.q : 0), "V" in u) {
        if (u.V < 1 || u.V > 53) return null;
        "w" in u || (u.w = 1), "Z" in u ? (W = he(Ft(u.y, 0, 1)), Z = W.getUTCDay(), W = Z > 4 || Z === 0 ? Kt.ceil(W) : Kt(W), W = De.offset(W, (u.V - 1) * 7), u.y = W.getUTCFullYear(), u.m = W.getUTCMonth(), u.d = W.getUTCDate() + (u.w + 6) % 7) : (W = de(Ft(u.y, 0, 1)), Z = W.getDay(), W = Z > 4 || Z === 0 ? Wt.ceil(W) : Wt(W), W = vt.offset(W, (u.V - 1) * 7), u.y = W.getFullYear(), u.m = W.getMonth(), u.d = W.getDate() + (u.w + 6) % 7);
      } else ("W" in u || "U" in u) && ("w" in u || (u.w = "u" in u ? u.u % 7 : "W" in u ? 1 : 0), Z = "Z" in u ? he(Ft(u.y, 0, 1)).getUTCDay() : de(Ft(u.y, 0, 1)).getDay(), u.m = 0, u.d = "W" in u ? (u.w + 6) % 7 + u.W * 7 - (Z + 5) % 7 : u.w + u.U * 7 - (Z + 6) % 7);
      return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, he(u)) : de(u);
    };
  }
  function T(p, U, L, u) {
    for (var O = 0, W = U.length, Z = L.length, tt, nt; O < W; ) {
      if (u >= Z) return -1;
      if (tt = U.charCodeAt(O++), tt === 37) {
        if (tt = U.charAt(O++), nt = R[tt in Pe ? U.charAt(O++) : tt], !nt || (u = nt(p, L, u)) < 0) return -1;
      } else if (tt != L.charCodeAt(u++))
        return -1;
    }
    return u;
  }
  function Y(p, U, L) {
    var u = f.exec(U.slice(L));
    return u ? (p.p = D.get(u[0].toLowerCase()), L + u[0].length) : -1;
  }
  function M(p, U, L) {
    var u = w.exec(U.slice(L));
    return u ? (p.w = j.get(u[0].toLowerCase()), L + u[0].length) : -1;
  }
  function C(p, U, L) {
    var u = A.exec(U.slice(L));
    return u ? (p.w = x.get(u[0].toLowerCase()), L + u[0].length) : -1;
  }
  function k(p, U, L) {
    var u = P.exec(U.slice(L));
    return u ? (p.m = H.get(u[0].toLowerCase()), L + u[0].length) : -1;
  }
  function _(p, U, L) {
    var u = y.exec(U.slice(L));
    return u ? (p.m = F.get(u[0].toLowerCase()), L + u[0].length) : -1;
  }
  function o(p, U, L) {
    return T(p, e, U, L);
  }
  function g(p, U, L) {
    return T(p, n, U, L);
  }
  function h(p, U, L) {
    return T(p, r, U, L);
  }
  function S(p) {
    return c[p.getDay()];
  }
  function i(p) {
    return s[p.getDay()];
  }
  function v(p) {
    return $[p.getMonth()];
  }
  function l(p) {
    return m[p.getMonth()];
  }
  function N(p) {
    return a[+(p.getHours() >= 12)];
  }
  function I(p) {
    return 1 + ~~(p.getMonth() / 3);
  }
  function G(p) {
    return c[p.getUTCDay()];
  }
  function q(p) {
    return s[p.getUTCDay()];
  }
  function kt(p) {
    return $[p.getUTCMonth()];
  }
  function J(p) {
    return m[p.getUTCMonth()];
  }
  function it(p) {
    return a[+(p.getUTCHours() >= 12)];
  }
  function ct(p) {
    return 1 + ~~(p.getUTCMonth() / 3);
  }
  return {
    format: function(p) {
      var U = b(p += "", V);
      return U.toString = function() {
        return p;
      }, U;
    },
    parse: function(p) {
      var U = E(p += "", !1);
      return U.toString = function() {
        return p;
      }, U;
    },
    utcFormat: function(p) {
      var U = b(p += "", B);
      return U.toString = function() {
        return p;
      }, U;
    },
    utcParse: function(p) {
      var U = E(p += "", !0);
      return U.toString = function() {
        return p;
      }, U;
    }
  };
}
var Pe = { "-": "", _: " ", 0: "0" }, X = /^\s*\d+/, _r = /^%/, Mr = /[\\^$*+?|[\]().{}]/g;
function z(t, e, n) {
  var r = t < 0 ? "-" : "", a = (r ? -t : t) + "", s = a.length;
  return r + (s < n ? new Array(n - s + 1).join(e) + a : a);
}
function Sr(t) {
  return t.replace(Mr, "\\$&");
}
function Ut(t) {
  return new RegExp("^(?:" + t.map(Sr).join("|") + ")", "i");
}
function Et(t) {
  return new Map(t.map((e, n) => [e.toLowerCase(), n]));
}
function $r(t, e, n) {
  var r = X.exec(e.slice(n, n + 1));
  return r ? (t.w = +r[0], n + r[0].length) : -1;
}
function Yr(t, e, n) {
  var r = X.exec(e.slice(n, n + 1));
  return r ? (t.u = +r[0], n + r[0].length) : -1;
}
function Ar(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.U = +r[0], n + r[0].length) : -1;
}
function Fr(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.V = +r[0], n + r[0].length) : -1;
}
function Ur(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.W = +r[0], n + r[0].length) : -1;
}
function Ne(t, e, n) {
  var r = X.exec(e.slice(n, n + 4));
  return r ? (t.y = +r[0], n + r[0].length) : -1;
}
function Oe(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
}
function Er(t, e, n) {
  var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6));
  return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
}
function Ir(t, e, n) {
  var r = X.exec(e.slice(n, n + 1));
  return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1;
}
function Lr(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.m = r[0] - 1, n + r[0].length) : -1;
}
function ze(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.d = +r[0], n + r[0].length) : -1;
}
function Wr(t, e, n) {
  var r = X.exec(e.slice(n, n + 3));
  return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1;
}
function Ve(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.H = +r[0], n + r[0].length) : -1;
}
function Hr(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.M = +r[0], n + r[0].length) : -1;
}
function Pr(t, e, n) {
  var r = X.exec(e.slice(n, n + 2));
  return r ? (t.S = +r[0], n + r[0].length) : -1;
}
function Nr(t, e, n) {
  var r = X.exec(e.slice(n, n + 3));
  return r ? (t.L = +r[0], n + r[0].length) : -1;
}
function Or(t, e, n) {
  var r = X.exec(e.slice(n, n + 6));
  return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
}
function zr(t, e, n) {
  var r = _r.exec(e.slice(n, n + 1));
  return r ? n + r[0].length : -1;
}
function Vr(t, e, n) {
  var r = X.exec(e.slice(n));
  return r ? (t.Q = +r[0], n + r[0].length) : -1;
}
function Br(t, e, n) {
  var r = X.exec(e.slice(n));
  return r ? (t.s = +r[0], n + r[0].length) : -1;
}
function Be(t, e) {
  return z(t.getDate(), e, 2);
}
function Zr(t, e) {
  return z(t.getHours(), e, 2);
}
function jr(t, e) {
  return z(t.getHours() % 12 || 12, e, 2);
}
function qr(t, e) {
  return z(1 + vt.count(yt(t), t), e, 3);
}
function vn(t, e) {
  return z(t.getMilliseconds(), e, 3);
}
function Gr(t, e) {
  return vn(t, e) + "000";
}
function Jr(t, e) {
  return z(t.getMonth() + 1, e, 2);
}
function Rr(t, e) {
  return z(t.getMinutes(), e, 2);
}
function Kr(t, e) {
  return z(t.getSeconds(), e, 2);
}
function Qr(t) {
  var e = t.getDay();
  return e === 0 ? 7 : e;
}
function Xr(t, e) {
  return z(Pt.count(yt(t) - 1, t), e, 2);
}
function Tn(t) {
  var e = t.getDay();
  return e >= 4 || e === 0 ? Tt(t) : Tt.ceil(t);
}
function ti(t, e) {
  return t = Tn(t), z(Tt.count(yt(t), t) + (yt(t).getDay() === 4), e, 2);
}
function ei(t) {
  return t.getDay();
}
function ni(t, e) {
  return z(Wt.count(yt(t) - 1, t), e, 2);
}
function ri(t, e) {
  return z(t.getFullYear() % 100, e, 2);
}
function ii(t, e) {
  return t = Tn(t), z(t.getFullYear() % 100, e, 2);
}
function ai(t, e) {
  return z(t.getFullYear() % 1e4, e, 4);
}
function si(t, e) {
  var n = t.getDay();
  return t = n >= 4 || n === 0 ? Tt(t) : Tt.ceil(t), z(t.getFullYear() % 1e4, e, 4);
}
function oi(t) {
  var e = t.getTimezoneOffset();
  return (e > 0 ? "-" : (e *= -1, "+")) + z(e / 60 | 0, "0", 2) + z(e % 60, "0", 2);
}
function Ze(t, e) {
  return z(t.getUTCDate(), e, 2);
}
function ci(t, e) {
  return z(t.getUTCHours(), e, 2);
}
function li(t, e) {
  return z(t.getUTCHours() % 12 || 12, e, 2);
}
function ui(t, e) {
  return z(1 + De.count(bt(t), t), e, 3);
}
function bn(t, e) {
  return z(t.getUTCMilliseconds(), e, 3);
}
function di(t, e) {
  return bn(t, e) + "000";
}
function hi(t, e) {
  return z(t.getUTCMonth() + 1, e, 2);
}
function fi(t, e) {
  return z(t.getUTCMinutes(), e, 2);
}
function gi(t, e) {
  return z(t.getUTCSeconds(), e, 2);
}
function yi(t) {
  var e = t.getUTCDay();
  return e === 0 ? 7 : e;
}
function mi(t, e) {
  return z(pn.count(bt(t) - 1, t), e, 2);
}
function xn(t) {
  var e = t.getUTCDay();
  return e >= 4 || e === 0 ? Yt(t) : Yt.ceil(t);
}
function ki(t, e) {
  return t = xn(t), z(Yt.count(bt(t), t) + (bt(t).getUTCDay() === 4), e, 2);
}
function pi(t) {
  return t.getUTCDay();
}
function vi(t, e) {
  return z(Kt.count(bt(t) - 1, t), e, 2);
}
function Ti(t, e) {
  return z(t.getUTCFullYear() % 100, e, 2);
}
function bi(t, e) {
  return t = xn(t), z(t.getUTCFullYear() % 100, e, 2);
}
function xi(t, e) {
  return z(t.getUTCFullYear() % 1e4, e, 4);
}
function wi(t, e) {
  var n = t.getUTCDay();
  return t = n >= 4 || n === 0 ? Yt(t) : Yt.ceil(t), z(t.getUTCFullYear() % 1e4, e, 4);
}
function Di() {
  return "+0000";
}
function je() {
  return "%";
}
function qe(t) {
  return +t;
}
function Ge(t) {
  return Math.floor(+t / 1e3);
}
var Ct, Qt;
Ci({
  dateTime: "%x, %X",
  date: "%-m/%-d/%Y",
  time: "%-I:%M:%S %p",
  periods: ["AM", "PM"],
  days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function Ci(t) {
  return Ct = Cr(t), Qt = Ct.format, Ct.parse, Ct.utcFormat, Ct.utcParse, Ct;
}
function _i(t) {
  return new Date(t);
}
function Mi(t) {
  return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
}
function wn(t, e, n, r, a, s, c, m, $, f) {
  var D = jn(), A = D.invert, x = D.domain, w = f(".%L"), j = f(":%S"), y = f("%I:%M"), F = f("%I %p"), P = f("%a %d"), H = f("%b %d"), V = f("%B"), B = f("%Y");
  function R(b) {
    return ($(b) < b ? w : m(b) < b ? j : c(b) < b ? y : s(b) < b ? F : r(b) < b ? a(b) < b ? P : H : n(b) < b ? V : B)(b);
  }
  return D.invert = function(b) {
    return new Date(A(b));
  }, D.domain = function(b) {
    return arguments.length ? x(Array.from(b, Mi)) : x().map(_i);
  }, D.ticks = function(b) {
    var E = x();
    return t(E[0], E[E.length - 1], b ?? 10);
  }, D.tickFormat = function(b, E) {
    return E == null ? R : f(E);
  }, D.nice = function(b) {
    var E = x();
    return (!b || typeof b.range != "function") && (b = e(E[0], E[E.length - 1], b ?? 10)), b ? x(fr(E, b)) : D;
  }, D.copy = function() {
    return qn(D, wn(t, e, n, r, a, s, c, m, $, f));
  }, D;
}
function Si() {
  return Jn.apply(wn(wr, Dr, yt, Ht, Pt, vt, Lt, It, mt, Qt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
var ye = { exports: {} }, $i = ye.exports, Je;
function Yi() {
  return Je || (Je = 1, function(t, e) {
    (function(n, r) {
      t.exports = r();
    })($i, function() {
      var n = "day";
      return function(r, a, s) {
        var c = function(f) {
          return f.add(4 - f.isoWeekday(), n);
        }, m = a.prototype;
        m.isoWeekYear = function() {
          return c(this).year();
        }, m.isoWeek = function(f) {
          if (!this.$utils().u(f)) return this.add(7 * (f - this.isoWeek()), n);
          var D, A, x, w, j = c(this), y = (D = this.isoWeekYear(), A = this.$u, x = (A ? s.utc : s)().year(D).startOf("year"), w = 4 - x.isoWeekday(), x.isoWeekday() > 4 && (w += 7), x.add(w, n));
          return j.diff(y, "week") + 1;
        }, m.isoWeekday = function(f) {
          return this.$utils().u(f) ? this.day() || 7 : this.day(this.day() % 7 ? f : f - 7);
        };
        var $ = m.startOf;
        m.startOf = function(f, D) {
          var A = this.$utils(), x = !!A.u(D) || D;
          return A.p(f) === "isoweek" ? x ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : $.bind(this)(f, D);
        };
      };
    });
  }(ye)), ye.exports;
}
var Ai = Yi();
const Fi = /* @__PURE__ */ xe(Ai);
var me = { exports: {} }, Ui = me.exports, Re;
function Ei() {
  return Re || (Re = 1, function(t, e) {
    (function(n, r) {
      t.exports = r();
    })(Ui, function() {
      var n = { 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" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, a = /\d\d/, s = /\d\d?/, c = /\d*[^-_:/,()\s\d]+/, m = {}, $ = function(y) {
        return (y = +y) + (y > 68 ? 1900 : 2e3);
      }, f = function(y) {
        return function(F) {
          this[y] = +F;
        };
      }, D = [/[+-]\d\d:?(\d\d)?|Z/, function(y) {
        (this.zone || (this.zone = {})).offset = function(F) {
          if (!F || F === "Z") return 0;
          var P = F.match(/([+-]|\d\d)/g), H = 60 * P[1] + (+P[2] || 0);
          return H === 0 ? 0 : P[0] === "+" ? -H : H;
        }(y);
      }], A = function(y) {
        var F = m[y];
        return F && (F.indexOf ? F : F.s.concat(F.f));
      }, x = function(y, F) {
        var P, H = m.meridiem;
        if (H) {
          for (var V = 1; V <= 24; V += 1) if (y.indexOf(H(V, 0, F)) > -1) {
            P = V > 12;
            break;
          }
        } else P = y === (F ? "pm" : "PM");
        return P;
      }, w = { A: [c, function(y) {
        this.afternoon = x(y, !1);
      }], a: [c, function(y) {
        this.afternoon = x(y, !0);
      }], S: [/\d/, function(y) {
        this.milliseconds = 100 * +y;
      }], SS: [a, function(y) {
        this.milliseconds = 10 * +y;
      }], SSS: [/\d{3}/, function(y) {
        this.milliseconds = +y;
      }], s: [s, f("seconds")], ss: [s, f("seconds")], m: [s, f("minutes")], mm: [s, f("minutes")], H: [s, f("hours")], h: [s, f("hours")], HH: [s, f("hours")], hh: [s, f("hours")], D: [s, f("day")], DD: [a, f("day")], Do: [c, function(y) {
        var F = m.ordinal, P = y.match(/\d+/);
        if (this.day = P[0], F) for (var H = 1; H <= 31; H += 1) F(H).replace(/\[|\]/g, "") === y && (this.day = H);
      }], M: [s, f("month")], MM: [a, f("month")], MMM: [c, function(y) {
        var F = A("months"), P = (A("monthsShort") || F.map(function(H) {
          return H.slice(0, 3);
        })).indexOf(y) + 1;
        if (P < 1) throw new Error();
        this.month = P % 12 || P;
      }], MMMM: [c, function(y) {
        var F = A("months").indexOf(y) + 1;
        if (F < 1) throw new Error();
        this.month = F % 12 || F;
      }], Y: [/[+-]?\d+/, f("year")], YY: [a, function(y) {
        this.year = $(y);
      }], YYYY: [/\d{4}/, f("year")], Z: D, ZZ: D };
      function j(y) {
        var F, P;
        F = y, P = m && m.formats;
        for (var H = (y = F.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(Y, M, C) {
          var k = C && C.toUpperCase();
          return M || P[C] || n[C] || P[k].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(_, o, g) {
            return o || g.slice(1);
          });
        })).match(r), V = H.length, B = 0; B < V; B += 1) {
          var R = H[B], b = w[R], E = b && b[0], T = b && b[1];
          H[B] = T ? { regex: E, parser: T } : R.replace(/^\[|\]$/g, "");
        }
        return function(Y) {
          for (var M = {}, C = 0, k = 0; C < V; C += 1) {
            var _ = H[C];
            if (typeof _ == "string") k += _.length;
            else {
              var o = _.regex, g = _.parser, h = Y.slice(k), S = o.exec(h)[0];
              g.call(M, S), Y = Y.replace(S, "");
            }
          }
          return function(i) {
            var v = i.afternoon;
            if (v !== void 0) {
              var l = i.hours;
              v ? l < 12 && (i.hours += 12) : l === 12 && (i.hours = 0), delete i.afternoon;
            }
          }(M), M;
        };
      }
      return function(y, F, P) {
        P.p.customParseFormat = !0, y && y.parseTwoDigitYear && ($ = y.parseTwoDigitYear);
        var H = F.prototype, V = H.parse;
        H.parse = function(B) {
          var R = B.date, b = B.utc, E = B.args;
          this.$u = b;
          var T = E[1];
          if (typeof T == "string") {
            var Y = E[2] === !0, M = E[3] === !0, C = Y || M, k = E[2];
            M && (k = E[2]), m = this.$locale(), !Y && k && (m = P.Ls[k]), this.$d = function(h, S, i) {
              try {
                if (["x", "X"].indexOf(S) > -1) return new Date((S === "X" ? 1e3 : 1) * h);
                var v = j(S)(h), l = v.year, N = v.month, I = v.day, G = v.hours, q = v.minutes, kt = v.seconds, J = v.milliseconds, it = v.zone, ct = /* @__PURE__ */ new Date(), p = I || (l || N ? 1 : ct.getDate()), U = l || ct.getFullYear(), L = 0;
                l && !N || (L = N > 0 ? N - 1 : ct.getMonth());
                var u = G || 0, O = q || 0, W = kt || 0, Z = J || 0;
                return it ? new Date(Date.UTC(U, L, p, u, O, W, Z + 60 * it.offset * 1e3)) : i ? new Date(Date.UTC(U, L, p, u, O, W, Z)) : new Date(U, L, p, u, O, W, Z);
              } catch {
                return /* @__PURE__ */ new Date("");
              }
            }(R, T, b), this.init(), k && k !== !0 && (this.$L = this.locale(k).$L), C && R != this.format(T) && (this.$d = /* @__PURE__ */ new Date("")), m = {};
          } else if (T instanceof Array) for (var _ = T.length, o = 1; o <= _; o += 1) {
            E[1] = T[o - 1];
            var g = P.apply(this, E);
            if (g.isValid()) {
              this.$d = g.$d, this.$L = g.$L, this.init();
              break;
            }
            o === _ && (this.$d = /* @__PURE__ */ new Date(""));
          }
          else V.call(this, B);
        };
      };
    });
  }(me)), me.exports;
}
var Ii = Ei();
const Li = /* @__PURE__ */ xe(Ii);
var ke = { exports: {} }, Wi = ke.exports, Ke;
function Hi() {
  return Ke || (Ke = 1, function(t, e) {
    (function(n, r) {
      t.exports = r();
    })(Wi, function() {
      return function(n, r) {
        var a = r.prototype, s = a.format;
        a.format = function(c) {
          var m = this, $ = this.$locale();
          if (!this.isValid()) return s.bind(this)(c);
          var f = this.$utils(), D = (c || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(A) {
            switch (A) {
              case "Q":
                return Math.ceil((m.$M + 1) / 3);
              case "Do":
                return $.ordinal(m.$D);
              case "gggg":
                return m.weekYear();
              case "GGGG":
                return m.isoWeekYear();
              case "wo":
                return $.ordinal(m.week(), "W");
              case "w":
              case "ww":
                return f.s(m.week(), A === "w" ? 1 : 2, "0");
              case "W":
              case "WW":
                return f.s(m.isoWeek(), A === "W" ? 1 : 2, "0");
              case "k":
              case "kk":
                return f.s(String(m.$H === 0 ? 24 : m.$H), A === "k" ? 1 : 2, "0");
              case "X":
                return Math.floor(m.$d.getTime() / 1e3);
              case "x":
                return m.$d.getTime();
              case "z":
                return "[" + m.offsetName() + "]";
              case "zzz":
                return "[" + m.offsetName("long") + "]";
              default:
                return A;
            }
          });
          return s.bind(this)(D);
        };
      };
    });
  }(ke)), ke.exports;
}
var Pi = Hi();
const Ni = /* @__PURE__ */ xe(Pi);
var pe = function() {
  var t = /* @__PURE__ */ d(function(_, o, g, h) {
    for (g = g || {}, h = _.length; h--; g[_[h]] = o) ;
    return g;
  }, "o"), e = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 40], n = [1, 26], r = [1, 27], a = [1, 28], s = [1, 29], c = [1, 30], m = [1, 31], $ = [1, 32], f = [1, 33], D = [1, 34], A = [1, 9], x = [1, 10], w = [1, 11], j = [1, 12], y = [1, 13], F = [1, 14], P = [1, 15], H = [1, 16], V = [1, 19], B = [1, 20], R = [1, 21], b = [1, 22], E = [1, 23], T = [1, 25], Y = [1, 35], M = {
    trace: /* @__PURE__ */ d(function() {
    }, "trace"),
    yy: {},
    symbols_: { error: 2, start: 3, gantt: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NL: 10, weekday: 11, weekday_monday: 12, weekday_tuesday: 13, weekday_wednesday: 14, weekday_thursday: 15, weekday_friday: 16, weekday_saturday: 17, weekday_sunday: 18, weekend: 19, weekend_friday: 20, weekend_saturday: 21, dateFormat: 22, inclusiveEndDates: 23, topAxis: 24, axisFormat: 25, tickInterval: 26, excludes: 27, includes: 28, todayMarker: 29, title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, section: 36, clickStatement: 37, taskTxt: 38, taskData: 39, click: 40, callbackname: 41, callbackargs: 42, href: 43, clickStatementDebug: 44, $accept: 0, $end: 1 },
    terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 20: "weekend_friday", 21: "weekend_saturday", 22: "dateFormat", 23: "inclusiveEndDates", 24: "topAxis", 25: "axisFormat", 26: "tickInterval", 27: "excludes", 28: "includes", 29: "todayMarker", 30: "title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "section", 38: "taskTxt", 39: "taskData", 40: "click", 41: "callbackname", 42: "callbackargs", 43: "href" },
    productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [19, 1], [19, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [37, 2], [37, 3], [37, 3], [37, 4], [37, 3], [37, 4], [37, 2], [44, 2], [44, 3], [44, 3], [44, 4], [44, 3], [44, 4], [44, 2]],
    performAction: /* @__PURE__ */ d(function(_, o, g, h, S, i, v) {
      var l = i.length - 1;
      switch (S) {
        case 1:
          return i[l - 1];
        case 2:
          this.$ = [];
          break;
        case 3:
          i[l - 1].push(i[l]), this.$ = i[l - 1];
          break;
        case 4:
        case 5:
          this.$ = i[l];
          break;
        case 6:
        case 7:
          this.$ = [];
          break;
        case 8:
          h.setWeekday("monday");
          break;
        case 9:
          h.setWeekday("tuesday");
          break;
        case 10:
          h.setWeekday("wednesday");
          break;
        case 11:
          h.setWeekday("thursday");
          break;
        case 12:
          h.setWeekday("friday");
          break;
        case 13:
          h.setWeekday("saturday");
          break;
        case 14:
          h.setWeekday("sunday");
          break;
        case 15:
          h.setWeekend("friday");
          break;
        case 16:
          h.setWeekend("saturday");
          break;
        case 17:
          h.setDateFormat(i[l].substr(11)), this.$ = i[l].substr(11);
          break;
        case 18:
          h.enableInclusiveEndDates(), this.$ = i[l].substr(18);
          break;
        case 19:
          h.TopAxis(), this.$ = i[l].substr(8);
          break;
        case 20:
          h.setAxisFormat(i[l].substr(11)), this.$ = i[l].substr(11);
          break;
        case 21:
          h.setTickInterval(i[l].substr(13)), this.$ = i[l].substr(13);
          break;
        case 22:
          h.setExcludes(i[l].substr(9)), this.$ = i[l].substr(9);
          break;
        case 23:
          h.setIncludes(i[l].substr(9)), this.$ = i[l].substr(9);
          break;
        case 24:
          h.setTodayMarker(i[l].substr(12)), this.$ = i[l].substr(12);
          break;
        case 27:
          h.setDiagramTitle(i[l].substr(6)), this.$ = i[l].substr(6);
          break;
        case 28:
          this.$ = i[l].trim(), h.setAccTitle(this.$);
          break;
        case 29:
        case 30:
          this.$ = i[l].trim(), h.setAccDescription(this.$);
          break;
        case 31:
          h.addSection(i[l].substr(8)), this.$ = i[l].substr(8);
          break;
        case 33:
          h.addTask(i[l - 1], i[l]), this.$ = "task";
          break;
        case 34:
          this.$ = i[l - 1], h.setClickEvent(i[l - 1], i[l], null);
          break;
        case 35:
          this.$ = i[l - 2], h.setClickEvent(i[l - 2], i[l - 1], i[l]);
          break;
        case 36:
          this.$ = i[l - 2], h.setClickEvent(i[l - 2], i[l - 1], null), h.setLink(i[l - 2], i[l]);
          break;
        case 37:
          this.$ = i[l - 3], h.setClickEvent(i[l - 3], i[l - 2], i[l - 1]), h.setLink(i[l - 3], i[l]);
          break;
        case 38:
          this.$ = i[l - 2], h.setClickEvent(i[l - 2], i[l], null), h.setLink(i[l - 2], i[l - 1]);
          break;
        case 39:
          this.$ = i[l - 3], h.setClickEvent(i[l - 3], i[l - 1], i[l]), h.setLink(i[l - 3], i[l - 2]);
          break;
        case 40:
          this.$ = i[l - 1], h.setLink(i[l - 1], i[l]);
          break;
        case 41:
        case 47:
          this.$ = i[l - 1] + " " + i[l];
          break;
        case 42:
        case 43:
        case 45:
          this.$ = i[l - 2] + " " + i[l - 1] + " " + i[l];
          break;
        case 44:
        case 46:
          this.$ = i[l - 3] + " " + i[l - 2] + " " + i[l - 1] + " " + i[l];
          break;
      }
    }, "anonymous"),
    table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: n, 13: r, 14: a, 15: s, 16: c, 17: m, 18: $, 19: 18, 20: f, 21: D, 22: A, 23: x, 24: w, 25: j, 26: y, 27: F, 28: P, 29: H, 30: V, 31: B, 33: R, 35: b, 36: E, 37: 24, 38: T, 40: Y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 36, 11: 17, 12: n, 13: r, 14: a, 15: s, 16: c, 17: m, 18: $, 19: 18, 20: f, 21: D, 22: A, 23: x, 24: w, 25: j, 26: y, 27: F, 28: P, 29: H, 30: V, 31: B, 33: R, 35: b, 36: E, 37: 24, 38: T, 40: Y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 17]), t(e, [2, 18]), t(e, [2, 19]), t(e, [2, 20]), t(e, [2, 21]), t(e, [2, 22]), t(e, [2, 23]), t(e, [2, 24]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, t(e, [2, 30]), t(e, [2, 31]), t(e, [2, 32]), { 39: [1, 39] }, t(e, [2, 8]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 11]), t(e, [2, 12]), t(e, [2, 13]), t(e, [2, 14]), t(e, [2, 15]), t(e, [2, 16]), { 41: [1, 40], 43: [1, 41] }, t(e, [2, 4]), t(e, [2, 28]), t(e, [2, 29]), t(e, [2, 33]), t(e, [2, 34], { 42: [1, 42], 43: [1, 43] }), t(e, [2, 40], { 41: [1, 44] }), t(e, [2, 35], { 43: [1, 45] }), t(e, [2, 36]), t(e, [2, 38], { 42: [1, 46] }), t(e, [2, 37]), t(e, [2, 39])],
    defaultActions: {},
    parseError: /* @__PURE__ */ d(function(_, o) {
      if (o.recoverable)
        this.trace(_);
      else {
        var g = new Error(_);
        throw g.hash = o, g;
      }
    }, "parseError"),
    parse: /* @__PURE__ */ d(function(_) {
      var o = this, g = [0], h = [], S = [null], i = [], v = this.table, l = "", N = 0, I = 0, G = 2, q = 1, kt = i.slice.call(arguments, 1), J = Object.create(this.lexer), it = { yy: {} };
      for (var ct in this.yy)
        Object.prototype.hasOwnProperty.call(this.yy, ct) && (it.yy[ct] = this.yy[ct]);
      J.setInput(_, it.yy), it.yy.lexer = J, it.yy.parser = this, typeof J.yylloc > "u" && (J.yylloc = {});
      var p = J.yylloc;
      i.push(p);
      var U = J.options && J.options.ranges;
      typeof it.yy.parseError == "function" ? this.parseError = it.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
      function L(rt) {
        g.length = g.length - 2 * rt, S.length = S.length - rt, i.length = i.length - rt;
      }
      d(L, "popStack");
      function u() {
        var rt;
        return rt = h.pop() || J.lex() || q, typeof rt != "number" && (rt instanceof Array && (h = rt, rt = h.pop()), rt = o.symbols_[rt] || rt), rt;
      }
      d(u, "lex");
      for (var O, W, Z, tt, nt = {}, pt, lt, Ie, Vt; ; ) {
        if (W = g[g.length - 1], this.defaultActions[W] ? Z = this.defaultActions[W] : ((O === null || typeof O > "u") && (O = u()), Z = v[W] && v[W][O]), typeof Z > "u" || !Z.length || !Z[0]) {
          var ee = "";
          Vt = [];
          for (pt in v[W])
            this.terminals_[pt] && pt > G && Vt.push("'" + this.terminals_[pt] + "'");
          J.showPosition ? ee = "Parse error on line " + (N + 1) + `:
` + J.showPosition() + `
Expecting ` + Vt.join(", ") + ", got '" + (this.terminals_[O] || O) + "'" : ee = "Parse error on line " + (N + 1) + ": Unexpected " + (O == q ? "end of input" : "'" + (this.terminals_[O] || O) + "'"), this.parseError(ee, {
            text: J.match,
            token: this.terminals_[O] || O,
            line: J.yylineno,
            loc: p,
            expected: Vt
          });
        }
        if (Z[0] instanceof Array && Z.length > 1)
          throw new Error("Parse Error: multiple actions possible at state: " + W + ", token: " + O);
        switch (Z[0]) {
          case 1:
            g.push(O), S.push(J.yytext), i.push(J.yylloc), g.push(Z[1]), O = null, I = J.yyleng, l = J.yytext, N = J.yylineno, p = J.yylloc;
            break;
          case 2:
            if (lt = this.productions_[Z[1]][1], nt.$ = S[S.length - lt], nt._$ = {
              first_line: i[i.length - (lt || 1)].first_line,
              last_line: i[i.length - 1].last_line,
              first_column: i[i.length - (lt || 1)].first_column,
              last_column: i[i.length - 1].last_column
            }, U && (nt._$.range = [
              i[i.length - (lt || 1)].range[0],
              i[i.length - 1].range[1]
            ]), tt = this.performAction.apply(nt, [
              l,
              I,
              N,
              it.yy,
              Z[1],
              S,
              i
            ].concat(kt)), typeof tt < "u")
              return tt;
            lt && (g = g.slice(0, -1 * lt * 2), S = S.slice(0, -1 * lt), i = i.slice(0, -1 * lt)), g.push(this.productions_[Z[1]][0]), S.push(nt.$), i.push(nt._$), Ie = v[g[g.length - 2]][g[g.length - 1]], g.push(Ie);
            break;
          case 3:
            return !0;
        }
      }
      return !0;
    }, "parse")
  }, C = /* @__PURE__ */ function() {
    var _ = {
      EOF: 1,
      parseError: /* @__PURE__ */ d(function(o, g) {
        if (this.yy.parser)
          this.yy.parser.parseError(o, g);
        else
          throw new Error(o);
      }, "parseError"),
      // resets the lexer, sets new input
      setInput: /* @__PURE__ */ d(function(o, g) {
        return this.yy = g || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
          first_line: 1,
          first_column: 0,
          last_line: 1,
          last_column: 0
        }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
      }, "setInput"),
      // consumes and returns one char from the input
      input: /* @__PURE__ */ d(function() {
        var o = this._input[0];
        this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
        var g = o.match(/(?:\r\n?|\n).*/g);
        return g ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
      }, "input"),
      // unshifts one char (or a string) into the input
      unput: /* @__PURE__ */ d(function(o) {
        var g = o.length, h = o.split(/(?:\r\n?|\n)/g);
        this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - g), this.offset -= g;
        var S = this.match.split(/(?:\r\n?|\n)/g);
        this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), h.length - 1 && (this.yylineno -= h.length - 1);
        var i = this.yylloc.range;
        return this.yylloc = {
          first_line: this.yylloc.first_line,
          last_line: this.yylineno + 1,
          first_column: this.yylloc.first_column,
          last_column: h ? (h.length === S.length ? this.yylloc.first_column : 0) + S[S.length - h.length].length - h[0].length : this.yylloc.first_column - g
        }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - g]), this.yyleng = this.yytext.length, this;
      }, "unput"),
      // When called from action, caches matched text and appends it on next action
      more: /* @__PURE__ */ d(function() {
        return this._more = !0, this;
      }, "more"),
      // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
      reject: /* @__PURE__ */ d(function() {
        if (this.options.backtrack_lexer)
          this._backtrack = !0;
        else
          return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
` + this.showPosition(), {
            text: "",
            token: null,
            line: this.yylineno
          });
        return this;
      }, "reject"),
      // retain first n characters of the match
      less: /* @__PURE__ */ d(function(o) {
        this.unput(this.match.slice(o));
      }, "less"),
      // displays already matched input, i.e. for error messages
      pastInput: /* @__PURE__ */ d(function() {
        var o = this.matched.substr(0, this.matched.length - this.match.length);
        return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
      }, "pastInput"),
      // displays upcoming input, i.e. for error messages
      upcomingInput: /* @__PURE__ */ d(function() {
        var o = this.match;
        return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
      }, "upcomingInput"),
      // displays the character position where the lexing error occurred, i.e. for error messages
      showPosition: /* @__PURE__ */ d(function() {
        var o = this.pastInput(), g = new Array(o.length + 1).join("-");
        return o + this.upcomingInput() + `
` + g + "^";
      }, "showPosition"),
      // test the lexed token: return FALSE when not a match, otherwise return token
      test_match: /* @__PURE__ */ d(function(o, g) {
        var h, S, i;
        if (this.options.backtrack_lexer && (i = {
          yylineno: this.yylineno,
          yylloc: {
            first_line: this.yylloc.first_line,
            last_line: this.last_line,
            first_column: this.yylloc.first_column,
            last_column: this.yylloc.last_column
          },
          yytext: this.yytext,
          match: this.match,
          matches: this.matches,
          matched: this.matched,
          yyleng: this.yyleng,
          offset: this.offset,
          _more: this._more,
          _input: this._input,
          yy: this.yy,
          conditionStack: this.conditionStack.slice(0),
          done: this.done
        }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), S = o[0].match(/(?:\r\n?|\n).*/g), S && (this.yylineno += S.length), this.yylloc = {
          first_line: this.yylloc.last_line,
          last_line: this.yylineno + 1,
          first_column: this.yylloc.last_column,
          last_column: S ? S[S.length - 1].length - S[S.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
        }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], h = this.performAction.call(this, this.yy, this, g, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
          return h;
        if (this._backtrack) {
          for (var v in i)
            this[v] = i[v];
          return !1;
        }
        return !1;
      }, "test_match"),
      // return next match in input
      next: /* @__PURE__ */ d(function() {
        if (this.done)
          return this.EOF;
        this._input || (this.done = !0);
        var o, g, h, S;
        this._more || (this.yytext = "", this.match = "");
        for (var i = this._currentRules(), v = 0; v < i.length; v++)
          if (h = this._input.match(this.rules[i[v]]), h && (!g || h[0].length > g[0].length)) {
            if (g = h, S = v, this.options.backtrack_lexer) {
              if (o = this.test_match(h, i[v]), o !== !1)
                return o;
              if (this._backtrack) {
                g = !1;
                continue;
              } else
                return !1;
            } else if (!this.options.flex)
              break;
          }
        return g ? (o = this.test_match(g, i[S]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
          text: "",
          token: null,
          line: this.yylineno
        });
      }, "next"),
      // return next match that has a token
      lex: /* @__PURE__ */ d(function() {
        var o = this.next();
        return o || this.lex();
      }, "lex"),
      // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
      begin: /* @__PURE__ */ d(function(o) {
        this.conditionStack.push(o);
      }, "begin"),
      // pop the previously active lexer condition state off the condition stack
      popState: /* @__PURE__ */ d(function() {
        var o = this.conditionStack.length - 1;
        return o > 0 ? this.conditionStack.pop() : this.conditionStack[0];
      }, "popState"),
      // produce the lexer rule set which is active for the currently active lexer condition state
      _currentRules: /* @__PURE__ */ d(function() {
        return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
      }, "_currentRules"),
      // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
      topState: /* @__PURE__ */ d(function(o) {
        return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
      }, "topState"),
      // alias for begin(condition)
      pushState: /* @__PURE__ */ d(function(o) {
        this.begin(o);
      }, "pushState"),
      // return the number of states currently on the stack
      stateStackSize: /* @__PURE__ */ d(function() {
        return this.conditionStack.length;
      }, "stateStackSize"),
      options: { "case-insensitive": !0 },
      performAction: /* @__PURE__ */ d(function(o, g, h, S) {
        switch (h) {
          case 0:
            return this.begin("open_directive"), "open_directive";
          case 1:
            return this.begin("acc_title"), 31;
          case 2:
            return this.popState(), "acc_title_value";
          case 3:
            return this.begin("acc_descr"), 33;
          case 4:
            return this.popState(), "acc_descr_value";
          case 5:
            this.begin("acc_descr_multiline");
            break;
          case 6:
            this.popState();
            break;
          case 7:
            return "acc_descr_multiline_value";
          case 8:
            break;
          case 9:
            break;
          case 10:
            break;
          case 11:
            return 10;
          case 12:
            break;
          case 13:
            break;
          case 14:
            this.begin("href");
            break;
          case 15:
            this.popState();
            break;
          case 16:
            return 43;
          case 17:
            this.begin("callbackname");
            break;
          case 18:
            this.popState();
            break;
          case 19:
            this.popState(), this.begin("callbackargs");
            break;
          case 20:
            return 41;
          case 21:
            this.popState();
            break;
          case 22:
            return 42;
          case 23:
            this.begin("click");
            break;
          case 24:
            this.popState();
            break;
          case 25:
            return 40;
          case 26:
            return 4;
          case 27:
            return 22;
          case 28:
            return 23;
          case 29:
            return 24;
          case 30:
            return 25;
          case 31:
            return 26;
          case 32:
            return 28;
          case 33:
            return 27;
          case 34:
            return 29;
          case 35:
            return 12;
          case 36:
            return 13;
          case 37:
            return 14;
          case 38:
            return 15;
          case 39:
            return 16;
          case 40:
            return 17;
          case 41:
            return 18;
          case 42:
            return 20;
          case 43:
            return 21;
          case 44:
            return "date";
          case 45:
            return 30;
          case 46:
            return "accDescription";
          case 47:
            return 36;
          case 48:
            return 38;
          case 49:
            return 39;
          case 50:
            return ":";
          case 51:
            return 6;
          case 52:
            return "INVALID";
        }
      }, "anonymous"),
      rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:weekend\s+friday\b)/i, /^(?:weekend\s+saturday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
      conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, callbackargs: { rules: [21, 22], inclusive: !1 }, callbackname: { rules: [18, 19, 20], inclusive: !1 }, href: { rules: [15, 16], inclusive: !1 }, click: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], inclusive: !0 } }
    };
    return _;
  }();
  M.lexer = C;
  function k() {
    this.yy = {};
  }
  return d(k, "Parser"), k.prototype = M, M.Parser = k, new k();
}();
pe.parser = pe;
var Oi = pe;
et.extend(Fi);
et.extend(Li);
et.extend(Ni);
var Qe = { friday: 5, saturday: 6 }, st = "", Ce = "", _e = void 0, Me = "", Nt = [], Ot = [], Se = /* @__PURE__ */ new Map(), $e = [], Xt = [], At = "", Ye = "", Dn = ["active", "done", "crit", "milestone"], Ae = [], zt = !1, Fe = !1, Ue = "sunday", te = "saturday", ve = 0, zi = /* @__PURE__ */ d(function() {
  $e = [], Xt = [], At = "", Ae = [], qt = 0, be = void 0, Gt = void 0, K = [], st = "", Ce = "", Ye = "", _e = void 0, Me = "", Nt = [], Ot = [], zt = !1, Fe = !1, ve = 0, Se = /* @__PURE__ */ new Map(), On(), Ue = "sunday", te = "saturday";
}, "clear"), Vi = /* @__PURE__ */ d(function(t) {
  Ce = t;
}, "setAxisFormat"), Bi = /* @__PURE__ */ d(function() {
  return Ce;
}, "getAxisFormat"), Zi = /* @__PURE__ */ d(function(t) {
  _e = t;
}, "setTickInterval"), ji = /* @__PURE__ */ d(function() {
  return _e;
}, "getTickInterval"), qi = /* @__PURE__ */ d(function(t) {
  Me = t;
}, "setTodayMarker"), Gi = /* @__PURE__ */ d(function() {
  return Me;
}, "getTodayMarker"), Ji = /* @__PURE__ */ d(function(t) {
  st = t;
}, "setDateFormat"), Ri = /* @__PURE__ */ d(function() {
  zt = !0;
}, "enableInclusiveEndDates"), Ki = /* @__PURE__ */ d(function() {
  return zt;
}, "endDatesAreInclusive"), Qi = /* @__PURE__ */ d(function() {
  Fe = !0;
}, "enableTopAxis"), Xi = /* @__PURE__ */ d(function() {
  return Fe;
}, "topAxisEnabled"), ta = /* @__PURE__ */ d(function(t) {
  Ye = t;
}, "setDisplayMode"), ea = /* @__PURE__ */ d(function() {
  return Ye;
}, "getDisplayMode"), na = /* @__PURE__ */ d(function() {
  return st;
}, "getDateFormat"), ra = /* @__PURE__ */ d(function(t) {
  Nt = t.toLowerCase().split(/[\s,]+/);
}, "setIncludes"), ia = /* @__PURE__ */ d(function() {
  return Nt;
}, "getIncludes"), aa = /* @__PURE__ */ d(function(t) {
  Ot = t.toLowerCase().split(/[\s,]+/);
}, "setExcludes"), sa = /* @__PURE__ */ d(function() {
  return Ot;
}, "getExcludes"), oa = /* @__PURE__ */ d(function() {
  return Se;
}, "getLinks"), ca = /* @__PURE__ */ d(function(t) {
  At = t, $e.push(t);
}, "addSection"), la = /* @__PURE__ */ d(function() {
  return $e;
}, "getSections"), ua = /* @__PURE__ */ d(function() {
  let t = Xe();
  const e = 10;
  let n = 0;
  for (; !t && n < e; )
    t = Xe(), n++;
  return Xt = K, Xt;
}, "getTasks"), Cn = /* @__PURE__ */ d(function(t, e, n, r) {
  return r.includes(t.format(e.trim())) ? !1 : n.includes("weekends") && (t.isoWeekday() === Qe[te] || t.isoWeekday() === Qe[te] + 1) || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(t.format(e.trim()));
}, "isInvalidDate"), da = /* @__PURE__ */ d(function(t) {
  Ue = t;
}, "setWeekday"), ha = /* @__PURE__ */ d(function() {
  return Ue;
}, "getWeekday"), fa = /* @__PURE__ */ d(function(t) {
  te = t;
}, "setWeekend"), _n = /* @__PURE__ */ d(function(t, e, n, r) {
  if (!n.length || t.manualEndTime)
    return;
  let a;
  t.startTime instanceof Date ? a = et(t.startTime) : a = et(t.startTime, e, !0), a = a.add(1, "d");
  let s;
  t.endTime instanceof Date ? s = et(t.endTime) : s = et(t.endTime, e, !0);
  const [c, m] = ga(
    a,
    s,
    e,
    n,
    r
  );
  t.endTime = c.toDate(), t.renderEndTime = m;
}, "checkTaskDates"), ga = /* @__PURE__ */ d(function(t, e, n, r, a) {
  let s = !1, c = null;
  for (; t <= e; )
    s || (c = e.toDate()), s = Cn(t, n, r, a), s && (e = e.add(1, "d")), t = t.add(1, "d");
  return [e, c];
}, "fixTaskDates"), Te = /* @__PURE__ */ d(function(t, e, n) {
  n = n.trim();
  const r = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
  if (r !== null) {
    let s = null;
    for (const m of r.groups.ids.split(" ")) {
      let $ = Dt(m);
      $ !== void 0 && (!s || $.endTime > s.endTime) && (s = $);
    }
    if (s)
      return s.endTime;
    const c = /* @__PURE__ */ new Date();
    return c.setHours(0, 0, 0, 0), c;
  }
  let a = et(n, e.trim(), !0);
  if (a.isValid())
    return a.toDate();
  {
    Jt.debug("Invalid date:" + n), Jt.debug("With date format:" + e.trim());
    const s = new Date(n);
    if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
    // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
    // This can cause virtually infinite loops while rendering, so for the
    // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
    // invalid.
    s.getFullYear() < -1e4 || s.getFullYear() > 1e4)
      throw new Error("Invalid date:" + n);
    return s;
  }
}, "getStartDate"), Mn = /* @__PURE__ */ d(function(t) {
  const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
  return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
}, "parseDuration"), Sn = /* @__PURE__ */ d(function(t, e, n, r = !1) {
  n = n.trim();
  const a = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
  if (a !== null) {
    let f = null;
    for (const A of a.groups.ids.split(" ")) {
      let x = Dt(A);
      x !== void 0 && (!f || x.startTime < f.startTime) && (f = x);
    }
    if (f)
      return f.startTime;
    const D = /* @__PURE__ */ new Date();
    return D.setHours(0, 0, 0, 0), D;
  }
  let s = et(n, e.trim(), !0);
  if (s.isValid())
    return r && (s = s.add(1, "d")), s.toDate();
  let c = et(t);
  const [m, $] = Mn(n);
  if (!Number.isNaN(m)) {
    const f = c.add(m, $);
    f.isValid() && (c = f);
  }
  return c.toDate();
}, "getEndDate"), qt = 0, St = /* @__PURE__ */ d(function(t) {
  return t === void 0 ? (qt = qt + 1, "task" + qt) : t;
}, "parseId"), ya = /* @__PURE__ */ d(function(t, e) {
  let n;
  e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
  const r = n.split(","), a = {};
  Ee(r, a, Dn);
  for (let c = 0; c < r.length; c++)
    r[c] = r[c].trim();
  let s = "";
  switch (r.length) {
    case 1:
      a.id = St(), a.startTime = t.endTime, s = r[0];
      break;
    case 2:
      a.id = St(), a.startTime = Te(void 0, st, r[0]), s = r[1];
      break;
    case 3:
      a.id = St(r[0]), a.startTime = Te(void 0, st, r[1]), s = r[2];
      break;
  }
  return s && (a.endTime = Sn(a.startTime, st, s, zt), a.manualEndTime = et(s, "YYYY-MM-DD", !0).isValid(), _n(a, st, Ot, Nt)), a;
}, "compileData"), ma = /* @__PURE__ */ d(function(t, e) {
  let n;
  e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
  const r = n.split(","), a = {};
  Ee(r, a, Dn);
  for (let s = 0; s < r.length; s++)
    r[s] = r[s].trim();
  switch (r.length) {
    case 1:
      a.id = St(), a.startTime = {
        type: "prevTaskEnd",
        id: t
      }, a.endTime = {
        data: r[0]
      };
      break;
    case 2:
      a.id = St(), a.startTime = {
        type: "getStartDate",
        startData: r[0]
      }, a.endTime = {
        data: r[1]
      };
      break;
    case 3:
      a.id = St(r[0]), a.startTime = {
        type: "getStartDate",
        startData: r[1]
      }, a.endTime = {
        data: r[2]
      };
      break;
  }
  return a;
}, "parseData"), be, Gt, K = [], $n = {}, ka = /* @__PURE__ */ d(function(t, e) {
  const n = {
    section: At,
    type: At,
    processed: !1,
    manualEndTime: !1,
    renderEndTime: null,
    raw: { data: e },
    task: t,
    classes: []
  }, r = ma(Gt, e);
  n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = Gt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.order = ve, ve++;
  const a = K.push(n);
  Gt = n.id, $n[n.id] = a - 1;
}, "addTask"), Dt = /* @__PURE__ */ d(function(t) {
  const e = $n[t];
  return K[e];
}, "findTaskById"), pa = /* @__PURE__ */ d(function(t, e) {
  const n = {
    section: At,
    type: At,
    description: t,
    task: t,
    classes: []
  }, r = ya(be, e);
  n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, be = n, Xt.push(n);
}, "addTaskOrg"), Xe = /* @__PURE__ */ d(function() {
  const t = /* @__PURE__ */ d(function(n) {
    const r = K[n];
    let a = "";
    switch (K[n].raw.startTime.type) {
      case "prevTaskEnd": {
        const s = Dt(r.prevTaskId);
        r.startTime = s.endTime;
        break;
      }
      case "getStartDate":
        a = Te(void 0, st, K[n].raw.startTime.startData), a && (K[n].startTime = a);
        break;
    }
    return K[n].startTime && (K[n].endTime = Sn(
      K[n].startTime,
      st,
      K[n].raw.endTime.data,
      zt
    ), K[n].endTime && (K[n].processed = !0, K[n].manualEndTime = et(
      K[n].raw.endTime.data,
      "YYYY-MM-DD",
      !0
    ).isValid(), _n(K[n], st, Ot, Nt))), K[n].processed;
  }, "compileTask");
  let e = !0;
  for (const [n, r] of K.entries())
    t(n), e = e && r.processed;
  return e;
}, "compileTasks"), va = /* @__PURE__ */ d(function(t, e) {
  let n = e;
  _t().securityLevel !== "loose" && (n = Nn.sanitizeUrl(e)), t.split(",").forEach(function(r) {
    Dt(r) !== void 0 && (An(r, () => {
      window.open(n, "_self");
    }), Se.set(r, n));
  }), Yn(t, "clickable");
}, "setLink"), Yn = /* @__PURE__ */ d(function(t, e) {
  t.split(",").forEach(function(n) {
    let r = Dt(n);
    r !== void 0 && r.classes.push(e);
  });
}, "setClass"), Ta = /* @__PURE__ */ d(function(t, e, n) {
  if (_t().securityLevel !== "loose" || e === void 0)
    return;
  let r = [];
  if (typeof n == "string") {
    r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
    for (let a = 0; a < r.length; a++) {
      let s = r[a].trim();
      s.startsWith('"') && s.endsWith('"') && (s = s.substr(1, s.length - 2)), r[a] = s;
    }
  }
  r.length === 0 && r.push(t), Dt(t) !== void 0 && An(t, () => {
    zn.runFunc(e, ...r);
  });
}, "setClickFun"), An = /* @__PURE__ */ d(function(t, e) {
  Ae.push(
    function() {
      const n = document.querySelector(`[id="${t}"]`);
      n !== null && n.addEventListener("click", function() {
        e();
      });
    },
    function() {
      const n = document.querySelector(`[id="${t}-text"]`);
      n !== null && n.addEventListener("click", function() {
        e();
      });
    }
  );
}, "pushFun"), ba = /* @__PURE__ */ d(function(t, e, n) {
  t.split(",").forEach(function(r) {
    Ta(r, e, n);
  }), Yn(t, "clickable");
}, "setClickEvent"), xa = /* @__PURE__ */ d(function(t) {
  Ae.forEach(function(e) {
    e(t);
  });
}, "bindFunctions"), wa = {
  getConfig: /* @__PURE__ */ d(() => _t().gantt, "getConfig"),
  clear: zi,
  setDateFormat: Ji,
  getDateFormat: na,
  enableInclusiveEndDates: Ri,
  endDatesAreInclusive: Ki,
  enableTopAxis: Qi,
  topAxisEnabled: Xi,
  setAxisFormat: Vi,
  getAxisFormat: Bi,
  setTickInterval: Zi,
  getTickInterval: ji,
  setTodayMarker: qi,
  getTodayMarker: Gi,
  setAccTitle: Wn,
  getAccTitle: Ln,
  setDiagramTitle: In,
  getDiagramTitle: En,
  setDisplayMode: ta,
  getDisplayMode: ea,
  setAccDescription: Un,
  getAccDescription: Fn,
  addSection: ca,
  getSections: la,
  getTasks: ua,
  addTask: ka,
  findTaskById: Dt,
  addTaskOrg: pa,
  setIncludes: ra,
  getIncludes: ia,
  setExcludes: aa,
  getExcludes: sa,
  setClickEvent: ba,
  setLink: va,
  getLinks: oa,
  bindFunctions: xa,
  parseDuration: Mn,
  isInvalidDate: Cn,
  setWeekday: da,
  getWeekday: ha,
  setWeekend: fa
};
function Ee(t, e, n) {
  let r = !0;
  for (; r; )
    r = !1, n.forEach(function(a) {
      const s = "^\\s*" + a + "\\s*$", c = new RegExp(s);
      t[0].match(c) && (e[a] = !0, t.shift(1), r = !0);
    });
}
d(Ee, "getTaskTags");
var Da = /* @__PURE__ */ d(function() {
  Jt.debug("Something is calling, setConf, remove the call");
}, "setConf"), tn = {
  monday: Wt,
  tuesday: gn,
  wednesday: yn,
  thursday: Tt,
  friday: mn,
  saturday: kn,
  sunday: Pt
}, Ca = /* @__PURE__ */ d((t, e) => {
  let n = [...t].map(() => -1 / 0), r = [...t].sort((s, c) => s.startTime - c.startTime || s.order - c.order), a = 0;
  for (const s of r)
    for (let c = 0; c < n.length; c++)
      if (s.startTime >= n[c]) {
        n[c] = s.endTime, s.order = c + e, c > a && (a = c);
        break;
      }
  return a;
}, "getMaxIntersections"), ut, _a = /* @__PURE__ */ d(function(t, e, n, r) {
  const a = _t().gantt, s = _t().securityLevel;
  let c;
  s === "sandbox" && (c = Bt("#i" + e));
  const m = s === "sandbox" ? Bt(c.nodes()[0].contentDocument.body) : Bt("body"), $ = s === "sandbox" ? c.nodes()[0].contentDocument : document, f = $.getElementById(e);
  ut = f.parentElement.offsetWidth, ut === void 0 && (ut = 1200), a.useWidth !== void 0 && (ut = a.useWidth);
  const D = r.db.getTasks();
  let A = [];
  for (const T of D)
    A.push(T.type);
  A = E(A);
  const x = {};
  let w = 2 * a.topPadding;
  if (r.db.getDisplayMode() === "compact" || a.displayMode === "compact") {
    const T = {};
    for (const M of D)
      T[M.section] === void 0 ? T[M.section] = [M] : T[M.section].push(M);
    let Y = 0;
    for (const M of Object.keys(T)) {
      const C = Ca(T[M], Y) + 1;
      Y += C, w += C * (a.barHeight + a.barGap), x[M] = C;
    }
  } else {
    w += D.length * (a.barHeight + a.barGap);
    for (const T of A)
      x[T] = D.filter((Y) => Y.type === T).length;
  }
  f.setAttribute("viewBox", "0 0 " + ut + " " + w);
  const j = m.select(`[id="${e}"]`), y = Si().domain([
    Kn(D, function(T) {
      return T.startTime;
    }),
    Rn(D, function(T) {
      return T.endTime;
    })
  ]).rangeRound([0, ut - a.leftPadding - a.rightPadding]);
  function F(T, Y) {
    const M = T.startTime, C = Y.startTime;
    let k = 0;
    return M > C ? k = 1 : M < C && (k = -1), k;
  }
  d(F, "taskCompare"), D.sort(F), P(D, ut, w), Hn(j, w, ut, a.useMaxWidth), j.append("text").text(r.db.getDiagramTitle()).attr("x", ut / 2).attr("y", a.titleTopMargin).attr("class", "titleText");
  function P(T, Y, M) {
    const C = a.barHeight, k = C + a.barGap, _ = a.topPadding, o = a.leftPadding, g = Zn().domain([0, A.length]).range(["#00B9FA", "#F95002"]).interpolate(hr);
    V(
      k,
      _,
      o,
      Y,
      M,
      T,
      r.db.getExcludes(),
      r.db.getIncludes()
    ), B(o, _, Y, M), H(T, k, _, o, C, g, Y), R(k, _), b(o, _, Y, M);
  }
  d(P, "makeGantt");
  function H(T, Y, M, C, k, _, o) {
    const g = [...new Set(T.map((i) => i.order))].map((i) => T.find((v) => v.order === i));
    j.append("g").selectAll("rect").data(g).enter().append("rect").attr("x", 0).attr("y", function(i, v) {
      return v = i.order, v * Y + M - 2;
    }).attr("width", function() {
      return o - a.rightPadding / 2;
    }).attr("height", Y).attr("class", function(i) {
      for (const [v, l] of A.entries())
        if (i.type === l)
          return "section section" + v % a.numberSectionStyles;
      return "section section0";
    });
    const h = j.append("g").selectAll("rect").data(T).enter(), S = r.db.getLinks();
    if (h.append("rect").attr("id", function(i) {
      return i.id;
    }).attr("rx", 3).attr("ry", 3).attr("x", function(i) {
      return i.milestone ? y(i.startTime) + C + 0.5 * (y(i.endTime) - y(i.startTime)) - 0.5 * k : y(i.startTime) + C;
    }).attr("y", function(i, v) {
      return v = i.order, v * Y + M;
    }).attr("width", function(i) {
      return i.milestone ? k : y(i.renderEndTime || i.endTime) - y(i.startTime);
    }).attr("height", k).attr("transform-origin", function(i, v) {
      return v = i.order, (y(i.startTime) + C + 0.5 * (y(i.endTime) - y(i.startTime))).toString() + "px " + (v * Y + M + 0.5 * k).toString() + "px";
    }).attr("class", function(i) {
      const v = "task";
      let l = "";
      i.classes.length > 0 && (l = i.classes.join(" "));
      let N = 0;
      for (const [G, q] of A.entries())
        i.type === q && (N = G % a.numberSectionStyles);
      let I = "";
      return i.active ? i.crit ? I += " activeCrit" : I = " active" : i.done ? i.crit ? I = " doneCrit" : I = " done" : i.crit && (I += " crit"), I.length === 0 && (I = " task"), i.milestone && (I = " milestone " + I), I += N, I += " " + l, v + I;
    }), h.append("text").attr("id", function(i) {
      return i.id + "-text";
    }).text(function(i) {
      return i.task;
    }).attr("font-size", a.fontSize).attr("x", function(i) {
      let v = y(i.startTime), l = y(i.renderEndTime || i.endTime);
      i.milestone && (v += 0.5 * (y(i.endTime) - y(i.startTime)) - 0.5 * k), i.milestone && (l = v + k);
      const N = this.getBBox().width;
      return N > l - v ? l + N + 1.5 * a.leftPadding > o ? v + C - 5 : l + C + 5 : (l - v) / 2 + v + C;
    }).attr("y", function(i, v) {
      return v = i.order, v * Y + a.barHeight / 2 + (a.fontSize / 2 - 2) + M;
    }).attr("text-height", k).attr("class", function(i) {
      const v = y(i.startTime);
      let l = y(i.endTime);
      i.milestone && (l = v + k);
      const N = this.getBBox().width;
      let I = "";
      i.classes.length > 0 && (I = i.classes.join(" "));
      let G = 0;
      for (const [kt, J] of A.entries())
        i.type === J && (G = kt % a.numberSectionStyles);
      let q = "";
      return i.active && (i.crit ? q = "activeCritText" + G : q = "activeText" + G), i.done ? i.crit ? q = q + " doneCritText" + G : q = q + " doneText" + G : i.crit && (q = q + " critText" + G), i.milestone && (q += " milestoneText"), N > l - v ? l + N + 1.5 * a.leftPadding > o ? I + " taskTextOutsideLeft taskTextOutside" + G + " " + q : I + " taskTextOutsideRight taskTextOutside" + G + " " + q + " width-" + N : I + " taskText taskText" + G + " " + q + " width-" + N;
    }), _t().securityLevel === "sandbox") {
      let i;
      i = Bt("#i" + e);
      const v = i.nodes()[0].contentDocument;
      h.filter(function(l) {
        return S.has(l.id);
      }).each(function(l) {
        var N = v.querySelector("#" + l.id), I = v.querySelector("#" + l.id + "-text");
        const G = N.parentNode;
        var q = v.createElement("a");
        q.setAttribute("xlink:href", S.get(l.id)), q.setAttribute("target", "_top"), G.appendChild(q), q.appendChild(N), q.appendChild(I);
      });
    }
  }
  d(H, "drawRects");
  function V(T, Y, M, C, k, _, o, g) {
    if (o.length === 0 && g.length === 0)
      return;
    let h, S;
    for (const { startTime: I, endTime: G } of _)
      (h === void 0 || I < h) && (h = I), (S === void 0 || G > S) && (S = G);
    if (!h || !S)
      return;
    if (et(S).diff(et(h), "year") > 5) {
      Jt.warn(
        "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
      );
      return;
    }
    const i = r.db.getDateFormat(), v = [];
    let l = null, N = et(h);
    for (; N.valueOf() <= S; )
      r.db.isInvalidDate(N, i, o, g) ? l ? l.end = N : l = {
        start: N,
        end: N
      } : l && (v.push(l), l = null), N = N.add(1, "d");
    j.append("g").selectAll("rect").data(v).enter().append("rect").attr("id", function(I) {
      return "exclude-" + I.start.format("YYYY-MM-DD");
    }).attr("x", function(I) {
      return y(I.start) + M;
    }).attr("y", a.gridLineStartPadding).attr("width", function(I) {
      const G = I.end.add(1, "day");
      return y(G) - y(I.start);
    }).attr("height", k - Y - a.gridLineStartPadding).attr("transform-origin", function(I, G) {
      return (y(I.start) + M + 0.5 * (y(I.end) - y(I.start))).toString() + "px " + (G * T + 0.5 * k).toString() + "px";
    }).attr("class", "exclude-range");
  }
  d(V, "drawExcludeDays");
  function B(T, Y, M, C) {
    let k = ar(y).tickSize(-C + Y + a.gridLineStartPadding).tickFormat(Qt(r.db.getAxisFormat() || a.axisFormat || "%Y-%m-%d"));
    const _ = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
      r.db.getTickInterval() || a.tickInterval
    );
    if (_ !== null) {
      const o = _[1], g = _[2], h = r.db.getWeekday() || a.weekday;
      switch (g) {
        case "millisecond":
          k.ticks($t.every(o));
          break;
        case "second":
          k.ticks(mt.every(o));
          break;
        case "minute":
          k.ticks(It.every(o));
          break;
        case "hour":
          k.ticks(Lt.every(o));
          break;
        case "day":
          k.ticks(vt.every(o));
          break;
        case "week":
          k.ticks(tn[h].every(o));
          break;
        case "month":
          k.ticks(Ht.every(o));
          break;
      }
    }
    if (j.append("g").attr("class", "grid").attr("transform", "translate(" + T + ", " + (C - 50) + ")").call(k).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || a.topAxis) {
      let o = ir(y).tickSize(-C + Y + a.gridLineStartPadding).tickFormat(Qt(r.db.getAxisFormat() || a.axisFormat || "%Y-%m-%d"));
      if (_ !== null) {
        const g = _[1], h = _[2], S = r.db.getWeekday() || a.weekday;
        switch (h) {
          case "millisecond":
            o.ticks($t.every(g));
            break;
          case "second":
            o.ticks(mt.every(g));
            break;
          case "minute":
            o.ticks(It.every(g));
            break;
          case "hour":
            o.ticks(Lt.every(g));
            break;
          case "day":
            o.ticks(vt.every(g));
            break;
          case "week":
            o.ticks(tn[S].every(g));
            break;
          case "month":
            o.ticks(Ht.every(g));
            break;
        }
      }
      j.append("g").attr("class", "grid").attr("transform", "translate(" + T + ", " + Y + ")").call(o).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
    }
  }
  d(B, "makeGrid");
  function R(T, Y) {
    let M = 0;
    const C = Object.keys(x).map((k) => [k, x[k]]);
    j.append("g").selectAll("text").data(C).enter().append(function(k) {
      const _ = k[0].split(Pn.lineBreakRegex), o = -(_.length - 1) / 2, g = $.createElementNS("http://www.w3.org/2000/svg", "text");
      g.setAttribute("dy", o + "em");
      for (const [h, S] of _.entries()) {
        const i = $.createElementNS("http://www.w3.org/2000/svg", "tspan");
        i.setAttribute("alignment-baseline", "central"), i.setAttribute("x", "10"), h > 0 && i.setAttribute("dy", "1em"), i.textContent = S, g.appendChild(i);
      }
      return g;
    }).attr("x", 10).attr("y", function(k, _) {
      if (_ > 0)
        for (let o = 0; o < _; o++)
          return M += C[_ - 1][1], k[1] * T / 2 + M * T + Y;
      else
        return k[1] * T / 2 + Y;
    }).attr("font-size", a.sectionFontSize).attr("class", function(k) {
      for (const [_, o] of A.entries())
        if (k[0] === o)
          return "sectionTitle sectionTitle" + _ % a.numberSectionStyles;
      return "sectionTitle";
    });
  }
  d(R, "vertLabels");
  function b(T, Y, M, C) {
    const k = r.db.getTodayMarker();
    if (k === "off")
      return;
    const _ = j.append("g").attr("class", "today"), o = /* @__PURE__ */ new Date(), g = _.append("line");
    g.attr("x1", y(o) + T).attr("x2", y(o) + T).attr("y1", a.titleTopMargin).attr("y2", C - a.titleTopMargin).attr("class", "today"), k !== "" && g.attr("style", k.replace(/,/g, ";"));
  }
  d(b, "drawToday");
  function E(T) {
    const Y = {}, M = [];
    for (let C = 0, k = T.length; C < k; ++C)
      Object.prototype.hasOwnProperty.call(Y, T[C]) || (Y[T[C]] = !0, M.push(T[C]));
    return M;
  }
  d(E, "checkUnique");
}, "draw"), Ma = {
  setConf: Da,
  draw: _a
}, Sa = /* @__PURE__ */ d((t) => `
  .mermaid-main-font {
    font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
  }

  .exclude-range {
    fill: ${t.excludeBkgColor};
  }

  .section {
    stroke: none;
    opacity: 0.2;
  }

  .section0 {
    fill: ${t.sectionBkgColor};
  }

  .section2 {
    fill: ${t.sectionBkgColor2};
  }

  .section1,
  .section3 {
    fill: ${t.altSectionBkgColor};
    opacity: 0.2;
  }

  .sectionTitle0 {
    fill: ${t.titleColor};
  }

  .sectionTitle1 {
    fill: ${t.titleColor};
  }

  .sectionTitle2 {
    fill: ${t.titleColor};
  }

  .sectionTitle3 {
    fill: ${t.titleColor};
  }

  .sectionTitle {
    text-anchor: start;
    font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
  }


  /* Grid and axis */

  .grid .tick {
    stroke: ${t.gridColor};
    opacity: 0.8;
    shape-rendering: crispEdges;
  }

  .grid .tick text {
    font-family: ${t.fontFamily};
    fill: ${t.textColor};
  }

  .grid path {
    stroke-width: 0;
  }


  /* Today line */

  .today {
    fill: none;
    stroke: ${t.todayLineColor};
    stroke-width: 2px;
  }


  /* Task styling */

  /* Default task */

  .task {
    stroke-width: 2;
  }

  .taskText {
    text-anchor: middle;
    font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
  }

  .taskTextOutsideRight {
    fill: ${t.taskTextDarkColor};
    text-anchor: start;
    font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
  }

  .taskTextOutsideLeft {
    fill: ${t.taskTextDarkColor};
    text-anchor: end;
  }


  /* Special case clickable */

  .task.clickable {
    cursor: pointer;
  }

  .taskText.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideLeft.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideRight.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }


  /* Specific task settings for the sections*/

  .taskText0,
  .taskText1,
  .taskText2,
  .taskText3 {
    fill: ${t.taskTextColor};
  }

  .task0,
  .task1,
  .task2,
  .task3 {
    fill: ${t.taskBkgColor};
    stroke: ${t.taskBorderColor};
  }

  .taskTextOutside0,
  .taskTextOutside2
  {
    fill: ${t.taskTextOutsideColor};
  }

  .taskTextOutside1,
  .taskTextOutside3 {
    fill: ${t.taskTextOutsideColor};
  }


  /* Active task */

  .active0,
  .active1,
  .active2,
  .active3 {
    fill: ${t.activeTaskBkgColor};
    stroke: ${t.activeTaskBorderColor};
  }

  .activeText0,
  .activeText1,
  .activeText2,
  .activeText3 {
    fill: ${t.taskTextDarkColor} !important;
  }


  /* Completed task */

  .done0,
  .done1,
  .done2,
  .done3 {
    stroke: ${t.doneTaskBorderColor};
    fill: ${t.doneTaskBkgColor};
    stroke-width: 2;
  }

  .doneText0,
  .doneText1,
  .doneText2,
  .doneText3 {
    fill: ${t.taskTextDarkColor} !important;
  }


  /* Tasks on the critical line */

  .crit0,
  .crit1,
  .crit2,
  .crit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.critBkgColor};
    stroke-width: 2;
  }

  .activeCrit0,
  .activeCrit1,
  .activeCrit2,
  .activeCrit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.activeTaskBkgColor};
    stroke-width: 2;
  }

  .doneCrit0,
  .doneCrit1,
  .doneCrit2,
  .doneCrit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.doneTaskBkgColor};
    stroke-width: 2;
    cursor: pointer;
    shape-rendering: crispEdges;
  }

  .milestone {
    transform: rotate(45deg) scale(0.8,0.8);
  }

  .milestoneText {
    font-style: italic;
  }
  .doneCritText0,
  .doneCritText1,
  .doneCritText2,
  .doneCritText3 {
    fill: ${t.taskTextDarkColor} !important;
  }

  .activeCritText0,
  .activeCritText1,
  .activeCritText2,
  .activeCritText3 {
    fill: ${t.taskTextDarkColor} !important;
  }

  .titleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${t.titleColor || t.textColor};
    font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
  }
`, "getStyles"), $a = Sa, Ua = {
  parser: Oi,
  db: wa,
  renderer: Ma,
  styles: $a
};
export {
  Ua as diagram
};
