var Kt = typeof global == "object" && global && global.Object === Object && global, dr = typeof self == "object" && self && self.Object === Object && self, C = Kt || dr || Function("return this")(), y = C.Symbol, Qt = Object.prototype, vr = Qt.hasOwnProperty, _r = Qt.toString, $ = y ? y.toStringTag : void 0;
function gr(t) {
  var r = vr.call(t, $), n = t[$];
  try {
    t[$] = void 0;
    var e = !0;
  } catch {
  }
  var i = _r.call(t);
  return e && (r ? t[$] = n : delete t[$]), i;
}
var br = Object.prototype.toString;
function yr(t) {
  return br.call(t);
}
var jr = "[object Null]", mr = "[object Undefined]", yt = y ? y.toStringTag : void 0;
function M(t) {
  return t == null ? t === void 0 ? mr : jr : yt && yt in Object(t) ? gr(t) : yr(t);
}
function S(t) {
  return typeof t == "object" && !!t;
}
var Or = "[object Symbol]";
function ft(t) {
  return typeof t == "symbol" || S(t) && M(t) == Or;
}
function Zt(t, r) {
  for (var n = -1, e = t == null ? 0 : t.length, i = Array(e); ++n < e; ) i[n] = r(t[n], n, t);
  return i;
}
var d = Array.isArray, wr = 1 / 0, jt = y ? y.prototype : void 0, mt = jt ? jt.toString : void 0;
function Jt(t) {
  if (typeof t == "string") return t;
  if (d(t)) return Zt(t, Jt) + "";
  if (ft(t)) return mt ? mt.call(t) : "";
  var r = t + "";
  return r == "0" && 1 / t == -wr ? "-0" : r;
}
function lt(t) {
  var r = typeof t;
  return t != null && (r == "object" || r == "function");
}
function Q(t) {
  return t;
}
var Cr = "[object AsyncFunction]", Pr = "[object Function]", Ar = "[object GeneratorFunction]", Er = "[object Proxy]";
function H(t) {
  if (!lt(t)) return !1;
  var r = M(t);
  return r == Pr || r == Ar || r == Cr || r == Er;
}
var rt = C["__core-js_shared__"], Ot = function() {
  var t = /[^.]+$/.exec(rt && rt.keys && rt.keys.IE_PROTO || "");
  return t ? "Symbol(src)_1." + t : "";
}();
function zr(t) {
  return !!Ot && Ot in t;
}
var Lr = Function.prototype.toString;
function N(t) {
  if (t != null) {
    try {
      return Lr.call(t);
    } catch {
    }
    try {
      return t + "";
    } catch {
    }
  }
  return "";
}
var Sr = /[\\^$.*+?()[\]{}|]/g, Nr = /^\[object .+?Constructor\]$/, Dr = Function.prototype, xr = Object.prototype, Fr = Dr.toString, Mr = xr.hasOwnProperty, kr = RegExp("^" + Fr.call(Mr).replace(Sr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
function $r(t) {
  return !lt(t) || zr(t) ? !1 : (H(t) ? kr : Nr).test(N(t));
}
function Ir(t, r) {
  return t == null ? void 0 : t[r];
}
function D(t, r) {
  var n = Ir(t, r);
  return $r(n) ? n : void 0;
}
var st = D(C, "WeakMap");
function Tr(t, r, n) {
  switch (n.length) {
    case 0:
      return t.call(r);
    case 1:
      return t.call(r, n[0]);
    case 2:
      return t.call(r, n[0], n[1]);
    case 3:
      return t.call(r, n[0], n[1], n[2]);
  }
  return t.apply(r, n);
}
function Br() {
}
var Ur = 800, Rr = 16, Gr = Date.now;
function Vr(t) {
  var r = 0, n = 0;
  return function() {
    var e = Gr(), i = Rr - (e - n);
    if (n = e, i > 0) {
      if (++r >= Ur) return arguments[0];
    } else r = 0;
    return t.apply(void 0, arguments);
  };
}
function I(t) {
  return function() {
    return t;
  };
}
var wt = function() {
  try {
    var t = D(Object, "defineProperty");
    return t({}, "", {}), t;
  } catch {
  }
}(), Wr = Vr(wt ? function(t, r) {
  return wt(t, "toString", {
    configurable: !0,
    enumerable: !1,
    value: I(r),
    writable: !0
  });
} : Q);
function qr(t, r) {
  for (var n = -1, e = t == null ? 0 : t.length; ++n < e && r(t[n], n, t) !== !1; ) ;
  return t;
}
function Hr(t, r, n, e) {
  for (var i = t.length, o = n + -1; ++o < i; ) if (r(t[o], o, t)) return o;
  return -1;
}
function Kr(t) {
  return t !== t;
}
function Qr(t, r, n) {
  for (var e = n - 1, i = t.length; ++e < i; ) if (t[e] === r) return e;
  return -1;
}
function Zr(t, r, n) {
  return r === r ? Qr(t, r, n) : Hr(t, Kr, n);
}
function Jr(t, r) {
  return !!(t != null && t.length) && Zr(t, r, 0) > -1;
}
var Xr = 9007199254740991, Yr = /^(?:0|[1-9]\d*)$/;
function Xt(t, r) {
  var n = typeof t;
  return r ?? (r = Xr), !!r && (n == "number" || n != "symbol" && Yr.test(t)) && t > -1 && t % 1 == 0 && t < r;
}
function Yt(t, r) {
  return t === r || t !== t && r !== r;
}
var Ct = Math.max;
function tn(t, r, n) {
  return r = Ct(r === void 0 ? t.length - 1 : r, 0), function() {
    for (var e = arguments, i = -1, o = Ct(e.length - r, 0), s = Array(o); ++i < o; ) s[i] = e[r + i];
    i = -1;
    for (var u = Array(r + 1); ++i < r; ) u[i] = e[i];
    return u[r] = n(s), Tr(t, this, u);
  };
}
function rn(t, r) {
  return Wr(tn(t, r, Q), t + "");
}
var nn = 9007199254740991;
function ht(t) {
  return typeof t == "number" && t > -1 && t % 1 == 0 && t <= nn;
}
function Z(t) {
  return t != null && ht(t.length) && !H(t);
}
var en = Object.prototype;
function tr(t) {
  var r = t && t.constructor;
  return t === (typeof r == "function" && r.prototype || en);
}
function on(t, r) {
  for (var n = -1, e = Array(t); ++n < t; ) e[n] = r(n);
  return e;
}
var sn = "[object Arguments]";
function Pt(t) {
  return S(t) && M(t) == sn;
}
var rr = Object.prototype, un = rr.hasOwnProperty, an = rr.propertyIsEnumerable, J = Pt(/* @__PURE__ */ function() {
  return arguments;
}()) ? Pt : function(t) {
  return S(t) && un.call(t, "callee") && !an.call(t, "callee");
};
function cn() {
  return !1;
}
var nr = typeof exports == "object" && exports && !exports.nodeType && exports, At = nr && typeof module == "object" && module && !module.nodeType && module, Et = At && At.exports === nr ? C.Buffer : void 0, K = (Et ? Et.isBuffer : void 0) || cn, fn = "[object Arguments]", ln = "[object Array]", hn = "[object Boolean]", pn = "[object Date]", dn = "[object Error]", vn = "[object Function]", _n = "[object Map]", gn = "[object Number]", bn = "[object Object]", yn = "[object RegExp]", jn = "[object Set]", mn = "[object String]", On = "[object WeakMap]", wn = "[object ArrayBuffer]", Cn = "[object DataView]", Pn = "[object Float32Array]", An = "[object Float64Array]", En = "[object Int8Array]", zn = "[object Int16Array]", Ln = "[object Int32Array]", Sn = "[object Uint8Array]", Nn = "[object Uint8ClampedArray]", Dn = "[object Uint16Array]", xn = "[object Uint32Array]", l = {};
l[Pn] = l[An] = l[En] = l[zn] = l[Ln] = l[Sn] = l[Nn] = l[Dn] = l[xn] = !0, l[fn] = l[ln] = l[wn] = l[hn] = l[Cn] = l[pn] = l[dn] = l[vn] = l[_n] = l[gn] = l[bn] = l[yn] = l[jn] = l[mn] = l[On] = !1;
function Fn(t) {
  return S(t) && ht(t.length) && !!l[M(t)];
}
function Mn(t) {
  return function(r) {
    return t(r);
  };
}
var er = typeof exports == "object" && exports && !exports.nodeType && exports, B = er && typeof module == "object" && module && !module.nodeType && module, nt = B && B.exports === er && Kt.process, zt = function() {
  try {
    return B && B.require && B.require("util").types || nt && nt.binding && nt.binding("util");
  } catch {
  }
}(), Lt = zt && zt.isTypedArray, pt = Lt ? Mn(Lt) : Fn, kn = Object.prototype.hasOwnProperty;
function $n(t, r) {
  var n = d(t), e = !n && J(t), i = !n && !e && K(t), o = !n && !e && !i && pt(t), s = n || e || i || o, u = s ? on(t.length, String) : [], a = u.length;
  for (var c in t) (r || kn.call(t, c)) && !(s && (c == "length" || i && (c == "offset" || c == "parent") || o && (c == "buffer" || c == "byteLength" || c == "byteOffset") || Xt(c, a))) && u.push(c);
  return u;
}
function In(t, r) {
  return function(n) {
    return t(r(n));
  };
}
var Tn = In(Object.keys, Object), Bn = Object.prototype.hasOwnProperty;
function ir(t) {
  if (!tr(t)) return Tn(t);
  var r = [];
  for (var n in Object(t)) Bn.call(t, n) && n != "constructor" && r.push(n);
  return r;
}
function b(t) {
  return Z(t) ? $n(t) : ir(t);
}
var Un = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Rn = /^\w*$/;
function dt(t, r) {
  if (d(t)) return !1;
  var n = typeof t;
  return n == "number" || n == "symbol" || n == "boolean" || t == null || ft(t) ? !0 : Rn.test(t) || !Un.test(t) || r != null && t in Object(r);
}
var R = D(Object, "create");
function Gn() {
  this.__data__ = R ? R(null) : {}, this.size = 0;
}
function Vn(t) {
  var r = this.has(t) && delete this.__data__[t];
  return this.size -= +!!r, r;
}
var Wn = "__lodash_hash_undefined__", qn = Object.prototype.hasOwnProperty;
function Hn(t) {
  var r = this.__data__;
  if (R) {
    var n = r[t];
    return n === Wn ? void 0 : n;
  }
  return qn.call(r, t) ? r[t] : void 0;
}
var Kn = Object.prototype.hasOwnProperty;
function Qn(t) {
  var r = this.__data__;
  return R ? r[t] !== void 0 : Kn.call(r, t);
}
var Zn = "__lodash_hash_undefined__";
function Jn(t, r) {
  var n = this.__data__;
  return this.size += +!this.has(t), n[t] = R && r === void 0 ? Zn : r, this;
}
function L(t) {
  var r = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++r < n; ) {
    var e = t[r];
    this.set(e[0], e[1]);
  }
}
L.prototype.clear = Gn, L.prototype.delete = Vn, L.prototype.get = Hn, L.prototype.has = Qn, L.prototype.set = Jn;
function Xn() {
  this.__data__ = [], this.size = 0;
}
function X(t, r) {
  for (var n = t.length; n--; ) if (Yt(t[n][0], r)) return n;
  return -1;
}
var Yn = Array.prototype.splice;
function te(t) {
  var r = this.__data__, n = X(r, t);
  return n < 0 ? !1 : (n == r.length - 1 ? r.pop() : Yn.call(r, n, 1), --this.size, !0);
}
function re(t) {
  var r = this.__data__, n = X(r, t);
  return n < 0 ? void 0 : r[n][1];
}
function ne(t) {
  return X(this.__data__, t) > -1;
}
function ee(t, r) {
  var n = this.__data__, e = X(n, t);
  return e < 0 ? (++this.size, n.push([t, r])) : n[e][1] = r, this;
}
function m(t) {
  var r = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++r < n; ) {
    var e = t[r];
    this.set(e[0], e[1]);
  }
}
m.prototype.clear = Xn, m.prototype.delete = te, m.prototype.get = re, m.prototype.has = ne, m.prototype.set = ee;
var G = D(C, "Map");
function ie() {
  this.size = 0, this.__data__ = {
    hash: new L(),
    map: new (G || m)(),
    string: new L()
  };
}
function oe(t) {
  var r = typeof t;
  return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? t !== "__proto__" : t === null;
}
function Y(t, r) {
  var n = t.__data__;
  return oe(r) ? n[typeof r == "string" ? "string" : "hash"] : n.map;
}
function se(t) {
  var r = Y(this, t).delete(t);
  return this.size -= +!!r, r;
}
function ue(t) {
  return Y(this, t).get(t);
}
function ae(t) {
  return Y(this, t).has(t);
}
function ce(t, r) {
  var n = Y(this, t), e = n.size;
  return n.set(t, r), this.size += n.size == e ? 0 : 1, this;
}
function O(t) {
  var r = -1, n = t == null ? 0 : t.length;
  for (this.clear(); ++r < n; ) {
    var e = t[r];
    this.set(e[0], e[1]);
  }
}
O.prototype.clear = ie, O.prototype.delete = se, O.prototype.get = ue, O.prototype.has = ae, O.prototype.set = ce;
var fe = "Expected a function";
function vt(t, r) {
  if (typeof t != "function" || r != null && typeof r != "function") throw TypeError(fe);
  var n = function() {
    var e = arguments, i = r ? r.apply(this, e) : e[0], o = n.cache;
    if (o.has(i)) return o.get(i);
    var s = t.apply(this, e);
    return n.cache = o.set(i, s) || o, s;
  };
  return n.cache = new (vt.Cache || O)(), n;
}
vt.Cache = O;
var le = 500;
function he(t) {
  var r = vt(t, function(e) {
    return n.size === le && n.clear(), e;
  }), n = r.cache;
  return r;
}
var pe = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, de = /\\(\\)?/g, ve = he(function(t) {
  var r = [];
  return t.charCodeAt(0) === 46 && r.push(""), t.replace(pe, function(n, e, i, o) {
    r.push(i ? o.replace(de, "$1") : e || n);
  }), r;
});
function _e(t) {
  return t == null ? "" : Jt(t);
}
function or(t, r) {
  return d(t) ? t : dt(t, r) ? [t] : ve(_e(t));
}
var ge = 1 / 0;
function tt(t) {
  if (typeof t == "string" || ft(t)) return t;
  var r = t + "";
  return r == "0" && 1 / t == -ge ? "-0" : r;
}
function sr(t, r) {
  r = or(r, t);
  for (var n = 0, e = r.length; t != null && n < e; ) t = t[tt(r[n++])];
  return n && n == e ? t : void 0;
}
function be(t, r, n) {
  var e = t == null ? void 0 : sr(t, r);
  return e === void 0 ? n : e;
}
function ur(t, r) {
  for (var n = -1, e = r.length, i = t.length; ++n < e; ) t[i + n] = r[n];
  return t;
}
var St = y ? y.isConcatSpreadable : void 0;
function ye(t) {
  return d(t) || J(t) || !!(St && t && t[St]);
}
function je(t, r, n, e, i) {
  var o = -1, s = t.length;
  for (n || (n = ye), i || (i = []); ++o < s; ) {
    var u = t[o];
    n(u) ? ur(i, u) : e || (i[i.length] = u);
  }
  return i;
}
function me(t, r, n, e) {
  var i = -1, o = t == null ? 0 : t.length;
  for (e && o && (n = t[++i]); ++i < o; ) n = r(n, t[i], i, t);
  return n;
}
function Oe() {
  this.__data__ = new m(), this.size = 0;
}
function we(t) {
  var r = this.__data__, n = r.delete(t);
  return this.size = r.size, n;
}
function Ce(t) {
  return this.__data__.get(t);
}
function Pe(t) {
  return this.__data__.has(t);
}
var Ae = 200;
function Ee(t, r) {
  var n = this.__data__;
  if (n instanceof m) {
    var e = n.__data__;
    if (!G || e.length < Ae - 1) return e.push([t, r]), this.size = ++n.size, this;
    n = this.__data__ = new O(e);
  }
  return n.set(t, r), this.size = n.size, this;
}
function w(t) {
  var r = this.__data__ = new m(t);
  this.size = r.size;
}
w.prototype.clear = Oe, w.prototype.delete = we, w.prototype.get = Ce, w.prototype.has = Pe, w.prototype.set = Ee;
function ar(t, r) {
  for (var n = -1, e = t == null ? 0 : t.length, i = 0, o = []; ++n < e; ) {
    var s = t[n];
    r(s, n, t) && (o[i++] = s);
  }
  return o;
}
function ze() {
  return [];
}
var Le = Object.prototype.propertyIsEnumerable, Nt = Object.getOwnPropertySymbols, Se = Nt ? function(t) {
  return t == null ? [] : (t = Object(t), ar(Nt(t), function(r) {
    return Le.call(t, r);
  }));
} : ze;
function Ne(t, r, n) {
  var e = r(t);
  return d(t) ? e : ur(e, n(t));
}
function Dt(t) {
  return Ne(t, b, Se);
}
var ut = D(C, "DataView"), at = D(C, "Promise"), F = D(C, "Set"), xt = "[object Map]", De = "[object Object]", Ft = "[object Promise]", Mt = "[object Set]", kt = "[object WeakMap]", $t = "[object DataView]", xe = N(ut), Fe = N(G), Me = N(at), ke = N(F), $e = N(st), z = M;
(ut && z(new ut(/* @__PURE__ */ new ArrayBuffer(1))) != $t || G && z(new G()) != xt || at && z(at.resolve()) != Ft || F && z(new F()) != Mt || st && z(new st()) != kt) && (z = function(t) {
  var r = M(t), n = r == De ? t.constructor : void 0, e = n ? N(n) : "";
  if (e) switch (e) {
    case xe:
      return $t;
    case Fe:
      return xt;
    case Me:
      return Ft;
    case ke:
      return Mt;
    case $e:
      return kt;
  }
  return r;
});
var ct = z, It = C.Uint8Array, Ie = "__lodash_hash_undefined__";
function Te(t) {
  return this.__data__.set(t, Ie), this;
}
function Be(t) {
  return this.__data__.has(t);
}
function U(t) {
  var r = -1, n = t == null ? 0 : t.length;
  for (this.__data__ = new O(); ++r < n; ) this.add(t[r]);
}
U.prototype.add = U.prototype.push = Te, U.prototype.has = Be;
function Ue(t, r) {
  for (var n = -1, e = t == null ? 0 : t.length; ++n < e; ) if (r(t[n], n, t)) return !0;
  return !1;
}
function cr(t, r) {
  return t.has(r);
}
var Re = 1, Ge = 2;
function fr(t, r, n, e, i, o) {
  var s = n & Re, u = t.length, a = r.length;
  if (u != a && !(s && a > u)) return !1;
  var c = o.get(t), f = o.get(r);
  if (c && f) return c == r && f == t;
  var h = -1, p = !0, _ = n & Ge ? new U() : void 0;
  for (o.set(t, r), o.set(r, t); ++h < u; ) {
    var v = t[h], g = r[h];
    if (e) var j = s ? e(g, v, h, r, t, o) : e(v, g, h, t, r, o);
    if (j !== void 0) {
      if (j) continue;
      p = !1;
      break;
    }
    if (_) {
      if (!Ue(r, function(k, P) {
        if (!cr(_, P) && (v === k || i(v, k, n, e, o))) return _.push(P);
      })) {
        p = !1;
        break;
      }
    } else if (!(v === g || i(v, g, n, e, o))) {
      p = !1;
      break;
    }
  }
  return o.delete(t), o.delete(r), p;
}
function Ve(t) {
  var r = -1, n = Array(t.size);
  return t.forEach(function(e, i) {
    n[++r] = [i, e];
  }), n;
}
function _t(t) {
  var r = -1, n = Array(t.size);
  return t.forEach(function(e) {
    n[++r] = e;
  }), n;
}
var We = 1, qe = 2, He = "[object Boolean]", Ke = "[object Date]", Qe = "[object Error]", Ze = "[object Map]", Je = "[object Number]", Xe = "[object RegExp]", Ye = "[object Set]", ti = "[object String]", ri = "[object Symbol]", ni = "[object ArrayBuffer]", ei = "[object DataView]", Tt = y ? y.prototype : void 0, et = Tt ? Tt.valueOf : void 0;
function ii(t, r, n, e, i, o, s) {
  switch (n) {
    case ei:
      if (t.byteLength != r.byteLength || t.byteOffset != r.byteOffset) return !1;
      t = t.buffer, r = r.buffer;
    case ni:
      return !(t.byteLength != r.byteLength || !o(new It(t), new It(r)));
    case He:
    case Ke:
    case Je:
      return Yt(+t, +r);
    case Qe:
      return t.name == r.name && t.message == r.message;
    case Xe:
    case ti:
      return t == r + "";
    case Ze:
      var u = Ve;
    case Ye:
      var a = e & We;
      if (u || (u = _t), t.size != r.size && !a) return !1;
      var c = s.get(t);
      if (c) return c == r;
      e |= qe, s.set(t, r);
      var f = fr(u(t), u(r), e, i, o, s);
      return s.delete(t), f;
    case ri:
      if (et) return et.call(t) == et.call(r);
  }
  return !1;
}
var oi = 1, si = Object.prototype.hasOwnProperty;
function ui(t, r, n, e, i, o) {
  var s = n & oi, u = Dt(t), a = u.length;
  if (a != Dt(r).length && !s) return !1;
  for (var c = a; c--; ) {
    var f = u[c];
    if (!(s ? f in r : si.call(r, f))) return !1;
  }
  var h = o.get(t), p = o.get(r);
  if (h && p) return h == r && p == t;
  var _ = !0;
  o.set(t, r), o.set(r, t);
  for (var v = s; ++c < a; ) {
    f = u[c];
    var g = t[f], j = r[f];
    if (e) var k = s ? e(j, g, f, r, t, o) : e(g, j, f, t, r, o);
    if (!(k === void 0 ? g === j || i(g, j, n, e, o) : k)) {
      _ = !1;
      break;
    }
    v || (v = f == "constructor");
  }
  if (_ && !v) {
    var P = t.constructor, V = r.constructor;
    P != V && "constructor" in t && "constructor" in r && !(typeof P == "function" && P instanceof P && typeof V == "function" && V instanceof V) && (_ = !1);
  }
  return o.delete(t), o.delete(r), _;
}
var ai = 1, Bt = "[object Arguments]", Ut = "[object Array]", W = "[object Object]", Rt = Object.prototype.hasOwnProperty;
function ci(t, r, n, e, i, o) {
  var s = d(t), u = d(r), a = s ? Ut : ct(t), c = u ? Ut : ct(r);
  a = a == Bt ? W : a, c = c == Bt ? W : c;
  var f = a == W, h = c == W, p = a == c;
  if (p && K(t)) {
    if (!K(r)) return !1;
    s = !0, f = !1;
  }
  if (p && !f) return o || (o = new w()), s || pt(t) ? fr(t, r, n, e, i, o) : ii(t, r, a, n, e, i, o);
  if (!(n & ai)) {
    var _ = f && Rt.call(t, "__wrapped__"), v = h && Rt.call(r, "__wrapped__");
    if (_ || v) {
      var g = _ ? t.value() : t, j = v ? r.value() : r;
      return o || (o = new w()), i(g, j, n, e, o);
    }
  }
  return p ? (o || (o = new w()), ui(t, r, n, e, i, o)) : !1;
}
function gt(t, r, n, e, i) {
  return t === r ? !0 : t == null || r == null || !S(t) && !S(r) ? t !== t && r !== r : ci(t, r, n, e, gt, i);
}
var fi = 1, li = 2;
function hi(t, r, n, e) {
  var i = n.length, o = i;
  if (t == null) return !o;
  for (t = Object(t); i--; ) {
    var s = n[i];
    if (s[2] ? s[1] !== t[s[0]] : !(s[0] in t)) return !1;
  }
  for (; ++i < o; ) {
    s = n[i];
    var u = s[0], a = t[u], c = s[1];
    if (s[2]) {
      if (a === void 0 && !(u in t)) return !1;
    } else {
      var f = new w(), h;
      if (!(h === void 0 ? gt(c, a, fi | li, e, f) : h)) return !1;
    }
  }
  return !0;
}
function lr(t) {
  return t === t && !lt(t);
}
function pi(t) {
  for (var r = b(t), n = r.length; n--; ) {
    var e = r[n], i = t[e];
    r[n] = [
      e,
      i,
      lr(i)
    ];
  }
  return r;
}
function hr(t, r) {
  return function(n) {
    return n == null ? !1 : n[t] === r && (r !== void 0 || t in Object(n));
  };
}
function di(t) {
  var r = pi(t);
  return r.length == 1 && r[0][2] ? hr(r[0][0], r[0][1]) : function(n) {
    return n === t || hi(n, t, r);
  };
}
function vi(t, r) {
  return t != null && r in Object(t);
}
function _i(t, r, n) {
  r = or(r, t);
  for (var e = -1, i = r.length, o = !1; ++e < i; ) {
    var s = tt(r[e]);
    if (!(o = t != null && n(t, s))) break;
    t = t[s];
  }
  return o || ++e != i ? o : (i = t == null ? 0 : t.length, !!i && ht(i) && Xt(s, i) && (d(t) || J(t)));
}
function gi(t, r) {
  return t != null && _i(t, r, vi);
}
var bi = 1, yi = 2;
function ji(t, r) {
  return dt(t) && lr(r) ? hr(tt(t), r) : function(n) {
    var e = be(n, t);
    return e === void 0 && e === r ? gi(n, t) : gt(r, e, bi | yi);
  };
}
function mi(t) {
  return function(r) {
    return r == null ? void 0 : r[t];
  };
}
function Oi(t) {
  return function(r) {
    return sr(r, t);
  };
}
function wi(t) {
  return dt(t) ? mi(tt(t)) : Oi(t);
}
function pr(t) {
  return typeof t == "function" ? t : t == null ? Q : typeof t == "object" ? d(t) ? ji(t[0], t[1]) : di(t) : wi(t);
}
function Ci(t) {
  return function(r, n, e) {
    for (var i = -1, o = Object(r), s = e(r), u = s.length; u--; ) {
      var a = s[++i];
      if (n(o[a], a, o) === !1) break;
    }
    return r;
  };
}
var Pi = Ci();
function Ai(t, r) {
  return t && Pi(t, r, b);
}
function Ei(t, r) {
  return function(n, e) {
    if (n == null) return n;
    if (!Z(n)) return t(n, e);
    for (var i = n.length, o = -1, s = Object(n); ++o < i && e(s[o], o, s) !== !1; ) ;
    return n;
  };
}
var bt = Ei(Ai);
function zi(t) {
  return S(t) && Z(t);
}
function Li(t) {
  return typeof t == "function" ? t : Q;
}
function A(t, r) {
  return (d(t) ? qr : bt)(t, Li(r));
}
function Si(t, r) {
  var n = [];
  return bt(t, function(e, i, o) {
    r(e, i, o) && n.push(e);
  }), n;
}
function q(t, r) {
  return (d(t) ? ar : Si)(t, pr(r));
}
function Ni(t, r) {
  return Zt(r, function(n) {
    return t[n];
  });
}
function it(t) {
  return t == null ? [] : Ni(t, b(t));
}
var Di = "[object Map]", xi = "[object Set]", Fi = Object.prototype.hasOwnProperty;
function Gt(t) {
  if (t == null) return !0;
  if (Z(t) && (d(t) || typeof t == "string" || typeof t.splice == "function" || K(t) || pt(t) || J(t))) return !t.length;
  var r = ct(t);
  if (r == Di || r == xi) return !t.size;
  if (tr(t)) return !ir(t).length;
  for (var n in t) if (Fi.call(t, n)) return !1;
  return !0;
}
function x(t) {
  return t === void 0;
}
function Mi(t, r, n, e, i) {
  return i(t, function(o, s, u) {
    n = e ? (e = !1, o) : r(n, o, s, u);
  }), n;
}
function ki(t, r, n) {
  var e = d(t) ? me : Mi, i = arguments.length < 3;
  return e(t, pr(r), n, i, bt);
}
var $i = F && 1 / _t(new F([, -0]))[1] == 1 / 0 ? function(t) {
  return new F(t);
} : Br, Ii = 200;
function Ti(t, r, n) {
  var e = -1, i = Jr, o = t.length, s = !0, u = [], a = u;
  if (o >= Ii) {
    var c = $i(t);
    if (c) return _t(c);
    s = !1, i = cr, a = new U();
  } else a = u;
  t: for (; ++e < o; ) {
    var f = t[e], h = f;
    if (f = f !== 0 ? f : 0, s && h === h) {
      for (var p = a.length; p--; ) if (a[p] === h) continue t;
      u.push(f);
    } else i(a, h, n) || (a !== u && a.push(h), u.push(f));
  }
  return u;
}
var Bi = rn(function(t) {
  return Ti(je(t, 1, zi, !0));
}), Ui = "\0", E = "\0", Vt = "", Wt = class {
  constructor(t = {}) {
    this._isDirected = Object.prototype.hasOwnProperty.call(t, "directed") ? t.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(t, "multigraph") ? t.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(t, "compound") ? t.compound : !1, this._label = void 0, this._defaultNodeLabelFn = I(void 0), this._defaultEdgeLabelFn = I(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[E] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
  }
  isDirected() {
    return this._isDirected;
  }
  isMultigraph() {
    return this._isMultigraph;
  }
  isCompound() {
    return this._isCompound;
  }
  setGraph(t) {
    return this._label = t, this;
  }
  graph() {
    return this._label;
  }
  setDefaultNodeLabel(t) {
    return H(t) || (t = I(t)), this._defaultNodeLabelFn = t, this;
  }
  nodeCount() {
    return this._nodeCount;
  }
  nodes() {
    return b(this._nodes);
  }
  sources() {
    var t = this;
    return q(this.nodes(), function(r) {
      return Gt(t._in[r]);
    });
  }
  sinks() {
    var t = this;
    return q(this.nodes(), function(r) {
      return Gt(t._out[r]);
    });
  }
  setNodes(t, r) {
    var n = arguments, e = this;
    return A(t, function(i) {
      n.length > 1 ? e.setNode(i, r) : e.setNode(i);
    }), this;
  }
  setNode(t, r) {
    return Object.prototype.hasOwnProperty.call(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = r), this) : (this._nodes[t] = arguments.length > 1 ? r : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = E, this._children[t] = {}, this._children[E][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
  }
  node(t) {
    return this._nodes[t];
  }
  hasNode(t) {
    return Object.prototype.hasOwnProperty.call(this._nodes, t);
  }
  removeNode(t) {
    if (Object.prototype.hasOwnProperty.call(this._nodes, t)) {
      var r = (n) => this.removeEdge(this._edgeObjs[n]);
      delete this._nodes[t], this._isCompound && (this._removeFromParentsChildList(t), delete this._parent[t], A(this.children(t), (n) => {
        this.setParent(n);
      }), delete this._children[t]), A(b(this._in[t]), r), delete this._in[t], delete this._preds[t], A(b(this._out[t]), r), delete this._out[t], delete this._sucs[t], --this._nodeCount;
    }
    return this;
  }
  setParent(t, r) {
    if (!this._isCompound) throw Error("Cannot set parent in a non-compound graph");
    if (x(r)) r = E;
    else {
      r += "";
      for (var n = r; !x(n); n = this.parent(n)) if (n === t) throw Error("Setting " + r + " as parent of " + t + " would create a cycle");
      this.setNode(r);
    }
    return this.setNode(t), this._removeFromParentsChildList(t), this._parent[t] = r, this._children[r][t] = !0, this;
  }
  _removeFromParentsChildList(t) {
    delete this._children[this._parent[t]][t];
  }
  parent(t) {
    if (this._isCompound) {
      var r = this._parent[t];
      if (r !== E) return r;
    }
  }
  children(t) {
    if (x(t) && (t = E), this._isCompound) {
      var r = this._children[t];
      if (r) return b(r);
    } else {
      if (t === E) return this.nodes();
      if (this.hasNode(t)) return [];
    }
  }
  predecessors(t) {
    var r = this._preds[t];
    if (r) return b(r);
  }
  successors(t) {
    var r = this._sucs[t];
    if (r) return b(r);
  }
  neighbors(t) {
    var r = this.predecessors(t);
    if (r) return Bi(r, this.successors(t));
  }
  isLeaf(t) {
    return (this.isDirected() ? this.successors(t) : this.neighbors(t)).length === 0;
  }
  filterNodes(t) {
    var r = new this.constructor({
      directed: this._isDirected,
      multigraph: this._isMultigraph,
      compound: this._isCompound
    });
    r.setGraph(this.graph());
    var n = this;
    A(this._nodes, function(o, s) {
      t(s) && r.setNode(s, o);
    }), A(this._edgeObjs, function(o) {
      r.hasNode(o.v) && r.hasNode(o.w) && r.setEdge(o, n.edge(o));
    });
    var e = {};
    function i(o) {
      var s = n.parent(o);
      return s === void 0 || r.hasNode(s) ? (e[o] = s, s) : s in e ? e[s] : i(s);
    }
    return this._isCompound && A(r.nodes(), function(o) {
      r.setParent(o, i(o));
    }), r;
  }
  setDefaultEdgeLabel(t) {
    return H(t) || (t = I(t)), this._defaultEdgeLabelFn = t, this;
  }
  edgeCount() {
    return this._edgeCount;
  }
  edges() {
    return it(this._edgeObjs);
  }
  setPath(t, r) {
    var n = this, e = arguments;
    return ki(t, function(i, o) {
      return e.length > 1 ? n.setEdge(i, o, r) : n.setEdge(i, o), o;
    }), this;
  }
  setEdge() {
    var t, r, n, e, i = !1, o = arguments[0];
    typeof o == "object" && o && "v" in o ? (t = o.v, r = o.w, n = o.name, arguments.length === 2 && (e = arguments[1], i = !0)) : (t = o, r = arguments[1], n = arguments[3], arguments.length > 2 && (e = arguments[2], i = !0)), t = "" + t, r = "" + r, x(n) || (n = "" + n);
    var s = T(this._isDirected, t, r, n);
    if (Object.prototype.hasOwnProperty.call(this._edgeLabels, s)) return i && (this._edgeLabels[s] = e), this;
    if (!x(n) && !this._isMultigraph) throw Error("Cannot set a named edge when isMultigraph = false");
    this.setNode(t), this.setNode(r), this._edgeLabels[s] = i ? e : this._defaultEdgeLabelFn(t, r, n);
    var u = Ri(this._isDirected, t, r, n);
    return t = u.v, r = u.w, Object.freeze(u), this._edgeObjs[s] = u, qt(this._preds[r], t), qt(this._sucs[t], r), this._in[r][s] = u, this._out[t][s] = u, this._edgeCount++, this;
  }
  edge(t, r, n) {
    var e = arguments.length === 1 ? ot(this._isDirected, arguments[0]) : T(this._isDirected, t, r, n);
    return this._edgeLabels[e];
  }
  hasEdge(t, r, n) {
    var e = arguments.length === 1 ? ot(this._isDirected, arguments[0]) : T(this._isDirected, t, r, n);
    return Object.prototype.hasOwnProperty.call(this._edgeLabels, e);
  }
  removeEdge(t, r, n) {
    var e = arguments.length === 1 ? ot(this._isDirected, arguments[0]) : T(this._isDirected, t, r, n), i = this._edgeObjs[e];
    return i && (t = i.v, r = i.w, delete this._edgeLabels[e], delete this._edgeObjs[e], Ht(this._preds[r], t), Ht(this._sucs[t], r), delete this._in[r][e], delete this._out[t][e], this._edgeCount--), this;
  }
  inEdges(t, r) {
    var n = this._in[t];
    if (n) {
      var e = it(n);
      return r ? q(e, function(i) {
        return i.v === r;
      }) : e;
    }
  }
  outEdges(t, r) {
    var n = this._out[t];
    if (n) {
      var e = it(n);
      return r ? q(e, function(i) {
        return i.w === r;
      }) : e;
    }
  }
  nodeEdges(t, r) {
    var n = this.inEdges(t, r);
    if (n) return n.concat(this.outEdges(t, r));
  }
};
Wt.prototype._nodeCount = 0, Wt.prototype._edgeCount = 0;
function qt(t, r) {
  t[r] ? t[r]++ : t[r] = 1;
}
function Ht(t, r) {
  --t[r] || delete t[r];
}
function T(t, r, n, e) {
  var i = "" + r, o = "" + n;
  if (!t && i > o) {
    var s = i;
    i = o, o = s;
  }
  return i + Vt + o + Vt + (x(e) ? Ui : e);
}
function Ri(t, r, n, e) {
  var i = "" + r, o = "" + n;
  if (!t && i > o) {
    var s = i;
    i = o, o = s;
  }
  var u = {
    v: i,
    w: o
  };
  return e && (u.name = e), u;
}
function ot(t, r) {
  return T(t, r.v, r.w, r.name);
}
export {
  It as $,
  qr as A,
  zi as B,
  H as C,
  J as D,
  Z as E,
  In as F,
  or as G,
  rn as H,
  M as I,
  A as J,
  tr as K,
  Se as L,
  b as M,
  tt as N,
  K as O,
  ze as P,
  gi as Q,
  Xt as R,
  ur as S,
  je as T,
  _i as U,
  w as V,
  ct as W,
  it as X,
  q as Y,
  pr as Z,
  _e as _,
  d as a,
  Hr as a0,
  I as a1,
  lt as b,
  Mn as c,
  Yt as d,
  $n as e,
  wt as f,
  tn as g,
  S as h,
  sr as i,
  zt as j,
  Wr as k,
  x as l,
  Ai as m,
  C as n,
  ki as o,
  Ne as p,
  bt as q,
  y as r,
  Li as s,
  Pi as t,
  ft as u,
  Zt as v,
  pt as w,
  Q as x,
  Wt as y,
  Dt as z
};
