var D, d, Y, ce, C, Q, Z, ee, _e, V, $, j, te, M = {}, ne = [], fe = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, L = Array.isArray;
function k(_, e) {
  for (var t in e) _[t] = e[t];
  return _;
}
function z(_) {
  _ && _.parentNode && _.parentNode.removeChild(_);
}
function pe(_, e, t) {
  var r, l, n, i = {};
  for (n in e) n == "key" ? r = e[n] : n == "ref" ? l = e[n] : i[n] = e[n];
  if (arguments.length > 2 && (i.children = arguments.length > 3 ? D.call(arguments, 2) : t), typeof _ == "function" && _.defaultProps != null) for (n in _.defaultProps) i[n] === void 0 && (i[n] = _.defaultProps[n]);
  return E(_, i, r, l, null);
}
function E(_, e, t, r, l) {
  var n = { type: _, props: e, key: t, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: l ?? ++Y, __i: -1, __u: 0 };
  return l == null && d.vnode != null && d.vnode(n), n;
}
function ye() {
  return { current: null };
}
function I(_) {
  return _.children;
}
function N(_, e) {
  this.props = _, this.context = e;
}
function S(_, e) {
  if (e == null) return _.__ ? S(_.__, _.__i + 1) : null;
  for (var t; e < _.__k.length; e++) if ((t = _.__k[e]) != null && t.__e != null) return t.__e;
  return typeof _.type == "function" ? S(_) : null;
}
function oe(_) {
  var e, t;
  if ((_ = _.__) != null && _.__c != null) {
    for (_.__e = _.__c.base = null, e = 0; e < _.__k.length; e++) if ((t = _.__k[e]) != null && t.__e != null) {
      _.__e = _.__c.base = t.__e;
      break;
    }
    return oe(_);
  }
}
function B(_) {
  (!_.__d && (_.__d = !0) && C.push(_) && !H.__r++ || Q != d.debounceRendering) && ((Q = d.debounceRendering) || Z)(H);
}
function H() {
  for (var _, e, t, r, l, n, i, u = 1; C.length; ) C.length > u && C.sort(ee), _ = C.shift(), u = C.length, _.__d && (t = void 0, r = void 0, l = (r = (e = _).__v).__e, n = [], i = [], e.__P && ((t = k({}, r)).__v = r.__v + 1, d.vnode && d.vnode(t), q(e.__P, t, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [l] : null, n, l ?? S(r), !!(32 & r.__u), i), t.__v = r.__v, t.__.__k[t.__i] = t, ie(n, t, i), r.__e = r.__ = null, t.__e != l && oe(t)));
  H.__r = 0;
}
function re(_, e, t, r, l, n, i, u, p, s, f) {
  var o, v, c, m, g, y, h, a = r && r.__k || ne, w = e.length;
  for (p = ae(t, e, a, p, w), o = 0; o < w; o++) (c = t.__k[o]) != null && (v = c.__i == -1 ? M : a[c.__i] || M, c.__i = o, y = q(_, c, v, l, n, i, u, p, s, f), m = c.__e, c.ref && v.ref != c.ref && (v.ref && G(v.ref, null, c), f.push(c.ref, c.__c || m, c)), g == null && m != null && (g = m), (h = !!(4 & c.__u)) || v.__k === c.__k ? p = le(c, p, _, h) : typeof c.type == "function" && y !== void 0 ? p = y : m && (p = m.nextSibling), c.__u &= -7);
  return t.__e = g, p;
}
function ae(_, e, t, r, l) {
  var n, i, u, p, s, f = t.length, o = f, v = 0;
  for (_.__k = new Array(l), n = 0; n < l; n++) (i = e[n]) != null && typeof i != "boolean" && typeof i != "function" ? (typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? i = _.__k[n] = E(null, i, null, null, null) : L(i) ? i = _.__k[n] = E(I, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? i = _.__k[n] = E(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : _.__k[n] = i, p = n + v, i.__ = _, i.__b = _.__b + 1, u = null, (s = i.__i = de(i, t, p, o)) != -1 && (o--, (u = t[s]) && (u.__u |= 2)), u == null || u.__v == null ? (s == -1 && (l > f ? v-- : l < f && v++), typeof i.type != "function" && (i.__u |= 4)) : s != p && (s == p - 1 ? v-- : s == p + 1 ? v++ : (s > p ? v-- : v++, i.__u |= 4))) : _.__k[n] = null;
  if (o) for (n = 0; n < f; n++) (u = t[n]) != null && (2 & u.__u) == 0 && (u.__e == r && (r = S(u)), ue(u, u));
  return r;
}
function le(_, e, t, r) {
  var l, n;
  if (typeof _.type == "function") {
    for (l = _.__k, n = 0; l && n < l.length; n++) l[n] && (l[n].__ = _, e = le(l[n], e, t, r));
    return e;
  }
  _.__e != e && (r && (e && _.type && !e.parentNode && (e = S(_)), t.insertBefore(_.__e, e || null)), e = _.__e);
  do
    e = e && e.nextSibling;
  while (e != null && e.nodeType == 8);
  return e;
}
function he(_, e) {
  return e = e || [], _ == null || typeof _ == "boolean" || (L(_) ? _.some(function(t) {
    he(t, e);
  }) : e.push(_)), e;
}
function de(_, e, t, r) {
  var l, n, i, u = _.key, p = _.type, s = e[t], f = s != null && (2 & s.__u) == 0;
  if (s === null && u == null || f && u == s.key && p == s.type) return t;
  if (r > (f ? 1 : 0)) {
    for (l = t - 1, n = t + 1; l >= 0 || n < e.length; ) if ((s = e[i = l >= 0 ? l-- : n++]) != null && (2 & s.__u) == 0 && u == s.key && p == s.type) return i;
  }
  return -1;
}
function J(_, e, t) {
  e[0] == "-" ? _.setProperty(e, t ?? "") : _[e] = t == null ? "" : typeof t != "number" || fe.test(e) ? t : t + "px";
}
function F(_, e, t, r, l) {
  var n, i;
  e: if (e == "style") if (typeof t == "string") _.style.cssText = t;
  else {
    if (typeof r == "string" && (_.style.cssText = r = ""), r) for (e in r) t && e in t || J(_.style, e, "");
    if (t) for (e in t) r && t[e] == r[e] || J(_.style, e, t[e]);
  }
  else if (e[0] == "o" && e[1] == "n") n = e != (e = e.replace(_e, "$1")), i = e.toLowerCase(), e = i in _ || e == "onFocusOut" || e == "onFocusIn" ? i.slice(2) : e.slice(2), _.l || (_.l = {}), _.l[e + n] = t, t ? r ? t.u = r.u : (t.u = V, _.addEventListener(e, n ? j : $, n)) : _.removeEventListener(e, n ? j : $, n);
  else {
    if (l == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
    else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in _) try {
      _[e] = t ?? "";
      break e;
    } catch {
    }
    typeof t == "function" || (t == null || t === !1 && e[4] != "-" ? _.removeAttribute(e) : _.setAttribute(e, e == "popover" && t == 1 ? "" : t));
  }
}
function X(_) {
  return function(e) {
    if (this.l) {
      var t = this.l[e.type + _];
      if (e.t == null) e.t = V++;
      else if (e.t < t.u) return;
      return t(d.event ? d.event(e) : e);
    }
  };
}
function q(_, e, t, r, l, n, i, u, p, s) {
  var f, o, v, c, m, g, y, h, a, w, x, W, U, K, A, T, R, b = e.type;
  if (e.constructor !== void 0) return null;
  128 & t.__u && (p = !!(32 & t.__u), n = [u = e.__e = t.__e]), (f = d.__b) && f(e);
  e: if (typeof b == "function") try {
    if (h = e.props, a = "prototype" in b && b.prototype.render, w = (f = b.contextType) && r[f.__c], x = f ? w ? w.props.value : f.__ : r, t.__c ? y = (o = e.__c = t.__c).__ = o.__E : (a ? e.__c = o = new b(h, x) : (e.__c = o = new N(h, x), o.constructor = b, o.render = me), w && w.sub(o), o.state || (o.state = {}), o.__n = r, v = o.__d = !0, o.__h = [], o._sb = []), a && o.__s == null && (o.__s = o.state), a && b.getDerivedStateFromProps != null && (o.__s == o.state && (o.__s = k({}, o.__s)), k(o.__s, b.getDerivedStateFromProps(h, o.__s))), c = o.props, m = o.state, o.__v = e, v) a && b.getDerivedStateFromProps == null && o.componentWillMount != null && o.componentWillMount(), a && o.componentDidMount != null && o.__h.push(o.componentDidMount);
    else {
      if (a && b.getDerivedStateFromProps == null && h !== c && o.componentWillReceiveProps != null && o.componentWillReceiveProps(h, x), e.__v == t.__v || !o.__e && o.shouldComponentUpdate != null && o.shouldComponentUpdate(h, o.__s, x) === !1) {
        for (e.__v != t.__v && (o.props = h, o.state = o.__s, o.__d = !1), e.__e = t.__e, e.__k = t.__k, e.__k.some(function(P) {
          P && (P.__ = e);
        }), W = 0; W < o._sb.length; W++) o.__h.push(o._sb[W]);
        o._sb = [], o.__h.length && i.push(o);
        break e;
      }
      o.componentWillUpdate != null && o.componentWillUpdate(h, o.__s, x), a && o.componentDidUpdate != null && o.__h.push(function() {
        o.componentDidUpdate(c, m, g);
      });
    }
    if (o.context = x, o.props = h, o.__P = _, o.__e = !1, U = d.__r, K = 0, a) {
      for (o.state = o.__s, o.__d = !1, U && U(e), f = o.render(o.props, o.state, o.context), A = 0; A < o._sb.length; A++) o.__h.push(o._sb[A]);
      o._sb = [];
    } else do
      o.__d = !1, U && U(e), f = o.render(o.props, o.state, o.context), o.state = o.__s;
    while (o.__d && ++K < 25);
    o.state = o.__s, o.getChildContext != null && (r = k(k({}, r), o.getChildContext())), a && !v && o.getSnapshotBeforeUpdate != null && (g = o.getSnapshotBeforeUpdate(c, m)), T = f, f != null && f.type === I && f.key == null && (T = se(f.props.children)), u = re(_, L(T) ? T : [T], e, t, r, l, n, i, u, p, s), o.base = e.__e, e.__u &= -161, o.__h.length && i.push(o), y && (o.__E = o.__ = null);
  } catch (P) {
    if (e.__v = null, p || n != null) if (P.then) {
      for (e.__u |= p ? 160 : 128; u && u.nodeType == 8 && u.nextSibling; ) u = u.nextSibling;
      n[n.indexOf(u)] = null, e.__e = u;
    } else {
      for (R = n.length; R--; ) z(n[R]);
      O(e);
    }
    else e.__e = t.__e, e.__k = t.__k, P.then || O(e);
    d.__e(P, e, t);
  }
  else n == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : u = e.__e = ve(t.__e, e, t, r, l, n, i, p, s);
  return (f = d.diffed) && f(e), 128 & e.__u ? void 0 : u;
}
function O(_) {
  _ && _.__c && (_.__c.__e = !0), _ && _.__k && _.__k.forEach(O);
}
function ie(_, e, t) {
  for (var r = 0; r < t.length; r++) G(t[r], t[++r], t[++r]);
  d.__c && d.__c(e, _), _.some(function(l) {
    try {
      _ = l.__h, l.__h = [], _.some(function(n) {
        n.call(l);
      });
    } catch (n) {
      d.__e(n, l.__v);
    }
  });
}
function se(_) {
  return typeof _ != "object" || _ == null || _.__b && _.__b > 0 ? _ : L(_) ? _.map(se) : k({}, _);
}
function ve(_, e, t, r, l, n, i, u, p) {
  var s, f, o, v, c, m, g, y = t.props || M, h = e.props, a = e.type;
  if (a == "svg" ? l = "http://www.w3.org/2000/svg" : a == "math" ? l = "http://www.w3.org/1998/Math/MathML" : l || (l = "http://www.w3.org/1999/xhtml"), n != null) {
    for (s = 0; s < n.length; s++) if ((c = n[s]) && "setAttribute" in c == !!a && (a ? c.localName == a : c.nodeType == 3)) {
      _ = c, n[s] = null;
      break;
    }
  }
  if (_ == null) {
    if (a == null) return document.createTextNode(h);
    _ = document.createElementNS(l, a, h.is && h), u && (d.__m && d.__m(e, n), u = !1), n = null;
  }
  if (a == null) y === h || u && _.data == h || (_.data = h);
  else {
    if (n = n && D.call(_.childNodes), !u && n != null) for (y = {}, s = 0; s < _.attributes.length; s++) y[(c = _.attributes[s]).name] = c.value;
    for (s in y) if (c = y[s], s != "children") {
      if (s == "dangerouslySetInnerHTML") o = c;
      else if (!(s in h)) {
        if (s == "value" && "defaultValue" in h || s == "checked" && "defaultChecked" in h) continue;
        F(_, s, null, c, l);
      }
    }
    for (s in h) c = h[s], s == "children" ? v = c : s == "dangerouslySetInnerHTML" ? f = c : s == "value" ? m = c : s == "checked" ? g = c : u && typeof c != "function" || y[s] === c || F(_, s, c, y[s], l);
    if (f) u || o && (f.__html == o.__html || f.__html == _.innerHTML) || (_.innerHTML = f.__html), e.__k = [];
    else if (o && (_.innerHTML = ""), re(e.type == "template" ? _.content : _, L(v) ? v : [v], e, t, r, a == "foreignObject" ? "http://www.w3.org/1999/xhtml" : l, n, i, n ? n[0] : t.__k && S(t, 0), u, p), n != null) for (s = n.length; s--; ) z(n[s]);
    u || (s = "value", a == "progress" && m == null ? _.removeAttribute("value") : m != null && (m !== _[s] || a == "progress" && !m || a == "option" && m != y[s]) && F(_, s, m, y[s], l), s = "checked", g != null && g != _[s] && F(_, s, g, y[s], l));
  }
  return _;
}
function G(_, e, t) {
  try {
    if (typeof _ == "function") {
      var r = typeof _.__u == "function";
      r && _.__u(), r && e == null || (_.__u = _(e));
    } else _.current = e;
  } catch (l) {
    d.__e(l, t);
  }
}
function ue(_, e, t) {
  var r, l;
  if (d.unmount && d.unmount(_), (r = _.ref) && (r.current && r.current != _.__e || G(r, null, e)), (r = _.__c) != null) {
    if (r.componentWillUnmount) try {
      r.componentWillUnmount();
    } catch (n) {
      d.__e(n, e);
    }
    r.base = r.__P = null;
  }
  if (r = _.__k) for (l = 0; l < r.length; l++) r[l] && ue(r[l], e, t || typeof _.type != "function");
  t || z(_.__e), _.__c = _.__ = _.__e = void 0;
}
function me(_, e, t) {
  return this.constructor(_, t);
}
function ge(_, e, t) {
  var r, l, n, i;
  e == document && (e = document.documentElement), d.__ && d.__(_, e), l = (r = !1) ? null : e.__k, n = [], i = [], q(e, _ = e.__k = pe(I, null, [_]), l || M, M, e.namespaceURI, l ? null : e.firstChild ? D.call(e.childNodes) : null, n, l ? l.__e : e.firstChild, r, i), ie(n, _, i);
}
function be(_, e, t) {
  var r, l, n, i, u = k({}, _.props);
  for (n in _.type && _.type.defaultProps && (i = _.type.defaultProps), e) n == "key" ? r = e[n] : n == "ref" ? l = e[n] : u[n] = e[n] === void 0 && i != null ? i[n] : e[n];
  return arguments.length > 2 && (u.children = arguments.length > 3 ? D.call(arguments, 2) : t), E(_.type, u, r || _.key, l || _.ref, null);
}
function ke(_) {
  function e(t) {
    var r, l;
    return this.getChildContext || (r = /* @__PURE__ */ new Set(), (l = {})[e.__c] = this, this.getChildContext = function() {
      return l;
    }, this.componentWillUnmount = function() {
      r = null;
    }, this.shouldComponentUpdate = function(n) {
      this.props.value != n.value && r.forEach(function(i) {
        i.__e = !0, B(i);
      });
    }, this.sub = function(n) {
      r.add(n);
      var i = n.componentWillUnmount;
      n.componentWillUnmount = function() {
        r && r.delete(n), i && i.call(n);
      };
    }), t.children;
  }
  return e.__c = "__cC" + te++, e.__ = _, e.Provider = e.__l = (e.Consumer = function(t, r) {
    return t.children(r);
  }).contextType = e, e;
}
D = ne.slice, d = { __e: function(_, e, t, r) {
  for (var l, n, i; e = e.__; ) if ((l = e.__c) && !l.__) try {
    if ((n = l.constructor) && n.getDerivedStateFromError != null && (l.setState(n.getDerivedStateFromError(_)), i = l.__d), l.componentDidCatch != null && (l.componentDidCatch(_, r || {}), i = l.__d), i) return l.__E = l;
  } catch (u) {
    _ = u;
  }
  throw _;
} }, Y = 0, ce = function(_) {
  return _ != null && _.constructor === void 0;
}, N.prototype.setState = function(_, e) {
  var t;
  t = this.__s != null && this.__s != this.state ? this.__s : this.__s = k({}, this.state), typeof _ == "function" && (_ = _(k({}, t), this.props)), _ && k(t, _), _ != null && this.__v && (e && this._sb.push(e), B(this));
}, N.prototype.forceUpdate = function(_) {
  this.__v && (this.__e = !0, _ && this.__h.push(_), B(this));
}, N.prototype.render = I, C = [], Z = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, ee = function(_, e) {
  return _.__v.__b - e.__v.__b;
}, H.__r = 0, _e = /(PointerCapture)$|Capture$/i, V = 0, $ = X(!1), j = X(!0), te = 0;
export {
  N as Component,
  I as Fragment,
  be as cloneElement,
  ke as createContext,
  pe as createElement,
  ye as createRef,
  pe as h,
  ce as isValidElement,
  d as options,
  ge as render,
  he as toChildArray
};
