function ore(e, t) {
  for (var n = 0; n < t.length; n++) {
    const r = t[n];
    if (typeof r != "string" && !Array.isArray(r)) {
      for (const o in r)
        if (o !== "default" && !(o in e)) {
          const i = Object.getOwnPropertyDescriptor(r, o);
          i && Object.defineProperty(e, o, i.get ? i : {
            enumerable: !0,
            get: () => r[o]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
}
function BE(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var iF = { exports: {} }, yt = {};
/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var Cp = Symbol.for("react.element"), ire = Symbol.for("react.portal"), are = Symbol.for("react.fragment"), lre = Symbol.for("react.strict_mode"), sre = Symbol.for("react.profiler"), ure = Symbol.for("react.provider"), cre = Symbol.for("react.context"), fre = Symbol.for("react.forward_ref"), dre = Symbol.for("react.suspense"), pre = Symbol.for("react.memo"), mre = Symbol.for("react.lazy"), bj = Symbol.iterator;
function hre(e) {
  return e === null || typeof e != "object" ? null : (e = bj && e[bj] || e["@@iterator"], typeof e == "function" ? e : null);
}
var aF = { isMounted: function() {
  return !1;
}, enqueueForceUpdate: function() {
}, enqueueReplaceState: function() {
}, enqueueSetState: function() {
} }, lF = Object.assign, sF = {};
function Vc(e, t, n) {
  this.props = e, this.context = t, this.refs = sF, this.updater = n || aF;
}
Vc.prototype.isReactComponent = {};
Vc.prototype.setState = function(e, t) {
  if (typeof e != "object" && typeof e != "function" && e != null)
    throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
  this.updater.enqueueSetState(this, e, t, "setState");
};
Vc.prototype.forceUpdate = function(e) {
  this.updater.enqueueForceUpdate(this, e, "forceUpdate");
};
function uF() {
}
uF.prototype = Vc.prototype;
function UE(e, t, n) {
  this.props = e, this.context = t, this.refs = sF, this.updater = n || aF;
}
var HE = UE.prototype = new uF();
HE.constructor = UE;
lF(HE, Vc.prototype);
HE.isPureReactComponent = !0;
var wj = Array.isArray, cF = Object.prototype.hasOwnProperty, WE = { current: null }, fF = { key: !0, ref: !0, __self: !0, __source: !0 };
function dF(e, t, n) {
  var r, o = {}, i = null, a = null;
  if (t != null)
    for (r in t.ref !== void 0 && (a = t.ref), t.key !== void 0 && (i = "" + t.key), t)
      cF.call(t, r) && !fF.hasOwnProperty(r) && (o[r] = t[r]);
  var l = arguments.length - 2;
  if (l === 1)
    o.children = n;
  else if (1 < l) {
    for (var s = Array(l), c = 0; c < l; c++)
      s[c] = arguments[c + 2];
    o.children = s;
  }
  if (e && e.defaultProps)
    for (r in l = e.defaultProps, l)
      o[r] === void 0 && (o[r] = l[r]);
  return { $$typeof: Cp, type: e, key: i, ref: a, props: o, _owner: WE.current };
}
function gre(e, t) {
  return { $$typeof: Cp, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner };
}
function VE(e) {
  return typeof e == "object" && e !== null && e.$$typeof === Cp;
}
function yre(e) {
  var t = { "=": "=0", ":": "=2" };
  return "$" + e.replace(/[=:]/g, function(n) {
    return t[n];
  });
}
var xj = /\/+/g;
function yk(e, t) {
  return typeof e == "object" && e !== null && e.key != null ? yre("" + e.key) : t.toString(36);
}
function mg(e, t, n, r, o) {
  var i = typeof e;
  (i === "undefined" || i === "boolean") && (e = null);
  var a = !1;
  if (e === null)
    a = !0;
  else
    switch (i) {
      case "string":
      case "number":
        a = !0;
        break;
      case "object":
        switch (e.$$typeof) {
          case Cp:
          case ire:
            a = !0;
        }
    }
  if (a)
    return a = e, o = o(a), e = r === "" ? "." + yk(a, 0) : r, wj(o) ? (n = "", e != null && (n = e.replace(xj, "$&/") + "/"), mg(o, t, n, "", function(c) {
      return c;
    })) : o != null && (VE(o) && (o = gre(o, n + (!o.key || a && a.key === o.key ? "" : ("" + o.key).replace(xj, "$&/") + "/") + e)), t.push(o)), 1;
  if (a = 0, r = r === "" ? "." : r + ":", wj(e))
    for (var l = 0; l < e.length; l++) {
      i = e[l];
      var s = r + yk(i, l);
      a += mg(i, t, n, s, o);
    }
  else if (s = hre(e), typeof s == "function")
    for (e = s.call(e), l = 0; !(i = e.next()).done; )
      i = i.value, s = r + yk(i, l++), a += mg(i, t, n, s, o);
  else if (i === "object")
    throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
  return a;
}
function Gm(e, t, n) {
  if (e == null)
    return e;
  var r = [], o = 0;
  return mg(e, r, "", "", function(i) {
    return t.call(n, i, o++);
  }), r;
}
function vre(e) {
  if (e._status === -1) {
    var t = e._result;
    t = t(), t.then(function(n) {
      (e._status === 0 || e._status === -1) && (e._status = 1, e._result = n);
    }, function(n) {
      (e._status === 0 || e._status === -1) && (e._status = 2, e._result = n);
    }), e._status === -1 && (e._status = 0, e._result = t);
  }
  if (e._status === 1)
    return e._result.default;
  throw e._result;
}
var kr = { current: null }, hg = { transition: null }, bre = { ReactCurrentDispatcher: kr, ReactCurrentBatchConfig: hg, ReactCurrentOwner: WE };
yt.Children = { map: Gm, forEach: function(e, t, n) {
  Gm(e, function() {
    t.apply(this, arguments);
  }, n);
}, count: function(e) {
  var t = 0;
  return Gm(e, function() {
    t++;
  }), t;
}, toArray: function(e) {
  return Gm(e, function(t) {
    return t;
  }) || [];
}, only: function(e) {
  if (!VE(e))
    throw Error("React.Children.only expected to receive a single React element child.");
  return e;
} };
yt.Component = Vc;
yt.Fragment = are;
yt.Profiler = sre;
yt.PureComponent = UE;
yt.StrictMode = lre;
yt.Suspense = dre;
yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = bre;
yt.cloneElement = function(e, t, n) {
  if (e == null)
    throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
  var r = lF({}, e.props), o = e.key, i = e.ref, a = e._owner;
  if (t != null) {
    if (t.ref !== void 0 && (i = t.ref, a = WE.current), t.key !== void 0 && (o = "" + t.key), e.type && e.type.defaultProps)
      var l = e.type.defaultProps;
    for (s in t)
      cF.call(t, s) && !fF.hasOwnProperty(s) && (r[s] = t[s] === void 0 && l !== void 0 ? l[s] : t[s]);
  }
  var s = arguments.length - 2;
  if (s === 1)
    r.children = n;
  else if (1 < s) {
    l = Array(s);
    for (var c = 0; c < s; c++)
      l[c] = arguments[c + 2];
    r.children = l;
  }
  return { $$typeof: Cp, type: e.type, key: o, ref: i, props: r, _owner: a };
};
yt.createContext = function(e) {
  return e = { $$typeof: cre, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, e.Provider = { $$typeof: ure, _context: e }, e.Consumer = e;
};
yt.createElement = dF;
yt.createFactory = function(e) {
  var t = dF.bind(null, e);
  return t.type = e, t;
};
yt.createRef = function() {
  return { current: null };
};
yt.forwardRef = function(e) {
  return { $$typeof: fre, render: e };
};
yt.isValidElement = VE;
yt.lazy = function(e) {
  return { $$typeof: mre, _payload: { _status: -1, _result: e }, _init: vre };
};
yt.memo = function(e, t) {
  return { $$typeof: pre, type: e, compare: t === void 0 ? null : t };
};
yt.startTransition = function(e) {
  var t = hg.transition;
  hg.transition = {};
  try {
    e();
  } finally {
    hg.transition = t;
  }
};
yt.unstable_act = function() {
  throw Error("act(...) is not supported in production builds of React.");
};
yt.useCallback = function(e, t) {
  return kr.current.useCallback(e, t);
};
yt.useContext = function(e) {
  return kr.current.useContext(e);
};
yt.useDebugValue = function() {
};
yt.useDeferredValue = function(e) {
  return kr.current.useDeferredValue(e);
};
yt.useEffect = function(e, t) {
  return kr.current.useEffect(e, t);
};
yt.useId = function() {
  return kr.current.useId();
};
yt.useImperativeHandle = function(e, t, n) {
  return kr.current.useImperativeHandle(e, t, n);
};
yt.useInsertionEffect = function(e, t) {
  return kr.current.useInsertionEffect(e, t);
};
yt.useLayoutEffect = function(e, t) {
  return kr.current.useLayoutEffect(e, t);
};
yt.useMemo = function(e, t) {
  return kr.current.useMemo(e, t);
};
yt.useReducer = function(e, t, n) {
  return kr.current.useReducer(e, t, n);
};
yt.useRef = function(e) {
  return kr.current.useRef(e);
};
yt.useState = function(e) {
  return kr.current.useState(e);
};
yt.useSyncExternalStore = function(e, t, n) {
  return kr.current.useSyncExternalStore(e, t, n);
};
yt.useTransition = function() {
  return kr.current.useTransition();
};
yt.version = "18.2.0";
iF.exports = yt;
var b = iF.exports;
const P = /* @__PURE__ */ BE(b), _0 = /* @__PURE__ */ ore({
  __proto__: null,
  default: P
}, [b]);
function Ed() {
}
function wre(e, t) {
  return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
}
function xre(e, ...t) {
  if (e == null) {
    for (const r of t)
      r(void 0);
    return Ed;
  }
  const n = e.subscribe(...t);
  return n.unsubscribe ? () => n.unsubscribe() : n;
}
function Sre(e) {
  let t;
  return xre(e, (n) => t = n)(), t;
}
const pF = typeof window < "u";
let Sj = pF ? () => window.performance.now() : () => Date.now(), mF = pF ? (e) => requestAnimationFrame(e) : Ed;
const lc = /* @__PURE__ */ new Set();
function hF(e) {
  lc.forEach((t) => {
    t.c(e) || (lc.delete(t), t.f());
  }), lc.size !== 0 && mF(hF);
}
function kre(e) {
  let t;
  return lc.size === 0 && mF(hF), {
    promise: new Promise((n) => {
      lc.add(t = { c: e, f: n });
    }),
    abort() {
      lc.delete(t);
    }
  };
}
const _u = [];
function Bi(e, t = Ed) {
  let n;
  const r = /* @__PURE__ */ new Set();
  function o(l) {
    if (wre(e, l) && (e = l, n)) {
      const s = !_u.length;
      for (const c of r)
        c[1](), _u.push(c, e);
      if (s) {
        for (let c = 0; c < _u.length; c += 2)
          _u[c][0](_u[c + 1]);
        _u.length = 0;
      }
    }
  }
  function i(l) {
    o(l(e));
  }
  function a(l, s = Ed) {
    const c = [l, s];
    return r.add(c), r.size === 1 && (n = t(o, i) || Ed), l(e), () => {
      r.delete(c), r.size === 0 && n && (n(), n = null);
    };
  }
  return { set: o, update: i, subscribe: a };
}
function kj(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
function O0(e, t, n, r) {
  if (typeof n == "number" || kj(n)) {
    const o = r - n, i = (n - t) / (e.dt || 1 / 60), a = e.opts.stiffness * o, l = e.opts.damping * i, s = (a - l) * e.inv_mass, c = (i + s) * e.dt;
    return Math.abs(c) < e.opts.precision && Math.abs(o) < e.opts.precision ? r : (e.settled = !1, kj(n) ? new Date(n.getTime() + c) : n + c);
  } else {
    if (Array.isArray(n))
      return n.map(
        (o, i) => O0(e, t[i], n[i], r[i])
      );
    if (typeof n == "object") {
      const o = {};
      for (const i in n)
        o[i] = O0(e, t[i], n[i], r[i]);
      return o;
    } else
      throw new Error(`Cannot spring ${typeof n} values`);
  }
}
function _j(e, t = {}) {
  const n = Bi(e), { stiffness: r = 0.15, damping: o = 0.8, precision: i = 0.01 } = t;
  let a, l, s, c = e, p = e, f = 1, m = 0, h = !1;
  function g(S, w = {}) {
    p = S;
    const x = s = {};
    return e == null || w.hard || v.stiffness >= 1 && v.damping >= 1 ? (h = !0, a = Sj(), c = S, n.set(e = p), Promise.resolve()) : (w.soft && (m = 1 / ((w.soft === !0 ? 0.5 : +w.soft) * 60), f = 0), l || (a = Sj(), h = !1, l = kre((k) => {
      if (h)
        return h = !1, l = null, !1;
      f = Math.min(f + m, 1);
      const E = {
        inv_mass: f,
        opts: v,
        settled: !0,
        dt: (k - a) * 60 / 1e3
      }, O = O0(E, c, e, p);
      return a = k, c = e, n.set(e = O), E.settled && (l = null), !E.settled;
    })), new Promise((k) => {
      l.promise.then(() => {
        x === s && k();
      });
    }));
  }
  const v = {
    set: g,
    update: (S, w) => g(S(p, e), w),
    subscribe: n.subscribe,
    stiffness: r,
    damping: o,
    precision: i
  };
  return v;
}
function Km(e) {
  const [t, n] = b.useState(() => Sre(e));
  return b.useEffect(() => {
    let r = !0;
    return e.subscribe((i) => {
      r && (r = !1, i === t) || n(i);
    });
  }, [e]), t;
}
const qE = b.createContext(void 0);
qE.displayName = "SvelteToReactContext";
const {
  SvelteComponent: _re,
  assign: Oj,
  binding_callbacks: Ej,
  check_outros: Ore,
  component_subscribe: Cj,
  compute_slots: Ere,
  create_slot: Cre,
  detach: gg,
  element: gF,
  empty: Pre,
  exclude_internal_props: Pj,
  get_all_dirty_from_scope: Rre,
  get_slot_changes: Tre,
  group_outros: jre,
  init: Nre,
  insert: yg,
  safe_not_equal: $re,
  set_custom_element_data: yF,
  space: Ire,
  transition_in: vg,
  transition_out: E0,
  update_slot_base: Are
} = window.__gradio__svelte__internal, {
  beforeUpdate: zre,
  getAllContexts: Lre,
  getContext: Dre,
  onDestroy: Fre,
  setContext: Mre
} = window.__gradio__svelte__internal;
function Rj(e) {
  let t, n;
  const r = (
    /*#slots*/
    e[7].default
  ), o = Cre(
    r,
    e,
    /*$$scope*/
    e[6],
    null
  );
  return {
    c() {
      t = gF("svelte-slot"), o && o.c(), yF(t, "class", "svelte-1rt0kpf");
    },
    m(i, a) {
      yg(i, t, a), o && o.m(t, null), e[9](t), n = !0;
    },
    p(i, a) {
      o && o.p && (!n || a & /*$$scope*/
      64) && Are(
        o,
        r,
        i,
        /*$$scope*/
        i[6],
        n ? Tre(
          r,
          /*$$scope*/
          i[6],
          a,
          null
        ) : Rre(
          /*$$scope*/
          i[6]
        ),
        null
      );
    },
    i(i) {
      n || (vg(o, i), n = !0);
    },
    o(i) {
      E0(o, i), n = !1;
    },
    d(i) {
      i && gg(t), o && o.d(i), e[9](null);
    }
  };
}
function Bre(e) {
  let t, n, r, o, i = (
    /*$$slots*/
    e[4].default && Rj(e)
  );
  return {
    c() {
      t = gF("react-portal-target"), n = Ire(), i && i.c(), r = Pre(), yF(t, "class", "svelte-1rt0kpf");
    },
    m(a, l) {
      yg(a, t, l), e[8](t), yg(a, n, l), i && i.m(a, l), yg(a, r, l), o = !0;
    },
    p(a, [l]) {
      /*$$slots*/
      a[4].default ? i ? (i.p(a, l), l & /*$$slots*/
      16 && vg(i, 1)) : (i = Rj(a), i.c(), vg(i, 1), i.m(r.parentNode, r)) : i && (jre(), E0(i, 1, 1, () => {
        i = null;
      }), Ore());
    },
    i(a) {
      o || (vg(i), o = !0);
    },
    o(a) {
      E0(i), o = !1;
    },
    d(a) {
      a && (gg(t), gg(n), gg(r)), e[8](null), i && i.d(a);
    }
  };
}
function Tj(e) {
  const { svelteInit: t, ...n } = e;
  return n;
}
function Ure(e, t, n) {
  let r, o, { $$slots: i = {}, $$scope: a } = t;
  const l = Ere(i);
  let { svelteInit: s } = t;
  const c = Bi(Tj(t)), p = Bi();
  Cj(e, p, (x) => n(0, r = x));
  const f = Bi();
  Cj(e, f, (x) => n(1, o = x));
  const m = Bi([]), h = [], g = Dre("ReactWrapper"), v = s({
    parent: g,
    props: c,
    target: p,
    slot: f,
    hooks: m,
    contexts: Lre(),
    onDestroy(x) {
      h.push(x);
    }
  });
  Mre("ReactWrapper", v), zre(() => {
    c.set(Tj(t));
  }), Fre(() => {
    h.forEach((x) => x());
  });
  function S(x) {
    Ej[x ? "unshift" : "push"](() => {
      r = x, p.set(r);
    });
  }
  function w(x) {
    Ej[x ? "unshift" : "push"](() => {
      o = x, f.set(o);
    });
  }
  return e.$$set = (x) => {
    n(15, t = Oj(Oj({}, t), Pj(x))), "svelteInit" in x && n(5, s = x.svelteInit), "$$scope" in x && n(6, a = x.$$scope);
  }, t = Pj(t), [
    r,
    o,
    p,
    f,
    l,
    s,
    a,
    i,
    S,
    w
  ];
}
class jj extends _re {
  constructor(t) {
    super(), Nre(this, t, Ure, Bre, $re, { svelteInit: 5 });
  }
}
const {
  SvelteComponent: Hre,
  create_slot: Wre,
  get_all_dirty_from_scope: Vre,
  get_slot_changes: qre,
  init: Gre,
  safe_not_equal: Kre,
  transition_in: Yre,
  transition_out: Xre,
  update_slot_base: Zre
} = window.__gradio__svelte__internal;
function Qre(e) {
  let t;
  const n = (
    /*#slots*/
    e[1].default
  ), r = Wre(
    n,
    e,
    /*$$scope*/
    e[0],
    null
  );
  return {
    c() {
      r && r.c();
    },
    m(o, i) {
      r && r.m(o, i), t = !0;
    },
    p(o, [i]) {
      r && r.p && (!t || i & /*$$scope*/
      1) && Zre(
        r,
        n,
        o,
        /*$$scope*/
        o[0],
        t ? qre(
          n,
          /*$$scope*/
          o[0],
          i,
          null
        ) : Vre(
          /*$$scope*/
          o[0]
        ),
        null
      );
    },
    i(o) {
      t || (Yre(r, o), t = !0);
    },
    o(o) {
      Xre(r, o), t = !1;
    },
    d(o) {
      r && r.d(o);
    }
  };
}
function Jre(e, t, n) {
  let { $$slots: r = {}, $$scope: o } = t;
  return e.$$set = (i) => {
    "$$scope" in i && n(0, o = i.$$scope);
  }, [o, r];
}
class vk extends Hre {
  constructor(t) {
    super(), Gre(this, t, Jre, Qre, Kre, {});
  }
}
const eoe = ({ el: e }) => {
  const t = b.useRef();
  return b.useEffect(() => {
    t.current && e && (e.style.display = "contents", t.current.appendChild(e));
  }, [t, e]), b.createElement("react-child", {
    ref: t,
    style: { display: "contents" }
  });
}, C0 = ({ createPortal: e, node: t }) => {
  const n = Km(t.target);
  let r = Km(t.props);
  const o = Km(t.slot), i = Km(t.hooks);
  if (!n)
    return null;
  let a;
  return t.nodes.length === 0 && o === void 0 && i.length === 0 ? r.children && (a = r.children, r = { ...r }, delete r.children) : (a = t.nodes.map((l) => b.createElement(C0, {
    key: `bridge${l.key}`,
    createPortal: e,
    node: l
  })), r.children && (a.push(r.children), r = { ...r }, delete r.children), o && a.push(b.createElement(eoe, { key: "svelte-slot", el: o })), i.length >= 0 && a.push(...i.map(({ Hook: l, key: s }) => b.createElement(l, { key: `hook${s}` })))), e(b.createElement(qE.Provider, { value: t.contexts }, a === void 0 ? b.createElement(t.reactComponent, r) : b.createElement(t.reactComponent, r, a)), n);
}, { getAllContexts: toe } = window.__gradio__svelte__internal;
let Af, P0 = 0;
const Nj = Bi(), vF = Bi(), bk = {
  key: P0,
  svelteInstance: Nj,
  reactComponent: ({ children: e }) => e,
  target: vF,
  props: Bi({}),
  slot: Nj,
  nodes: [],
  contexts: /* @__PURE__ */ new Map(),
  hooks: Bi([])
};
let rl;
function noe(e, t, n, r) {
  var l;
  if (typeof jj.$$render == "function") {
    const { $$render: s } = vk;
    return {
      ...vk,
      $$render(c, p, f, m, h) {
        if (!r)
          return "";
        if (rl !== void 0)
          return rl.push({ reactComponent: e, props: p }), `<ssr-portal${rl.length - 1}/>`;
        rl = [];
        try {
          const g = toe(), v = s.call(vk, c, {}, f, m, h), w = !m.default && rl.length === 0 ? b.createElement(e, p) : b.createElement(e, p, [
            b.createElement("svelte-slot", {
              key: "svelte-slot",
              style: { display: "contents" },
              dangerouslySetInnerHTML: { __html: v }
            }),
            ...rl.map((k, E) => b.createElement(`ssr-portal${E}`, { key: `ssr-portal${E}` }, b.createElement(k.reactComponent, k.props)))
          ]);
          let x = r(b.createElement(qE.Provider, {
            value: h || g
          }, w));
          return rl.forEach((k, E) => {
            const O = `<ssr-portal${E}>`, C = `</ssr-portal${E}>`, R = x.indexOf(O), L = x.indexOf(C);
            let D = "";
            R !== -1 && (D = x.substring(R + O.length, L), x = x.substring(0, R) + x.substring(L + C.length)), x = x.replace(`<ssr-portal${E}/>`, D);
          }), x;
        } finally {
          rl = void 0;
        }
      }
    };
  }
  if (!Af) {
    const s = document.createElement("react-root"), c = (l = n.createRoot) == null ? void 0 : l.call(n, s), p = document.createElement("bridge-root");
    vF.set(p), document.head.appendChild(s), document.head.appendChild(p), c ? Af = (f) => {
      c.render(b.createElement(C0, f));
    } : Af = (f) => {
      n.render(b.createElement(C0, f), s);
    };
  }
  function a(s) {
    const c = Bi(), p = new jj({
      ...s,
      props: {
        svelteInit(f) {
          P0 += 1;
          const m = {
            key: P0,
            svelteInstance: c,
            reactComponent: e,
            props: f.props,
            slot: f.slot,
            target: f.target,
            hooks: f.hooks,
            contexts: f.contexts,
            nodes: []
          }, h = f.parent ?? bk;
          return h.nodes.push(m), Af({ createPortal: t, node: bk }), f.onDestroy(() => {
            h.nodes = h.nodes.filter((g) => g.svelteInstance !== c), Af({ createPortal: t, node: bk });
          }), m;
        },
        ...s.props
      }
    });
    return c.set(p), p;
  }
  return a;
}
var R0 = {}, bF = { exports: {} }, xo = {}, wF = { exports: {} }, xF = {};
/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function(e) {
  function t(q, ee) {
    var A = q.length;
    q.push(ee);
    e:
      for (; 0 < A; ) {
        var X = A - 1 >>> 1, ie = q[X];
        if (0 < o(ie, ee))
          q[X] = ee, q[A] = ie, A = X;
        else
          break e;
      }
  }
  function n(q) {
    return q.length === 0 ? null : q[0];
  }
  function r(q) {
    if (q.length === 0)
      return null;
    var ee = q[0], A = q.pop();
    if (A !== ee) {
      q[0] = A;
      e:
        for (var X = 0, ie = q.length, j = ie >>> 1; X < j; ) {
          var le = 2 * (X + 1) - 1, re = q[le], he = le + 1, xe = q[he];
          if (0 > o(re, A))
            he < ie && 0 > o(xe, re) ? (q[X] = xe, q[he] = A, X = he) : (q[X] = re, q[le] = A, X = le);
          else if (he < ie && 0 > o(xe, A))
            q[X] = xe, q[he] = A, X = he;
          else
            break e;
        }
    }
    return ee;
  }
  function o(q, ee) {
    var A = q.sortIndex - ee.sortIndex;
    return A !== 0 ? A : q.id - ee.id;
  }
  if (typeof performance == "object" && typeof performance.now == "function") {
    var i = performance;
    e.unstable_now = function() {
      return i.now();
    };
  } else {
    var a = Date, l = a.now();
    e.unstable_now = function() {
      return a.now() - l;
    };
  }
  var s = [], c = [], p = 1, f = null, m = 3, h = !1, g = !1, v = !1, S = typeof setTimeout == "function" ? setTimeout : null, w = typeof clearTimeout == "function" ? clearTimeout : null, x = typeof setImmediate < "u" ? setImmediate : null;
  typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
  function k(q) {
    for (var ee = n(c); ee !== null; ) {
      if (ee.callback === null)
        r(c);
      else if (ee.startTime <= q)
        r(c), ee.sortIndex = ee.expirationTime, t(s, ee);
      else
        break;
      ee = n(c);
    }
  }
  function E(q) {
    if (v = !1, k(q), !g)
      if (n(s) !== null)
        g = !0, Q(O);
      else {
        var ee = n(c);
        ee !== null && J(E, ee.startTime - q);
      }
  }
  function O(q, ee) {
    g = !1, v && (v = !1, w(L), L = -1), h = !0;
    var A = m;
    try {
      for (k(ee), f = n(s); f !== null && (!(f.expirationTime > ee) || q && !H()); ) {
        var X = f.callback;
        if (typeof X == "function") {
          f.callback = null, m = f.priorityLevel;
          var ie = X(f.expirationTime <= ee);
          ee = e.unstable_now(), typeof ie == "function" ? f.callback = ie : f === n(s) && r(s), k(ee);
        } else
          r(s);
        f = n(s);
      }
      if (f !== null)
        var j = !0;
      else {
        var le = n(c);
        le !== null && J(E, le.startTime - ee), j = !1;
      }
      return j;
    } finally {
      f = null, m = A, h = !1;
    }
  }
  var C = !1, R = null, L = -1, D = 5, N = -1;
  function H() {
    return !(e.unstable_now() - N < D);
  }
  function B() {
    if (R !== null) {
      var q = e.unstable_now();
      N = q;
      var ee = !0;
      try {
        ee = R(!0, q);
      } finally {
        ee ? K() : (C = !1, R = null);
      }
    } else
      C = !1;
  }
  var K;
  if (typeof x == "function")
    K = function() {
      x(B);
    };
  else if (typeof MessageChannel < "u") {
    var W = new MessageChannel(), U = W.port2;
    W.port1.onmessage = B, K = function() {
      U.postMessage(null);
    };
  } else
    K = function() {
      S(B, 0);
    };
  function Q(q) {
    R = q, C || (C = !0, K());
  }
  function J(q, ee) {
    L = S(function() {
      q(e.unstable_now());
    }, ee);
  }
  e.unstable_IdlePriority = 5, e.unstable_ImmediatePriority = 1, e.unstable_LowPriority = 4, e.unstable_NormalPriority = 3, e.unstable_Profiling = null, e.unstable_UserBlockingPriority = 2, e.unstable_cancelCallback = function(q) {
    q.callback = null;
  }, e.unstable_continueExecution = function() {
    g || h || (g = !0, Q(O));
  }, e.unstable_forceFrameRate = function(q) {
    0 > q || 125 < q ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : D = 0 < q ? Math.floor(1e3 / q) : 5;
  }, e.unstable_getCurrentPriorityLevel = function() {
    return m;
  }, e.unstable_getFirstCallbackNode = function() {
    return n(s);
  }, e.unstable_next = function(q) {
    switch (m) {
      case 1:
      case 2:
      case 3:
        var ee = 3;
        break;
      default:
        ee = m;
    }
    var A = m;
    m = ee;
    try {
      return q();
    } finally {
      m = A;
    }
  }, e.unstable_pauseExecution = function() {
  }, e.unstable_requestPaint = function() {
  }, e.unstable_runWithPriority = function(q, ee) {
    switch (q) {
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        break;
      default:
        q = 3;
    }
    var A = m;
    m = q;
    try {
      return ee();
    } finally {
      m = A;
    }
  }, e.unstable_scheduleCallback = function(q, ee, A) {
    var X = e.unstable_now();
    switch (typeof A == "object" && A !== null ? (A = A.delay, A = typeof A == "number" && 0 < A ? X + A : X) : A = X, q) {
      case 1:
        var ie = -1;
        break;
      case 2:
        ie = 250;
        break;
      case 5:
        ie = 1073741823;
        break;
      case 4:
        ie = 1e4;
        break;
      default:
        ie = 5e3;
    }
    return ie = A + ie, q = { id: p++, callback: ee, priorityLevel: q, startTime: A, expirationTime: ie, sortIndex: -1 }, A > X ? (q.sortIndex = A, t(c, q), n(s) === null && q === n(c) && (v ? (w(L), L = -1) : v = !0, J(E, A - X))) : (q.sortIndex = ie, t(s, q), g || h || (g = !0, Q(O))), q;
  }, e.unstable_shouldYield = H, e.unstable_wrapCallback = function(q) {
    var ee = m;
    return function() {
      var A = m;
      m = ee;
      try {
        return q.apply(this, arguments);
      } finally {
        m = A;
      }
    };
  };
})(xF);
wF.exports = xF;
var roe = wF.exports;
/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var SF = b, bo = roe;
function ge(e) {
  for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++)
    t += "&args[]=" + encodeURIComponent(arguments[n]);
  return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
var kF = /* @__PURE__ */ new Set(), Kd = {};
function Gs(e, t) {
  wc(e, t), wc(e + "Capture", t);
}
function wc(e, t) {
  for (Kd[e] = t, e = 0; e < t.length; e++)
    kF.add(t[e]);
}
var _a = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), T0 = Object.prototype.hasOwnProperty, ooe = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, $j = {}, Ij = {};
function ioe(e) {
  return T0.call(Ij, e) ? !0 : T0.call($j, e) ? !1 : ooe.test(e) ? Ij[e] = !0 : ($j[e] = !0, !1);
}
function aoe(e, t, n, r) {
  if (n !== null && n.type === 0)
    return !1;
  switch (typeof t) {
    case "function":
    case "symbol":
      return !0;
    case "boolean":
      return r ? !1 : n !== null ? !n.acceptsBooleans : (e = e.toLowerCase().slice(0, 5), e !== "data-" && e !== "aria-");
    default:
      return !1;
  }
}
function loe(e, t, n, r) {
  if (t === null || typeof t > "u" || aoe(e, t, n, r))
    return !0;
  if (r)
    return !1;
  if (n !== null)
    switch (n.type) {
      case 3:
        return !t;
      case 4:
        return t === !1;
      case 5:
        return isNaN(t);
      case 6:
        return isNaN(t) || 1 > t;
    }
  return !1;
}
function _r(e, t, n, r, o, i, a) {
  this.acceptsBooleans = t === 2 || t === 3 || t === 4, this.attributeName = r, this.attributeNamespace = o, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = i, this.removeEmptyString = a;
}
var qn = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) {
  qn[e] = new _r(e, 0, !1, e, null, !1, !1);
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) {
  var t = e[0];
  qn[t] = new _r(t, 1, !1, e[1], null, !1, !1);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) {
  qn[e] = new _r(e, 2, !1, e.toLowerCase(), null, !1, !1);
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) {
  qn[e] = new _r(e, 2, !1, e, null, !1, !1);
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e) {
  qn[e] = new _r(e, 3, !1, e.toLowerCase(), null, !1, !1);
});
["checked", "multiple", "muted", "selected"].forEach(function(e) {
  qn[e] = new _r(e, 3, !0, e, null, !1, !1);
});
["capture", "download"].forEach(function(e) {
  qn[e] = new _r(e, 4, !1, e, null, !1, !1);
});
["cols", "rows", "size", "span"].forEach(function(e) {
  qn[e] = new _r(e, 6, !1, e, null, !1, !1);
});
["rowSpan", "start"].forEach(function(e) {
  qn[e] = new _r(e, 5, !1, e.toLowerCase(), null, !1, !1);
});
var GE = /[\-:]([a-z])/g;
function KE(e) {
  return e[1].toUpperCase();
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e) {
  var t = e.replace(
    GE,
    KE
  );
  qn[t] = new _r(t, 1, !1, e, null, !1, !1);
});
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e) {
  var t = e.replace(GE, KE);
  qn[t] = new _r(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
});
["xml:base", "xml:lang", "xml:space"].forEach(function(e) {
  var t = e.replace(GE, KE);
  qn[t] = new _r(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
});
["tabIndex", "crossOrigin"].forEach(function(e) {
  qn[e] = new _r(e, 1, !1, e.toLowerCase(), null, !1, !1);
});
qn.xlinkHref = new _r("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function(e) {
  qn[e] = new _r(e, 1, !1, e.toLowerCase(), null, !0, !0);
});
function YE(e, t, n, r) {
  var o = qn.hasOwnProperty(t) ? qn[t] : null;
  (o !== null ? o.type !== 0 : r || !(2 < t.length) || t[0] !== "o" && t[0] !== "O" || t[1] !== "n" && t[1] !== "N") && (loe(t, n, o, r) && (n = null), r || o === null ? ioe(t) && (n === null ? e.removeAttribute(t) : e.setAttribute(t, "" + n)) : o.mustUseProperty ? e[o.propertyName] = n === null ? o.type === 3 ? !1 : "" : n : (t = o.attributeName, r = o.attributeNamespace, n === null ? e.removeAttribute(t) : (o = o.type, n = o === 3 || o === 4 && n === !0 ? "" : "" + n, r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n))));
}
var za = SF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, Ym = Symbol.for("react.element"), Wu = Symbol.for("react.portal"), Vu = Symbol.for("react.fragment"), XE = Symbol.for("react.strict_mode"), j0 = Symbol.for("react.profiler"), _F = Symbol.for("react.provider"), OF = Symbol.for("react.context"), ZE = Symbol.for("react.forward_ref"), N0 = Symbol.for("react.suspense"), $0 = Symbol.for("react.suspense_list"), QE = Symbol.for("react.memo"), pl = Symbol.for("react.lazy"), EF = Symbol.for("react.offscreen"), Aj = Symbol.iterator;
function zf(e) {
  return e === null || typeof e != "object" ? null : (e = Aj && e[Aj] || e["@@iterator"], typeof e == "function" ? e : null);
}
var sn = Object.assign, wk;
function dd(e) {
  if (wk === void 0)
    try {
      throw Error();
    } catch (n) {
      var t = n.stack.trim().match(/\n( *(at )?)/);
      wk = t && t[1] || "";
    }
  return `
` + wk + e;
}
var xk = !1;
function Sk(e, t) {
  if (!e || xk)
    return "";
  xk = !0;
  var n = Error.prepareStackTrace;
  Error.prepareStackTrace = void 0;
  try {
    if (t)
      if (t = function() {
        throw Error();
      }, Object.defineProperty(t.prototype, "props", { set: function() {
        throw Error();
      } }), typeof Reflect == "object" && Reflect.construct) {
        try {
          Reflect.construct(t, []);
        } catch (c) {
          var r = c;
        }
        Reflect.construct(e, [], t);
      } else {
        try {
          t.call();
        } catch (c) {
          r = c;
        }
        e.call(t.prototype);
      }
    else {
      try {
        throw Error();
      } catch (c) {
        r = c;
      }
      e();
    }
  } catch (c) {
    if (c && r && typeof c.stack == "string") {
      for (var o = c.stack.split(`
`), i = r.stack.split(`
`), a = o.length - 1, l = i.length - 1; 1 <= a && 0 <= l && o[a] !== i[l]; )
        l--;
      for (; 1 <= a && 0 <= l; a--, l--)
        if (o[a] !== i[l]) {
          if (a !== 1 || l !== 1)
            do
              if (a--, l--, 0 > l || o[a] !== i[l]) {
                var s = `
` + o[a].replace(" at new ", " at ");
                return e.displayName && s.includes("<anonymous>") && (s = s.replace("<anonymous>", e.displayName)), s;
              }
            while (1 <= a && 0 <= l);
          break;
        }
    }
  } finally {
    xk = !1, Error.prepareStackTrace = n;
  }
  return (e = e ? e.displayName || e.name : "") ? dd(e) : "";
}
function soe(e) {
  switch (e.tag) {
    case 5:
      return dd(e.type);
    case 16:
      return dd("Lazy");
    case 13:
      return dd("Suspense");
    case 19:
      return dd("SuspenseList");
    case 0:
    case 2:
    case 15:
      return e = Sk(e.type, !1), e;
    case 11:
      return e = Sk(e.type.render, !1), e;
    case 1:
      return e = Sk(e.type, !0), e;
    default:
      return "";
  }
}
function I0(e) {
  if (e == null)
    return null;
  if (typeof e == "function")
    return e.displayName || e.name || null;
  if (typeof e == "string")
    return e;
  switch (e) {
    case Vu:
      return "Fragment";
    case Wu:
      return "Portal";
    case j0:
      return "Profiler";
    case XE:
      return "StrictMode";
    case N0:
      return "Suspense";
    case $0:
      return "SuspenseList";
  }
  if (typeof e == "object")
    switch (e.$$typeof) {
      case OF:
        return (e.displayName || "Context") + ".Consumer";
      case _F:
        return (e._context.displayName || "Context") + ".Provider";
      case ZE:
        var t = e.render;
        return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
      case QE:
        return t = e.displayName || null, t !== null ? t : I0(e.type) || "Memo";
      case pl:
        t = e._payload, e = e._init;
        try {
          return I0(e(t));
        } catch {
        }
    }
  return null;
}
function uoe(e) {
  var t = e.type;
  switch (e.tag) {
    case 24:
      return "Cache";
    case 9:
      return (t.displayName || "Context") + ".Consumer";
    case 10:
      return (t._context.displayName || "Context") + ".Provider";
    case 18:
      return "DehydratedFragment";
    case 11:
      return e = t.render, e = e.displayName || e.name || "", t.displayName || (e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef");
    case 7:
      return "Fragment";
    case 5:
      return t;
    case 4:
      return "Portal";
    case 3:
      return "Root";
    case 6:
      return "Text";
    case 16:
      return I0(t);
    case 8:
      return t === XE ? "StrictMode" : "Mode";
    case 22:
      return "Offscreen";
    case 12:
      return "Profiler";
    case 21:
      return "Scope";
    case 13:
      return "Suspense";
    case 19:
      return "SuspenseList";
    case 25:
      return "TracingMarker";
    case 1:
    case 0:
    case 17:
    case 2:
    case 14:
    case 15:
      if (typeof t == "function")
        return t.displayName || t.name || null;
      if (typeof t == "string")
        return t;
  }
  return null;
}
function Ll(e) {
  switch (typeof e) {
    case "boolean":
    case "number":
    case "string":
    case "undefined":
      return e;
    case "object":
      return e;
    default:
      return "";
  }
}
function CF(e) {
  var t = e.type;
  return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio");
}
function coe(e) {
  var t = CF(e) ? "checked" : "value", n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), r = "" + e[t];
  if (!e.hasOwnProperty(t) && typeof n < "u" && typeof n.get == "function" && typeof n.set == "function") {
    var o = n.get, i = n.set;
    return Object.defineProperty(e, t, { configurable: !0, get: function() {
      return o.call(this);
    }, set: function(a) {
      r = "" + a, i.call(this, a);
    } }), Object.defineProperty(e, t, { enumerable: n.enumerable }), { getValue: function() {
      return r;
    }, setValue: function(a) {
      r = "" + a;
    }, stopTracking: function() {
      e._valueTracker = null, delete e[t];
    } };
  }
}
function Xm(e) {
  e._valueTracker || (e._valueTracker = coe(e));
}
function PF(e) {
  if (!e)
    return !1;
  var t = e._valueTracker;
  if (!t)
    return !0;
  var n = t.getValue(), r = "";
  return e && (r = CF(e) ? e.checked ? "true" : "false" : e.value), e = r, e !== n ? (t.setValue(e), !0) : !1;
}
function ay(e) {
  if (e = e || (typeof document < "u" ? document : void 0), typeof e > "u")
    return null;
  try {
    return e.activeElement || e.body;
  } catch {
    return e.body;
  }
}
function A0(e, t) {
  var n = t.checked;
  return sn({}, t, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: n ?? e._wrapperState.initialChecked });
}
function zj(e, t) {
  var n = t.defaultValue == null ? "" : t.defaultValue, r = t.checked != null ? t.checked : t.defaultChecked;
  n = Ll(t.value != null ? t.value : n), e._wrapperState = { initialChecked: r, initialValue: n, controlled: t.type === "checkbox" || t.type === "radio" ? t.checked != null : t.value != null };
}
function RF(e, t) {
  t = t.checked, t != null && YE(e, "checked", t, !1);
}
function z0(e, t) {
  RF(e, t);
  var n = Ll(t.value), r = t.type;
  if (n != null)
    r === "number" ? (n === 0 && e.value === "" || e.value != n) && (e.value = "" + n) : e.value !== "" + n && (e.value = "" + n);
  else if (r === "submit" || r === "reset") {
    e.removeAttribute("value");
    return;
  }
  t.hasOwnProperty("value") ? L0(e, t.type, n) : t.hasOwnProperty("defaultValue") && L0(e, t.type, Ll(t.defaultValue)), t.checked == null && t.defaultChecked != null && (e.defaultChecked = !!t.defaultChecked);
}
function Lj(e, t, n) {
  if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
    var r = t.type;
    if (!(r !== "submit" && r !== "reset" || t.value !== void 0 && t.value !== null))
      return;
    t = "" + e._wrapperState.initialValue, n || t === e.value || (e.value = t), e.defaultValue = t;
  }
  n = e.name, n !== "" && (e.name = ""), e.defaultChecked = !!e._wrapperState.initialChecked, n !== "" && (e.name = n);
}
function L0(e, t, n) {
  (t !== "number" || ay(e.ownerDocument) !== e) && (n == null ? e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n && (e.defaultValue = "" + n));
}
var pd = Array.isArray;
function sc(e, t, n, r) {
  if (e = e.options, t) {
    t = {};
    for (var o = 0; o < n.length; o++)
      t["$" + n[o]] = !0;
    for (n = 0; n < e.length; n++)
      o = t.hasOwnProperty("$" + e[n].value), e[n].selected !== o && (e[n].selected = o), o && r && (e[n].defaultSelected = !0);
  } else {
    for (n = "" + Ll(n), t = null, o = 0; o < e.length; o++) {
      if (e[o].value === n) {
        e[o].selected = !0, r && (e[o].defaultSelected = !0);
        return;
      }
      t !== null || e[o].disabled || (t = e[o]);
    }
    t !== null && (t.selected = !0);
  }
}
function D0(e, t) {
  if (t.dangerouslySetInnerHTML != null)
    throw Error(ge(91));
  return sn({}, t, { value: void 0, defaultValue: void 0, children: "" + e._wrapperState.initialValue });
}
function Dj(e, t) {
  var n = t.value;
  if (n == null) {
    if (n = t.children, t = t.defaultValue, n != null) {
      if (t != null)
        throw Error(ge(92));
      if (pd(n)) {
        if (1 < n.length)
          throw Error(ge(93));
        n = n[0];
      }
      t = n;
    }
    t == null && (t = ""), n = t;
  }
  e._wrapperState = { initialValue: Ll(n) };
}
function TF(e, t) {
  var n = Ll(t.value), r = Ll(t.defaultValue);
  n != null && (n = "" + n, n !== e.value && (e.value = n), t.defaultValue == null && e.defaultValue !== n && (e.defaultValue = n)), r != null && (e.defaultValue = "" + r);
}
function Fj(e) {
  var t = e.textContent;
  t === e._wrapperState.initialValue && t !== "" && t !== null && (e.value = t);
}
function jF(e) {
  switch (e) {
    case "svg":
      return "http://www.w3.org/2000/svg";
    case "math":
      return "http://www.w3.org/1998/Math/MathML";
    default:
      return "http://www.w3.org/1999/xhtml";
  }
}
function F0(e, t) {
  return e == null || e === "http://www.w3.org/1999/xhtml" ? jF(t) : e === "http://www.w3.org/2000/svg" && t === "foreignObject" ? "http://www.w3.org/1999/xhtml" : e;
}
var Zm, NF = function(e) {
  return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(t, n, r, o) {
    MSApp.execUnsafeLocalFunction(function() {
      return e(t, n, r, o);
    });
  } : e;
}(function(e, t) {
  if (e.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in e)
    e.innerHTML = t;
  else {
    for (Zm = Zm || document.createElement("div"), Zm.innerHTML = "<svg>" + t.valueOf().toString() + "</svg>", t = Zm.firstChild; e.firstChild; )
      e.removeChild(e.firstChild);
    for (; t.firstChild; )
      e.appendChild(t.firstChild);
  }
});
function Yd(e, t) {
  if (t) {
    var n = e.firstChild;
    if (n && n === e.lastChild && n.nodeType === 3) {
      n.nodeValue = t;
      return;
    }
  }
  e.textContent = t;
}
var Cd = {
  animationIterationCount: !0,
  aspectRatio: !0,
  borderImageOutset: !0,
  borderImageSlice: !0,
  borderImageWidth: !0,
  boxFlex: !0,
  boxFlexGroup: !0,
  boxOrdinalGroup: !0,
  columnCount: !0,
  columns: !0,
  flex: !0,
  flexGrow: !0,
  flexPositive: !0,
  flexShrink: !0,
  flexNegative: !0,
  flexOrder: !0,
  gridArea: !0,
  gridRow: !0,
  gridRowEnd: !0,
  gridRowSpan: !0,
  gridRowStart: !0,
  gridColumn: !0,
  gridColumnEnd: !0,
  gridColumnSpan: !0,
  gridColumnStart: !0,
  fontWeight: !0,
  lineClamp: !0,
  lineHeight: !0,
  opacity: !0,
  order: !0,
  orphans: !0,
  tabSize: !0,
  widows: !0,
  zIndex: !0,
  zoom: !0,
  fillOpacity: !0,
  floodOpacity: !0,
  stopOpacity: !0,
  strokeDasharray: !0,
  strokeDashoffset: !0,
  strokeMiterlimit: !0,
  strokeOpacity: !0,
  strokeWidth: !0
}, foe = ["Webkit", "ms", "Moz", "O"];
Object.keys(Cd).forEach(function(e) {
  foe.forEach(function(t) {
    t = t + e.charAt(0).toUpperCase() + e.substring(1), Cd[t] = Cd[e];
  });
});
function $F(e, t, n) {
  return t == null || typeof t == "boolean" || t === "" ? "" : n || typeof t != "number" || t === 0 || Cd.hasOwnProperty(e) && Cd[e] ? ("" + t).trim() : t + "px";
}
function IF(e, t) {
  e = e.style;
  for (var n in t)
    if (t.hasOwnProperty(n)) {
      var r = n.indexOf("--") === 0, o = $F(n, t[n], r);
      n === "float" && (n = "cssFloat"), r ? e.setProperty(n, o) : e[n] = o;
    }
}
var doe = sn({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 });
function M0(e, t) {
  if (t) {
    if (doe[e] && (t.children != null || t.dangerouslySetInnerHTML != null))
      throw Error(ge(137, e));
    if (t.dangerouslySetInnerHTML != null) {
      if (t.children != null)
        throw Error(ge(60));
      if (typeof t.dangerouslySetInnerHTML != "object" || !("__html" in t.dangerouslySetInnerHTML))
        throw Error(ge(61));
    }
    if (t.style != null && typeof t.style != "object")
      throw Error(ge(62));
  }
}
function B0(e, t) {
  if (e.indexOf("-") === -1)
    return typeof t.is == "string";
  switch (e) {
    case "annotation-xml":
    case "color-profile":
    case "font-face":
    case "font-face-src":
    case "font-face-uri":
    case "font-face-format":
    case "font-face-name":
    case "missing-glyph":
      return !1;
    default:
      return !0;
  }
}
var U0 = null;
function JE(e) {
  return e = e.target || e.srcElement || window, e.correspondingUseElement && (e = e.correspondingUseElement), e.nodeType === 3 ? e.parentNode : e;
}
var H0 = null, uc = null, cc = null;
function Mj(e) {
  if (e = Tp(e)) {
    if (typeof H0 != "function")
      throw Error(ge(280));
    var t = e.stateNode;
    t && (t = qw(t), H0(e.stateNode, e.type, t));
  }
}
function AF(e) {
  uc ? cc ? cc.push(e) : cc = [e] : uc = e;
}
function zF() {
  if (uc) {
    var e = uc, t = cc;
    if (cc = uc = null, Mj(e), t)
      for (e = 0; e < t.length; e++)
        Mj(t[e]);
  }
}
function LF(e, t) {
  return e(t);
}
function DF() {
}
var kk = !1;
function FF(e, t, n) {
  if (kk)
    return e(t, n);
  kk = !0;
  try {
    return LF(e, t, n);
  } finally {
    kk = !1, (uc !== null || cc !== null) && (DF(), zF());
  }
}
function Xd(e, t) {
  var n = e.stateNode;
  if (n === null)
    return null;
  var r = qw(n);
  if (r === null)
    return null;
  n = r[t];
  e:
    switch (t) {
      case "onClick":
      case "onClickCapture":
      case "onDoubleClick":
      case "onDoubleClickCapture":
      case "onMouseDown":
      case "onMouseDownCapture":
      case "onMouseMove":
      case "onMouseMoveCapture":
      case "onMouseUp":
      case "onMouseUpCapture":
      case "onMouseEnter":
        (r = !r.disabled) || (e = e.type, r = !(e === "button" || e === "input" || e === "select" || e === "textarea")), e = !r;
        break e;
      default:
        e = !1;
    }
  if (e)
    return null;
  if (n && typeof n != "function")
    throw Error(ge(231, t, typeof n));
  return n;
}
var W0 = !1;
if (_a)
  try {
    var Lf = {};
    Object.defineProperty(Lf, "passive", { get: function() {
      W0 = !0;
    } }), window.addEventListener("test", Lf, Lf), window.removeEventListener("test", Lf, Lf);
  } catch {
    W0 = !1;
  }
function poe(e, t, n, r, o, i, a, l, s) {
  var c = Array.prototype.slice.call(arguments, 3);
  try {
    t.apply(n, c);
  } catch (p) {
    this.onError(p);
  }
}
var Pd = !1, ly = null, sy = !1, V0 = null, moe = { onError: function(e) {
  Pd = !0, ly = e;
} };
function hoe(e, t, n, r, o, i, a, l, s) {
  Pd = !1, ly = null, poe.apply(moe, arguments);
}
function goe(e, t, n, r, o, i, a, l, s) {
  if (hoe.apply(this, arguments), Pd) {
    if (Pd) {
      var c = ly;
      Pd = !1, ly = null;
    } else
      throw Error(ge(198));
    sy || (sy = !0, V0 = c);
  }
}
function Ks(e) {
  var t = e, n = e;
  if (e.alternate)
    for (; t.return; )
      t = t.return;
  else {
    e = t;
    do
      t = e, t.flags & 4098 && (n = t.return), e = t.return;
    while (e);
  }
  return t.tag === 3 ? n : null;
}
function MF(e) {
  if (e.tag === 13) {
    var t = e.memoizedState;
    if (t === null && (e = e.alternate, e !== null && (t = e.memoizedState)), t !== null)
      return t.dehydrated;
  }
  return null;
}
function Bj(e) {
  if (Ks(e) !== e)
    throw Error(ge(188));
}
function yoe(e) {
  var t = e.alternate;
  if (!t) {
    if (t = Ks(e), t === null)
      throw Error(ge(188));
    return t !== e ? null : e;
  }
  for (var n = e, r = t; ; ) {
    var o = n.return;
    if (o === null)
      break;
    var i = o.alternate;
    if (i === null) {
      if (r = o.return, r !== null) {
        n = r;
        continue;
      }
      break;
    }
    if (o.child === i.child) {
      for (i = o.child; i; ) {
        if (i === n)
          return Bj(o), e;
        if (i === r)
          return Bj(o), t;
        i = i.sibling;
      }
      throw Error(ge(188));
    }
    if (n.return !== r.return)
      n = o, r = i;
    else {
      for (var a = !1, l = o.child; l; ) {
        if (l === n) {
          a = !0, n = o, r = i;
          break;
        }
        if (l === r) {
          a = !0, r = o, n = i;
          break;
        }
        l = l.sibling;
      }
      if (!a) {
        for (l = i.child; l; ) {
          if (l === n) {
            a = !0, n = i, r = o;
            break;
          }
          if (l === r) {
            a = !0, r = i, n = o;
            break;
          }
          l = l.sibling;
        }
        if (!a)
          throw Error(ge(189));
      }
    }
    if (n.alternate !== r)
      throw Error(ge(190));
  }
  if (n.tag !== 3)
    throw Error(ge(188));
  return n.stateNode.current === n ? e : t;
}
function BF(e) {
  return e = yoe(e), e !== null ? UF(e) : null;
}
function UF(e) {
  if (e.tag === 5 || e.tag === 6)
    return e;
  for (e = e.child; e !== null; ) {
    var t = UF(e);
    if (t !== null)
      return t;
    e = e.sibling;
  }
  return null;
}
var HF = bo.unstable_scheduleCallback, Uj = bo.unstable_cancelCallback, voe = bo.unstable_shouldYield, boe = bo.unstable_requestPaint, yn = bo.unstable_now, woe = bo.unstable_getCurrentPriorityLevel, eC = bo.unstable_ImmediatePriority, WF = bo.unstable_UserBlockingPriority, uy = bo.unstable_NormalPriority, xoe = bo.unstable_LowPriority, VF = bo.unstable_IdlePriority, Uw = null, Vi = null;
function Soe(e) {
  if (Vi && typeof Vi.onCommitFiberRoot == "function")
    try {
      Vi.onCommitFiberRoot(Uw, e, void 0, (e.current.flags & 128) === 128);
    } catch {
    }
}
var ci = Math.clz32 ? Math.clz32 : Ooe, koe = Math.log, _oe = Math.LN2;
function Ooe(e) {
  return e >>>= 0, e === 0 ? 32 : 31 - (koe(e) / _oe | 0) | 0;
}
var Qm = 64, Jm = 4194304;
function md(e) {
  switch (e & -e) {
    case 1:
      return 1;
    case 2:
      return 2;
    case 4:
      return 4;
    case 8:
      return 8;
    case 16:
      return 16;
    case 32:
      return 32;
    case 64:
    case 128:
    case 256:
    case 512:
    case 1024:
    case 2048:
    case 4096:
    case 8192:
    case 16384:
    case 32768:
    case 65536:
    case 131072:
    case 262144:
    case 524288:
    case 1048576:
    case 2097152:
      return e & 4194240;
    case 4194304:
    case 8388608:
    case 16777216:
    case 33554432:
    case 67108864:
      return e & 130023424;
    case 134217728:
      return 134217728;
    case 268435456:
      return 268435456;
    case 536870912:
      return 536870912;
    case 1073741824:
      return 1073741824;
    default:
      return e;
  }
}
function cy(e, t) {
  var n = e.pendingLanes;
  if (n === 0)
    return 0;
  var r = 0, o = e.suspendedLanes, i = e.pingedLanes, a = n & 268435455;
  if (a !== 0) {
    var l = a & ~o;
    l !== 0 ? r = md(l) : (i &= a, i !== 0 && (r = md(i)));
  } else
    a = n & ~o, a !== 0 ? r = md(a) : i !== 0 && (r = md(i));
  if (r === 0)
    return 0;
  if (t !== 0 && t !== r && !(t & o) && (o = r & -r, i = t & -t, o >= i || o === 16 && (i & 4194240) !== 0))
    return t;
  if (r & 4 && (r |= n & 16), t = e.entangledLanes, t !== 0)
    for (e = e.entanglements, t &= r; 0 < t; )
      n = 31 - ci(t), o = 1 << n, r |= e[n], t &= ~o;
  return r;
}
function Eoe(e, t) {
  switch (e) {
    case 1:
    case 2:
    case 4:
      return t + 250;
    case 8:
    case 16:
    case 32:
    case 64:
    case 128:
    case 256:
    case 512:
    case 1024:
    case 2048:
    case 4096:
    case 8192:
    case 16384:
    case 32768:
    case 65536:
    case 131072:
    case 262144:
    case 524288:
    case 1048576:
    case 2097152:
      return t + 5e3;
    case 4194304:
    case 8388608:
    case 16777216:
    case 33554432:
    case 67108864:
      return -1;
    case 134217728:
    case 268435456:
    case 536870912:
    case 1073741824:
      return -1;
    default:
      return -1;
  }
}
function Coe(e, t) {
  for (var n = e.suspendedLanes, r = e.pingedLanes, o = e.expirationTimes, i = e.pendingLanes; 0 < i; ) {
    var a = 31 - ci(i), l = 1 << a, s = o[a];
    s === -1 ? (!(l & n) || l & r) && (o[a] = Eoe(l, t)) : s <= t && (e.expiredLanes |= l), i &= ~l;
  }
}
function q0(e) {
  return e = e.pendingLanes & -1073741825, e !== 0 ? e : e & 1073741824 ? 1073741824 : 0;
}
function qF() {
  var e = Qm;
  return Qm <<= 1, !(Qm & 4194240) && (Qm = 64), e;
}
function _k(e) {
  for (var t = [], n = 0; 31 > n; n++)
    t.push(e);
  return t;
}
function Pp(e, t, n) {
  e.pendingLanes |= t, t !== 536870912 && (e.suspendedLanes = 0, e.pingedLanes = 0), e = e.eventTimes, t = 31 - ci(t), e[t] = n;
}
function Poe(e, t) {
  var n = e.pendingLanes & ~t;
  e.pendingLanes = t, e.suspendedLanes = 0, e.pingedLanes = 0, e.expiredLanes &= t, e.mutableReadLanes &= t, e.entangledLanes &= t, t = e.entanglements;
  var r = e.eventTimes;
  for (e = e.expirationTimes; 0 < n; ) {
    var o = 31 - ci(n), i = 1 << o;
    t[o] = 0, r[o] = -1, e[o] = -1, n &= ~i;
  }
}
function tC(e, t) {
  var n = e.entangledLanes |= t;
  for (e = e.entanglements; n; ) {
    var r = 31 - ci(n), o = 1 << r;
    o & t | e[r] & t && (e[r] |= t), n &= ~o;
  }
}
var It = 0;
function GF(e) {
  return e &= -e, 1 < e ? 4 < e ? e & 268435455 ? 16 : 536870912 : 4 : 1;
}
var KF, nC, YF, XF, ZF, G0 = !1, eh = [], Ol = null, El = null, Cl = null, Zd = /* @__PURE__ */ new Map(), Qd = /* @__PURE__ */ new Map(), hl = [], Roe = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
function Hj(e, t) {
  switch (e) {
    case "focusin":
    case "focusout":
      Ol = null;
      break;
    case "dragenter":
    case "dragleave":
      El = null;
      break;
    case "mouseover":
    case "mouseout":
      Cl = null;
      break;
    case "pointerover":
    case "pointerout":
      Zd.delete(t.pointerId);
      break;
    case "gotpointercapture":
    case "lostpointercapture":
      Qd.delete(t.pointerId);
  }
}
function Df(e, t, n, r, o, i) {
  return e === null || e.nativeEvent !== i ? (e = { blockedOn: t, domEventName: n, eventSystemFlags: r, nativeEvent: i, targetContainers: [o] }, t !== null && (t = Tp(t), t !== null && nC(t)), e) : (e.eventSystemFlags |= r, t = e.targetContainers, o !== null && t.indexOf(o) === -1 && t.push(o), e);
}
function Toe(e, t, n, r, o) {
  switch (t) {
    case "focusin":
      return Ol = Df(Ol, e, t, n, r, o), !0;
    case "dragenter":
      return El = Df(El, e, t, n, r, o), !0;
    case "mouseover":
      return Cl = Df(Cl, e, t, n, r, o), !0;
    case "pointerover":
      var i = o.pointerId;
      return Zd.set(i, Df(Zd.get(i) || null, e, t, n, r, o)), !0;
    case "gotpointercapture":
      return i = o.pointerId, Qd.set(i, Df(Qd.get(i) || null, e, t, n, r, o)), !0;
  }
  return !1;
}
function QF(e) {
  var t = _s(e.target);
  if (t !== null) {
    var n = Ks(t);
    if (n !== null) {
      if (t = n.tag, t === 13) {
        if (t = MF(n), t !== null) {
          e.blockedOn = t, ZF(e.priority, function() {
            YF(n);
          });
          return;
        }
      } else if (t === 3 && n.stateNode.current.memoizedState.isDehydrated) {
        e.blockedOn = n.tag === 3 ? n.stateNode.containerInfo : null;
        return;
      }
    }
  }
  e.blockedOn = null;
}
function bg(e) {
  if (e.blockedOn !== null)
    return !1;
  for (var t = e.targetContainers; 0 < t.length; ) {
    var n = K0(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent);
    if (n === null) {
      n = e.nativeEvent;
      var r = new n.constructor(n.type, n);
      U0 = r, n.target.dispatchEvent(r), U0 = null;
    } else
      return t = Tp(n), t !== null && nC(t), e.blockedOn = n, !1;
    t.shift();
  }
  return !0;
}
function Wj(e, t, n) {
  bg(e) && n.delete(t);
}
function joe() {
  G0 = !1, Ol !== null && bg(Ol) && (Ol = null), El !== null && bg(El) && (El = null), Cl !== null && bg(Cl) && (Cl = null), Zd.forEach(Wj), Qd.forEach(Wj);
}
function Ff(e, t) {
  e.blockedOn === t && (e.blockedOn = null, G0 || (G0 = !0, bo.unstable_scheduleCallback(bo.unstable_NormalPriority, joe)));
}
function Jd(e) {
  function t(o) {
    return Ff(o, e);
  }
  if (0 < eh.length) {
    Ff(eh[0], e);
    for (var n = 1; n < eh.length; n++) {
      var r = eh[n];
      r.blockedOn === e && (r.blockedOn = null);
    }
  }
  for (Ol !== null && Ff(Ol, e), El !== null && Ff(El, e), Cl !== null && Ff(Cl, e), Zd.forEach(t), Qd.forEach(t), n = 0; n < hl.length; n++)
    r = hl[n], r.blockedOn === e && (r.blockedOn = null);
  for (; 0 < hl.length && (n = hl[0], n.blockedOn === null); )
    QF(n), n.blockedOn === null && hl.shift();
}
var fc = za.ReactCurrentBatchConfig, fy = !0;
function Noe(e, t, n, r) {
  var o = It, i = fc.transition;
  fc.transition = null;
  try {
    It = 1, rC(e, t, n, r);
  } finally {
    It = o, fc.transition = i;
  }
}
function $oe(e, t, n, r) {
  var o = It, i = fc.transition;
  fc.transition = null;
  try {
    It = 4, rC(e, t, n, r);
  } finally {
    It = o, fc.transition = i;
  }
}
function rC(e, t, n, r) {
  if (fy) {
    var o = K0(e, t, n, r);
    if (o === null)
      Ik(e, t, r, dy, n), Hj(e, r);
    else if (Toe(o, e, t, n, r))
      r.stopPropagation();
    else if (Hj(e, r), t & 4 && -1 < Roe.indexOf(e)) {
      for (; o !== null; ) {
        var i = Tp(o);
        if (i !== null && KF(i), i = K0(e, t, n, r), i === null && Ik(e, t, r, dy, n), i === o)
          break;
        o = i;
      }
      o !== null && r.stopPropagation();
    } else
      Ik(e, t, r, null, n);
  }
}
var dy = null;
function K0(e, t, n, r) {
  if (dy = null, e = JE(r), e = _s(e), e !== null)
    if (t = Ks(e), t === null)
      e = null;
    else if (n = t.tag, n === 13) {
      if (e = MF(t), e !== null)
        return e;
      e = null;
    } else if (n === 3) {
      if (t.stateNode.current.memoizedState.isDehydrated)
        return t.tag === 3 ? t.stateNode.containerInfo : null;
      e = null;
    } else
      t !== e && (e = null);
  return dy = e, null;
}
function JF(e) {
  switch (e) {
    case "cancel":
    case "click":
    case "close":
    case "contextmenu":
    case "copy":
    case "cut":
    case "auxclick":
    case "dblclick":
    case "dragend":
    case "dragstart":
    case "drop":
    case "focusin":
    case "focusout":
    case "input":
    case "invalid":
    case "keydown":
    case "keypress":
    case "keyup":
    case "mousedown":
    case "mouseup":
    case "paste":
    case "pause":
    case "play":
    case "pointercancel":
    case "pointerdown":
    case "pointerup":
    case "ratechange":
    case "reset":
    case "resize":
    case "seeked":
    case "submit":
    case "touchcancel":
    case "touchend":
    case "touchstart":
    case "volumechange":
    case "change":
    case "selectionchange":
    case "textInput":
    case "compositionstart":
    case "compositionend":
    case "compositionupdate":
    case "beforeblur":
    case "afterblur":
    case "beforeinput":
    case "blur":
    case "fullscreenchange":
    case "focus":
    case "hashchange":
    case "popstate":
    case "select":
    case "selectstart":
      return 1;
    case "drag":
    case "dragenter":
    case "dragexit":
    case "dragleave":
    case "dragover":
    case "mousemove":
    case "mouseout":
    case "mouseover":
    case "pointermove":
    case "pointerout":
    case "pointerover":
    case "scroll":
    case "toggle":
    case "touchmove":
    case "wheel":
    case "mouseenter":
    case "mouseleave":
    case "pointerenter":
    case "pointerleave":
      return 4;
    case "message":
      switch (woe()) {
        case eC:
          return 1;
        case WF:
          return 4;
        case uy:
        case xoe:
          return 16;
        case VF:
          return 536870912;
        default:
          return 16;
      }
    default:
      return 16;
  }
}
var yl = null, oC = null, wg = null;
function e6() {
  if (wg)
    return wg;
  var e, t = oC, n = t.length, r, o = "value" in yl ? yl.value : yl.textContent, i = o.length;
  for (e = 0; e < n && t[e] === o[e]; e++)
    ;
  var a = n - e;
  for (r = 1; r <= a && t[n - r] === o[i - r]; r++)
    ;
  return wg = o.slice(e, 1 < r ? 1 - r : void 0);
}
function xg(e) {
  var t = e.keyCode;
  return "charCode" in e ? (e = e.charCode, e === 0 && t === 13 && (e = 13)) : e = t, e === 10 && (e = 13), 32 <= e || e === 13 ? e : 0;
}
function th() {
  return !0;
}
function Vj() {
  return !1;
}
function So(e) {
  function t(n, r, o, i, a) {
    this._reactName = n, this._targetInst = o, this.type = r, this.nativeEvent = i, this.target = a, this.currentTarget = null;
    for (var l in e)
      e.hasOwnProperty(l) && (n = e[l], this[l] = n ? n(i) : i[l]);
    return this.isDefaultPrevented = (i.defaultPrevented != null ? i.defaultPrevented : i.returnValue === !1) ? th : Vj, this.isPropagationStopped = Vj, this;
  }
  return sn(t.prototype, { preventDefault: function() {
    this.defaultPrevented = !0;
    var n = this.nativeEvent;
    n && (n.preventDefault ? n.preventDefault() : typeof n.returnValue != "unknown" && (n.returnValue = !1), this.isDefaultPrevented = th);
  }, stopPropagation: function() {
    var n = this.nativeEvent;
    n && (n.stopPropagation ? n.stopPropagation() : typeof n.cancelBubble != "unknown" && (n.cancelBubble = !0), this.isPropagationStopped = th);
  }, persist: function() {
  }, isPersistent: th }), t;
}
var qc = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(e) {
  return e.timeStamp || Date.now();
}, defaultPrevented: 0, isTrusted: 0 }, iC = So(qc), Rp = sn({}, qc, { view: 0, detail: 0 }), Ioe = So(Rp), Ok, Ek, Mf, Hw = sn({}, Rp, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: aC, button: 0, buttons: 0, relatedTarget: function(e) {
  return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget;
}, movementX: function(e) {
  return "movementX" in e ? e.movementX : (e !== Mf && (Mf && e.type === "mousemove" ? (Ok = e.screenX - Mf.screenX, Ek = e.screenY - Mf.screenY) : Ek = Ok = 0, Mf = e), Ok);
}, movementY: function(e) {
  return "movementY" in e ? e.movementY : Ek;
} }), qj = So(Hw), Aoe = sn({}, Hw, { dataTransfer: 0 }), zoe = So(Aoe), Loe = sn({}, Rp, { relatedTarget: 0 }), Ck = So(Loe), Doe = sn({}, qc, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Foe = So(Doe), Moe = sn({}, qc, { clipboardData: function(e) {
  return "clipboardData" in e ? e.clipboardData : window.clipboardData;
} }), Boe = So(Moe), Uoe = sn({}, qc, { data: 0 }), Gj = So(Uoe), Hoe = {
  Esc: "Escape",
  Spacebar: " ",
  Left: "ArrowLeft",
  Up: "ArrowUp",
  Right: "ArrowRight",
  Down: "ArrowDown",
  Del: "Delete",
  Win: "OS",
  Menu: "ContextMenu",
  Apps: "ContextMenu",
  Scroll: "ScrollLock",
  MozPrintableKey: "Unidentified"
}, Woe = {
  8: "Backspace",
  9: "Tab",
  12: "Clear",
  13: "Enter",
  16: "Shift",
  17: "Control",
  18: "Alt",
  19: "Pause",
  20: "CapsLock",
  27: "Escape",
  32: " ",
  33: "PageUp",
  34: "PageDown",
  35: "End",
  36: "Home",
  37: "ArrowLeft",
  38: "ArrowUp",
  39: "ArrowRight",
  40: "ArrowDown",
  45: "Insert",
  46: "Delete",
  112: "F1",
  113: "F2",
  114: "F3",
  115: "F4",
  116: "F5",
  117: "F6",
  118: "F7",
  119: "F8",
  120: "F9",
  121: "F10",
  122: "F11",
  123: "F12",
  144: "NumLock",
  145: "ScrollLock",
  224: "Meta"
}, Voe = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
function qoe(e) {
  var t = this.nativeEvent;
  return t.getModifierState ? t.getModifierState(e) : (e = Voe[e]) ? !!t[e] : !1;
}
function aC() {
  return qoe;
}
var Goe = sn({}, Rp, { key: function(e) {
  if (e.key) {
    var t = Hoe[e.key] || e.key;
    if (t !== "Unidentified")
      return t;
  }
  return e.type === "keypress" ? (e = xg(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? Woe[e.keyCode] || "Unidentified" : "";
}, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: aC, charCode: function(e) {
  return e.type === "keypress" ? xg(e) : 0;
}, keyCode: function(e) {
  return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
}, which: function(e) {
  return e.type === "keypress" ? xg(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
} }), Koe = So(Goe), Yoe = sn({}, Hw, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Kj = So(Yoe), Xoe = sn({}, Rp, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: aC }), Zoe = So(Xoe), Qoe = sn({}, qc, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), Joe = So(Qoe), eie = sn({}, Hw, {
  deltaX: function(e) {
    return "deltaX" in e ? e.deltaX : "wheelDeltaX" in e ? -e.wheelDeltaX : 0;
  },
  deltaY: function(e) {
    return "deltaY" in e ? e.deltaY : "wheelDeltaY" in e ? -e.wheelDeltaY : "wheelDelta" in e ? -e.wheelDelta : 0;
  },
  deltaZ: 0,
  deltaMode: 0
}), tie = So(eie), nie = [9, 13, 27, 32], lC = _a && "CompositionEvent" in window, Rd = null;
_a && "documentMode" in document && (Rd = document.documentMode);
var rie = _a && "TextEvent" in window && !Rd, t6 = _a && (!lC || Rd && 8 < Rd && 11 >= Rd), Yj = " ", Xj = !1;
function n6(e, t) {
  switch (e) {
    case "keyup":
      return nie.indexOf(t.keyCode) !== -1;
    case "keydown":
      return t.keyCode !== 229;
    case "keypress":
    case "mousedown":
    case "focusout":
      return !0;
    default:
      return !1;
  }
}
function r6(e) {
  return e = e.detail, typeof e == "object" && "data" in e ? e.data : null;
}
var qu = !1;
function oie(e, t) {
  switch (e) {
    case "compositionend":
      return r6(t);
    case "keypress":
      return t.which !== 32 ? null : (Xj = !0, Yj);
    case "textInput":
      return e = t.data, e === Yj && Xj ? null : e;
    default:
      return null;
  }
}
function iie(e, t) {
  if (qu)
    return e === "compositionend" || !lC && n6(e, t) ? (e = e6(), wg = oC = yl = null, qu = !1, e) : null;
  switch (e) {
    case "paste":
      return null;
    case "keypress":
      if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) {
        if (t.char && 1 < t.char.length)
          return t.char;
        if (t.which)
          return String.fromCharCode(t.which);
      }
      return null;
    case "compositionend":
      return t6 && t.locale !== "ko" ? null : t.data;
    default:
      return null;
  }
}
var aie = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 };
function Zj(e) {
  var t = e && e.nodeName && e.nodeName.toLowerCase();
  return t === "input" ? !!aie[e.type] : t === "textarea";
}
function o6(e, t, n, r) {
  AF(r), t = py(t, "onChange"), 0 < t.length && (n = new iC("onChange", "change", null, n, r), e.push({ event: n, listeners: t }));
}
var Td = null, ep = null;
function lie(e) {
  h6(e, 0);
}
function Ww(e) {
  var t = Yu(e);
  if (PF(t))
    return e;
}
function sie(e, t) {
  if (e === "change")
    return t;
}
var i6 = !1;
if (_a) {
  var Pk;
  if (_a) {
    var Rk = "oninput" in document;
    if (!Rk) {
      var Qj = document.createElement("div");
      Qj.setAttribute("oninput", "return;"), Rk = typeof Qj.oninput == "function";
    }
    Pk = Rk;
  } else
    Pk = !1;
  i6 = Pk && (!document.documentMode || 9 < document.documentMode);
}
function Jj() {
  Td && (Td.detachEvent("onpropertychange", a6), ep = Td = null);
}
function a6(e) {
  if (e.propertyName === "value" && Ww(ep)) {
    var t = [];
    o6(t, ep, e, JE(e)), FF(lie, t);
  }
}
function uie(e, t, n) {
  e === "focusin" ? (Jj(), Td = t, ep = n, Td.attachEvent("onpropertychange", a6)) : e === "focusout" && Jj();
}
function cie(e) {
  if (e === "selectionchange" || e === "keyup" || e === "keydown")
    return Ww(ep);
}
function fie(e, t) {
  if (e === "click")
    return Ww(t);
}
function die(e, t) {
  if (e === "input" || e === "change")
    return Ww(t);
}
function pie(e, t) {
  return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
}
var pi = typeof Object.is == "function" ? Object.is : pie;
function tp(e, t) {
  if (pi(e, t))
    return !0;
  if (typeof e != "object" || e === null || typeof t != "object" || t === null)
    return !1;
  var n = Object.keys(e), r = Object.keys(t);
  if (n.length !== r.length)
    return !1;
  for (r = 0; r < n.length; r++) {
    var o = n[r];
    if (!T0.call(t, o) || !pi(e[o], t[o]))
      return !1;
  }
  return !0;
}
function e1(e) {
  for (; e && e.firstChild; )
    e = e.firstChild;
  return e;
}
function t1(e, t) {
  var n = e1(e);
  e = 0;
  for (var r; n; ) {
    if (n.nodeType === 3) {
      if (r = e + n.textContent.length, e <= t && r >= t)
        return { node: n, offset: t - e };
      e = r;
    }
    e: {
      for (; n; ) {
        if (n.nextSibling) {
          n = n.nextSibling;
          break e;
        }
        n = n.parentNode;
      }
      n = void 0;
    }
    n = e1(n);
  }
}
function l6(e, t) {
  return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? l6(e, t.parentNode) : "contains" in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1;
}
function s6() {
  for (var e = window, t = ay(); t instanceof e.HTMLIFrameElement; ) {
    try {
      var n = typeof t.contentWindow.location.href == "string";
    } catch {
      n = !1;
    }
    if (n)
      e = t.contentWindow;
    else
      break;
    t = ay(e.document);
  }
  return t;
}
function sC(e) {
  var t = e && e.nodeName && e.nodeName.toLowerCase();
  return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true");
}
function mie(e) {
  var t = s6(), n = e.focusedElem, r = e.selectionRange;
  if (t !== n && n && n.ownerDocument && l6(n.ownerDocument.documentElement, n)) {
    if (r !== null && sC(n)) {
      if (t = r.start, e = r.end, e === void 0 && (e = t), "selectionStart" in n)
        n.selectionStart = t, n.selectionEnd = Math.min(e, n.value.length);
      else if (e = (t = n.ownerDocument || document) && t.defaultView || window, e.getSelection) {
        e = e.getSelection();
        var o = n.textContent.length, i = Math.min(r.start, o);
        r = r.end === void 0 ? i : Math.min(r.end, o), !e.extend && i > r && (o = r, r = i, i = o), o = t1(n, i);
        var a = t1(
          n,
          r
        );
        o && a && (e.rangeCount !== 1 || e.anchorNode !== o.node || e.anchorOffset !== o.offset || e.focusNode !== a.node || e.focusOffset !== a.offset) && (t = t.createRange(), t.setStart(o.node, o.offset), e.removeAllRanges(), i > r ? (e.addRange(t), e.extend(a.node, a.offset)) : (t.setEnd(a.node, a.offset), e.addRange(t)));
      }
    }
    for (t = [], e = n; e = e.parentNode; )
      e.nodeType === 1 && t.push({ element: e, left: e.scrollLeft, top: e.scrollTop });
    for (typeof n.focus == "function" && n.focus(), n = 0; n < t.length; n++)
      e = t[n], e.element.scrollLeft = e.left, e.element.scrollTop = e.top;
  }
}
var hie = _a && "documentMode" in document && 11 >= document.documentMode, Gu = null, Y0 = null, jd = null, X0 = !1;
function n1(e, t, n) {
  var r = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument;
  X0 || Gu == null || Gu !== ay(r) || (r = Gu, "selectionStart" in r && sC(r) ? r = { start: r.selectionStart, end: r.selectionEnd } : (r = (r.ownerDocument && r.ownerDocument.defaultView || window).getSelection(), r = { anchorNode: r.anchorNode, anchorOffset: r.anchorOffset, focusNode: r.focusNode, focusOffset: r.focusOffset }), jd && tp(jd, r) || (jd = r, r = py(Y0, "onSelect"), 0 < r.length && (t = new iC("onSelect", "select", null, t, n), e.push({ event: t, listeners: r }), t.target = Gu)));
}
function nh(e, t) {
  var n = {};
  return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit" + e] = "webkit" + t, n["Moz" + e] = "moz" + t, n;
}
var Ku = { animationend: nh("Animation", "AnimationEnd"), animationiteration: nh("Animation", "AnimationIteration"), animationstart: nh("Animation", "AnimationStart"), transitionend: nh("Transition", "TransitionEnd") }, Tk = {}, u6 = {};
_a && (u6 = document.createElement("div").style, "AnimationEvent" in window || (delete Ku.animationend.animation, delete Ku.animationiteration.animation, delete Ku.animationstart.animation), "TransitionEvent" in window || delete Ku.transitionend.transition);
function Vw(e) {
  if (Tk[e])
    return Tk[e];
  if (!Ku[e])
    return e;
  var t = Ku[e], n;
  for (n in t)
    if (t.hasOwnProperty(n) && n in u6)
      return Tk[e] = t[n];
  return e;
}
var c6 = Vw("animationend"), f6 = Vw("animationiteration"), d6 = Vw("animationstart"), p6 = Vw("transitionend"), m6 = /* @__PURE__ */ new Map(), r1 = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
function Wl(e, t) {
  m6.set(e, t), Gs(t, [e]);
}
for (var jk = 0; jk < r1.length; jk++) {
  var Nk = r1[jk], gie = Nk.toLowerCase(), yie = Nk[0].toUpperCase() + Nk.slice(1);
  Wl(gie, "on" + yie);
}
Wl(c6, "onAnimationEnd");
Wl(f6, "onAnimationIteration");
Wl(d6, "onAnimationStart");
Wl("dblclick", "onDoubleClick");
Wl("focusin", "onFocus");
Wl("focusout", "onBlur");
Wl(p6, "onTransitionEnd");
wc("onMouseEnter", ["mouseout", "mouseover"]);
wc("onMouseLeave", ["mouseout", "mouseover"]);
wc("onPointerEnter", ["pointerout", "pointerover"]);
wc("onPointerLeave", ["pointerout", "pointerover"]);
Gs("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
Gs("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));
Gs("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
Gs("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" "));
Gs("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" "));
Gs("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
var hd = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), vie = new Set("cancel close invalid load scroll toggle".split(" ").concat(hd));
function o1(e, t, n) {
  var r = e.type || "unknown-event";
  e.currentTarget = n, goe(r, t, void 0, e), e.currentTarget = null;
}
function h6(e, t) {
  t = (t & 4) !== 0;
  for (var n = 0; n < e.length; n++) {
    var r = e[n], o = r.event;
    r = r.listeners;
    e: {
      var i = void 0;
      if (t)
        for (var a = r.length - 1; 0 <= a; a--) {
          var l = r[a], s = l.instance, c = l.currentTarget;
          if (l = l.listener, s !== i && o.isPropagationStopped())
            break e;
          o1(o, l, c), i = s;
        }
      else
        for (a = 0; a < r.length; a++) {
          if (l = r[a], s = l.instance, c = l.currentTarget, l = l.listener, s !== i && o.isPropagationStopped())
            break e;
          o1(o, l, c), i = s;
        }
    }
  }
  if (sy)
    throw e = V0, sy = !1, V0 = null, e;
}
function Yt(e, t) {
  var n = t[tO];
  n === void 0 && (n = t[tO] = /* @__PURE__ */ new Set());
  var r = e + "__bubble";
  n.has(r) || (g6(t, e, 2, !1), n.add(r));
}
function $k(e, t, n) {
  var r = 0;
  t && (r |= 4), g6(n, e, r, t);
}
var rh = "_reactListening" + Math.random().toString(36).slice(2);
function np(e) {
  if (!e[rh]) {
    e[rh] = !0, kF.forEach(function(n) {
      n !== "selectionchange" && (vie.has(n) || $k(n, !1, e), $k(n, !0, e));
    });
    var t = e.nodeType === 9 ? e : e.ownerDocument;
    t === null || t[rh] || (t[rh] = !0, $k("selectionchange", !1, t));
  }
}
function g6(e, t, n, r) {
  switch (JF(t)) {
    case 1:
      var o = Noe;
      break;
    case 4:
      o = $oe;
      break;
    default:
      o = rC;
  }
  n = o.bind(null, t, n, e), o = void 0, !W0 || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (o = !0), r ? o !== void 0 ? e.addEventListener(t, n, { capture: !0, passive: o }) : e.addEventListener(t, n, !0) : o !== void 0 ? e.addEventListener(t, n, { passive: o }) : e.addEventListener(t, n, !1);
}
function Ik(e, t, n, r, o) {
  var i = r;
  if (!(t & 1) && !(t & 2) && r !== null)
    e:
      for (; ; ) {
        if (r === null)
          return;
        var a = r.tag;
        if (a === 3 || a === 4) {
          var l = r.stateNode.containerInfo;
          if (l === o || l.nodeType === 8 && l.parentNode === o)
            break;
          if (a === 4)
            for (a = r.return; a !== null; ) {
              var s = a.tag;
              if ((s === 3 || s === 4) && (s = a.stateNode.containerInfo, s === o || s.nodeType === 8 && s.parentNode === o))
                return;
              a = a.return;
            }
          for (; l !== null; ) {
            if (a = _s(l), a === null)
              return;
            if (s = a.tag, s === 5 || s === 6) {
              r = i = a;
              continue e;
            }
            l = l.parentNode;
          }
        }
        r = r.return;
      }
  FF(function() {
    var c = i, p = JE(n), f = [];
    e: {
      var m = m6.get(e);
      if (m !== void 0) {
        var h = iC, g = e;
        switch (e) {
          case "keypress":
            if (xg(n) === 0)
              break e;
          case "keydown":
          case "keyup":
            h = Koe;
            break;
          case "focusin":
            g = "focus", h = Ck;
            break;
          case "focusout":
            g = "blur", h = Ck;
            break;
          case "beforeblur":
          case "afterblur":
            h = Ck;
            break;
          case "click":
            if (n.button === 2)
              break e;
          case "auxclick":
          case "dblclick":
          case "mousedown":
          case "mousemove":
          case "mouseup":
          case "mouseout":
          case "mouseover":
          case "contextmenu":
            h = qj;
            break;
          case "drag":
          case "dragend":
          case "dragenter":
          case "dragexit":
          case "dragleave":
          case "dragover":
          case "dragstart":
          case "drop":
            h = zoe;
            break;
          case "touchcancel":
          case "touchend":
          case "touchmove":
          case "touchstart":
            h = Zoe;
            break;
          case c6:
          case f6:
          case d6:
            h = Foe;
            break;
          case p6:
            h = Joe;
            break;
          case "scroll":
            h = Ioe;
            break;
          case "wheel":
            h = tie;
            break;
          case "copy":
          case "cut":
          case "paste":
            h = Boe;
            break;
          case "gotpointercapture":
          case "lostpointercapture":
          case "pointercancel":
          case "pointerdown":
          case "pointermove":
          case "pointerout":
          case "pointerover":
          case "pointerup":
            h = Kj;
        }
        var v = (t & 4) !== 0, S = !v && e === "scroll", w = v ? m !== null ? m + "Capture" : null : m;
        v = [];
        for (var x = c, k; x !== null; ) {
          k = x;
          var E = k.stateNode;
          if (k.tag === 5 && E !== null && (k = E, w !== null && (E = Xd(x, w), E != null && v.push(rp(x, E, k)))), S)
            break;
          x = x.return;
        }
        0 < v.length && (m = new h(m, g, null, n, p), f.push({ event: m, listeners: v }));
      }
    }
    if (!(t & 7)) {
      e: {
        if (m = e === "mouseover" || e === "pointerover", h = e === "mouseout" || e === "pointerout", m && n !== U0 && (g = n.relatedTarget || n.fromElement) && (_s(g) || g[Oa]))
          break e;
        if ((h || m) && (m = p.window === p ? p : (m = p.ownerDocument) ? m.defaultView || m.parentWindow : window, h ? (g = n.relatedTarget || n.toElement, h = c, g = g ? _s(g) : null, g !== null && (S = Ks(g), g !== S || g.tag !== 5 && g.tag !== 6) && (g = null)) : (h = null, g = c), h !== g)) {
          if (v = qj, E = "onMouseLeave", w = "onMouseEnter", x = "mouse", (e === "pointerout" || e === "pointerover") && (v = Kj, E = "onPointerLeave", w = "onPointerEnter", x = "pointer"), S = h == null ? m : Yu(h), k = g == null ? m : Yu(g), m = new v(E, x + "leave", h, n, p), m.target = S, m.relatedTarget = k, E = null, _s(p) === c && (v = new v(w, x + "enter", g, n, p), v.target = k, v.relatedTarget = S, E = v), S = E, h && g)
            t: {
              for (v = h, w = g, x = 0, k = v; k; k = Ou(k))
                x++;
              for (k = 0, E = w; E; E = Ou(E))
                k++;
              for (; 0 < x - k; )
                v = Ou(v), x--;
              for (; 0 < k - x; )
                w = Ou(w), k--;
              for (; x--; ) {
                if (v === w || w !== null && v === w.alternate)
                  break t;
                v = Ou(v), w = Ou(w);
              }
              v = null;
            }
          else
            v = null;
          h !== null && i1(f, m, h, v, !1), g !== null && S !== null && i1(f, S, g, v, !0);
        }
      }
      e: {
        if (m = c ? Yu(c) : window, h = m.nodeName && m.nodeName.toLowerCase(), h === "select" || h === "input" && m.type === "file")
          var O = sie;
        else if (Zj(m))
          if (i6)
            O = die;
          else {
            O = cie;
            var C = uie;
          }
        else
          (h = m.nodeName) && h.toLowerCase() === "input" && (m.type === "checkbox" || m.type === "radio") && (O = fie);
        if (O && (O = O(e, c))) {
          o6(f, O, n, p);
          break e;
        }
        C && C(e, m, c), e === "focusout" && (C = m._wrapperState) && C.controlled && m.type === "number" && L0(m, "number", m.value);
      }
      switch (C = c ? Yu(c) : window, e) {
        case "focusin":
          (Zj(C) || C.contentEditable === "true") && (Gu = C, Y0 = c, jd = null);
          break;
        case "focusout":
          jd = Y0 = Gu = null;
          break;
        case "mousedown":
          X0 = !0;
          break;
        case "contextmenu":
        case "mouseup":
        case "dragend":
          X0 = !1, n1(f, n, p);
          break;
        case "selectionchange":
          if (hie)
            break;
        case "keydown":
        case "keyup":
          n1(f, n, p);
      }
      var R;
      if (lC)
        e: {
          switch (e) {
            case "compositionstart":
              var L = "onCompositionStart";
              break e;
            case "compositionend":
              L = "onCompositionEnd";
              break e;
            case "compositionupdate":
              L = "onCompositionUpdate";
              break e;
          }
          L = void 0;
        }
      else
        qu ? n6(e, n) && (L = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && (L = "onCompositionStart");
      L && (t6 && n.locale !== "ko" && (qu || L !== "onCompositionStart" ? L === "onCompositionEnd" && qu && (R = e6()) : (yl = p, oC = "value" in yl ? yl.value : yl.textContent, qu = !0)), C = py(c, L), 0 < C.length && (L = new Gj(L, e, null, n, p), f.push({ event: L, listeners: C }), R ? L.data = R : (R = r6(n), R !== null && (L.data = R)))), (R = rie ? oie(e, n) : iie(e, n)) && (c = py(c, "onBeforeInput"), 0 < c.length && (p = new Gj("onBeforeInput", "beforeinput", null, n, p), f.push({ event: p, listeners: c }), p.data = R));
    }
    h6(f, t);
  });
}
function rp(e, t, n) {
  return { instance: e, listener: t, currentTarget: n };
}
function py(e, t) {
  for (var n = t + "Capture", r = []; e !== null; ) {
    var o = e, i = o.stateNode;
    o.tag === 5 && i !== null && (o = i, i = Xd(e, n), i != null && r.unshift(rp(e, i, o)), i = Xd(e, t), i != null && r.push(rp(e, i, o))), e = e.return;
  }
  return r;
}
function Ou(e) {
  if (e === null)
    return null;
  do
    e = e.return;
  while (e && e.tag !== 5);
  return e || null;
}
function i1(e, t, n, r, o) {
  for (var i = t._reactName, a = []; n !== null && n !== r; ) {
    var l = n, s = l.alternate, c = l.stateNode;
    if (s !== null && s === r)
      break;
    l.tag === 5 && c !== null && (l = c, o ? (s = Xd(n, i), s != null && a.unshift(rp(n, s, l))) : o || (s = Xd(n, i), s != null && a.push(rp(n, s, l)))), n = n.return;
  }
  a.length !== 0 && e.push({ event: t, listeners: a });
}
var bie = /\r\n?/g, wie = /\u0000|\uFFFD/g;
function a1(e) {
  return (typeof e == "string" ? e : "" + e).replace(bie, `
`).replace(wie, "");
}
function oh(e, t, n) {
  if (t = a1(t), a1(e) !== t && n)
    throw Error(ge(425));
}
function my() {
}
var Z0 = null, Q0 = null;
function J0(e, t) {
  return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null;
}
var eO = typeof setTimeout == "function" ? setTimeout : void 0, xie = typeof clearTimeout == "function" ? clearTimeout : void 0, l1 = typeof Promise == "function" ? Promise : void 0, Sie = typeof queueMicrotask == "function" ? queueMicrotask : typeof l1 < "u" ? function(e) {
  return l1.resolve(null).then(e).catch(kie);
} : eO;
function kie(e) {
  setTimeout(function() {
    throw e;
  });
}
function Ak(e, t) {
  var n = t, r = 0;
  do {
    var o = n.nextSibling;
    if (e.removeChild(n), o && o.nodeType === 8)
      if (n = o.data, n === "/$") {
        if (r === 0) {
          e.removeChild(o), Jd(t);
          return;
        }
        r--;
      } else
        n !== "$" && n !== "$?" && n !== "$!" || r++;
    n = o;
  } while (n);
  Jd(t);
}
function Pl(e) {
  for (; e != null; e = e.nextSibling) {
    var t = e.nodeType;
    if (t === 1 || t === 3)
      break;
    if (t === 8) {
      if (t = e.data, t === "$" || t === "$!" || t === "$?")
        break;
      if (t === "/$")
        return null;
    }
  }
  return e;
}
function s1(e) {
  e = e.previousSibling;
  for (var t = 0; e; ) {
    if (e.nodeType === 8) {
      var n = e.data;
      if (n === "$" || n === "$!" || n === "$?") {
        if (t === 0)
          return e;
        t--;
      } else
        n === "/$" && t++;
    }
    e = e.previousSibling;
  }
  return null;
}
var Gc = Math.random().toString(36).slice(2), Li = "__reactFiber$" + Gc, op = "__reactProps$" + Gc, Oa = "__reactContainer$" + Gc, tO = "__reactEvents$" + Gc, _ie = "__reactListeners$" + Gc, Oie = "__reactHandles$" + Gc;
function _s(e) {
  var t = e[Li];
  if (t)
    return t;
  for (var n = e.parentNode; n; ) {
    if (t = n[Oa] || n[Li]) {
      if (n = t.alternate, t.child !== null || n !== null && n.child !== null)
        for (e = s1(e); e !== null; ) {
          if (n = e[Li])
            return n;
          e = s1(e);
        }
      return t;
    }
    e = n, n = e.parentNode;
  }
  return null;
}
function Tp(e) {
  return e = e[Li] || e[Oa], !e || e.tag !== 5 && e.tag !== 6 && e.tag !== 13 && e.tag !== 3 ? null : e;
}
function Yu(e) {
  if (e.tag === 5 || e.tag === 6)
    return e.stateNode;
  throw Error(ge(33));
}
function qw(e) {
  return e[op] || null;
}
var nO = [], Xu = -1;
function Vl(e) {
  return { current: e };
}
function Zt(e) {
  0 > Xu || (e.current = nO[Xu], nO[Xu] = null, Xu--);
}
function Vt(e, t) {
  Xu++, nO[Xu] = e.current, e.current = t;
}
var Dl = {}, cr = Vl(Dl), Fr = Vl(!1), Ls = Dl;
function xc(e, t) {
  var n = e.type.contextTypes;
  if (!n)
    return Dl;
  var r = e.stateNode;
  if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
    return r.__reactInternalMemoizedMaskedChildContext;
  var o = {}, i;
  for (i in n)
    o[i] = t[i];
  return r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = t, e.__reactInternalMemoizedMaskedChildContext = o), o;
}
function Mr(e) {
  return e = e.childContextTypes, e != null;
}
function hy() {
  Zt(Fr), Zt(cr);
}
function u1(e, t, n) {
  if (cr.current !== Dl)
    throw Error(ge(168));
  Vt(cr, t), Vt(Fr, n);
}
function y6(e, t, n) {
  var r = e.stateNode;
  if (t = t.childContextTypes, typeof r.getChildContext != "function")
    return n;
  r = r.getChildContext();
  for (var o in r)
    if (!(o in t))
      throw Error(ge(108, uoe(e) || "Unknown", o));
  return sn({}, n, r);
}
function gy(e) {
  return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || Dl, Ls = cr.current, Vt(cr, e), Vt(Fr, Fr.current), !0;
}
function c1(e, t, n) {
  var r = e.stateNode;
  if (!r)
    throw Error(ge(169));
  n ? (e = y6(e, t, Ls), r.__reactInternalMemoizedMergedChildContext = e, Zt(Fr), Zt(cr), Vt(cr, e)) : Zt(Fr), Vt(Fr, n);
}
var ha = null, Gw = !1, zk = !1;
function v6(e) {
  ha === null ? ha = [e] : ha.push(e);
}
function Eie(e) {
  Gw = !0, v6(e);
}
function ql() {
  if (!zk && ha !== null) {
    zk = !0;
    var e = 0, t = It;
    try {
      var n = ha;
      for (It = 1; e < n.length; e++) {
        var r = n[e];
        do
          r = r(!0);
        while (r !== null);
      }
      ha = null, Gw = !1;
    } catch (o) {
      throw ha !== null && (ha = ha.slice(e + 1)), HF(eC, ql), o;
    } finally {
      It = t, zk = !1;
    }
  }
  return null;
}
var Zu = [], Qu = 0, yy = null, vy = 0, zo = [], Lo = 0, Ds = null, va = 1, ba = "";
function ps(e, t) {
  Zu[Qu++] = vy, Zu[Qu++] = yy, yy = e, vy = t;
}
function b6(e, t, n) {
  zo[Lo++] = va, zo[Lo++] = ba, zo[Lo++] = Ds, Ds = e;
  var r = va;
  e = ba;
  var o = 32 - ci(r) - 1;
  r &= ~(1 << o), n += 1;
  var i = 32 - ci(t) + o;
  if (30 < i) {
    var a = o - o % 5;
    i = (r & (1 << a) - 1).toString(32), r >>= a, o -= a, va = 1 << 32 - ci(t) + o | n << o | r, ba = i + e;
  } else
    va = 1 << i | n << o | r, ba = e;
}
function uC(e) {
  e.return !== null && (ps(e, 1), b6(e, 1, 0));
}
function cC(e) {
  for (; e === yy; )
    yy = Zu[--Qu], Zu[Qu] = null, vy = Zu[--Qu], Zu[Qu] = null;
  for (; e === Ds; )
    Ds = zo[--Lo], zo[Lo] = null, ba = zo[--Lo], zo[Lo] = null, va = zo[--Lo], zo[Lo] = null;
}
var po = null, fo = null, Jt = !1, si = null;
function w6(e, t) {
  var n = Mo(5, null, null, 0);
  n.elementType = "DELETED", n.stateNode = t, n.return = e, t = e.deletions, t === null ? (e.deletions = [n], e.flags |= 16) : t.push(n);
}
function f1(e, t) {
  switch (e.tag) {
    case 5:
      var n = e.type;
      return t = t.nodeType !== 1 || n.toLowerCase() !== t.nodeName.toLowerCase() ? null : t, t !== null ? (e.stateNode = t, po = e, fo = Pl(t.firstChild), !0) : !1;
    case 6:
      return t = e.pendingProps === "" || t.nodeType !== 3 ? null : t, t !== null ? (e.stateNode = t, po = e, fo = null, !0) : !1;
    case 13:
      return t = t.nodeType !== 8 ? null : t, t !== null ? (n = Ds !== null ? { id: va, overflow: ba } : null, e.memoizedState = { dehydrated: t, treeContext: n, retryLane: 1073741824 }, n = Mo(18, null, null, 0), n.stateNode = t, n.return = e, e.child = n, po = e, fo = null, !0) : !1;
    default:
      return !1;
  }
}
function rO(e) {
  return (e.mode & 1) !== 0 && (e.flags & 128) === 0;
}
function oO(e) {
  if (Jt) {
    var t = fo;
    if (t) {
      var n = t;
      if (!f1(e, t)) {
        if (rO(e))
          throw Error(ge(418));
        t = Pl(n.nextSibling);
        var r = po;
        t && f1(e, t) ? w6(r, n) : (e.flags = e.flags & -4097 | 2, Jt = !1, po = e);
      }
    } else {
      if (rO(e))
        throw Error(ge(418));
      e.flags = e.flags & -4097 | 2, Jt = !1, po = e;
    }
  }
}
function d1(e) {
  for (e = e.return; e !== null && e.tag !== 5 && e.tag !== 3 && e.tag !== 13; )
    e = e.return;
  po = e;
}
function ih(e) {
  if (e !== po)
    return !1;
  if (!Jt)
    return d1(e), Jt = !0, !1;
  var t;
  if ((t = e.tag !== 3) && !(t = e.tag !== 5) && (t = e.type, t = t !== "head" && t !== "body" && !J0(e.type, e.memoizedProps)), t && (t = fo)) {
    if (rO(e))
      throw x6(), Error(ge(418));
    for (; t; )
      w6(e, t), t = Pl(t.nextSibling);
  }
  if (d1(e), e.tag === 13) {
    if (e = e.memoizedState, e = e !== null ? e.dehydrated : null, !e)
      throw Error(ge(317));
    e: {
      for (e = e.nextSibling, t = 0; e; ) {
        if (e.nodeType === 8) {
          var n = e.data;
          if (n === "/$") {
            if (t === 0) {
              fo = Pl(e.nextSibling);
              break e;
            }
            t--;
          } else
            n !== "$" && n !== "$!" && n !== "$?" || t++;
        }
        e = e.nextSibling;
      }
      fo = null;
    }
  } else
    fo = po ? Pl(e.stateNode.nextSibling) : null;
  return !0;
}
function x6() {
  for (var e = fo; e; )
    e = Pl(e.nextSibling);
}
function Sc() {
  fo = po = null, Jt = !1;
}
function fC(e) {
  si === null ? si = [e] : si.push(e);
}
var Cie = za.ReactCurrentBatchConfig;
function ai(e, t) {
  if (e && e.defaultProps) {
    t = sn({}, t), e = e.defaultProps;
    for (var n in e)
      t[n] === void 0 && (t[n] = e[n]);
    return t;
  }
  return t;
}
var by = Vl(null), wy = null, Ju = null, dC = null;
function pC() {
  dC = Ju = wy = null;
}
function mC(e) {
  var t = by.current;
  Zt(by), e._currentValue = t;
}
function iO(e, t, n) {
  for (; e !== null; ) {
    var r = e.alternate;
    if ((e.childLanes & t) !== t ? (e.childLanes |= t, r !== null && (r.childLanes |= t)) : r !== null && (r.childLanes & t) !== t && (r.childLanes |= t), e === n)
      break;
    e = e.return;
  }
}
function dc(e, t) {
  wy = e, dC = Ju = null, e = e.dependencies, e !== null && e.firstContext !== null && (e.lanes & t && (Dr = !0), e.firstContext = null);
}
function Ho(e) {
  var t = e._currentValue;
  if (dC !== e)
    if (e = { context: e, memoizedValue: t, next: null }, Ju === null) {
      if (wy === null)
        throw Error(ge(308));
      Ju = e, wy.dependencies = { lanes: 0, firstContext: e };
    } else
      Ju = Ju.next = e;
  return t;
}
var Os = null;
function hC(e) {
  Os === null ? Os = [e] : Os.push(e);
}
function S6(e, t, n, r) {
  var o = t.interleaved;
  return o === null ? (n.next = n, hC(t)) : (n.next = o.next, o.next = n), t.interleaved = n, Ea(e, r);
}
function Ea(e, t) {
  e.lanes |= t;
  var n = e.alternate;
  for (n !== null && (n.lanes |= t), n = e, e = e.return; e !== null; )
    e.childLanes |= t, n = e.alternate, n !== null && (n.childLanes |= t), n = e, e = e.return;
  return n.tag === 3 ? n.stateNode : null;
}
var ml = !1;
function gC(e) {
  e.updateQueue = { baseState: e.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
}
function k6(e, t) {
  e = e.updateQueue, t.updateQueue === e && (t.updateQueue = { baseState: e.baseState, firstBaseUpdate: e.firstBaseUpdate, lastBaseUpdate: e.lastBaseUpdate, shared: e.shared, effects: e.effects });
}
function Sa(e, t) {
  return { eventTime: e, lane: t, tag: 0, payload: null, callback: null, next: null };
}
function Rl(e, t, n) {
  var r = e.updateQueue;
  if (r === null)
    return null;
  if (r = r.shared, xt & 2) {
    var o = r.pending;
    return o === null ? t.next = t : (t.next = o.next, o.next = t), r.pending = t, Ea(e, n);
  }
  return o = r.interleaved, o === null ? (t.next = t, hC(r)) : (t.next = o.next, o.next = t), r.interleaved = t, Ea(e, n);
}
function Sg(e, t, n) {
  if (t = t.updateQueue, t !== null && (t = t.shared, (n & 4194240) !== 0)) {
    var r = t.lanes;
    r &= e.pendingLanes, n |= r, t.lanes = n, tC(e, n);
  }
}
function p1(e, t) {
  var n = e.updateQueue, r = e.alternate;
  if (r !== null && (r = r.updateQueue, n === r)) {
    var o = null, i = null;
    if (n = n.firstBaseUpdate, n !== null) {
      do {
        var a = { eventTime: n.eventTime, lane: n.lane, tag: n.tag, payload: n.payload, callback: n.callback, next: null };
        i === null ? o = i = a : i = i.next = a, n = n.next;
      } while (n !== null);
      i === null ? o = i = t : i = i.next = t;
    } else
      o = i = t;
    n = { baseState: r.baseState, firstBaseUpdate: o, lastBaseUpdate: i, shared: r.shared, effects: r.effects }, e.updateQueue = n;
    return;
  }
  e = n.lastBaseUpdate, e === null ? n.firstBaseUpdate = t : e.next = t, n.lastBaseUpdate = t;
}
function xy(e, t, n, r) {
  var o = e.updateQueue;
  ml = !1;
  var i = o.firstBaseUpdate, a = o.lastBaseUpdate, l = o.shared.pending;
  if (l !== null) {
    o.shared.pending = null;
    var s = l, c = s.next;
    s.next = null, a === null ? i = c : a.next = c, a = s;
    var p = e.alternate;
    p !== null && (p = p.updateQueue, l = p.lastBaseUpdate, l !== a && (l === null ? p.firstBaseUpdate = c : l.next = c, p.lastBaseUpdate = s));
  }
  if (i !== null) {
    var f = o.baseState;
    a = 0, p = c = s = null, l = i;
    do {
      var m = l.lane, h = l.eventTime;
      if ((r & m) === m) {
        p !== null && (p = p.next = {
          eventTime: h,
          lane: 0,
          tag: l.tag,
          payload: l.payload,
          callback: l.callback,
          next: null
        });
        e: {
          var g = e, v = l;
          switch (m = t, h = n, v.tag) {
            case 1:
              if (g = v.payload, typeof g == "function") {
                f = g.call(h, f, m);
                break e;
              }
              f = g;
              break e;
            case 3:
              g.flags = g.flags & -65537 | 128;
            case 0:
              if (g = v.payload, m = typeof g == "function" ? g.call(h, f, m) : g, m == null)
                break e;
              f = sn({}, f, m);
              break e;
            case 2:
              ml = !0;
          }
        }
        l.callback !== null && l.lane !== 0 && (e.flags |= 64, m = o.effects, m === null ? o.effects = [l] : m.push(l));
      } else
        h = { eventTime: h, lane: m, tag: l.tag, payload: l.payload, callback: l.callback, next: null }, p === null ? (c = p = h, s = f) : p = p.next = h, a |= m;
      if (l = l.next, l === null) {
        if (l = o.shared.pending, l === null)
          break;
        m = l, l = m.next, m.next = null, o.lastBaseUpdate = m, o.shared.pending = null;
      }
    } while (!0);
    if (p === null && (s = f), o.baseState = s, o.firstBaseUpdate = c, o.lastBaseUpdate = p, t = o.shared.interleaved, t !== null) {
      o = t;
      do
        a |= o.lane, o = o.next;
      while (o !== t);
    } else
      i === null && (o.shared.lanes = 0);
    Ms |= a, e.lanes = a, e.memoizedState = f;
  }
}
function m1(e, t, n) {
  if (e = t.effects, t.effects = null, e !== null)
    for (t = 0; t < e.length; t++) {
      var r = e[t], o = r.callback;
      if (o !== null) {
        if (r.callback = null, r = n, typeof o != "function")
          throw Error(ge(191, o));
        o.call(r);
      }
    }
}
var _6 = new SF.Component().refs;
function aO(e, t, n, r) {
  t = e.memoizedState, n = n(r, t), n = n == null ? t : sn({}, t, n), e.memoizedState = n, e.lanes === 0 && (e.updateQueue.baseState = n);
}
var Kw = { isMounted: function(e) {
  return (e = e._reactInternals) ? Ks(e) === e : !1;
}, enqueueSetState: function(e, t, n) {
  e = e._reactInternals;
  var r = Sr(), o = jl(e), i = Sa(r, o);
  i.payload = t, n != null && (i.callback = n), t = Rl(e, i, o), t !== null && (fi(t, e, o, r), Sg(t, e, o));
}, enqueueReplaceState: function(e, t, n) {
  e = e._reactInternals;
  var r = Sr(), o = jl(e), i = Sa(r, o);
  i.tag = 1, i.payload = t, n != null && (i.callback = n), t = Rl(e, i, o), t !== null && (fi(t, e, o, r), Sg(t, e, o));
}, enqueueForceUpdate: function(e, t) {
  e = e._reactInternals;
  var n = Sr(), r = jl(e), o = Sa(n, r);
  o.tag = 2, t != null && (o.callback = t), t = Rl(e, o, r), t !== null && (fi(t, e, r, n), Sg(t, e, r));
} };
function h1(e, t, n, r, o, i, a) {
  return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, i, a) : t.prototype && t.prototype.isPureReactComponent ? !tp(n, r) || !tp(o, i) : !0;
}
function O6(e, t, n) {
  var r = !1, o = Dl, i = t.contextType;
  return typeof i == "object" && i !== null ? i = Ho(i) : (o = Mr(t) ? Ls : cr.current, r = t.contextTypes, i = (r = r != null) ? xc(e, o) : Dl), t = new t(n, i), e.memoizedState = t.state !== null && t.state !== void 0 ? t.state : null, t.updater = Kw, e.stateNode = t, t._reactInternals = e, r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = o, e.__reactInternalMemoizedMaskedChildContext = i), t;
}
function g1(e, t, n, r) {
  e = t.state, typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(n, r), typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(n, r), t.state !== e && Kw.enqueueReplaceState(t, t.state, null);
}
function lO(e, t, n, r) {
  var o = e.stateNode;
  o.props = n, o.state = e.memoizedState, o.refs = _6, gC(e);
  var i = t.contextType;
  typeof i == "object" && i !== null ? o.context = Ho(i) : (i = Mr(t) ? Ls : cr.current, o.context = xc(e, i)), o.state = e.memoizedState, i = t.getDerivedStateFromProps, typeof i == "function" && (aO(e, t, i, n), o.state = e.memoizedState), typeof t.getDerivedStateFromProps == "function" || typeof o.getSnapshotBeforeUpdate == "function" || typeof o.UNSAFE_componentWillMount != "function" && typeof o.componentWillMount != "function" || (t = o.state, typeof o.componentWillMount == "function" && o.componentWillMount(), typeof o.UNSAFE_componentWillMount == "function" && o.UNSAFE_componentWillMount(), t !== o.state && Kw.enqueueReplaceState(o, o.state, null), xy(e, n, o, r), o.state = e.memoizedState), typeof o.componentDidMount == "function" && (e.flags |= 4194308);
}
function Bf(e, t, n) {
  if (e = n.ref, e !== null && typeof e != "function" && typeof e != "object") {
    if (n._owner) {
      if (n = n._owner, n) {
        if (n.tag !== 1)
          throw Error(ge(309));
        var r = n.stateNode;
      }
      if (!r)
        throw Error(ge(147, e));
      var o = r, i = "" + e;
      return t !== null && t.ref !== null && typeof t.ref == "function" && t.ref._stringRef === i ? t.ref : (t = function(a) {
        var l = o.refs;
        l === _6 && (l = o.refs = {}), a === null ? delete l[i] : l[i] = a;
      }, t._stringRef = i, t);
    }
    if (typeof e != "string")
      throw Error(ge(284));
    if (!n._owner)
      throw Error(ge(290, e));
  }
  return e;
}
function ah(e, t) {
  throw e = Object.prototype.toString.call(t), Error(ge(31, e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e));
}
function y1(e) {
  var t = e._init;
  return t(e._payload);
}
function E6(e) {
  function t(w, x) {
    if (e) {
      var k = w.deletions;
      k === null ? (w.deletions = [x], w.flags |= 16) : k.push(x);
    }
  }
  function n(w, x) {
    if (!e)
      return null;
    for (; x !== null; )
      t(w, x), x = x.sibling;
    return null;
  }
  function r(w, x) {
    for (w = /* @__PURE__ */ new Map(); x !== null; )
      x.key !== null ? w.set(x.key, x) : w.set(x.index, x), x = x.sibling;
    return w;
  }
  function o(w, x) {
    return w = Nl(w, x), w.index = 0, w.sibling = null, w;
  }
  function i(w, x, k) {
    return w.index = k, e ? (k = w.alternate, k !== null ? (k = k.index, k < x ? (w.flags |= 2, x) : k) : (w.flags |= 2, x)) : (w.flags |= 1048576, x);
  }
  function a(w) {
    return e && w.alternate === null && (w.flags |= 2), w;
  }
  function l(w, x, k, E) {
    return x === null || x.tag !== 6 ? (x = Hk(k, w.mode, E), x.return = w, x) : (x = o(x, k), x.return = w, x);
  }
  function s(w, x, k, E) {
    var O = k.type;
    return O === Vu ? p(w, x, k.props.children, E, k.key) : x !== null && (x.elementType === O || typeof O == "object" && O !== null && O.$$typeof === pl && y1(O) === x.type) ? (E = o(x, k.props), E.ref = Bf(w, x, k), E.return = w, E) : (E = Pg(k.type, k.key, k.props, null, w.mode, E), E.ref = Bf(w, x, k), E.return = w, E);
  }
  function c(w, x, k, E) {
    return x === null || x.tag !== 4 || x.stateNode.containerInfo !== k.containerInfo || x.stateNode.implementation !== k.implementation ? (x = Wk(k, w.mode, E), x.return = w, x) : (x = o(x, k.children || []), x.return = w, x);
  }
  function p(w, x, k, E, O) {
    return x === null || x.tag !== 7 ? (x = $s(k, w.mode, E, O), x.return = w, x) : (x = o(x, k), x.return = w, x);
  }
  function f(w, x, k) {
    if (typeof x == "string" && x !== "" || typeof x == "number")
      return x = Hk("" + x, w.mode, k), x.return = w, x;
    if (typeof x == "object" && x !== null) {
      switch (x.$$typeof) {
        case Ym:
          return k = Pg(x.type, x.key, x.props, null, w.mode, k), k.ref = Bf(w, null, x), k.return = w, k;
        case Wu:
          return x = Wk(x, w.mode, k), x.return = w, x;
        case pl:
          var E = x._init;
          return f(w, E(x._payload), k);
      }
      if (pd(x) || zf(x))
        return x = $s(x, w.mode, k, null), x.return = w, x;
      ah(w, x);
    }
    return null;
  }
  function m(w, x, k, E) {
    var O = x !== null ? x.key : null;
    if (typeof k == "string" && k !== "" || typeof k == "number")
      return O !== null ? null : l(w, x, "" + k, E);
    if (typeof k == "object" && k !== null) {
      switch (k.$$typeof) {
        case Ym:
          return k.key === O ? s(w, x, k, E) : null;
        case Wu:
          return k.key === O ? c(w, x, k, E) : null;
        case pl:
          return O = k._init, m(
            w,
            x,
            O(k._payload),
            E
          );
      }
      if (pd(k) || zf(k))
        return O !== null ? null : p(w, x, k, E, null);
      ah(w, k);
    }
    return null;
  }
  function h(w, x, k, E, O) {
    if (typeof E == "string" && E !== "" || typeof E == "number")
      return w = w.get(k) || null, l(x, w, "" + E, O);
    if (typeof E == "object" && E !== null) {
      switch (E.$$typeof) {
        case Ym:
          return w = w.get(E.key === null ? k : E.key) || null, s(x, w, E, O);
        case Wu:
          return w = w.get(E.key === null ? k : E.key) || null, c(x, w, E, O);
        case pl:
          var C = E._init;
          return h(w, x, k, C(E._payload), O);
      }
      if (pd(E) || zf(E))
        return w = w.get(k) || null, p(x, w, E, O, null);
      ah(x, E);
    }
    return null;
  }
  function g(w, x, k, E) {
    for (var O = null, C = null, R = x, L = x = 0, D = null; R !== null && L < k.length; L++) {
      R.index > L ? (D = R, R = null) : D = R.sibling;
      var N = m(w, R, k[L], E);
      if (N === null) {
        R === null && (R = D);
        break;
      }
      e && R && N.alternate === null && t(w, R), x = i(N, x, L), C === null ? O = N : C.sibling = N, C = N, R = D;
    }
    if (L === k.length)
      return n(w, R), Jt && ps(w, L), O;
    if (R === null) {
      for (; L < k.length; L++)
        R = f(w, k[L], E), R !== null && (x = i(R, x, L), C === null ? O = R : C.sibling = R, C = R);
      return Jt && ps(w, L), O;
    }
    for (R = r(w, R); L < k.length; L++)
      D = h(R, w, L, k[L], E), D !== null && (e && D.alternate !== null && R.delete(D.key === null ? L : D.key), x = i(D, x, L), C === null ? O = D : C.sibling = D, C = D);
    return e && R.forEach(function(H) {
      return t(w, H);
    }), Jt && ps(w, L), O;
  }
  function v(w, x, k, E) {
    var O = zf(k);
    if (typeof O != "function")
      throw Error(ge(150));
    if (k = O.call(k), k == null)
      throw Error(ge(151));
    for (var C = O = null, R = x, L = x = 0, D = null, N = k.next(); R !== null && !N.done; L++, N = k.next()) {
      R.index > L ? (D = R, R = null) : D = R.sibling;
      var H = m(w, R, N.value, E);
      if (H === null) {
        R === null && (R = D);
        break;
      }
      e && R && H.alternate === null && t(w, R), x = i(H, x, L), C === null ? O = H : C.sibling = H, C = H, R = D;
    }
    if (N.done)
      return n(
        w,
        R
      ), Jt && ps(w, L), O;
    if (R === null) {
      for (; !N.done; L++, N = k.next())
        N = f(w, N.value, E), N !== null && (x = i(N, x, L), C === null ? O = N : C.sibling = N, C = N);
      return Jt && ps(w, L), O;
    }
    for (R = r(w, R); !N.done; L++, N = k.next())
      N = h(R, w, L, N.value, E), N !== null && (e && N.alternate !== null && R.delete(N.key === null ? L : N.key), x = i(N, x, L), C === null ? O = N : C.sibling = N, C = N);
    return e && R.forEach(function(B) {
      return t(w, B);
    }), Jt && ps(w, L), O;
  }
  function S(w, x, k, E) {
    if (typeof k == "object" && k !== null && k.type === Vu && k.key === null && (k = k.props.children), typeof k == "object" && k !== null) {
      switch (k.$$typeof) {
        case Ym:
          e: {
            for (var O = k.key, C = x; C !== null; ) {
              if (C.key === O) {
                if (O = k.type, O === Vu) {
                  if (C.tag === 7) {
                    n(w, C.sibling), x = o(C, k.props.children), x.return = w, w = x;
                    break e;
                  }
                } else if (C.elementType === O || typeof O == "object" && O !== null && O.$$typeof === pl && y1(O) === C.type) {
                  n(w, C.sibling), x = o(C, k.props), x.ref = Bf(w, C, k), x.return = w, w = x;
                  break e;
                }
                n(w, C);
                break;
              } else
                t(w, C);
              C = C.sibling;
            }
            k.type === Vu ? (x = $s(k.props.children, w.mode, E, k.key), x.return = w, w = x) : (E = Pg(k.type, k.key, k.props, null, w.mode, E), E.ref = Bf(w, x, k), E.return = w, w = E);
          }
          return a(w);
        case Wu:
          e: {
            for (C = k.key; x !== null; ) {
              if (x.key === C)
                if (x.tag === 4 && x.stateNode.containerInfo === k.containerInfo && x.stateNode.implementation === k.implementation) {
                  n(w, x.sibling), x = o(x, k.children || []), x.return = w, w = x;
                  break e;
                } else {
                  n(w, x);
                  break;
                }
              else
                t(w, x);
              x = x.sibling;
            }
            x = Wk(k, w.mode, E), x.return = w, w = x;
          }
          return a(w);
        case pl:
          return C = k._init, S(w, x, C(k._payload), E);
      }
      if (pd(k))
        return g(w, x, k, E);
      if (zf(k))
        return v(w, x, k, E);
      ah(w, k);
    }
    return typeof k == "string" && k !== "" || typeof k == "number" ? (k = "" + k, x !== null && x.tag === 6 ? (n(w, x.sibling), x = o(x, k), x.return = w, w = x) : (n(w, x), x = Hk(k, w.mode, E), x.return = w, w = x), a(w)) : n(w, x);
  }
  return S;
}
var kc = E6(!0), C6 = E6(!1), jp = {}, qi = Vl(jp), ip = Vl(jp), ap = Vl(jp);
function Es(e) {
  if (e === jp)
    throw Error(ge(174));
  return e;
}
function yC(e, t) {
  switch (Vt(ap, t), Vt(ip, e), Vt(qi, jp), e = t.nodeType, e) {
    case 9:
    case 11:
      t = (t = t.documentElement) ? t.namespaceURI : F0(null, "");
      break;
    default:
      e = e === 8 ? t.parentNode : t, t = e.namespaceURI || null, e = e.tagName, t = F0(t, e);
  }
  Zt(qi), Vt(qi, t);
}
function _c() {
  Zt(qi), Zt(ip), Zt(ap);
}
function P6(e) {
  Es(ap.current);
  var t = Es(qi.current), n = F0(t, e.type);
  t !== n && (Vt(ip, e), Vt(qi, n));
}
function vC(e) {
  ip.current === e && (Zt(qi), Zt(ip));
}
var rn = Vl(0);
function Sy(e) {
  for (var t = e; t !== null; ) {
    if (t.tag === 13) {
      var n = t.memoizedState;
      if (n !== null && (n = n.dehydrated, n === null || n.data === "$?" || n.data === "$!"))
        return t;
    } else if (t.tag === 19 && t.memoizedProps.revealOrder !== void 0) {
      if (t.flags & 128)
        return t;
    } else if (t.child !== null) {
      t.child.return = t, t = t.child;
      continue;
    }
    if (t === e)
      break;
    for (; t.sibling === null; ) {
      if (t.return === null || t.return === e)
        return null;
      t = t.return;
    }
    t.sibling.return = t.return, t = t.sibling;
  }
  return null;
}
var Lk = [];
function bC() {
  for (var e = 0; e < Lk.length; e++)
    Lk[e]._workInProgressVersionPrimary = null;
  Lk.length = 0;
}
var kg = za.ReactCurrentDispatcher, Dk = za.ReactCurrentBatchConfig, Fs = 0, ln = null, Rn = null, $n = null, ky = !1, Nd = !1, lp = 0, Pie = 0;
function Jn() {
  throw Error(ge(321));
}
function wC(e, t) {
  if (t === null)
    return !1;
  for (var n = 0; n < t.length && n < e.length; n++)
    if (!pi(e[n], t[n]))
      return !1;
  return !0;
}
function xC(e, t, n, r, o, i) {
  if (Fs = i, ln = t, t.memoizedState = null, t.updateQueue = null, t.lanes = 0, kg.current = e === null || e.memoizedState === null ? Nie : $ie, e = n(r, o), Nd) {
    i = 0;
    do {
      if (Nd = !1, lp = 0, 25 <= i)
        throw Error(ge(301));
      i += 1, $n = Rn = null, t.updateQueue = null, kg.current = Iie, e = n(r, o);
    } while (Nd);
  }
  if (kg.current = _y, t = Rn !== null && Rn.next !== null, Fs = 0, $n = Rn = ln = null, ky = !1, t)
    throw Error(ge(300));
  return e;
}
function SC() {
  var e = lp !== 0;
  return lp = 0, e;
}
function Ti() {
  var e = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
  return $n === null ? ln.memoizedState = $n = e : $n = $n.next = e, $n;
}
function Wo() {
  if (Rn === null) {
    var e = ln.alternate;
    e = e !== null ? e.memoizedState : null;
  } else
    e = Rn.next;
  var t = $n === null ? ln.memoizedState : $n.next;
  if (t !== null)
    $n = t, Rn = e;
  else {
    if (e === null)
      throw Error(ge(310));
    Rn = e, e = { memoizedState: Rn.memoizedState, baseState: Rn.baseState, baseQueue: Rn.baseQueue, queue: Rn.queue, next: null }, $n === null ? ln.memoizedState = $n = e : $n = $n.next = e;
  }
  return $n;
}
function sp(e, t) {
  return typeof t == "function" ? t(e) : t;
}
function Fk(e) {
  var t = Wo(), n = t.queue;
  if (n === null)
    throw Error(ge(311));
  n.lastRenderedReducer = e;
  var r = Rn, o = r.baseQueue, i = n.pending;
  if (i !== null) {
    if (o !== null) {
      var a = o.next;
      o.next = i.next, i.next = a;
    }
    r.baseQueue = o = i, n.pending = null;
  }
  if (o !== null) {
    i = o.next, r = r.baseState;
    var l = a = null, s = null, c = i;
    do {
      var p = c.lane;
      if ((Fs & p) === p)
        s !== null && (s = s.next = { lane: 0, action: c.action, hasEagerState: c.hasEagerState, eagerState: c.eagerState, next: null }), r = c.hasEagerState ? c.eagerState : e(r, c.action);
      else {
        var f = {
          lane: p,
          action: c.action,
          hasEagerState: c.hasEagerState,
          eagerState: c.eagerState,
          next: null
        };
        s === null ? (l = s = f, a = r) : s = s.next = f, ln.lanes |= p, Ms |= p;
      }
      c = c.next;
    } while (c !== null && c !== i);
    s === null ? a = r : s.next = l, pi(r, t.memoizedState) || (Dr = !0), t.memoizedState = r, t.baseState = a, t.baseQueue = s, n.lastRenderedState = r;
  }
  if (e = n.interleaved, e !== null) {
    o = e;
    do
      i = o.lane, ln.lanes |= i, Ms |= i, o = o.next;
    while (o !== e);
  } else
    o === null && (n.lanes = 0);
  return [t.memoizedState, n.dispatch];
}
function Mk(e) {
  var t = Wo(), n = t.queue;
  if (n === null)
    throw Error(ge(311));
  n.lastRenderedReducer = e;
  var r = n.dispatch, o = n.pending, i = t.memoizedState;
  if (o !== null) {
    n.pending = null;
    var a = o = o.next;
    do
      i = e(i, a.action), a = a.next;
    while (a !== o);
    pi(i, t.memoizedState) || (Dr = !0), t.memoizedState = i, t.baseQueue === null && (t.baseState = i), n.lastRenderedState = i;
  }
  return [i, r];
}
function R6() {
}
function T6(e, t) {
  var n = ln, r = Wo(), o = t(), i = !pi(r.memoizedState, o);
  if (i && (r.memoizedState = o, Dr = !0), r = r.queue, kC($6.bind(null, n, r, e), [e]), r.getSnapshot !== t || i || $n !== null && $n.memoizedState.tag & 1) {
    if (n.flags |= 2048, up(9, N6.bind(null, n, r, o, t), void 0, null), In === null)
      throw Error(ge(349));
    Fs & 30 || j6(n, t, o);
  }
  return o;
}
function j6(e, t, n) {
  e.flags |= 16384, e = { getSnapshot: t, value: n }, t = ln.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ln.updateQueue = t, t.stores = [e]) : (n = t.stores, n === null ? t.stores = [e] : n.push(e));
}
function N6(e, t, n, r) {
  t.value = n, t.getSnapshot = r, I6(t) && A6(e);
}
function $6(e, t, n) {
  return n(function() {
    I6(t) && A6(e);
  });
}
function I6(e) {
  var t = e.getSnapshot;
  e = e.value;
  try {
    var n = t();
    return !pi(e, n);
  } catch {
    return !0;
  }
}
function A6(e) {
  var t = Ea(e, 1);
  t !== null && fi(t, e, 1, -1);
}
function v1(e) {
  var t = Ti();
  return typeof e == "function" && (e = e()), t.memoizedState = t.baseState = e, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: sp, lastRenderedState: e }, t.queue = e, e = e.dispatch = jie.bind(null, ln, e), [t.memoizedState, e];
}
function up(e, t, n, r) {
  return e = { tag: e, create: t, destroy: n, deps: r, next: null }, t = ln.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ln.updateQueue = t, t.lastEffect = e.next = e) : (n = t.lastEffect, n === null ? t.lastEffect = e.next = e : (r = n.next, n.next = e, e.next = r, t.lastEffect = e)), e;
}
function z6() {
  return Wo().memoizedState;
}
function _g(e, t, n, r) {
  var o = Ti();
  ln.flags |= e, o.memoizedState = up(1 | t, n, void 0, r === void 0 ? null : r);
}
function Yw(e, t, n, r) {
  var o = Wo();
  r = r === void 0 ? null : r;
  var i = void 0;
  if (Rn !== null) {
    var a = Rn.memoizedState;
    if (i = a.destroy, r !== null && wC(r, a.deps)) {
      o.memoizedState = up(t, n, i, r);
      return;
    }
  }
  ln.flags |= e, o.memoizedState = up(1 | t, n, i, r);
}
function b1(e, t) {
  return _g(8390656, 8, e, t);
}
function kC(e, t) {
  return Yw(2048, 8, e, t);
}
function L6(e, t) {
  return Yw(4, 2, e, t);
}
function D6(e, t) {
  return Yw(4, 4, e, t);
}
function F6(e, t) {
  if (typeof t == "function")
    return e = e(), t(e), function() {
      t(null);
    };
  if (t != null)
    return e = e(), t.current = e, function() {
      t.current = null;
    };
}
function M6(e, t, n) {
  return n = n != null ? n.concat([e]) : null, Yw(4, 4, F6.bind(null, t, e), n);
}
function _C() {
}
function B6(e, t) {
  var n = Wo();
  t = t === void 0 ? null : t;
  var r = n.memoizedState;
  return r !== null && t !== null && wC(t, r[1]) ? r[0] : (n.memoizedState = [e, t], e);
}
function U6(e, t) {
  var n = Wo();
  t = t === void 0 ? null : t;
  var r = n.memoizedState;
  return r !== null && t !== null && wC(t, r[1]) ? r[0] : (e = e(), n.memoizedState = [e, t], e);
}
function H6(e, t, n) {
  return Fs & 21 ? (pi(n, t) || (n = qF(), ln.lanes |= n, Ms |= n, e.baseState = !0), t) : (e.baseState && (e.baseState = !1, Dr = !0), e.memoizedState = n);
}
function Rie(e, t) {
  var n = It;
  It = n !== 0 && 4 > n ? n : 4, e(!0);
  var r = Dk.transition;
  Dk.transition = {};
  try {
    e(!1), t();
  } finally {
    It = n, Dk.transition = r;
  }
}
function W6() {
  return Wo().memoizedState;
}
function Tie(e, t, n) {
  var r = jl(e);
  if (n = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null }, V6(e))
    q6(t, n);
  else if (n = S6(e, t, n, r), n !== null) {
    var o = Sr();
    fi(n, e, r, o), G6(n, t, r);
  }
}
function jie(e, t, n) {
  var r = jl(e), o = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null };
  if (V6(e))
    q6(t, o);
  else {
    var i = e.alternate;
    if (e.lanes === 0 && (i === null || i.lanes === 0) && (i = t.lastRenderedReducer, i !== null))
      try {
        var a = t.lastRenderedState, l = i(a, n);
        if (o.hasEagerState = !0, o.eagerState = l, pi(l, a)) {
          var s = t.interleaved;
          s === null ? (o.next = o, hC(t)) : (o.next = s.next, s.next = o), t.interleaved = o;
          return;
        }
      } catch {
      } finally {
      }
    n = S6(e, t, o, r), n !== null && (o = Sr(), fi(n, e, r, o), G6(n, t, r));
  }
}
function V6(e) {
  var t = e.alternate;
  return e === ln || t !== null && t === ln;
}
function q6(e, t) {
  Nd = ky = !0;
  var n = e.pending;
  n === null ? t.next = t : (t.next = n.next, n.next = t), e.pending = t;
}
function G6(e, t, n) {
  if (n & 4194240) {
    var r = t.lanes;
    r &= e.pendingLanes, n |= r, t.lanes = n, tC(e, n);
  }
}
var _y = { readContext: Ho, useCallback: Jn, useContext: Jn, useEffect: Jn, useImperativeHandle: Jn, useInsertionEffect: Jn, useLayoutEffect: Jn, useMemo: Jn, useReducer: Jn, useRef: Jn, useState: Jn, useDebugValue: Jn, useDeferredValue: Jn, useTransition: Jn, useMutableSource: Jn, useSyncExternalStore: Jn, useId: Jn, unstable_isNewReconciler: !1 }, Nie = { readContext: Ho, useCallback: function(e, t) {
  return Ti().memoizedState = [e, t === void 0 ? null : t], e;
}, useContext: Ho, useEffect: b1, useImperativeHandle: function(e, t, n) {
  return n = n != null ? n.concat([e]) : null, _g(
    4194308,
    4,
    F6.bind(null, t, e),
    n
  );
}, useLayoutEffect: function(e, t) {
  return _g(4194308, 4, e, t);
}, useInsertionEffect: function(e, t) {
  return _g(4, 2, e, t);
}, useMemo: function(e, t) {
  var n = Ti();
  return t = t === void 0 ? null : t, e = e(), n.memoizedState = [e, t], e;
}, useReducer: function(e, t, n) {
  var r = Ti();
  return t = n !== void 0 ? n(t) : t, r.memoizedState = r.baseState = t, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: e, lastRenderedState: t }, r.queue = e, e = e.dispatch = Tie.bind(null, ln, e), [r.memoizedState, e];
}, useRef: function(e) {
  var t = Ti();
  return e = { current: e }, t.memoizedState = e;
}, useState: v1, useDebugValue: _C, useDeferredValue: function(e) {
  return Ti().memoizedState = e;
}, useTransition: function() {
  var e = v1(!1), t = e[0];
  return e = Rie.bind(null, e[1]), Ti().memoizedState = e, [t, e];
}, useMutableSource: function() {
}, useSyncExternalStore: function(e, t, n) {
  var r = ln, o = Ti();
  if (Jt) {
    if (n === void 0)
      throw Error(ge(407));
    n = n();
  } else {
    if (n = t(), In === null)
      throw Error(ge(349));
    Fs & 30 || j6(r, t, n);
  }
  o.memoizedState = n;
  var i = { value: n, getSnapshot: t };
  return o.queue = i, b1($6.bind(
    null,
    r,
    i,
    e
  ), [e]), r.flags |= 2048, up(9, N6.bind(null, r, i, n, t), void 0, null), n;
}, useId: function() {
  var e = Ti(), t = In.identifierPrefix;
  if (Jt) {
    var n = ba, r = va;
    n = (r & ~(1 << 32 - ci(r) - 1)).toString(32) + n, t = ":" + t + "R" + n, n = lp++, 0 < n && (t += "H" + n.toString(32)), t += ":";
  } else
    n = Pie++, t = ":" + t + "r" + n.toString(32) + ":";
  return e.memoizedState = t;
}, unstable_isNewReconciler: !1 }, $ie = {
  readContext: Ho,
  useCallback: B6,
  useContext: Ho,
  useEffect: kC,
  useImperativeHandle: M6,
  useInsertionEffect: L6,
  useLayoutEffect: D6,
  useMemo: U6,
  useReducer: Fk,
  useRef: z6,
  useState: function() {
    return Fk(sp);
  },
  useDebugValue: _C,
  useDeferredValue: function(e) {
    var t = Wo();
    return H6(t, Rn.memoizedState, e);
  },
  useTransition: function() {
    var e = Fk(sp)[0], t = Wo().memoizedState;
    return [e, t];
  },
  useMutableSource: R6,
  useSyncExternalStore: T6,
  useId: W6,
  unstable_isNewReconciler: !1
}, Iie = { readContext: Ho, useCallback: B6, useContext: Ho, useEffect: kC, useImperativeHandle: M6, useInsertionEffect: L6, useLayoutEffect: D6, useMemo: U6, useReducer: Mk, useRef: z6, useState: function() {
  return Mk(sp);
}, useDebugValue: _C, useDeferredValue: function(e) {
  var t = Wo();
  return Rn === null ? t.memoizedState = e : H6(t, Rn.memoizedState, e);
}, useTransition: function() {
  var e = Mk(sp)[0], t = Wo().memoizedState;
  return [e, t];
}, useMutableSource: R6, useSyncExternalStore: T6, useId: W6, unstable_isNewReconciler: !1 };
function Oc(e, t) {
  try {
    var n = "", r = t;
    do
      n += soe(r), r = r.return;
    while (r);
    var o = n;
  } catch (i) {
    o = `
Error generating stack: ` + i.message + `
` + i.stack;
  }
  return { value: e, source: t, stack: o, digest: null };
}
function Bk(e, t, n) {
  return { value: e, source: null, stack: n ?? null, digest: t ?? null };
}
function sO(e, t) {
  try {
    console.error(t.value);
  } catch (n) {
    setTimeout(function() {
      throw n;
    });
  }
}
var Aie = typeof WeakMap == "function" ? WeakMap : Map;
function K6(e, t, n) {
  n = Sa(-1, n), n.tag = 3, n.payload = { element: null };
  var r = t.value;
  return n.callback = function() {
    Ey || (Ey = !0, vO = r), sO(e, t);
  }, n;
}
function Y6(e, t, n) {
  n = Sa(-1, n), n.tag = 3;
  var r = e.type.getDerivedStateFromError;
  if (typeof r == "function") {
    var o = t.value;
    n.payload = function() {
      return r(o);
    }, n.callback = function() {
      sO(e, t);
    };
  }
  var i = e.stateNode;
  return i !== null && typeof i.componentDidCatch == "function" && (n.callback = function() {
    sO(e, t), typeof r != "function" && (Tl === null ? Tl = /* @__PURE__ */ new Set([this]) : Tl.add(this));
    var a = t.stack;
    this.componentDidCatch(t.value, { componentStack: a !== null ? a : "" });
  }), n;
}
function w1(e, t, n) {
  var r = e.pingCache;
  if (r === null) {
    r = e.pingCache = new Aie();
    var o = /* @__PURE__ */ new Set();
    r.set(t, o);
  } else
    o = r.get(t), o === void 0 && (o = /* @__PURE__ */ new Set(), r.set(t, o));
  o.has(n) || (o.add(n), e = Yie.bind(null, e, t, n), t.then(e, e));
}
function x1(e) {
  do {
    var t;
    if ((t = e.tag === 13) && (t = e.memoizedState, t = t !== null ? t.dehydrated !== null : !0), t)
      return e;
    e = e.return;
  } while (e !== null);
  return null;
}
function S1(e, t, n, r, o) {
  return e.mode & 1 ? (e.flags |= 65536, e.lanes = o, e) : (e === t ? e.flags |= 65536 : (e.flags |= 128, n.flags |= 131072, n.flags &= -52805, n.tag === 1 && (n.alternate === null ? n.tag = 17 : (t = Sa(-1, 1), t.tag = 2, Rl(n, t, 1))), n.lanes |= 1), e);
}
var zie = za.ReactCurrentOwner, Dr = !1;
function vr(e, t, n, r) {
  t.child = e === null ? C6(t, null, n, r) : kc(t, e.child, n, r);
}
function k1(e, t, n, r, o) {
  n = n.render;
  var i = t.ref;
  return dc(t, o), r = xC(e, t, n, r, i, o), n = SC(), e !== null && !Dr ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~o, Ca(e, t, o)) : (Jt && n && uC(t), t.flags |= 1, vr(e, t, r, o), t.child);
}
function _1(e, t, n, r, o) {
  if (e === null) {
    var i = n.type;
    return typeof i == "function" && !NC(i) && i.defaultProps === void 0 && n.compare === null && n.defaultProps === void 0 ? (t.tag = 15, t.type = i, X6(e, t, i, r, o)) : (e = Pg(n.type, null, r, t, t.mode, o), e.ref = t.ref, e.return = t, t.child = e);
  }
  if (i = e.child, !(e.lanes & o)) {
    var a = i.memoizedProps;
    if (n = n.compare, n = n !== null ? n : tp, n(a, r) && e.ref === t.ref)
      return Ca(e, t, o);
  }
  return t.flags |= 1, e = Nl(i, r), e.ref = t.ref, e.return = t, t.child = e;
}
function X6(e, t, n, r, o) {
  if (e !== null) {
    var i = e.memoizedProps;
    if (tp(i, r) && e.ref === t.ref)
      if (Dr = !1, t.pendingProps = r = i, (e.lanes & o) !== 0)
        e.flags & 131072 && (Dr = !0);
      else
        return t.lanes = e.lanes, Ca(e, t, o);
  }
  return uO(e, t, n, r, o);
}
function Z6(e, t, n) {
  var r = t.pendingProps, o = r.children, i = e !== null ? e.memoizedState : null;
  if (r.mode === "hidden")
    if (!(t.mode & 1))
      t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, Vt(tc, io), io |= n;
    else {
      if (!(n & 1073741824))
        return e = i !== null ? i.baseLanes | n : n, t.lanes = t.childLanes = 1073741824, t.memoizedState = { baseLanes: e, cachePool: null, transitions: null }, t.updateQueue = null, Vt(tc, io), io |= e, null;
      t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, r = i !== null ? i.baseLanes : n, Vt(tc, io), io |= r;
    }
  else
    i !== null ? (r = i.baseLanes | n, t.memoizedState = null) : r = n, Vt(tc, io), io |= r;
  return vr(e, t, o, n), t.child;
}
function Q6(e, t) {
  var n = t.ref;
  (e === null && n !== null || e !== null && e.ref !== n) && (t.flags |= 512, t.flags |= 2097152);
}
function uO(e, t, n, r, o) {
  var i = Mr(n) ? Ls : cr.current;
  return i = xc(t, i), dc(t, o), n = xC(e, t, n, r, i, o), r = SC(), e !== null && !Dr ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~o, Ca(e, t, o)) : (Jt && r && uC(t), t.flags |= 1, vr(e, t, n, o), t.child);
}
function O1(e, t, n, r, o) {
  if (Mr(n)) {
    var i = !0;
    gy(t);
  } else
    i = !1;
  if (dc(t, o), t.stateNode === null)
    Og(e, t), O6(t, n, r), lO(t, n, r, o), r = !0;
  else if (e === null) {
    var a = t.stateNode, l = t.memoizedProps;
    a.props = l;
    var s = a.context, c = n.contextType;
    typeof c == "object" && c !== null ? c = Ho(c) : (c = Mr(n) ? Ls : cr.current, c = xc(t, c));
    var p = n.getDerivedStateFromProps, f = typeof p == "function" || typeof a.getSnapshotBeforeUpdate == "function";
    f || typeof a.UNSAFE_componentWillReceiveProps != "function" && typeof a.componentWillReceiveProps != "function" || (l !== r || s !== c) && g1(t, a, r, c), ml = !1;
    var m = t.memoizedState;
    a.state = m, xy(t, r, a, o), s = t.memoizedState, l !== r || m !== s || Fr.current || ml ? (typeof p == "function" && (aO(t, n, p, r), s = t.memoizedState), (l = ml || h1(t, n, l, r, m, s, c)) ? (f || typeof a.UNSAFE_componentWillMount != "function" && typeof a.componentWillMount != "function" || (typeof a.componentWillMount == "function" && a.componentWillMount(), typeof a.UNSAFE_componentWillMount == "function" && a.UNSAFE_componentWillMount()), typeof a.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof a.componentDidMount == "function" && (t.flags |= 4194308), t.memoizedProps = r, t.memoizedState = s), a.props = r, a.state = s, a.context = c, r = l) : (typeof a.componentDidMount == "function" && (t.flags |= 4194308), r = !1);
  } else {
    a = t.stateNode, k6(e, t), l = t.memoizedProps, c = t.type === t.elementType ? l : ai(t.type, l), a.props = c, f = t.pendingProps, m = a.context, s = n.contextType, typeof s == "object" && s !== null ? s = Ho(s) : (s = Mr(n) ? Ls : cr.current, s = xc(t, s));
    var h = n.getDerivedStateFromProps;
    (p = typeof h == "function" || typeof a.getSnapshotBeforeUpdate == "function") || typeof a.UNSAFE_componentWillReceiveProps != "function" && typeof a.componentWillReceiveProps != "function" || (l !== f || m !== s) && g1(t, a, r, s), ml = !1, m = t.memoizedState, a.state = m, xy(t, r, a, o);
    var g = t.memoizedState;
    l !== f || m !== g || Fr.current || ml ? (typeof h == "function" && (aO(t, n, h, r), g = t.memoizedState), (c = ml || h1(t, n, c, r, m, g, s) || !1) ? (p || typeof a.UNSAFE_componentWillUpdate != "function" && typeof a.componentWillUpdate != "function" || (typeof a.componentWillUpdate == "function" && a.componentWillUpdate(r, g, s), typeof a.UNSAFE_componentWillUpdate == "function" && a.UNSAFE_componentWillUpdate(r, g, s)), typeof a.componentDidUpdate == "function" && (t.flags |= 4), typeof a.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof a.componentDidUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 4), typeof a.getSnapshotBeforeUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 1024), t.memoizedProps = r, t.memoizedState = g), a.props = r, a.state = g, a.context = s, r = c) : (typeof a.componentDidUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 4), typeof a.getSnapshotBeforeUpdate != "function" || l === e.memoizedProps && m === e.memoizedState || (t.flags |= 1024), r = !1);
  }
  return cO(e, t, n, r, i, o);
}
function cO(e, t, n, r, o, i) {
  Q6(e, t);
  var a = (t.flags & 128) !== 0;
  if (!r && !a)
    return o && c1(t, n, !1), Ca(e, t, i);
  r = t.stateNode, zie.current = t;
  var l = a && typeof n.getDerivedStateFromError != "function" ? null : r.render();
  return t.flags |= 1, e !== null && a ? (t.child = kc(t, e.child, null, i), t.child = kc(t, null, l, i)) : vr(e, t, l, i), t.memoizedState = r.state, o && c1(t, n, !0), t.child;
}
function J6(e) {
  var t = e.stateNode;
  t.pendingContext ? u1(e, t.pendingContext, t.pendingContext !== t.context) : t.context && u1(e, t.context, !1), yC(e, t.containerInfo);
}
function E1(e, t, n, r, o) {
  return Sc(), fC(o), t.flags |= 256, vr(e, t, n, r), t.child;
}
var fO = { dehydrated: null, treeContext: null, retryLane: 0 };
function dO(e) {
  return { baseLanes: e, cachePool: null, transitions: null };
}
function eM(e, t, n) {
  var r = t.pendingProps, o = rn.current, i = !1, a = (t.flags & 128) !== 0, l;
  if ((l = a) || (l = e !== null && e.memoizedState === null ? !1 : (o & 2) !== 0), l ? (i = !0, t.flags &= -129) : (e === null || e.memoizedState !== null) && (o |= 1), Vt(rn, o & 1), e === null)
    return oO(t), e = t.memoizedState, e !== null && (e = e.dehydrated, e !== null) ? (t.mode & 1 ? e.data === "$!" ? t.lanes = 8 : t.lanes = 1073741824 : t.lanes = 1, null) : (a = r.children, e = r.fallback, i ? (r = t.mode, i = t.child, a = { mode: "hidden", children: a }, !(r & 1) && i !== null ? (i.childLanes = 0, i.pendingProps = a) : i = Qw(a, r, 0, null), e = $s(e, r, n, null), i.return = t, e.return = t, i.sibling = e, t.child = i, t.child.memoizedState = dO(n), t.memoizedState = fO, e) : OC(t, a));
  if (o = e.memoizedState, o !== null && (l = o.dehydrated, l !== null))
    return Lie(e, t, a, r, l, o, n);
  if (i) {
    i = r.fallback, a = t.mode, o = e.child, l = o.sibling;
    var s = { mode: "hidden", children: r.children };
    return !(a & 1) && t.child !== o ? (r = t.child, r.childLanes = 0, r.pendingProps = s, t.deletions = null) : (r = Nl(o, s), r.subtreeFlags = o.subtreeFlags & 14680064), l !== null ? i = Nl(l, i) : (i = $s(i, a, n, null), i.flags |= 2), i.return = t, r.return = t, r.sibling = i, t.child = r, r = i, i = t.child, a = e.child.memoizedState, a = a === null ? dO(n) : { baseLanes: a.baseLanes | n, cachePool: null, transitions: a.transitions }, i.memoizedState = a, i.childLanes = e.childLanes & ~n, t.memoizedState = fO, r;
  }
  return i = e.child, e = i.sibling, r = Nl(i, { mode: "visible", children: r.children }), !(t.mode & 1) && (r.lanes = n), r.return = t, r.sibling = null, e !== null && (n = t.deletions, n === null ? (t.deletions = [e], t.flags |= 16) : n.push(e)), t.child = r, t.memoizedState = null, r;
}
function OC(e, t) {
  return t = Qw({ mode: "visible", children: t }, e.mode, 0, null), t.return = e, e.child = t;
}
function lh(e, t, n, r) {
  return r !== null && fC(r), kc(t, e.child, null, n), e = OC(t, t.pendingProps.children), e.flags |= 2, t.memoizedState = null, e;
}
function Lie(e, t, n, r, o, i, a) {
  if (n)
    return t.flags & 256 ? (t.flags &= -257, r = Bk(Error(ge(422))), lh(e, t, a, r)) : t.memoizedState !== null ? (t.child = e.child, t.flags |= 128, null) : (i = r.fallback, o = t.mode, r = Qw({ mode: "visible", children: r.children }, o, 0, null), i = $s(i, o, a, null), i.flags |= 2, r.return = t, i.return = t, r.sibling = i, t.child = r, t.mode & 1 && kc(t, e.child, null, a), t.child.memoizedState = dO(a), t.memoizedState = fO, i);
  if (!(t.mode & 1))
    return lh(e, t, a, null);
  if (o.data === "$!") {
    if (r = o.nextSibling && o.nextSibling.dataset, r)
      var l = r.dgst;
    return r = l, i = Error(ge(419)), r = Bk(i, r, void 0), lh(e, t, a, r);
  }
  if (l = (a & e.childLanes) !== 0, Dr || l) {
    if (r = In, r !== null) {
      switch (a & -a) {
        case 4:
          o = 2;
          break;
        case 16:
          o = 8;
          break;
        case 64:
        case 128:
        case 256:
        case 512:
        case 1024:
        case 2048:
        case 4096:
        case 8192:
        case 16384:
        case 32768:
        case 65536:
        case 131072:
        case 262144:
        case 524288:
        case 1048576:
        case 2097152:
        case 4194304:
        case 8388608:
        case 16777216:
        case 33554432:
        case 67108864:
          o = 32;
          break;
        case 536870912:
          o = 268435456;
          break;
        default:
          o = 0;
      }
      o = o & (r.suspendedLanes | a) ? 0 : o, o !== 0 && o !== i.retryLane && (i.retryLane = o, Ea(e, o), fi(r, e, o, -1));
    }
    return jC(), r = Bk(Error(ge(421))), lh(e, t, a, r);
  }
  return o.data === "$?" ? (t.flags |= 128, t.child = e.child, t = Xie.bind(null, e), o._reactRetry = t, null) : (e = i.treeContext, fo = Pl(o.nextSibling), po = t, Jt = !0, si = null, e !== null && (zo[Lo++] = va, zo[Lo++] = ba, zo[Lo++] = Ds, va = e.id, ba = e.overflow, Ds = t), t = OC(t, r.children), t.flags |= 4096, t);
}
function C1(e, t, n) {
  e.lanes |= t;
  var r = e.alternate;
  r !== null && (r.lanes |= t), iO(e.return, t, n);
}
function Uk(e, t, n, r, o) {
  var i = e.memoizedState;
  i === null ? e.memoizedState = { isBackwards: t, rendering: null, renderingStartTime: 0, last: r, tail: n, tailMode: o } : (i.isBackwards = t, i.rendering = null, i.renderingStartTime = 0, i.last = r, i.tail = n, i.tailMode = o);
}
function tM(e, t, n) {
  var r = t.pendingProps, o = r.revealOrder, i = r.tail;
  if (vr(e, t, r.children, n), r = rn.current, r & 2)
    r = r & 1 | 2, t.flags |= 128;
  else {
    if (e !== null && e.flags & 128)
      e:
        for (e = t.child; e !== null; ) {
          if (e.tag === 13)
            e.memoizedState !== null && C1(e, n, t);
          else if (e.tag === 19)
            C1(e, n, t);
          else if (e.child !== null) {
            e.child.return = e, e = e.child;
            continue;
          }
          if (e === t)
            break e;
          for (; e.sibling === null; ) {
            if (e.return === null || e.return === t)
              break e;
            e = e.return;
          }
          e.sibling.return = e.return, e = e.sibling;
        }
    r &= 1;
  }
  if (Vt(rn, r), !(t.mode & 1))
    t.memoizedState = null;
  else
    switch (o) {
      case "forwards":
        for (n = t.child, o = null; n !== null; )
          e = n.alternate, e !== null && Sy(e) === null && (o = n), n = n.sibling;
        n = o, n === null ? (o = t.child, t.child = null) : (o = n.sibling, n.sibling = null), Uk(t, !1, o, n, i);
        break;
      case "backwards":
        for (n = null, o = t.child, t.child = null; o !== null; ) {
          if (e = o.alternate, e !== null && Sy(e) === null) {
            t.child = o;
            break;
          }
          e = o.sibling, o.sibling = n, n = o, o = e;
        }
        Uk(t, !0, n, null, i);
        break;
      case "together":
        Uk(t, !1, null, null, void 0);
        break;
      default:
        t.memoizedState = null;
    }
  return t.child;
}
function Og(e, t) {
  !(t.mode & 1) && e !== null && (e.alternate = null, t.alternate = null, t.flags |= 2);
}
function Ca(e, t, n) {
  if (e !== null && (t.dependencies = e.dependencies), Ms |= t.lanes, !(n & t.childLanes))
    return null;
  if (e !== null && t.child !== e.child)
    throw Error(ge(153));
  if (t.child !== null) {
    for (e = t.child, n = Nl(e, e.pendingProps), t.child = n, n.return = t; e.sibling !== null; )
      e = e.sibling, n = n.sibling = Nl(e, e.pendingProps), n.return = t;
    n.sibling = null;
  }
  return t.child;
}
function Die(e, t, n) {
  switch (t.tag) {
    case 3:
      J6(t), Sc();
      break;
    case 5:
      P6(t);
      break;
    case 1:
      Mr(t.type) && gy(t);
      break;
    case 4:
      yC(t, t.stateNode.containerInfo);
      break;
    case 10:
      var r = t.type._context, o = t.memoizedProps.value;
      Vt(by, r._currentValue), r._currentValue = o;
      break;
    case 13:
      if (r = t.memoizedState, r !== null)
        return r.dehydrated !== null ? (Vt(rn, rn.current & 1), t.flags |= 128, null) : n & t.child.childLanes ? eM(e, t, n) : (Vt(rn, rn.current & 1), e = Ca(e, t, n), e !== null ? e.sibling : null);
      Vt(rn, rn.current & 1);
      break;
    case 19:
      if (r = (n & t.childLanes) !== 0, e.flags & 128) {
        if (r)
          return tM(e, t, n);
        t.flags |= 128;
      }
      if (o = t.memoizedState, o !== null && (o.rendering = null, o.tail = null, o.lastEffect = null), Vt(rn, rn.current), r)
        break;
      return null;
    case 22:
    case 23:
      return t.lanes = 0, Z6(e, t, n);
  }
  return Ca(e, t, n);
}
var nM, pO, rM, oM;
nM = function(e, t) {
  for (var n = t.child; n !== null; ) {
    if (n.tag === 5 || n.tag === 6)
      e.appendChild(n.stateNode);
    else if (n.tag !== 4 && n.child !== null) {
      n.child.return = n, n = n.child;
      continue;
    }
    if (n === t)
      break;
    for (; n.sibling === null; ) {
      if (n.return === null || n.return === t)
        return;
      n = n.return;
    }
    n.sibling.return = n.return, n = n.sibling;
  }
};
pO = function() {
};
rM = function(e, t, n, r) {
  var o = e.memoizedProps;
  if (o !== r) {
    e = t.stateNode, Es(qi.current);
    var i = null;
    switch (n) {
      case "input":
        o = A0(e, o), r = A0(e, r), i = [];
        break;
      case "select":
        o = sn({}, o, { value: void 0 }), r = sn({}, r, { value: void 0 }), i = [];
        break;
      case "textarea":
        o = D0(e, o), r = D0(e, r), i = [];
        break;
      default:
        typeof o.onClick != "function" && typeof r.onClick == "function" && (e.onclick = my);
    }
    M0(n, r);
    var a;
    n = null;
    for (c in o)
      if (!r.hasOwnProperty(c) && o.hasOwnProperty(c) && o[c] != null)
        if (c === "style") {
          var l = o[c];
          for (a in l)
            l.hasOwnProperty(a) && (n || (n = {}), n[a] = "");
        } else
          c !== "dangerouslySetInnerHTML" && c !== "children" && c !== "suppressContentEditableWarning" && c !== "suppressHydrationWarning" && c !== "autoFocus" && (Kd.hasOwnProperty(c) ? i || (i = []) : (i = i || []).push(c, null));
    for (c in r) {
      var s = r[c];
      if (l = o != null ? o[c] : void 0, r.hasOwnProperty(c) && s !== l && (s != null || l != null))
        if (c === "style")
          if (l) {
            for (a in l)
              !l.hasOwnProperty(a) || s && s.hasOwnProperty(a) || (n || (n = {}), n[a] = "");
            for (a in s)
              s.hasOwnProperty(a) && l[a] !== s[a] && (n || (n = {}), n[a] = s[a]);
          } else
            n || (i || (i = []), i.push(
              c,
              n
            )), n = s;
        else
          c === "dangerouslySetInnerHTML" ? (s = s ? s.__html : void 0, l = l ? l.__html : void 0, s != null && l !== s && (i = i || []).push(c, s)) : c === "children" ? typeof s != "string" && typeof s != "number" || (i = i || []).push(c, "" + s) : c !== "suppressContentEditableWarning" && c !== "suppressHydrationWarning" && (Kd.hasOwnProperty(c) ? (s != null && c === "onScroll" && Yt("scroll", e), i || l === s || (i = [])) : (i = i || []).push(c, s));
    }
    n && (i = i || []).push("style", n);
    var c = i;
    (t.updateQueue = c) && (t.flags |= 4);
  }
};
oM = function(e, t, n, r) {
  n !== r && (t.flags |= 4);
};
function Uf(e, t) {
  if (!Jt)
    switch (e.tailMode) {
      case "hidden":
        t = e.tail;
        for (var n = null; t !== null; )
          t.alternate !== null && (n = t), t = t.sibling;
        n === null ? e.tail = null : n.sibling = null;
        break;
      case "collapsed":
        n = e.tail;
        for (var r = null; n !== null; )
          n.alternate !== null && (r = n), n = n.sibling;
        r === null ? t || e.tail === null ? e.tail = null : e.tail.sibling = null : r.sibling = null;
    }
}
function er(e) {
  var t = e.alternate !== null && e.alternate.child === e.child, n = 0, r = 0;
  if (t)
    for (var o = e.child; o !== null; )
      n |= o.lanes | o.childLanes, r |= o.subtreeFlags & 14680064, r |= o.flags & 14680064, o.return = e, o = o.sibling;
  else
    for (o = e.child; o !== null; )
      n |= o.lanes | o.childLanes, r |= o.subtreeFlags, r |= o.flags, o.return = e, o = o.sibling;
  return e.subtreeFlags |= r, e.childLanes = n, t;
}
function Fie(e, t, n) {
  var r = t.pendingProps;
  switch (cC(t), t.tag) {
    case 2:
    case 16:
    case 15:
    case 0:
    case 11:
    case 7:
    case 8:
    case 12:
    case 9:
    case 14:
      return er(t), null;
    case 1:
      return Mr(t.type) && hy(), er(t), null;
    case 3:
      return r = t.stateNode, _c(), Zt(Fr), Zt(cr), bC(), r.pendingContext && (r.context = r.pendingContext, r.pendingContext = null), (e === null || e.child === null) && (ih(t) ? t.flags |= 4 : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, si !== null && (xO(si), si = null))), pO(e, t), er(t), null;
    case 5:
      vC(t);
      var o = Es(ap.current);
      if (n = t.type, e !== null && t.stateNode != null)
        rM(e, t, n, r, o), e.ref !== t.ref && (t.flags |= 512, t.flags |= 2097152);
      else {
        if (!r) {
          if (t.stateNode === null)
            throw Error(ge(166));
          return er(t), null;
        }
        if (e = Es(qi.current), ih(t)) {
          r = t.stateNode, n = t.type;
          var i = t.memoizedProps;
          switch (r[Li] = t, r[op] = i, e = (t.mode & 1) !== 0, n) {
            case "dialog":
              Yt("cancel", r), Yt("close", r);
              break;
            case "iframe":
            case "object":
            case "embed":
              Yt("load", r);
              break;
            case "video":
            case "audio":
              for (o = 0; o < hd.length; o++)
                Yt(hd[o], r);
              break;
            case "source":
              Yt("error", r);
              break;
            case "img":
            case "image":
            case "link":
              Yt(
                "error",
                r
              ), Yt("load", r);
              break;
            case "details":
              Yt("toggle", r);
              break;
            case "input":
              zj(r, i), Yt("invalid", r);
              break;
            case "select":
              r._wrapperState = { wasMultiple: !!i.multiple }, Yt("invalid", r);
              break;
            case "textarea":
              Dj(r, i), Yt("invalid", r);
          }
          M0(n, i), o = null;
          for (var a in i)
            if (i.hasOwnProperty(a)) {
              var l = i[a];
              a === "children" ? typeof l == "string" ? r.textContent !== l && (i.suppressHydrationWarning !== !0 && oh(r.textContent, l, e), o = ["children", l]) : typeof l == "number" && r.textContent !== "" + l && (i.suppressHydrationWarning !== !0 && oh(
                r.textContent,
                l,
                e
              ), o = ["children", "" + l]) : Kd.hasOwnProperty(a) && l != null && a === "onScroll" && Yt("scroll", r);
            }
          switch (n) {
            case "input":
              Xm(r), Lj(r, i, !0);
              break;
            case "textarea":
              Xm(r), Fj(r);
              break;
            case "select":
            case "option":
              break;
            default:
              typeof i.onClick == "function" && (r.onclick = my);
          }
          r = o, t.updateQueue = r, r !== null && (t.flags |= 4);
        } else {
          a = o.nodeType === 9 ? o : o.ownerDocument, e === "http://www.w3.org/1999/xhtml" && (e = jF(n)), e === "http://www.w3.org/1999/xhtml" ? n === "script" ? (e = a.createElement("div"), e.innerHTML = "<script><\/script>", e = e.removeChild(e.firstChild)) : typeof r.is == "string" ? e = a.createElement(n, { is: r.is }) : (e = a.createElement(n), n === "select" && (a = e, r.multiple ? a.multiple = !0 : r.size && (a.size = r.size))) : e = a.createElementNS(e, n), e[Li] = t, e[op] = r, nM(e, t, !1, !1), t.stateNode = e;
          e: {
            switch (a = B0(n, r), n) {
              case "dialog":
                Yt("cancel", e), Yt("close", e), o = r;
                break;
              case "iframe":
              case "object":
              case "embed":
                Yt("load", e), o = r;
                break;
              case "video":
              case "audio":
                for (o = 0; o < hd.length; o++)
                  Yt(hd[o], e);
                o = r;
                break;
              case "source":
                Yt("error", e), o = r;
                break;
              case "img":
              case "image":
              case "link":
                Yt(
                  "error",
                  e
                ), Yt("load", e), o = r;
                break;
              case "details":
                Yt("toggle", e), o = r;
                break;
              case "input":
                zj(e, r), o = A0(e, r), Yt("invalid", e);
                break;
              case "option":
                o = r;
                break;
              case "select":
                e._wrapperState = { wasMultiple: !!r.multiple }, o = sn({}, r, { value: void 0 }), Yt("invalid", e);
                break;
              case "textarea":
                Dj(e, r), o = D0(e, r), Yt("invalid", e);
                break;
              default:
                o = r;
            }
            M0(n, o), l = o;
            for (i in l)
              if (l.hasOwnProperty(i)) {
                var s = l[i];
                i === "style" ? IF(e, s) : i === "dangerouslySetInnerHTML" ? (s = s ? s.__html : void 0, s != null && NF(e, s)) : i === "children" ? typeof s == "string" ? (n !== "textarea" || s !== "") && Yd(e, s) : typeof s == "number" && Yd(e, "" + s) : i !== "suppressContentEditableWarning" && i !== "suppressHydrationWarning" && i !== "autoFocus" && (Kd.hasOwnProperty(i) ? s != null && i === "onScroll" && Yt("scroll", e) : s != null && YE(e, i, s, a));
              }
            switch (n) {
              case "input":
                Xm(e), Lj(e, r, !1);
                break;
              case "textarea":
                Xm(e), Fj(e);
                break;
              case "option":
                r.value != null && e.setAttribute("value", "" + Ll(r.value));
                break;
              case "select":
                e.multiple = !!r.multiple, i = r.value, i != null ? sc(e, !!r.multiple, i, !1) : r.defaultValue != null && sc(
                  e,
                  !!r.multiple,
                  r.defaultValue,
                  !0
                );
                break;
              default:
                typeof o.onClick == "function" && (e.onclick = my);
            }
            switch (n) {
              case "button":
              case "input":
              case "select":
              case "textarea":
                r = !!r.autoFocus;
                break e;
              case "img":
                r = !0;
                break e;
              default:
                r = !1;
            }
          }
          r && (t.flags |= 4);
        }
        t.ref !== null && (t.flags |= 512, t.flags |= 2097152);
      }
      return er(t), null;
    case 6:
      if (e && t.stateNode != null)
        oM(e, t, e.memoizedProps, r);
      else {
        if (typeof r != "string" && t.stateNode === null)
          throw Error(ge(166));
        if (n = Es(ap.current), Es(qi.current), ih(t)) {
          if (r = t.stateNode, n = t.memoizedProps, r[Li] = t, (i = r.nodeValue !== n) && (e = po, e !== null))
            switch (e.tag) {
              case 3:
                oh(r.nodeValue, n, (e.mode & 1) !== 0);
                break;
              case 5:
                e.memoizedProps.suppressHydrationWarning !== !0 && oh(r.nodeValue, n, (e.mode & 1) !== 0);
            }
          i && (t.flags |= 4);
        } else
          r = (n.nodeType === 9 ? n : n.ownerDocument).createTextNode(r), r[Li] = t, t.stateNode = r;
      }
      return er(t), null;
    case 13:
      if (Zt(rn), r = t.memoizedState, e === null || e.memoizedState !== null && e.memoizedState.dehydrated !== null) {
        if (Jt && fo !== null && t.mode & 1 && !(t.flags & 128))
          x6(), Sc(), t.flags |= 98560, i = !1;
        else if (i = ih(t), r !== null && r.dehydrated !== null) {
          if (e === null) {
            if (!i)
              throw Error(ge(318));
            if (i = t.memoizedState, i = i !== null ? i.dehydrated : null, !i)
              throw Error(ge(317));
            i[Li] = t;
          } else
            Sc(), !(t.flags & 128) && (t.memoizedState = null), t.flags |= 4;
          er(t), i = !1;
        } else
          si !== null && (xO(si), si = null), i = !0;
        if (!i)
          return t.flags & 65536 ? t : null;
      }
      return t.flags & 128 ? (t.lanes = n, t) : (r = r !== null, r !== (e !== null && e.memoizedState !== null) && r && (t.child.flags |= 8192, t.mode & 1 && (e === null || rn.current & 1 ? Tn === 0 && (Tn = 3) : jC())), t.updateQueue !== null && (t.flags |= 4), er(t), null);
    case 4:
      return _c(), pO(e, t), e === null && np(t.stateNode.containerInfo), er(t), null;
    case 10:
      return mC(t.type._context), er(t), null;
    case 17:
      return Mr(t.type) && hy(), er(t), null;
    case 19:
      if (Zt(rn), i = t.memoizedState, i === null)
        return er(t), null;
      if (r = (t.flags & 128) !== 0, a = i.rendering, a === null)
        if (r)
          Uf(i, !1);
        else {
          if (Tn !== 0 || e !== null && e.flags & 128)
            for (e = t.child; e !== null; ) {
              if (a = Sy(e), a !== null) {
                for (t.flags |= 128, Uf(i, !1), r = a.updateQueue, r !== null && (t.updateQueue = r, t.flags |= 4), t.subtreeFlags = 0, r = n, n = t.child; n !== null; )
                  i = n, e = r, i.flags &= 14680066, a = i.alternate, a === null ? (i.childLanes = 0, i.lanes = e, i.child = null, i.subtreeFlags = 0, i.memoizedProps = null, i.memoizedState = null, i.updateQueue = null, i.dependencies = null, i.stateNode = null) : (i.childLanes = a.childLanes, i.lanes = a.lanes, i.child = a.child, i.subtreeFlags = 0, i.deletions = null, i.memoizedProps = a.memoizedProps, i.memoizedState = a.memoizedState, i.updateQueue = a.updateQueue, i.type = a.type, e = a.dependencies, i.dependencies = e === null ? null : { lanes: e.lanes, firstContext: e.firstContext }), n = n.sibling;
                return Vt(rn, rn.current & 1 | 2), t.child;
              }
              e = e.sibling;
            }
          i.tail !== null && yn() > Ec && (t.flags |= 128, r = !0, Uf(i, !1), t.lanes = 4194304);
        }
      else {
        if (!r)
          if (e = Sy(a), e !== null) {
            if (t.flags |= 128, r = !0, n = e.updateQueue, n !== null && (t.updateQueue = n, t.flags |= 4), Uf(i, !0), i.tail === null && i.tailMode === "hidden" && !a.alternate && !Jt)
              return er(t), null;
          } else
            2 * yn() - i.renderingStartTime > Ec && n !== 1073741824 && (t.flags |= 128, r = !0, Uf(i, !1), t.lanes = 4194304);
        i.isBackwards ? (a.sibling = t.child, t.child = a) : (n = i.last, n !== null ? n.sibling = a : t.child = a, i.last = a);
      }
      return i.tail !== null ? (t = i.tail, i.rendering = t, i.tail = t.sibling, i.renderingStartTime = yn(), t.sibling = null, n = rn.current, Vt(rn, r ? n & 1 | 2 : n & 1), t) : (er(t), null);
    case 22:
    case 23:
      return TC(), r = t.memoizedState !== null, e !== null && e.memoizedState !== null !== r && (t.flags |= 8192), r && t.mode & 1 ? io & 1073741824 && (er(t), t.subtreeFlags & 6 && (t.flags |= 8192)) : er(t), null;
    case 24:
      return null;
    case 25:
      return null;
  }
  throw Error(ge(156, t.tag));
}
function Mie(e, t) {
  switch (cC(t), t.tag) {
    case 1:
      return Mr(t.type) && hy(), e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
    case 3:
      return _c(), Zt(Fr), Zt(cr), bC(), e = t.flags, e & 65536 && !(e & 128) ? (t.flags = e & -65537 | 128, t) : null;
    case 5:
      return vC(t), null;
    case 13:
      if (Zt(rn), e = t.memoizedState, e !== null && e.dehydrated !== null) {
        if (t.alternate === null)
          throw Error(ge(340));
        Sc();
      }
      return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
    case 19:
      return Zt(rn), null;
    case 4:
      return _c(), null;
    case 10:
      return mC(t.type._context), null;
    case 22:
    case 23:
      return TC(), null;
    case 24:
      return null;
    default:
      return null;
  }
}
var sh = !1, or = !1, Bie = typeof WeakSet == "function" ? WeakSet : Set, De = null;
function ec(e, t) {
  var n = e.ref;
  if (n !== null)
    if (typeof n == "function")
      try {
        n(null);
      } catch (r) {
        fn(e, t, r);
      }
    else
      n.current = null;
}
function mO(e, t, n) {
  try {
    n();
  } catch (r) {
    fn(e, t, r);
  }
}
var P1 = !1;
function Uie(e, t) {
  if (Z0 = fy, e = s6(), sC(e)) {
    if ("selectionStart" in e)
      var n = { start: e.selectionStart, end: e.selectionEnd };
    else
      e: {
        n = (n = e.ownerDocument) && n.defaultView || window;
        var r = n.getSelection && n.getSelection();
        if (r && r.rangeCount !== 0) {
          n = r.anchorNode;
          var o = r.anchorOffset, i = r.focusNode;
          r = r.focusOffset;
          try {
            n.nodeType, i.nodeType;
          } catch {
            n = null;
            break e;
          }
          var a = 0, l = -1, s = -1, c = 0, p = 0, f = e, m = null;
          t:
            for (; ; ) {
              for (var h; f !== n || o !== 0 && f.nodeType !== 3 || (l = a + o), f !== i || r !== 0 && f.nodeType !== 3 || (s = a + r), f.nodeType === 3 && (a += f.nodeValue.length), (h = f.firstChild) !== null; )
                m = f, f = h;
              for (; ; ) {
                if (f === e)
                  break t;
                if (m === n && ++c === o && (l = a), m === i && ++p === r && (s = a), (h = f.nextSibling) !== null)
                  break;
                f = m, m = f.parentNode;
              }
              f = h;
            }
          n = l === -1 || s === -1 ? null : { start: l, end: s };
        } else
          n = null;
      }
    n = n || { start: 0, end: 0 };
  } else
    n = null;
  for (Q0 = { focusedElem: e, selectionRange: n }, fy = !1, De = t; De !== null; )
    if (t = De, e = t.child, (t.subtreeFlags & 1028) !== 0 && e !== null)
      e.return = t, De = e;
    else
      for (; De !== null; ) {
        t = De;
        try {
          var g = t.alternate;
          if (t.flags & 1024)
            switch (t.tag) {
              case 0:
              case 11:
              case 15:
                break;
              case 1:
                if (g !== null) {
                  var v = g.memoizedProps, S = g.memoizedState, w = t.stateNode, x = w.getSnapshotBeforeUpdate(t.elementType === t.type ? v : ai(t.type, v), S);
                  w.__reactInternalSnapshotBeforeUpdate = x;
                }
                break;
              case 3:
                var k = t.stateNode.containerInfo;
                k.nodeType === 1 ? k.textContent = "" : k.nodeType === 9 && k.documentElement && k.removeChild(k.documentElement);
                break;
              case 5:
              case 6:
              case 4:
              case 17:
                break;
              default:
                throw Error(ge(163));
            }
        } catch (E) {
          fn(t, t.return, E);
        }
        if (e = t.sibling, e !== null) {
          e.return = t.return, De = e;
          break;
        }
        De = t.return;
      }
  return g = P1, P1 = !1, g;
}
function $d(e, t, n) {
  var r = t.updateQueue;
  if (r = r !== null ? r.lastEffect : null, r !== null) {
    var o = r = r.next;
    do {
      if ((o.tag & e) === e) {
        var i = o.destroy;
        o.destroy = void 0, i !== void 0 && mO(t, n, i);
      }
      o = o.next;
    } while (o !== r);
  }
}
function Xw(e, t) {
  if (t = t.updateQueue, t = t !== null ? t.lastEffect : null, t !== null) {
    var n = t = t.next;
    do {
      if ((n.tag & e) === e) {
        var r = n.create;
        n.destroy = r();
      }
      n = n.next;
    } while (n !== t);
  }
}
function hO(e) {
  var t = e.ref;
  if (t !== null) {
    var n = e.stateNode;
    switch (e.tag) {
      case 5:
        e = n;
        break;
      default:
        e = n;
    }
    typeof t == "function" ? t(e) : t.current = e;
  }
}
function iM(e) {
  var t = e.alternate;
  t !== null && (e.alternate = null, iM(t)), e.child = null, e.deletions = null, e.sibling = null, e.tag === 5 && (t = e.stateNode, t !== null && (delete t[Li], delete t[op], delete t[tO], delete t[_ie], delete t[Oie])), e.stateNode = null, e.return = null, e.dependencies = null, e.memoizedProps = null, e.memoizedState = null, e.pendingProps = null, e.stateNode = null, e.updateQueue = null;
}
function aM(e) {
  return e.tag === 5 || e.tag === 3 || e.tag === 4;
}
function R1(e) {
  e:
    for (; ; ) {
      for (; e.sibling === null; ) {
        if (e.return === null || aM(e.return))
          return null;
        e = e.return;
      }
      for (e.sibling.return = e.return, e = e.sibling; e.tag !== 5 && e.tag !== 6 && e.tag !== 18; ) {
        if (e.flags & 2 || e.child === null || e.tag === 4)
          continue e;
        e.child.return = e, e = e.child;
      }
      if (!(e.flags & 2))
        return e.stateNode;
    }
}
function gO(e, t, n) {
  var r = e.tag;
  if (r === 5 || r === 6)
    e = e.stateNode, t ? n.nodeType === 8 ? n.parentNode.insertBefore(e, t) : n.insertBefore(e, t) : (n.nodeType === 8 ? (t = n.parentNode, t.insertBefore(e, n)) : (t = n, t.appendChild(e)), n = n._reactRootContainer, n != null || t.onclick !== null || (t.onclick = my));
  else if (r !== 4 && (e = e.child, e !== null))
    for (gO(e, t, n), e = e.sibling; e !== null; )
      gO(e, t, n), e = e.sibling;
}
function yO(e, t, n) {
  var r = e.tag;
  if (r === 5 || r === 6)
    e = e.stateNode, t ? n.insertBefore(e, t) : n.appendChild(e);
  else if (r !== 4 && (e = e.child, e !== null))
    for (yO(e, t, n), e = e.sibling; e !== null; )
      yO(e, t, n), e = e.sibling;
}
var Bn = null, li = !1;
function ol(e, t, n) {
  for (n = n.child; n !== null; )
    lM(e, t, n), n = n.sibling;
}
function lM(e, t, n) {
  if (Vi && typeof Vi.onCommitFiberUnmount == "function")
    try {
      Vi.onCommitFiberUnmount(Uw, n);
    } catch {
    }
  switch (n.tag) {
    case 5:
      or || ec(n, t);
    case 6:
      var r = Bn, o = li;
      Bn = null, ol(e, t, n), Bn = r, li = o, Bn !== null && (li ? (e = Bn, n = n.stateNode, e.nodeType === 8 ? e.parentNode.removeChild(n) : e.removeChild(n)) : Bn.removeChild(n.stateNode));
      break;
    case 18:
      Bn !== null && (li ? (e = Bn, n = n.stateNode, e.nodeType === 8 ? Ak(e.parentNode, n) : e.nodeType === 1 && Ak(e, n), Jd(e)) : Ak(Bn, n.stateNode));
      break;
    case 4:
      r = Bn, o = li, Bn = n.stateNode.containerInfo, li = !0, ol(e, t, n), Bn = r, li = o;
      break;
    case 0:
    case 11:
    case 14:
    case 15:
      if (!or && (r = n.updateQueue, r !== null && (r = r.lastEffect, r !== null))) {
        o = r = r.next;
        do {
          var i = o, a = i.destroy;
          i = i.tag, a !== void 0 && (i & 2 || i & 4) && mO(n, t, a), o = o.next;
        } while (o !== r);
      }
      ol(e, t, n);
      break;
    case 1:
      if (!or && (ec(n, t), r = n.stateNode, typeof r.componentWillUnmount == "function"))
        try {
          r.props = n.memoizedProps, r.state = n.memoizedState, r.componentWillUnmount();
        } catch (l) {
          fn(n, t, l);
        }
      ol(e, t, n);
      break;
    case 21:
      ol(e, t, n);
      break;
    case 22:
      n.mode & 1 ? (or = (r = or) || n.memoizedState !== null, ol(e, t, n), or = r) : ol(e, t, n);
      break;
    default:
      ol(e, t, n);
  }
}
function T1(e) {
  var t = e.updateQueue;
  if (t !== null) {
    e.updateQueue = null;
    var n = e.stateNode;
    n === null && (n = e.stateNode = new Bie()), t.forEach(function(r) {
      var o = Zie.bind(null, e, r);
      n.has(r) || (n.add(r), r.then(o, o));
    });
  }
}
function ni(e, t) {
  var n = t.deletions;
  if (n !== null)
    for (var r = 0; r < n.length; r++) {
      var o = n[r];
      try {
        var i = e, a = t, l = a;
        e:
          for (; l !== null; ) {
            switch (l.tag) {
              case 5:
                Bn = l.stateNode, li = !1;
                break e;
              case 3:
                Bn = l.stateNode.containerInfo, li = !0;
                break e;
              case 4:
                Bn = l.stateNode.containerInfo, li = !0;
                break e;
            }
            l = l.return;
          }
        if (Bn === null)
          throw Error(ge(160));
        lM(i, a, o), Bn = null, li = !1;
        var s = o.alternate;
        s !== null && (s.return = null), o.return = null;
      } catch (c) {
        fn(o, t, c);
      }
    }
  if (t.subtreeFlags & 12854)
    for (t = t.child; t !== null; )
      sM(t, e), t = t.sibling;
}
function sM(e, t) {
  var n = e.alternate, r = e.flags;
  switch (e.tag) {
    case 0:
    case 11:
    case 14:
    case 15:
      if (ni(t, e), Si(e), r & 4) {
        try {
          $d(3, e, e.return), Xw(3, e);
        } catch (v) {
          fn(e, e.return, v);
        }
        try {
          $d(5, e, e.return);
        } catch (v) {
          fn(e, e.return, v);
        }
      }
      break;
    case 1:
      ni(t, e), Si(e), r & 512 && n !== null && ec(n, n.return);
      break;
    case 5:
      if (ni(t, e), Si(e), r & 512 && n !== null && ec(n, n.return), e.flags & 32) {
        var o = e.stateNode;
        try {
          Yd(o, "");
        } catch (v) {
          fn(e, e.return, v);
        }
      }
      if (r & 4 && (o = e.stateNode, o != null)) {
        var i = e.memoizedProps, a = n !== null ? n.memoizedProps : i, l = e.type, s = e.updateQueue;
        if (e.updateQueue = null, s !== null)
          try {
            l === "input" && i.type === "radio" && i.name != null && RF(o, i), B0(l, a);
            var c = B0(l, i);
            for (a = 0; a < s.length; a += 2) {
              var p = s[a], f = s[a + 1];
              p === "style" ? IF(o, f) : p === "dangerouslySetInnerHTML" ? NF(o, f) : p === "children" ? Yd(o, f) : YE(o, p, f, c);
            }
            switch (l) {
              case "input":
                z0(o, i);
                break;
              case "textarea":
                TF(o, i);
                break;
              case "select":
                var m = o._wrapperState.wasMultiple;
                o._wrapperState.wasMultiple = !!i.multiple;
                var h = i.value;
                h != null ? sc(o, !!i.multiple, h, !1) : m !== !!i.multiple && (i.defaultValue != null ? sc(
                  o,
                  !!i.multiple,
                  i.defaultValue,
                  !0
                ) : sc(o, !!i.multiple, i.multiple ? [] : "", !1));
            }
            o[op] = i;
          } catch (v) {
            fn(e, e.return, v);
          }
      }
      break;
    case 6:
      if (ni(t, e), Si(e), r & 4) {
        if (e.stateNode === null)
          throw Error(ge(162));
        o = e.stateNode, i = e.memoizedProps;
        try {
          o.nodeValue = i;
        } catch (v) {
          fn(e, e.return, v);
        }
      }
      break;
    case 3:
      if (ni(t, e), Si(e), r & 4 && n !== null && n.memoizedState.isDehydrated)
        try {
          Jd(t.containerInfo);
        } catch (v) {
          fn(e, e.return, v);
        }
      break;
    case 4:
      ni(t, e), Si(e);
      break;
    case 13:
      ni(t, e), Si(e), o = e.child, o.flags & 8192 && (i = o.memoizedState !== null, o.stateNode.isHidden = i, !i || o.alternate !== null && o.alternate.memoizedState !== null || (PC = yn())), r & 4 && T1(e);
      break;
    case 22:
      if (p = n !== null && n.memoizedState !== null, e.mode & 1 ? (or = (c = or) || p, ni(t, e), or = c) : ni(t, e), Si(e), r & 8192) {
        if (c = e.memoizedState !== null, (e.stateNode.isHidden = c) && !p && e.mode & 1)
          for (De = e, p = e.child; p !== null; ) {
            for (f = De = p; De !== null; ) {
              switch (m = De, h = m.child, m.tag) {
                case 0:
                case 11:
                case 14:
                case 15:
                  $d(4, m, m.return);
                  break;
                case 1:
                  ec(m, m.return);
                  var g = m.stateNode;
                  if (typeof g.componentWillUnmount == "function") {
                    r = m, n = m.return;
                    try {
                      t = r, g.props = t.memoizedProps, g.state = t.memoizedState, g.componentWillUnmount();
                    } catch (v) {
                      fn(r, n, v);
                    }
                  }
                  break;
                case 5:
                  ec(m, m.return);
                  break;
                case 22:
                  if (m.memoizedState !== null) {
                    N1(f);
                    continue;
                  }
              }
              h !== null ? (h.return = m, De = h) : N1(f);
            }
            p = p.sibling;
          }
        e:
          for (p = null, f = e; ; ) {
            if (f.tag === 5) {
              if (p === null) {
                p = f;
                try {
                  o = f.stateNode, c ? (i = o.style, typeof i.setProperty == "function" ? i.setProperty("display", "none", "important") : i.display = "none") : (l = f.stateNode, s = f.memoizedProps.style, a = s != null && s.hasOwnProperty("display") ? s.display : null, l.style.display = $F("display", a));
                } catch (v) {
                  fn(e, e.return, v);
                }
              }
            } else if (f.tag === 6) {
              if (p === null)
                try {
                  f.stateNode.nodeValue = c ? "" : f.memoizedProps;
                } catch (v) {
                  fn(e, e.return, v);
                }
            } else if ((f.tag !== 22 && f.tag !== 23 || f.memoizedState === null || f === e) && f.child !== null) {
              f.child.return = f, f = f.child;
              continue;
            }
            if (f === e)
              break e;
            for (; f.sibling === null; ) {
              if (f.return === null || f.return === e)
                break e;
              p === f && (p = null), f = f.return;
            }
            p === f && (p = null), f.sibling.return = f.return, f = f.sibling;
          }
      }
      break;
    case 19:
      ni(t, e), Si(e), r & 4 && T1(e);
      break;
    case 21:
      break;
    default:
      ni(
        t,
        e
      ), Si(e);
  }
}
function Si(e) {
  var t = e.flags;
  if (t & 2) {
    try {
      e: {
        for (var n = e.return; n !== null; ) {
          if (aM(n)) {
            var r = n;
            break e;
          }
          n = n.return;
        }
        throw Error(ge(160));
      }
      switch (r.tag) {
        case 5:
          var o = r.stateNode;
          r.flags & 32 && (Yd(o, ""), r.flags &= -33);
          var i = R1(e);
          yO(e, i, o);
          break;
        case 3:
        case 4:
          var a = r.stateNode.containerInfo, l = R1(e);
          gO(e, l, a);
          break;
        default:
          throw Error(ge(161));
      }
    } catch (s) {
      fn(e, e.return, s);
    }
    e.flags &= -3;
  }
  t & 4096 && (e.flags &= -4097);
}
function Hie(e, t, n) {
  De = e, uM(e);
}
function uM(e, t, n) {
  for (var r = (e.mode & 1) !== 0; De !== null; ) {
    var o = De, i = o.child;
    if (o.tag === 22 && r) {
      var a = o.memoizedState !== null || sh;
      if (!a) {
        var l = o.alternate, s = l !== null && l.memoizedState !== null || or;
        l = sh;
        var c = or;
        if (sh = a, (or = s) && !c)
          for (De = o; De !== null; )
            a = De, s = a.child, a.tag === 22 && a.memoizedState !== null ? $1(o) : s !== null ? (s.return = a, De = s) : $1(o);
        for (; i !== null; )
          De = i, uM(i), i = i.sibling;
        De = o, sh = l, or = c;
      }
      j1(e);
    } else
      o.subtreeFlags & 8772 && i !== null ? (i.return = o, De = i) : j1(e);
  }
}
function j1(e) {
  for (; De !== null; ) {
    var t = De;
    if (t.flags & 8772) {
      var n = t.alternate;
      try {
        if (t.flags & 8772)
          switch (t.tag) {
            case 0:
            case 11:
            case 15:
              or || Xw(5, t);
              break;
            case 1:
              var r = t.stateNode;
              if (t.flags & 4 && !or)
                if (n === null)
                  r.componentDidMount();
                else {
                  var o = t.elementType === t.type ? n.memoizedProps : ai(t.type, n.memoizedProps);
                  r.componentDidUpdate(o, n.memoizedState, r.__reactInternalSnapshotBeforeUpdate);
                }
              var i = t.updateQueue;
              i !== null && m1(t, i, r);
              break;
            case 3:
              var a = t.updateQueue;
              if (a !== null) {
                if (n = null, t.child !== null)
                  switch (t.child.tag) {
                    case 5:
                      n = t.child.stateNode;
                      break;
                    case 1:
                      n = t.child.stateNode;
                  }
                m1(t, a, n);
              }
              break;
            case 5:
              var l = t.stateNode;
              if (n === null && t.flags & 4) {
                n = l;
                var s = t.memoizedProps;
                switch (t.type) {
                  case "button":
                  case "input":
                  case "select":
                  case "textarea":
                    s.autoFocus && n.focus();
                    break;
                  case "img":
                    s.src && (n.src = s.src);
                }
              }
              break;
            case 6:
              break;
            case 4:
              break;
            case 12:
              break;
            case 13:
              if (t.memoizedState === null) {
                var c = t.alternate;
                if (c !== null) {
                  var p = c.memoizedState;
                  if (p !== null) {
                    var f = p.dehydrated;
                    f !== null && Jd(f);
                  }
                }
              }
              break;
            case 19:
            case 17:
            case 21:
            case 22:
            case 23:
            case 25:
              break;
            default:
              throw Error(ge(163));
          }
        or || t.flags & 512 && hO(t);
      } catch (m) {
        fn(t, t.return, m);
      }
    }
    if (t === e) {
      De = null;
      break;
    }
    if (n = t.sibling, n !== null) {
      n.return = t.return, De = n;
      break;
    }
    De = t.return;
  }
}
function N1(e) {
  for (; De !== null; ) {
    var t = De;
    if (t === e) {
      De = null;
      break;
    }
    var n = t.sibling;
    if (n !== null) {
      n.return = t.return, De = n;
      break;
    }
    De = t.return;
  }
}
function $1(e) {
  for (; De !== null; ) {
    var t = De;
    try {
      switch (t.tag) {
        case 0:
        case 11:
        case 15:
          var n = t.return;
          try {
            Xw(4, t);
          } catch (s) {
            fn(t, n, s);
          }
          break;
        case 1:
          var r = t.stateNode;
          if (typeof r.componentDidMount == "function") {
            var o = t.return;
            try {
              r.componentDidMount();
            } catch (s) {
              fn(t, o, s);
            }
          }
          var i = t.return;
          try {
            hO(t);
          } catch (s) {
            fn(t, i, s);
          }
          break;
        case 5:
          var a = t.return;
          try {
            hO(t);
          } catch (s) {
            fn(t, a, s);
          }
      }
    } catch (s) {
      fn(t, t.return, s);
    }
    if (t === e) {
      De = null;
      break;
    }
    var l = t.sibling;
    if (l !== null) {
      l.return = t.return, De = l;
      break;
    }
    De = t.return;
  }
}
var Wie = Math.ceil, Oy = za.ReactCurrentDispatcher, EC = za.ReactCurrentOwner, Bo = za.ReactCurrentBatchConfig, xt = 0, In = null, Sn = null, Vn = 0, io = 0, tc = Vl(0), Tn = 0, cp = null, Ms = 0, Zw = 0, CC = 0, Id = null, Ar = null, PC = 0, Ec = 1 / 0, ma = null, Ey = !1, vO = null, Tl = null, uh = !1, vl = null, Cy = 0, Ad = 0, bO = null, Eg = -1, Cg = 0;
function Sr() {
  return xt & 6 ? yn() : Eg !== -1 ? Eg : Eg = yn();
}
function jl(e) {
  return e.mode & 1 ? xt & 2 && Vn !== 0 ? Vn & -Vn : Cie.transition !== null ? (Cg === 0 && (Cg = qF()), Cg) : (e = It, e !== 0 || (e = window.event, e = e === void 0 ? 16 : JF(e.type)), e) : 1;
}
function fi(e, t, n, r) {
  if (50 < Ad)
    throw Ad = 0, bO = null, Error(ge(185));
  Pp(e, n, r), (!(xt & 2) || e !== In) && (e === In && (!(xt & 2) && (Zw |= n), Tn === 4 && gl(e, Vn)), Br(e, r), n === 1 && xt === 0 && !(t.mode & 1) && (Ec = yn() + 500, Gw && ql()));
}
function Br(e, t) {
  var n = e.callbackNode;
  Coe(e, t);
  var r = cy(e, e === In ? Vn : 0);
  if (r === 0)
    n !== null && Uj(n), e.callbackNode = null, e.callbackPriority = 0;
  else if (t = r & -r, e.callbackPriority !== t) {
    if (n != null && Uj(n), t === 1)
      e.tag === 0 ? Eie(I1.bind(null, e)) : v6(I1.bind(null, e)), Sie(function() {
        !(xt & 6) && ql();
      }), n = null;
    else {
      switch (GF(r)) {
        case 1:
          n = eC;
          break;
        case 4:
          n = WF;
          break;
        case 16:
          n = uy;
          break;
        case 536870912:
          n = VF;
          break;
        default:
          n = uy;
      }
      n = yM(n, cM.bind(null, e));
    }
    e.callbackPriority = t, e.callbackNode = n;
  }
}
function cM(e, t) {
  if (Eg = -1, Cg = 0, xt & 6)
    throw Error(ge(327));
  var n = e.callbackNode;
  if (pc() && e.callbackNode !== n)
    return null;
  var r = cy(e, e === In ? Vn : 0);
  if (r === 0)
    return null;
  if (r & 30 || r & e.expiredLanes || t)
    t = Py(e, r);
  else {
    t = r;
    var o = xt;
    xt |= 2;
    var i = dM();
    (In !== e || Vn !== t) && (ma = null, Ec = yn() + 500, Ns(e, t));
    do
      try {
        Gie();
        break;
      } catch (l) {
        fM(e, l);
      }
    while (!0);
    pC(), Oy.current = i, xt = o, Sn !== null ? t = 0 : (In = null, Vn = 0, t = Tn);
  }
  if (t !== 0) {
    if (t === 2 && (o = q0(e), o !== 0 && (r = o, t = wO(e, o))), t === 1)
      throw n = cp, Ns(e, 0), gl(e, r), Br(e, yn()), n;
    if (t === 6)
      gl(e, r);
    else {
      if (o = e.current.alternate, !(r & 30) && !Vie(o) && (t = Py(e, r), t === 2 && (i = q0(e), i !== 0 && (r = i, t = wO(e, i))), t === 1))
        throw n = cp, Ns(e, 0), gl(e, r), Br(e, yn()), n;
      switch (e.finishedWork = o, e.finishedLanes = r, t) {
        case 0:
        case 1:
          throw Error(ge(345));
        case 2:
          ms(e, Ar, ma);
          break;
        case 3:
          if (gl(e, r), (r & 130023424) === r && (t = PC + 500 - yn(), 10 < t)) {
            if (cy(e, 0) !== 0)
              break;
            if (o = e.suspendedLanes, (o & r) !== r) {
              Sr(), e.pingedLanes |= e.suspendedLanes & o;
              break;
            }
            e.timeoutHandle = eO(ms.bind(null, e, Ar, ma), t);
            break;
          }
          ms(e, Ar, ma);
          break;
        case 4:
          if (gl(e, r), (r & 4194240) === r)
            break;
          for (t = e.eventTimes, o = -1; 0 < r; ) {
            var a = 31 - ci(r);
            i = 1 << a, a = t[a], a > o && (o = a), r &= ~i;
          }
          if (r = o, r = yn() - r, r = (120 > r ? 120 : 480 > r ? 480 : 1080 > r ? 1080 : 1920 > r ? 1920 : 3e3 > r ? 3e3 : 4320 > r ? 4320 : 1960 * Wie(r / 1960)) - r, 10 < r) {
            e.timeoutHandle = eO(ms.bind(null, e, Ar, ma), r);
            break;
          }
          ms(e, Ar, ma);
          break;
        case 5:
          ms(e, Ar, ma);
          break;
        default:
          throw Error(ge(329));
      }
    }
  }
  return Br(e, yn()), e.callbackNode === n ? cM.bind(null, e) : null;
}
function wO(e, t) {
  var n = Id;
  return e.current.memoizedState.isDehydrated && (Ns(e, t).flags |= 256), e = Py(e, t), e !== 2 && (t = Ar, Ar = n, t !== null && xO(t)), e;
}
function xO(e) {
  Ar === null ? Ar = e : Ar.push.apply(Ar, e);
}
function Vie(e) {
  for (var t = e; ; ) {
    if (t.flags & 16384) {
      var n = t.updateQueue;
      if (n !== null && (n = n.stores, n !== null))
        for (var r = 0; r < n.length; r++) {
          var o = n[r], i = o.getSnapshot;
          o = o.value;
          try {
            if (!pi(i(), o))
              return !1;
          } catch {
            return !1;
          }
        }
    }
    if (n = t.child, t.subtreeFlags & 16384 && n !== null)
      n.return = t, t = n;
    else {
      if (t === e)
        break;
      for (; t.sibling === null; ) {
        if (t.return === null || t.return === e)
          return !0;
        t = t.return;
      }
      t.sibling.return = t.return, t = t.sibling;
    }
  }
  return !0;
}
function gl(e, t) {
  for (t &= ~CC, t &= ~Zw, e.suspendedLanes |= t, e.pingedLanes &= ~t, e = e.expirationTimes; 0 < t; ) {
    var n = 31 - ci(t), r = 1 << n;
    e[n] = -1, t &= ~r;
  }
}
function I1(e) {
  if (xt & 6)
    throw Error(ge(327));
  pc();
  var t = cy(e, 0);
  if (!(t & 1))
    return Br(e, yn()), null;
  var n = Py(e, t);
  if (e.tag !== 0 && n === 2) {
    var r = q0(e);
    r !== 0 && (t = r, n = wO(e, r));
  }
  if (n === 1)
    throw n = cp, Ns(e, 0), gl(e, t), Br(e, yn()), n;
  if (n === 6)
    throw Error(ge(345));
  return e.finishedWork = e.current.alternate, e.finishedLanes = t, ms(e, Ar, ma), Br(e, yn()), null;
}
function RC(e, t) {
  var n = xt;
  xt |= 1;
  try {
    return e(t);
  } finally {
    xt = n, xt === 0 && (Ec = yn() + 500, Gw && ql());
  }
}
function Bs(e) {
  vl !== null && vl.tag === 0 && !(xt & 6) && pc();
  var t = xt;
  xt |= 1;
  var n = Bo.transition, r = It;
  try {
    if (Bo.transition = null, It = 1, e)
      return e();
  } finally {
    It = r, Bo.transition = n, xt = t, !(xt & 6) && ql();
  }
}
function TC() {
  io = tc.current, Zt(tc);
}
function Ns(e, t) {
  e.finishedWork = null, e.finishedLanes = 0;
  var n = e.timeoutHandle;
  if (n !== -1 && (e.timeoutHandle = -1, xie(n)), Sn !== null)
    for (n = Sn.return; n !== null; ) {
      var r = n;
      switch (cC(r), r.tag) {
        case 1:
          r = r.type.childContextTypes, r != null && hy();
          break;
        case 3:
          _c(), Zt(Fr), Zt(cr), bC();
          break;
        case 5:
          vC(r);
          break;
        case 4:
          _c();
          break;
        case 13:
          Zt(rn);
          break;
        case 19:
          Zt(rn);
          break;
        case 10:
          mC(r.type._context);
          break;
        case 22:
        case 23:
          TC();
      }
      n = n.return;
    }
  if (In = e, Sn = e = Nl(e.current, null), Vn = io = t, Tn = 0, cp = null, CC = Zw = Ms = 0, Ar = Id = null, Os !== null) {
    for (t = 0; t < Os.length; t++)
      if (n = Os[t], r = n.interleaved, r !== null) {
        n.interleaved = null;
        var o = r.next, i = n.pending;
        if (i !== null) {
          var a = i.next;
          i.next = o, r.next = a;
        }
        n.pending = r;
      }
    Os = null;
  }
  return e;
}
function fM(e, t) {
  do {
    var n = Sn;
    try {
      if (pC(), kg.current = _y, ky) {
        for (var r = ln.memoizedState; r !== null; ) {
          var o = r.queue;
          o !== null && (o.pending = null), r = r.next;
        }
        ky = !1;
      }
      if (Fs = 0, $n = Rn = ln = null, Nd = !1, lp = 0, EC.current = null, n === null || n.return === null) {
        Tn = 1, cp = t, Sn = null;
        break;
      }
      e: {
        var i = e, a = n.return, l = n, s = t;
        if (t = Vn, l.flags |= 32768, s !== null && typeof s == "object" && typeof s.then == "function") {
          var c = s, p = l, f = p.tag;
          if (!(p.mode & 1) && (f === 0 || f === 11 || f === 15)) {
            var m = p.alternate;
            m ? (p.updateQueue = m.updateQueue, p.memoizedState = m.memoizedState, p.lanes = m.lanes) : (p.updateQueue = null, p.memoizedState = null);
          }
          var h = x1(a);
          if (h !== null) {
            h.flags &= -257, S1(h, a, l, i, t), h.mode & 1 && w1(i, c, t), t = h, s = c;
            var g = t.updateQueue;
            if (g === null) {
              var v = /* @__PURE__ */ new Set();
              v.add(s), t.updateQueue = v;
            } else
              g.add(s);
            break e;
          } else {
            if (!(t & 1)) {
              w1(i, c, t), jC();
              break e;
            }
            s = Error(ge(426));
          }
        } else if (Jt && l.mode & 1) {
          var S = x1(a);
          if (S !== null) {
            !(S.flags & 65536) && (S.flags |= 256), S1(S, a, l, i, t), fC(Oc(s, l));
            break e;
          }
        }
        i = s = Oc(s, l), Tn !== 4 && (Tn = 2), Id === null ? Id = [i] : Id.push(i), i = a;
        do {
          switch (i.tag) {
            case 3:
              i.flags |= 65536, t &= -t, i.lanes |= t;
              var w = K6(i, s, t);
              p1(i, w);
              break e;
            case 1:
              l = s;
              var x = i.type, k = i.stateNode;
              if (!(i.flags & 128) && (typeof x.getDerivedStateFromError == "function" || k !== null && typeof k.componentDidCatch == "function" && (Tl === null || !Tl.has(k)))) {
                i.flags |= 65536, t &= -t, i.lanes |= t;
                var E = Y6(i, l, t);
                p1(i, E);
                break e;
              }
          }
          i = i.return;
        } while (i !== null);
      }
      mM(n);
    } catch (O) {
      t = O, Sn === n && n !== null && (Sn = n = n.return);
      continue;
    }
    break;
  } while (!0);
}
function dM() {
  var e = Oy.current;
  return Oy.current = _y, e === null ? _y : e;
}
function jC() {
  (Tn === 0 || Tn === 3 || Tn === 2) && (Tn = 4), In === null || !(Ms & 268435455) && !(Zw & 268435455) || gl(In, Vn);
}
function Py(e, t) {
  var n = xt;
  xt |= 2;
  var r = dM();
  (In !== e || Vn !== t) && (ma = null, Ns(e, t));
  do
    try {
      qie();
      break;
    } catch (o) {
      fM(e, o);
    }
  while (!0);
  if (pC(), xt = n, Oy.current = r, Sn !== null)
    throw Error(ge(261));
  return In = null, Vn = 0, Tn;
}
function qie() {
  for (; Sn !== null; )
    pM(Sn);
}
function Gie() {
  for (; Sn !== null && !voe(); )
    pM(Sn);
}
function pM(e) {
  var t = gM(e.alternate, e, io);
  e.memoizedProps = e.pendingProps, t === null ? mM(e) : Sn = t, EC.current = null;
}
function mM(e) {
  var t = e;
  do {
    var n = t.alternate;
    if (e = t.return, t.flags & 32768) {
      if (n = Mie(n, t), n !== null) {
        n.flags &= 32767, Sn = n;
        return;
      }
      if (e !== null)
        e.flags |= 32768, e.subtreeFlags = 0, e.deletions = null;
      else {
        Tn = 6, Sn = null;
        return;
      }
    } else if (n = Fie(n, t, io), n !== null) {
      Sn = n;
      return;
    }
    if (t = t.sibling, t !== null) {
      Sn = t;
      return;
    }
    Sn = t = e;
  } while (t !== null);
  Tn === 0 && (Tn = 5);
}
function ms(e, t, n) {
  var r = It, o = Bo.transition;
  try {
    Bo.transition = null, It = 1, Kie(e, t, n, r);
  } finally {
    Bo.transition = o, It = r;
  }
  return null;
}
function Kie(e, t, n, r) {
  do
    pc();
  while (vl !== null);
  if (xt & 6)
    throw Error(ge(327));
  n = e.finishedWork;
  var o = e.finishedLanes;
  if (n === null)
    return null;
  if (e.finishedWork = null, e.finishedLanes = 0, n === e.current)
    throw Error(ge(177));
  e.callbackNode = null, e.callbackPriority = 0;
  var i = n.lanes | n.childLanes;
  if (Poe(e, i), e === In && (Sn = In = null, Vn = 0), !(n.subtreeFlags & 2064) && !(n.flags & 2064) || uh || (uh = !0, yM(uy, function() {
    return pc(), null;
  })), i = (n.flags & 15990) !== 0, n.subtreeFlags & 15990 || i) {
    i = Bo.transition, Bo.transition = null;
    var a = It;
    It = 1;
    var l = xt;
    xt |= 4, EC.current = null, Uie(e, n), sM(n, e), mie(Q0), fy = !!Z0, Q0 = Z0 = null, e.current = n, Hie(n), boe(), xt = l, It = a, Bo.transition = i;
  } else
    e.current = n;
  if (uh && (uh = !1, vl = e, Cy = o), i = e.pendingLanes, i === 0 && (Tl = null), Soe(n.stateNode), Br(e, yn()), t !== null)
    for (r = e.onRecoverableError, n = 0; n < t.length; n++)
      o = t[n], r(o.value, { componentStack: o.stack, digest: o.digest });
  if (Ey)
    throw Ey = !1, e = vO, vO = null, e;
  return Cy & 1 && e.tag !== 0 && pc(), i = e.pendingLanes, i & 1 ? e === bO ? Ad++ : (Ad = 0, bO = e) : Ad = 0, ql(), null;
}
function pc() {
  if (vl !== null) {
    var e = GF(Cy), t = Bo.transition, n = It;
    try {
      if (Bo.transition = null, It = 16 > e ? 16 : e, vl === null)
        var r = !1;
      else {
        if (e = vl, vl = null, Cy = 0, xt & 6)
          throw Error(ge(331));
        var o = xt;
        for (xt |= 4, De = e.current; De !== null; ) {
          var i = De, a = i.child;
          if (De.flags & 16) {
            var l = i.deletions;
            if (l !== null) {
              for (var s = 0; s < l.length; s++) {
                var c = l[s];
                for (De = c; De !== null; ) {
                  var p = De;
                  switch (p.tag) {
                    case 0:
                    case 11:
                    case 15:
                      $d(8, p, i);
                  }
                  var f = p.child;
                  if (f !== null)
                    f.return = p, De = f;
                  else
                    for (; De !== null; ) {
                      p = De;
                      var m = p.sibling, h = p.return;
                      if (iM(p), p === c) {
                        De = null;
                        break;
                      }
                      if (m !== null) {
                        m.return = h, De = m;
                        break;
                      }
                      De = h;
                    }
                }
              }
              var g = i.alternate;
              if (g !== null) {
                var v = g.child;
                if (v !== null) {
                  g.child = null;
                  do {
                    var S = v.sibling;
                    v.sibling = null, v = S;
                  } while (v !== null);
                }
              }
              De = i;
            }
          }
          if (i.subtreeFlags & 2064 && a !== null)
            a.return = i, De = a;
          else
            e:
              for (; De !== null; ) {
                if (i = De, i.flags & 2048)
                  switch (i.tag) {
                    case 0:
                    case 11:
                    case 15:
                      $d(9, i, i.return);
                  }
                var w = i.sibling;
                if (w !== null) {
                  w.return = i.return, De = w;
                  break e;
                }
                De = i.return;
              }
        }
        var x = e.current;
        for (De = x; De !== null; ) {
          a = De;
          var k = a.child;
          if (a.subtreeFlags & 2064 && k !== null)
            k.return = a, De = k;
          else
            e:
              for (a = x; De !== null; ) {
                if (l = De, l.flags & 2048)
                  try {
                    switch (l.tag) {
                      case 0:
                      case 11:
                      case 15:
                        Xw(9, l);
                    }
                  } catch (O) {
                    fn(l, l.return, O);
                  }
                if (l === a) {
                  De = null;
                  break e;
                }
                var E = l.sibling;
                if (E !== null) {
                  E.return = l.return, De = E;
                  break e;
                }
                De = l.return;
              }
        }
        if (xt = o, ql(), Vi && typeof Vi.onPostCommitFiberRoot == "function")
          try {
            Vi.onPostCommitFiberRoot(Uw, e);
          } catch {
          }
        r = !0;
      }
      return r;
    } finally {
      It = n, Bo.transition = t;
    }
  }
  return !1;
}
function A1(e, t, n) {
  t = Oc(n, t), t = K6(e, t, 1), e = Rl(e, t, 1), t = Sr(), e !== null && (Pp(e, 1, t), Br(e, t));
}
function fn(e, t, n) {
  if (e.tag === 3)
    A1(e, e, n);
  else
    for (; t !== null; ) {
      if (t.tag === 3) {
        A1(t, e, n);
        break;
      } else if (t.tag === 1) {
        var r = t.stateNode;
        if (typeof t.type.getDerivedStateFromError == "function" || typeof r.componentDidCatch == "function" && (Tl === null || !Tl.has(r))) {
          e = Oc(n, e), e = Y6(t, e, 1), t = Rl(t, e, 1), e = Sr(), t !== null && (Pp(t, 1, e), Br(t, e));
          break;
        }
      }
      t = t.return;
    }
}
function Yie(e, t, n) {
  var r = e.pingCache;
  r !== null && r.delete(t), t = Sr(), e.pingedLanes |= e.suspendedLanes & n, In === e && (Vn & n) === n && (Tn === 4 || Tn === 3 && (Vn & 130023424) === Vn && 500 > yn() - PC ? Ns(e, 0) : CC |= n), Br(e, t);
}
function hM(e, t) {
  t === 0 && (e.mode & 1 ? (t = Jm, Jm <<= 1, !(Jm & 130023424) && (Jm = 4194304)) : t = 1);
  var n = Sr();
  e = Ea(e, t), e !== null && (Pp(e, t, n), Br(e, n));
}
function Xie(e) {
  var t = e.memoizedState, n = 0;
  t !== null && (n = t.retryLane), hM(e, n);
}
function Zie(e, t) {
  var n = 0;
  switch (e.tag) {
    case 13:
      var r = e.stateNode, o = e.memoizedState;
      o !== null && (n = o.retryLane);
      break;
    case 19:
      r = e.stateNode;
      break;
    default:
      throw Error(ge(314));
  }
  r !== null && r.delete(t), hM(e, n);
}
var gM;
gM = function(e, t, n) {
  if (e !== null)
    if (e.memoizedProps !== t.pendingProps || Fr.current)
      Dr = !0;
    else {
      if (!(e.lanes & n) && !(t.flags & 128))
        return Dr = !1, Die(e, t, n);
      Dr = !!(e.flags & 131072);
    }
  else
    Dr = !1, Jt && t.flags & 1048576 && b6(t, vy, t.index);
  switch (t.lanes = 0, t.tag) {
    case 2:
      var r = t.type;
      Og(e, t), e = t.pendingProps;
      var o = xc(t, cr.current);
      dc(t, n), o = xC(null, t, r, e, o, n);
      var i = SC();
      return t.flags |= 1, typeof o == "object" && o !== null && typeof o.render == "function" && o.$$typeof === void 0 ? (t.tag = 1, t.memoizedState = null, t.updateQueue = null, Mr(r) ? (i = !0, gy(t)) : i = !1, t.memoizedState = o.state !== null && o.state !== void 0 ? o.state : null, gC(t), o.updater = Kw, t.stateNode = o, o._reactInternals = t, lO(t, r, e, n), t = cO(null, t, r, !0, i, n)) : (t.tag = 0, Jt && i && uC(t), vr(null, t, o, n), t = t.child), t;
    case 16:
      r = t.elementType;
      e: {
        switch (Og(e, t), e = t.pendingProps, o = r._init, r = o(r._payload), t.type = r, o = t.tag = Jie(r), e = ai(r, e), o) {
          case 0:
            t = uO(null, t, r, e, n);
            break e;
          case 1:
            t = O1(null, t, r, e, n);
            break e;
          case 11:
            t = k1(null, t, r, e, n);
            break e;
          case 14:
            t = _1(null, t, r, ai(r.type, e), n);
            break e;
        }
        throw Error(ge(
          306,
          r,
          ""
        ));
      }
      return t;
    case 0:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : ai(r, o), uO(e, t, r, o, n);
    case 1:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : ai(r, o), O1(e, t, r, o, n);
    case 3:
      e: {
        if (J6(t), e === null)
          throw Error(ge(387));
        r = t.pendingProps, i = t.memoizedState, o = i.element, k6(e, t), xy(t, r, null, n);
        var a = t.memoizedState;
        if (r = a.element, i.isDehydrated)
          if (i = { element: r, isDehydrated: !1, cache: a.cache, pendingSuspenseBoundaries: a.pendingSuspenseBoundaries, transitions: a.transitions }, t.updateQueue.baseState = i, t.memoizedState = i, t.flags & 256) {
            o = Oc(Error(ge(423)), t), t = E1(e, t, r, n, o);
            break e;
          } else if (r !== o) {
            o = Oc(Error(ge(424)), t), t = E1(e, t, r, n, o);
            break e;
          } else
            for (fo = Pl(t.stateNode.containerInfo.firstChild), po = t, Jt = !0, si = null, n = C6(t, null, r, n), t.child = n; n; )
              n.flags = n.flags & -3 | 4096, n = n.sibling;
        else {
          if (Sc(), r === o) {
            t = Ca(e, t, n);
            break e;
          }
          vr(e, t, r, n);
        }
        t = t.child;
      }
      return t;
    case 5:
      return P6(t), e === null && oO(t), r = t.type, o = t.pendingProps, i = e !== null ? e.memoizedProps : null, a = o.children, J0(r, o) ? a = null : i !== null && J0(r, i) && (t.flags |= 32), Q6(e, t), vr(e, t, a, n), t.child;
    case 6:
      return e === null && oO(t), null;
    case 13:
      return eM(e, t, n);
    case 4:
      return yC(t, t.stateNode.containerInfo), r = t.pendingProps, e === null ? t.child = kc(t, null, r, n) : vr(e, t, r, n), t.child;
    case 11:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : ai(r, o), k1(e, t, r, o, n);
    case 7:
      return vr(e, t, t.pendingProps, n), t.child;
    case 8:
      return vr(e, t, t.pendingProps.children, n), t.child;
    case 12:
      return vr(e, t, t.pendingProps.children, n), t.child;
    case 10:
      e: {
        if (r = t.type._context, o = t.pendingProps, i = t.memoizedProps, a = o.value, Vt(by, r._currentValue), r._currentValue = a, i !== null)
          if (pi(i.value, a)) {
            if (i.children === o.children && !Fr.current) {
              t = Ca(e, t, n);
              break e;
            }
          } else
            for (i = t.child, i !== null && (i.return = t); i !== null; ) {
              var l = i.dependencies;
              if (l !== null) {
                a = i.child;
                for (var s = l.firstContext; s !== null; ) {
                  if (s.context === r) {
                    if (i.tag === 1) {
                      s = Sa(-1, n & -n), s.tag = 2;
                      var c = i.updateQueue;
                      if (c !== null) {
                        c = c.shared;
                        var p = c.pending;
                        p === null ? s.next = s : (s.next = p.next, p.next = s), c.pending = s;
                      }
                    }
                    i.lanes |= n, s = i.alternate, s !== null && (s.lanes |= n), iO(
                      i.return,
                      n,
                      t
                    ), l.lanes |= n;
                    break;
                  }
                  s = s.next;
                }
              } else if (i.tag === 10)
                a = i.type === t.type ? null : i.child;
              else if (i.tag === 18) {
                if (a = i.return, a === null)
                  throw Error(ge(341));
                a.lanes |= n, l = a.alternate, l !== null && (l.lanes |= n), iO(a, n, t), a = i.sibling;
              } else
                a = i.child;
              if (a !== null)
                a.return = i;
              else
                for (a = i; a !== null; ) {
                  if (a === t) {
                    a = null;
                    break;
                  }
                  if (i = a.sibling, i !== null) {
                    i.return = a.return, a = i;
                    break;
                  }
                  a = a.return;
                }
              i = a;
            }
        vr(e, t, o.children, n), t = t.child;
      }
      return t;
    case 9:
      return o = t.type, r = t.pendingProps.children, dc(t, n), o = Ho(o), r = r(o), t.flags |= 1, vr(e, t, r, n), t.child;
    case 14:
      return r = t.type, o = ai(r, t.pendingProps), o = ai(r.type, o), _1(e, t, r, o, n);
    case 15:
      return X6(e, t, t.type, t.pendingProps, n);
    case 17:
      return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : ai(r, o), Og(e, t), t.tag = 1, Mr(r) ? (e = !0, gy(t)) : e = !1, dc(t, n), O6(t, r, o), lO(t, r, o, n), cO(null, t, r, !0, e, n);
    case 19:
      return tM(e, t, n);
    case 22:
      return Z6(e, t, n);
  }
  throw Error(ge(156, t.tag));
};
function yM(e, t) {
  return HF(e, t);
}
function Qie(e, t, n, r) {
  this.tag = e, this.key = n, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = t, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = r, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
}
function Mo(e, t, n, r) {
  return new Qie(e, t, n, r);
}
function NC(e) {
  return e = e.prototype, !(!e || !e.isReactComponent);
}
function Jie(e) {
  if (typeof e == "function")
    return NC(e) ? 1 : 0;
  if (e != null) {
    if (e = e.$$typeof, e === ZE)
      return 11;
    if (e === QE)
      return 14;
  }
  return 2;
}
function Nl(e, t) {
  var n = e.alternate;
  return n === null ? (n = Mo(e.tag, t, e.key, e.mode), n.elementType = e.elementType, n.type = e.type, n.stateNode = e.stateNode, n.alternate = e, e.alternate = n) : (n.pendingProps = t, n.type = e.type, n.flags = 0, n.subtreeFlags = 0, n.deletions = null), n.flags = e.flags & 14680064, n.childLanes = e.childLanes, n.lanes = e.lanes, n.child = e.child, n.memoizedProps = e.memoizedProps, n.memoizedState = e.memoizedState, n.updateQueue = e.updateQueue, t = e.dependencies, n.dependencies = t === null ? null : { lanes: t.lanes, firstContext: t.firstContext }, n.sibling = e.sibling, n.index = e.index, n.ref = e.ref, n;
}
function Pg(e, t, n, r, o, i) {
  var a = 2;
  if (r = e, typeof e == "function")
    NC(e) && (a = 1);
  else if (typeof e == "string")
    a = 5;
  else
    e:
      switch (e) {
        case Vu:
          return $s(n.children, o, i, t);
        case XE:
          a = 8, o |= 8;
          break;
        case j0:
          return e = Mo(12, n, t, o | 2), e.elementType = j0, e.lanes = i, e;
        case N0:
          return e = Mo(13, n, t, o), e.elementType = N0, e.lanes = i, e;
        case $0:
          return e = Mo(19, n, t, o), e.elementType = $0, e.lanes = i, e;
        case EF:
          return Qw(n, o, i, t);
        default:
          if (typeof e == "object" && e !== null)
            switch (e.$$typeof) {
              case _F:
                a = 10;
                break e;
              case OF:
                a = 9;
                break e;
              case ZE:
                a = 11;
                break e;
              case QE:
                a = 14;
                break e;
              case pl:
                a = 16, r = null;
                break e;
            }
          throw Error(ge(130, e == null ? e : typeof e, ""));
      }
  return t = Mo(a, n, t, o), t.elementType = e, t.type = r, t.lanes = i, t;
}
function $s(e, t, n, r) {
  return e = Mo(7, e, r, t), e.lanes = n, e;
}
function Qw(e, t, n, r) {
  return e = Mo(22, e, r, t), e.elementType = EF, e.lanes = n, e.stateNode = { isHidden: !1 }, e;
}
function Hk(e, t, n) {
  return e = Mo(6, e, null, t), e.lanes = n, e;
}
function Wk(e, t, n) {
  return t = Mo(4, e.children !== null ? e.children : [], e.key, t), t.lanes = n, t.stateNode = { containerInfo: e.containerInfo, pendingChildren: null, implementation: e.implementation }, t;
}
function eae(e, t, n, r, o) {
  this.tag = t, this.containerInfo = e, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = _k(0), this.expirationTimes = _k(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = _k(0), this.identifierPrefix = r, this.onRecoverableError = o, this.mutableSourceEagerHydrationData = null;
}
function $C(e, t, n, r, o, i, a, l, s) {
  return e = new eae(e, t, n, l, s), t === 1 ? (t = 1, i === !0 && (t |= 8)) : t = 0, i = Mo(3, null, null, t), e.current = i, i.stateNode = e, i.memoizedState = { element: r, isDehydrated: n, cache: null, transitions: null, pendingSuspenseBoundaries: null }, gC(i), e;
}
function tae(e, t, n) {
  var r = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
  return { $$typeof: Wu, key: r == null ? null : "" + r, children: e, containerInfo: t, implementation: n };
}
function vM(e) {
  if (!e)
    return Dl;
  e = e._reactInternals;
  e: {
    if (Ks(e) !== e || e.tag !== 1)
      throw Error(ge(170));
    var t = e;
    do {
      switch (t.tag) {
        case 3:
          t = t.stateNode.context;
          break e;
        case 1:
          if (Mr(t.type)) {
            t = t.stateNode.__reactInternalMemoizedMergedChildContext;
            break e;
          }
      }
      t = t.return;
    } while (t !== null);
    throw Error(ge(171));
  }
  if (e.tag === 1) {
    var n = e.type;
    if (Mr(n))
      return y6(e, n, t);
  }
  return t;
}
function bM(e, t, n, r, o, i, a, l, s) {
  return e = $C(n, r, !0, e, o, i, a, l, s), e.context = vM(null), n = e.current, r = Sr(), o = jl(n), i = Sa(r, o), i.callback = t ?? null, Rl(n, i, o), e.current.lanes = o, Pp(e, o, r), Br(e, r), e;
}
function Jw(e, t, n, r) {
  var o = t.current, i = Sr(), a = jl(o);
  return n = vM(n), t.context === null ? t.context = n : t.pendingContext = n, t = Sa(i, a), t.payload = { element: e }, r = r === void 0 ? null : r, r !== null && (t.callback = r), e = Rl(o, t, a), e !== null && (fi(e, o, a, i), Sg(e, o, a)), a;
}
function Ry(e) {
  if (e = e.current, !e.child)
    return null;
  switch (e.child.tag) {
    case 5:
      return e.child.stateNode;
    default:
      return e.child.stateNode;
  }
}
function z1(e, t) {
  if (e = e.memoizedState, e !== null && e.dehydrated !== null) {
    var n = e.retryLane;
    e.retryLane = n !== 0 && n < t ? n : t;
  }
}
function IC(e, t) {
  z1(e, t), (e = e.alternate) && z1(e, t);
}
function nae() {
  return null;
}
var wM = typeof reportError == "function" ? reportError : function(e) {
  console.error(e);
};
function AC(e) {
  this._internalRoot = e;
}
ex.prototype.render = AC.prototype.render = function(e) {
  var t = this._internalRoot;
  if (t === null)
    throw Error(ge(409));
  Jw(e, t, null, null);
};
ex.prototype.unmount = AC.prototype.unmount = function() {
  var e = this._internalRoot;
  if (e !== null) {
    this._internalRoot = null;
    var t = e.containerInfo;
    Bs(function() {
      Jw(null, e, null, null);
    }), t[Oa] = null;
  }
};
function ex(e) {
  this._internalRoot = e;
}
ex.prototype.unstable_scheduleHydration = function(e) {
  if (e) {
    var t = XF();
    e = { blockedOn: null, target: e, priority: t };
    for (var n = 0; n < hl.length && t !== 0 && t < hl[n].priority; n++)
      ;
    hl.splice(n, 0, e), n === 0 && QF(e);
  }
};
function zC(e) {
  return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11);
}
function tx(e) {
  return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11 && (e.nodeType !== 8 || e.nodeValue !== " react-mount-point-unstable "));
}
function L1() {
}
function rae(e, t, n, r, o) {
  if (o) {
    if (typeof r == "function") {
      var i = r;
      r = function() {
        var c = Ry(a);
        i.call(c);
      };
    }
    var a = bM(t, r, e, 0, null, !1, !1, "", L1);
    return e._reactRootContainer = a, e[Oa] = a.current, np(e.nodeType === 8 ? e.parentNode : e), Bs(), a;
  }
  for (; o = e.lastChild; )
    e.removeChild(o);
  if (typeof r == "function") {
    var l = r;
    r = function() {
      var c = Ry(s);
      l.call(c);
    };
  }
  var s = $C(e, 0, !1, null, null, !1, !1, "", L1);
  return e._reactRootContainer = s, e[Oa] = s.current, np(e.nodeType === 8 ? e.parentNode : e), Bs(function() {
    Jw(t, s, n, r);
  }), s;
}
function nx(e, t, n, r, o) {
  var i = n._reactRootContainer;
  if (i) {
    var a = i;
    if (typeof o == "function") {
      var l = o;
      o = function() {
        var s = Ry(a);
        l.call(s);
      };
    }
    Jw(t, a, e, o);
  } else
    a = rae(n, t, e, o, r);
  return Ry(a);
}
KF = function(e) {
  switch (e.tag) {
    case 3:
      var t = e.stateNode;
      if (t.current.memoizedState.isDehydrated) {
        var n = md(t.pendingLanes);
        n !== 0 && (tC(t, n | 1), Br(t, yn()), !(xt & 6) && (Ec = yn() + 500, ql()));
      }
      break;
    case 13:
      Bs(function() {
        var r = Ea(e, 1);
        if (r !== null) {
          var o = Sr();
          fi(r, e, 1, o);
        }
      }), IC(e, 1);
  }
};
nC = function(e) {
  if (e.tag === 13) {
    var t = Ea(e, 134217728);
    if (t !== null) {
      var n = Sr();
      fi(t, e, 134217728, n);
    }
    IC(e, 134217728);
  }
};
YF = function(e) {
  if (e.tag === 13) {
    var t = jl(e), n = Ea(e, t);
    if (n !== null) {
      var r = Sr();
      fi(n, e, t, r);
    }
    IC(e, t);
  }
};
XF = function() {
  return It;
};
ZF = function(e, t) {
  var n = It;
  try {
    return It = e, t();
  } finally {
    It = n;
  }
};
H0 = function(e, t, n) {
  switch (t) {
    case "input":
      if (z0(e, n), t = n.name, n.type === "radio" && t != null) {
        for (n = e; n.parentNode; )
          n = n.parentNode;
        for (n = n.querySelectorAll("input[name=" + JSON.stringify("" + t) + '][type="radio"]'), t = 0; t < n.length; t++) {
          var r = n[t];
          if (r !== e && r.form === e.form) {
            var o = qw(r);
            if (!o)
              throw Error(ge(90));
            PF(r), z0(r, o);
          }
        }
      }
      break;
    case "textarea":
      TF(e, n);
      break;
    case "select":
      t = n.value, t != null && sc(e, !!n.multiple, t, !1);
  }
};
LF = RC;
DF = Bs;
var oae = { usingClientEntryPoint: !1, Events: [Tp, Yu, qw, AF, zF, RC] }, Hf = { findFiberByHostInstance: _s, bundleType: 0, version: "18.2.0", rendererPackageName: "react-dom" }, iae = { bundleType: Hf.bundleType, version: Hf.version, rendererPackageName: Hf.rendererPackageName, rendererConfig: Hf.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: za.ReactCurrentDispatcher, findHostInstanceByFiber: function(e) {
  return e = BF(e), e === null ? null : e.stateNode;
}, findFiberByHostInstance: Hf.findFiberByHostInstance || nae, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.2.0-next-9e3b772b8-20220608" };
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
  var ch = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  if (!ch.isDisabled && ch.supportsFiber)
    try {
      Uw = ch.inject(iae), Vi = ch;
    } catch {
    }
}
xo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = oae;
xo.createPortal = function(e, t) {
  var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
  if (!zC(t))
    throw Error(ge(200));
  return tae(e, t, null, n);
};
xo.createRoot = function(e, t) {
  if (!zC(e))
    throw Error(ge(299));
  var n = !1, r = "", o = wM;
  return t != null && (t.unstable_strictMode === !0 && (n = !0), t.identifierPrefix !== void 0 && (r = t.identifierPrefix), t.onRecoverableError !== void 0 && (o = t.onRecoverableError)), t = $C(e, 1, !1, null, null, n, !1, r, o), e[Oa] = t.current, np(e.nodeType === 8 ? e.parentNode : e), new AC(t);
};
xo.findDOMNode = function(e) {
  if (e == null)
    return null;
  if (e.nodeType === 1)
    return e;
  var t = e._reactInternals;
  if (t === void 0)
    throw typeof e.render == "function" ? Error(ge(188)) : (e = Object.keys(e).join(","), Error(ge(268, e)));
  return e = BF(t), e = e === null ? null : e.stateNode, e;
};
xo.flushSync = function(e) {
  return Bs(e);
};
xo.hydrate = function(e, t, n) {
  if (!tx(t))
    throw Error(ge(200));
  return nx(null, e, t, !0, n);
};
xo.hydrateRoot = function(e, t, n) {
  if (!zC(e))
    throw Error(ge(405));
  var r = n != null && n.hydratedSources || null, o = !1, i = "", a = wM;
  if (n != null && (n.unstable_strictMode === !0 && (o = !0), n.identifierPrefix !== void 0 && (i = n.identifierPrefix), n.onRecoverableError !== void 0 && (a = n.onRecoverableError)), t = bM(t, null, e, 1, n ?? null, o, !1, i, a), e[Oa] = t.current, np(e), r)
    for (e = 0; e < r.length; e++)
      n = r[e], o = n._getVersion, o = o(n._source), t.mutableSourceEagerHydrationData == null ? t.mutableSourceEagerHydrationData = [n, o] : t.mutableSourceEagerHydrationData.push(
        n,
        o
      );
  return new ex(t);
};
xo.render = function(e, t, n) {
  if (!tx(t))
    throw Error(ge(200));
  return nx(null, e, t, !1, n);
};
xo.unmountComponentAtNode = function(e) {
  if (!tx(e))
    throw Error(ge(40));
  return e._reactRootContainer ? (Bs(function() {
    nx(null, null, e, !1, function() {
      e._reactRootContainer = null, e[Oa] = null;
    });
  }), !0) : !1;
};
xo.unstable_batchedUpdates = RC;
xo.unstable_renderSubtreeIntoContainer = function(e, t, n, r) {
  if (!tx(n))
    throw Error(ge(200));
  if (e == null || e._reactInternals === void 0)
    throw Error(ge(38));
  return nx(e, t, n, !1, r);
};
xo.version = "18.2.0-next-9e3b772b8-20220608";
function xM() {
  if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
    try {
      __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xM);
    } catch (e) {
      console.error(e);
    }
}
xM(), bF.exports = xo;
var La = bF.exports;
const Vk = /* @__PURE__ */ BE(La);
var D1 = La;
R0.createRoot = D1.createRoot, R0.hydrateRoot = D1.hydrateRoot;
var Kc = {};
/**
 * @license React
 * react-dom-server-legacy.browser.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var SM = b;
function ot(e) {
  for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++)
    t += "&args[]=" + encodeURIComponent(arguments[n]);
  return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
var $r = Object.prototype.hasOwnProperty, aae = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, F1 = {}, M1 = {};
function kM(e) {
  return $r.call(M1, e) ? !0 : $r.call(F1, e) ? !1 : aae.test(e) ? M1[e] = !0 : (F1[e] = !0, !1);
}
function Or(e, t, n, r, o, i, a) {
  this.acceptsBooleans = t === 2 || t === 3 || t === 4, this.attributeName = r, this.attributeNamespace = o, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = i, this.removeEmptyString = a;
}
var Gn = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) {
  Gn[e] = new Or(e, 0, !1, e, null, !1, !1);
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) {
  var t = e[0];
  Gn[t] = new Or(t, 1, !1, e[1], null, !1, !1);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) {
  Gn[e] = new Or(e, 2, !1, e.toLowerCase(), null, !1, !1);
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) {
  Gn[e] = new Or(e, 2, !1, e, null, !1, !1);
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e) {
  Gn[e] = new Or(e, 3, !1, e.toLowerCase(), null, !1, !1);
});
["checked", "multiple", "muted", "selected"].forEach(function(e) {
  Gn[e] = new Or(e, 3, !0, e, null, !1, !1);
});
["capture", "download"].forEach(function(e) {
  Gn[e] = new Or(e, 4, !1, e, null, !1, !1);
});
["cols", "rows", "size", "span"].forEach(function(e) {
  Gn[e] = new Or(e, 6, !1, e, null, !1, !1);
});
["rowSpan", "start"].forEach(function(e) {
  Gn[e] = new Or(e, 5, !1, e.toLowerCase(), null, !1, !1);
});
var LC = /[\-:]([a-z])/g;
function DC(e) {
  return e[1].toUpperCase();
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e) {
  var t = e.replace(
    LC,
    DC
  );
  Gn[t] = new Or(t, 1, !1, e, null, !1, !1);
});
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e) {
  var t = e.replace(LC, DC);
  Gn[t] = new Or(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
});
["xml:base", "xml:lang", "xml:space"].forEach(function(e) {
  var t = e.replace(LC, DC);
  Gn[t] = new Or(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
});
["tabIndex", "crossOrigin"].forEach(function(e) {
  Gn[e] = new Or(e, 1, !1, e.toLowerCase(), null, !1, !1);
});
Gn.xlinkHref = new Or("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function(e) {
  Gn[e] = new Or(e, 1, !1, e.toLowerCase(), null, !0, !0);
});
var Rg = {
  animationIterationCount: !0,
  aspectRatio: !0,
  borderImageOutset: !0,
  borderImageSlice: !0,
  borderImageWidth: !0,
  boxFlex: !0,
  boxFlexGroup: !0,
  boxOrdinalGroup: !0,
  columnCount: !0,
  columns: !0,
  flex: !0,
  flexGrow: !0,
  flexPositive: !0,
  flexShrink: !0,
  flexNegative: !0,
  flexOrder: !0,
  gridArea: !0,
  gridRow: !0,
  gridRowEnd: !0,
  gridRowSpan: !0,
  gridRowStart: !0,
  gridColumn: !0,
  gridColumnEnd: !0,
  gridColumnSpan: !0,
  gridColumnStart: !0,
  fontWeight: !0,
  lineClamp: !0,
  lineHeight: !0,
  opacity: !0,
  order: !0,
  orphans: !0,
  tabSize: !0,
  widows: !0,
  zIndex: !0,
  zoom: !0,
  fillOpacity: !0,
  floodOpacity: !0,
  stopOpacity: !0,
  strokeDasharray: !0,
  strokeDashoffset: !0,
  strokeMiterlimit: !0,
  strokeOpacity: !0,
  strokeWidth: !0
}, lae = ["Webkit", "ms", "Moz", "O"];
Object.keys(Rg).forEach(function(e) {
  lae.forEach(function(t) {
    t = t + e.charAt(0).toUpperCase() + e.substring(1), Rg[t] = Rg[e];
  });
});
var sae = /["'&<>]/;
function br(e) {
  if (typeof e == "boolean" || typeof e == "number")
    return "" + e;
  e = "" + e;
  var t = sae.exec(e);
  if (t) {
    var n = "", r, o = 0;
    for (r = t.index; r < e.length; r++) {
      switch (e.charCodeAt(r)) {
        case 34:
          t = "&quot;";
          break;
        case 38:
          t = "&amp;";
          break;
        case 39:
          t = "&#x27;";
          break;
        case 60:
          t = "&lt;";
          break;
        case 62:
          t = "&gt;";
          break;
        default:
          continue;
      }
      o !== r && (n += e.substring(o, r)), o = r + 1, n += t;
    }
    e = o !== r ? n + e.substring(o, r) : n;
  }
  return e;
}
var uae = /([A-Z])/g, cae = /^ms-/, SO = Array.isArray;
function pa(e, t) {
  return { insertionMode: e, selectedValue: t };
}
function fae(e, t, n) {
  switch (t) {
    case "select":
      return pa(1, n.value != null ? n.value : n.defaultValue);
    case "svg":
      return pa(2, null);
    case "math":
      return pa(3, null);
    case "foreignObject":
      return pa(1, null);
    case "table":
      return pa(4, null);
    case "thead":
    case "tbody":
    case "tfoot":
      return pa(5, null);
    case "colgroup":
      return pa(7, null);
    case "tr":
      return pa(6, null);
  }
  return 4 <= e.insertionMode || e.insertionMode === 0 ? pa(1, null) : e;
}
var B1 = /* @__PURE__ */ new Map();
function _M(e, t, n) {
  if (typeof n != "object")
    throw Error(ot(62));
  t = !0;
  for (var r in n)
    if ($r.call(n, r)) {
      var o = n[r];
      if (o != null && typeof o != "boolean" && o !== "") {
        if (r.indexOf("--") === 0) {
          var i = br(r);
          o = br(("" + o).trim());
        } else {
          i = r;
          var a = B1.get(i);
          a !== void 0 || (a = br(i.replace(uae, "-$1").toLowerCase().replace(cae, "-ms-")), B1.set(i, a)), i = a, o = typeof o == "number" ? o === 0 || $r.call(Rg, r) ? "" + o : o + "px" : br(("" + o).trim());
        }
        t ? (t = !1, e.push(' style="', i, ":", o)) : e.push(";", i, ":", o);
      }
    }
  t || e.push('"');
}
function to(e, t, n, r) {
  switch (n) {
    case "style":
      _M(e, t, r);
      return;
    case "defaultValue":
    case "defaultChecked":
    case "innerHTML":
    case "suppressContentEditableWarning":
    case "suppressHydrationWarning":
      return;
  }
  if (!(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N") {
    if (t = Gn.hasOwnProperty(n) ? Gn[n] : null, t !== null) {
      switch (typeof r) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (!t.acceptsBooleans)
            return;
      }
      switch (n = t.attributeName, t.type) {
        case 3:
          r && e.push(" ", n, '=""');
          break;
        case 4:
          r === !0 ? e.push(" ", n, '=""') : r !== !1 && e.push(" ", n, '="', br(r), '"');
          break;
        case 5:
          isNaN(r) || e.push(" ", n, '="', br(r), '"');
          break;
        case 6:
          !isNaN(r) && 1 <= r && e.push(" ", n, '="', br(r), '"');
          break;
        default:
          t.sanitizeURL && (r = "" + r), e.push(" ", n, '="', br(r), '"');
      }
    } else if (kM(n)) {
      switch (typeof r) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (t = n.toLowerCase().slice(0, 5), t !== "data-" && t !== "aria-")
            return;
      }
      e.push(" ", n, '="', br(r), '"');
    }
  }
}
function Tg(e, t, n) {
  if (t != null) {
    if (n != null)
      throw Error(ot(60));
    if (typeof t != "object" || !("__html" in t))
      throw Error(ot(61));
    t = t.__html, t != null && e.push("" + t);
  }
}
function dae(e) {
  var t = "";
  return SM.Children.forEach(e, function(n) {
    n != null && (t += n);
  }), t;
}
function qk(e, t, n, r) {
  e.push(Ci(n));
  var o = n = null, i;
  for (i in t)
    if ($r.call(t, i)) {
      var a = t[i];
      if (a != null)
        switch (i) {
          case "children":
            n = a;
            break;
          case "dangerouslySetInnerHTML":
            o = a;
            break;
          default:
            to(e, r, i, a);
        }
    }
  return e.push(">"), Tg(e, o, n), typeof n == "string" ? (e.push(br(n)), null) : n;
}
var pae = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, U1 = /* @__PURE__ */ new Map();
function Ci(e) {
  var t = U1.get(e);
  if (t === void 0) {
    if (!pae.test(e))
      throw Error(ot(65, e));
    t = "<" + e, U1.set(e, t);
  }
  return t;
}
function mae(e, t, n, r, o) {
  switch (t) {
    case "select":
      e.push(Ci("select"));
      var i = null, a = null;
      for (p in n)
        if ($r.call(n, p)) {
          var l = n[p];
          if (l != null)
            switch (p) {
              case "children":
                i = l;
                break;
              case "dangerouslySetInnerHTML":
                a = l;
                break;
              case "defaultValue":
              case "value":
                break;
              default:
                to(e, r, p, l);
            }
        }
      return e.push(">"), Tg(e, a, i), i;
    case "option":
      a = o.selectedValue, e.push(Ci("option"));
      var s = l = null, c = null, p = null;
      for (i in n)
        if ($r.call(n, i)) {
          var f = n[i];
          if (f != null)
            switch (i) {
              case "children":
                l = f;
                break;
              case "selected":
                c = f;
                break;
              case "dangerouslySetInnerHTML":
                p = f;
                break;
              case "value":
                s = f;
              default:
                to(e, r, i, f);
            }
        }
      if (a != null)
        if (n = s !== null ? "" + s : dae(l), SO(a)) {
          for (r = 0; r < a.length; r++)
            if ("" + a[r] === n) {
              e.push(' selected=""');
              break;
            }
        } else
          "" + a === n && e.push(' selected=""');
      else
        c && e.push(' selected=""');
      return e.push(">"), Tg(e, p, l), l;
    case "textarea":
      e.push(Ci("textarea")), p = a = i = null;
      for (l in n)
        if ($r.call(n, l) && (s = n[l], s != null))
          switch (l) {
            case "children":
              p = s;
              break;
            case "value":
              i = s;
              break;
            case "defaultValue":
              a = s;
              break;
            case "dangerouslySetInnerHTML":
              throw Error(ot(91));
            default:
              to(
                e,
                r,
                l,
                s
              );
          }
      if (i === null && a !== null && (i = a), e.push(">"), p != null) {
        if (i != null)
          throw Error(ot(92));
        if (SO(p) && 1 < p.length)
          throw Error(ot(93));
        i = "" + p;
      }
      return typeof i == "string" && i[0] === `
` && e.push(`
`), i !== null && e.push(br("" + i)), null;
    case "input":
      e.push(Ci("input")), s = p = l = i = null;
      for (a in n)
        if ($r.call(n, a) && (c = n[a], c != null))
          switch (a) {
            case "children":
            case "dangerouslySetInnerHTML":
              throw Error(ot(399, "input"));
            case "defaultChecked":
              s = c;
              break;
            case "defaultValue":
              l = c;
              break;
            case "checked":
              p = c;
              break;
            case "value":
              i = c;
              break;
            default:
              to(e, r, a, c);
          }
      return p !== null ? to(e, r, "checked", p) : s !== null && to(e, r, "checked", s), i !== null ? to(e, r, "value", i) : l !== null && to(e, r, "value", l), e.push("/>"), null;
    case "menuitem":
      e.push(Ci("menuitem"));
      for (var m in n)
        if ($r.call(n, m) && (i = n[m], i != null))
          switch (m) {
            case "children":
            case "dangerouslySetInnerHTML":
              throw Error(ot(400));
            default:
              to(e, r, m, i);
          }
      return e.push(">"), null;
    case "title":
      e.push(Ci("title")), i = null;
      for (f in n)
        if ($r.call(n, f) && (a = n[f], a != null))
          switch (f) {
            case "children":
              i = a;
              break;
            case "dangerouslySetInnerHTML":
              throw Error(ot(434));
            default:
              to(e, r, f, a);
          }
      return e.push(">"), i;
    case "listing":
    case "pre":
      e.push(Ci(t)), a = i = null;
      for (s in n)
        if ($r.call(n, s) && (l = n[s], l != null))
          switch (s) {
            case "children":
              i = l;
              break;
            case "dangerouslySetInnerHTML":
              a = l;
              break;
            default:
              to(e, r, s, l);
          }
      if (e.push(">"), a != null) {
        if (i != null)
          throw Error(ot(60));
        if (typeof a != "object" || !("__html" in a))
          throw Error(ot(61));
        n = a.__html, n != null && (typeof n == "string" && 0 < n.length && n[0] === `
` ? e.push(`
`, n) : e.push("" + n));
      }
      return typeof i == "string" && i[0] === `
` && e.push(`
`), i;
    case "area":
    case "base":
    case "br":
    case "col":
    case "embed":
    case "hr":
    case "img":
    case "keygen":
    case "link":
    case "meta":
    case "param":
    case "source":
    case "track":
    case "wbr":
      e.push(Ci(t));
      for (var h in n)
        if ($r.call(n, h) && (i = n[h], i != null))
          switch (h) {
            case "children":
            case "dangerouslySetInnerHTML":
              throw Error(ot(399, t));
            default:
              to(e, r, h, i);
          }
      return e.push("/>"), null;
    case "annotation-xml":
    case "color-profile":
    case "font-face":
    case "font-face-src":
    case "font-face-uri":
    case "font-face-format":
    case "font-face-name":
    case "missing-glyph":
      return qk(
        e,
        n,
        t,
        r
      );
    case "html":
      return o.insertionMode === 0 && e.push("<!DOCTYPE html>"), qk(e, n, t, r);
    default:
      if (t.indexOf("-") === -1 && typeof n.is != "string")
        return qk(e, n, t, r);
      e.push(Ci(t)), a = i = null;
      for (c in n)
        if ($r.call(n, c) && (l = n[c], l != null))
          switch (c) {
            case "children":
              i = l;
              break;
            case "dangerouslySetInnerHTML":
              a = l;
              break;
            case "style":
              _M(e, r, l);
              break;
            case "suppressContentEditableWarning":
            case "suppressHydrationWarning":
              break;
            default:
              kM(c) && typeof l != "function" && typeof l != "symbol" && e.push(" ", c, '="', br(l), '"');
          }
      return e.push(">"), Tg(e, a, i), i;
  }
}
function H1(e, t, n) {
  if (e.push('<!--$?--><template id="'), n === null)
    throw Error(ot(395));
  return e.push(n), e.push('"></template>');
}
function hae(e, t, n, r) {
  switch (n.insertionMode) {
    case 0:
    case 1:
      return e.push('<div hidden id="'), e.push(t.segmentPrefix), t = r.toString(16), e.push(t), e.push('">');
    case 2:
      return e.push('<svg aria-hidden="true" style="display:none" id="'), e.push(t.segmentPrefix), t = r.toString(16), e.push(t), e.push('">');
    case 3:
      return e.push('<math aria-hidden="true" style="display:none" id="'), e.push(t.segmentPrefix), t = r.toString(16), e.push(t), e.push('">');
    case 4:
      return e.push('<table hidden id="'), e.push(t.segmentPrefix), t = r.toString(16), e.push(t), e.push('">');
    case 5:
      return e.push('<table hidden><tbody id="'), e.push(t.segmentPrefix), t = r.toString(16), e.push(t), e.push('">');
    case 6:
      return e.push('<table hidden><tr id="'), e.push(t.segmentPrefix), t = r.toString(16), e.push(t), e.push('">');
    case 7:
      return e.push('<table hidden><colgroup id="'), e.push(t.segmentPrefix), t = r.toString(16), e.push(t), e.push('">');
    default:
      throw Error(ot(397));
  }
}
function gae(e, t) {
  switch (t.insertionMode) {
    case 0:
    case 1:
      return e.push("</div>");
    case 2:
      return e.push("</svg>");
    case 3:
      return e.push("</math>");
    case 4:
      return e.push("</table>");
    case 5:
      return e.push("</tbody></table>");
    case 6:
      return e.push("</tr></table>");
    case 7:
      return e.push("</colgroup></table>");
    default:
      throw Error(ot(397));
  }
}
var yae = /[<\u2028\u2029]/g;
function Gk(e) {
  return JSON.stringify(e).replace(yae, function(t) {
    switch (t) {
      case "<":
        return "\\u003c";
      case "\u2028":
        return "\\u2028";
      case "\u2029":
        return "\\u2029";
      default:
        throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
    }
  });
}
function vae(e, t) {
  return t = t === void 0 ? "" : t, { bootstrapChunks: [], startInlineScript: "<script>", placeholderPrefix: t + "P:", segmentPrefix: t + "S:", boundaryPrefix: t + "B:", idPrefix: t, nextSuspenseID: 0, sentCompleteSegmentFunction: !1, sentCompleteBoundaryFunction: !1, sentClientRenderFunction: !1, generateStaticMarkup: e };
}
function W1(e, t, n, r) {
  return n.generateStaticMarkup ? (e.push(br(t)), !1) : (t === "" ? e = r : (r && e.push("<!-- -->"), e.push(br(t)), e = !0), e);
}
var zd = Object.assign, bae = Symbol.for("react.element"), OM = Symbol.for("react.portal"), EM = Symbol.for("react.fragment"), CM = Symbol.for("react.strict_mode"), PM = Symbol.for("react.profiler"), RM = Symbol.for("react.provider"), TM = Symbol.for("react.context"), jM = Symbol.for("react.forward_ref"), NM = Symbol.for("react.suspense"), $M = Symbol.for("react.suspense_list"), IM = Symbol.for("react.memo"), FC = Symbol.for("react.lazy"), wae = Symbol.for("react.scope"), xae = Symbol.for("react.debug_trace_mode"), Sae = Symbol.for("react.legacy_hidden"), kae = Symbol.for("react.default_value"), V1 = Symbol.iterator;
function kO(e) {
  if (e == null)
    return null;
  if (typeof e == "function")
    return e.displayName || e.name || null;
  if (typeof e == "string")
    return e;
  switch (e) {
    case EM:
      return "Fragment";
    case OM:
      return "Portal";
    case PM:
      return "Profiler";
    case CM:
      return "StrictMode";
    case NM:
      return "Suspense";
    case $M:
      return "SuspenseList";
  }
  if (typeof e == "object")
    switch (e.$$typeof) {
      case TM:
        return (e.displayName || "Context") + ".Consumer";
      case RM:
        return (e._context.displayName || "Context") + ".Provider";
      case jM:
        var t = e.render;
        return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
      case IM:
        return t = e.displayName || null, t !== null ? t : kO(e.type) || "Memo";
      case FC:
        t = e._payload, e = e._init;
        try {
          return kO(e(t));
        } catch {
        }
    }
  return null;
}
var AM = {};
function q1(e, t) {
  if (e = e.contextTypes, !e)
    return AM;
  var n = {}, r;
  for (r in e)
    n[r] = t[r];
  return n;
}
var Cs = null;
function rx(e, t) {
  if (e !== t) {
    e.context._currentValue2 = e.parentValue, e = e.parent;
    var n = t.parent;
    if (e === null) {
      if (n !== null)
        throw Error(ot(401));
    } else {
      if (n === null)
        throw Error(ot(401));
      rx(e, n);
    }
    t.context._currentValue2 = t.value;
  }
}
function zM(e) {
  e.context._currentValue2 = e.parentValue, e = e.parent, e !== null && zM(e);
}
function LM(e) {
  var t = e.parent;
  t !== null && LM(t), e.context._currentValue2 = e.value;
}
function DM(e, t) {
  if (e.context._currentValue2 = e.parentValue, e = e.parent, e === null)
    throw Error(ot(402));
  e.depth === t.depth ? rx(e, t) : DM(e, t);
}
function FM(e, t) {
  var n = t.parent;
  if (n === null)
    throw Error(ot(402));
  e.depth === n.depth ? rx(e, n) : FM(e, n), t.context._currentValue2 = t.value;
}
function Ty(e) {
  var t = Cs;
  t !== e && (t === null ? LM(e) : e === null ? zM(t) : t.depth === e.depth ? rx(t, e) : t.depth > e.depth ? DM(t, e) : FM(t, e), Cs = e);
}
var G1 = { isMounted: function() {
  return !1;
}, enqueueSetState: function(e, t) {
  e = e._reactInternals, e.queue !== null && e.queue.push(t);
}, enqueueReplaceState: function(e, t) {
  e = e._reactInternals, e.replace = !0, e.queue = [t];
}, enqueueForceUpdate: function() {
} };
function K1(e, t, n, r) {
  var o = e.state !== void 0 ? e.state : null;
  e.updater = G1, e.props = n, e.state = o;
  var i = { queue: [], replace: !1 };
  e._reactInternals = i;
  var a = t.contextType;
  if (e.context = typeof a == "object" && a !== null ? a._currentValue2 : r, a = t.getDerivedStateFromProps, typeof a == "function" && (a = a(n, o), o = a == null ? o : zd({}, o, a), e.state = o), typeof t.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function" && (typeof e.UNSAFE_componentWillMount == "function" || typeof e.componentWillMount == "function"))
    if (t = e.state, typeof e.componentWillMount == "function" && e.componentWillMount(), typeof e.UNSAFE_componentWillMount == "function" && e.UNSAFE_componentWillMount(), t !== e.state && G1.enqueueReplaceState(e, e.state, null), i.queue !== null && 0 < i.queue.length)
      if (t = i.queue, a = i.replace, i.queue = null, i.replace = !1, a && t.length === 1)
        e.state = t[0];
      else {
        for (i = a ? t[0] : e.state, o = !0, a = a ? 1 : 0; a < t.length; a++) {
          var l = t[a];
          l = typeof l == "function" ? l.call(e, i, n, r) : l, l != null && (o ? (o = !1, i = zd({}, i, l)) : zd(i, l));
        }
        e.state = i;
      }
    else
      i.queue = null;
}
var _ae = { id: 1, overflow: "" };
function _O(e, t, n) {
  var r = e.id;
  e = e.overflow;
  var o = 32 - jg(r) - 1;
  r &= ~(1 << o), n += 1;
  var i = 32 - jg(t) + o;
  if (30 < i) {
    var a = o - o % 5;
    return i = (r & (1 << a) - 1).toString(32), r >>= a, o -= a, { id: 1 << 32 - jg(t) + o | n << o | r, overflow: i + e };
  }
  return { id: 1 << i | n << o | r, overflow: e };
}
var jg = Math.clz32 ? Math.clz32 : Cae, Oae = Math.log, Eae = Math.LN2;
function Cae(e) {
  return e >>>= 0, e === 0 ? 32 : 31 - (Oae(e) / Eae | 0) | 0;
}
function Pae(e, t) {
  return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
}
var Rae = typeof Object.is == "function" ? Object.is : Pae, Pa = null, MC = null, Ng = null, Ht = null, gd = !1, jy = !1, fp = 0, bl = null, ox = 0;
function ys() {
  if (Pa === null)
    throw Error(ot(321));
  return Pa;
}
function Y1() {
  if (0 < ox)
    throw Error(ot(312));
  return { memoizedState: null, queue: null, next: null };
}
function BC() {
  return Ht === null ? Ng === null ? (gd = !1, Ng = Ht = Y1()) : (gd = !0, Ht = Ng) : Ht.next === null ? (gd = !1, Ht = Ht.next = Y1()) : (gd = !0, Ht = Ht.next), Ht;
}
function UC() {
  MC = Pa = null, jy = !1, Ng = null, ox = 0, Ht = bl = null;
}
function MM(e, t) {
  return typeof t == "function" ? t(e) : t;
}
function X1(e, t, n) {
  if (Pa = ys(), Ht = BC(), gd) {
    var r = Ht.queue;
    if (t = r.dispatch, bl !== null && (n = bl.get(r), n !== void 0)) {
      bl.delete(r), r = Ht.memoizedState;
      do
        r = e(r, n.action), n = n.next;
      while (n !== null);
      return Ht.memoizedState = r, [r, t];
    }
    return [Ht.memoizedState, t];
  }
  return e = e === MM ? typeof t == "function" ? t() : t : n !== void 0 ? n(t) : t, Ht.memoizedState = e, e = Ht.queue = { last: null, dispatch: null }, e = e.dispatch = Tae.bind(null, Pa, e), [Ht.memoizedState, e];
}
function Z1(e, t) {
  if (Pa = ys(), Ht = BC(), t = t === void 0 ? null : t, Ht !== null) {
    var n = Ht.memoizedState;
    if (n !== null && t !== null) {
      var r = n[1];
      e:
        if (r === null)
          r = !1;
        else {
          for (var o = 0; o < r.length && o < t.length; o++)
            if (!Rae(t[o], r[o])) {
              r = !1;
              break e;
            }
          r = !0;
        }
      if (r)
        return n[0];
    }
  }
  return e = e(), Ht.memoizedState = [e, t], e;
}
function Tae(e, t, n) {
  if (25 <= ox)
    throw Error(ot(301));
  if (e === Pa)
    if (jy = !0, e = { action: n, next: null }, bl === null && (bl = /* @__PURE__ */ new Map()), n = bl.get(t), n === void 0)
      bl.set(t, e);
    else {
      for (t = n; t.next !== null; )
        t = t.next;
      t.next = e;
    }
}
function jae() {
  throw Error(ot(394));
}
function fh() {
}
var Q1 = { readContext: function(e) {
  return e._currentValue2;
}, useContext: function(e) {
  return ys(), e._currentValue2;
}, useMemo: Z1, useReducer: X1, useRef: function(e) {
  Pa = ys(), Ht = BC();
  var t = Ht.memoizedState;
  return t === null ? (e = { current: e }, Ht.memoizedState = e) : t;
}, useState: function(e) {
  return X1(MM, e);
}, useInsertionEffect: fh, useLayoutEffect: function() {
}, useCallback: function(e, t) {
  return Z1(function() {
    return e;
  }, t);
}, useImperativeHandle: fh, useEffect: fh, useDebugValue: fh, useDeferredValue: function(e) {
  return ys(), e;
}, useTransition: function() {
  return ys(), [
    !1,
    jae
  ];
}, useId: function() {
  var e = MC.treeContext, t = e.overflow;
  e = e.id, e = (e & ~(1 << 32 - jg(e) - 1)).toString(32) + t;
  var n = $g;
  if (n === null)
    throw Error(ot(404));
  return t = fp++, e = ":" + n.idPrefix + "R" + e, 0 < t && (e += "H" + t.toString(32)), e + ":";
}, useMutableSource: function(e, t) {
  return ys(), t(e._source);
}, useSyncExternalStore: function(e, t, n) {
  if (n === void 0)
    throw Error(ot(407));
  return n();
} }, $g = null, Kk = SM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
function Nae(e) {
  return console.error(e), null;
}
function yd() {
}
function $ae(e, t, n, r, o, i, a, l, s) {
  var c = [], p = /* @__PURE__ */ new Set();
  return t = { destination: null, responseState: t, progressiveChunkSize: r === void 0 ? 12800 : r, status: 0, fatalError: null, nextSegmentId: 0, allPendingTasks: 0, pendingRootTasks: 0, completedRootSegment: null, abortableTasks: p, pingedTasks: c, clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], onError: o === void 0 ? Nae : o, onAllReady: i === void 0 ? yd : i, onShellReady: a === void 0 ? yd : a, onShellError: l === void 0 ? yd : l, onFatalError: s === void 0 ? yd : s }, n = Ny(t, 0, null, n, !1, !1), n.parentFlushed = !0, e = HC(t, e, null, n, p, AM, null, _ae), c.push(e), t;
}
function HC(e, t, n, r, o, i, a, l) {
  e.allPendingTasks++, n === null ? e.pendingRootTasks++ : n.pendingTasks++;
  var s = { node: t, ping: function() {
    var c = e.pingedTasks;
    c.push(s), c.length === 1 && HM(e);
  }, blockedBoundary: n, blockedSegment: r, abortSet: o, legacyContext: i, context: a, treeContext: l };
  return o.add(s), s;
}
function Ny(e, t, n, r, o, i) {
  return { status: 0, id: -1, index: t, parentFlushed: !1, chunks: [], children: [], formatContext: r, boundary: n, lastPushedText: o, textEmbedded: i };
}
function dp(e, t) {
  if (e = e.onError(t), e != null && typeof e != "string")
    throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + typeof e + '" instead');
  return e;
}
function $y(e, t) {
  var n = e.onShellError;
  n(t), n = e.onFatalError, n(t), e.destination !== null ? (e.status = 2, e.destination.destroy(t)) : (e.status = 1, e.fatalError = t);
}
function J1(e, t, n, r, o) {
  for (Pa = {}, MC = t, fp = 0, e = n(r, o); jy; )
    jy = !1, fp = 0, ox += 1, Ht = null, e = n(r, o);
  return UC(), e;
}
function eN(e, t, n, r) {
  var o = n.render(), i = r.childContextTypes;
  if (i != null) {
    var a = t.legacyContext;
    if (typeof n.getChildContext != "function")
      r = a;
    else {
      n = n.getChildContext();
      for (var l in n)
        if (!(l in i))
          throw Error(ot(108, kO(r) || "Unknown", l));
      r = zd({}, a, n);
    }
    t.legacyContext = r, ao(e, t, o), t.legacyContext = a;
  } else
    ao(e, t, o);
}
function tN(e, t) {
  if (e && e.defaultProps) {
    t = zd({}, t), e = e.defaultProps;
    for (var n in e)
      t[n] === void 0 && (t[n] = e[n]);
    return t;
  }
  return t;
}
function OO(e, t, n, r, o) {
  if (typeof n == "function")
    if (n.prototype && n.prototype.isReactComponent) {
      o = q1(n, t.legacyContext);
      var i = n.contextType;
      i = new n(r, typeof i == "object" && i !== null ? i._currentValue2 : o), K1(i, n, r, o), eN(e, t, i, n);
    } else {
      i = q1(n, t.legacyContext), o = J1(e, t, n, r, i);
      var a = fp !== 0;
      if (typeof o == "object" && o !== null && typeof o.render == "function" && o.$$typeof === void 0)
        K1(o, n, r, i), eN(e, t, o, n);
      else if (a) {
        r = t.treeContext, t.treeContext = _O(r, 1, 0);
        try {
          ao(e, t, o);
        } finally {
          t.treeContext = r;
        }
      } else
        ao(e, t, o);
    }
  else if (typeof n == "string") {
    switch (o = t.blockedSegment, i = mae(o.chunks, n, r, e.responseState, o.formatContext), o.lastPushedText = !1, a = o.formatContext, o.formatContext = fae(a, n, r), EO(e, t, i), o.formatContext = a, n) {
      case "area":
      case "base":
      case "br":
      case "col":
      case "embed":
      case "hr":
      case "img":
      case "input":
      case "keygen":
      case "link":
      case "meta":
      case "param":
      case "source":
      case "track":
      case "wbr":
        break;
      default:
        o.chunks.push("</", n, ">");
    }
    o.lastPushedText = !1;
  } else {
    switch (n) {
      case Sae:
      case xae:
      case CM:
      case PM:
      case EM:
        ao(e, t, r.children);
        return;
      case $M:
        ao(e, t, r.children);
        return;
      case wae:
        throw Error(ot(343));
      case NM:
        e: {
          n = t.blockedBoundary, o = t.blockedSegment, i = r.fallback, r = r.children, a = /* @__PURE__ */ new Set();
          var l = { id: null, rootSegmentID: -1, parentFlushed: !1, pendingTasks: 0, forceClientRender: !1, completedSegments: [], byteSize: 0, fallbackAbortableTasks: a, errorDigest: null }, s = Ny(e, o.chunks.length, l, o.formatContext, !1, !1);
          o.children.push(s), o.lastPushedText = !1;
          var c = Ny(e, 0, null, o.formatContext, !1, !1);
          c.parentFlushed = !0, t.blockedBoundary = l, t.blockedSegment = c;
          try {
            if (EO(
              e,
              t,
              r
            ), e.responseState.generateStaticMarkup || c.lastPushedText && c.textEmbedded && c.chunks.push("<!-- -->"), c.status = 1, Iy(l, c), l.pendingTasks === 0)
              break e;
          } catch (p) {
            c.status = 4, l.forceClientRender = !0, l.errorDigest = dp(e, p);
          } finally {
            t.blockedBoundary = n, t.blockedSegment = o;
          }
          t = HC(e, i, n, s, a, t.legacyContext, t.context, t.treeContext), e.pingedTasks.push(t);
        }
        return;
    }
    if (typeof n == "object" && n !== null)
      switch (n.$$typeof) {
        case jM:
          if (r = J1(e, t, n.render, r, o), fp !== 0) {
            n = t.treeContext, t.treeContext = _O(n, 1, 0);
            try {
              ao(e, t, r);
            } finally {
              t.treeContext = n;
            }
          } else
            ao(e, t, r);
          return;
        case IM:
          n = n.type, r = tN(n, r), OO(e, t, n, r, o);
          return;
        case RM:
          if (o = r.children, n = n._context, r = r.value, i = n._currentValue2, n._currentValue2 = r, a = Cs, Cs = r = { parent: a, depth: a === null ? 0 : a.depth + 1, context: n, parentValue: i, value: r }, t.context = r, ao(e, t, o), e = Cs, e === null)
            throw Error(ot(403));
          r = e.parentValue, e.context._currentValue2 = r === kae ? e.context._defaultValue : r, e = Cs = e.parent, t.context = e;
          return;
        case TM:
          r = r.children, r = r(n._currentValue2), ao(e, t, r);
          return;
        case FC:
          o = n._init, n = o(n._payload), r = tN(n, r), OO(
            e,
            t,
            n,
            r,
            void 0
          );
          return;
      }
    throw Error(ot(130, n == null ? n : typeof n, ""));
  }
}
function ao(e, t, n) {
  if (t.node = n, typeof n == "object" && n !== null) {
    switch (n.$$typeof) {
      case bae:
        OO(e, t, n.type, n.props, n.ref);
        return;
      case OM:
        throw Error(ot(257));
      case FC:
        var r = n._init;
        n = r(n._payload), ao(e, t, n);
        return;
    }
    if (SO(n)) {
      nN(e, t, n);
      return;
    }
    if (n === null || typeof n != "object" ? r = null : (r = V1 && n[V1] || n["@@iterator"], r = typeof r == "function" ? r : null), r && (r = r.call(n))) {
      if (n = r.next(), !n.done) {
        var o = [];
        do
          o.push(n.value), n = r.next();
        while (!n.done);
        nN(e, t, o);
      }
      return;
    }
    throw e = Object.prototype.toString.call(n), Error(ot(31, e === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : e));
  }
  typeof n == "string" ? (r = t.blockedSegment, r.lastPushedText = W1(t.blockedSegment.chunks, n, e.responseState, r.lastPushedText)) : typeof n == "number" && (r = t.blockedSegment, r.lastPushedText = W1(t.blockedSegment.chunks, "" + n, e.responseState, r.lastPushedText));
}
function nN(e, t, n) {
  for (var r = n.length, o = 0; o < r; o++) {
    var i = t.treeContext;
    t.treeContext = _O(i, r, o);
    try {
      EO(e, t, n[o]);
    } finally {
      t.treeContext = i;
    }
  }
}
function EO(e, t, n) {
  var r = t.blockedSegment.formatContext, o = t.legacyContext, i = t.context;
  try {
    return ao(e, t, n);
  } catch (s) {
    if (UC(), typeof s == "object" && s !== null && typeof s.then == "function") {
      n = s;
      var a = t.blockedSegment, l = Ny(e, a.chunks.length, null, a.formatContext, a.lastPushedText, !0);
      a.children.push(l), a.lastPushedText = !1, e = HC(e, t.node, t.blockedBoundary, l, t.abortSet, t.legacyContext, t.context, t.treeContext).ping, n.then(e, e), t.blockedSegment.formatContext = r, t.legacyContext = o, t.context = i, Ty(i);
    } else
      throw t.blockedSegment.formatContext = r, t.legacyContext = o, t.context = i, Ty(i), s;
  }
}
function Iae(e) {
  var t = e.blockedBoundary;
  e = e.blockedSegment, e.status = 3, UM(this, t, e);
}
function BM(e, t, n) {
  var r = e.blockedBoundary;
  e.blockedSegment.status = 3, r === null ? (t.allPendingTasks--, t.status !== 2 && (t.status = 2, t.destination !== null && t.destination.push(null))) : (r.pendingTasks--, r.forceClientRender || (r.forceClientRender = !0, e = n === void 0 ? Error(ot(432)) : n, r.errorDigest = t.onError(e), r.parentFlushed && t.clientRenderedBoundaries.push(r)), r.fallbackAbortableTasks.forEach(function(o) {
    return BM(o, t, n);
  }), r.fallbackAbortableTasks.clear(), t.allPendingTasks--, t.allPendingTasks === 0 && (r = t.onAllReady, r()));
}
function Iy(e, t) {
  if (t.chunks.length === 0 && t.children.length === 1 && t.children[0].boundary === null) {
    var n = t.children[0];
    n.id = t.id, n.parentFlushed = !0, n.status === 1 && Iy(e, n);
  } else
    e.completedSegments.push(t);
}
function UM(e, t, n) {
  if (t === null) {
    if (n.parentFlushed) {
      if (e.completedRootSegment !== null)
        throw Error(ot(389));
      e.completedRootSegment = n;
    }
    e.pendingRootTasks--, e.pendingRootTasks === 0 && (e.onShellError = yd, t = e.onShellReady, t());
  } else
    t.pendingTasks--, t.forceClientRender || (t.pendingTasks === 0 ? (n.parentFlushed && n.status === 1 && Iy(t, n), t.parentFlushed && e.completedBoundaries.push(t), t.fallbackAbortableTasks.forEach(Iae, e), t.fallbackAbortableTasks.clear()) : n.parentFlushed && n.status === 1 && (Iy(t, n), t.completedSegments.length === 1 && t.parentFlushed && e.partialBoundaries.push(t)));
  e.allPendingTasks--, e.allPendingTasks === 0 && (e = e.onAllReady, e());
}
function HM(e) {
  if (e.status !== 2) {
    var t = Cs, n = Kk.current;
    Kk.current = Q1;
    var r = $g;
    $g = e.responseState;
    try {
      var o = e.pingedTasks, i;
      for (i = 0; i < o.length; i++) {
        var a = o[i], l = e, s = a.blockedSegment;
        if (s.status === 0) {
          Ty(a.context);
          try {
            ao(l, a, a.node), l.responseState.generateStaticMarkup || s.lastPushedText && s.textEmbedded && s.chunks.push("<!-- -->"), a.abortSet.delete(a), s.status = 1, UM(l, a.blockedBoundary, s);
          } catch (g) {
            if (UC(), typeof g == "object" && g !== null && typeof g.then == "function") {
              var c = a.ping;
              g.then(c, c);
            } else {
              a.abortSet.delete(a), s.status = 4;
              var p = a.blockedBoundary, f = g, m = dp(l, f);
              if (p === null ? $y(l, f) : (p.pendingTasks--, p.forceClientRender || (p.forceClientRender = !0, p.errorDigest = m, p.parentFlushed && l.clientRenderedBoundaries.push(p))), l.allPendingTasks--, l.allPendingTasks === 0) {
                var h = l.onAllReady;
                h();
              }
            }
          } finally {
          }
        }
      }
      o.splice(0, i), e.destination !== null && WC(e, e.destination);
    } catch (g) {
      dp(e, g), $y(e, g);
    } finally {
      $g = r, Kk.current = n, n === Q1 && Ty(t);
    }
  }
}
function dh(e, t, n) {
  switch (n.parentFlushed = !0, n.status) {
    case 0:
      var r = n.id = e.nextSegmentId++;
      return n.lastPushedText = !1, n.textEmbedded = !1, e = e.responseState, t.push('<template id="'), t.push(e.placeholderPrefix), e = r.toString(16), t.push(e), t.push('"></template>');
    case 1:
      n.status = 2;
      var o = !0;
      r = n.chunks;
      var i = 0;
      n = n.children;
      for (var a = 0; a < n.length; a++) {
        for (o = n[a]; i < o.index; i++)
          t.push(r[i]);
        o = ix(e, t, o);
      }
      for (; i < r.length - 1; i++)
        t.push(r[i]);
      return i < r.length && (o = t.push(r[i])), o;
    default:
      throw Error(ot(390));
  }
}
function ix(e, t, n) {
  var r = n.boundary;
  if (r === null)
    return dh(e, t, n);
  if (r.parentFlushed = !0, r.forceClientRender)
    return e.responseState.generateStaticMarkup || (r = r.errorDigest, t.push("<!--$!-->"), t.push("<template"), r && (t.push(' data-dgst="'), r = br(r), t.push(r), t.push('"')), t.push("></template>")), dh(e, t, n), e = e.responseState.generateStaticMarkup ? !0 : t.push("<!--/$-->"), e;
  if (0 < r.pendingTasks) {
    r.rootSegmentID = e.nextSegmentId++, 0 < r.completedSegments.length && e.partialBoundaries.push(r);
    var o = e.responseState, i = o.nextSuspenseID++;
    return o = o.boundaryPrefix + i.toString(16), r = r.id = o, H1(t, e.responseState, r), dh(e, t, n), t.push("<!--/$-->");
  }
  if (r.byteSize > e.progressiveChunkSize)
    return r.rootSegmentID = e.nextSegmentId++, e.completedBoundaries.push(r), H1(t, e.responseState, r.id), dh(e, t, n), t.push("<!--/$-->");
  if (e.responseState.generateStaticMarkup || t.push("<!--$-->"), n = r.completedSegments, n.length !== 1)
    throw Error(ot(391));
  return ix(e, t, n[0]), e = e.responseState.generateStaticMarkup ? !0 : t.push("<!--/$-->"), e;
}
function rN(e, t, n) {
  return hae(t, e.responseState, n.formatContext, n.id), ix(e, t, n), gae(t, n.formatContext);
}
function oN(e, t, n) {
  for (var r = n.completedSegments, o = 0; o < r.length; o++)
    WM(e, t, n, r[o]);
  if (r.length = 0, e = e.responseState, r = n.id, n = n.rootSegmentID, t.push(e.startInlineScript), e.sentCompleteBoundaryFunction ? t.push('$RC("') : (e.sentCompleteBoundaryFunction = !0, t.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')), r === null)
    throw Error(ot(395));
  return n = n.toString(16), t.push(r), t.push('","'), t.push(e.segmentPrefix), t.push(n), t.push('")<\/script>');
}
function WM(e, t, n, r) {
  if (r.status === 2)
    return !0;
  var o = r.id;
  if (o === -1) {
    if ((r.id = n.rootSegmentID) === -1)
      throw Error(ot(392));
    return rN(e, t, r);
  }
  return rN(e, t, r), e = e.responseState, t.push(e.startInlineScript), e.sentCompleteSegmentFunction ? t.push('$RS("') : (e.sentCompleteSegmentFunction = !0, t.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')), t.push(e.segmentPrefix), o = o.toString(16), t.push(o), t.push('","'), t.push(e.placeholderPrefix), t.push(o), t.push('")<\/script>');
}
function WC(e, t) {
  try {
    var n = e.completedRootSegment;
    if (n !== null && e.pendingRootTasks === 0) {
      ix(e, t, n), e.completedRootSegment = null;
      var r = e.responseState.bootstrapChunks;
      for (n = 0; n < r.length - 1; n++)
        t.push(r[n]);
      n < r.length && t.push(r[n]);
    }
    var o = e.clientRenderedBoundaries, i;
    for (i = 0; i < o.length; i++) {
      var a = o[i];
      r = t;
      var l = e.responseState, s = a.id, c = a.errorDigest, p = a.errorMessage, f = a.errorComponentStack;
      if (r.push(l.startInlineScript), l.sentClientRenderFunction ? r.push('$RX("') : (l.sentClientRenderFunction = !0, r.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')), s === null)
        throw Error(ot(395));
      if (r.push(s), r.push('"'), c || p || f) {
        r.push(",");
        var m = Gk(c || "");
        r.push(m);
      }
      if (p || f) {
        r.push(",");
        var h = Gk(p || "");
        r.push(h);
      }
      if (f) {
        r.push(",");
        var g = Gk(f);
        r.push(g);
      }
      if (!r.push(")<\/script>")) {
        e.destination = null, i++, o.splice(0, i);
        return;
      }
    }
    o.splice(0, i);
    var v = e.completedBoundaries;
    for (i = 0; i < v.length; i++)
      if (!oN(e, t, v[i])) {
        e.destination = null, i++, v.splice(0, i);
        return;
      }
    v.splice(0, i);
    var S = e.partialBoundaries;
    for (i = 0; i < S.length; i++) {
      var w = S[i];
      e: {
        o = e, a = t;
        var x = w.completedSegments;
        for (l = 0; l < x.length; l++)
          if (!WM(o, a, w, x[l])) {
            l++, x.splice(0, l);
            var k = !1;
            break e;
          }
        x.splice(0, l), k = !0;
      }
      if (!k) {
        e.destination = null, i++, S.splice(0, i);
        return;
      }
    }
    S.splice(0, i);
    var E = e.completedBoundaries;
    for (i = 0; i < E.length; i++)
      if (!oN(e, t, E[i])) {
        e.destination = null, i++, E.splice(0, i);
        return;
      }
    E.splice(0, i);
  } finally {
    e.allPendingTasks === 0 && e.pingedTasks.length === 0 && e.clientRenderedBoundaries.length === 0 && e.completedBoundaries.length === 0 && t.push(null);
  }
}
function Aae(e, t) {
  try {
    var n = e.abortableTasks;
    n.forEach(function(r) {
      return BM(r, e, t);
    }), n.clear(), e.destination !== null && WC(e, e.destination);
  } catch (r) {
    dp(e, r), $y(e, r);
  }
}
function zae() {
}
function VM(e, t, n, r) {
  var o = !1, i = null, a = "", l = { push: function(c) {
    return c !== null && (a += c), !0;
  }, destroy: function(c) {
    o = !0, i = c;
  } }, s = !1;
  if (e = $ae(e, vae(n, t ? t.identifierPrefix : void 0), { insertionMode: 1, selectedValue: null }, 1 / 0, zae, void 0, function() {
    s = !0;
  }, void 0, void 0), HM(e), Aae(e, r), e.status === 1)
    e.status = 2, l.destroy(e.fatalError);
  else if (e.status !== 2 && e.destination === null) {
    e.destination = l;
    try {
      WC(e, l);
    } catch (c) {
      dp(e, c), $y(e, c);
    }
  }
  if (o)
    throw i;
  if (!s)
    throw Error(ot(426));
  return a;
}
Kc.renderToNodeStream = function() {
  throw Error(ot(207));
};
Kc.renderToStaticMarkup = function(e, t) {
  return VM(e, t, !0, 'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server');
};
Kc.renderToStaticNodeStream = function() {
  throw Error(ot(208));
};
Kc.renderToString = function(e, t) {
  return VM(e, t, !1, 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server');
};
Kc.version = "18.2.0";
var VC = {};
/**
 * @license React
 * react-dom-server.browser.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var qM = b;
function ct(e) {
  for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++)
    t += "&args[]=" + encodeURIComponent(arguments[n]);
  return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
}
var lo = null, so = 0;
function Ue(e, t) {
  if (t.length !== 0)
    if (512 < t.length)
      0 < so && (e.enqueue(new Uint8Array(lo.buffer, 0, so)), lo = new Uint8Array(512), so = 0), e.enqueue(t);
    else {
      var n = lo.length - so;
      n < t.length && (n === 0 ? e.enqueue(lo) : (lo.set(t.subarray(0, n), so), e.enqueue(lo), t = t.subarray(n)), lo = new Uint8Array(512), so = 0), lo.set(t, so), so += t.length;
    }
}
function Xt(e, t) {
  return Ue(e, t), !0;
}
function iN(e) {
  lo && 0 < so && (e.enqueue(new Uint8Array(lo.buffer, 0, so)), lo = null, so = 0);
}
var GM = new TextEncoder();
function dt(e) {
  return GM.encode(e);
}
function je(e) {
  return GM.encode(e);
}
function KM(e, t) {
  typeof e.error == "function" ? e.error(t) : e.close();
}
var Ir = Object.prototype.hasOwnProperty, Lae = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, aN = {}, lN = {};
function YM(e) {
  return Ir.call(lN, e) ? !0 : Ir.call(aN, e) ? !1 : Lae.test(e) ? lN[e] = !0 : (aN[e] = !0, !1);
}
function Er(e, t, n, r, o, i, a) {
  this.acceptsBooleans = t === 2 || t === 3 || t === 4, this.attributeName = r, this.attributeNamespace = o, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = i, this.removeEmptyString = a;
}
var Kn = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) {
  Kn[e] = new Er(e, 0, !1, e, null, !1, !1);
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) {
  var t = e[0];
  Kn[t] = new Er(t, 1, !1, e[1], null, !1, !1);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) {
  Kn[e] = new Er(e, 2, !1, e.toLowerCase(), null, !1, !1);
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) {
  Kn[e] = new Er(e, 2, !1, e, null, !1, !1);
});
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e) {
  Kn[e] = new Er(e, 3, !1, e.toLowerCase(), null, !1, !1);
});
["checked", "multiple", "muted", "selected"].forEach(function(e) {
  Kn[e] = new Er(e, 3, !0, e, null, !1, !1);
});
["capture", "download"].forEach(function(e) {
  Kn[e] = new Er(e, 4, !1, e, null, !1, !1);
});
["cols", "rows", "size", "span"].forEach(function(e) {
  Kn[e] = new Er(e, 6, !1, e, null, !1, !1);
});
["rowSpan", "start"].forEach(function(e) {
  Kn[e] = new Er(e, 5, !1, e.toLowerCase(), null, !1, !1);
});
var qC = /[\-:]([a-z])/g;
function GC(e) {
  return e[1].toUpperCase();
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e) {
  var t = e.replace(
    qC,
    GC
  );
  Kn[t] = new Er(t, 1, !1, e, null, !1, !1);
});
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e) {
  var t = e.replace(qC, GC);
  Kn[t] = new Er(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
});
["xml:base", "xml:lang", "xml:space"].forEach(function(e) {
  var t = e.replace(qC, GC);
  Kn[t] = new Er(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
});
["tabIndex", "crossOrigin"].forEach(function(e) {
  Kn[e] = new Er(e, 1, !1, e.toLowerCase(), null, !1, !1);
});
Kn.xlinkHref = new Er("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
["src", "href", "action", "formAction"].forEach(function(e) {
  Kn[e] = new Er(e, 1, !1, e.toLowerCase(), null, !0, !0);
});
var Ig = {
  animationIterationCount: !0,
  aspectRatio: !0,
  borderImageOutset: !0,
  borderImageSlice: !0,
  borderImageWidth: !0,
  boxFlex: !0,
  boxFlexGroup: !0,
  boxOrdinalGroup: !0,
  columnCount: !0,
  columns: !0,
  flex: !0,
  flexGrow: !0,
  flexPositive: !0,
  flexShrink: !0,
  flexNegative: !0,
  flexOrder: !0,
  gridArea: !0,
  gridRow: !0,
  gridRowEnd: !0,
  gridRowSpan: !0,
  gridRowStart: !0,
  gridColumn: !0,
  gridColumnEnd: !0,
  gridColumnSpan: !0,
  gridColumnStart: !0,
  fontWeight: !0,
  lineClamp: !0,
  lineHeight: !0,
  opacity: !0,
  order: !0,
  orphans: !0,
  tabSize: !0,
  widows: !0,
  zIndex: !0,
  zoom: !0,
  fillOpacity: !0,
  floodOpacity: !0,
  stopOpacity: !0,
  strokeDasharray: !0,
  strokeDashoffset: !0,
  strokeMiterlimit: !0,
  strokeOpacity: !0,
  strokeWidth: !0
}, Dae = ["Webkit", "ms", "Moz", "O"];
Object.keys(Ig).forEach(function(e) {
  Dae.forEach(function(t) {
    t = t + e.charAt(0).toUpperCase() + e.substring(1), Ig[t] = Ig[e];
  });
});
var Fae = /["'&<>]/;
function Wn(e) {
  if (typeof e == "boolean" || typeof e == "number")
    return "" + e;
  e = "" + e;
  var t = Fae.exec(e);
  if (t) {
    var n = "", r, o = 0;
    for (r = t.index; r < e.length; r++) {
      switch (e.charCodeAt(r)) {
        case 34:
          t = "&quot;";
          break;
        case 38:
          t = "&amp;";
          break;
        case 39:
          t = "&#x27;";
          break;
        case 60:
          t = "&lt;";
          break;
        case 62:
          t = "&gt;";
          break;
        default:
          continue;
      }
      o !== r && (n += e.substring(o, r)), o = r + 1, n += t;
    }
    e = o !== r ? n + e.substring(o, r) : n;
  }
  return e;
}
var Mae = /([A-Z])/g, Bae = /^ms-/, CO = Array.isArray, Uae = je("<script>"), Hae = je("<\/script>"), Wae = je('<script src="'), Vae = je('<script type="module" src="'), sN = je('" async=""><\/script>'), qae = /(<\/|<)(s)(cript)/gi;
function Gae(e, t, n, r) {
  return "" + t + (n === "s" ? "\\u0073" : "\\u0053") + r;
}
function Kae(e, t, n, r, o) {
  e = e === void 0 ? "" : e, t = t === void 0 ? Uae : je('<script nonce="' + Wn(t) + '">');
  var i = [];
  if (n !== void 0 && i.push(t, dt(("" + n).replace(qae, Gae)), Hae), r !== void 0)
    for (n = 0; n < r.length; n++)
      i.push(Wae, dt(Wn(r[n])), sN);
  if (o !== void 0)
    for (r = 0; r < o.length; r++)
      i.push(Vae, dt(Wn(o[r])), sN);
  return { bootstrapChunks: i, startInlineScript: t, placeholderPrefix: je(e + "P:"), segmentPrefix: je(e + "S:"), boundaryPrefix: e + "B:", idPrefix: e, nextSuspenseID: 0, sentCompleteSegmentFunction: !1, sentCompleteBoundaryFunction: !1, sentClientRenderFunction: !1 };
}
function Pi(e, t) {
  return { insertionMode: e, selectedValue: t };
}
function Yae(e) {
  return Pi(e === "http://www.w3.org/2000/svg" ? 2 : e === "http://www.w3.org/1998/Math/MathML" ? 3 : 0, null);
}
function Xae(e, t, n) {
  switch (t) {
    case "select":
      return Pi(1, n.value != null ? n.value : n.defaultValue);
    case "svg":
      return Pi(2, null);
    case "math":
      return Pi(3, null);
    case "foreignObject":
      return Pi(1, null);
    case "table":
      return Pi(4, null);
    case "thead":
    case "tbody":
    case "tfoot":
      return Pi(5, null);
    case "colgroup":
      return Pi(7, null);
    case "tr":
      return Pi(6, null);
  }
  return 4 <= e.insertionMode || e.insertionMode === 0 ? Pi(1, null) : e;
}
var KC = je("<!-- -->");
function uN(e, t, n, r) {
  return t === "" ? r : (r && e.push(KC), e.push(dt(Wn(t))), !0);
}
var cN = /* @__PURE__ */ new Map(), Zae = je(' style="'), fN = je(":"), Qae = je(";");
function XM(e, t, n) {
  if (typeof n != "object")
    throw Error(ct(62));
  t = !0;
  for (var r in n)
    if (Ir.call(n, r)) {
      var o = n[r];
      if (o != null && typeof o != "boolean" && o !== "") {
        if (r.indexOf("--") === 0) {
          var i = dt(Wn(r));
          o = dt(Wn(("" + o).trim()));
        } else {
          i = r;
          var a = cN.get(i);
          a !== void 0 || (a = je(Wn(i.replace(Mae, "-$1").toLowerCase().replace(Bae, "-ms-"))), cN.set(i, a)), i = a, o = typeof o == "number" ? o === 0 || Ir.call(Ig, r) ? dt("" + o) : dt(o + "px") : dt(Wn(("" + o).trim()));
        }
        t ? (t = !1, e.push(Zae, i, fN, o)) : e.push(Qae, i, fN, o);
      }
    }
  t || e.push(vs);
}
var fl = je(" "), Lu = je('="'), vs = je('"'), dN = je('=""');
function no(e, t, n, r) {
  switch (n) {
    case "style":
      XM(e, t, r);
      return;
    case "defaultValue":
    case "defaultChecked":
    case "innerHTML":
    case "suppressContentEditableWarning":
    case "suppressHydrationWarning":
      return;
  }
  if (!(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N") {
    if (t = Kn.hasOwnProperty(n) ? Kn[n] : null, t !== null) {
      switch (typeof r) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (!t.acceptsBooleans)
            return;
      }
      switch (n = dt(t.attributeName), t.type) {
        case 3:
          r && e.push(fl, n, dN);
          break;
        case 4:
          r === !0 ? e.push(fl, n, dN) : r !== !1 && e.push(fl, n, Lu, dt(Wn(r)), vs);
          break;
        case 5:
          isNaN(r) || e.push(fl, n, Lu, dt(Wn(r)), vs);
          break;
        case 6:
          !isNaN(r) && 1 <= r && e.push(fl, n, Lu, dt(Wn(r)), vs);
          break;
        default:
          t.sanitizeURL && (r = "" + r), e.push(fl, n, Lu, dt(Wn(r)), vs);
      }
    } else if (YM(n)) {
      switch (typeof r) {
        case "function":
        case "symbol":
          return;
        case "boolean":
          if (t = n.toLowerCase().slice(0, 5), t !== "data-" && t !== "aria-")
            return;
      }
      e.push(fl, dt(n), Lu, dt(Wn(r)), vs);
    }
  }
}
var dl = je(">"), pN = je("/>");
function Ag(e, t, n) {
  if (t != null) {
    if (n != null)
      throw Error(ct(60));
    if (typeof t != "object" || !("__html" in t))
      throw Error(ct(61));
    t = t.__html, t != null && e.push(dt("" + t));
  }
}
function Jae(e) {
  var t = "";
  return qM.Children.forEach(e, function(n) {
    n != null && (t += n);
  }), t;
}
var Yk = je(' selected=""');
function Xk(e, t, n, r) {
  e.push(Ri(n));
  var o = n = null, i;
  for (i in t)
    if (Ir.call(t, i)) {
      var a = t[i];
      if (a != null)
        switch (i) {
          case "children":
            n = a;
            break;
          case "dangerouslySetInnerHTML":
            o = a;
            break;
          default:
            no(e, r, i, a);
        }
    }
  return e.push(dl), Ag(e, o, n), typeof n == "string" ? (e.push(dt(Wn(n))), null) : n;
}
var Zk = je(`
`), ele = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, mN = /* @__PURE__ */ new Map();
function Ri(e) {
  var t = mN.get(e);
  if (t === void 0) {
    if (!ele.test(e))
      throw Error(ct(65, e));
    t = je("<" + e), mN.set(e, t);
  }
  return t;
}
var tle = je("<!DOCTYPE html>");
function nle(e, t, n, r, o) {
  switch (t) {
    case "select":
      e.push(Ri("select"));
      var i = null, a = null;
      for (p in n)
        if (Ir.call(n, p)) {
          var l = n[p];
          if (l != null)
            switch (p) {
              case "children":
                i = l;
                break;
              case "dangerouslySetInnerHTML":
                a = l;
                break;
              case "defaultValue":
              case "value":
                break;
              default:
                no(e, r, p, l);
            }
        }
      return e.push(dl), Ag(e, a, i), i;
    case "option":
      a = o.selectedValue, e.push(Ri("option"));
      var s = l = null, c = null, p = null;
      for (i in n)
        if (Ir.call(n, i)) {
          var f = n[i];
          if (f != null)
            switch (i) {
              case "children":
                l = f;
                break;
              case "selected":
                c = f;
                break;
              case "dangerouslySetInnerHTML":
                p = f;
                break;
              case "value":
                s = f;
              default:
                no(e, r, i, f);
            }
        }
      if (a != null)
        if (n = s !== null ? "" + s : Jae(l), CO(a)) {
          for (r = 0; r < a.length; r++)
            if ("" + a[r] === n) {
              e.push(Yk);
              break;
            }
        } else
          "" + a === n && e.push(Yk);
      else
        c && e.push(Yk);
      return e.push(dl), Ag(e, p, l), l;
    case "textarea":
      e.push(Ri("textarea")), p = a = i = null;
      for (l in n)
        if (Ir.call(n, l) && (s = n[l], s != null))
          switch (l) {
            case "children":
              p = s;
              break;
            case "value":
              i = s;
              break;
            case "defaultValue":
              a = s;
              break;
            case "dangerouslySetInnerHTML":
              throw Error(ct(91));
            default:
              no(e, r, l, s);
          }
      if (i === null && a !== null && (i = a), e.push(dl), p != null) {
        if (i != null)
          throw Error(ct(92));
        if (CO(p) && 1 < p.length)
          throw Error(ct(93));
        i = "" + p;
      }
      return typeof i == "string" && i[0] === `
` && e.push(Zk), i !== null && e.push(dt(Wn("" + i))), null;
    case "input":
      e.push(Ri("input")), s = p = l = i = null;
      for (a in n)
        if (Ir.call(n, a) && (c = n[a], c != null))
          switch (a) {
            case "children":
            case "dangerouslySetInnerHTML":
              throw Error(ct(399, "input"));
            case "defaultChecked":
              s = c;
              break;
            case "defaultValue":
              l = c;
              break;
            case "checked":
              p = c;
              break;
            case "value":
              i = c;
              break;
            default:
              no(e, r, a, c);
          }
      return p !== null ? no(
        e,
        r,
        "checked",
        p
      ) : s !== null && no(e, r, "checked", s), i !== null ? no(e, r, "value", i) : l !== null && no(e, r, "value", l), e.push(pN), null;
    case "menuitem":
      e.push(Ri("menuitem"));
      for (var m in n)
        if (Ir.call(n, m) && (i = n[m], i != null))
          switch (m) {
            case "children":
            case "dangerouslySetInnerHTML":
              throw Error(ct(400));
            default:
              no(e, r, m, i);
          }
      return e.push(dl), null;
    case "title":
      e.push(Ri("title")), i = null;
      for (f in n)
        if (Ir.call(n, f) && (a = n[f], a != null))
          switch (f) {
            case "children":
              i = a;
              break;
            case "dangerouslySetInnerHTML":
              throw Error(ct(434));
            default:
              no(e, r, f, a);
          }
      return e.push(dl), i;
    case "listing":
    case "pre":
      e.push(Ri(t)), a = i = null;
      for (s in n)
        if (Ir.call(n, s) && (l = n[s], l != null))
          switch (s) {
            case "children":
              i = l;
              break;
            case "dangerouslySetInnerHTML":
              a = l;
              break;
            default:
              no(e, r, s, l);
          }
      if (e.push(dl), a != null) {
        if (i != null)
          throw Error(ct(60));
        if (typeof a != "object" || !("__html" in a))
          throw Error(ct(61));
        n = a.__html, n != null && (typeof n == "string" && 0 < n.length && n[0] === `
` ? e.push(Zk, dt(n)) : e.push(dt("" + n)));
      }
      return typeof i == "string" && i[0] === `
` && e.push(Zk), i;
    case "area":
    case "base":
    case "br":
    case "col":
    case "embed":
    case "hr":
    case "img":
    case "keygen":
    case "link":
    case "meta":
    case "param":
    case "source":
    case "track":
    case "wbr":
      e.push(Ri(t));
      for (var h in n)
        if (Ir.call(n, h) && (i = n[h], i != null))
          switch (h) {
            case "children":
            case "dangerouslySetInnerHTML":
              throw Error(ct(399, t));
            default:
              no(e, r, h, i);
          }
      return e.push(pN), null;
    case "annotation-xml":
    case "color-profile":
    case "font-face":
    case "font-face-src":
    case "font-face-uri":
    case "font-face-format":
    case "font-face-name":
    case "missing-glyph":
      return Xk(e, n, t, r);
    case "html":
      return o.insertionMode === 0 && e.push(tle), Xk(e, n, t, r);
    default:
      if (t.indexOf("-") === -1 && typeof n.is != "string")
        return Xk(e, n, t, r);
      e.push(Ri(t)), a = i = null;
      for (c in n)
        if (Ir.call(n, c) && (l = n[c], l != null))
          switch (c) {
            case "children":
              i = l;
              break;
            case "dangerouslySetInnerHTML":
              a = l;
              break;
            case "style":
              XM(e, r, l);
              break;
            case "suppressContentEditableWarning":
            case "suppressHydrationWarning":
              break;
            default:
              YM(c) && typeof l != "function" && typeof l != "symbol" && e.push(fl, dt(c), Lu, dt(Wn(l)), vs);
          }
      return e.push(dl), Ag(e, a, i), i;
  }
}
var rle = je("</"), ole = je(">"), ile = je('<template id="'), ale = je('"></template>'), lle = je("<!--$-->"), sle = je('<!--$?--><template id="'), ule = je('"></template>'), cle = je("<!--$!-->"), fle = je("<!--/$-->"), dle = je("<template"), ple = je('"'), mle = je(' data-dgst="');
je(' data-msg="');
je(' data-stck="');
var hle = je("></template>");
function hN(e, t, n) {
  if (Ue(e, sle), n === null)
    throw Error(ct(395));
  return Ue(e, n), Xt(e, ule);
}
var gle = je('<div hidden id="'), yle = je('">'), vle = je("</div>"), ble = je('<svg aria-hidden="true" style="display:none" id="'), wle = je('">'), xle = je("</svg>"), Sle = je('<math aria-hidden="true" style="display:none" id="'), kle = je('">'), _le = je("</math>"), Ole = je('<table hidden id="'), Ele = je('">'), Cle = je("</table>"), Ple = je('<table hidden><tbody id="'), Rle = je('">'), Tle = je("</tbody></table>"), jle = je('<table hidden><tr id="'), Nle = je('">'), $le = je("</tr></table>"), Ile = je('<table hidden><colgroup id="'), Ale = je('">'), zle = je("</colgroup></table>");
function Lle(e, t, n, r) {
  switch (n.insertionMode) {
    case 0:
    case 1:
      return Ue(e, gle), Ue(e, t.segmentPrefix), Ue(e, dt(r.toString(16))), Xt(e, yle);
    case 2:
      return Ue(e, ble), Ue(e, t.segmentPrefix), Ue(e, dt(r.toString(16))), Xt(e, wle);
    case 3:
      return Ue(e, Sle), Ue(e, t.segmentPrefix), Ue(e, dt(r.toString(16))), Xt(e, kle);
    case 4:
      return Ue(e, Ole), Ue(e, t.segmentPrefix), Ue(e, dt(r.toString(16))), Xt(e, Ele);
    case 5:
      return Ue(e, Ple), Ue(e, t.segmentPrefix), Ue(e, dt(r.toString(16))), Xt(e, Rle);
    case 6:
      return Ue(e, jle), Ue(e, t.segmentPrefix), Ue(e, dt(r.toString(16))), Xt(e, Nle);
    case 7:
      return Ue(
        e,
        Ile
      ), Ue(e, t.segmentPrefix), Ue(e, dt(r.toString(16))), Xt(e, Ale);
    default:
      throw Error(ct(397));
  }
}
function Dle(e, t) {
  switch (t.insertionMode) {
    case 0:
    case 1:
      return Xt(e, vle);
    case 2:
      return Xt(e, xle);
    case 3:
      return Xt(e, _le);
    case 4:
      return Xt(e, Cle);
    case 5:
      return Xt(e, Tle);
    case 6:
      return Xt(e, $le);
    case 7:
      return Xt(e, zle);
    default:
      throw Error(ct(397));
  }
}
var Fle = je('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'), Mle = je('$RS("'), Ble = je('","'), Ule = je('")<\/script>'), Hle = je('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'), Wle = je('$RC("'), Vle = je('","'), qle = je('")<\/script>'), Gle = je('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'), Kle = je('$RX("'), Yle = je('"'), Xle = je(")<\/script>"), Qk = je(","), Zle = /[<\u2028\u2029]/g;
function Jk(e) {
  return JSON.stringify(e).replace(Zle, function(t) {
    switch (t) {
      case "<":
        return "\\u003c";
      case "\u2028":
        return "\\u2028";
      case "\u2029":
        return "\\u2029";
      default:
        throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React");
    }
  });
}
var Ld = Object.assign, Qle = Symbol.for("react.element"), ZM = Symbol.for("react.portal"), QM = Symbol.for("react.fragment"), JM = Symbol.for("react.strict_mode"), e9 = Symbol.for("react.profiler"), t9 = Symbol.for("react.provider"), n9 = Symbol.for("react.context"), r9 = Symbol.for("react.forward_ref"), o9 = Symbol.for("react.suspense"), i9 = Symbol.for("react.suspense_list"), a9 = Symbol.for("react.memo"), YC = Symbol.for("react.lazy"), Jle = Symbol.for("react.scope"), ese = Symbol.for("react.debug_trace_mode"), tse = Symbol.for("react.legacy_hidden"), nse = Symbol.for("react.default_value"), gN = Symbol.iterator;
function PO(e) {
  if (e == null)
    return null;
  if (typeof e == "function")
    return e.displayName || e.name || null;
  if (typeof e == "string")
    return e;
  switch (e) {
    case QM:
      return "Fragment";
    case ZM:
      return "Portal";
    case e9:
      return "Profiler";
    case JM:
      return "StrictMode";
    case o9:
      return "Suspense";
    case i9:
      return "SuspenseList";
  }
  if (typeof e == "object")
    switch (e.$$typeof) {
      case n9:
        return (e.displayName || "Context") + ".Consumer";
      case t9:
        return (e._context.displayName || "Context") + ".Provider";
      case r9:
        var t = e.render;
        return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
      case a9:
        return t = e.displayName || null, t !== null ? t : PO(e.type) || "Memo";
      case YC:
        t = e._payload, e = e._init;
        try {
          return PO(e(t));
        } catch {
        }
    }
  return null;
}
var l9 = {};
function yN(e, t) {
  if (e = e.contextTypes, !e)
    return l9;
  var n = {}, r;
  for (r in e)
    n[r] = t[r];
  return n;
}
var Ps = null;
function ax(e, t) {
  if (e !== t) {
    e.context._currentValue = e.parentValue, e = e.parent;
    var n = t.parent;
    if (e === null) {
      if (n !== null)
        throw Error(ct(401));
    } else {
      if (n === null)
        throw Error(ct(401));
      ax(e, n);
    }
    t.context._currentValue = t.value;
  }
}
function s9(e) {
  e.context._currentValue = e.parentValue, e = e.parent, e !== null && s9(e);
}
function u9(e) {
  var t = e.parent;
  t !== null && u9(t), e.context._currentValue = e.value;
}
function c9(e, t) {
  if (e.context._currentValue = e.parentValue, e = e.parent, e === null)
    throw Error(ct(402));
  e.depth === t.depth ? ax(e, t) : c9(e, t);
}
function f9(e, t) {
  var n = t.parent;
  if (n === null)
    throw Error(ct(402));
  e.depth === n.depth ? ax(e, n) : f9(e, n), t.context._currentValue = t.value;
}
function Ay(e) {
  var t = Ps;
  t !== e && (t === null ? u9(e) : e === null ? s9(t) : t.depth === e.depth ? ax(t, e) : t.depth > e.depth ? c9(t, e) : f9(t, e), Ps = e);
}
var vN = { isMounted: function() {
  return !1;
}, enqueueSetState: function(e, t) {
  e = e._reactInternals, e.queue !== null && e.queue.push(t);
}, enqueueReplaceState: function(e, t) {
  e = e._reactInternals, e.replace = !0, e.queue = [t];
}, enqueueForceUpdate: function() {
} };
function bN(e, t, n, r) {
  var o = e.state !== void 0 ? e.state : null;
  e.updater = vN, e.props = n, e.state = o;
  var i = { queue: [], replace: !1 };
  e._reactInternals = i;
  var a = t.contextType;
  if (e.context = typeof a == "object" && a !== null ? a._currentValue : r, a = t.getDerivedStateFromProps, typeof a == "function" && (a = a(n, o), o = a == null ? o : Ld({}, o, a), e.state = o), typeof t.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function" && (typeof e.UNSAFE_componentWillMount == "function" || typeof e.componentWillMount == "function"))
    if (t = e.state, typeof e.componentWillMount == "function" && e.componentWillMount(), typeof e.UNSAFE_componentWillMount == "function" && e.UNSAFE_componentWillMount(), t !== e.state && vN.enqueueReplaceState(e, e.state, null), i.queue !== null && 0 < i.queue.length)
      if (t = i.queue, a = i.replace, i.queue = null, i.replace = !1, a && t.length === 1)
        e.state = t[0];
      else {
        for (i = a ? t[0] : e.state, o = !0, a = a ? 1 : 0; a < t.length; a++) {
          var l = t[a];
          l = typeof l == "function" ? l.call(e, i, n, r) : l, l != null && (o ? (o = !1, i = Ld({}, i, l)) : Ld(i, l));
        }
        e.state = i;
      }
    else
      i.queue = null;
}
var rse = { id: 1, overflow: "" };
function RO(e, t, n) {
  var r = e.id;
  e = e.overflow;
  var o = 32 - zg(r) - 1;
  r &= ~(1 << o), n += 1;
  var i = 32 - zg(t) + o;
  if (30 < i) {
    var a = o - o % 5;
    return i = (r & (1 << a) - 1).toString(32), r >>= a, o -= a, { id: 1 << 32 - zg(t) + o | n << o | r, overflow: i + e };
  }
  return { id: 1 << i | n << o | r, overflow: e };
}
var zg = Math.clz32 ? Math.clz32 : ase, ose = Math.log, ise = Math.LN2;
function ase(e) {
  return e >>>= 0, e === 0 ? 32 : 31 - (ose(e) / ise | 0) | 0;
}
function lse(e, t) {
  return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
}
var sse = typeof Object.is == "function" ? Object.is : lse, Ra = null, XC = null, Lg = null, Wt = null, vd = !1, zy = !1, pp = 0, wl = null, lx = 0;
function bs() {
  if (Ra === null)
    throw Error(ct(321));
  return Ra;
}
function wN() {
  if (0 < lx)
    throw Error(ct(312));
  return { memoizedState: null, queue: null, next: null };
}
function ZC() {
  return Wt === null ? Lg === null ? (vd = !1, Lg = Wt = wN()) : (vd = !0, Wt = Lg) : Wt.next === null ? (vd = !1, Wt = Wt.next = wN()) : (vd = !0, Wt = Wt.next), Wt;
}
function QC() {
  XC = Ra = null, zy = !1, Lg = null, lx = 0, Wt = wl = null;
}
function d9(e, t) {
  return typeof t == "function" ? t(e) : t;
}
function xN(e, t, n) {
  if (Ra = bs(), Wt = ZC(), vd) {
    var r = Wt.queue;
    if (t = r.dispatch, wl !== null && (n = wl.get(r), n !== void 0)) {
      wl.delete(r), r = Wt.memoizedState;
      do
        r = e(r, n.action), n = n.next;
      while (n !== null);
      return Wt.memoizedState = r, [r, t];
    }
    return [Wt.memoizedState, t];
  }
  return e = e === d9 ? typeof t == "function" ? t() : t : n !== void 0 ? n(t) : t, Wt.memoizedState = e, e = Wt.queue = { last: null, dispatch: null }, e = e.dispatch = use.bind(null, Ra, e), [Wt.memoizedState, e];
}
function SN(e, t) {
  if (Ra = bs(), Wt = ZC(), t = t === void 0 ? null : t, Wt !== null) {
    var n = Wt.memoizedState;
    if (n !== null && t !== null) {
      var r = n[1];
      e:
        if (r === null)
          r = !1;
        else {
          for (var o = 0; o < r.length && o < t.length; o++)
            if (!sse(t[o], r[o])) {
              r = !1;
              break e;
            }
          r = !0;
        }
      if (r)
        return n[0];
    }
  }
  return e = e(), Wt.memoizedState = [e, t], e;
}
function use(e, t, n) {
  if (25 <= lx)
    throw Error(ct(301));
  if (e === Ra)
    if (zy = !0, e = { action: n, next: null }, wl === null && (wl = /* @__PURE__ */ new Map()), n = wl.get(t), n === void 0)
      wl.set(t, e);
    else {
      for (t = n; t.next !== null; )
        t = t.next;
      t.next = e;
    }
}
function cse() {
  throw Error(ct(394));
}
function ph() {
}
var kN = { readContext: function(e) {
  return e._currentValue;
}, useContext: function(e) {
  return bs(), e._currentValue;
}, useMemo: SN, useReducer: xN, useRef: function(e) {
  Ra = bs(), Wt = ZC();
  var t = Wt.memoizedState;
  return t === null ? (e = { current: e }, Wt.memoizedState = e) : t;
}, useState: function(e) {
  return xN(d9, e);
}, useInsertionEffect: ph, useLayoutEffect: function() {
}, useCallback: function(e, t) {
  return SN(function() {
    return e;
  }, t);
}, useImperativeHandle: ph, useEffect: ph, useDebugValue: ph, useDeferredValue: function(e) {
  return bs(), e;
}, useTransition: function() {
  return bs(), [!1, cse];
}, useId: function() {
  var e = XC.treeContext, t = e.overflow;
  e = e.id, e = (e & ~(1 << 32 - zg(e) - 1)).toString(32) + t;
  var n = Dg;
  if (n === null)
    throw Error(ct(404));
  return t = pp++, e = ":" + n.idPrefix + "R" + e, 0 < t && (e += "H" + t.toString(32)), e + ":";
}, useMutableSource: function(e, t) {
  return bs(), t(e._source);
}, useSyncExternalStore: function(e, t, n) {
  if (n === void 0)
    throw Error(ct(407));
  return n();
} }, Dg = null, e_ = qM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
function fse(e) {
  return console.error(e), null;
}
function bd() {
}
function dse(e, t, n, r, o, i, a, l, s) {
  var c = [], p = /* @__PURE__ */ new Set();
  return t = { destination: null, responseState: t, progressiveChunkSize: r === void 0 ? 12800 : r, status: 0, fatalError: null, nextSegmentId: 0, allPendingTasks: 0, pendingRootTasks: 0, completedRootSegment: null, abortableTasks: p, pingedTasks: c, clientRenderedBoundaries: [], completedBoundaries: [], partialBoundaries: [], onError: o === void 0 ? fse : o, onAllReady: i === void 0 ? bd : i, onShellReady: a === void 0 ? bd : a, onShellError: l === void 0 ? bd : l, onFatalError: s === void 0 ? bd : s }, n = Ly(t, 0, null, n, !1, !1), n.parentFlushed = !0, e = JC(t, e, null, n, p, l9, null, rse), c.push(e), t;
}
function JC(e, t, n, r, o, i, a, l) {
  e.allPendingTasks++, n === null ? e.pendingRootTasks++ : n.pendingTasks++;
  var s = { node: t, ping: function() {
    var c = e.pingedTasks;
    c.push(s), c.length === 1 && h9(e);
  }, blockedBoundary: n, blockedSegment: r, abortSet: o, legacyContext: i, context: a, treeContext: l };
  return o.add(s), s;
}
function Ly(e, t, n, r, o, i) {
  return { status: 0, id: -1, index: t, parentFlushed: !1, chunks: [], children: [], formatContext: r, boundary: n, lastPushedText: o, textEmbedded: i };
}
function mp(e, t) {
  if (e = e.onError(t), e != null && typeof e != "string")
    throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "' + typeof e + '" instead');
  return e;
}
function Dy(e, t) {
  var n = e.onShellError;
  n(t), n = e.onFatalError, n(t), e.destination !== null ? (e.status = 2, KM(e.destination, t)) : (e.status = 1, e.fatalError = t);
}
function _N(e, t, n, r, o) {
  for (Ra = {}, XC = t, pp = 0, e = n(r, o); zy; )
    zy = !1, pp = 0, lx += 1, Wt = null, e = n(r, o);
  return QC(), e;
}
function ON(e, t, n, r) {
  var o = n.render(), i = r.childContextTypes;
  if (i != null) {
    var a = t.legacyContext;
    if (typeof n.getChildContext != "function")
      r = a;
    else {
      n = n.getChildContext();
      for (var l in n)
        if (!(l in i))
          throw Error(ct(108, PO(r) || "Unknown", l));
      r = Ld({}, a, n);
    }
    t.legacyContext = r, uo(e, t, o), t.legacyContext = a;
  } else
    uo(e, t, o);
}
function EN(e, t) {
  if (e && e.defaultProps) {
    t = Ld({}, t), e = e.defaultProps;
    for (var n in e)
      t[n] === void 0 && (t[n] = e[n]);
    return t;
  }
  return t;
}
function TO(e, t, n, r, o) {
  if (typeof n == "function")
    if (n.prototype && n.prototype.isReactComponent) {
      o = yN(n, t.legacyContext);
      var i = n.contextType;
      i = new n(r, typeof i == "object" && i !== null ? i._currentValue : o), bN(i, n, r, o), ON(e, t, i, n);
    } else {
      i = yN(n, t.legacyContext), o = _N(e, t, n, r, i);
      var a = pp !== 0;
      if (typeof o == "object" && o !== null && typeof o.render == "function" && o.$$typeof === void 0)
        bN(o, n, r, i), ON(e, t, o, n);
      else if (a) {
        r = t.treeContext, t.treeContext = RO(r, 1, 0);
        try {
          uo(e, t, o);
        } finally {
          t.treeContext = r;
        }
      } else
        uo(e, t, o);
    }
  else if (typeof n == "string") {
    switch (o = t.blockedSegment, i = nle(o.chunks, n, r, e.responseState, o.formatContext), o.lastPushedText = !1, a = o.formatContext, o.formatContext = Xae(a, n, r), jO(e, t, i), o.formatContext = a, n) {
      case "area":
      case "base":
      case "br":
      case "col":
      case "embed":
      case "hr":
      case "img":
      case "input":
      case "keygen":
      case "link":
      case "meta":
      case "param":
      case "source":
      case "track":
      case "wbr":
        break;
      default:
        o.chunks.push(rle, dt(n), ole);
    }
    o.lastPushedText = !1;
  } else {
    switch (n) {
      case tse:
      case ese:
      case JM:
      case e9:
      case QM:
        uo(e, t, r.children);
        return;
      case i9:
        uo(e, t, r.children);
        return;
      case Jle:
        throw Error(ct(343));
      case o9:
        e: {
          n = t.blockedBoundary, o = t.blockedSegment, i = r.fallback, r = r.children, a = /* @__PURE__ */ new Set();
          var l = { id: null, rootSegmentID: -1, parentFlushed: !1, pendingTasks: 0, forceClientRender: !1, completedSegments: [], byteSize: 0, fallbackAbortableTasks: a, errorDigest: null }, s = Ly(e, o.chunks.length, l, o.formatContext, !1, !1);
          o.children.push(s), o.lastPushedText = !1;
          var c = Ly(e, 0, null, o.formatContext, !1, !1);
          c.parentFlushed = !0, t.blockedBoundary = l, t.blockedSegment = c;
          try {
            if (jO(
              e,
              t,
              r
            ), c.lastPushedText && c.textEmbedded && c.chunks.push(KC), c.status = 1, Fy(l, c), l.pendingTasks === 0)
              break e;
          } catch (p) {
            c.status = 4, l.forceClientRender = !0, l.errorDigest = mp(e, p);
          } finally {
            t.blockedBoundary = n, t.blockedSegment = o;
          }
          t = JC(e, i, n, s, a, t.legacyContext, t.context, t.treeContext), e.pingedTasks.push(t);
        }
        return;
    }
    if (typeof n == "object" && n !== null)
      switch (n.$$typeof) {
        case r9:
          if (r = _N(e, t, n.render, r, o), pp !== 0) {
            n = t.treeContext, t.treeContext = RO(n, 1, 0);
            try {
              uo(e, t, r);
            } finally {
              t.treeContext = n;
            }
          } else
            uo(e, t, r);
          return;
        case a9:
          n = n.type, r = EN(n, r), TO(e, t, n, r, o);
          return;
        case t9:
          if (o = r.children, n = n._context, r = r.value, i = n._currentValue, n._currentValue = r, a = Ps, Ps = r = { parent: a, depth: a === null ? 0 : a.depth + 1, context: n, parentValue: i, value: r }, t.context = r, uo(e, t, o), e = Ps, e === null)
            throw Error(ct(403));
          r = e.parentValue, e.context._currentValue = r === nse ? e.context._defaultValue : r, e = Ps = e.parent, t.context = e;
          return;
        case n9:
          r = r.children, r = r(n._currentValue), uo(e, t, r);
          return;
        case YC:
          o = n._init, n = o(n._payload), r = EN(n, r), TO(e, t, n, r, void 0);
          return;
      }
    throw Error(ct(
      130,
      n == null ? n : typeof n,
      ""
    ));
  }
}
function uo(e, t, n) {
  if (t.node = n, typeof n == "object" && n !== null) {
    switch (n.$$typeof) {
      case Qle:
        TO(e, t, n.type, n.props, n.ref);
        return;
      case ZM:
        throw Error(ct(257));
      case YC:
        var r = n._init;
        n = r(n._payload), uo(e, t, n);
        return;
    }
    if (CO(n)) {
      CN(e, t, n);
      return;
    }
    if (n === null || typeof n != "object" ? r = null : (r = gN && n[gN] || n["@@iterator"], r = typeof r == "function" ? r : null), r && (r = r.call(n))) {
      if (n = r.next(), !n.done) {
        var o = [];
        do
          o.push(n.value), n = r.next();
        while (!n.done);
        CN(e, t, o);
      }
      return;
    }
    throw e = Object.prototype.toString.call(n), Error(ct(31, e === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : e));
  }
  typeof n == "string" ? (r = t.blockedSegment, r.lastPushedText = uN(t.blockedSegment.chunks, n, e.responseState, r.lastPushedText)) : typeof n == "number" && (r = t.blockedSegment, r.lastPushedText = uN(t.blockedSegment.chunks, "" + n, e.responseState, r.lastPushedText));
}
function CN(e, t, n) {
  for (var r = n.length, o = 0; o < r; o++) {
    var i = t.treeContext;
    t.treeContext = RO(i, r, o);
    try {
      jO(e, t, n[o]);
    } finally {
      t.treeContext = i;
    }
  }
}
function jO(e, t, n) {
  var r = t.blockedSegment.formatContext, o = t.legacyContext, i = t.context;
  try {
    return uo(e, t, n);
  } catch (s) {
    if (QC(), typeof s == "object" && s !== null && typeof s.then == "function") {
      n = s;
      var a = t.blockedSegment, l = Ly(e, a.chunks.length, null, a.formatContext, a.lastPushedText, !0);
      a.children.push(l), a.lastPushedText = !1, e = JC(e, t.node, t.blockedBoundary, l, t.abortSet, t.legacyContext, t.context, t.treeContext).ping, n.then(e, e), t.blockedSegment.formatContext = r, t.legacyContext = o, t.context = i, Ay(i);
    } else
      throw t.blockedSegment.formatContext = r, t.legacyContext = o, t.context = i, Ay(i), s;
  }
}
function pse(e) {
  var t = e.blockedBoundary;
  e = e.blockedSegment, e.status = 3, m9(this, t, e);
}
function p9(e, t, n) {
  var r = e.blockedBoundary;
  e.blockedSegment.status = 3, r === null ? (t.allPendingTasks--, t.status !== 2 && (t.status = 2, t.destination !== null && t.destination.close())) : (r.pendingTasks--, r.forceClientRender || (r.forceClientRender = !0, e = n === void 0 ? Error(ct(432)) : n, r.errorDigest = t.onError(e), r.parentFlushed && t.clientRenderedBoundaries.push(r)), r.fallbackAbortableTasks.forEach(function(o) {
    return p9(o, t, n);
  }), r.fallbackAbortableTasks.clear(), t.allPendingTasks--, t.allPendingTasks === 0 && (r = t.onAllReady, r()));
}
function Fy(e, t) {
  if (t.chunks.length === 0 && t.children.length === 1 && t.children[0].boundary === null) {
    var n = t.children[0];
    n.id = t.id, n.parentFlushed = !0, n.status === 1 && Fy(e, n);
  } else
    e.completedSegments.push(t);
}
function m9(e, t, n) {
  if (t === null) {
    if (n.parentFlushed) {
      if (e.completedRootSegment !== null)
        throw Error(ct(389));
      e.completedRootSegment = n;
    }
    e.pendingRootTasks--, e.pendingRootTasks === 0 && (e.onShellError = bd, t = e.onShellReady, t());
  } else
    t.pendingTasks--, t.forceClientRender || (t.pendingTasks === 0 ? (n.parentFlushed && n.status === 1 && Fy(t, n), t.parentFlushed && e.completedBoundaries.push(t), t.fallbackAbortableTasks.forEach(pse, e), t.fallbackAbortableTasks.clear()) : n.parentFlushed && n.status === 1 && (Fy(t, n), t.completedSegments.length === 1 && t.parentFlushed && e.partialBoundaries.push(t)));
  e.allPendingTasks--, e.allPendingTasks === 0 && (e = e.onAllReady, e());
}
function h9(e) {
  if (e.status !== 2) {
    var t = Ps, n = e_.current;
    e_.current = kN;
    var r = Dg;
    Dg = e.responseState;
    try {
      var o = e.pingedTasks, i;
      for (i = 0; i < o.length; i++) {
        var a = o[i], l = e, s = a.blockedSegment;
        if (s.status === 0) {
          Ay(a.context);
          try {
            uo(l, a, a.node), s.lastPushedText && s.textEmbedded && s.chunks.push(KC), a.abortSet.delete(a), s.status = 1, m9(l, a.blockedBoundary, s);
          } catch (g) {
            if (QC(), typeof g == "object" && g !== null && typeof g.then == "function") {
              var c = a.ping;
              g.then(c, c);
            } else {
              a.abortSet.delete(a), s.status = 4;
              var p = a.blockedBoundary, f = g, m = mp(l, f);
              if (p === null ? Dy(l, f) : (p.pendingTasks--, p.forceClientRender || (p.forceClientRender = !0, p.errorDigest = m, p.parentFlushed && l.clientRenderedBoundaries.push(p))), l.allPendingTasks--, l.allPendingTasks === 0) {
                var h = l.onAllReady;
                h();
              }
            }
          } finally {
          }
        }
      }
      o.splice(0, i), e.destination !== null && eP(e, e.destination);
    } catch (g) {
      mp(e, g), Dy(e, g);
    } finally {
      Dg = r, e_.current = n, n === kN && Ay(t);
    }
  }
}
function mh(e, t, n) {
  switch (n.parentFlushed = !0, n.status) {
    case 0:
      var r = n.id = e.nextSegmentId++;
      return n.lastPushedText = !1, n.textEmbedded = !1, e = e.responseState, Ue(t, ile), Ue(t, e.placeholderPrefix), e = dt(r.toString(16)), Ue(t, e), Xt(t, ale);
    case 1:
      n.status = 2;
      var o = !0;
      r = n.chunks;
      var i = 0;
      n = n.children;
      for (var a = 0; a < n.length; a++) {
        for (o = n[a]; i < o.index; i++)
          Ue(t, r[i]);
        o = sx(e, t, o);
      }
      for (; i < r.length - 1; i++)
        Ue(t, r[i]);
      return i < r.length && (o = Xt(t, r[i])), o;
    default:
      throw Error(ct(390));
  }
}
function sx(e, t, n) {
  var r = n.boundary;
  if (r === null)
    return mh(e, t, n);
  if (r.parentFlushed = !0, r.forceClientRender)
    r = r.errorDigest, Xt(t, cle), Ue(t, dle), r && (Ue(t, mle), Ue(t, dt(Wn(r))), Ue(t, ple)), Xt(t, hle), mh(e, t, n);
  else if (0 < r.pendingTasks) {
    r.rootSegmentID = e.nextSegmentId++, 0 < r.completedSegments.length && e.partialBoundaries.push(r);
    var o = e.responseState, i = o.nextSuspenseID++;
    o = je(o.boundaryPrefix + i.toString(16)), r = r.id = o, hN(t, e.responseState, r), mh(e, t, n);
  } else if (r.byteSize > e.progressiveChunkSize)
    r.rootSegmentID = e.nextSegmentId++, e.completedBoundaries.push(r), hN(t, e.responseState, r.id), mh(e, t, n);
  else {
    if (Xt(t, lle), n = r.completedSegments, n.length !== 1)
      throw Error(ct(391));
    sx(e, t, n[0]);
  }
  return Xt(t, fle);
}
function PN(e, t, n) {
  return Lle(t, e.responseState, n.formatContext, n.id), sx(e, t, n), Dle(t, n.formatContext);
}
function RN(e, t, n) {
  for (var r = n.completedSegments, o = 0; o < r.length; o++)
    g9(e, t, n, r[o]);
  if (r.length = 0, e = e.responseState, r = n.id, n = n.rootSegmentID, Ue(t, e.startInlineScript), e.sentCompleteBoundaryFunction ? Ue(t, Wle) : (e.sentCompleteBoundaryFunction = !0, Ue(t, Hle)), r === null)
    throw Error(ct(395));
  return n = dt(n.toString(16)), Ue(t, r), Ue(t, Vle), Ue(t, e.segmentPrefix), Ue(t, n), Xt(t, qle);
}
function g9(e, t, n, r) {
  if (r.status === 2)
    return !0;
  var o = r.id;
  if (o === -1) {
    if ((r.id = n.rootSegmentID) === -1)
      throw Error(ct(392));
    return PN(e, t, r);
  }
  return PN(e, t, r), e = e.responseState, Ue(t, e.startInlineScript), e.sentCompleteSegmentFunction ? Ue(t, Mle) : (e.sentCompleteSegmentFunction = !0, Ue(t, Fle)), Ue(t, e.segmentPrefix), o = dt(o.toString(16)), Ue(t, o), Ue(t, Ble), Ue(t, e.placeholderPrefix), Ue(t, o), Xt(t, Ule);
}
function eP(e, t) {
  lo = new Uint8Array(512), so = 0;
  try {
    var n = e.completedRootSegment;
    if (n !== null && e.pendingRootTasks === 0) {
      sx(e, t, n), e.completedRootSegment = null;
      var r = e.responseState.bootstrapChunks;
      for (n = 0; n < r.length - 1; n++)
        Ue(t, r[n]);
      n < r.length && Xt(t, r[n]);
    }
    var o = e.clientRenderedBoundaries, i;
    for (i = 0; i < o.length; i++) {
      var a = o[i];
      r = t;
      var l = e.responseState, s = a.id, c = a.errorDigest, p = a.errorMessage, f = a.errorComponentStack;
      if (Ue(r, l.startInlineScript), l.sentClientRenderFunction ? Ue(r, Kle) : (l.sentClientRenderFunction = !0, Ue(
        r,
        Gle
      )), s === null)
        throw Error(ct(395));
      Ue(r, s), Ue(r, Yle), (c || p || f) && (Ue(r, Qk), Ue(r, dt(Jk(c || "")))), (p || f) && (Ue(r, Qk), Ue(r, dt(Jk(p || "")))), f && (Ue(r, Qk), Ue(r, dt(Jk(f)))), Xt(r, Xle);
    }
    o.splice(0, i);
    var m = e.completedBoundaries;
    for (i = 0; i < m.length; i++)
      RN(e, t, m[i]);
    m.splice(0, i), iN(t), lo = new Uint8Array(512), so = 0;
    var h = e.partialBoundaries;
    for (i = 0; i < h.length; i++) {
      var g = h[i];
      e: {
        o = e, a = t;
        var v = g.completedSegments;
        for (l = 0; l < v.length; l++)
          if (!g9(
            o,
            a,
            g,
            v[l]
          )) {
            l++, v.splice(0, l);
            var S = !1;
            break e;
          }
        v.splice(0, l), S = !0;
      }
      if (!S) {
        e.destination = null, i++, h.splice(0, i);
        return;
      }
    }
    h.splice(0, i);
    var w = e.completedBoundaries;
    for (i = 0; i < w.length; i++)
      RN(e, t, w[i]);
    w.splice(0, i);
  } finally {
    iN(t), e.allPendingTasks === 0 && e.pingedTasks.length === 0 && e.clientRenderedBoundaries.length === 0 && e.completedBoundaries.length === 0 && t.close();
  }
}
function TN(e, t) {
  try {
    var n = e.abortableTasks;
    n.forEach(function(r) {
      return p9(r, e, t);
    }), n.clear(), e.destination !== null && eP(e, e.destination);
  } catch (r) {
    mp(e, r), Dy(e, r);
  }
}
VC.renderToReadableStream = function(e, t) {
  return new Promise(function(n, r) {
    var o, i, a = new Promise(function(p, f) {
      i = p, o = f;
    }), l = dse(e, Kae(t ? t.identifierPrefix : void 0, t ? t.nonce : void 0, t ? t.bootstrapScriptContent : void 0, t ? t.bootstrapScripts : void 0, t ? t.bootstrapModules : void 0), Yae(t ? t.namespaceURI : void 0), t ? t.progressiveChunkSize : void 0, t ? t.onError : void 0, i, function() {
      var p = new ReadableStream({ type: "bytes", pull: function(f) {
        if (l.status === 1)
          l.status = 2, KM(f, l.fatalError);
        else if (l.status !== 2 && l.destination === null) {
          l.destination = f;
          try {
            eP(l, f);
          } catch (m) {
            mp(l, m), Dy(l, m);
          }
        }
      }, cancel: function() {
        TN(l);
      } }, { highWaterMark: 0 });
      p.allReady = a, n(p);
    }, function(p) {
      a.catch(function() {
      }), r(p);
    }, o);
    if (t && t.signal) {
      var s = t.signal, c = function() {
        TN(l, s.reason), s.removeEventListener("abort", c);
      };
      s.addEventListener("abort", c);
    }
    h9(l);
  });
};
VC.version = "18.2.0";
var Yc, y9;
Yc = Kc, y9 = VC;
Yc.version;
var mse = Yc.renderToString;
Yc.renderToStaticMarkup;
Yc.renderToNodeStream;
Yc.renderToStaticNodeStream;
y9.renderToReadableStream;
var v9 = { exports: {} }, ux = {};
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hse = b, gse = Symbol.for("react.element"), yse = Symbol.for("react.fragment"), vse = Object.prototype.hasOwnProperty, bse = hse.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, wse = { key: !0, ref: !0, __self: !0, __source: !0 };
function b9(e, t, n) {
  var r, o = {}, i = null, a = null;
  n !== void 0 && (i = "" + n), t.key !== void 0 && (i = "" + t.key), t.ref !== void 0 && (a = t.ref);
  for (r in t)
    vse.call(t, r) && !wse.hasOwnProperty(r) && (o[r] = t[r]);
  if (e && e.defaultProps)
    for (r in t = e.defaultProps, t)
      o[r] === void 0 && (o[r] = t[r]);
  return { $$typeof: gse, type: e, key: i, ref: a, props: o, _owner: bse.current };
}
ux.Fragment = yse;
ux.jsx = b9;
ux.jsxs = b9;
v9.exports = ux;
var Pn = v9.exports, Wf = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Np(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var w9 = { exports: {} }, Vf = {};
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var jN;
function xse() {
  if (jN)
    return Vf;
  jN = 1;
  var e = P, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
  function a(l, s, c) {
    var p, f = {}, m = null, h = null;
    c !== void 0 && (m = "" + c), s.key !== void 0 && (m = "" + s.key), s.ref !== void 0 && (h = s.ref);
    for (p in s)
      r.call(s, p) && !i.hasOwnProperty(p) && (f[p] = s[p]);
    if (l && l.defaultProps)
      for (p in s = l.defaultProps, s)
        f[p] === void 0 && (f[p] = s[p]);
    return { $$typeof: t, type: l, key: m, ref: h, props: f, _owner: o.current };
  }
  return Vf.Fragment = n, Vf.jsx = a, Vf.jsxs = a, Vf;
}
w9.exports = xse();
var $ = w9.exports, Di = function() {
  return Di = Object.assign || function(e) {
    for (var t, n = 1, r = arguments.length; n < r; n++) {
      t = arguments[n];
      for (var o in t)
        Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
    }
    return e;
  }, Di.apply(this, arguments);
};
function x9(e, t) {
  var n = {};
  for (var r in e)
    Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
      t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
  return n;
}
function Xc(e, t, n, r) {
  function o(i) {
    return i instanceof n ? i : new n(function(a) {
      a(i);
    });
  }
  return new (n || (n = Promise))(function(i, a) {
    function l(p) {
      try {
        c(r.next(p));
      } catch (f) {
        a(f);
      }
    }
    function s(p) {
      try {
        c(r.throw(p));
      } catch (f) {
        a(f);
      }
    }
    function c(p) {
      p.done ? i(p.value) : o(p.value).then(l, s);
    }
    c((r = r.apply(e, t || [])).next());
  });
}
function Zc(e, t) {
  var n = { label: 0, sent: function() {
    if (i[0] & 1)
      throw i[1];
    return i[1];
  }, trys: [], ops: [] }, r, o, i, a;
  return a = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
    return this;
  }), a;
  function l(c) {
    return function(p) {
      return s([c, p]);
    };
  }
  function s(c) {
    if (r)
      throw new TypeError("Generator is already executing.");
    for (; a && (a = 0, c[0] && (n = 0)), n; )
      try {
        if (r = 1, o && (i = c[0] & 2 ? o.return : c[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, c[1])).done)
          return i;
        switch (o = 0, i && (c = [c[0] & 2, i.value]), c[0]) {
          case 0:
          case 1:
            i = c;
            break;
          case 4:
            return n.label++, { value: c[1], done: !1 };
          case 5:
            n.label++, o = c[1], c = [0];
            continue;
          case 7:
            c = n.ops.pop(), n.trys.pop();
            continue;
          default:
            if (i = n.trys, !(i = i.length > 0 && i[i.length - 1]) && (c[0] === 6 || c[0] === 2)) {
              n = 0;
              continue;
            }
            if (c[0] === 3 && (!i || c[1] > i[0] && c[1] < i[3])) {
              n.label = c[1];
              break;
            }
            if (c[0] === 6 && n.label < i[1]) {
              n.label = i[1], i = c;
              break;
            }
            if (i && n.label < i[2]) {
              n.label = i[2], n.ops.push(c);
              break;
            }
            i[2] && n.ops.pop(), n.trys.pop();
            continue;
        }
        c = t.call(e, n);
      } catch (p) {
        c = [6, p], o = 0;
      } finally {
        r = i = 0;
      }
    if (c[0] & 5)
      throw c[1];
    return { value: c[0] ? c[1] : void 0, done: !0 };
  }
}
function NN(e, t) {
  var n = typeof Symbol == "function" && e[Symbol.iterator];
  if (!n)
    return e;
  var r = n.call(e), o, i = [], a;
  try {
    for (; (t === void 0 || t-- > 0) && !(o = r.next()).done; )
      i.push(o.value);
  } catch (l) {
    a = { error: l };
  } finally {
    try {
      o && !o.done && (n = r.return) && n.call(r);
    } finally {
      if (a)
        throw a.error;
    }
  }
  return i;
}
function NO(e, t, n) {
  if (n || arguments.length === 2)
    for (var r = 0, o = t.length, i; r < o; r++)
      (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
  return e.concat(i || Array.prototype.slice.call(t));
}
var Fg = "right-scroll-bar-position", Mg = "width-before-scroll-bar", Sse = "with-scroll-bars-hidden", kse = "--removed-body-scroll-bar-size";
function t_(e, t) {
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
function _se(e, t) {
  var n = b.useState(function() {
    return {
      // value
      value: e,
      // last callback
      callback: t,
      // "memoized" public interface
      facade: {
        get current() {
          return n.value;
        },
        set current(r) {
          var o = n.value;
          o !== r && (n.value = r, n.callback(r, o));
        }
      }
    };
  })[0];
  return n.callback = t, n.facade;
}
var $N = /* @__PURE__ */ new WeakMap();
function Ose(e, t) {
  var n = _se(t || null, function(r) {
    return e.forEach(function(o) {
      return t_(o, r);
    });
  });
  return b.useLayoutEffect(function() {
    var r = $N.get(n);
    if (r) {
      var o = new Set(r), i = new Set(e), a = n.current;
      o.forEach(function(l) {
        i.has(l) || t_(l, null);
      }), i.forEach(function(l) {
        o.has(l) || t_(l, a);
      });
    }
    $N.set(n, e);
  }, [e]), n;
}
function Ese(e) {
  return e;
}
function Cse(e, t) {
  t === void 0 && (t = Ese);
  var n = [], r = !1, o = {
    read: function() {
      if (r)
        throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
      return n.length ? n[n.length - 1] : e;
    },
    useMedium: function(i) {
      var a = t(i, r);
      return n.push(a), function() {
        n = n.filter(function(l) {
          return l !== a;
        });
      };
    },
    assignSyncMedium: function(i) {
      for (r = !0; n.length; ) {
        var a = n;
        n = [], a.forEach(i);
      }
      n = {
        push: function(l) {
          return i(l);
        },
        filter: function() {
          return n;
        }
      };
    },
    assignMedium: function(i) {
      r = !0;
      var a = [];
      if (n.length) {
        var l = n;
        n = [], l.forEach(i), a = n;
      }
      var s = function() {
        var p = a;
        a = [], p.forEach(i);
      }, c = function() {
        return Promise.resolve().then(s);
      };
      c(), n = {
        push: function(p) {
          a.push(p), c();
        },
        filter: function(p) {
          return a = a.filter(p), n;
        }
      };
    }
  };
  return o;
}
function Pse(e) {
  e === void 0 && (e = {});
  var t = Cse(null);
  return t.options = Di({ async: !0, ssr: !1 }, e), t;
}
var S9 = function(e) {
  var t = e.sideCar, n = x9(e, ["sideCar"]);
  if (!t)
    throw new Error("Sidecar: please provide `sideCar` property to import the right car");
  var r = t.read();
  if (!r)
    throw new Error("Sidecar medium not found");
  return b.createElement(r, Di({}, n));
};
S9.isSideCarExport = !0;
function Rse(e, t) {
  return e.useMedium(t), S9;
}
var k9 = Pse(), n_ = function() {
}, cx = b.forwardRef(function(e, t) {
  var n = b.useRef(null), r = b.useState({
    onScrollCapture: n_,
    onWheelCapture: n_,
    onTouchMoveCapture: n_
  }), o = r[0], i = r[1], a = e.forwardProps, l = e.children, s = e.className, c = e.removeScrollBar, p = e.enabled, f = e.shards, m = e.sideCar, h = e.noIsolation, g = e.inert, v = e.allowPinchZoom, S = e.as, w = S === void 0 ? "div" : S, x = e.gapMode, k = x9(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = m, O = Ose([n, t]), C = Di(Di({}, k), o);
  return b.createElement(
    b.Fragment,
    null,
    p && b.createElement(E, { sideCar: k9, removeScrollBar: c, shards: f, noIsolation: h, inert: g, setCallbacks: i, allowPinchZoom: !!v, lockRef: n, gapMode: x }),
    a ? b.cloneElement(b.Children.only(l), Di(Di({}, C), { ref: O })) : b.createElement(w, Di({}, C, { className: s, ref: O }), l)
  );
});
cx.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
cx.classNames = {
  fullWidth: Mg,
  zeroRight: Fg
};
var Tse = function() {
  if (typeof __webpack_nonce__ < "u")
    return __webpack_nonce__;
};
function jse() {
  if (!document)
    return null;
  var e = document.createElement("style");
  e.type = "text/css";
  var t = Tse();
  return t && e.setAttribute("nonce", t), e;
}
function Nse(e, t) {
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function $se(e) {
  var t = document.head || document.getElementsByTagName("head")[0];
  t.appendChild(e);
}
var Ise = function() {
  var e = 0, t = null;
  return {
    add: function(n) {
      e == 0 && (t = jse()) && (Nse(t, n), $se(t)), e++;
    },
    remove: function() {
      e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
    }
  };
}, Ase = function() {
  var e = Ise();
  return function(t, n) {
    b.useEffect(function() {
      return e.add(t), function() {
        e.remove();
      };
    }, [t && n]);
  };
}, _9 = function() {
  var e = Ase(), t = function(n) {
    var r = n.styles, o = n.dynamic;
    return e(r, o), null;
  };
  return t;
}, zse = {
  left: 0,
  top: 0,
  right: 0,
  gap: 0
}, r_ = function(e) {
  return parseInt(e || "", 10) || 0;
}, Lse = function(e) {
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
  return [r_(n), r_(r), r_(o)];
}, Dse = function(e) {
  if (e === void 0 && (e = "margin"), typeof window > "u")
    return zse;
  var t = Lse(e), n = document.documentElement.clientWidth, r = window.innerWidth;
  return {
    left: t[0],
    top: t[1],
    right: t[2],
    gap: Math.max(0, r - n + t[2] - t[0])
  };
}, Fse = _9(), Mse = function(e, t, n, r) {
  var o = e.left, i = e.top, a = e.right, l = e.gap;
  return n === void 0 && (n = "margin"), `
  .`.concat(Sse, ` {
   overflow: hidden `).concat(r, `;
   padding-right: `).concat(l, "px ").concat(r, `;
  }
  body {
    overflow: hidden `).concat(r, `;
    overscroll-behavior: contain;
    `).concat([
    t && "position: relative ".concat(r, ";"),
    n === "margin" && `
    padding-left: `.concat(o, `px;
    padding-top: `).concat(i, `px;
    padding-right: `).concat(a, `px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l, "px ").concat(r, `;
    `),
    n === "padding" && "padding-right: ".concat(l, "px ").concat(r, ";")
  ].filter(Boolean).join(""), `
  }
  
  .`).concat(Fg, ` {
    right: `).concat(l, "px ").concat(r, `;
  }
  
  .`).concat(Mg, ` {
    margin-right: `).concat(l, "px ").concat(r, `;
  }
  
  .`).concat(Fg, " .").concat(Fg, ` {
    right: 0 `).concat(r, `;
  }
  
  .`).concat(Mg, " .").concat(Mg, ` {
    margin-right: 0 `).concat(r, `;
  }
  
  body {
    `).concat(kse, ": ").concat(l, `px;
  }
`);
}, Bse = function(e) {
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r, i = b.useMemo(function() {
    return Dse(o);
  }, [o]);
  return b.createElement(Fse, { styles: Mse(i, !t, o, n ? "" : "!important") });
}, $O = !1;
if (typeof window < "u")
  try {
    var hh = Object.defineProperty({}, "passive", {
      get: function() {
        return $O = !0, !0;
      }
    });
    window.addEventListener("test", hh, hh), window.removeEventListener("test", hh, hh);
  } catch {
    $O = !1;
  }
var Eu = $O ? { passive: !1 } : !1, Use = function(e) {
  return e.tagName === "TEXTAREA";
}, O9 = function(e, t) {
  var n = window.getComputedStyle(e);
  return (
    // not-not-scrollable
    n[t] !== "hidden" && // contains scroll inside self
    !(n.overflowY === n.overflowX && !Use(e) && n[t] === "visible")
  );
}, Hse = function(e) {
  return O9(e, "overflowY");
}, Wse = function(e) {
  return O9(e, "overflowX");
}, IN = function(e, t) {
  var n = t.ownerDocument, r = t;
  do {
    typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
    var o = E9(e, r);
    if (o) {
      var i = C9(e, r), a = i[1], l = i[2];
      if (a > l)
        return !0;
    }
    r = r.parentNode;
  } while (r && r !== n.body);
  return !1;
}, Vse = function(e) {
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
  return [
    t,
    n,
    r
  ];
}, qse = function(e) {
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
  return [
    t,
    n,
    r
  ];
}, E9 = function(e, t) {
  return e === "v" ? Hse(t) : Wse(t);
}, C9 = function(e, t) {
  return e === "v" ? Vse(t) : qse(t);
}, Gse = function(e, t) {
  return e === "h" && t === "rtl" ? -1 : 1;
}, Kse = function(e, t, n, r, o) {
  var i = Gse(e, window.getComputedStyle(t).direction), a = i * r, l = n.target, s = t.contains(l), c = !1, p = a > 0, f = 0, m = 0;
  do {
    var h = C9(e, l), g = h[0], v = h[1], S = h[2], w = v - S - i * g;
    (g || w) && E9(e, l) && (f += w, m += g), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
  } while (
    // portaled content
    !s && l !== document.body || // self content
    s && (t.contains(l) || t === l)
  );
  return (p && (o && Math.abs(f) < 1 || !o && a > f) || !p && (o && Math.abs(m) < 1 || !o && -a > m)) && (c = !0), c;
}, gh = function(e) {
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
}, AN = function(e) {
  return [e.deltaX, e.deltaY];
}, zN = function(e) {
  return e && "current" in e ? e.current : e;
}, Yse = function(e, t) {
  return e[0] === t[0] && e[1] === t[1];
}, Xse = function(e) {
  return `
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
`);
}, Zse = 0, Cu = [];
function Qse(e) {
  var t = b.useRef([]), n = b.useRef([0, 0]), r = b.useRef(), o = b.useState(Zse++)[0], i = b.useState(_9)[0], a = b.useRef(e);
  b.useEffect(function() {
    a.current = e;
  }, [e]), b.useEffect(function() {
    if (e.inert) {
      document.body.classList.add("block-interactivity-".concat(o));
      var v = NO([e.lockRef.current], (e.shards || []).map(zN), !0).filter(Boolean);
      return v.forEach(function(S) {
        return S.classList.add("allow-interactivity-".concat(o));
      }), function() {
        document.body.classList.remove("block-interactivity-".concat(o)), v.forEach(function(S) {
          return S.classList.remove("allow-interactivity-".concat(o));
        });
      };
    }
  }, [e.inert, e.lockRef.current, e.shards]);
  var l = b.useCallback(function(v, S) {
    if ("touches" in v && v.touches.length === 2)
      return !a.current.allowPinchZoom;
    var w = gh(v), x = n.current, k = "deltaX" in v ? v.deltaX : x[0] - w[0], E = "deltaY" in v ? v.deltaY : x[1] - w[1], O, C = v.target, R = Math.abs(k) > Math.abs(E) ? "h" : "v";
    if ("touches" in v && R === "h" && C.type === "range")
      return !1;
    var L = IN(R, C);
    if (!L)
      return !0;
    if (L ? O = R : (O = R === "v" ? "h" : "v", L = IN(R, C)), !L)
      return !1;
    if (!r.current && "changedTouches" in v && (k || E) && (r.current = O), !O)
      return !0;
    var D = r.current || O;
    return Kse(D, S, v, D === "h" ? k : E, !0);
  }, []), s = b.useCallback(function(v) {
    var S = v;
    if (!(!Cu.length || Cu[Cu.length - 1] !== i)) {
      var w = "deltaY" in S ? AN(S) : gh(S), x = t.current.filter(function(O) {
        return O.name === S.type && (O.target === S.target || S.target === O.shadowParent) && Yse(O.delta, w);
      })[0];
      if (x && x.should) {
        S.cancelable && S.preventDefault();
        return;
      }
      if (!x) {
        var k = (a.current.shards || []).map(zN).filter(Boolean).filter(function(O) {
          return O.contains(S.target);
        }), E = k.length > 0 ? l(S, k[0]) : !a.current.noIsolation;
        E && S.cancelable && S.preventDefault();
      }
    }
  }, []), c = b.useCallback(function(v, S, w, x) {
    var k = { name: v, delta: S, target: w, should: x, shadowParent: Jse(w) };
    t.current.push(k), setTimeout(function() {
      t.current = t.current.filter(function(E) {
        return E !== k;
      });
    }, 1);
  }, []), p = b.useCallback(function(v) {
    n.current = gh(v), r.current = void 0;
  }, []), f = b.useCallback(function(v) {
    c(v.type, AN(v), v.target, l(v, e.lockRef.current));
  }, []), m = b.useCallback(function(v) {
    c(v.type, gh(v), v.target, l(v, e.lockRef.current));
  }, []);
  b.useEffect(function() {
    return Cu.push(i), e.setCallbacks({
      onScrollCapture: f,
      onWheelCapture: f,
      onTouchMoveCapture: m
    }), document.addEventListener("wheel", s, Eu), document.addEventListener("touchmove", s, Eu), document.addEventListener("touchstart", p, Eu), function() {
      Cu = Cu.filter(function(v) {
        return v !== i;
      }), document.removeEventListener("wheel", s, Eu), document.removeEventListener("touchmove", s, Eu), document.removeEventListener("touchstart", p, Eu);
    };
  }, []);
  var h = e.removeScrollBar, g = e.inert;
  return b.createElement(
    b.Fragment,
    null,
    g ? b.createElement(i, { styles: Xse(o) }) : null,
    h ? b.createElement(Bse, { gapMode: e.gapMode }) : null
  );
}
function Jse(e) {
  for (var t = null; e !== null; )
    e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
  return t;
}
const eue = Rse(k9, Qse);
var P9 = b.forwardRef(function(e, t) {
  return b.createElement(cx, Di({}, e, { ref: t, sideCar: eue }));
});
P9.classNames = cx.classNames;
const tue = P9;
function My(e, t) {
  let n = e;
  for (; (n = n.parentElement) && !n.matches(t); )
    ;
  return n;
}
function nue(e, t, n) {
  for (let r = e - 1; r >= 0; r -= 1)
    if (!t[r].disabled)
      return r;
  if (n) {
    for (let r = t.length - 1; r > -1; r -= 1)
      if (!t[r].disabled)
        return r;
  }
  return e;
}
function rue(e, t, n) {
  for (let r = e + 1; r < t.length; r += 1)
    if (!t[r].disabled)
      return r;
  if (n) {
    for (let r = 0; r < t.length; r += 1)
      if (!t[r].disabled)
        return r;
  }
  return e;
}
function oue(e, t, n) {
  return My(e, n) === My(t, n);
}
function tP({
  parentSelector: e,
  siblingSelector: t,
  onKeyDown: n,
  loop: r = !0,
  activateOnFocus: o = !1,
  dir: i = "rtl",
  orientation: a
}) {
  return (l) => {
    var s;
    n == null || n(l);
    const c = Array.from(((s = My(l.currentTarget, e)) == null ? void 0 : s.querySelectorAll(t)) || []).filter((v) => oue(l.currentTarget, v, e)), p = c.findIndex((v) => l.currentTarget === v), f = rue(p, c, r), m = nue(p, c, r), h = i === "rtl" ? m : f, g = i === "rtl" ? f : m;
    switch (l.key) {
      case "ArrowRight": {
        a === "horizontal" && (l.stopPropagation(), l.preventDefault(), c[h].focus(), o && c[h].click());
        break;
      }
      case "ArrowLeft": {
        a === "horizontal" && (l.stopPropagation(), l.preventDefault(), c[g].focus(), o && c[g].click());
        break;
      }
      case "ArrowUp": {
        a === "vertical" && (l.stopPropagation(), l.preventDefault(), c[m].focus(), o && c[m].click());
        break;
      }
      case "ArrowDown": {
        a === "vertical" && (l.stopPropagation(), l.preventDefault(), c[f].focus(), o && c[f].click());
        break;
      }
      case "Home": {
        l.stopPropagation(), l.preventDefault(), !c[0].disabled && c[0].focus();
        break;
      }
      case "End": {
        l.stopPropagation(), l.preventDefault();
        const v = c.length - 1;
        !c[v].disabled && c[v].focus();
        break;
      }
    }
  };
}
function iue(e, t, n) {
  var r;
  return n ? Array.from(((r = My(n, t)) == null ? void 0 : r.querySelectorAll(e)) || []).findIndex((o) => o === n) : null;
}
function Gl(e) {
  const t = b.createContext(null);
  return [({ children: n, value: r }) => /* @__PURE__ */ P.createElement(t.Provider, {
    value: r
  }, n), () => {
    const n = b.useContext(t);
    if (n === null)
      throw new Error(e);
    return n;
  }];
}
function fx(e) {
  return Array.isArray(e) ? e : [e];
}
function By(e, t) {
  return (n) => {
    if (typeof n != "string" || n.trim().length === 0)
      throw new Error(t);
    return `${e}-${n}`;
  };
}
const aue = () => {
};
function lue(e, t = { active: !0 }) {
  return typeof e != "function" || !t.active ? t.onKeyDown || aue : (n) => {
    var r;
    n.key === "Escape" && (e(n), (r = t.onTrigger) == null || r.call(t));
  };
}
function wa(e, t) {
  return (n) => {
    e == null || e(n), t == null || t(n);
  };
}
function sue() {
  const [e, t] = b.useState(-1);
  return [e, { setHovered: t, resetHovered: () => t(-1) }];
}
function R9({ data: e }) {
  const t = [], n = [], r = e.reduce((o, i, a) => (i.group ? o[i.group] ? o[i.group].push(a) : o[i.group] = [a] : n.push(a), o), {});
  return Object.keys(r).forEach((o) => {
    t.push(...r[o].map((i) => e[i]));
  }), t.push(...n.map((o) => e[o])), t;
}
function uue(e, t) {
  window.dispatchEvent(new CustomEvent(e, { detail: t }));
}
const cue = typeof window < "u" ? b.useLayoutEffect : b.useEffect;
function fue(e) {
  function t(r) {
    const o = Object.keys(r).reduce((i, a) => (i[`${e}:${a}`] = (l) => r[a](l.detail), i), {});
    cue(() => (Object.keys(o).forEach((i) => {
      window.removeEventListener(i, o[i]), window.addEventListener(i, o[i]);
    }), () => Object.keys(o).forEach((i) => {
      window.removeEventListener(i, o[i]);
    })), [o]);
  }
  function n(r) {
    return (...o) => uue(`${e}:${String(r)}`, o[0]);
  }
  return [t, n];
}
function Qc(e) {
  return Array.isArray(e) || e === null ? !1 : typeof e == "object" ? e.type !== P.Fragment : !1;
}
function T9(e) {
  var t, n, r = "";
  if (typeof e == "string" || typeof e == "number")
    r += e;
  else if (typeof e == "object")
    if (Array.isArray(e))
      for (t = 0; t < e.length; t++)
        e[t] && (n = T9(e[t])) && (r && (r += " "), r += n);
    else
      for (t in e)
        e[t] && (r && (r += " "), r += t);
  return r;
}
function j9() {
  for (var e = 0, t, n, r = ""; e < arguments.length; )
    (t = arguments[e++]) && (n = T9(t)) && (r && (r += " "), r += n);
  return r;
}
const due = {
  dark: [
    "#C1C2C5",
    "#A6A7AB",
    "#909296",
    "#5c5f66",
    "#373A40",
    "#2C2E33",
    "#25262b",
    "#1A1B1E",
    "#141517",
    "#101113"
  ],
  gray: [
    "#f8f9fa",
    "#f1f3f5",
    "#e9ecef",
    "#dee2e6",
    "#ced4da",
    "#adb5bd",
    "#868e96",
    "#495057",
    "#343a40",
    "#212529"
  ],
  red: [
    "#fff5f5",
    "#ffe3e3",
    "#ffc9c9",
    "#ffa8a8",
    "#ff8787",
    "#ff6b6b",
    "#fa5252",
    "#f03e3e",
    "#e03131",
    "#c92a2a"
  ],
  pink: [
    "#fff0f6",
    "#ffdeeb",
    "#fcc2d7",
    "#faa2c1",
    "#f783ac",
    "#f06595",
    "#e64980",
    "#d6336c",
    "#c2255c",
    "#a61e4d"
  ],
  grape: [
    "#f8f0fc",
    "#f3d9fa",
    "#eebefa",
    "#e599f7",
    "#da77f2",
    "#cc5de8",
    "#be4bdb",
    "#ae3ec9",
    "#9c36b5",
    "#862e9c"
  ],
  violet: [
    "#f3f0ff",
    "#e5dbff",
    "#d0bfff",
    "#b197fc",
    "#9775fa",
    "#845ef7",
    "#7950f2",
    "#7048e8",
    "#6741d9",
    "#5f3dc4"
  ],
  indigo: [
    "#edf2ff",
    "#dbe4ff",
    "#bac8ff",
    "#91a7ff",
    "#748ffc",
    "#5c7cfa",
    "#4c6ef5",
    "#4263eb",
    "#3b5bdb",
    "#364fc7"
  ],
  blue: [
    "#e7f5ff",
    "#d0ebff",
    "#a5d8ff",
    "#74c0fc",
    "#4dabf7",
    "#339af0",
    "#228be6",
    "#1c7ed6",
    "#1971c2",
    "#1864ab"
  ],
  cyan: [
    "#e3fafc",
    "#c5f6fa",
    "#99e9f2",
    "#66d9e8",
    "#3bc9db",
    "#22b8cf",
    "#15aabf",
    "#1098ad",
    "#0c8599",
    "#0b7285"
  ],
  teal: [
    "#e6fcf5",
    "#c3fae8",
    "#96f2d7",
    "#63e6be",
    "#38d9a9",
    "#20c997",
    "#12b886",
    "#0ca678",
    "#099268",
    "#087f5b"
  ],
  green: [
    "#ebfbee",
    "#d3f9d8",
    "#b2f2bb",
    "#8ce99a",
    "#69db7c",
    "#51cf66",
    "#40c057",
    "#37b24d",
    "#2f9e44",
    "#2b8a3e"
  ],
  lime: [
    "#f4fce3",
    "#e9fac8",
    "#d8f5a2",
    "#c0eb75",
    "#a9e34b",
    "#94d82d",
    "#82c91e",
    "#74b816",
    "#66a80f",
    "#5c940d"
  ],
  yellow: [
    "#fff9db",
    "#fff3bf",
    "#ffec99",
    "#ffe066",
    "#ffd43b",
    "#fcc419",
    "#fab005",
    "#f59f00",
    "#f08c00",
    "#e67700"
  ],
  orange: [
    "#fff4e6",
    "#ffe8cc",
    "#ffd8a8",
    "#ffc078",
    "#ffa94d",
    "#ff922b",
    "#fd7e14",
    "#f76707",
    "#e8590c",
    "#d9480f"
  ]
};
function pue(e) {
  return () => ({ fontFamily: e.fontFamily || "sans-serif" });
}
var mue = Object.defineProperty, LN = Object.getOwnPropertySymbols, hue = Object.prototype.hasOwnProperty, gue = Object.prototype.propertyIsEnumerable, DN = (e, t, n) => t in e ? mue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, FN = (e, t) => {
  for (var n in t || (t = {}))
    hue.call(t, n) && DN(e, n, t[n]);
  if (LN)
    for (var n of LN(t))
      gue.call(t, n) && DN(e, n, t[n]);
  return e;
};
function yue(e) {
  return (t) => ({
    WebkitTapHighlightColor: "transparent",
    [t || "&:focus"]: FN({}, e.focusRing === "always" || e.focusRing === "auto" ? e.focusRingStyles.styles(e) : e.focusRingStyles.resetStyles(e)),
    [t ? t.replace(":focus", ":focus:not(:focus-visible)") : "&:focus:not(:focus-visible)"]: FN({}, e.focusRing === "auto" || e.focusRing === "never" ? e.focusRingStyles.resetStyles(e) : null)
  });
}
function $p(e) {
  return (t) => typeof e.primaryShade == "number" ? e.primaryShade : e.primaryShade[t || e.colorScheme];
}
function nP(e) {
  const t = $p(e);
  return (n, r, o = !0, i = !0) => {
    if (typeof n == "string" && n.includes(".")) {
      const [l, s] = n.split("."), c = parseInt(s, 10);
      if (l in e.colors && c >= 0 && c < 10)
        return e.colors[l][typeof r == "number" && !i ? r : c];
    }
    const a = typeof r == "number" ? r : t();
    return n in e.colors ? e.colors[n][a] : o ? e.colors[e.primaryColor][a] : n;
  };
}
function N9(e) {
  let t = "";
  for (let n = 1; n < e.length - 1; n += 1)
    t += `${e[n]} ${n / (e.length - 1) * 100}%, `;
  return `${e[0]} 0%, ${t}${e[e.length - 1]} 100%`;
}
function vue(e, ...t) {
  return `linear-gradient(${e}deg, ${N9(t)})`;
}
function bue(...e) {
  return `radial-gradient(circle, ${N9(e)})`;
}
function $9(e) {
  const t = nP(e), n = $p(e);
  return (r) => {
    const o = {
      from: (r == null ? void 0 : r.from) || e.defaultGradient.from,
      to: (r == null ? void 0 : r.to) || e.defaultGradient.to,
      deg: (r == null ? void 0 : r.deg) || e.defaultGradient.deg
    };
    return `linear-gradient(${o.deg}deg, ${t(o.from, n(), !1)} 0%, ${t(o.to, n(), !1)} 100%)`;
  };
}
function I9(e) {
  return (t) => {
    if (typeof t == "number")
      return `${t / 16}${e}`;
    if (typeof t == "string") {
      const n = t.replace("px", "");
      if (!Number.isNaN(Number(n)))
        return `${Number(n) / 16}${e}`;
    }
    return t;
  };
}
const F = I9("rem"), dx = I9("em");
function Re({
  size: e,
  sizes: t,
  units: n
}) {
  return e in t ? t[e] : typeof e == "number" ? n === "em" ? dx(e) : F(e) : e || t.md;
}
function Cc(e) {
  return typeof e == "number" ? e : typeof e == "string" && e.includes("rem") ? Number(e.replace("rem", "")) * 16 : typeof e == "string" && e.includes("em") ? Number(e.replace("em", "")) * 16 : Number(e);
}
function wue(e) {
  return (t) => `@media (min-width: ${dx(Cc(Re({ size: t, sizes: e.breakpoints })))})`;
}
function xue(e) {
  return (t) => `@media (max-width: ${dx(Cc(Re({ size: t, sizes: e.breakpoints })) - 1)})`;
}
function Sue(e) {
  return /^#?([0-9A-F]{3}){1,2}$/i.test(e);
}
function kue(e) {
  let t = e.replace("#", "");
  if (t.length === 3) {
    const a = t.split("");
    t = [
      a[0],
      a[0],
      a[1],
      a[1],
      a[2],
      a[2]
    ].join("");
  }
  const n = parseInt(t, 16), r = n >> 16 & 255, o = n >> 8 & 255, i = n & 255;
  return {
    r,
    g: o,
    b: i,
    a: 1
  };
}
function _ue(e) {
  const [t, n, r, o] = e.replace(/[^0-9,.]/g, "").split(",").map(Number);
  return { r: t, g: n, b: r, a: o || 1 };
}
function rP(e) {
  return Sue(e) ? kue(e) : e.startsWith("rgb") ? _ue(e) : {
    r: 0,
    g: 0,
    b: 0,
    a: 1
  };
}
function Du(e, t) {
  if (typeof e != "string" || t > 1 || t < 0)
    return "rgba(0, 0, 0, 1)";
  if (e.startsWith("var(--"))
    return e;
  const { r: n, g: r, b: o } = rP(e);
  return `rgba(${n}, ${r}, ${o}, ${t})`;
}
function Oue(e = 0) {
  return {
    position: "absolute",
    top: F(e),
    right: F(e),
    left: F(e),
    bottom: F(e)
  };
}
function Eue(e, t) {
  if (typeof e == "string" && e.startsWith("var(--"))
    return e;
  const { r: n, g: r, b: o, a: i } = rP(e), a = 1 - t, l = (s) => Math.round(s * a);
  return `rgba(${l(n)}, ${l(r)}, ${l(o)}, ${i})`;
}
function Cue(e, t) {
  if (typeof e == "string" && e.startsWith("var(--"))
    return e;
  const { r: n, g: r, b: o, a: i } = rP(e), a = (l) => Math.round(l + (255 - l) * t);
  return `rgba(${a(n)}, ${a(r)}, ${a(o)}, ${i})`;
}
function Pue(e) {
  return (t) => {
    if (typeof t == "number")
      return F(t);
    const n = typeof e.defaultRadius == "number" ? e.defaultRadius : e.radius[e.defaultRadius] || e.defaultRadius;
    return e.radius[t] || t || n;
  };
}
function Rue(e, t) {
  if (typeof e == "string" && e.includes(".")) {
    const [n, r] = e.split("."), o = parseInt(r, 10);
    if (n in t.colors && o >= 0 && o < 10)
      return { isSplittedColor: !0, key: n, shade: o };
  }
  return { isSplittedColor: !1 };
}
function Tue(e) {
  const t = nP(e), n = $p(e), r = $9(e);
  return ({ variant: o, color: i, gradient: a, primaryFallback: l }) => {
    const s = Rue(i, e);
    switch (o) {
      case "light":
        return {
          border: "transparent",
          background: Du(t(i, e.colorScheme === "dark" ? 8 : 0, l, !1), e.colorScheme === "dark" ? 0.2 : 1),
          color: i === "dark" ? e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.dark[9] : t(i, e.colorScheme === "dark" ? 2 : n("light")),
          hover: Du(t(i, e.colorScheme === "dark" ? 7 : 1, l, !1), e.colorScheme === "dark" ? 0.25 : 0.65)
        };
      case "subtle":
        return {
          border: "transparent",
          background: "transparent",
          color: i === "dark" ? e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.dark[9] : t(i, e.colorScheme === "dark" ? 2 : n("light")),
          hover: Du(t(i, e.colorScheme === "dark" ? 8 : 0, l, !1), e.colorScheme === "dark" ? 0.2 : 1)
        };
      case "outline":
        return {
          border: t(i, e.colorScheme === "dark" ? 5 : n("light")),
          background: "transparent",
          color: t(i, e.colorScheme === "dark" ? 5 : n("light")),
          hover: e.colorScheme === "dark" ? Du(t(i, 5, l, !1), 0.05) : Du(t(i, 0, l, !1), 0.35)
        };
      case "default":
        return {
          border: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4],
          background: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
          color: e.colorScheme === "dark" ? e.white : e.black,
          hover: e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[0]
        };
      case "white":
        return {
          border: "transparent",
          background: e.white,
          color: t(i, n()),
          hover: null
        };
      case "transparent":
        return {
          border: "transparent",
          color: i === "dark" ? e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.dark[9] : t(i, e.colorScheme === "dark" ? 2 : n("light")),
          background: "transparent",
          hover: null
        };
      case "gradient":
        return {
          background: r(a),
          color: e.white,
          border: "transparent",
          hover: null
        };
      default: {
        const c = n(), p = s.isSplittedColor ? s.shade : c, f = s.isSplittedColor ? s.key : i;
        return {
          border: "transparent",
          background: t(f, p, l),
          color: e.white,
          hover: t(f, p === 9 ? 8 : p + 1)
        };
      }
    }
  };
}
function jue(e) {
  return (t) => {
    const n = $p(e)(t);
    return e.colors[e.primaryColor][n];
  };
}
function Nue(e) {
  return {
    "@media (hover: hover)": {
      "&:hover": e
    },
    "@media (hover: none)": {
      "&:active": e
    }
  };
}
function $ue(e) {
  return () => ({
    userSelect: "none",
    color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5]
  });
}
function Iue(e) {
  return () => e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6];
}
const En = {
  fontStyles: pue,
  themeColor: nP,
  focusStyles: yue,
  linearGradient: vue,
  radialGradient: bue,
  smallerThan: xue,
  largerThan: wue,
  rgba: Du,
  cover: Oue,
  darken: Eue,
  lighten: Cue,
  radius: Pue,
  variant: Tue,
  primaryShade: $p,
  hover: Nue,
  gradient: $9,
  primaryColor: jue,
  placeholderStyles: $ue,
  dimmed: Iue
};
var Aue = Object.defineProperty, zue = Object.defineProperties, Lue = Object.getOwnPropertyDescriptors, MN = Object.getOwnPropertySymbols, Due = Object.prototype.hasOwnProperty, Fue = Object.prototype.propertyIsEnumerable, BN = (e, t, n) => t in e ? Aue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Mue = (e, t) => {
  for (var n in t || (t = {}))
    Due.call(t, n) && BN(e, n, t[n]);
  if (MN)
    for (var n of MN(t))
      Fue.call(t, n) && BN(e, n, t[n]);
  return e;
}, Bue = (e, t) => zue(e, Lue(t));
function A9(e) {
  return Bue(Mue({}, e), {
    fn: {
      fontStyles: En.fontStyles(e),
      themeColor: En.themeColor(e),
      focusStyles: En.focusStyles(e),
      largerThan: En.largerThan(e),
      smallerThan: En.smallerThan(e),
      radialGradient: En.radialGradient,
      linearGradient: En.linearGradient,
      gradient: En.gradient(e),
      rgba: En.rgba,
      cover: En.cover,
      lighten: En.lighten,
      darken: En.darken,
      primaryShade: En.primaryShade(e),
      radius: En.radius(e),
      variant: En.variant(e),
      hover: En.hover,
      primaryColor: En.primaryColor(e),
      placeholderStyles: En.placeholderStyles(e),
      dimmed: En.dimmed(e)
    }
  });
}
const Uue = {
  dir: "ltr",
  primaryShade: {
    light: 6,
    dark: 8
  },
  focusRing: "auto",
  loader: "oval",
  colorScheme: "light",
  white: "#fff",
  black: "#000",
  defaultRadius: "sm",
  transitionTimingFunction: "ease",
  colors: due,
  lineHeight: 1.55,
  fontFamily: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
  fontFamilyMonospace: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",
  primaryColor: "blue",
  respectReducedMotion: !0,
  cursorType: "default",
  defaultGradient: {
    from: "indigo",
    to: "cyan",
    deg: 45
  },
  shadows: {
    xs: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",
    sm: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",
    md: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",
    lg: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",
    xl: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"
  },
  fontSizes: {
    xs: "0.75rem",
    sm: "0.875rem",
    md: "1rem",
    lg: "1.125rem",
    xl: "1.25rem"
  },
  radius: {
    xs: "0.125rem",
    sm: "0.25rem",
    md: "0.5rem",
    lg: "1rem",
    xl: "2rem"
  },
  spacing: {
    xs: "0.625rem",
    sm: "0.75rem",
    md: "1rem",
    lg: "1.25rem",
    xl: "1.5rem"
  },
  breakpoints: {
    xs: "36em",
    sm: "48em",
    md: "62em",
    lg: "75em",
    xl: "88em"
  },
  headings: {
    fontFamily: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
    fontWeight: 700,
    sizes: {
      h1: { fontSize: "2.125rem", lineHeight: 1.3, fontWeight: void 0 },
      h2: { fontSize: "1.625rem", lineHeight: 1.35, fontWeight: void 0 },
      h3: { fontSize: "1.375rem", lineHeight: 1.4, fontWeight: void 0 },
      h4: { fontSize: "1.125rem", lineHeight: 1.45, fontWeight: void 0 },
      h5: { fontSize: "1rem", lineHeight: 1.5, fontWeight: void 0 },
      h6: { fontSize: "0.875rem", lineHeight: 1.5, fontWeight: void 0 }
    }
  },
  other: {},
  components: {},
  activeStyles: { transform: "translateY(0.0625rem)" },
  datesLocale: "en",
  globalStyles: void 0,
  focusRingStyles: {
    styles: (e) => ({
      outlineOffset: "0.125rem",
      outline: `0.125rem solid ${e.colors[e.primaryColor][e.colorScheme === "dark" ? 7 : 5]}`
    }),
    resetStyles: () => ({ outline: "none" }),
    inputStyles: (e) => ({
      outline: "none",
      borderColor: e.colors[e.primaryColor][typeof e.primaryShade == "object" ? e.primaryShade[e.colorScheme] : e.primaryShade]
    })
  }
}, oP = A9(Uue);
function Hue(e) {
  if (e.sheet)
    return e.sheet;
  for (var t = 0; t < document.styleSheets.length; t++)
    if (document.styleSheets[t].ownerNode === e)
      return document.styleSheets[t];
}
function Wue(e) {
  var t = document.createElement("style");
  return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
}
var Vue = /* @__PURE__ */ function() {
  function e(n) {
    var r = this;
    this._insertTag = function(o) {
      var i;
      r.tags.length === 0 ? r.insertionPoint ? i = r.insertionPoint.nextSibling : r.prepend ? i = r.container.firstChild : i = r.before : i = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(o, i), r.tags.push(o);
    }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
  }
  var t = e.prototype;
  return t.hydrate = function(n) {
    n.forEach(this._insertTag);
  }, t.insert = function(n) {
    this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Wue(this));
    var r = this.tags[this.tags.length - 1];
    if (this.isSpeedy) {
      var o = Hue(r);
      try {
        o.insertRule(n, o.cssRules.length);
      } catch {
      }
    } else
      r.appendChild(document.createTextNode(n));
    this.ctr++;
  }, t.flush = function() {
    this.tags.forEach(function(n) {
      return n.parentNode && n.parentNode.removeChild(n);
    }), this.tags = [], this.ctr = 0;
  }, e;
}(), tr = "-ms-", Uy = "-moz-", kt = "-webkit-", z9 = "comm", iP = "rule", aP = "decl", que = "@import", L9 = "@keyframes", Gue = "@layer", Kue = Math.abs, px = String.fromCharCode, Yue = Object.assign;
function Xue(e, t) {
  return Un(e, 0) ^ 45 ? (((t << 2 ^ Un(e, 0)) << 2 ^ Un(e, 1)) << 2 ^ Un(e, 2)) << 2 ^ Un(e, 3) : 0;
}
function D9(e) {
  return e.trim();
}
function Zue(e, t) {
  return (e = t.exec(e)) ? e[0] : e;
}
function Ot(e, t, n) {
  return e.replace(t, n);
}
function IO(e, t) {
  return e.indexOf(t);
}
function Un(e, t) {
  return e.charCodeAt(t) | 0;
}
function hp(e, t, n) {
  return e.slice(t, n);
}
function Ni(e) {
  return e.length;
}
function lP(e) {
  return e.length;
}
function yh(e, t) {
  return t.push(e), e;
}
function Que(e, t) {
  return e.map(t).join("");
}
var mx = 1, Pc = 1, F9 = 0, Ur = 0, wn = 0, Jc = "";
function hx(e, t, n, r, o, i, a) {
  return { value: e, root: t, parent: n, type: r, props: o, children: i, line: mx, column: Pc, length: a, return: "" };
}
function qf(e, t) {
  return Yue(hx("", null, null, "", null, null, 0), e, { length: -e.length }, t);
}
function Jue() {
  return wn;
}
function ece() {
  return wn = Ur > 0 ? Un(Jc, --Ur) : 0, Pc--, wn === 10 && (Pc = 1, mx--), wn;
}
function mo() {
  return wn = Ur < F9 ? Un(Jc, Ur++) : 0, Pc++, wn === 10 && (Pc = 1, mx++), wn;
}
function Gi() {
  return Un(Jc, Ur);
}
function Bg() {
  return Ur;
}
function Ip(e, t) {
  return hp(Jc, e, t);
}
function gp(e) {
  switch (e) {
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    case 59:
    case 123:
    case 125:
      return 4;
    case 58:
      return 3;
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function M9(e) {
  return mx = Pc = 1, F9 = Ni(Jc = e), Ur = 0, [];
}
function B9(e) {
  return Jc = "", e;
}
function Ug(e) {
  return D9(Ip(Ur - 1, AO(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function tce(e) {
  for (; (wn = Gi()) && wn < 33; )
    mo();
  return gp(e) > 2 || gp(wn) > 3 ? "" : " ";
}
function nce(e, t) {
  for (; --t && mo() && !(wn < 48 || wn > 102 || wn > 57 && wn < 65 || wn > 70 && wn < 97); )
    ;
  return Ip(e, Bg() + (t < 6 && Gi() == 32 && mo() == 32));
}
function AO(e) {
  for (; mo(); )
    switch (wn) {
      case e:
        return Ur;
      case 34:
      case 39:
        e !== 34 && e !== 39 && AO(wn);
        break;
      case 40:
        e === 41 && AO(e);
        break;
      case 92:
        mo();
        break;
    }
  return Ur;
}
function rce(e, t) {
  for (; mo() && e + wn !== 57 && !(e + wn === 84 && Gi() === 47); )
    ;
  return "/*" + Ip(t, Ur - 1) + "*" + px(e === 47 ? e : mo());
}
function oce(e) {
  for (; !gp(Gi()); )
    mo();
  return Ip(e, Ur);
}
function ice(e) {
  return B9(Hg("", null, null, null, [""], e = M9(e), 0, [0], e));
}
function Hg(e, t, n, r, o, i, a, l, s) {
  for (var c = 0, p = 0, f = a, m = 0, h = 0, g = 0, v = 1, S = 1, w = 1, x = 0, k = "", E = o, O = i, C = r, R = k; S; )
    switch (g = x, x = mo()) {
      case 40:
        if (g != 108 && Un(R, f - 1) == 58) {
          IO(R += Ot(Ug(x), "&", "&\f"), "&\f") != -1 && (w = -1);
          break;
        }
      case 34:
      case 39:
      case 91:
        R += Ug(x);
        break;
      case 9:
      case 10:
      case 13:
      case 32:
        R += tce(g);
        break;
      case 92:
        R += nce(Bg() - 1, 7);
        continue;
      case 47:
        switch (Gi()) {
          case 42:
          case 47:
            yh(ace(rce(mo(), Bg()), t, n), s);
            break;
          default:
            R += "/";
        }
        break;
      case 123 * v:
        l[c++] = Ni(R) * w;
      case 125 * v:
      case 59:
      case 0:
        switch (x) {
          case 0:
          case 125:
            S = 0;
          case 59 + p:
            w == -1 && (R = Ot(R, /\f/g, "")), h > 0 && Ni(R) - f && yh(h > 32 ? HN(R + ";", r, n, f - 1) : HN(Ot(R, " ", "") + ";", r, n, f - 2), s);
            break;
          case 59:
            R += ";";
          default:
            if (yh(C = UN(R, t, n, c, p, o, l, k, E = [], O = [], f), i), x === 123)
              if (p === 0)
                Hg(R, t, C, C, E, i, f, l, O);
              else
                switch (m === 99 && Un(R, 3) === 110 ? 100 : m) {
                  case 100:
                  case 108:
                  case 109:
                  case 115:
                    Hg(e, C, C, r && yh(UN(e, C, C, 0, 0, o, l, k, o, E = [], f), O), o, O, f, l, r ? E : O);
                    break;
                  default:
                    Hg(R, C, C, C, [""], O, 0, l, O);
                }
        }
        c = p = h = 0, v = w = 1, k = R = "", f = a;
        break;
      case 58:
        f = 1 + Ni(R), h = g;
      default:
        if (v < 1) {
          if (x == 123)
            --v;
          else if (x == 125 && v++ == 0 && ece() == 125)
            continue;
        }
        switch (R += px(x), x * v) {
          case 38:
            w = p > 0 ? 1 : (R += "\f", -1);
            break;
          case 44:
            l[c++] = (Ni(R) - 1) * w, w = 1;
            break;
          case 64:
            Gi() === 45 && (R += Ug(mo())), m = Gi(), p = f = Ni(k = R += oce(Bg())), x++;
            break;
          case 45:
            g === 45 && Ni(R) == 2 && (v = 0);
        }
    }
  return i;
}
function UN(e, t, n, r, o, i, a, l, s, c, p) {
  for (var f = o - 1, m = o === 0 ? i : [""], h = lP(m), g = 0, v = 0, S = 0; g < r; ++g)
    for (var w = 0, x = hp(e, f + 1, f = Kue(v = a[g])), k = e; w < h; ++w)
      (k = D9(v > 0 ? m[w] + " " + x : Ot(x, /&\f/g, m[w]))) && (s[S++] = k);
  return hx(e, t, n, o === 0 ? iP : l, s, c, p);
}
function ace(e, t, n) {
  return hx(e, t, n, z9, px(Jue()), hp(e, 2, -2), 0);
}
function HN(e, t, n, r) {
  return hx(e, t, n, aP, hp(e, 0, r), hp(e, r + 1, -1), r);
}
function mc(e, t) {
  for (var n = "", r = lP(e), o = 0; o < r; o++)
    n += t(e[o], o, e, t) || "";
  return n;
}
function lce(e, t, n, r) {
  switch (e.type) {
    case Gue:
      if (e.children.length)
        break;
    case que:
    case aP:
      return e.return = e.return || e.value;
    case z9:
      return "";
    case L9:
      return e.return = e.value + "{" + mc(e.children, r) + "}";
    case iP:
      e.value = e.props.join(",");
  }
  return Ni(n = mc(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
}
function sce(e) {
  var t = lP(e);
  return function(n, r, o, i) {
    for (var a = "", l = 0; l < t; l++)
      a += e[l](n, r, o, i) || "";
    return a;
  };
}
function uce(e) {
  return function(t) {
    t.root || (t = t.return) && e(t);
  };
}
var WN = function(e) {
  var t = /* @__PURE__ */ new WeakMap();
  return function(n) {
    if (t.has(n))
      return t.get(n);
    var r = e(n);
    return t.set(n, r), r;
  };
};
function cce(e) {
  var t = /* @__PURE__ */ Object.create(null);
  return function(n) {
    return t[n] === void 0 && (t[n] = e(n)), t[n];
  };
}
var fce = function(e, t, n) {
  for (var r = 0, o = 0; r = o, o = Gi(), r === 38 && o === 12 && (t[n] = 1), !gp(o); )
    mo();
  return Ip(e, Ur);
}, dce = function(e, t) {
  var n = -1, r = 44;
  do
    switch (gp(r)) {
      case 0:
        r === 38 && Gi() === 12 && (t[n] = 1), e[n] += fce(Ur - 1, t, n);
        break;
      case 2:
        e[n] += Ug(r);
        break;
      case 4:
        if (r === 44) {
          e[++n] = Gi() === 58 ? "&\f" : "", t[n] = e[n].length;
          break;
        }
      default:
        e[n] += px(r);
    }
  while (r = mo());
  return e;
}, pce = function(e, t) {
  return B9(dce(M9(e), t));
}, VN = /* @__PURE__ */ new WeakMap(), mce = function(e) {
  if (!(e.type !== "rule" || !e.parent || // positive .length indicates that this rule contains pseudo
  // negative .length indicates that this rule has been already prefixed
  e.length < 1)) {
    for (var t = e.value, n = e.parent, r = e.column === n.column && e.line === n.line; n.type !== "rule"; )
      if (n = n.parent, !n)
        return;
    if (!(e.props.length === 1 && t.charCodeAt(0) !== 58 && !VN.get(n)) && !r) {
      VN.set(e, !0);
      for (var o = [], i = pce(t, o), a = n.props, l = 0, s = 0; l < i.length; l++)
        for (var c = 0; c < a.length; c++, s++)
          e.props[s] = o[l] ? i[l].replace(/&\f/g, a[c]) : a[c] + " " + i[l];
    }
  }
}, hce = function(e) {
  if (e.type === "decl") {
    var t = e.value;
    t.charCodeAt(0) === 108 && // charcode for b
    t.charCodeAt(2) === 98 && (e.return = "", e.value = "");
  }
};
function U9(e, t) {
  switch (Xue(e, t)) {
    case 5103:
      return kt + "print-" + e + e;
    case 5737:
    case 4201:
    case 3177:
    case 3433:
    case 1641:
    case 4457:
    case 2921:
    case 5572:
    case 6356:
    case 5844:
    case 3191:
    case 6645:
    case 3005:
    case 6391:
    case 5879:
    case 5623:
    case 6135:
    case 4599:
    case 4855:
    case 4215:
    case 6389:
    case 5109:
    case 5365:
    case 5621:
    case 3829:
      return kt + e + e;
    case 5349:
    case 4246:
    case 4810:
    case 6968:
    case 2756:
      return kt + e + Uy + e + tr + e + e;
    case 6828:
    case 4268:
      return kt + e + tr + e + e;
    case 6165:
      return kt + e + tr + "flex-" + e + e;
    case 5187:
      return kt + e + Ot(e, /(\w+).+(:[^]+)/, kt + "box-$1$2" + tr + "flex-$1$2") + e;
    case 5443:
      return kt + e + tr + "flex-item-" + Ot(e, /flex-|-self/, "") + e;
    case 4675:
      return kt + e + tr + "flex-line-pack" + Ot(e, /align-content|flex-|-self/, "") + e;
    case 5548:
      return kt + e + tr + Ot(e, "shrink", "negative") + e;
    case 5292:
      return kt + e + tr + Ot(e, "basis", "preferred-size") + e;
    case 6060:
      return kt + "box-" + Ot(e, "-grow", "") + kt + e + tr + Ot(e, "grow", "positive") + e;
    case 4554:
      return kt + Ot(e, /([^-])(transform)/g, "$1" + kt + "$2") + e;
    case 6187:
      return Ot(Ot(Ot(e, /(zoom-|grab)/, kt + "$1"), /(image-set)/, kt + "$1"), e, "") + e;
    case 5495:
    case 3959:
      return Ot(e, /(image-set\([^]*)/, kt + "$1$`$1");
    case 4968:
      return Ot(Ot(e, /(.+:)(flex-)?(.*)/, kt + "box-pack:$3" + tr + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + kt + e + e;
    case 4095:
    case 3583:
    case 4068:
    case 2532:
      return Ot(e, /(.+)-inline(.+)/, kt + "$1$2") + e;
    case 8116:
    case 7059:
    case 5753:
    case 5535:
    case 5445:
    case 5701:
    case 4933:
    case 4677:
    case 5533:
    case 5789:
    case 5021:
    case 4765:
      if (Ni(e) - 1 - t > 6)
        switch (Un(e, t + 1)) {
          case 109:
            if (Un(e, t + 4) !== 45)
              break;
          case 102:
            return Ot(e, /(.+:)(.+)-([^]+)/, "$1" + kt + "$2-$3$1" + Uy + (Un(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
          case 115:
            return ~IO(e, "stretch") ? U9(Ot(e, "stretch", "fill-available"), t) + e : e;
        }
      break;
    case 4949:
      if (Un(e, t + 1) !== 115)
        break;
    case 6444:
      switch (Un(e, Ni(e) - 3 - (~IO(e, "!important") && 10))) {
        case 107:
          return Ot(e, ":", ":" + kt) + e;
        case 101:
          return Ot(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + kt + (Un(e, 14) === 45 ? "inline-" : "") + "box$3$1" + kt + "$2$3$1" + tr + "$2box$3") + e;
      }
      break;
    case 5936:
      switch (Un(e, t + 11)) {
        case 114:
          return kt + e + tr + Ot(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
        case 108:
          return kt + e + tr + Ot(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
        case 45:
          return kt + e + tr + Ot(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
      }
      return kt + e + tr + e + e;
  }
  return e;
}
var gce = function(e, t, n, r) {
  if (e.length > -1 && !e.return)
    switch (e.type) {
      case aP:
        e.return = U9(e.value, e.length);
        break;
      case L9:
        return mc([qf(e, {
          value: Ot(e.value, "@", "@" + kt)
        })], r);
      case iP:
        if (e.length)
          return Que(e.props, function(o) {
            switch (Zue(o, /(::plac\w+|:read-\w+)/)) {
              case ":read-only":
              case ":read-write":
                return mc([qf(e, {
                  props: [Ot(o, /:(read-\w+)/, ":" + Uy + "$1")]
                })], r);
              case "::placeholder":
                return mc([qf(e, {
                  props: [Ot(o, /:(plac\w+)/, ":" + kt + "input-$1")]
                }), qf(e, {
                  props: [Ot(o, /:(plac\w+)/, ":" + Uy + "$1")]
                }), qf(e, {
                  props: [Ot(o, /:(plac\w+)/, tr + "input-$1")]
                })], r);
            }
            return "";
          });
    }
}, yce = [gce], H9 = function(e) {
  var t = e.key;
  if (t === "css") {
    var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
    Array.prototype.forEach.call(n, function(g) {
      var v = g.getAttribute("data-emotion");
      v.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
    });
  }
  var r = e.stylisPlugins || yce, o = {}, i, a = [];
  i = e.container || document.head, Array.prototype.forEach.call(
    // this means we will ignore elements which don't have a space in them which
    // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
    document.querySelectorAll('style[data-emotion^="' + t + ' "]'),
    function(g) {
      for (var v = g.getAttribute("data-emotion").split(" "), S = 1; S < v.length; S++)
        o[v[S]] = !0;
      a.push(g);
    }
  );
  var l, s = [mce, hce];
  {
    var c, p = [lce, uce(function(g) {
      c.insert(g);
    })], f = sce(s.concat(r, p)), m = function(g) {
      return mc(ice(g), f);
    };
    l = function(g, v, S, w) {
      c = S, m(g ? g + "{" + v.styles + "}" : v.styles), w && (h.inserted[v.name] = !0);
    };
  }
  var h = {
    key: t,
    sheet: new Vue({
      key: t,
      container: i,
      nonce: e.nonce,
      speedy: e.speedy,
      prepend: e.prepend,
      insertionPoint: e.insertionPoint
    }),
    nonce: e.nonce,
    inserted: o,
    registered: {},
    insert: l
  };
  return h.sheet.hydrate(a), h;
};
function qt() {
  return qt = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
    }
    return e;
  }, qt.apply(this, arguments);
}
var W9 = { exports: {} }, Rt = {};
/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var qN;
function vce() {
  if (qN)
    return Rt;
  qN = 1;
  var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, h = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, v = e ? Symbol.for("react.block") : 60121, S = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
  function k(O) {
    if (typeof O == "object" && O !== null) {
      var C = O.$$typeof;
      switch (C) {
        case t:
          switch (O = O.type, O) {
            case s:
            case c:
            case r:
            case i:
            case o:
            case f:
              return O;
            default:
              switch (O = O && O.$$typeof, O) {
                case l:
                case p:
                case g:
                case h:
                case a:
                  return O;
                default:
                  return C;
              }
          }
        case n:
          return C;
      }
    }
  }
  function E(O) {
    return k(O) === c;
  }
  return Rt.AsyncMode = s, Rt.ConcurrentMode = c, Rt.ContextConsumer = l, Rt.ContextProvider = a, Rt.Element = t, Rt.ForwardRef = p, Rt.Fragment = r, Rt.Lazy = g, Rt.Memo = h, Rt.Portal = n, Rt.Profiler = i, Rt.StrictMode = o, Rt.Suspense = f, Rt.isAsyncMode = function(O) {
    return E(O) || k(O) === s;
  }, Rt.isConcurrentMode = E, Rt.isContextConsumer = function(O) {
    return k(O) === l;
  }, Rt.isContextProvider = function(O) {
    return k(O) === a;
  }, Rt.isElement = function(O) {
    return typeof O == "object" && O !== null && O.$$typeof === t;
  }, Rt.isForwardRef = function(O) {
    return k(O) === p;
  }, Rt.isFragment = function(O) {
    return k(O) === r;
  }, Rt.isLazy = function(O) {
    return k(O) === g;
  }, Rt.isMemo = function(O) {
    return k(O) === h;
  }, Rt.isPortal = function(O) {
    return k(O) === n;
  }, Rt.isProfiler = function(O) {
    return k(O) === i;
  }, Rt.isStrictMode = function(O) {
    return k(O) === o;
  }, Rt.isSuspense = function(O) {
    return k(O) === f;
  }, Rt.isValidElementType = function(O) {
    return typeof O == "string" || typeof O == "function" || O === r || O === c || O === i || O === o || O === f || O === m || typeof O == "object" && O !== null && (O.$$typeof === g || O.$$typeof === h || O.$$typeof === a || O.$$typeof === l || O.$$typeof === p || O.$$typeof === S || O.$$typeof === w || O.$$typeof === x || O.$$typeof === v);
  }, Rt.typeOf = k, Rt;
}
W9.exports = vce();
var bce = W9.exports, V9 = bce, wce = {
  $$typeof: !0,
  render: !0,
  defaultProps: !0,
  displayName: !0,
  propTypes: !0
}, xce = {
  $$typeof: !0,
  compare: !0,
  defaultProps: !0,
  displayName: !0,
  propTypes: !0,
  type: !0
}, q9 = {};
q9[V9.ForwardRef] = wce;
q9[V9.Memo] = xce;
var Sce = !0;
function kce(e, t, n) {
  var r = "";
  return n.split(" ").forEach(function(o) {
    e[o] !== void 0 ? t.push(e[o] + ";") : r += o + " ";
  }), r;
}
var _ce = function(e, t, n) {
  var r = e.key + "-" + t.name;
  (n === !1 || // we need to always store it if we're in compat mode and
  // in node since emotion-server relies on whether a style is in
  // the registered cache to know whether a style is global or not
  // also, note that this check will be dead code eliminated in the browser
  Sce === !1) && e.registered[r] === void 0 && (e.registered[r] = t.styles);
}, G9 = function(e, t, n) {
  _ce(e, t, n);
  var r = e.key + "-" + t.name;
  if (e.inserted[t.name] === void 0) {
    var o = t;
    do
      e.insert(t === o ? "." + r : "", o, e.sheet, !0), o = o.next;
    while (o !== void 0);
  }
};
function Oce(e) {
  for (var t = 0, n, r = 0, o = e.length; o >= 4; ++r, o -= 4)
    n = e.charCodeAt(r) & 255 | (e.charCodeAt(++r) & 255) << 8 | (e.charCodeAt(++r) & 255) << 16 | (e.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, t = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  switch (o) {
    case 3:
      t ^= (e.charCodeAt(r + 2) & 255) << 16;
    case 2:
      t ^= (e.charCodeAt(r + 1) & 255) << 8;
    case 1:
      t ^= e.charCodeAt(r) & 255, t = /* Math.imul(h, m): */
      (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  }
  return t ^= t >>> 13, t = /* Math.imul(h, m): */
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
}
var Ece = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
}, Cce = /[A-Z]|^ms/g, Pce = /_EMO_([^_]+?)_([^]*?)_EMO_/g, K9 = function(e) {
  return e.charCodeAt(1) === 45;
}, GN = function(e) {
  return e != null && typeof e != "boolean";
}, o_ = /* @__PURE__ */ cce(function(e) {
  return K9(e) ? e : e.replace(Cce, "-$&").toLowerCase();
}), KN = function(e, t) {
  switch (e) {
    case "animation":
    case "animationName":
      if (typeof t == "string")
        return t.replace(Pce, function(n, r, o) {
          return $i = {
            name: r,
            styles: o,
            next: $i
          }, r;
        });
  }
  return Ece[e] !== 1 && !K9(e) && typeof t == "number" && t !== 0 ? t + "px" : t;
};
function yp(e, t, n) {
  if (n == null)
    return "";
  if (n.__emotion_styles !== void 0)
    return n;
  switch (typeof n) {
    case "boolean":
      return "";
    case "object": {
      if (n.anim === 1)
        return $i = {
          name: n.name,
          styles: n.styles,
          next: $i
        }, n.name;
      if (n.styles !== void 0) {
        var r = n.next;
        if (r !== void 0)
          for (; r !== void 0; )
            $i = {
              name: r.name,
              styles: r.styles,
              next: $i
            }, r = r.next;
        var o = n.styles + ";";
        return o;
      }
      return Rce(e, t, n);
    }
    case "function": {
      if (e !== void 0) {
        var i = $i, a = n(e);
        return $i = i, yp(e, t, a);
      }
      break;
    }
  }
  if (t == null)
    return n;
  var l = t[n];
  return l !== void 0 ? l : n;
}
function Rce(e, t, n) {
  var r = "";
  if (Array.isArray(n))
    for (var o = 0; o < n.length; o++)
      r += yp(e, t, n[o]) + ";";
  else
    for (var i in n) {
      var a = n[i];
      if (typeof a != "object")
        t != null && t[a] !== void 0 ? r += i + "{" + t[a] + "}" : GN(a) && (r += o_(i) + ":" + KN(i, a) + ";");
      else if (Array.isArray(a) && typeof a[0] == "string" && (t == null || t[a[0]] === void 0))
        for (var l = 0; l < a.length; l++)
          GN(a[l]) && (r += o_(i) + ":" + KN(i, a[l]) + ";");
      else {
        var s = yp(e, t, a);
        switch (i) {
          case "animation":
          case "animationName": {
            r += o_(i) + ":" + s + ";";
            break;
          }
          default:
            r += i + "{" + s + "}";
        }
      }
    }
  return r;
}
var YN = /label:\s*([^\s;\n{]+)\s*(;|$)/g, $i, Y9 = function(e, t, n) {
  if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
    return e[0];
  var r = !0, o = "";
  $i = void 0;
  var i = e[0];
  i == null || i.raw === void 0 ? (r = !1, o += yp(n, t, i)) : o += i[0];
  for (var a = 1; a < e.length; a++)
    o += yp(n, t, e[a]), r && (o += i[a]);
  YN.lastIndex = 0;
  for (var l = "", s; (s = YN.exec(o)) !== null; )
    l += "-" + // $FlowFixMe we know it's not null
    s[1];
  var c = Oce(o) + l;
  return {
    name: c,
    styles: o,
    next: $i
  };
}, Tce = b.useInsertionEffect ? b.useInsertionEffect : !1, XN = Tce || b.useLayoutEffect, X9 = /* @__PURE__ */ b.createContext(
  // we're doing this to avoid preconstruct's dead code elimination in this one case
  // because this module is primarily intended for the browser and node
  // but it's also required in react native and similar environments sometimes
  // and we could have a special build just for that
  // but this is much easier and the native packages
  // might use a different theme context in the future anyway
  typeof HTMLElement < "u" ? /* @__PURE__ */ H9({
    key: "css"
  }) : null
);
X9.Provider;
var jce = function(e) {
  return /* @__PURE__ */ b.forwardRef(function(t, n) {
    var r = b.useContext(X9);
    return e(t, r, n);
  });
}, zO = /* @__PURE__ */ b.createContext({}), Nce = function(e, t) {
  if (typeof t == "function") {
    var n = t(e);
    return n;
  }
  return qt({}, e, t);
}, $ce = /* @__PURE__ */ WN(function(e) {
  return WN(function(t) {
    return Nce(e, t);
  });
}), Ice = function(e) {
  var t = b.useContext(zO);
  return e.theme !== t && (t = $ce(t)(e.theme)), /* @__PURE__ */ b.createElement(zO.Provider, {
    value: t
  }, e.children);
}, gx = /* @__PURE__ */ jce(function(e, t) {
  var n = e.styles, r = Y9([n], void 0, b.useContext(zO)), o = b.useRef();
  return XN(function() {
    var i = t.key + "-global", a = new t.sheet.constructor({
      key: i,
      nonce: t.sheet.nonce,
      container: t.sheet.container,
      speedy: t.sheet.isSpeedy
    }), l = !1, s = document.querySelector('style[data-emotion="' + i + " " + r.name + '"]');
    return t.sheet.tags.length && (a.before = t.sheet.tags[0]), s !== null && (l = !0, s.setAttribute("data-emotion", i), a.hydrate([s])), o.current = [a, l], function() {
      a.flush();
    };
  }, [t]), XN(function() {
    var i = o.current, a = i[0], l = i[1];
    if (l) {
      i[1] = !1;
      return;
    }
    if (r.next !== void 0 && G9(t, r.next, !0), a.tags.length) {
      var s = a.tags[a.tags.length - 1].nextElementSibling;
      a.before = s, a.flush();
    }
    t.insert("", r, a, !1);
  }, [t, r.name]), null;
}), Ace = Object.defineProperty, zce = Object.defineProperties, Lce = Object.getOwnPropertyDescriptors, ZN = Object.getOwnPropertySymbols, Dce = Object.prototype.hasOwnProperty, Fce = Object.prototype.propertyIsEnumerable, QN = (e, t, n) => t in e ? Ace(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Mce = (e, t) => {
  for (var n in t || (t = {}))
    Dce.call(t, n) && QN(e, n, t[n]);
  if (ZN)
    for (var n of ZN(t))
      Fce.call(t, n) && QN(e, n, t[n]);
  return e;
}, Bce = (e, t) => zce(e, Lce(t));
function Uce({ theme: e }) {
  return /* @__PURE__ */ P.createElement(gx, {
    styles: {
      "*, *::before, *::after": {
        boxSizing: "border-box"
      },
      html: {
        colorScheme: e.colorScheme === "dark" ? "dark" : "light"
      },
      body: Bce(Mce({}, e.fn.fontStyles()), {
        backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.white,
        color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
        lineHeight: e.lineHeight,
        fontSize: e.fontSizes.md,
        WebkitFontSmoothing: "antialiased",
        MozOsxFontSmoothing: "grayscale"
      })
    }
  });
}
function Gf(e, t, n, r = F) {
  Object.keys(t).forEach((o) => {
    e[`--mantine-${n}-${o}`] = r(t[o]);
  });
}
function Hce({ theme: e }) {
  const t = {
    "--mantine-color-white": e.white,
    "--mantine-color-black": e.black,
    "--mantine-transition-timing-function": e.transitionTimingFunction,
    "--mantine-line-height": `${e.lineHeight}`,
    "--mantine-font-family": e.fontFamily,
    "--mantine-font-family-monospace": e.fontFamilyMonospace,
    "--mantine-font-family-headings": e.headings.fontFamily,
    "--mantine-heading-font-weight": `${e.headings.fontWeight}`
  };
  Gf(t, e.shadows, "shadow"), Gf(t, e.fontSizes, "font-size"), Gf(t, e.radius, "radius"), Gf(t, e.spacing, "spacing"), Gf(t, e.breakpoints, "breakpoints", dx), Object.keys(e.colors).forEach((r) => {
    e.colors[r].forEach((o, i) => {
      t[`--mantine-color-${r}-${i}`] = o;
    });
  });
  const n = e.headings.sizes;
  return Object.keys(n).forEach((r) => {
    t[`--mantine-${r}-font-size`] = n[r].fontSize, t[`--mantine-${r}-line-height`] = `${n[r].lineHeight}`;
  }), /* @__PURE__ */ P.createElement(gx, {
    styles: {
      ":root": t
    }
  });
}
var Wce = Object.defineProperty, Vce = Object.defineProperties, qce = Object.getOwnPropertyDescriptors, JN = Object.getOwnPropertySymbols, Gce = Object.prototype.hasOwnProperty, Kce = Object.prototype.propertyIsEnumerable, e3 = (e, t, n) => t in e ? Wce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ki = (e, t) => {
  for (var n in t || (t = {}))
    Gce.call(t, n) && e3(e, n, t[n]);
  if (JN)
    for (var n of JN(t))
      Kce.call(t, n) && e3(e, n, t[n]);
  return e;
}, i_ = (e, t) => Vce(e, qce(t));
function Yce(e, t) {
  var n;
  if (!t)
    return e;
  const r = Object.keys(e).reduce((o, i) => {
    if (i === "headings" && t.headings) {
      const a = t.headings.sizes ? Object.keys(e.headings.sizes).reduce((l, s) => (l[s] = ki(ki({}, e.headings.sizes[s]), t.headings.sizes[s]), l), {}) : e.headings.sizes;
      return i_(ki({}, o), {
        headings: i_(ki(ki({}, e.headings), t.headings), {
          sizes: a
        })
      });
    }
    if (i === "breakpoints" && t.breakpoints) {
      const a = ki(ki({}, e.breakpoints), t.breakpoints);
      return i_(ki({}, o), {
        breakpoints: Object.fromEntries(Object.entries(a).sort((l, s) => Cc(l[1]) - Cc(s[1])))
      });
    }
    return o[i] = typeof t[i] == "object" ? ki(ki({}, e[i]), t[i]) : typeof t[i] == "number" || typeof t[i] == "boolean" || typeof t[i] == "function" ? t[i] : t[i] || e[i], o;
  }, {});
  if (t != null && t.fontFamily && !((n = t == null ? void 0 : t.headings) != null && n.fontFamily) && (r.headings.fontFamily = t.fontFamily), !(r.primaryColor in r.colors))
    throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");
  return r;
}
function Xce(e, t) {
  return A9(Yce(e, t));
}
function Z9(e) {
  return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[n] = e[n]), t), {});
}
const Zce = {
  html: {
    fontFamily: "sans-serif",
    lineHeight: "1.15",
    textSizeAdjust: "100%"
  },
  body: {
    margin: 0
  },
  "article, aside, footer, header, nav, section, figcaption, figure, main": {
    display: "block"
  },
  h1: {
    fontSize: "2em"
  },
  hr: {
    boxSizing: "content-box",
    height: 0,
    overflow: "visible"
  },
  pre: {
    fontFamily: "monospace, monospace",
    fontSize: "1em"
  },
  a: {
    background: "transparent",
    textDecorationSkip: "objects"
  },
  "a:active, a:hover": {
    outlineWidth: 0
  },
  "abbr[title]": {
    borderBottom: "none",
    textDecoration: "underline"
  },
  "b, strong": {
    fontWeight: "bolder"
  },
  "code, kbp, samp": {
    fontFamily: "monospace, monospace",
    fontSize: "1em"
  },
  dfn: {
    fontStyle: "italic"
  },
  mark: {
    backgroundColor: "#ff0",
    color: "#000"
  },
  small: {
    fontSize: "80%"
  },
  "sub, sup": {
    fontSize: "75%",
    lineHeight: 0,
    position: "relative",
    verticalAlign: "baseline"
  },
  sup: {
    top: "-0.5em"
  },
  sub: {
    bottom: "-0.25em"
  },
  "audio, video": {
    display: "inline-block"
  },
  "audio:not([controls])": {
    display: "none",
    height: 0
  },
  img: {
    borderStyle: "none",
    verticalAlign: "middle"
  },
  "svg:not(:root)": {
    overflow: "hidden"
  },
  "button, input, optgroup, select, textarea": {
    fontFamily: "sans-serif",
    fontSize: "100%",
    lineHeight: "1.15",
    margin: 0
  },
  "button, input": {
    overflow: "visible"
  },
  "button, select": {
    textTransform: "none"
  },
  "button, [type=reset], [type=submit]": {
    WebkitAppearance: "button"
  },
  "button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner": {
    borderStyle: "none",
    padding: 0
  },
  "button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring": {
    outline: `${F(1)} dotted ButtonText`
  },
  legend: {
    boxSizing: "border-box",
    color: "inherit",
    display: "table",
    maxWidth: "100%",
    padding: 0,
    whiteSpace: "normal"
  },
  progress: {
    display: "inline-block",
    verticalAlign: "baseline"
  },
  textarea: {
    overflow: "auto"
  },
  "[type=checkbox], [type=radio]": {
    boxSizing: "border-box",
    padding: 0
  },
  "[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button": {
    height: "auto"
  },
  "[type=search]": {
    appearance: "none"
  },
  "[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration": {
    appearance: "none"
  },
  "::-webkit-file-upload-button": {
    appearance: "button",
    font: "inherit"
  },
  "details, menu": {
    display: "block"
  },
  summary: {
    display: "list-item"
  },
  canvas: {
    display: "inline-block"
  },
  template: {
    display: "none"
  }
};
function Qce() {
  return /* @__PURE__ */ P.createElement(gx, {
    styles: Zce
  });
}
var Jce = Object.defineProperty, t3 = Object.getOwnPropertySymbols, efe = Object.prototype.hasOwnProperty, tfe = Object.prototype.propertyIsEnumerable, n3 = (e, t, n) => t in e ? Jce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Dd = (e, t) => {
  for (var n in t || (t = {}))
    efe.call(t, n) && n3(e, n, t[n]);
  if (t3)
    for (var n of t3(t))
      tfe.call(t, n) && n3(e, n, t[n]);
  return e;
};
const Hy = b.createContext({
  theme: oP
});
function Yn() {
  var e;
  return ((e = b.useContext(Hy)) == null ? void 0 : e.theme) || oP;
}
function nfe(e) {
  const t = Yn(), n = (r) => {
    var o, i, a, l;
    return {
      styles: ((o = t.components[r]) == null ? void 0 : o.styles) || {},
      classNames: ((i = t.components[r]) == null ? void 0 : i.classNames) || {},
      variants: (a = t.components[r]) == null ? void 0 : a.variants,
      sizes: (l = t.components[r]) == null ? void 0 : l.sizes
    };
  };
  return Array.isArray(e) ? e.map(n) : [n(e)];
}
function Q9() {
  var e;
  return (e = b.useContext(Hy)) == null ? void 0 : e.emotionCache;
}
function Te(e, t, n) {
  var r;
  const o = Yn(), i = (r = o.components[e]) == null ? void 0 : r.defaultProps, a = typeof i == "function" ? i(o) : i;
  return Dd(Dd(Dd({}, t), a), Z9(n));
}
function J9({
  theme: e,
  emotionCache: t,
  withNormalizeCSS: n = !1,
  withGlobalStyles: r = !1,
  withCSSVariables: o = !1,
  inherit: i = !1,
  children: a
}) {
  const l = b.useContext(Hy), s = Xce(oP, i ? Dd(Dd({}, l.theme), e) : e);
  return /* @__PURE__ */ P.createElement(Ice, {
    theme: s
  }, /* @__PURE__ */ P.createElement(Hy.Provider, {
    value: { theme: s, emotionCache: t }
  }, n && /* @__PURE__ */ P.createElement(Qce, null), r && /* @__PURE__ */ P.createElement(Uce, {
    theme: s
  }), o && /* @__PURE__ */ P.createElement(Hce, {
    theme: s
  }), typeof s.globalStyles == "function" && /* @__PURE__ */ P.createElement(gx, {
    styles: s.globalStyles(s)
  }), a));
}
J9.displayName = "@mantine/core/MantineProvider";
const rfe = {
  app: 100,
  modal: 200,
  popover: 300,
  overlay: 400,
  max: 9999
};
function Ji(e) {
  return rfe[e];
}
function ofe(e, t) {
  const n = b.useRef();
  return (!n.current || t.length !== n.current.prevDeps.length || n.current.prevDeps.map((r, o) => r === t[o]).indexOf(!1) >= 0) && (n.current = {
    v: e(),
    prevDeps: [...t]
  }), n.current.v;
}
const ife = H9({ key: "mantine", prepend: !0 });
function afe() {
  return Q9() || ife;
}
var lfe = Object.defineProperty, r3 = Object.getOwnPropertySymbols, sfe = Object.prototype.hasOwnProperty, ufe = Object.prototype.propertyIsEnumerable, o3 = (e, t, n) => t in e ? lfe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, cfe = (e, t) => {
  for (var n in t || (t = {}))
    sfe.call(t, n) && o3(e, n, t[n]);
  if (r3)
    for (var n of r3(t))
      ufe.call(t, n) && o3(e, n, t[n]);
  return e;
};
const a_ = "ref";
function ffe(e) {
  let t;
  if (e.length !== 1)
    return { args: e, ref: t };
  const [n] = e;
  if (!(n instanceof Object))
    return { args: e, ref: t };
  if (!(a_ in n))
    return { args: e, ref: t };
  t = n[a_];
  const r = cfe({}, n);
  return delete r[a_], { args: [r], ref: t };
}
const { cssFactory: dfe } = /* @__PURE__ */ (() => {
  function e(n, r, o) {
    const i = [], a = kce(n, i, o);
    return i.length < 2 ? o : a + r(i);
  }
  function t(n) {
    const { cache: r } = n, o = (...i) => {
      const { ref: a, args: l } = ffe(i), s = Y9(l, r.registered);
      return G9(r, s, !1), `${r.key}-${s.name}${a === void 0 ? "" : ` ${a}`}`;
    };
    return { css: o, cx: (...i) => e(r.registered, o, j9(i)) };
  }
  return { cssFactory: t };
})();
function e8() {
  const e = afe();
  return ofe(() => dfe({ cache: e }), [e]);
}
function pfe({
  cx: e,
  classes: t,
  context: n,
  classNames: r,
  name: o,
  cache: i
}) {
  const a = n.reduce((l, s) => (Object.keys(s.classNames).forEach((c) => {
    typeof l[c] != "string" ? l[c] = `${s.classNames[c]}` : l[c] = `${l[c]} ${s.classNames[c]}`;
  }), l), {});
  return Object.keys(t).reduce((l, s) => (l[s] = e(t[s], a[s], r != null && r[s], Array.isArray(o) ? o.filter(Boolean).map((c) => `${(i == null ? void 0 : i.key) || "mantine"}-${c}-${s}`).join(" ") : o ? `${(i == null ? void 0 : i.key) || "mantine"}-${o}-${s}` : null), l), {});
}
var mfe = Object.defineProperty, i3 = Object.getOwnPropertySymbols, hfe = Object.prototype.hasOwnProperty, gfe = Object.prototype.propertyIsEnumerable, a3 = (e, t, n) => t in e ? mfe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, l_ = (e, t) => {
  for (var n in t || (t = {}))
    hfe.call(t, n) && a3(e, n, t[n]);
  if (i3)
    for (var n of i3(t))
      gfe.call(t, n) && a3(e, n, t[n]);
  return e;
};
function LO(e, t) {
  return t && Object.keys(t).forEach((n) => {
    e[n] ? e[n] = l_(l_({}, e[n]), t[n]) : e[n] = l_({}, t[n]);
  }), e;
}
function l3(e, t, n, r) {
  const o = (i) => typeof i == "function" ? i(t, n || {}, r) : i || {};
  return Array.isArray(e) ? e.map((i) => o(i.styles)).reduce((i, a) => LO(i, a), {}) : o(e);
}
function yfe({ ctx: e, theme: t, params: n, variant: r, size: o }) {
  return e.reduce((i, a) => (a.variants && r in a.variants && LO(i, a.variants[r](t, n, { variant: r, size: o })), a.sizes && o in a.sizes && LO(i, a.sizes[o](t, n, { variant: r, size: o })), i), {});
}
function Ee(e) {
  const t = typeof e == "function" ? e : () => e;
  function n(r, o) {
    const i = Yn(), a = nfe(o == null ? void 0 : o.name), l = Q9(), s = { variant: o == null ? void 0 : o.variant, size: o == null ? void 0 : o.size }, { css: c, cx: p } = e8(), f = t(i, r, s), m = l3(o == null ? void 0 : o.styles, i, r, s), h = l3(a, i, r, s), g = yfe({
      ctx: a,
      theme: i,
      params: r,
      variant: o == null ? void 0 : o.variant,
      size: o == null ? void 0 : o.size
    }), v = Object.fromEntries(Object.keys(f).map((S) => {
      const w = p({ [c(f[S])]: !(o != null && o.unstyled) }, c(g[S]), c(h[S]), c(m[S]));
      return [S, w];
    }));
    return {
      classes: pfe({
        cx: p,
        classes: v,
        context: a,
        classNames: o == null ? void 0 : o.classNames,
        name: o == null ? void 0 : o.name,
        cache: l
      }),
      cx: p,
      theme: i
    };
  }
  return n;
}
function Fi(e) {
  return `___ref-${e || ""}`;
}
var vfe = Object.defineProperty, bfe = Object.defineProperties, wfe = Object.getOwnPropertyDescriptors, s3 = Object.getOwnPropertySymbols, xfe = Object.prototype.hasOwnProperty, Sfe = Object.prototype.propertyIsEnumerable, u3 = (e, t, n) => t in e ? vfe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Kf = (e, t) => {
  for (var n in t || (t = {}))
    xfe.call(t, n) && u3(e, n, t[n]);
  if (s3)
    for (var n of s3(t))
      Sfe.call(t, n) && u3(e, n, t[n]);
  return e;
}, Yf = (e, t) => bfe(e, wfe(t));
const Xf = {
  in: { opacity: 1, transform: "scale(1)" },
  out: { opacity: 0, transform: `scale(.9) translateY(${F(10)})` },
  transitionProperty: "transform, opacity"
}, vh = {
  fade: {
    in: { opacity: 1 },
    out: { opacity: 0 },
    transitionProperty: "opacity"
  },
  scale: {
    in: { opacity: 1, transform: "scale(1)" },
    out: { opacity: 0, transform: "scale(0)" },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "scale-y": {
    in: { opacity: 1, transform: "scaleY(1)" },
    out: { opacity: 0, transform: "scaleY(0)" },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "scale-x": {
    in: { opacity: 1, transform: "scaleX(1)" },
    out: { opacity: 0, transform: "scaleX(0)" },
    common: { transformOrigin: "left" },
    transitionProperty: "transform, opacity"
  },
  "skew-up": {
    in: { opacity: 1, transform: "translateY(0) skew(0deg, 0deg)" },
    out: { opacity: 0, transform: `translateY(-${F(20)}) skew(-10deg, -5deg)` },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "skew-down": {
    in: { opacity: 1, transform: "translateY(0) skew(0deg, 0deg)" },
    out: { opacity: 0, transform: `translateY(${F(20)}) skew(-10deg, -5deg)` },
    common: { transformOrigin: "bottom" },
    transitionProperty: "transform, opacity"
  },
  "rotate-left": {
    in: { opacity: 1, transform: "translateY(0) rotate(0deg)" },
    out: { opacity: 0, transform: `translateY(${F(20)}) rotate(-5deg)` },
    common: { transformOrigin: "bottom" },
    transitionProperty: "transform, opacity"
  },
  "rotate-right": {
    in: { opacity: 1, transform: "translateY(0) rotate(0deg)" },
    out: { opacity: 0, transform: `translateY(${F(20)}) rotate(5deg)` },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "slide-down": {
    in: { opacity: 1, transform: "translateY(0)" },
    out: { opacity: 0, transform: "translateY(-100%)" },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "slide-up": {
    in: { opacity: 1, transform: "translateY(0)" },
    out: { opacity: 0, transform: "translateY(100%)" },
    common: { transformOrigin: "bottom" },
    transitionProperty: "transform, opacity"
  },
  "slide-left": {
    in: { opacity: 1, transform: "translateX(0)" },
    out: { opacity: 0, transform: "translateX(100%)" },
    common: { transformOrigin: "left" },
    transitionProperty: "transform, opacity"
  },
  "slide-right": {
    in: { opacity: 1, transform: "translateX(0)" },
    out: { opacity: 0, transform: "translateX(-100%)" },
    common: { transformOrigin: "right" },
    transitionProperty: "transform, opacity"
  },
  pop: Yf(Kf({}, Xf), {
    common: { transformOrigin: "center center" }
  }),
  "pop-bottom-left": Yf(Kf({}, Xf), {
    common: { transformOrigin: "bottom left" }
  }),
  "pop-bottom-right": Yf(Kf({}, Xf), {
    common: { transformOrigin: "bottom right" }
  }),
  "pop-top-left": Yf(Kf({}, Xf), {
    common: { transformOrigin: "top left" }
  }),
  "pop-top-right": Yf(Kf({}, Xf), {
    common: { transformOrigin: "top right" }
  })
}, c3 = ["mousedown", "touchstart"];
function t8(e, t, n) {
  const r = b.useRef();
  return b.useEffect(() => {
    const o = (i) => {
      const { target: a } = i ?? {};
      if (Array.isArray(n)) {
        const l = (a == null ? void 0 : a.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(a) && a.tagName !== "HTML";
        n.every((s) => !!s && !i.composedPath().includes(s)) && !l && e();
      } else
        r.current && !r.current.contains(a) && e();
    };
    return (t || c3).forEach((i) => document.addEventListener(i, o)), () => {
      (t || c3).forEach((i) => document.removeEventListener(i, o));
    };
  }, [r, e, n]), r;
}
function n8({ timeout: e = 2e3 } = {}) {
  const [t, n] = b.useState(null), [r, o] = b.useState(!1), [i, a] = b.useState(null), l = (s) => {
    clearTimeout(i), a(setTimeout(() => o(!1), e)), o(s);
  };
  return { copy: (s) => {
    "clipboard" in navigator ? navigator.clipboard.writeText(s).then(() => l(!0)).catch((c) => n(c)) : n(new Error("useClipboard: navigator.clipboard is not supported"));
  }, reset: () => {
    o(!1), n(null), clearTimeout(i);
  }, error: t, copied: r };
}
function kfe(e, t) {
  try {
    return e.addEventListener("change", t), () => e.removeEventListener("change", t);
  } catch {
    return e.addListener(t), () => e.removeListener(t);
  }
}
function _fe(e, t) {
  return typeof t == "boolean" ? t : typeof window < "u" && "matchMedia" in window ? window.matchMedia(e).matches : !1;
}
function r8(e, t, { getInitialValueInEffect: n } = {
  getInitialValueInEffect: !0
}) {
  const [r, o] = b.useState(n ? t : _fe(e, t)), i = b.useRef();
  return b.useEffect(() => {
    if ("matchMedia" in window)
      return i.current = window.matchMedia(e), o(i.current.matches), kfe(i.current, (a) => o(a.matches));
  }, [e]), r;
}
function Ofe(e, t) {
  return r8("(prefers-color-scheme: dark)", e === "dark", t) ? "dark" : "light";
}
function $l(e, t, n) {
  return Math.min(Math.max(e, t), n);
}
const Ap = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
function Hr(e, t) {
  const n = b.useRef(!1);
  b.useEffect(() => () => {
    n.current = !1;
  }, []), b.useEffect(() => {
    if (n.current)
      return e();
    n.current = !0;
  }, t);
}
function o8({ opened: e, shouldReturnFocus: t = !0 }) {
  const n = b.useRef(), r = () => {
    var o;
    n.current && "focus" in n.current && typeof n.current.focus == "function" && ((o = n.current) == null || o.focus({ preventScroll: !0 }));
  };
  return Hr(() => {
    let o = -1;
    const i = (a) => {
      a.key === "Tab" && window.clearTimeout(o);
    };
    return document.addEventListener("keydown", i), e ? n.current = document.activeElement : t && (o = window.setTimeout(r, 10)), () => {
      window.clearTimeout(o), document.removeEventListener("keydown", i);
    };
  }, [e, t]), r;
}
const Efe = /input|select|textarea|button|object/, i8 = "a, input, select, textarea, button, object, [tabindex]";
function Cfe(e) {
  return e.style.display === "none";
}
function Pfe(e) {
  if (e.getAttribute("aria-hidden") || e.getAttribute("hidden") || e.getAttribute("type") === "hidden")
    return !1;
  let t = e;
  for (; t && !(t === document.body || t.nodeType === 11); ) {
    if (Cfe(t))
      return !1;
    t = t.parentNode;
  }
  return !0;
}
function a8(e) {
  let t = e.getAttribute("tabindex");
  return t === null && (t = void 0), parseInt(t, 10);
}
function DO(e) {
  const t = e.nodeName.toLowerCase(), n = !Number.isNaN(a8(e));
  return (Efe.test(t) && !e.disabled || e instanceof HTMLAnchorElement && e.href || n) && Pfe(e);
}
function l8(e) {
  const t = a8(e);
  return (Number.isNaN(t) || t >= 0) && DO(e);
}
function Rfe(e) {
  return Array.from(e.querySelectorAll(i8)).filter(l8);
}
function Tfe(e, t) {
  const n = Rfe(e);
  if (!n.length) {
    t.preventDefault();
    return;
  }
  const r = n[t.shiftKey ? 0 : n.length - 1], o = e.getRootNode();
  if (!(r === o.activeElement || e === o.activeElement))
    return;
  t.preventDefault();
  const i = n[t.shiftKey ? n.length - 1 : 0];
  i && i.focus();
}
function yx() {
  return `mantine-${Math.random().toString(36).slice(2, 11)}`;
}
function jfe(e, t = "body > :not(script)") {
  const n = yx(), r = Array.from(document.querySelectorAll(t)).map((o) => {
    var i;
    if ((i = o == null ? void 0 : o.shadowRoot) != null && i.contains(e) || o.contains(e))
      return;
    const a = o.getAttribute("aria-hidden"), l = o.getAttribute("data-hidden"), s = o.getAttribute("data-focus-id");
    return o.setAttribute("data-focus-id", n), a === null || a === "false" ? o.setAttribute("aria-hidden", "true") : !l && !s && o.setAttribute("data-hidden", a), {
      node: o,
      ariaHidden: l || null
    };
  });
  return () => {
    r.forEach((o) => {
      !o || n !== o.node.getAttribute("data-focus-id") || (o.ariaHidden === null ? o.node.removeAttribute("aria-hidden") : o.node.setAttribute("aria-hidden", o.ariaHidden), o.node.removeAttribute("data-focus-id"), o.node.removeAttribute("data-hidden"));
    });
  };
}
function Nfe(e = !0) {
  const t = b.useRef(), n = b.useRef(null), r = (i) => {
    let a = i.querySelector("[data-autofocus]");
    if (!a) {
      const l = Array.from(i.querySelectorAll(i8));
      a = l.find(l8) || l.find(DO) || null, !a && DO(i) && (a = i);
    }
    a && a.focus({ preventScroll: !0 });
  }, o = b.useCallback((i) => {
    if (e) {
      if (i === null) {
        n.current && (n.current(), n.current = null);
        return;
      }
      n.current = jfe(i), t.current !== i && (i ? (setTimeout(() => {
        i.getRootNode() && r(i);
      }), t.current = i) : t.current = null);
    }
  }, [e]);
  return b.useEffect(() => {
    if (!e)
      return;
    t.current && setTimeout(() => r(t.current));
    const i = (a) => {
      a.key === "Tab" && t.current && Tfe(t.current, a);
    };
    return document.addEventListener("keydown", i), () => {
      document.removeEventListener("keydown", i), n.current && n.current();
    };
  }, [e]), o;
}
const $fe = (e) => (e + 1) % 1e6;
function Ife() {
  const [, e] = b.useReducer($fe, 0);
  return e;
}
const Afe = P.useId || (() => {
});
function zfe() {
  const e = Afe();
  return e ? `mantine-${e.replace(/:/g, "")}` : "";
}
function ea(e) {
  const t = zfe(), [n, r] = b.useState(t);
  return Ap(() => {
    r(yx());
  }, []), typeof e == "string" ? e : typeof window > "u" ? t : n;
}
function FO(e, t, n) {
  b.useEffect(() => (window.addEventListener(e, t, n), () => window.removeEventListener(e, t, n)), [e, t]);
}
function sP(e, t) {
  typeof e == "function" ? e(t) : typeof e == "object" && e !== null && "current" in e && (e.current = t);
}
function s8(...e) {
  return (t) => {
    e.forEach((n) => sP(n, t));
  };
}
function ta(...e) {
  return b.useCallback(s8(...e), e);
}
function Lfe(e, t, n = "ltr") {
  const r = b.useRef(), o = b.useRef(!1), i = b.useRef(!1), a = b.useRef(0), [l, s] = b.useState(!1);
  return b.useEffect(() => {
    o.current = !0;
  }, []), b.useEffect(() => {
    const c = ({ x, y: k }) => {
      cancelAnimationFrame(a.current), a.current = requestAnimationFrame(() => {
        if (o.current && r.current) {
          r.current.style.userSelect = "none";
          const E = r.current.getBoundingClientRect();
          if (E.width && E.height) {
            const O = $l((x - E.left) / E.width, 0, 1);
            e({
              x: n === "ltr" ? O : 1 - O,
              y: $l((k - E.top) / E.height, 0, 1)
            });
          }
        }
      });
    }, p = () => {
      document.addEventListener("mousemove", v), document.addEventListener("mouseup", h), document.addEventListener("touchmove", w), document.addEventListener("touchend", h);
    }, f = () => {
      document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", h), document.removeEventListener("touchmove", w), document.removeEventListener("touchend", h);
    }, m = () => {
      !i.current && o.current && (i.current = !0, typeof (t == null ? void 0 : t.onScrubStart) == "function" && t.onScrubStart(), s(!0), p());
    }, h = () => {
      i.current && o.current && (i.current = !1, s(!1), f(), setTimeout(() => {
        typeof (t == null ? void 0 : t.onScrubEnd) == "function" && t.onScrubEnd();
      }, 0));
    }, g = (x) => {
      m(), x.preventDefault(), v(x);
    }, v = (x) => c({ x: x.clientX, y: x.clientY }), S = (x) => {
      x.cancelable && x.preventDefault(), m(), w(x);
    }, w = (x) => {
      x.cancelable && x.preventDefault(), c({ x: x.changedTouches[0].clientX, y: x.changedTouches[0].clientY });
    };
    return r.current.addEventListener("mousedown", g), r.current.addEventListener("touchstart", S, { passive: !1 }), () => {
      r.current && (r.current.removeEventListener("mousedown", g), r.current.removeEventListener("touchstart", S));
    };
  }, [n, e]), { ref: r, active: l };
}
function Xi({
  value: e,
  defaultValue: t,
  finalValue: n,
  onChange: r = () => {
  }
}) {
  const [o, i] = b.useState(t !== void 0 ? t : n);
  return e !== void 0 ? [e, r, !0] : [o, (l) => {
    i(l), r == null || r(l);
  }, !1];
}
function Dfe({ initialValues: e = [], limit: t }) {
  const [{ state: n, queue: r }, o] = b.useState({
    state: e.slice(0, t),
    queue: e.slice(t)
  });
  return {
    state: n,
    queue: r,
    add: (...i) => o((a) => {
      const l = [...a.state, ...a.queue, ...i];
      return {
        state: l.slice(0, t),
        queue: l.slice(t)
      };
    }),
    update: (i) => o((a) => {
      const l = i([...a.state, ...a.queue]);
      return {
        state: l.slice(0, t),
        queue: l.slice(t)
      };
    }),
    cleanQueue: () => o((i) => ({ state: i.state, queue: [] }))
  };
}
function ef(e, t) {
  return r8("(prefers-reduced-motion: reduce)", e, t);
}
const Ffe = (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e, Mfe = ({
  axis: e,
  target: t,
  parent: n,
  alignment: r,
  offset: o,
  isList: i
}) => {
  if (!t || !n && typeof document > "u")
    return 0;
  const a = !!n, l = (n || document.body).getBoundingClientRect(), s = t.getBoundingClientRect(), c = (p) => s[p] - l[p];
  if (e === "y") {
    const p = c("top");
    if (p === 0)
      return 0;
    if (r === "start") {
      const m = p - o;
      return m <= s.height * (i ? 0 : 1) || !i ? m : 0;
    }
    const f = a ? l.height : window.innerHeight;
    if (r === "end") {
      const m = p + o - f + s.height;
      return m >= -s.height * (i ? 0 : 1) || !i ? m : 0;
    }
    return r === "center" ? p - f / 2 + s.height / 2 : 0;
  }
  if (e === "x") {
    const p = c("left");
    if (p === 0)
      return 0;
    if (r === "start") {
      const m = p - o;
      return m <= s.width || !i ? m : 0;
    }
    const f = a ? l.width : window.innerWidth;
    if (r === "end") {
      const m = p + o - f + s.width;
      return m >= -s.width || !i ? m : 0;
    }
    return r === "center" ? p - f / 2 + s.width / 2 : 0;
  }
  return 0;
}, Bfe = ({ axis: e, parent: t }) => {
  if (!t && typeof document > "u")
    return 0;
  const n = e === "y" ? "scrollTop" : "scrollLeft";
  if (t)
    return t[n];
  const { body: r, documentElement: o } = document;
  return r[n] + o[n];
}, Ufe = ({ axis: e, parent: t, distance: n }) => {
  if (!t && typeof document > "u")
    return;
  const r = e === "y" ? "scrollTop" : "scrollLeft";
  if (t)
    t[r] = n;
  else {
    const { body: o, documentElement: i } = document;
    o[r] = n, i[r] = n;
  }
};
function Hfe({
  duration: e = 1250,
  axis: t = "y",
  onScrollFinish: n,
  easing: r = Ffe,
  offset: o = 0,
  cancelable: i = !0,
  isList: a = !1
} = {}) {
  const l = b.useRef(0), s = b.useRef(0), c = b.useRef(!1), p = b.useRef(null), f = b.useRef(null), m = ef(), h = () => {
    l.current && cancelAnimationFrame(l.current);
  }, g = b.useCallback(({ alignment: S = "start" } = {}) => {
    var w;
    c.current = !1, l.current && h();
    const x = (w = Bfe({ parent: p.current, axis: t })) != null ? w : 0, k = Mfe({
      parent: p.current,
      target: f.current,
      axis: t,
      alignment: S,
      offset: o,
      isList: a
    }) - (p.current ? 0 : x);
    function E() {
      s.current === 0 && (s.current = performance.now());
      const O = performance.now() - s.current, C = m || e === 0 ? 1 : O / e, R = x + k * r(C);
      Ufe({
        parent: p.current,
        axis: t,
        distance: R
      }), !c.current && C < 1 ? l.current = requestAnimationFrame(E) : (typeof n == "function" && n(), s.current = 0, l.current = 0, h());
    }
    E();
  }, [t, e, r, a, o, n, m]), v = () => {
    i && (c.current = !0);
  };
  return FO("wheel", v, {
    passive: !0
  }), FO("touchmove", v, {
    passive: !0
  }), b.useEffect(() => h, []), {
    scrollableRef: p,
    targetRef: f,
    scrollIntoView: g,
    cancel: h
  };
}
const Wfe = {
  x: 0,
  y: 0,
  width: 0,
  height: 0,
  top: 0,
  left: 0,
  bottom: 0,
  right: 0
};
function u8() {
  const e = b.useRef(0), t = b.useRef(null), [n, r] = b.useState(Wfe), o = b.useMemo(() => typeof window < "u" ? new ResizeObserver((i) => {
    const a = i[0];
    a && (cancelAnimationFrame(e.current), e.current = requestAnimationFrame(() => {
      t.current && r(a.contentRect);
    }));
  }) : null, []);
  return Ap(() => (t.current && (o.observe(t.current), r(t.current.getBoundingClientRect())), () => {
    o.disconnect(), e.current && cancelAnimationFrame(e.current);
  }), [t.current]), [t, n];
}
function Vfe() {
  const [e, { width: t, height: n }] = u8();
  return { ref: e, width: t, height: n };
}
function f3() {
  if (typeof window > "u")
    return "undetermined";
  const { userAgent: e } = window.navigator, t = /(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i, n = /(Win32)|(Win64)|(Windows)|(WinCE)/i, r = /(iPhone)|(iPad)|(iPod)/i;
  return t.test(e) ? "macos" : r.test(e) ? "ios" : n.test(e) ? "windows" : /Android/i.test(e) ? "android" : /Linux/i.test(e) ? "linux" : "undetermined";
}
function qfe(e = { getValueInEffect: !0 }) {
  const [t, n] = b.useState(e.getValueInEffect ? "undetermined" : f3());
  return Ap(() => {
    e.getValueInEffect && n(f3);
  }, []), t;
}
function c8(e = !1, t) {
  const { onOpen: n, onClose: r } = t || {}, [o, i] = b.useState(e), a = b.useCallback(() => {
    i((c) => c || (n == null || n(), !0));
  }, [n]), l = b.useCallback(() => {
    i((c) => c && (r == null || r(), !1));
  }, [r]), s = b.useCallback(() => {
    o ? l() : a();
  }, [l, a, o]);
  return [o, { open: a, close: l, toggle: s }];
}
function d3(e) {
  return typeof e != "string" ? "" : e.charAt(0).toUpperCase() + e.slice(1);
}
const Wy = {
  context: "Accordion component was not found in the tree",
  itemContext: "Accordion.Item component was not found in the tree",
  value: "Accordion.Item component was rendered with invalid value or without value"
}, [Gfe, Vy] = Gl(Wy.context);
function Kfe({
  children: e,
  multiple: t,
  value: n,
  defaultValue: r,
  onChange: o,
  id: i,
  loop: a,
  transitionDuration: l,
  disableChevronRotation: s,
  chevronPosition: c,
  chevronSize: p,
  order: f,
  chevron: m,
  variant: h,
  radius: g,
  classNames: v,
  styles: S,
  unstyled: w
}) {
  const x = ea(i), [k, E] = Xi({
    value: n,
    defaultValue: r,
    finalValue: t ? [] : null,
    onChange: o
  }), O = (R) => Array.isArray(k) ? k.includes(R) : R === k, C = (R) => {
    const L = Array.isArray(k) ? k.includes(R) ? k.filter((D) => D !== R) : [...k, R] : R === k ? null : R;
    E(L);
  };
  return /* @__PURE__ */ P.createElement(Gfe, {
    value: {
      isItemActive: O,
      onChange: C,
      getControlId: By(`${x}-control`, Wy.value),
      getRegionId: By(`${x}-panel`, Wy.value),
      transitionDuration: l,
      disableChevronRotation: s,
      chevronPosition: c,
      chevronSize: p,
      order: f,
      chevron: m,
      loop: a,
      variant: h,
      radius: g,
      classNames: v,
      styles: S,
      unstyled: w
    }
  }, e);
}
const [Yfe, f8] = Gl(Wy.itemContext);
function Xfe(e, t, { radius: n }) {
  const r = e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3], o = e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[0], i = e.fn.radius(n);
  return t === "default" ? {
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    borderBottom: `${F(1)} solid ${r}`
  } : t === "contained" ? {
    border: `${F(1)} solid ${r}`,
    transition: "background-color 150ms ease",
    "&[data-active]": {
      backgroundColor: o
    },
    "&:first-of-type": {
      borderTopRightRadius: i,
      borderTopLeftRadius: i,
      "& > [data-accordion-control]": {
        borderTopRightRadius: i,
        borderTopLeftRadius: i
      }
    },
    "&:last-of-type": {
      borderBottomRightRadius: i,
      borderBottomLeftRadius: i,
      "& > [data-accordion-control]": {
        borderBottomRightRadius: i,
        borderBottomLeftRadius: i
      }
    },
    "& + &": {
      borderTop: 0
    }
  } : t === "filled" ? {
    borderRadius: i,
    "&[data-active]": {
      backgroundColor: o
    }
  } : t === "separated" ? {
    borderRadius: i,
    backgroundColor: o,
    border: `${F(1)} solid transparent`,
    transition: "background-color 150ms ease",
    "& + &": {
      marginTop: e.spacing.md
    },
    "&[data-active]": {
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.white,
      borderColor: r
    }
  } : {};
}
var Zfe = Ee((e, t, { variant: n }) => ({
  item: Xfe(e, n, t)
}));
const Qfe = Zfe;
var p3 = Object.getOwnPropertySymbols, Jfe = Object.prototype.hasOwnProperty, ede = Object.prototype.propertyIsEnumerable, tde = (e, t) => {
  var n = {};
  for (var r in e)
    Jfe.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && p3)
    for (var r of p3(e))
      t.indexOf(r) < 0 && ede.call(e, r) && (n[r] = e[r]);
  return n;
};
function tf(e) {
  const t = e, {
    m: n,
    mx: r,
    my: o,
    mt: i,
    mb: a,
    ml: l,
    mr: s,
    p: c,
    px: p,
    py: f,
    pt: m,
    pb: h,
    pl: g,
    pr: v,
    bg: S,
    c: w,
    opacity: x,
    ff: k,
    fz: E,
    fw: O,
    lts: C,
    ta: R,
    lh: L,
    fs: D,
    tt: N,
    td: H,
    w: B,
    miw: K,
    maw: W,
    h: U,
    mih: Q,
    mah: J,
    bgsz: q,
    bgp: ee,
    bgr: A,
    bga: X,
    pos: ie,
    top: j,
    left: le,
    bottom: re,
    right: he,
    inset: xe,
    display: ke
  } = t, Ae = tde(t, [
    "m",
    "mx",
    "my",
    "mt",
    "mb",
    "ml",
    "mr",
    "p",
    "px",
    "py",
    "pt",
    "pb",
    "pl",
    "pr",
    "bg",
    "c",
    "opacity",
    "ff",
    "fz",
    "fw",
    "lts",
    "ta",
    "lh",
    "fs",
    "tt",
    "td",
    "w",
    "miw",
    "maw",
    "h",
    "mih",
    "mah",
    "bgsz",
    "bgp",
    "bgr",
    "bga",
    "pos",
    "top",
    "left",
    "bottom",
    "right",
    "inset",
    "display"
  ]);
  return { systemStyles: Z9({
    m: n,
    mx: r,
    my: o,
    mt: i,
    mb: a,
    ml: l,
    mr: s,
    p: c,
    px: p,
    py: f,
    pt: m,
    pb: h,
    pl: g,
    pr: v,
    bg: S,
    c: w,
    opacity: x,
    ff: k,
    fz: E,
    fw: O,
    lts: C,
    ta: R,
    lh: L,
    fs: D,
    tt: N,
    td: H,
    w: B,
    miw: K,
    maw: W,
    h: U,
    mih: Q,
    mah: J,
    bgsz: q,
    bgp: ee,
    bgr: A,
    bga: X,
    pos: ie,
    top: j,
    left: le,
    bottom: re,
    right: he,
    inset: xe,
    display: ke
  }), rest: Ae };
}
function nde(e, t) {
  const n = Object.keys(e).filter((r) => r !== "base").sort((r, o) => Cc(Re({ size: r, sizes: t.breakpoints })) - Cc(Re({ size: o, sizes: t.breakpoints })));
  return "base" in e ? ["base", ...n] : n;
}
function rde({ value: e, theme: t, getValue: n, property: r }) {
  if (e == null)
    return;
  if (typeof e == "object")
    return nde(e, t).reduce((i, a) => {
      if (a === "base" && e.base !== void 0) {
        const s = n(e.base, t);
        return Array.isArray(r) ? (r.forEach((c) => {
          i[c] = s;
        }), i) : (i[r] = s, i);
      }
      const l = n(e[a], t);
      return Array.isArray(r) ? (i[t.fn.largerThan(a)] = {}, r.forEach((s) => {
        i[t.fn.largerThan(a)][s] = l;
      }), i) : (i[t.fn.largerThan(a)] = {
        [r]: l
      }, i);
    }, {});
  const o = n(e, t);
  return Array.isArray(r) ? r.reduce((i, a) => (i[a] = o, i), {}) : { [r]: o };
}
function ode(e, t) {
  return e === "dimmed" ? t.colorScheme === "dark" ? t.colors.dark[2] : t.colors.gray[6] : t.fn.variant({ variant: "filled", color: e, primaryFallback: !1 }).background;
}
function ide(e) {
  return F(e);
}
function ade(e) {
  return e;
}
function lde(e, t) {
  return Re({ size: e, sizes: t.fontSizes });
}
const sde = ["-xs", "-sm", "-md", "-lg", "-xl"];
function ude(e, t) {
  return sde.includes(e) ? `calc(${Re({
    size: e.replace("-", ""),
    sizes: t.spacing
  })} * -1)` : Re({ size: e, sizes: t.spacing });
}
const cde = {
  identity: ade,
  color: ode,
  size: ide,
  fontSize: lde,
  spacing: ude
}, fde = {
  m: { type: "spacing", property: "margin" },
  mt: { type: "spacing", property: "marginTop" },
  mb: { type: "spacing", property: "marginBottom" },
  ml: { type: "spacing", property: "marginLeft" },
  mr: { type: "spacing", property: "marginRight" },
  mx: { type: "spacing", property: ["marginRight", "marginLeft"] },
  my: { type: "spacing", property: ["marginTop", "marginBottom"] },
  p: { type: "spacing", property: "padding" },
  pt: { type: "spacing", property: "paddingTop" },
  pb: { type: "spacing", property: "paddingBottom" },
  pl: { type: "spacing", property: "paddingLeft" },
  pr: { type: "spacing", property: "paddingRight" },
  px: { type: "spacing", property: ["paddingRight", "paddingLeft"] },
  py: { type: "spacing", property: ["paddingTop", "paddingBottom"] },
  bg: { type: "color", property: "background" },
  c: { type: "color", property: "color" },
  opacity: { type: "identity", property: "opacity" },
  ff: { type: "identity", property: "fontFamily" },
  fz: { type: "fontSize", property: "fontSize" },
  fw: { type: "identity", property: "fontWeight" },
  lts: { type: "size", property: "letterSpacing" },
  ta: { type: "identity", property: "textAlign" },
  lh: { type: "identity", property: "lineHeight" },
  fs: { type: "identity", property: "fontStyle" },
  tt: { type: "identity", property: "textTransform" },
  td: { type: "identity", property: "textDecoration" },
  w: { type: "spacing", property: "width" },
  miw: { type: "spacing", property: "minWidth" },
  maw: { type: "spacing", property: "maxWidth" },
  h: { type: "spacing", property: "height" },
  mih: { type: "spacing", property: "minHeight" },
  mah: { type: "spacing", property: "maxHeight" },
  bgsz: { type: "size", property: "backgroundSize" },
  bgp: { type: "identity", property: "backgroundPosition" },
  bgr: { type: "identity", property: "backgroundRepeat" },
  bga: { type: "identity", property: "backgroundAttachment" },
  pos: { type: "identity", property: "position" },
  top: { type: "identity", property: "top" },
  left: { type: "size", property: "left" },
  bottom: { type: "size", property: "bottom" },
  right: { type: "size", property: "right" },
  inset: { type: "size", property: "inset" },
  display: { type: "identity", property: "display" }
};
var dde = Object.defineProperty, m3 = Object.getOwnPropertySymbols, pde = Object.prototype.hasOwnProperty, mde = Object.prototype.propertyIsEnumerable, h3 = (e, t, n) => t in e ? dde(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, g3 = (e, t) => {
  for (var n in t || (t = {}))
    pde.call(t, n) && h3(e, n, t[n]);
  if (m3)
    for (var n of m3(t))
      mde.call(t, n) && h3(e, n, t[n]);
  return e;
};
function MO(e, t, n = fde) {
  return Object.keys(n).reduce((r, o) => (o in e && e[o] !== void 0 && r.push(rde({
    value: e[o],
    getValue: cde[n[o].type],
    property: n[o].property,
    theme: t
  })), r), []).reduce((r, o) => (Object.keys(o).forEach((i) => {
    typeof o[i] == "object" && o[i] !== null && i in r ? r[i] = g3(g3({}, r[i]), o[i]) : r[i] = o[i];
  }), r), {});
}
function y3(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function hde(e, t, n) {
  const r = Yn(), { css: o, cx: i } = e8();
  return Array.isArray(e) ? i(n, o(MO(t, r)), e.map((a) => o(y3(a, r)))) : i(n, o(y3(e, r)), o(MO(t, r)));
}
var gde = Object.defineProperty, qy = Object.getOwnPropertySymbols, d8 = Object.prototype.hasOwnProperty, p8 = Object.prototype.propertyIsEnumerable, v3 = (e, t, n) => t in e ? gde(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, yde = (e, t) => {
  for (var n in t || (t = {}))
    d8.call(t, n) && v3(e, n, t[n]);
  if (qy)
    for (var n of qy(t))
      p8.call(t, n) && v3(e, n, t[n]);
  return e;
}, vde = (e, t) => {
  var n = {};
  for (var r in e)
    d8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && qy)
    for (var r of qy(e))
      t.indexOf(r) < 0 && p8.call(e, r) && (n[r] = e[r]);
  return n;
};
const m8 = b.forwardRef((e, t) => {
  var n = e, { className: r, component: o, style: i, sx: a } = n, l = vde(n, ["className", "component", "style", "sx"]);
  const { systemStyles: s, rest: c } = tf(l), p = o || "div";
  return /* @__PURE__ */ P.createElement(p, yde({
    ref: t,
    className: hde(a, s, r),
    style: i
  }, c));
});
m8.displayName = "@mantine/core/Box";
const qe = m8;
var bde = Object.defineProperty, Gy = Object.getOwnPropertySymbols, h8 = Object.prototype.hasOwnProperty, g8 = Object.prototype.propertyIsEnumerable, b3 = (e, t, n) => t in e ? bde(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, wde = (e, t) => {
  for (var n in t || (t = {}))
    h8.call(t, n) && b3(e, n, t[n]);
  if (Gy)
    for (var n of Gy(t))
      g8.call(t, n) && b3(e, n, t[n]);
  return e;
}, xde = (e, t) => {
  var n = {};
  for (var r in e)
    h8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Gy)
    for (var r of Gy(e))
      t.indexOf(r) < 0 && g8.call(e, r) && (n[r] = e[r]);
  return n;
};
const Sde = {}, y8 = b.forwardRef((e, t) => {
  const n = Te("AccordionItem", Sde, e), { children: r, className: o, value: i } = n, a = xde(n, ["children", "className", "value"]), l = Vy(), { classes: s, cx: c } = Qfe({ radius: l.radius }, {
    name: "Accordion",
    classNames: l.classNames,
    styles: l.styles,
    unstyled: l.unstyled,
    variant: l.variant
  });
  return /* @__PURE__ */ P.createElement(Yfe, {
    value: { value: i }
  }, /* @__PURE__ */ P.createElement(qe, wde({
    ref: t,
    className: c(s.item, o),
    "data-active": l.isItemActive(i) || void 0
  }, a), r));
});
y8.displayName = "@mantine/core/AccordionItem";
var kde = Object.defineProperty, _de = Object.defineProperties, Ode = Object.getOwnPropertyDescriptors, w3 = Object.getOwnPropertySymbols, Ede = Object.prototype.hasOwnProperty, Cde = Object.prototype.propertyIsEnumerable, x3 = (e, t, n) => t in e ? kde(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, bh = (e, t) => {
  for (var n in t || (t = {}))
    Ede.call(t, n) && x3(e, n, t[n]);
  if (w3)
    for (var n of w3(t))
      Cde.call(t, n) && x3(e, n, t[n]);
  return e;
}, Pde = (e, t) => _de(e, Ode(t));
function Rde(e, t) {
  return t === "default" || t === "contained" ? e.fn.hover({
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[0]
  }) : {};
}
var Tde = Ee((e, { transitionDuration: t, chevronPosition: n, chevronSize: r }, { variant: o }) => ({
  icon: {
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    marginRight: n === "left" ? 0 : e.spacing.sm,
    marginLeft: n === "left" ? e.spacing.lg : 0
  },
  chevron: {
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    transition: `transform ${t}ms ease`,
    marginRight: n === "right" ? 0 : e.spacing.sm,
    marginLeft: n === "right" ? e.spacing.lg : 0,
    width: F(r),
    minWidth: F(r),
    "&[data-rotate]": {
      transform: "rotate(180deg)"
    }
  },
  label: {
    color: "inherit",
    fontWeight: 400,
    flex: 1,
    overflow: "hidden",
    textOverflow: "ellipsis",
    paddingTop: e.spacing.md,
    paddingBottom: e.spacing.md
  },
  itemTitle: {
    margin: 0,
    padding: 0
  },
  control: Pde(bh(bh(bh({}, e.fn.focusStyles()), e.fn.fontStyles()), Rde(e, o)), {
    width: "100%",
    display: "flex",
    alignItems: "center",
    flexDirection: n === "right" ? "row-reverse" : "row",
    paddingRight: e.spacing.md,
    paddingLeft: n === "right" ? `calc(${e.spacing.md} + ${F(4)})` : e.spacing.xs,
    textAlign: "left",
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    "&:disabled": bh({
      opacity: 0.4,
      cursor: "not-allowed"
    }, e.fn.hover({ backgroundColor: "transparent" }))
  })
}));
const jde = Tde;
var Nde = Object.defineProperty, $de = Object.defineProperties, Ide = Object.getOwnPropertyDescriptors, S3 = Object.getOwnPropertySymbols, Ade = Object.prototype.hasOwnProperty, zde = Object.prototype.propertyIsEnumerable, k3 = (e, t, n) => t in e ? Nde(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _3 = (e, t) => {
  for (var n in t || (t = {}))
    Ade.call(t, n) && k3(e, n, t[n]);
  if (S3)
    for (var n of S3(t))
      zde.call(t, n) && k3(e, n, t[n]);
  return e;
}, Lde = (e, t) => $de(e, Ide(t)), Dde = Ee((e) => ({
  root: Lde(_3(_3({}, e.fn.focusStyles()), e.fn.fontStyles()), {
    cursor: "pointer",
    border: 0,
    padding: 0,
    appearance: "none",
    fontSize: e.fontSizes.md,
    backgroundColor: "transparent",
    textAlign: "left",
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    textDecoration: "none",
    boxSizing: "border-box"
  })
})), Fde = Object.defineProperty, Ky = Object.getOwnPropertySymbols, v8 = Object.prototype.hasOwnProperty, b8 = Object.prototype.propertyIsEnumerable, O3 = (e, t, n) => t in e ? Fde(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Mde = (e, t) => {
  for (var n in t || (t = {}))
    v8.call(t, n) && O3(e, n, t[n]);
  if (Ky)
    for (var n of Ky(t))
      b8.call(t, n) && O3(e, n, t[n]);
  return e;
}, Bde = (e, t) => {
  var n = {};
  for (var r in e)
    v8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Ky)
    for (var r of Ky(e))
      t.indexOf(r) < 0 && b8.call(e, r) && (n[r] = e[r]);
  return n;
};
const w8 = b.forwardRef((e, t) => {
  const n = Te("UnstyledButton", {}, e), {
    className: r,
    component: o = "button",
    unstyled: i,
    variant: a
  } = n, l = Bde(n, [
    "className",
    "component",
    "unstyled",
    "variant"
  ]), { classes: s, cx: c } = Dde(null, { name: "UnstyledButton", unstyled: i, variant: a });
  return /* @__PURE__ */ P.createElement(qe, Mde({
    component: o,
    ref: t,
    className: c(s.root, r),
    type: o === "button" ? "button" : void 0
  }, l));
});
w8.displayName = "@mantine/core/UnstyledButton";
const vx = w8;
var Ude = Object.defineProperty, Hde = Object.defineProperties, Wde = Object.getOwnPropertyDescriptors, Yy = Object.getOwnPropertySymbols, x8 = Object.prototype.hasOwnProperty, S8 = Object.prototype.propertyIsEnumerable, E3 = (e, t, n) => t in e ? Ude(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Vde = (e, t) => {
  for (var n in t || (t = {}))
    x8.call(t, n) && E3(e, n, t[n]);
  if (Yy)
    for (var n of Yy(t))
      S8.call(t, n) && E3(e, n, t[n]);
  return e;
}, qde = (e, t) => Hde(e, Wde(t)), Gde = (e, t) => {
  var n = {};
  for (var r in e)
    x8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Yy)
    for (var r of Yy(e))
      t.indexOf(r) < 0 && S8.call(e, r) && (n[r] = e[r]);
  return n;
};
const Kde = {}, k8 = b.forwardRef((e, t) => {
  const n = Te("AccordionControl", Kde, e), { disabled: r, onKeyDown: o, onClick: i, chevron: a, children: l, className: s, icon: c } = n, p = Gde(n, ["disabled", "onKeyDown", "onClick", "chevron", "children", "className", "icon"]), f = Vy(), { value: m } = f8(), { classes: h, cx: g } = jde({
    transitionDuration: f.transitionDuration,
    chevronPosition: f.chevronPosition,
    chevronSize: f.chevronSize,
    radius: f.radius
  }, {
    name: "Accordion",
    classNames: f.classNames,
    styles: f.styles,
    unstyled: f.unstyled,
    variant: f.variant
  }), v = f.isItemActive(m), S = typeof f.order == "number", w = `h${f.order}`, x = /* @__PURE__ */ P.createElement(vx, qde(Vde({}, p), {
    ref: t,
    "data-accordion-control": !0,
    disabled: r,
    className: g(h.control, s),
    onClick: (k) => {
      i == null || i(k), f.onChange(m);
    },
    type: "button",
    "data-active": v || void 0,
    "aria-expanded": v,
    "aria-controls": f.getRegionId(m),
    id: f.getControlId(m),
    unstyled: f.unstyled,
    onKeyDown: tP({
      siblingSelector: "[data-accordion-control]",
      parentSelector: "[data-accordion]",
      activateOnFocus: !1,
      loop: f.loop,
      orientation: "vertical",
      onKeyDown: o
    })
  }), /* @__PURE__ */ P.createElement("span", {
    className: h.chevron,
    "data-rotate": !f.disableChevronRotation && v || void 0
  }, a || f.chevron), /* @__PURE__ */ P.createElement("span", {
    className: h.label
  }, l), c && /* @__PURE__ */ P.createElement("span", {
    className: h.icon
  }, c));
  return S ? /* @__PURE__ */ P.createElement(w, {
    className: h.itemTitle
  }, x) : x;
});
k8.displayName = "@mantine/core/AccordionControl";
var Yde = Object.defineProperty, Xde = Object.defineProperties, Zde = Object.getOwnPropertyDescriptors, C3 = Object.getOwnPropertySymbols, Qde = Object.prototype.hasOwnProperty, Jde = Object.prototype.propertyIsEnumerable, P3 = (e, t, n) => t in e ? Yde(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, epe = (e, t) => {
  for (var n in t || (t = {}))
    Qde.call(t, n) && P3(e, n, t[n]);
  if (C3)
    for (var n of C3(t))
      Jde.call(t, n) && P3(e, n, t[n]);
  return e;
}, tpe = (e, t) => Xde(e, Zde(t)), npe = Ee((e, t) => ({
  panel: tpe(epe({}, e.fn.fontStyles()), {
    wordBreak: "break-word",
    lineHeight: e.lineHeight
  }),
  content: {
    padding: e.spacing.md,
    paddingTop: `calc(${e.spacing.xs} / 2)`
  }
}));
const rpe = npe;
var ope = Object.defineProperty, ipe = Object.defineProperties, ape = Object.getOwnPropertyDescriptors, Xy = Object.getOwnPropertySymbols, _8 = Object.prototype.hasOwnProperty, O8 = Object.prototype.propertyIsEnumerable, R3 = (e, t, n) => t in e ? ope(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ls = (e, t) => {
  for (var n in t || (t = {}))
    _8.call(t, n) && R3(e, n, t[n]);
  if (Xy)
    for (var n of Xy(t))
      O8.call(t, n) && R3(e, n, t[n]);
  return e;
}, s_ = (e, t) => ipe(e, ape(t)), lpe = (e, t) => {
  var n = {};
  for (var r in e)
    _8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Xy)
    for (var r of Xy(e))
      t.indexOf(r) < 0 && O8.call(e, r) && (n[r] = e[r]);
  return n;
};
function spe(e) {
  if (!e || typeof e == "string")
    return 0;
  const t = e / 36;
  return Math.round((4 + 15 * t ** 0.25 + t / 5) * 10);
}
function u_(e) {
  return e != null && e.current ? e.current.scrollHeight : "auto";
}
const c_ = typeof window < "u" && window.requestAnimationFrame;
function upe({
  transitionDuration: e,
  transitionTimingFunction: t = "ease",
  onTransitionEnd: n = () => {
  },
  opened: r
}) {
  const o = b.useRef(null), i = 0, a = {
    display: "none",
    height: 0,
    overflow: "hidden"
  }, [l, s] = b.useState(r ? {} : a), c = (g) => {
    La.flushSync(() => s(g));
  }, p = (g) => {
    c((v) => ls(ls({}, v), g));
  };
  function f(g) {
    return {
      transition: `height ${e || spe(g)}ms ${t}`
    };
  }
  Hr(() => {
    c_(r ? () => {
      p({ willChange: "height", display: "block", overflow: "hidden" }), c_(() => {
        const g = u_(o);
        p(s_(ls({}, f(g)), { height: g }));
      });
    } : () => {
      const g = u_(o);
      p(s_(ls({}, f(g)), { willChange: "height", height: g })), c_(() => p({ height: i, overflow: "hidden" }));
    });
  }, [r]);
  const m = (g) => {
    if (!(g.target !== o.current || g.propertyName !== "height"))
      if (r) {
        const v = u_(o);
        v === l.height ? c({}) : p({ height: v }), n();
      } else
        l.height === i && (c(a), n());
  };
  function h(g = {}) {
    var v = g, { style: S = {}, refKey: w = "ref" } = v, x = lpe(v, ["style", "refKey"]);
    const k = x[w];
    return s_(ls({
      "aria-hidden": !r
    }, x), {
      [w]: s8(o, k),
      onTransitionEnd: m,
      style: ls(ls({ boxSizing: "border-box" }, S), l)
    });
  }
  return h;
}
var cpe = Object.defineProperty, Zy = Object.getOwnPropertySymbols, E8 = Object.prototype.hasOwnProperty, C8 = Object.prototype.propertyIsEnumerable, T3 = (e, t, n) => t in e ? cpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, wh = (e, t) => {
  for (var n in t || (t = {}))
    E8.call(t, n) && T3(e, n, t[n]);
  if (Zy)
    for (var n of Zy(t))
      C8.call(t, n) && T3(e, n, t[n]);
  return e;
}, fpe = (e, t) => {
  var n = {};
  for (var r in e)
    E8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Zy)
    for (var r of Zy(e))
      t.indexOf(r) < 0 && C8.call(e, r) && (n[r] = e[r]);
  return n;
};
const dpe = {
  transitionDuration: 200,
  transitionTimingFunction: "ease",
  animateOpacity: !0
}, P8 = b.forwardRef((e, t) => {
  const n = Te("Collapse", dpe, e), {
    children: r,
    in: o,
    transitionDuration: i,
    transitionTimingFunction: a,
    style: l,
    onTransitionEnd: s,
    animateOpacity: c
  } = n, p = fpe(n, [
    "children",
    "in",
    "transitionDuration",
    "transitionTimingFunction",
    "style",
    "onTransitionEnd",
    "animateOpacity"
  ]), f = Yn(), m = ef(), h = f.respectReducedMotion && m ? 0 : i, { systemStyles: g, rest: v } = tf(p), S = upe({
    opened: o,
    transitionDuration: h,
    transitionTimingFunction: a,
    onTransitionEnd: s
  });
  return h === 0 ? o ? /* @__PURE__ */ P.createElement(qe, wh({}, v), r) : null : /* @__PURE__ */ P.createElement(qe, wh({}, S(wh(wh({ style: l, ref: t }, v), g))), /* @__PURE__ */ P.createElement("div", {
    style: {
      opacity: o || !c ? 1 : 0,
      transition: c ? `opacity ${h}ms ${a}` : "none"
    }
  }, r));
});
P8.displayName = "@mantine/core/Collapse";
var ppe = Object.defineProperty, mpe = Object.defineProperties, hpe = Object.getOwnPropertyDescriptors, Qy = Object.getOwnPropertySymbols, R8 = Object.prototype.hasOwnProperty, T8 = Object.prototype.propertyIsEnumerable, j3 = (e, t, n) => t in e ? ppe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, gpe = (e, t) => {
  for (var n in t || (t = {}))
    R8.call(t, n) && j3(e, n, t[n]);
  if (Qy)
    for (var n of Qy(t))
      T8.call(t, n) && j3(e, n, t[n]);
  return e;
}, ype = (e, t) => mpe(e, hpe(t)), vpe = (e, t) => {
  var n = {};
  for (var r in e)
    R8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Qy)
    for (var r of Qy(e))
      t.indexOf(r) < 0 && T8.call(e, r) && (n[r] = e[r]);
  return n;
};
const bpe = {};
function j8(e) {
  const t = Te("AccordionPanel", bpe, e), { children: n, className: r } = t, o = vpe(t, ["children", "className"]), i = Vy(), { value: a } = f8(), { classNames: l, styles: s, unstyled: c } = Vy(), { classes: p, cx: f } = rpe({ radius: i.radius }, { name: "Accordion", classNames: l, styles: s, unstyled: c, variant: i.variant });
  return /* @__PURE__ */ P.createElement(P8, ype(gpe({}, o), {
    className: f(p.panel, r),
    in: i.isItemActive(a),
    transitionDuration: i.transitionDuration,
    role: "region",
    id: i.getRegionId(a),
    "aria-labelledby": i.getControlId(a)
  }), /* @__PURE__ */ P.createElement("div", {
    className: p.content
  }, n));
}
j8.displayName = "@mantine/core/AccordionPanel";
var wpe = Object.defineProperty, Jy = Object.getOwnPropertySymbols, N8 = Object.prototype.hasOwnProperty, $8 = Object.prototype.propertyIsEnumerable, N3 = (e, t, n) => t in e ? wpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $3 = (e, t) => {
  for (var n in t || (t = {}))
    N8.call(t, n) && N3(e, n, t[n]);
  if (Jy)
    for (var n of Jy(t))
      $8.call(t, n) && N3(e, n, t[n]);
  return e;
}, xpe = (e, t) => {
  var n = {};
  for (var r in e)
    N8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Jy)
    for (var r of Jy(e))
      t.indexOf(r) < 0 && $8.call(e, r) && (n[r] = e[r]);
  return n;
};
function Spe(e) {
  const t = e, { style: n } = t, r = xpe(t, ["style"]);
  return /* @__PURE__ */ P.createElement("svg", $3({
    viewBox: "0 0 15 15",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    style: $3({ width: F(16), height: F(16) }, n)
  }, r), /* @__PURE__ */ P.createElement("path", {
    d: "M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
var kpe = Object.defineProperty, _pe = Object.defineProperties, Ope = Object.getOwnPropertyDescriptors, ev = Object.getOwnPropertySymbols, I8 = Object.prototype.hasOwnProperty, A8 = Object.prototype.propertyIsEnumerable, I3 = (e, t, n) => t in e ? kpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Epe = (e, t) => {
  for (var n in t || (t = {}))
    I8.call(t, n) && I3(e, n, t[n]);
  if (ev)
    for (var n of ev(t))
      A8.call(t, n) && I3(e, n, t[n]);
  return e;
}, Cpe = (e, t) => _pe(e, Ope(t)), Ppe = (e, t) => {
  var n = {};
  for (var r in e)
    I8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ev)
    for (var r of ev(e))
      t.indexOf(r) < 0 && A8.call(e, r) && (n[r] = e[r]);
  return n;
};
const Rpe = {
  multiple: !1,
  disableChevronRotation: !1,
  transitionDuration: 200,
  chevronPosition: "right",
  variant: "default",
  chevronSize: 24,
  chevron: /* @__PURE__ */ P.createElement(Spe, null)
};
function xl(e) {
  const t = Te("Accordion", Rpe, e), {
    id: n,
    loop: r,
    children: o,
    multiple: i,
    value: a,
    defaultValue: l,
    onChange: s,
    transitionDuration: c,
    disableChevronRotation: p,
    chevronPosition: f,
    chevronSize: m,
    order: h,
    chevron: g,
    classNames: v,
    styles: S,
    unstyled: w,
    variant: x,
    radius: k
  } = t, E = Ppe(t, [
    "id",
    "loop",
    "children",
    "multiple",
    "value",
    "defaultValue",
    "onChange",
    "transitionDuration",
    "disableChevronRotation",
    "chevronPosition",
    "chevronSize",
    "order",
    "chevron",
    "classNames",
    "styles",
    "unstyled",
    "variant",
    "radius"
  ]);
  return /* @__PURE__ */ P.createElement(Kfe, {
    id: n,
    multiple: i,
    value: a,
    defaultValue: l,
    onChange: s,
    loop: r,
    transitionDuration: c,
    disableChevronRotation: p,
    chevronPosition: f,
    chevronSize: m,
    order: h,
    chevron: g,
    variant: x,
    radius: k,
    classNames: v,
    styles: S,
    unstyled: w
  }, /* @__PURE__ */ P.createElement(qe, Cpe(Epe({}, E), {
    "data-accordion": !0
  }), o));
}
xl.Item = y8;
xl.Control = k8;
xl.Panel = j8;
xl.displayName = "@mantine/core/Accordion";
var Tpe = Object.defineProperty, jpe = Object.defineProperties, Npe = Object.getOwnPropertyDescriptors, A3 = Object.getOwnPropertySymbols, $pe = Object.prototype.hasOwnProperty, Ipe = Object.prototype.propertyIsEnumerable, z3 = (e, t, n) => t in e ? Tpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, BO = (e, t) => {
  for (var n in t || (t = {}))
    $pe.call(t, n) && z3(e, n, t[n]);
  if (A3)
    for (var n of A3(t))
      Ipe.call(t, n) && z3(e, n, t[n]);
  return e;
}, L3 = (e, t) => jpe(e, Npe(t));
const Ape = [
  "subtle",
  "filled",
  "outline",
  "light",
  "default",
  "transparent",
  "gradient"
], xh = {
  xs: F(18),
  sm: F(22),
  md: F(28),
  lg: F(34),
  xl: F(44)
};
function zpe({ variant: e, theme: t, color: n, gradient: r }) {
  const o = t.fn.variant({ color: n, variant: e, gradient: r });
  return e === "gradient" ? {
    border: 0,
    backgroundImage: o.background,
    color: o.color,
    "&:hover": t.fn.hover({
      backgroundSize: "200%"
    })
  } : Ape.includes(e) ? BO({
    border: `${F(1)} solid ${o.border}`,
    backgroundColor: o.background,
    color: o.color
  }, t.fn.hover({
    backgroundColor: o.hover
  })) : null;
}
var Lpe = Ee((e, { radius: t, color: n, gradient: r }, { variant: o, size: i }) => ({
  root: L3(BO({
    position: "relative",
    borderRadius: e.fn.radius(t),
    padding: 0,
    lineHeight: 1,
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    height: Re({ size: i, sizes: xh }),
    minHeight: Re({ size: i, sizes: xh }),
    width: Re({ size: i, sizes: xh }),
    minWidth: Re({ size: i, sizes: xh })
  }, zpe({ variant: o, theme: e, color: n, gradient: r })), {
    "&:active": e.activeStyles,
    "& [data-action-icon-loader]": {
      maxWidth: "70%"
    },
    "&:disabled, &[data-disabled]": {
      color: e.colors.gray[e.colorScheme === "dark" ? 6 : 4],
      cursor: "not-allowed",
      backgroundColor: o === "transparent" ? void 0 : e.fn.themeColor("gray", e.colorScheme === "dark" ? 8 : 1),
      borderColor: o === "transparent" ? void 0 : e.fn.themeColor("gray", e.colorScheme === "dark" ? 8 : 1),
      backgroundImage: "none",
      pointerEvents: "none",
      "&:active": {
        transform: "none"
      }
    },
    "&[data-loading]": {
      pointerEvents: "none",
      "&::before": L3(BO({
        content: '""'
      }, e.fn.cover(F(-1))), {
        backgroundColor: e.colorScheme === "dark" ? e.fn.rgba(e.colors.dark[7], 0.5) : "rgba(255, 255, 255, .5)",
        borderRadius: e.fn.radius(t),
        cursor: "not-allowed"
      })
    }
  })
})), Dpe = Object.defineProperty, tv = Object.getOwnPropertySymbols, z8 = Object.prototype.hasOwnProperty, L8 = Object.prototype.propertyIsEnumerable, D3 = (e, t, n) => t in e ? Dpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, F3 = (e, t) => {
  for (var n in t || (t = {}))
    z8.call(t, n) && D3(e, n, t[n]);
  if (tv)
    for (var n of tv(t))
      L8.call(t, n) && D3(e, n, t[n]);
  return e;
}, M3 = (e, t) => {
  var n = {};
  for (var r in e)
    z8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && tv)
    for (var r of tv(e))
      t.indexOf(r) < 0 && L8.call(e, r) && (n[r] = e[r]);
  return n;
};
function Fpe(e) {
  var t = e, { size: n, color: r } = t, o = M3(t, ["size", "color"]);
  const i = o, { style: a } = i, l = M3(i, ["style"]);
  return /* @__PURE__ */ P.createElement("svg", F3({
    viewBox: "0 0 135 140",
    xmlns: "http://www.w3.org/2000/svg",
    fill: r,
    style: F3({ width: n }, a)
  }, l), /* @__PURE__ */ P.createElement("rect", {
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.5s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.5s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "30",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.25s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.25s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "60",
    width: "15",
    height: "140",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "90",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.25s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.25s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "120",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.5s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.5s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })));
}
var Mpe = Object.defineProperty, nv = Object.getOwnPropertySymbols, D8 = Object.prototype.hasOwnProperty, F8 = Object.prototype.propertyIsEnumerable, B3 = (e, t, n) => t in e ? Mpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, U3 = (e, t) => {
  for (var n in t || (t = {}))
    D8.call(t, n) && B3(e, n, t[n]);
  if (nv)
    for (var n of nv(t))
      F8.call(t, n) && B3(e, n, t[n]);
  return e;
}, H3 = (e, t) => {
  var n = {};
  for (var r in e)
    D8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && nv)
    for (var r of nv(e))
      t.indexOf(r) < 0 && F8.call(e, r) && (n[r] = e[r]);
  return n;
};
function Bpe(e) {
  var t = e, { size: n, color: r } = t, o = H3(t, ["size", "color"]);
  const i = o, { style: a } = i, l = H3(i, ["style"]);
  return /* @__PURE__ */ P.createElement("svg", U3({
    viewBox: "0 0 38 38",
    xmlns: "http://www.w3.org/2000/svg",
    stroke: r,
    style: U3({ width: n, height: n }, a)
  }, l), /* @__PURE__ */ P.createElement("g", {
    fill: "none",
    fillRule: "evenodd"
  }, /* @__PURE__ */ P.createElement("g", {
    transform: "translate(2.5 2.5)",
    strokeWidth: "5"
  }, /* @__PURE__ */ P.createElement("circle", {
    strokeOpacity: ".5",
    cx: "16",
    cy: "16",
    r: "16"
  }), /* @__PURE__ */ P.createElement("path", {
    d: "M32 16c0-9.94-8.06-16-16-16"
  }, /* @__PURE__ */ P.createElement("animateTransform", {
    attributeName: "transform",
    type: "rotate",
    from: "0 16 16",
    to: "360 16 16",
    dur: "1s",
    repeatCount: "indefinite"
  })))));
}
var Upe = Object.defineProperty, rv = Object.getOwnPropertySymbols, M8 = Object.prototype.hasOwnProperty, B8 = Object.prototype.propertyIsEnumerable, W3 = (e, t, n) => t in e ? Upe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, V3 = (e, t) => {
  for (var n in t || (t = {}))
    M8.call(t, n) && W3(e, n, t[n]);
  if (rv)
    for (var n of rv(t))
      B8.call(t, n) && W3(e, n, t[n]);
  return e;
}, q3 = (e, t) => {
  var n = {};
  for (var r in e)
    M8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && rv)
    for (var r of rv(e))
      t.indexOf(r) < 0 && B8.call(e, r) && (n[r] = e[r]);
  return n;
};
function Hpe(e) {
  var t = e, { size: n, color: r } = t, o = q3(t, ["size", "color"]);
  const i = o, { style: a } = i, l = q3(i, ["style"]);
  return /* @__PURE__ */ P.createElement("svg", V3({
    viewBox: "0 0 120 30",
    xmlns: "http://www.w3.org/2000/svg",
    fill: r,
    style: V3({ width: n }, a)
  }, l), /* @__PURE__ */ P.createElement("circle", {
    cx: "15",
    cy: "15",
    r: "15"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "r",
    from: "15",
    to: "15",
    begin: "0s",
    dur: "0.8s",
    values: "15;9;15",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "fill-opacity",
    from: "1",
    to: "1",
    begin: "0s",
    dur: "0.8s",
    values: "1;.5;1",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("circle", {
    cx: "60",
    cy: "15",
    r: "9",
    fillOpacity: "0.3"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "r",
    from: "9",
    to: "9",
    begin: "0s",
    dur: "0.8s",
    values: "9;15;9",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "fill-opacity",
    from: "0.5",
    to: "0.5",
    begin: "0s",
    dur: "0.8s",
    values: ".5;1;.5",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("circle", {
    cx: "105",
    cy: "15",
    r: "15"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "r",
    from: "15",
    to: "15",
    begin: "0s",
    dur: "0.8s",
    values: "15;9;15",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "fill-opacity",
    from: "1",
    to: "1",
    begin: "0s",
    dur: "0.8s",
    values: "1;.5;1",
    calcMode: "linear",
    repeatCount: "indefinite"
  })));
}
var Wpe = Object.defineProperty, ov = Object.getOwnPropertySymbols, U8 = Object.prototype.hasOwnProperty, H8 = Object.prototype.propertyIsEnumerable, G3 = (e, t, n) => t in e ? Wpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Vpe = (e, t) => {
  for (var n in t || (t = {}))
    U8.call(t, n) && G3(e, n, t[n]);
  if (ov)
    for (var n of ov(t))
      H8.call(t, n) && G3(e, n, t[n]);
  return e;
}, qpe = (e, t) => {
  var n = {};
  for (var r in e)
    U8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ov)
    for (var r of ov(e))
      t.indexOf(r) < 0 && H8.call(e, r) && (n[r] = e[r]);
  return n;
};
const f_ = {
  bars: Fpe,
  oval: Bpe,
  dots: Hpe
}, Gpe = {
  xs: F(18),
  sm: F(22),
  md: F(36),
  lg: F(44),
  xl: F(58)
}, Kpe = {
  size: "md"
};
function nf(e) {
  const t = Te("Loader", Kpe, e), { size: n, color: r, variant: o } = t, i = qpe(t, ["size", "color", "variant"]), a = Yn(), l = o in f_ ? o : a.loader;
  return /* @__PURE__ */ P.createElement(qe, Vpe({
    role: "presentation",
    component: f_[l] || f_.bars,
    size: Re({ size: n, sizes: Gpe }),
    color: a.fn.variant({
      variant: "filled",
      primaryFallback: !1,
      color: r || a.primaryColor
    }).background
  }, i));
}
nf.displayName = "@mantine/core/Loader";
var Ype = Object.defineProperty, iv = Object.getOwnPropertySymbols, W8 = Object.prototype.hasOwnProperty, V8 = Object.prototype.propertyIsEnumerable, K3 = (e, t, n) => t in e ? Ype(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Y3 = (e, t) => {
  for (var n in t || (t = {}))
    W8.call(t, n) && K3(e, n, t[n]);
  if (iv)
    for (var n of iv(t))
      V8.call(t, n) && K3(e, n, t[n]);
  return e;
}, Xpe = (e, t) => {
  var n = {};
  for (var r in e)
    W8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && iv)
    for (var r of iv(e))
      t.indexOf(r) < 0 && V8.call(e, r) && (n[r] = e[r]);
  return n;
};
const Zpe = {
  color: "gray",
  size: "md",
  variant: "subtle"
}, q8 = b.forwardRef((e, t) => {
  const n = Te("ActionIcon", Zpe, e), {
    className: r,
    color: o,
    children: i,
    radius: a,
    size: l,
    variant: s,
    gradient: c,
    disabled: p,
    loaderProps: f,
    loading: m,
    unstyled: h,
    __staticSelector: g
  } = n, v = Xpe(n, [
    "className",
    "color",
    "children",
    "radius",
    "size",
    "variant",
    "gradient",
    "disabled",
    "loaderProps",
    "loading",
    "unstyled",
    "__staticSelector"
  ]), { classes: S, cx: w, theme: x } = Lpe({ radius: a, color: o, gradient: c }, { name: ["ActionIcon", g], unstyled: h, size: l, variant: s }), k = /* @__PURE__ */ P.createElement(nf, Y3({
    color: x.fn.variant({ color: o, variant: s }).color,
    size: "100%",
    "data-action-icon-loader": !0
  }, f));
  return /* @__PURE__ */ P.createElement(vx, Y3({
    className: w(S.root, r),
    ref: t,
    disabled: p,
    "data-disabled": p || void 0,
    "data-loading": m || void 0,
    unstyled: h
  }, v), m ? k : i);
});
q8.displayName = "@mantine/core/ActionIcon";
const jn = q8;
var Qpe = Object.defineProperty, Jpe = Object.defineProperties, eme = Object.getOwnPropertyDescriptors, av = Object.getOwnPropertySymbols, G8 = Object.prototype.hasOwnProperty, K8 = Object.prototype.propertyIsEnumerable, X3 = (e, t, n) => t in e ? Qpe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, tme = (e, t) => {
  for (var n in t || (t = {}))
    G8.call(t, n) && X3(e, n, t[n]);
  if (av)
    for (var n of av(t))
      K8.call(t, n) && X3(e, n, t[n]);
  return e;
}, nme = (e, t) => Jpe(e, eme(t)), rme = (e, t) => {
  var n = {};
  for (var r in e)
    G8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && av)
    for (var r of av(e))
      t.indexOf(r) < 0 && K8.call(e, r) && (n[r] = e[r]);
  return n;
};
function uP(e) {
  const t = Te("Portal", {}, e), { children: n, target: r, className: o, innerRef: i } = t, a = rme(t, ["children", "target", "className", "innerRef"]), l = Yn(), [s, c] = b.useState(!1), p = b.useRef();
  return Ap(() => (c(!0), p.current = r ? typeof r == "string" ? document.querySelector(r) : r : document.createElement("div"), r || document.body.appendChild(p.current), () => {
    !r && document.body.removeChild(p.current);
  }), [r]), s ? La.createPortal(/* @__PURE__ */ P.createElement("div", nme(tme({
    className: o,
    dir: l.dir
  }, a), {
    ref: i
  }), n), p.current) : null;
}
uP.displayName = "@mantine/core/Portal";
var ome = Object.defineProperty, lv = Object.getOwnPropertySymbols, Y8 = Object.prototype.hasOwnProperty, X8 = Object.prototype.propertyIsEnumerable, Z3 = (e, t, n) => t in e ? ome(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ime = (e, t) => {
  for (var n in t || (t = {}))
    Y8.call(t, n) && Z3(e, n, t[n]);
  if (lv)
    for (var n of lv(t))
      X8.call(t, n) && Z3(e, n, t[n]);
  return e;
}, ame = (e, t) => {
  var n = {};
  for (var r in e)
    Y8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && lv)
    for (var r of lv(e))
      t.indexOf(r) < 0 && X8.call(e, r) && (n[r] = e[r]);
  return n;
};
function rf(e) {
  var t = e, { withinPortal: n = !0, children: r } = t, o = ame(t, ["withinPortal", "children"]);
  return n ? /* @__PURE__ */ P.createElement(uP, ime({}, o), r) : /* @__PURE__ */ P.createElement(P.Fragment, null, r);
}
rf.displayName = "@mantine/core/OptionalPortal";
var lme = Object.defineProperty, sme = Object.defineProperties, ume = Object.getOwnPropertyDescriptors, Q3 = Object.getOwnPropertySymbols, cme = Object.prototype.hasOwnProperty, fme = Object.prototype.propertyIsEnumerable, J3 = (e, t, n) => t in e ? lme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, d_ = (e, t) => {
  for (var n in t || (t = {}))
    cme.call(t, n) && J3(e, n, t[n]);
  if (Q3)
    for (var n of Q3(t))
      fme.call(t, n) && J3(e, n, t[n]);
  return e;
}, e$ = (e, t) => sme(e, ume(t));
function dme({ variant: e, color: t, theme: n }) {
  if (e === "filled")
    return {
      backgroundColor: n.fn.variant({ variant: "filled", color: t }).background,
      color: n.white
    };
  if (e === "outline") {
    const r = n.fn.variant({ variant: "outline", color: t });
    return {
      color: r.color,
      borderColor: r.border,
      backgroundColor: n.colorScheme === "dark" ? n.colors.dark[6] : n.white
    };
  }
  if (e === "light") {
    const r = n.fn.variant({ variant: "light", color: t });
    return {
      backgroundColor: r.background,
      color: r.color
    };
  }
  return null;
}
var pme = Ee((e, { radius: t, color: n }, { variant: r }) => ({
  root: d_(e$(d_({}, e.fn.fontStyles()), {
    position: "relative",
    overflow: "hidden",
    paddingTop: e.spacing.sm,
    paddingBottom: e.spacing.sm,
    paddingLeft: e.spacing.md,
    paddingRight: e.spacing.sm,
    borderRadius: e.fn.radius(t),
    border: `${F(1)} solid transparent`
  }), dme({ variant: r, color: n, theme: e })),
  wrapper: {
    display: "flex"
  },
  body: {
    flex: 1
  },
  title: {
    boxSizing: "border-box",
    margin: 0,
    marginBottom: e.spacing.xs,
    display: "flex",
    alignItems: "center",
    justifyContent: "space-between",
    lineHeight: e.lineHeight,
    fontSize: e.fontSizes.sm,
    fontWeight: 700,
    "&[data-with-close-button]": {
      paddingRight: e.spacing.md
    }
  },
  label: {
    display: "block",
    overflow: "hidden",
    textOverflow: "ellipsis"
  },
  icon: {
    lineHeight: 1,
    width: F(20),
    height: F(20),
    display: "flex",
    alignItems: "center",
    justifyContent: "flex-start",
    marginRight: e.spacing.md,
    marginTop: 1
  },
  message: e$(d_({}, e.fn.fontStyles()), {
    lineHeight: e.lineHeight,
    textOverflow: "ellipsis",
    overflow: "hidden",
    fontSize: e.fontSizes.sm,
    color: r === "filled" ? e.white : e.colorScheme === "dark" ? r === "light" ? e.white : e.colors.dark[0] : e.black
  }),
  closeButton: {
    width: F(10),
    height: F(10),
    color: r === "filled" ? e.white : e.colorScheme === "dark" ? r === "light" ? e.white : e.colors.dark[0] : e.black
  }
})), mme = Object.defineProperty, sv = Object.getOwnPropertySymbols, Z8 = Object.prototype.hasOwnProperty, Q8 = Object.prototype.propertyIsEnumerable, t$ = (e, t, n) => t in e ? mme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, n$ = (e, t) => {
  for (var n in t || (t = {}))
    Z8.call(t, n) && t$(e, n, t[n]);
  if (sv)
    for (var n of sv(t))
      Q8.call(t, n) && t$(e, n, t[n]);
  return e;
}, hme = (e, t) => {
  var n = {};
  for (var r in e)
    Z8.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && sv)
    for (var r of sv(e))
      t.indexOf(r) < 0 && Q8.call(e, r) && (n[r] = e[r]);
  return n;
};
function J8(e) {
  const t = e, { width: n, height: r, style: o } = t, i = hme(t, ["width", "height", "style"]);
  return /* @__PURE__ */ P.createElement("svg", n$({
    viewBox: "0 0 15 15",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    style: n$({ width: n, height: r }, o)
  }, i), /* @__PURE__ */ P.createElement("path", {
    d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
J8.displayName = "@mantine/core/CloseIcon";
var gme = Object.defineProperty, uv = Object.getOwnPropertySymbols, eB = Object.prototype.hasOwnProperty, tB = Object.prototype.propertyIsEnumerable, r$ = (e, t, n) => t in e ? gme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, yme = (e, t) => {
  for (var n in t || (t = {}))
    eB.call(t, n) && r$(e, n, t[n]);
  if (uv)
    for (var n of uv(t))
      tB.call(t, n) && r$(e, n, t[n]);
  return e;
}, vme = (e, t) => {
  var n = {};
  for (var r in e)
    eB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && uv)
    for (var r of uv(e))
      t.indexOf(r) < 0 && tB.call(e, r) && (n[r] = e[r]);
  return n;
};
const bme = {
  xs: F(12),
  sm: F(16),
  md: F(20),
  lg: F(28),
  xl: F(34)
}, wme = {
  size: "sm"
}, nB = b.forwardRef((e, t) => {
  const n = Te("CloseButton", wme, e), { iconSize: r, size: o, children: i } = n, a = vme(n, ["iconSize", "size", "children"]), l = F(r || bme[o]);
  return /* @__PURE__ */ P.createElement(jn, yme({
    ref: t,
    __staticSelector: "CloseButton",
    size: o
  }, a), i || /* @__PURE__ */ P.createElement(J8, {
    width: l,
    height: l
  }));
});
nB.displayName = "@mantine/core/CloseButton";
const bx = nB;
var xme = Object.defineProperty, cv = Object.getOwnPropertySymbols, rB = Object.prototype.hasOwnProperty, oB = Object.prototype.propertyIsEnumerable, o$ = (e, t, n) => t in e ? xme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Sme = (e, t) => {
  for (var n in t || (t = {}))
    rB.call(t, n) && o$(e, n, t[n]);
  if (cv)
    for (var n of cv(t))
      oB.call(t, n) && o$(e, n, t[n]);
  return e;
}, kme = (e, t) => {
  var n = {};
  for (var r in e)
    rB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && cv)
    for (var r of cv(e))
      t.indexOf(r) < 0 && oB.call(e, r) && (n[r] = e[r]);
  return n;
};
const _me = {
  variant: "light"
}, cP = b.forwardRef((e, t) => {
  const n = Te("Alert", _me, e), {
    id: r,
    className: o,
    title: i,
    variant: a,
    children: l,
    color: s,
    classNames: c,
    icon: p,
    styles: f,
    onClose: m,
    radius: h,
    withCloseButton: g,
    closeButtonLabel: v,
    unstyled: S
  } = n, w = kme(n, [
    "id",
    "className",
    "title",
    "variant",
    "children",
    "color",
    "classNames",
    "icon",
    "styles",
    "onClose",
    "radius",
    "withCloseButton",
    "closeButtonLabel",
    "unstyled"
  ]), { classes: x, cx: k } = pme({ color: s, radius: h }, { classNames: c, styles: f, unstyled: S, variant: a, name: "Alert" }), E = ea(r), O = i && `${E}-title`, C = `${E}-body`;
  return /* @__PURE__ */ P.createElement(qe, Sme({
    id: E,
    role: "alert",
    "aria-labelledby": O,
    "aria-describedby": C,
    className: k(x.root, x[a], o),
    ref: t
  }, w), /* @__PURE__ */ P.createElement("div", {
    className: x.wrapper
  }, p && /* @__PURE__ */ P.createElement("div", {
    className: x.icon
  }, p), /* @__PURE__ */ P.createElement("div", {
    className: x.body
  }, i && /* @__PURE__ */ P.createElement("div", {
    className: x.title,
    "data-with-close-button": g || void 0
  }, /* @__PURE__ */ P.createElement("span", {
    id: O,
    className: x.label
  }, i)), /* @__PURE__ */ P.createElement("div", {
    id: C,
    className: x.message
  }, l)), g && /* @__PURE__ */ P.createElement(bx, {
    className: x.closeButton,
    onClick: m,
    variant: "transparent",
    size: 16,
    iconSize: 16,
    "aria-label": v
  })));
});
cP.displayName = "@mantine/core/Alert";
var Ome = Object.defineProperty, Eme = Object.defineProperties, Cme = Object.getOwnPropertyDescriptors, i$ = Object.getOwnPropertySymbols, Pme = Object.prototype.hasOwnProperty, Rme = Object.prototype.propertyIsEnumerable, a$ = (e, t, n) => t in e ? Ome(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Sh = (e, t) => {
  for (var n in t || (t = {}))
    Pme.call(t, n) && a$(e, n, t[n]);
  if (i$)
    for (var n of i$(t))
      Rme.call(t, n) && a$(e, n, t[n]);
  return e;
}, Tme = (e, t) => Eme(e, Cme(t));
function jme({
  underline: e,
  strikethrough: t
}) {
  const n = [];
  return e && n.push("underline"), t && n.push("line-through"), n.length > 0 ? n.join(" ") : "none";
}
function Nme({ theme: e, color: t }) {
  return t === "dimmed" ? e.fn.dimmed() : typeof t == "string" && (t in e.colors || t.split(".")[0] in e.colors) ? e.fn.variant({ variant: "filled", color: t }).background : t || "inherit";
}
function $me(e) {
  return typeof e == "number" ? {
    overflow: "hidden",
    textOverflow: "ellipsis",
    display: "-webkit-box",
    WebkitLineClamp: e,
    WebkitBoxOrient: "vertical"
  } : null;
}
function Ime({ theme: e, truncate: t }) {
  return t === "start" ? {
    overflow: "hidden",
    textOverflow: "ellipsis",
    whiteSpace: "nowrap",
    direction: e.dir === "ltr" ? "rtl" : "ltr",
    textAlign: e.dir === "ltr" ? "right" : "left"
  } : t ? {
    overflow: "hidden",
    textOverflow: "ellipsis",
    whiteSpace: "nowrap"
  } : null;
}
var Ame = Ee((e, {
  color: t,
  lineClamp: n,
  truncate: r,
  inline: o,
  inherit: i,
  underline: a,
  gradient: l,
  weight: s,
  transform: c,
  align: p,
  strikethrough: f,
  italic: m
}, { size: h }) => {
  const g = e.fn.variant({ variant: "gradient", gradient: l });
  return {
    root: Tme(Sh(Sh(Sh(Sh({}, e.fn.fontStyles()), e.fn.focusStyles()), $me(n)), Ime({ theme: e, truncate: r })), {
      color: Nme({ color: t, theme: e }),
      fontFamily: i ? "inherit" : e.fontFamily,
      fontSize: i || h === void 0 ? "inherit" : Re({ size: h, sizes: e.fontSizes }),
      lineHeight: i ? "inherit" : o ? 1 : e.lineHeight,
      textDecoration: jme({ underline: a, strikethrough: f }),
      WebkitTapHighlightColor: "transparent",
      fontWeight: i ? "inherit" : s,
      textTransform: c,
      textAlign: p,
      fontStyle: m ? "italic" : void 0
    }),
    gradient: {
      backgroundImage: g.background,
      WebkitBackgroundClip: "text",
      WebkitTextFillColor: "transparent"
    }
  };
}), zme = Object.defineProperty, fv = Object.getOwnPropertySymbols, iB = Object.prototype.hasOwnProperty, aB = Object.prototype.propertyIsEnumerable, l$ = (e, t, n) => t in e ? zme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Lme = (e, t) => {
  for (var n in t || (t = {}))
    iB.call(t, n) && l$(e, n, t[n]);
  if (fv)
    for (var n of fv(t))
      aB.call(t, n) && l$(e, n, t[n]);
  return e;
}, Dme = (e, t) => {
  var n = {};
  for (var r in e)
    iB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && fv)
    for (var r of fv(e))
      t.indexOf(r) < 0 && aB.call(e, r) && (n[r] = e[r]);
  return n;
};
const Fme = {
  variant: "text"
}, lB = b.forwardRef((e, t) => {
  const n = Te("Text", Fme, e), {
    className: r,
    size: o,
    weight: i,
    transform: a,
    color: l,
    align: s,
    variant: c,
    lineClamp: p,
    truncate: f,
    gradient: m,
    inline: h,
    inherit: g,
    underline: v,
    strikethrough: S,
    italic: w,
    classNames: x,
    styles: k,
    unstyled: E,
    span: O,
    __staticSelector: C
  } = n, R = Dme(n, [
    "className",
    "size",
    "weight",
    "transform",
    "color",
    "align",
    "variant",
    "lineClamp",
    "truncate",
    "gradient",
    "inline",
    "inherit",
    "underline",
    "strikethrough",
    "italic",
    "classNames",
    "styles",
    "unstyled",
    "span",
    "__staticSelector"
  ]), { classes: L, cx: D } = Ame({
    color: l,
    lineClamp: p,
    truncate: f,
    inline: h,
    inherit: g,
    underline: v,
    strikethrough: S,
    italic: w,
    weight: i,
    transform: a,
    align: s,
    gradient: m
  }, { unstyled: E, name: C || "Text", variant: c, size: o });
  return /* @__PURE__ */ P.createElement(qe, Lme({
    ref: t,
    className: D(L.root, { [L.gradient]: c === "gradient" }, r),
    component: O ? "span" : "div"
  }, R));
});
lB.displayName = "@mantine/core/Text";
const Ft = lB;
var Mme = Object.defineProperty, s$ = Object.getOwnPropertySymbols, Bme = Object.prototype.hasOwnProperty, Ume = Object.prototype.propertyIsEnumerable, u$ = (e, t, n) => t in e ? Mme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Hme = (e, t) => {
  for (var n in t || (t = {}))
    Bme.call(t, n) && u$(e, n, t[n]);
  if (s$)
    for (var n of s$(t))
      Ume.call(t, n) && u$(e, n, t[n]);
  return e;
};
function Wme({ theme: e, color: t }) {
  return t === "dimmed" ? e.fn.dimmed() : e.fn.themeColor(t || e.primaryColor, e.colorScheme === "dark" ? 4 : 7, !1, !0);
}
var Vme = Ee((e, { color: t, underline: n }) => ({
  root: Hme({
    backgroundColor: "transparent",
    cursor: "pointer",
    padding: 0,
    border: 0,
    color: Wme({ theme: e, color: t })
  }, e.fn.hover({ textDecoration: n ? "underline" : "none" }))
})), qme = Object.defineProperty, dv = Object.getOwnPropertySymbols, sB = Object.prototype.hasOwnProperty, uB = Object.prototype.propertyIsEnumerable, c$ = (e, t, n) => t in e ? qme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, f$ = (e, t) => {
  for (var n in t || (t = {}))
    sB.call(t, n) && c$(e, n, t[n]);
  if (dv)
    for (var n of dv(t))
      uB.call(t, n) && c$(e, n, t[n]);
  return e;
}, Gme = (e, t) => {
  var n = {};
  for (var r in e)
    sB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && dv)
    for (var r of dv(e))
      t.indexOf(r) < 0 && uB.call(e, r) && (n[r] = e[r]);
  return n;
};
const Kme = {
  underline: !0
}, cB = b.forwardRef((e, t) => {
  const n = Te("Anchor", Kme, e), { component: r, className: o, unstyled: i, variant: a, size: l, color: s, underline: c } = n, p = Gme(n, ["component", "className", "unstyled", "variant", "size", "color", "underline"]), { classes: f, cx: m } = Vme({ color: s, underline: c }, { name: "Anchor", unstyled: i, variant: a, size: l }), h = r === "button" ? { type: "button" } : null;
  return /* @__PURE__ */ P.createElement(Ft, f$(f$({
    component: r || "a",
    ref: t,
    className: m(f.root, o),
    size: l
  }, h), p));
});
cB.displayName = "@mantine/core/Anchor";
const Yme = cB, kh = {
  xs: F(1),
  sm: F(2),
  md: F(3),
  lg: F(4),
  xl: F(5)
};
function _h(e, t) {
  const n = e.fn.variant({ variant: "outline", color: t }).border;
  return typeof t == "string" && (t in e.colors || t.split(".")[0] in e.colors) ? n : t === void 0 ? e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4] : t;
}
var Xme = Ee((e, { color: t }, { size: n, variant: r }) => ({
  root: {},
  withLabel: {
    borderTop: "0 !important"
  },
  left: {
    "&::before": {
      display: "none"
    }
  },
  right: {
    "&::after": {
      display: "none"
    }
  },
  label: {
    display: "flex",
    alignItems: "center",
    "&::before": {
      content: '""',
      flex: 1,
      height: F(1),
      borderTop: `${Re({ size: n, sizes: kh })} ${r} ${_h(e, t)}`,
      marginRight: e.spacing.xs
    },
    "&::after": {
      content: '""',
      flex: 1,
      borderTop: `${Re({ size: n, sizes: kh })} ${r} ${_h(e, t)}`,
      marginLeft: e.spacing.xs
    }
  },
  labelDefaultStyles: {
    color: t === "dark" ? e.colors.dark[1] : e.fn.themeColor(t, e.colorScheme === "dark" ? 5 : e.fn.primaryShade(), !1)
  },
  horizontal: {
    border: 0,
    borderTopWidth: F(Re({ size: n, sizes: kh })),
    borderTopColor: _h(e, t),
    borderTopStyle: r,
    margin: 0
  },
  vertical: {
    border: 0,
    alignSelf: "stretch",
    height: "auto",
    borderLeftWidth: F(Re({ size: n, sizes: kh })),
    borderLeftColor: _h(e, t),
    borderLeftStyle: r
  }
})), Zme = Object.defineProperty, Qme = Object.defineProperties, Jme = Object.getOwnPropertyDescriptors, pv = Object.getOwnPropertySymbols, fB = Object.prototype.hasOwnProperty, dB = Object.prototype.propertyIsEnumerable, d$ = (e, t, n) => t in e ? Zme(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, p$ = (e, t) => {
  for (var n in t || (t = {}))
    fB.call(t, n) && d$(e, n, t[n]);
  if (pv)
    for (var n of pv(t))
      dB.call(t, n) && d$(e, n, t[n]);
  return e;
}, ehe = (e, t) => Qme(e, Jme(t)), the = (e, t) => {
  var n = {};
  for (var r in e)
    fB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && pv)
    for (var r of pv(e))
      t.indexOf(r) < 0 && dB.call(e, r) && (n[r] = e[r]);
  return n;
};
const nhe = {
  orientation: "horizontal",
  size: "xs",
  labelPosition: "left",
  variant: "solid"
}, mv = b.forwardRef((e, t) => {
  const n = Te("Divider", nhe, e), {
    className: r,
    color: o,
    orientation: i,
    size: a,
    label: l,
    labelPosition: s,
    labelProps: c,
    variant: p,
    styles: f,
    classNames: m,
    unstyled: h
  } = n, g = the(n, [
    "className",
    "color",
    "orientation",
    "size",
    "label",
    "labelPosition",
    "labelProps",
    "variant",
    "styles",
    "classNames",
    "unstyled"
  ]), { classes: v, cx: S } = Xme({ color: o }, { classNames: m, styles: f, unstyled: h, name: "Divider", variant: p, size: a }), w = i === "vertical", x = i === "horizontal", k = !!l && x, E = !(c != null && c.color);
  return /* @__PURE__ */ P.createElement(qe, p$({
    ref: t,
    className: S(v.root, {
      [v.vertical]: w,
      [v.horizontal]: x,
      [v.withLabel]: k
    }, r),
    role: "separator"
  }, g), k && /* @__PURE__ */ P.createElement(Ft, ehe(p$({}, c), {
    size: (c == null ? void 0 : c.size) || "xs",
    mt: F(2),
    className: S(v.label, v[s], {
      [v.labelDefaultStyles]: E
    })
  }), l));
});
mv.displayName = "@mantine/core/Divider";
var rhe = Object.defineProperty, ohe = Object.defineProperties, ihe = Object.getOwnPropertyDescriptors, m$ = Object.getOwnPropertySymbols, ahe = Object.prototype.hasOwnProperty, lhe = Object.prototype.propertyIsEnumerable, h$ = (e, t, n) => t in e ? rhe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, g$ = (e, t) => {
  for (var n in t || (t = {}))
    ahe.call(t, n) && h$(e, n, t[n]);
  if (m$)
    for (var n of m$(t))
      lhe.call(t, n) && h$(e, n, t[n]);
  return e;
}, she = (e, t) => ohe(e, ihe(t)), uhe = Ee((e, t, { size: n }) => ({
  item: she(g$({}, e.fn.fontStyles()), {
    boxSizing: "border-box",
    wordBreak: "break-all",
    textAlign: "left",
    width: "100%",
    padding: `calc(${Re({ size: n, sizes: e.spacing })} / 1.5) ${Re({
      size: n,
      sizes: e.spacing
    })}`,
    cursor: "pointer",
    fontSize: Re({ size: n, sizes: e.fontSizes }),
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    borderRadius: e.fn.radius(),
    "&[data-hovered]": {
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[1]
    },
    "&[data-selected]": g$({
      backgroundColor: e.fn.variant({ variant: "filled" }).background,
      color: e.fn.variant({ variant: "filled" }).color
    }, e.fn.hover({ backgroundColor: e.fn.variant({ variant: "filled" }).hover })),
    "&[data-disabled]": {
      cursor: "default",
      color: e.colors.dark[2]
    }
  }),
  nothingFound: {
    boxSizing: "border-box",
    color: e.colors.gray[6],
    paddingTop: `calc(${Re({ size: n, sizes: e.spacing })} / 2)`,
    paddingBottom: `calc(${Re({ size: n, sizes: e.spacing })} / 2)`,
    textAlign: "center"
  },
  separator: {
    boxSizing: "border-box",
    textAlign: "left",
    width: "100%",
    padding: `calc(${Re({ size: n, sizes: e.spacing })} / 1.5) ${Re({
      size: n,
      sizes: e.spacing
    })}`
  },
  separatorLabel: {
    color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5]
  }
})), che = Object.defineProperty, y$ = Object.getOwnPropertySymbols, fhe = Object.prototype.hasOwnProperty, dhe = Object.prototype.propertyIsEnumerable, v$ = (e, t, n) => t in e ? che(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, phe = (e, t) => {
  for (var n in t || (t = {}))
    fhe.call(t, n) && v$(e, n, t[n]);
  if (y$)
    for (var n of y$(t))
      dhe.call(t, n) && v$(e, n, t[n]);
  return e;
};
function fP({
  data: e,
  hovered: t,
  classNames: n,
  styles: r,
  isItemSelected: o,
  uuid: i,
  __staticSelector: a,
  onItemHover: l,
  onItemSelect: s,
  itemsRefs: c,
  itemComponent: p,
  size: f,
  nothingFound: m,
  creatable: h,
  createLabel: g,
  unstyled: v,
  variant: S
}) {
  const { classes: w } = uhe(null, {
    classNames: n,
    styles: r,
    unstyled: v,
    name: a,
    variant: S,
    size: f
  }), x = [], k = [];
  let E = null;
  const O = (R, L) => {
    const D = typeof o == "function" ? o(R.value) : !1;
    return /* @__PURE__ */ P.createElement(p, phe({
      key: R.value,
      className: w.item,
      "data-disabled": R.disabled || void 0,
      "data-hovered": !R.disabled && t === L || void 0,
      "data-selected": !R.disabled && D || void 0,
      selected: D,
      onMouseEnter: () => l(L),
      id: `${i}-${L}`,
      role: "option",
      tabIndex: -1,
      "aria-selected": t === L,
      ref: (N) => {
        c && c.current && (c.current[R.value] = N);
      },
      onMouseDown: R.disabled ? null : (N) => {
        N.preventDefault(), s(R);
      },
      disabled: R.disabled,
      variant: S
    }, R));
  };
  let C = null;
  if (e.forEach((R, L) => {
    R.creatable ? E = L : R.group ? (C !== R.group && (C = R.group, k.push(/* @__PURE__ */ P.createElement("div", {
      className: w.separator,
      key: `__mantine-divider-${L}`
    }, /* @__PURE__ */ P.createElement(mv, {
      classNames: { label: w.separatorLabel },
      label: R.group
    })))), k.push(O(R, L))) : x.push(O(R, L));
  }), h) {
    const R = e[E];
    x.push(/* @__PURE__ */ P.createElement("div", {
      key: yx(),
      className: w.item,
      "data-hovered": t === E || void 0,
      onMouseEnter: () => l(E),
      onMouseDown: (L) => {
        L.preventDefault(), s(R);
      },
      tabIndex: -1,
      ref: (L) => {
        c && c.current && (c.current[R.value] = L);
      }
    }, g));
  }
  return k.length > 0 && x.length > 0 && x.unshift(/* @__PURE__ */ P.createElement("div", {
    className: w.separator,
    key: "empty-group-separator"
  }, /* @__PURE__ */ P.createElement(mv, null))), k.length > 0 || x.length > 0 ? /* @__PURE__ */ P.createElement(P.Fragment, null, k, x) : /* @__PURE__ */ P.createElement(Ft, {
    size: f,
    unstyled: v,
    className: w.nothingFound
  }, m);
}
fP.displayName = "@mantine/core/SelectItems";
var mhe = Object.defineProperty, hv = Object.getOwnPropertySymbols, pB = Object.prototype.hasOwnProperty, mB = Object.prototype.propertyIsEnumerable, b$ = (e, t, n) => t in e ? mhe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, hhe = (e, t) => {
  for (var n in t || (t = {}))
    pB.call(t, n) && b$(e, n, t[n]);
  if (hv)
    for (var n of hv(t))
      mB.call(t, n) && b$(e, n, t[n]);
  return e;
}, ghe = (e, t) => {
  var n = {};
  for (var r in e)
    pB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && hv)
    for (var r of hv(e))
      t.indexOf(r) < 0 && mB.call(e, r) && (n[r] = e[r]);
  return n;
};
const dP = b.forwardRef((e, t) => {
  var n = e, { label: r, value: o } = n, i = ghe(n, ["label", "value"]);
  return /* @__PURE__ */ P.createElement("div", hhe({
    ref: t
  }, i), r || o);
});
dP.displayName = "@mantine/core/DefaultItem";
function yhe(e, t) {
  typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function hB(...e) {
  return (t) => e.forEach(
    (n) => yhe(n, t)
  );
}
function Ys(...e) {
  return b.useCallback(hB(...e), e);
}
const gB = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { children: n, ...r } = e, o = b.Children.toArray(n), i = o.find(bhe);
  if (i) {
    const a = i.props.children, l = o.map((s) => s === i ? b.Children.count(a) > 1 ? b.Children.only(null) : /* @__PURE__ */ b.isValidElement(a) ? a.props.children : null : s);
    return /* @__PURE__ */ b.createElement(UO, qt({}, r, {
      ref: t
    }), /* @__PURE__ */ b.isValidElement(a) ? /* @__PURE__ */ b.cloneElement(a, void 0, l) : null);
  }
  return /* @__PURE__ */ b.createElement(UO, qt({}, r, {
    ref: t
  }), n);
});
gB.displayName = "Slot";
const UO = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { children: n, ...r } = e;
  return /* @__PURE__ */ b.isValidElement(n) ? /* @__PURE__ */ b.cloneElement(n, {
    ...whe(r, n.props),
    ref: hB(t, n.ref)
  }) : b.Children.count(n) > 1 ? b.Children.only(null) : null;
});
UO.displayName = "SlotClone";
const vhe = ({ children: e }) => /* @__PURE__ */ b.createElement(b.Fragment, null, e);
function bhe(e) {
  return /* @__PURE__ */ b.isValidElement(e) && e.type === vhe;
}
function whe(e, t) {
  const n = {
    ...t
  };
  for (const r in t) {
    const o = e[r], i = t[r];
    /^on[A-Z]/.test(r) ? o && i ? n[r] = (...a) => {
      i(...a), o(...a);
    } : o && (n[r] = o) : r === "style" ? n[r] = {
      ...o,
      ...i
    } : r === "className" && (n[r] = [
      o,
      i
    ].filter(Boolean).join(" "));
  }
  return {
    ...e,
    ...n
  };
}
const xhe = [
  "a",
  "button",
  "div",
  "h2",
  "h3",
  "img",
  "label",
  "li",
  "nav",
  "ol",
  "p",
  "span",
  "svg",
  "ul"
], zp = xhe.reduce((e, t) => {
  const n = /* @__PURE__ */ b.forwardRef((r, o) => {
    const { asChild: i, ...a } = r, l = i ? gB : t;
    return b.useEffect(() => {
      window[Symbol.for("radix-ui")] = !0;
    }, []), /* @__PURE__ */ b.createElement(l, qt({}, a, {
      ref: o
    }));
  });
  return n.displayName = `Primitive.${t}`, {
    ...e,
    [t]: n
  };
}, {}), HO = globalThis != null && globalThis.document ? b.useLayoutEffect : () => {
};
function She(e, t) {
  return b.useReducer((n, r) => t[n][r] ?? n, e);
}
const Lp = (e) => {
  const { present: t, children: n } = e, r = khe(t), o = typeof n == "function" ? n({
    present: r.isPresent
  }) : b.Children.only(n), i = Ys(r.ref, o.ref);
  return typeof n == "function" || r.isPresent ? /* @__PURE__ */ b.cloneElement(o, {
    ref: i
  }) : null;
};
Lp.displayName = "Presence";
function khe(e) {
  const [t, n] = b.useState(), r = b.useRef({}), o = b.useRef(e), i = b.useRef("none"), a = e ? "mounted" : "unmounted", [l, s] = She(a, {
    mounted: {
      UNMOUNT: "unmounted",
      ANIMATION_OUT: "unmountSuspended"
    },
    unmountSuspended: {
      MOUNT: "mounted",
      ANIMATION_END: "unmounted"
    },
    unmounted: {
      MOUNT: "mounted"
    }
  });
  return b.useEffect(() => {
    const c = Oh(r.current);
    i.current = l === "mounted" ? c : "none";
  }, [
    l
  ]), HO(() => {
    const c = r.current, p = o.current;
    if (p !== e) {
      const f = i.current, m = Oh(c);
      e ? s("MOUNT") : m === "none" || (c == null ? void 0 : c.display) === "none" ? s("UNMOUNT") : s(p && f !== m ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
    }
  }, [
    e,
    s
  ]), HO(() => {
    if (t) {
      const c = (f) => {
        const m = Oh(r.current).includes(f.animationName);
        f.target === t && m && La.flushSync(
          () => s("ANIMATION_END")
        );
      }, p = (f) => {
        f.target === t && (i.current = Oh(r.current));
      };
      return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", c), t.addEventListener("animationend", c), () => {
        t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", c), t.removeEventListener("animationend", c);
      };
    } else
      s("ANIMATION_END");
  }, [
    t,
    s
  ]), {
    isPresent: [
      "mounted",
      "unmountSuspended"
    ].includes(l),
    ref: b.useCallback((c) => {
      c && (r.current = getComputedStyle(c)), n(c);
    }, [])
  };
}
function Oh(e) {
  return (e == null ? void 0 : e.animationName) || "none";
}
function _he(e, t = []) {
  let n = [];
  function r(i, a) {
    const l = /* @__PURE__ */ b.createContext(a), s = n.length;
    n = [
      ...n,
      a
    ];
    function c(f) {
      const { scope: m, children: h, ...g } = f, v = (m == null ? void 0 : m[e][s]) || l, S = b.useMemo(
        () => g,
        Object.values(g)
      );
      return /* @__PURE__ */ b.createElement(v.Provider, {
        value: S
      }, h);
    }
    function p(f, m) {
      const h = (m == null ? void 0 : m[e][s]) || l, g = b.useContext(h);
      if (g)
        return g;
      if (a !== void 0)
        return a;
      throw new Error(`\`${f}\` must be used within \`${i}\``);
    }
    return c.displayName = i + "Provider", [
      c,
      p
    ];
  }
  const o = () => {
    const i = n.map((a) => /* @__PURE__ */ b.createContext(a));
    return function(a) {
      const l = (a == null ? void 0 : a[e]) || i;
      return b.useMemo(
        () => ({
          [`__scope${e}`]: {
            ...a,
            [e]: l
          }
        }),
        [
          a,
          l
        ]
      );
    };
  };
  return o.scopeName = e, [
    r,
    Ohe(o, ...t)
  ];
}
function Ohe(...e) {
  const t = e[0];
  if (e.length === 1)
    return t;
  const n = () => {
    const r = e.map(
      (o) => ({
        useScope: o(),
        scopeName: o.scopeName
      })
    );
    return function(o) {
      const i = r.reduce((a, { useScope: l, scopeName: s }) => {
        const c = l(o)[`__scope${s}`];
        return {
          ...a,
          ...c
        };
      }, {});
      return b.useMemo(
        () => ({
          [`__scope${t.scopeName}`]: i
        }),
        [
          i
        ]
      );
    };
  };
  return n.scopeName = t.scopeName, n;
}
function ws(e) {
  const t = b.useRef(e);
  return b.useEffect(() => {
    t.current = e;
  }), b.useMemo(
    () => (...n) => {
      var r;
      return (r = t.current) === null || r === void 0 ? void 0 : r.call(t, ...n);
    },
    []
  );
}
const Ehe = /* @__PURE__ */ b.createContext(void 0);
function Che(e) {
  const t = b.useContext(Ehe);
  return e || t || "ltr";
}
function Phe(e, [t, n]) {
  return Math.min(n, Math.max(t, e));
}
function Is(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
  return function(r) {
    if (e == null || e(r), n === !1 || !r.defaultPrevented)
      return t == null ? void 0 : t(r);
  };
}
function Rhe(e, t) {
  return b.useReducer((n, r) => t[n][r] ?? n, e);
}
const yB = "ScrollArea", [vB, lHe] = _he(yB), [The, Yo] = vB(yB), jhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { __scopeScrollArea: n, type: r = "hover", dir: o, scrollHideDelay: i = 600, ...a } = e, [l, s] = b.useState(null), [c, p] = b.useState(null), [f, m] = b.useState(null), [h, g] = b.useState(null), [v, S] = b.useState(null), [w, x] = b.useState(0), [k, E] = b.useState(0), [O, C] = b.useState(!1), [R, L] = b.useState(!1), D = Ys(
    t,
    (H) => s(H)
  ), N = Che(o);
  return /* @__PURE__ */ b.createElement(The, {
    scope: n,
    type: r,
    dir: N,
    scrollHideDelay: i,
    scrollArea: l,
    viewport: c,
    onViewportChange: p,
    content: f,
    onContentChange: m,
    scrollbarX: h,
    onScrollbarXChange: g,
    scrollbarXEnabled: O,
    onScrollbarXEnabledChange: C,
    scrollbarY: v,
    onScrollbarYChange: S,
    scrollbarYEnabled: R,
    onScrollbarYEnabledChange: L,
    onCornerWidthChange: x,
    onCornerHeightChange: E
  }, /* @__PURE__ */ b.createElement(zp.div, qt({
    dir: N
  }, a, {
    ref: D,
    style: {
      position: "relative",
      // Pass corner sizes as CSS vars to reduce re-renders of context consumers
      "--radix-scroll-area-corner-width": w + "px",
      "--radix-scroll-area-corner-height": k + "px",
      ...e.style
    }
  })));
}), Nhe = "ScrollAreaViewport", $he = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { __scopeScrollArea: n, children: r, ...o } = e, i = Yo(Nhe, n), a = b.useRef(null), l = Ys(t, a, i.onViewportChange);
  return /* @__PURE__ */ b.createElement(b.Fragment, null, /* @__PURE__ */ b.createElement("style", {
    dangerouslySetInnerHTML: {
      __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
    }
  }), /* @__PURE__ */ b.createElement(zp.div, qt({
    "data-radix-scroll-area-viewport": ""
  }, o, {
    ref: l,
    style: {
      /**
      * We don't support `visible` because the intention is to have at least one scrollbar
      * if this component is used and `visible` will behave like `auto` in that case
      * https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description
      *
      * We don't handle `auto` because the intention is for the native implementation
      * to be hidden if using this component. We just want to ensure the node is scrollable
      * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
      * the browser from having to work out whether to render native scrollbars or not,
      * we tell it to with the intention of hiding them in CSS.
      */
      overflowX: i.scrollbarXEnabled ? "scroll" : "hidden",
      overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
      ...e.style
    }
  }), /* @__PURE__ */ b.createElement("div", {
    ref: i.onContentChange,
    style: {
      minWidth: "100%",
      display: "table"
    }
  }, r)));
}), Da = "ScrollAreaScrollbar", Ihe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { forceMount: n, ...r } = e, o = Yo(Da, e.__scopeScrollArea), { onScrollbarXEnabledChange: i, onScrollbarYEnabledChange: a } = o, l = e.orientation === "horizontal";
  return b.useEffect(() => (l ? i(!0) : a(!0), () => {
    l ? i(!1) : a(!1);
  }), [
    l,
    i,
    a
  ]), o.type === "hover" ? /* @__PURE__ */ b.createElement(Ahe, qt({}, r, {
    ref: t,
    forceMount: n
  })) : o.type === "scroll" ? /* @__PURE__ */ b.createElement(zhe, qt({}, r, {
    ref: t,
    forceMount: n
  })) : o.type === "auto" ? /* @__PURE__ */ b.createElement(bB, qt({}, r, {
    ref: t,
    forceMount: n
  })) : o.type === "always" ? /* @__PURE__ */ b.createElement(pP, qt({}, r, {
    ref: t
  })) : null;
}), Ahe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { forceMount: n, ...r } = e, o = Yo(Da, e.__scopeScrollArea), [i, a] = b.useState(!1);
  return b.useEffect(() => {
    const l = o.scrollArea;
    let s = 0;
    if (l) {
      const c = () => {
        window.clearTimeout(s), a(!0);
      }, p = () => {
        s = window.setTimeout(
          () => a(!1),
          o.scrollHideDelay
        );
      };
      return l.addEventListener("pointerenter", c), l.addEventListener("pointerleave", p), () => {
        window.clearTimeout(s), l.removeEventListener("pointerenter", c), l.removeEventListener("pointerleave", p);
      };
    }
  }, [
    o.scrollArea,
    o.scrollHideDelay
  ]), /* @__PURE__ */ b.createElement(Lp, {
    present: n || i
  }, /* @__PURE__ */ b.createElement(bB, qt({
    "data-state": i ? "visible" : "hidden"
  }, r, {
    ref: t
  })));
}), zhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { forceMount: n, ...r } = e, o = Yo(Da, e.__scopeScrollArea), i = e.orientation === "horizontal", a = xx(
    () => s("SCROLL_END"),
    100
  ), [l, s] = Rhe("hidden", {
    hidden: {
      SCROLL: "scrolling"
    },
    scrolling: {
      SCROLL_END: "idle",
      POINTER_ENTER: "interacting"
    },
    interacting: {
      SCROLL: "interacting",
      POINTER_LEAVE: "idle"
    },
    idle: {
      HIDE: "hidden",
      SCROLL: "scrolling",
      POINTER_ENTER: "interacting"
    }
  });
  return b.useEffect(() => {
    if (l === "idle") {
      const c = window.setTimeout(
        () => s("HIDE"),
        o.scrollHideDelay
      );
      return () => window.clearTimeout(c);
    }
  }, [
    l,
    o.scrollHideDelay,
    s
  ]), b.useEffect(() => {
    const c = o.viewport, p = i ? "scrollLeft" : "scrollTop";
    if (c) {
      let f = c[p];
      const m = () => {
        const h = c[p];
        f !== h && (s("SCROLL"), a()), f = h;
      };
      return c.addEventListener("scroll", m), () => c.removeEventListener("scroll", m);
    }
  }, [
    o.viewport,
    i,
    s,
    a
  ]), /* @__PURE__ */ b.createElement(Lp, {
    present: n || l !== "hidden"
  }, /* @__PURE__ */ b.createElement(pP, qt({
    "data-state": l === "hidden" ? "hidden" : "visible"
  }, r, {
    ref: t,
    onPointerEnter: Is(
      e.onPointerEnter,
      () => s("POINTER_ENTER")
    ),
    onPointerLeave: Is(
      e.onPointerLeave,
      () => s("POINTER_LEAVE")
    )
  })));
}), bB = /* @__PURE__ */ b.forwardRef((e, t) => {
  const n = Yo(Da, e.__scopeScrollArea), { forceMount: r, ...o } = e, [i, a] = b.useState(!1), l = e.orientation === "horizontal", s = xx(() => {
    if (n.viewport) {
      const c = n.viewport.offsetWidth < n.viewport.scrollWidth, p = n.viewport.offsetHeight < n.viewport.scrollHeight;
      a(l ? c : p);
    }
  }, 10);
  return Rc(n.viewport, s), Rc(n.content, s), /* @__PURE__ */ b.createElement(Lp, {
    present: r || i
  }, /* @__PURE__ */ b.createElement(pP, qt({
    "data-state": i ? "visible" : "hidden"
  }, o, {
    ref: t
  })));
}), pP = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { orientation: n = "vertical", ...r } = e, o = Yo(Da, e.__scopeScrollArea), i = b.useRef(null), a = b.useRef(0), [l, s] = b.useState({
    content: 0,
    viewport: 0,
    scrollbar: {
      size: 0,
      paddingStart: 0,
      paddingEnd: 0
    }
  }), c = kB(l.viewport, l.content), p = {
    ...r,
    sizes: l,
    onSizesChange: s,
    hasThumb: c > 0 && c < 1,
    onThumbChange: (m) => i.current = m,
    onThumbPointerUp: () => a.current = 0,
    onThumbPointerDown: (m) => a.current = m
  };
  function f(m, h) {
    return Whe(m, a.current, l, h);
  }
  return n === "horizontal" ? /* @__PURE__ */ b.createElement(Lhe, qt({}, p, {
    ref: t,
    onThumbPositionChange: () => {
      if (o.viewport && i.current) {
        const m = o.viewport.scrollLeft, h = w$(m, l, o.dir);
        i.current.style.transform = `translate3d(${h}px, 0, 0)`;
      }
    },
    onWheelScroll: (m) => {
      o.viewport && (o.viewport.scrollLeft = m);
    },
    onDragScroll: (m) => {
      o.viewport && (o.viewport.scrollLeft = f(m, o.dir));
    }
  })) : n === "vertical" ? /* @__PURE__ */ b.createElement(Dhe, qt({}, p, {
    ref: t,
    onThumbPositionChange: () => {
      if (o.viewport && i.current) {
        const m = o.viewport.scrollTop, h = w$(m, l);
        i.current.style.transform = `translate3d(0, ${h}px, 0)`;
      }
    },
    onWheelScroll: (m) => {
      o.viewport && (o.viewport.scrollTop = m);
    },
    onDragScroll: (m) => {
      o.viewport && (o.viewport.scrollTop = f(m));
    }
  })) : null;
}), Lhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { sizes: n, onSizesChange: r, ...o } = e, i = Yo(Da, e.__scopeScrollArea), [a, l] = b.useState(), s = b.useRef(null), c = Ys(t, s, i.onScrollbarXChange);
  return b.useEffect(() => {
    s.current && l(getComputedStyle(s.current));
  }, [
    s
  ]), /* @__PURE__ */ b.createElement(xB, qt({
    "data-orientation": "horizontal"
  }, o, {
    ref: c,
    sizes: n,
    style: {
      bottom: 0,
      left: i.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
      right: i.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
      "--radix-scroll-area-thumb-width": wx(n) + "px",
      ...e.style
    },
    onThumbPointerDown: (p) => e.onThumbPointerDown(p.x),
    onDragScroll: (p) => e.onDragScroll(p.x),
    onWheelScroll: (p, f) => {
      if (i.viewport) {
        const m = i.viewport.scrollLeft + p.deltaX;
        e.onWheelScroll(m), OB(m, f) && p.preventDefault();
      }
    },
    onResize: () => {
      s.current && i.viewport && a && r({
        content: i.viewport.scrollWidth,
        viewport: i.viewport.offsetWidth,
        scrollbar: {
          size: s.current.clientWidth,
          paddingStart: gv(a.paddingLeft),
          paddingEnd: gv(a.paddingRight)
        }
      });
    }
  }));
}), Dhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { sizes: n, onSizesChange: r, ...o } = e, i = Yo(Da, e.__scopeScrollArea), [a, l] = b.useState(), s = b.useRef(null), c = Ys(t, s, i.onScrollbarYChange);
  return b.useEffect(() => {
    s.current && l(getComputedStyle(s.current));
  }, [
    s
  ]), /* @__PURE__ */ b.createElement(xB, qt({
    "data-orientation": "vertical"
  }, o, {
    ref: c,
    sizes: n,
    style: {
      top: 0,
      right: i.dir === "ltr" ? 0 : void 0,
      left: i.dir === "rtl" ? 0 : void 0,
      bottom: "var(--radix-scroll-area-corner-height)",
      "--radix-scroll-area-thumb-height": wx(n) + "px",
      ...e.style
    },
    onThumbPointerDown: (p) => e.onThumbPointerDown(p.y),
    onDragScroll: (p) => e.onDragScroll(p.y),
    onWheelScroll: (p, f) => {
      if (i.viewport) {
        const m = i.viewport.scrollTop + p.deltaY;
        e.onWheelScroll(m), OB(m, f) && p.preventDefault();
      }
    },
    onResize: () => {
      s.current && i.viewport && a && r({
        content: i.viewport.scrollHeight,
        viewport: i.viewport.offsetHeight,
        scrollbar: {
          size: s.current.clientHeight,
          paddingStart: gv(a.paddingTop),
          paddingEnd: gv(a.paddingBottom)
        }
      });
    }
  }));
}), [Fhe, wB] = vB(Da), xB = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { __scopeScrollArea: n, sizes: r, hasThumb: o, onThumbChange: i, onThumbPointerUp: a, onThumbPointerDown: l, onThumbPositionChange: s, onDragScroll: c, onWheelScroll: p, onResize: f, ...m } = e, h = Yo(Da, n), [g, v] = b.useState(null), S = Ys(
    t,
    (D) => v(D)
  ), w = b.useRef(null), x = b.useRef(""), k = h.viewport, E = r.content - r.viewport, O = ws(p), C = ws(s), R = xx(f, 10);
  function L(D) {
    if (w.current) {
      const N = D.clientX - w.current.left, H = D.clientY - w.current.top;
      c({
        x: N,
        y: H
      });
    }
  }
  return b.useEffect(() => {
    const D = (N) => {
      const H = N.target;
      g != null && g.contains(H) && O(N, E);
    };
    return document.addEventListener("wheel", D, {
      passive: !1
    }), () => document.removeEventListener("wheel", D, {
      passive: !1
    });
  }, [
    k,
    g,
    E,
    O
  ]), b.useEffect(C, [
    r,
    C
  ]), Rc(g, R), Rc(h.content, R), /* @__PURE__ */ b.createElement(Fhe, {
    scope: n,
    scrollbar: g,
    hasThumb: o,
    onThumbChange: ws(i),
    onThumbPointerUp: ws(a),
    onThumbPositionChange: C,
    onThumbPointerDown: ws(l)
  }, /* @__PURE__ */ b.createElement(zp.div, qt({}, m, {
    ref: S,
    style: {
      position: "absolute",
      ...m.style
    },
    onPointerDown: Is(e.onPointerDown, (D) => {
      D.button === 0 && (D.target.setPointerCapture(D.pointerId), w.current = g.getBoundingClientRect(), x.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", L(D));
    }),
    onPointerMove: Is(e.onPointerMove, L),
    onPointerUp: Is(e.onPointerUp, (D) => {
      const N = D.target;
      N.hasPointerCapture(D.pointerId) && N.releasePointerCapture(D.pointerId), document.body.style.webkitUserSelect = x.current, w.current = null;
    })
  })));
}), WO = "ScrollAreaThumb", Mhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { forceMount: n, ...r } = e, o = wB(WO, e.__scopeScrollArea);
  return /* @__PURE__ */ b.createElement(Lp, {
    present: n || o.hasThumb
  }, /* @__PURE__ */ b.createElement(Bhe, qt({
    ref: t
  }, r)));
}), Bhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { __scopeScrollArea: n, style: r, ...o } = e, i = Yo(WO, n), a = wB(WO, n), { onThumbPositionChange: l } = a, s = Ys(
    t,
    (f) => a.onThumbChange(f)
  ), c = b.useRef(), p = xx(() => {
    c.current && (c.current(), c.current = void 0);
  }, 100);
  return b.useEffect(() => {
    const f = i.viewport;
    if (f) {
      const m = () => {
        if (p(), !c.current) {
          const h = Vhe(f, l);
          c.current = h, l();
        }
      };
      return l(), f.addEventListener("scroll", m), () => f.removeEventListener("scroll", m);
    }
  }, [
    i.viewport,
    p,
    l
  ]), /* @__PURE__ */ b.createElement(zp.div, qt({
    "data-state": a.hasThumb ? "visible" : "hidden"
  }, o, {
    ref: s,
    style: {
      width: "var(--radix-scroll-area-thumb-width)",
      height: "var(--radix-scroll-area-thumb-height)",
      ...r
    },
    onPointerDownCapture: Is(e.onPointerDownCapture, (f) => {
      const m = f.target.getBoundingClientRect(), h = f.clientX - m.left, g = f.clientY - m.top;
      a.onThumbPointerDown({
        x: h,
        y: g
      });
    }),
    onPointerUp: Is(e.onPointerUp, a.onThumbPointerUp)
  }));
}), SB = "ScrollAreaCorner", Uhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const n = Yo(SB, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
  return n.type !== "scroll" && r ? /* @__PURE__ */ b.createElement(Hhe, qt({}, e, {
    ref: t
  })) : null;
}), Hhe = /* @__PURE__ */ b.forwardRef((e, t) => {
  const { __scopeScrollArea: n, ...r } = e, o = Yo(SB, n), [i, a] = b.useState(0), [l, s] = b.useState(0), c = !!(i && l);
  return Rc(o.scrollbarX, () => {
    var p;
    const f = ((p = o.scrollbarX) === null || p === void 0 ? void 0 : p.offsetHeight) || 0;
    o.onCornerHeightChange(f), s(f);
  }), Rc(o.scrollbarY, () => {
    var p;
    const f = ((p = o.scrollbarY) === null || p === void 0 ? void 0 : p.offsetWidth) || 0;
    o.onCornerWidthChange(f), a(f);
  }), c ? /* @__PURE__ */ b.createElement(zp.div, qt({}, r, {
    ref: t,
    style: {
      width: i,
      height: l,
      position: "absolute",
      right: o.dir === "ltr" ? 0 : void 0,
      left: o.dir === "rtl" ? 0 : void 0,
      bottom: 0,
      ...e.style
    }
  })) : null;
});
function gv(e) {
  return e ? parseInt(e, 10) : 0;
}
function kB(e, t) {
  const n = e / t;
  return isNaN(n) ? 0 : n;
}
function wx(e) {
  const t = kB(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
  return Math.max(r, 18);
}
function Whe(e, t, n, r = "ltr") {
  const o = wx(n), i = o / 2, a = t || i, l = o - a, s = n.scrollbar.paddingStart + a, c = n.scrollbar.size - n.scrollbar.paddingEnd - l, p = n.content - n.viewport, f = r === "ltr" ? [
    0,
    p
  ] : [
    p * -1,
    0
  ];
  return _B([
    s,
    c
  ], f)(e);
}
function w$(e, t, n = "ltr") {
  const r = wx(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, i = t.scrollbar.size - o, a = t.content - t.viewport, l = i - r, s = n === "ltr" ? [
    0,
    a
  ] : [
    a * -1,
    0
  ], c = Phe(e, s);
  return _B([
    0,
    a
  ], [
    0,
    l
  ])(c);
}
function _B(e, t) {
  return (n) => {
    if (e[0] === e[1] || t[0] === t[1])
      return t[0];
    const r = (t[1] - t[0]) / (e[1] - e[0]);
    return t[0] + r * (n - e[0]);
  };
}
function OB(e, t) {
  return e > 0 && e < t;
}
const Vhe = (e, t = () => {
}) => {
  let n = {
    left: e.scrollLeft,
    top: e.scrollTop
  }, r = 0;
  return function o() {
    const i = {
      left: e.scrollLeft,
      top: e.scrollTop
    }, a = n.left !== i.left, l = n.top !== i.top;
    (a || l) && t(), n = i, r = window.requestAnimationFrame(o);
  }(), () => window.cancelAnimationFrame(r);
};
function xx(e, t) {
  const n = ws(e), r = b.useRef(0);
  return b.useEffect(
    () => () => window.clearTimeout(r.current),
    []
  ), b.useCallback(() => {
    window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
  }, [
    n,
    t
  ]);
}
function Rc(e, t) {
  const n = ws(t);
  HO(() => {
    let r = 0;
    if (e) {
      const o = new ResizeObserver(() => {
        cancelAnimationFrame(r), r = window.requestAnimationFrame(n);
      });
      return o.observe(e), () => {
        window.cancelAnimationFrame(r), o.unobserve(e);
      };
    }
  }, [
    e,
    n
  ]);
}
const qhe = jhe, Ghe = $he, x$ = Ihe, S$ = Mhe, Khe = Uhe;
var Yhe = Ee((e, { scrollbarSize: t, offsetScrollbars: n, scrollbarHovered: r, hidden: o }) => ({
  root: {
    overflow: "hidden"
  },
  viewport: {
    width: "100%",
    height: "100%",
    paddingRight: n ? F(t) : void 0,
    paddingBottom: n ? F(t) : void 0
  },
  scrollbar: {
    display: o ? "none" : "flex",
    userSelect: "none",
    touchAction: "none",
    boxSizing: "border-box",
    padding: `calc(${F(t)}  / 5)`,
    transition: "background-color 150ms ease, opacity 150ms ease",
    "&:hover": {
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[8] : e.colors.gray[0],
      [`& .${Fi("thumb")}`]: {
        backgroundColor: e.colorScheme === "dark" ? e.fn.rgba(e.white, 0.5) : e.fn.rgba(e.black, 0.5)
      }
    },
    '&[data-orientation="vertical"]': {
      width: F(t)
    },
    '&[data-orientation="horizontal"]': {
      flexDirection: "column",
      height: F(t)
    },
    '&[data-state="hidden"]': {
      display: "none",
      opacity: 0
    }
  },
  thumb: {
    ref: Fi("thumb"),
    flex: 1,
    backgroundColor: e.colorScheme === "dark" ? e.fn.rgba(e.white, 0.4) : e.fn.rgba(e.black, 0.4),
    borderRadius: F(t),
    position: "relative",
    transition: "background-color 150ms ease",
    display: o ? "none" : void 0,
    overflow: "hidden",
    "&::before": {
      content: '""',
      position: "absolute",
      top: "50%",
      left: "50%",
      transform: "translate(-50%, -50%)",
      width: "100%",
      height: "100%",
      minWidth: F(44),
      minHeight: F(44)
    }
  },
  corner: {
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[0],
    transition: "opacity 150ms ease",
    opacity: r ? 1 : 0,
    display: o ? "none" : void 0
  }
})), Xhe = Object.defineProperty, Zhe = Object.defineProperties, Qhe = Object.getOwnPropertyDescriptors, yv = Object.getOwnPropertySymbols, EB = Object.prototype.hasOwnProperty, CB = Object.prototype.propertyIsEnumerable, k$ = (e, t, n) => t in e ? Xhe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, VO = (e, t) => {
  for (var n in t || (t = {}))
    EB.call(t, n) && k$(e, n, t[n]);
  if (yv)
    for (var n of yv(t))
      CB.call(t, n) && k$(e, n, t[n]);
  return e;
}, PB = (e, t) => Zhe(e, Qhe(t)), RB = (e, t) => {
  var n = {};
  for (var r in e)
    EB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && yv)
    for (var r of yv(e))
      t.indexOf(r) < 0 && CB.call(e, r) && (n[r] = e[r]);
  return n;
};
const TB = {
  scrollbarSize: 12,
  scrollHideDelay: 1e3,
  type: "hover",
  offsetScrollbars: !1
}, Sx = b.forwardRef((e, t) => {
  const n = Te("ScrollArea", TB, e), {
    children: r,
    className: o,
    classNames: i,
    styles: a,
    scrollbarSize: l,
    scrollHideDelay: s,
    type: c,
    dir: p,
    offsetScrollbars: f,
    viewportRef: m,
    onScrollPositionChange: h,
    unstyled: g,
    variant: v,
    viewportProps: S
  } = n, w = RB(n, [
    "children",
    "className",
    "classNames",
    "styles",
    "scrollbarSize",
    "scrollHideDelay",
    "type",
    "dir",
    "offsetScrollbars",
    "viewportRef",
    "onScrollPositionChange",
    "unstyled",
    "variant",
    "viewportProps"
  ]), [x, k] = b.useState(!1), E = Yn(), { classes: O, cx: C } = Yhe({ scrollbarSize: l, offsetScrollbars: f, scrollbarHovered: x, hidden: c === "never" }, { name: "ScrollArea", classNames: i, styles: a, unstyled: g, variant: v });
  return /* @__PURE__ */ P.createElement(qhe, {
    type: c === "never" ? "always" : c,
    scrollHideDelay: s,
    dir: p || E.dir,
    ref: t,
    asChild: !0
  }, /* @__PURE__ */ P.createElement(qe, VO({
    className: C(O.root, o)
  }, w), /* @__PURE__ */ P.createElement(Ghe, PB(VO({}, S), {
    className: O.viewport,
    ref: m,
    onScroll: typeof h == "function" ? ({ currentTarget: R }) => h({
      x: R.scrollLeft,
      y: R.scrollTop
    }) : void 0
  }), r), /* @__PURE__ */ P.createElement(x$, {
    orientation: "horizontal",
    className: O.scrollbar,
    forceMount: !0,
    onMouseEnter: () => k(!0),
    onMouseLeave: () => k(!1)
  }, /* @__PURE__ */ P.createElement(S$, {
    className: O.thumb
  })), /* @__PURE__ */ P.createElement(x$, {
    orientation: "vertical",
    className: O.scrollbar,
    forceMount: !0,
    onMouseEnter: () => k(!0),
    onMouseLeave: () => k(!1)
  }, /* @__PURE__ */ P.createElement(S$, {
    className: O.thumb
  })), /* @__PURE__ */ P.createElement(Khe, {
    className: O.corner
  })));
}), jB = b.forwardRef((e, t) => {
  const n = Te("ScrollAreaAutosize", TB, e), {
    children: r,
    classNames: o,
    styles: i,
    scrollbarSize: a,
    scrollHideDelay: l,
    type: s,
    dir: c,
    offsetScrollbars: p,
    viewportRef: f,
    onScrollPositionChange: m,
    unstyled: h,
    sx: g,
    variant: v,
    viewportProps: S
  } = n, w = RB(n, [
    "children",
    "classNames",
    "styles",
    "scrollbarSize",
    "scrollHideDelay",
    "type",
    "dir",
    "offsetScrollbars",
    "viewportRef",
    "onScrollPositionChange",
    "unstyled",
    "sx",
    "variant",
    "viewportProps"
  ]);
  return /* @__PURE__ */ P.createElement(qe, PB(VO({}, w), {
    ref: t,
    sx: [{ display: "flex" }, ...fx(g)]
  }), /* @__PURE__ */ P.createElement(qe, {
    sx: { display: "flex", flexDirection: "column", flex: 1 }
  }, /* @__PURE__ */ P.createElement(Sx, {
    classNames: o,
    styles: i,
    scrollHideDelay: l,
    scrollbarSize: a,
    type: s,
    dir: c,
    offsetScrollbars: p,
    viewportRef: f,
    onScrollPositionChange: m,
    unstyled: h,
    variant: v,
    viewportProps: S
  }, r)));
});
jB.displayName = "@mantine/core/ScrollAreaAutosize";
Sx.displayName = "@mantine/core/ScrollArea";
Sx.Autosize = jB;
const Dp = Sx;
var Jhe = Object.defineProperty, ege = Object.defineProperties, tge = Object.getOwnPropertyDescriptors, vv = Object.getOwnPropertySymbols, NB = Object.prototype.hasOwnProperty, $B = Object.prototype.propertyIsEnumerable, _$ = (e, t, n) => t in e ? Jhe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, O$ = (e, t) => {
  for (var n in t || (t = {}))
    NB.call(t, n) && _$(e, n, t[n]);
  if (vv)
    for (var n of vv(t))
      $B.call(t, n) && _$(e, n, t[n]);
  return e;
}, nge = (e, t) => ege(e, tge(t)), rge = (e, t) => {
  var n = {};
  for (var r in e)
    NB.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && vv)
    for (var r of vv(e))
      t.indexOf(r) < 0 && $B.call(e, r) && (n[r] = e[r]);
  return n;
};
const kx = b.forwardRef((e, t) => {
  var n = e, { style: r } = n, o = rge(n, ["style"]);
  return /* @__PURE__ */ P.createElement(Dp, nge(O$({}, o), {
    style: O$({ width: "100%" }, r),
    viewportProps: { tabIndex: -1 },
    viewportRef: t
  }), o.children);
});
kx.displayName = "@mantine/core/SelectScrollArea";
var oge = Ee(() => ({
  dropdown: {},
  itemsWrapper: {
    padding: F(4),
    display: "flex",
    width: "100%",
    boxSizing: "border-box"
  }
}));
const mi = Math.min, ir = Math.max, bv = Math.round, Eh = Math.floor, Fl = (e) => ({
  x: e,
  y: e
}), ige = {
  left: "right",
  right: "left",
  bottom: "top",
  top: "bottom"
}, age = {
  start: "end",
  end: "start"
};
function qO(e, t, n) {
  return ir(e, mi(t, n));
}
function Ta(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function hi(e) {
  return e.split("-")[0];
}
function of(e) {
  return e.split("-")[1];
}
function mP(e) {
  return e === "x" ? "y" : "x";
}
function hP(e) {
  return e === "y" ? "height" : "width";
}
function Xs(e) {
  return ["top", "bottom"].includes(hi(e)) ? "y" : "x";
}
function gP(e) {
  return mP(Xs(e));
}
function lge(e, t, n) {
  n === void 0 && (n = !1);
  const r = of(e), o = gP(e), i = hP(o);
  let a = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
  return t.reference[i] > t.floating[i] && (a = wv(a)), [a, wv(a)];
}
function sge(e) {
  const t = wv(e);
  return [GO(e), t, GO(t)];
}
function GO(e) {
  return e.replace(/start|end/g, (t) => age[t]);
}
function uge(e, t, n) {
  const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], a = ["bottom", "top"];
  switch (e) {
    case "top":
    case "bottom":
      return n ? t ? o : r : t ? r : o;
    case "left":
    case "right":
      return t ? i : a;
    default:
      return [];
  }
}
function cge(e, t, n, r) {
  const o = of(e);
  let i = uge(hi(e), n === "start", r);
  return o && (i = i.map((a) => a + "-" + o), t && (i = i.concat(i.map(GO)))), i;
}
function wv(e) {
  return e.replace(/left|right|bottom|top/g, (t) => ige[t]);
}
function fge(e) {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...e
  };
}
function yP(e) {
  return typeof e != "number" ? fge(e) : {
    top: e,
    right: e,
    bottom: e,
    left: e
  };
}
function Tc(e) {
  return {
    ...e,
    top: e.y,
    left: e.x,
    right: e.x + e.width,
    bottom: e.y + e.height
  };
}
function E$(e, t, n) {
  let {
    reference: r,
    floating: o
  } = e;
  const i = Xs(t), a = gP(t), l = hP(a), s = hi(t), c = i === "y", p = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, m = r[l] / 2 - o[l] / 2;
  let h;
  switch (s) {
    case "top":
      h = {
        x: p,
        y: r.y - o.height
      };
      break;
    case "bottom":
      h = {
        x: p,
        y: r.y + r.height
      };
      break;
    case "right":
      h = {
        x: r.x + r.width,
        y: f
      };
      break;
    case "left":
      h = {
        x: r.x - o.width,
        y: f
      };
      break;
    default:
      h = {
        x: r.x,
        y: r.y
      };
  }
  switch (of(t)) {
    case "start":
      h[a] -= m * (n && c ? -1 : 1);
      break;
    case "end":
      h[a] += m * (n && c ? -1 : 1);
      break;
  }
  return h;
}
const dge = async (e, t, n) => {
  const {
    placement: r = "bottom",
    strategy: o = "absolute",
    middleware: i = [],
    platform: a
  } = n, l = i.filter(Boolean), s = await (a.isRTL == null ? void 0 : a.isRTL(t));
  let c = await a.getElementRects({
    reference: e,
    floating: t,
    strategy: o
  }), {
    x: p,
    y: f
  } = E$(c, r, s), m = r, h = {}, g = 0;
  for (let v = 0; v < l.length; v++) {
    const {
      name: S,
      fn: w
    } = l[v], {
      x,
      y: k,
      data: E,
      reset: O
    } = await w({
      x: p,
      y: f,
      initialPlacement: r,
      placement: m,
      strategy: o,
      middlewareData: h,
      rects: c,
      platform: a,
      elements: {
        reference: e,
        floating: t
      }
    });
    if (p = x ?? p, f = k ?? f, h = {
      ...h,
      [S]: {
        ...h[S],
        ...E
      }
    }, O && g <= 50) {
      g++, typeof O == "object" && (O.placement && (m = O.placement), O.rects && (c = O.rects === !0 ? await a.getElementRects({
        reference: e,
        floating: t,
        strategy: o
      }) : O.rects), {
        x: p,
        y: f
      } = E$(c, m, s)), v = -1;
      continue;
    }
  }
  return {
    x: p,
    y: f,
    placement: m,
    strategy: o,
    middlewareData: h
  };
};
async function vP(e, t) {
  var n;
  t === void 0 && (t = {});
  const {
    x: r,
    y: o,
    platform: i,
    rects: a,
    elements: l,
    strategy: s
  } = e, {
    boundary: c = "clippingAncestors",
    rootBoundary: p = "viewport",
    elementContext: f = "floating",
    altBoundary: m = !1,
    padding: h = 0
  } = Ta(t, e), g = yP(h), v = l[m ? f === "floating" ? "reference" : "floating" : f], S = Tc(await i.getClippingRect({
    element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
    boundary: c,
    rootBoundary: p,
    strategy: s
  })), w = f === "floating" ? {
    ...a.floating,
    x: r,
    y: o
  } : a.reference, x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), k = await (i.isElement == null ? void 0 : i.isElement(x)) ? await (i.getScale == null ? void 0 : i.getScale(x)) || {
    x: 1,
    y: 1
  } : {
    x: 1,
    y: 1
  }, E = Tc(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
    rect: w,
    offsetParent: x,
    strategy: s
  }) : w);
  return {
    top: (S.top - E.top + g.top) / k.y,
    bottom: (E.bottom - S.bottom + g.bottom) / k.y,
    left: (S.left - E.left + g.left) / k.x,
    right: (E.right - S.right + g.right) / k.x
  };
}
const pge = (e) => ({
  name: "arrow",
  options: e,
  async fn(t) {
    const {
      x: n,
      y: r,
      placement: o,
      rects: i,
      platform: a,
      elements: l,
      middlewareData: s
    } = t, {
      element: c,
      padding: p = 0
    } = Ta(e, t) || {};
    if (c == null)
      return {};
    const f = yP(p), m = {
      x: n,
      y: r
    }, h = gP(o), g = hP(h), v = await a.getDimensions(c), S = h === "y", w = S ? "top" : "left", x = S ? "bottom" : "right", k = S ? "clientHeight" : "clientWidth", E = i.reference[g] + i.reference[h] - m[h] - i.floating[g], O = m[h] - i.reference[h], C = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
    let R = C ? C[k] : 0;
    (!R || !await (a.isElement == null ? void 0 : a.isElement(C))) && (R = l.floating[k] || i.floating[g]);
    const L = E / 2 - O / 2, D = R / 2 - v[g] / 2 - 1, N = mi(f[w], D), H = mi(f[x], D), B = N, K = R - v[g] - H, W = R / 2 - v[g] / 2 + L, U = qO(B, W, K), Q = !s.arrow && of(o) != null && W != U && i.reference[g] / 2 - (W < B ? N : H) - v[g] / 2 < 0, J = Q ? W < B ? W - B : W - K : 0;
    return {
      [h]: m[h] + J,
      data: {
        [h]: U,
        centerOffset: W - U - J,
        ...Q && {
          alignmentOffset: J
        }
      },
      reset: Q
    };
  }
}), mge = function(e) {
  return e === void 0 && (e = {}), {
    name: "flip",
    options: e,
    async fn(t) {
      var n, r;
      const {
        placement: o,
        middlewareData: i,
        rects: a,
        initialPlacement: l,
        platform: s,
        elements: c
      } = t, {
        mainAxis: p = !0,
        crossAxis: f = !0,
        fallbackPlacements: m,
        fallbackStrategy: h = "bestFit",
        fallbackAxisSideDirection: g = "none",
        flipAlignment: v = !0,
        ...S
      } = Ta(e, t);
      if ((n = i.arrow) != null && n.alignmentOffset)
        return {};
      const w = hi(o), x = hi(l) === l, k = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), E = m || (x || !v ? [wv(l)] : sge(l));
      !m && g !== "none" && E.push(...cge(l, v, g, k));
      const O = [l, ...E], C = await vP(t, S), R = [];
      let L = ((r = i.flip) == null ? void 0 : r.overflows) || [];
      if (p && R.push(C[w]), f) {
        const B = lge(o, a, k);
        R.push(C[B[0]], C[B[1]]);
      }
      if (L = [...L, {
        placement: o,
        overflows: R
      }], !R.every((B) => B <= 0)) {
        var D, N;
        const B = (((D = i.flip) == null ? void 0 : D.index) || 0) + 1, K = O[B];
        if (K)
          return {
            data: {
              index: B,
              overflows: L
            },
            reset: {
              placement: K
            }
          };
        let W = (N = L.filter((U) => U.overflows[0] <= 0).sort((U, Q) => U.overflows[1] - Q.overflows[1])[0]) == null ? void 0 : N.placement;
        if (!W)
          switch (h) {
            case "bestFit": {
              var H;
              const U = (H = L.map((Q) => [Q.placement, Q.overflows.filter((J) => J > 0).reduce((J, q) => J + q, 0)]).sort((Q, J) => Q[1] - J[1])[0]) == null ? void 0 : H[0];
              U && (W = U);
              break;
            }
            case "initialPlacement":
              W = l;
              break;
          }
        if (o !== W)
          return {
            reset: {
              placement: W
            }
          };
      }
      return {};
    }
  };
};
function IB(e) {
  const t = mi(...e.map((i) => i.left)), n = mi(...e.map((i) => i.top)), r = ir(...e.map((i) => i.right)), o = ir(...e.map((i) => i.bottom));
  return {
    x: t,
    y: n,
    width: r - t,
    height: o - n
  };
}
function hge(e) {
  const t = e.slice().sort((o, i) => o.y - i.y), n = [];
  let r = null;
  for (let o = 0; o < t.length; o++) {
    const i = t[o];
    !r || i.y - r.y > r.height / 2 ? n.push([i]) : n[n.length - 1].push(i), r = i;
  }
  return n.map((o) => Tc(IB(o)));
}
const gge = function(e) {
  return e === void 0 && (e = {}), {
    name: "inline",
    options: e,
    async fn(t) {
      const {
        placement: n,
        elements: r,
        rects: o,
        platform: i,
        strategy: a
      } = t, {
        padding: l = 2,
        x: s,
        y: c
      } = Ta(e, t), p = Array.from(await (i.getClientRects == null ? void 0 : i.getClientRects(r.reference)) || []), f = hge(p), m = Tc(IB(p)), h = yP(l);
      function g() {
        if (f.length === 2 && f[0].left > f[1].right && s != null && c != null)
          return f.find((S) => s > S.left - h.left && s < S.right + h.right && c > S.top - h.top && c < S.bottom + h.bottom) || m;
        if (f.length >= 2) {
          if (Xs(n) === "y") {
            const N = f[0], H = f[f.length - 1], B = hi(n) === "top", K = N.top, W = H.bottom, U = B ? N.left : H.left, Q = B ? N.right : H.right, J = Q - U, q = W - K;
            return {
              top: K,
              bottom: W,
              left: U,
              right: Q,
              width: J,
              height: q,
              x: U,
              y: K
            };
          }
          const S = hi(n) === "left", w = ir(...f.map((N) => N.right)), x = mi(...f.map((N) => N.left)), k = f.filter((N) => S ? N.left === x : N.right === w), E = k[0].top, O = k[k.length - 1].bottom, C = x, R = w, L = R - C, D = O - E;
          return {
            top: E,
            bottom: O,
            left: C,
            right: R,
            width: L,
            height: D,
            x: C,
            y: E
          };
        }
        return m;
      }
      const v = await i.getElementRects({
        reference: {
          getBoundingClientRect: g
        },
        floating: r.floating,
        strategy: a
      });
      return o.reference.x !== v.reference.x || o.reference.y !== v.reference.y || o.reference.width !== v.reference.width || o.reference.height !== v.reference.height ? {
        reset: {
          rects: v
        }
      } : {};
    }
  };
};
async function yge(e, t) {
  const {
    placement: n,
    platform: r,
    elements: o
  } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = hi(n), l = of(n), s = Xs(n) === "y", c = ["left", "top"].includes(a) ? -1 : 1, p = i && s ? -1 : 1, f = Ta(t, e);
  let {
    mainAxis: m,
    crossAxis: h,
    alignmentAxis: g
  } = typeof f == "number" ? {
    mainAxis: f,
    crossAxis: 0,
    alignmentAxis: null
  } : {
    mainAxis: 0,
    crossAxis: 0,
    alignmentAxis: null,
    ...f
  };
  return l && typeof g == "number" && (h = l === "end" ? g * -1 : g), s ? {
    x: h * p,
    y: m * c
  } : {
    x: m * c,
    y: h * p
  };
}
const AB = function(e) {
  return e === void 0 && (e = 0), {
    name: "offset",
    options: e,
    async fn(t) {
      var n, r;
      const {
        x: o,
        y: i,
        placement: a,
        middlewareData: l
      } = t, s = await yge(t, e);
      return a === ((n = l.offset) == null ? void 0 : n.placement) && (r = l.arrow) != null && r.alignmentOffset ? {} : {
        x: o + s.x,
        y: i + s.y,
        data: {
          ...s,
          placement: a
        }
      };
    }
  };
}, vge = function(e) {
  return e === void 0 && (e = {}), {
    name: "shift",
    options: e,
    async fn(t) {
      const {
        x: n,
        y: r,
        placement: o
      } = t, {
        mainAxis: i = !0,
        crossAxis: a = !1,
        limiter: l = {
          fn: (S) => {
            let {
              x: w,
              y: x
            } = S;
            return {
              x: w,
              y: x
            };
          }
        },
        ...s
      } = Ta(e, t), c = {
        x: n,
        y: r
      }, p = await vP(t, s), f = Xs(hi(o)), m = mP(f);
      let h = c[m], g = c[f];
      if (i) {
        const S = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", x = h + p[S], k = h - p[w];
        h = qO(x, h, k);
      }
      if (a) {
        const S = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", x = g + p[S], k = g - p[w];
        g = qO(x, g, k);
      }
      const v = l.fn({
        ...t,
        [m]: h,
        [f]: g
      });
      return {
        ...v,
        data: {
          x: v.x - n,
          y: v.y - r
        }
      };
    }
  };
}, bge = function(e) {
  return e === void 0 && (e = {}), {
    options: e,
    fn(t) {
      const {
        x: n,
        y: r,
        placement: o,
        rects: i,
        middlewareData: a
      } = t, {
        offset: l = 0,
        mainAxis: s = !0,
        crossAxis: c = !0
      } = Ta(e, t), p = {
        x: n,
        y: r
      }, f = Xs(o), m = mP(f);
      let h = p[m], g = p[f];
      const v = Ta(l, t), S = typeof v == "number" ? {
        mainAxis: v,
        crossAxis: 0
      } : {
        mainAxis: 0,
        crossAxis: 0,
        ...v
      };
      if (s) {
        const k = m === "y" ? "height" : "width", E = i.reference[m] - i.floating[k] + S.mainAxis, O = i.reference[m] + i.reference[k] - S.mainAxis;
        h < E ? h = E : h > O && (h = O);
      }
      if (c) {
        var w, x;
        const k = m === "y" ? "width" : "height", E = ["top", "left"].includes(hi(o)), O = i.reference[f] - i.floating[k] + (E && ((w = a.offset) == null ? void 0 : w[f]) || 0) + (E ? 0 : S.crossAxis), C = i.reference[f] + i.reference[k] + (E ? 0 : ((x = a.offset) == null ? void 0 : x[f]) || 0) - (E ? S.crossAxis : 0);
        g < O ? g = O : g > C && (g = C);
      }
      return {
        [m]: h,
        [f]: g
      };
    }
  };
}, wge = function(e) {
  return e === void 0 && (e = {}), {
    name: "size",
    options: e,
    async fn(t) {
      const {
        placement: n,
        rects: r,
        platform: o,
        elements: i
      } = t, {
        apply: a = () => {
        },
        ...l
      } = Ta(e, t), s = await vP(t, l), c = hi(n), p = of(n), f = Xs(n) === "y", {
        width: m,
        height: h
      } = r.floating;
      let g, v;
      c === "top" || c === "bottom" ? (g = c, v = p === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (v = c, g = p === "end" ? "top" : "bottom");
      const S = h - s[g], w = m - s[v], x = !t.middlewareData.shift;
      let k = S, E = w;
      if (f) {
        const C = m - s.left - s.right;
        E = p || x ? mi(w, C) : C;
      } else {
        const C = h - s.top - s.bottom;
        k = p || x ? mi(S, C) : C;
      }
      if (x && !p) {
        const C = ir(s.left, 0), R = ir(s.right, 0), L = ir(s.top, 0), D = ir(s.bottom, 0);
        f ? E = m - 2 * (C !== 0 || R !== 0 ? C + R : ir(s.left, s.right)) : k = h - 2 * (L !== 0 || D !== 0 ? L + D : ir(s.top, s.bottom));
      }
      await a({
        ...t,
        availableWidth: E,
        availableHeight: k
      });
      const O = await o.getDimensions(i.floating);
      return m !== O.width || h !== O.height ? {
        reset: {
          rects: !0
        }
      } : {};
    }
  };
};
function Ml(e) {
  return zB(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function ho(e) {
  var t;
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function Fa(e) {
  var t;
  return (t = (zB(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
}
function zB(e) {
  return e instanceof Node || e instanceof ho(e).Node;
}
function ja(e) {
  return e instanceof Element || e instanceof ho(e).Element;
}
function Zi(e) {
  return e instanceof HTMLElement || e instanceof ho(e).HTMLElement;
}
function C$(e) {
  return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ho(e).ShadowRoot;
}
function Fp(e) {
  const {
    overflow: t,
    overflowX: n,
    overflowY: r,
    display: o
  } = Vo(e);
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
}
function xge(e) {
  return ["table", "td", "th"].includes(Ml(e));
}
function bP(e) {
  const t = wP(), n = Vo(e);
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
}
function Sge(e) {
  let t = jc(e);
  for (; Zi(t) && !_x(t); ) {
    if (bP(t))
      return t;
    t = jc(t);
  }
  return null;
}
function wP() {
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function _x(e) {
  return ["html", "body", "#document"].includes(Ml(e));
}
function Vo(e) {
  return ho(e).getComputedStyle(e);
}
function Ox(e) {
  return ja(e) ? {
    scrollLeft: e.scrollLeft,
    scrollTop: e.scrollTop
  } : {
    scrollLeft: e.pageXOffset,
    scrollTop: e.pageYOffset
  };
}
function jc(e) {
  if (Ml(e) === "html")
    return e;
  const t = (
    // Step into the shadow DOM of the parent of a slotted node.
    e.assignedSlot || // DOM Element detected.
    e.parentNode || // ShadowRoot detected.
    C$(e) && e.host || // Fallback.
    Fa(e)
  );
  return C$(t) ? t.host : t;
}
function LB(e) {
  const t = jc(e);
  return _x(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Zi(t) && Fp(t) ? t : LB(t);
}
function ka(e, t, n) {
  var r;
  t === void 0 && (t = []), n === void 0 && (n = !0);
  const o = LB(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), a = ho(o);
  return i ? t.concat(a, a.visualViewport || [], Fp(o) ? o : [], a.frameElement && n ? ka(a.frameElement) : []) : t.concat(o, ka(o, [], n));
}
function DB(e) {
  const t = Vo(e);
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
  const o = Zi(e), i = o ? e.offsetWidth : n, a = o ? e.offsetHeight : r, l = bv(n) !== i || bv(r) !== a;
  return l && (n = i, r = a), {
    width: n,
    height: r,
    $: l
  };
}
function xP(e) {
  return ja(e) ? e : e.contextElement;
}
function hc(e) {
  const t = xP(e);
  if (!Zi(t))
    return Fl(1);
  const n = t.getBoundingClientRect(), {
    width: r,
    height: o,
    $: i
  } = DB(t);
  let a = (i ? bv(n.width) : n.width) / r, l = (i ? bv(n.height) : n.height) / o;
  return (!a || !Number.isFinite(a)) && (a = 1), (!l || !Number.isFinite(l)) && (l = 1), {
    x: a,
    y: l
  };
}
const kge = /* @__PURE__ */ Fl(0);
function FB(e) {
  const t = ho(e);
  return !wP() || !t.visualViewport ? kge : {
    x: t.visualViewport.offsetLeft,
    y: t.visualViewport.offsetTop
  };
}
function _ge(e, t, n) {
  return t === void 0 && (t = !1), !n || t && n !== ho(e) ? !1 : t;
}
function Us(e, t, n, r) {
  t === void 0 && (t = !1), n === void 0 && (n = !1);
  const o = e.getBoundingClientRect(), i = xP(e);
  let a = Fl(1);
  t && (r ? ja(r) && (a = hc(r)) : a = hc(e));
  const l = _ge(i, n, r) ? FB(i) : Fl(0);
  let s = (o.left + l.x) / a.x, c = (o.top + l.y) / a.y, p = o.width / a.x, f = o.height / a.y;
  if (i) {
    const m = ho(i), h = r && ja(r) ? ho(r) : r;
    let g = m.frameElement;
    for (; g && r && h !== m; ) {
      const v = hc(g), S = g.getBoundingClientRect(), w = Vo(g), x = S.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, k = S.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y;
      s *= v.x, c *= v.y, p *= v.x, f *= v.y, s += x, c += k, g = ho(g).frameElement;
    }
  }
  return Tc({
    width: p,
    height: f,
    x: s,
    y: c
  });
}
function Oge(e) {
  let {
    rect: t,
    offsetParent: n,
    strategy: r
  } = e;
  const o = Zi(n), i = Fa(n);
  if (n === i)
    return t;
  let a = {
    scrollLeft: 0,
    scrollTop: 0
  }, l = Fl(1);
  const s = Fl(0);
  if ((o || !o && r !== "fixed") && ((Ml(n) !== "body" || Fp(i)) && (a = Ox(n)), Zi(n))) {
    const c = Us(n);
    l = hc(n), s.x = c.x + n.clientLeft, s.y = c.y + n.clientTop;
  }
  return {
    width: t.width * l.x,
    height: t.height * l.y,
    x: t.x * l.x - a.scrollLeft * l.x + s.x,
    y: t.y * l.y - a.scrollTop * l.y + s.y
  };
}
function Ege(e) {
  return Array.from(e.getClientRects());
}
function MB(e) {
  return Us(Fa(e)).left + Ox(e).scrollLeft;
}
function Cge(e) {
  const t = Fa(e), n = Ox(e), r = e.ownerDocument.body, o = ir(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = ir(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
  let a = -n.scrollLeft + MB(e);
  const l = -n.scrollTop;
  return Vo(r).direction === "rtl" && (a += ir(t.clientWidth, r.clientWidth) - o), {
    width: o,
    height: i,
    x: a,
    y: l
  };
}
function Pge(e, t) {
  const n = ho(e), r = Fa(e), o = n.visualViewport;
  let i = r.clientWidth, a = r.clientHeight, l = 0, s = 0;
  if (o) {
    i = o.width, a = o.height;
    const c = wP();
    (!c || c && t === "fixed") && (l = o.offsetLeft, s = o.offsetTop);
  }
  return {
    width: i,
    height: a,
    x: l,
    y: s
  };
}
function Rge(e, t) {
  const n = Us(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Zi(e) ? hc(e) : Fl(1), a = e.clientWidth * i.x, l = e.clientHeight * i.y, s = o * i.x, c = r * i.y;
  return {
    width: a,
    height: l,
    x: s,
    y: c
  };
}
function P$(e, t, n) {
  let r;
  if (t === "viewport")
    r = Pge(e, n);
  else if (t === "document")
    r = Cge(Fa(e));
  else if (ja(t))
    r = Rge(t, n);
  else {
    const o = FB(e);
    r = {
      ...t,
      x: t.x - o.x,
      y: t.y - o.y
    };
  }
  return Tc(r);
}
function BB(e, t) {
  const n = jc(e);
  return n === t || !ja(n) || _x(n) ? !1 : Vo(n).position === "fixed" || BB(n, t);
}
function Tge(e, t) {
  const n = t.get(e);
  if (n)
    return n;
  let r = ka(e, [], !1).filter((l) => ja(l) && Ml(l) !== "body"), o = null;
  const i = Vo(e).position === "fixed";
  let a = i ? jc(e) : e;
  for (; ja(a) && !_x(a); ) {
    const l = Vo(a), s = bP(a);
    !s && l.position === "fixed" && (o = null), (i ? !s && !o : !s && l.position === "static" && o && ["absolute", "fixed"].includes(o.position) || Fp(a) && !s && BB(e, a)) ? r = r.filter((c) => c !== a) : o = l, a = jc(a);
  }
  return t.set(e, r), r;
}
function jge(e) {
  let {
    element: t,
    boundary: n,
    rootBoundary: r,
    strategy: o
  } = e;
  const i = [...n === "clippingAncestors" ? Tge(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((s, c) => {
    const p = P$(t, c, o);
    return s.top = ir(p.top, s.top), s.right = mi(p.right, s.right), s.bottom = mi(p.bottom, s.bottom), s.left = ir(p.left, s.left), s;
  }, P$(t, a, o));
  return {
    width: l.right - l.left,
    height: l.bottom - l.top,
    x: l.left,
    y: l.top
  };
}
function Nge(e) {
  const {
    width: t,
    height: n
  } = DB(e);
  return {
    width: t,
    height: n
  };
}
function $ge(e, t, n) {
  const r = Zi(t), o = Fa(t), i = n === "fixed", a = Us(e, !0, i, t);
  let l = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const s = Fl(0);
  if (r || !r && !i)
    if ((Ml(t) !== "body" || Fp(o)) && (l = Ox(t)), r) {
      const c = Us(t, !0, i, t);
      s.x = c.x + t.clientLeft, s.y = c.y + t.clientTop;
    } else
      o && (s.x = MB(o));
  return {
    x: a.left + l.scrollLeft - s.x,
    y: a.top + l.scrollTop - s.y,
    width: a.width,
    height: a.height
  };
}
function R$(e, t) {
  return !Zi(e) || Vo(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
}
function UB(e, t) {
  const n = ho(e);
  if (!Zi(e))
    return n;
  let r = R$(e, t);
  for (; r && xge(r) && Vo(r).position === "static"; )
    r = R$(r, t);
  return r && (Ml(r) === "html" || Ml(r) === "body" && Vo(r).position === "static" && !bP(r)) ? n : r || Sge(e) || n;
}
const Ige = async function(e) {
  let {
    reference: t,
    floating: n,
    strategy: r
  } = e;
  const o = this.getOffsetParent || UB, i = this.getDimensions;
  return {
    reference: $ge(t, await o(n), r),
    floating: {
      x: 0,
      y: 0,
      ...await i(n)
    }
  };
};
function Age(e) {
  return Vo(e).direction === "rtl";
}
const zge = {
  convertOffsetParentRelativeRectToViewportRelativeRect: Oge,
  getDocumentElement: Fa,
  getClippingRect: jge,
  getOffsetParent: UB,
  getElementRects: Ige,
  getClientRects: Ege,
  getDimensions: Nge,
  getScale: hc,
  isElement: ja,
  isRTL: Age
};
function Lge(e, t) {
  let n = null, r;
  const o = Fa(e);
  function i() {
    clearTimeout(r), n && n.disconnect(), n = null;
  }
  function a(l, s) {
    l === void 0 && (l = !1), s === void 0 && (s = 1), i();
    const {
      left: c,
      top: p,
      width: f,
      height: m
    } = e.getBoundingClientRect();
    if (l || t(), !f || !m)
      return;
    const h = Eh(p), g = Eh(o.clientWidth - (c + f)), v = Eh(o.clientHeight - (p + m)), S = Eh(c), w = {
      rootMargin: -h + "px " + -g + "px " + -v + "px " + -S + "px",
      threshold: ir(0, mi(1, s)) || 1
    };
    let x = !0;
    function k(E) {
      const O = E[0].intersectionRatio;
      if (O !== s) {
        if (!x)
          return a();
        O ? a(!1, O) : r = setTimeout(() => {
          a(!1, 1e-7);
        }, 100);
      }
      x = !1;
    }
    try {
      n = new IntersectionObserver(k, {
        ...w,
        // Handle <iframe>s
        root: o.ownerDocument
      });
    } catch {
      n = new IntersectionObserver(k, w);
    }
    n.observe(e);
  }
  return a(!0), i;
}
function Dge(e, t, n, r) {
  r === void 0 && (r = {});
  const {
    ancestorScroll: o = !0,
    ancestorResize: i = !0,
    elementResize: a = typeof ResizeObserver == "function",
    layoutShift: l = typeof IntersectionObserver == "function",
    animationFrame: s = !1
  } = r, c = xP(e), p = o || i ? [...c ? ka(c) : [], ...ka(t)] : [];
  p.forEach((w) => {
    o && w.addEventListener("scroll", n, {
      passive: !0
    }), i && w.addEventListener("resize", n);
  });
  const f = c && l ? Lge(c, n) : null;
  let m = -1, h = null;
  a && (h = new ResizeObserver((w) => {
    let [x] = w;
    x && x.target === c && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
      h && h.observe(t);
    })), n();
  }), c && !s && h.observe(c), h.observe(t));
  let g, v = s ? Us(e) : null;
  s && S();
  function S() {
    const w = Us(e);
    v && (w.x !== v.x || w.y !== v.y || w.width !== v.width || w.height !== v.height) && n(), v = w, g = requestAnimationFrame(S);
  }
  return n(), () => {
    p.forEach((w) => {
      o && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
    }), f && f(), h && h.disconnect(), h = null, s && cancelAnimationFrame(g);
  };
}
const SP = vge, HB = mge, Fge = wge, T$ = pge, WB = gge, Mge = bge, Bge = (e, t, n) => {
  const r = /* @__PURE__ */ new Map(), o = {
    platform: zge,
    ...n
  }, i = {
    ...o.platform,
    _c: r
  };
  return dge(e, t, {
    ...o,
    platform: i
  });
}, VB = (e) => {
  const {
    element: t,
    padding: n
  } = e;
  function r(o) {
    return Object.prototype.hasOwnProperty.call(o, "current");
  }
  return {
    name: "arrow",
    options: e,
    fn(o) {
      return r(t) ? t.current != null ? T$({
        element: t.current,
        padding: n
      }).fn(o) : {} : t ? T$({
        element: t,
        padding: n
      }).fn(o) : {};
    }
  };
};
var Wg = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
function xv(e, t) {
  if (e === t)
    return !0;
  if (typeof e != typeof t)
    return !1;
  if (typeof e == "function" && e.toString() === t.toString())
    return !0;
  let n, r, o;
  if (e && t && typeof e == "object") {
    if (Array.isArray(e)) {
      if (n = e.length, n != t.length)
        return !1;
      for (r = n; r-- !== 0; )
        if (!xv(e[r], t[r]))
          return !1;
      return !0;
    }
    if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
      return !1;
    for (r = n; r-- !== 0; )
      if (!Object.prototype.hasOwnProperty.call(t, o[r]))
        return !1;
    for (r = n; r-- !== 0; ) {
      const i = o[r];
      if (!(i === "_owner" && e.$$typeof) && !xv(e[i], t[i]))
        return !1;
    }
    return !0;
  }
  return e !== e && t !== t;
}
function j$(e) {
  const t = b.useRef(e);
  return Wg(() => {
    t.current = e;
  }), t;
}
function Uge(e) {
  e === void 0 && (e = {});
  const {
    placement: t = "bottom",
    strategy: n = "absolute",
    middleware: r = [],
    platform: o,
    whileElementsMounted: i,
    open: a
  } = e, [l, s] = b.useState({
    x: null,
    y: null,
    strategy: n,
    placement: t,
    middlewareData: {},
    isPositioned: !1
  }), [c, p] = b.useState(r);
  xv(c, r) || p(r);
  const f = b.useRef(null), m = b.useRef(null), h = b.useRef(l), g = j$(i), v = j$(o), [S, w] = b.useState(null), [x, k] = b.useState(null), E = b.useCallback((N) => {
    f.current !== N && (f.current = N, w(N));
  }, []), O = b.useCallback((N) => {
    m.current !== N && (m.current = N, k(N));
  }, []), C = b.useCallback(() => {
    if (!f.current || !m.current)
      return;
    const N = {
      placement: t,
      strategy: n,
      middleware: c
    };
    v.current && (N.platform = v.current), Bge(f.current, m.current, N).then((H) => {
      const B = {
        ...H,
        isPositioned: !0
      };
      R.current && !xv(h.current, B) && (h.current = B, La.flushSync(() => {
        s(B);
      }));
    });
  }, [c, t, n, v]);
  Wg(() => {
    a === !1 && h.current.isPositioned && (h.current.isPositioned = !1, s((N) => ({
      ...N,
      isPositioned: !1
    })));
  }, [a]);
  const R = b.useRef(!1);
  Wg(() => (R.current = !0, () => {
    R.current = !1;
  }), []), Wg(() => {
    if (S && x) {
      if (g.current)
        return g.current(S, x, C);
      C();
    }
  }, [S, x, C, g]);
  const L = b.useMemo(() => ({
    reference: f,
    floating: m,
    setReference: E,
    setFloating: O
  }), [E, O]), D = b.useMemo(() => ({
    reference: S,
    floating: x
  }), [S, x]);
  return b.useMemo(() => ({
    ...l,
    update: C,
    refs: L,
    elements: D,
    reference: E,
    floating: O
  }), [l, C, L, D, E, O]);
}
var Nc = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
let p_ = !1, Hge = 0;
const N$ = () => "floating-ui-" + Hge++;
function Wge() {
  const [e, t] = b.useState(() => p_ ? N$() : void 0);
  return Nc(() => {
    e == null && t(N$());
  }, []), b.useEffect(() => {
    p_ || (p_ = !0);
  }, []), e;
}
const Vge = b.useId, $$ = Vge || Wge;
function qge() {
  const e = /* @__PURE__ */ new Map();
  return {
    emit(t, n) {
      var r;
      (r = e.get(t)) == null || r.forEach((o) => o(n));
    },
    on(t, n) {
      e.set(t, [...e.get(t) || [], n]);
    },
    off(t, n) {
      e.set(t, (e.get(t) || []).filter((r) => r !== n));
    }
  };
}
const Gge = /* @__PURE__ */ b.createContext(null), Kge = /* @__PURE__ */ b.createContext(null), qB = () => {
  var e;
  return ((e = b.useContext(Gge)) == null ? void 0 : e.id) || null;
}, kP = () => b.useContext(Kge);
function Sl(e) {
  return (e == null ? void 0 : e.ownerDocument) || document;
}
function Yge() {
  const e = navigator.userAgentData;
  return e != null && e.platform ? e.platform : navigator.platform;
}
function Xge() {
  const e = navigator.userAgentData;
  return e && Array.isArray(e.brands) ? e.brands.map((t) => {
    let {
      brand: n,
      version: r
    } = t;
    return n + "/" + r;
  }).join(" ") : navigator.userAgent;
}
function _P(e) {
  return Sl(e).defaultView || window;
}
function Ui(e) {
  return e ? e instanceof _P(e).Element : !1;
}
function GB(e) {
  return e ? e instanceof _P(e).HTMLElement : !1;
}
function Zge(e) {
  if (typeof ShadowRoot > "u")
    return !1;
  const t = _P(e).ShadowRoot;
  return e instanceof t || e instanceof ShadowRoot;
}
function Qge(e) {
  if (e.mozInputSource === 0 && e.isTrusted)
    return !0;
  const t = /Android/i;
  return (t.test(Yge()) || t.test(Xge())) && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
}
function Jge(e) {
  return e.width === 0 && e.height === 0 || e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType !== "mouse" || // iOS VoiceOver returns 0.333• for width/height.
  e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0;
}
function KB(e, t) {
  const n = ["mouse", "pen"];
  return t || n.push("", void 0), n.includes(e);
}
function I$(e) {
  const t = b.useRef(e);
  return Nc(() => {
    t.current = e;
  }), t;
}
const A$ = "data-floating-ui-safe-polygon";
function Vg(e, t, n) {
  return n && !KB(n) ? 0 : typeof e == "number" ? e : e == null ? void 0 : e[t];
}
const eye = function(e, t) {
  let {
    enabled: n = !0,
    delay: r = 0,
    handleClose: o = null,
    mouseOnly: i = !1,
    restMs: a = 0,
    move: l = !0
  } = t === void 0 ? {} : t;
  const {
    open: s,
    onOpenChange: c,
    dataRef: p,
    events: f,
    elements: {
      domReference: m,
      floating: h
    },
    refs: g
  } = e, v = kP(), S = qB(), w = I$(o), x = I$(r), k = b.useRef(), E = b.useRef(), O = b.useRef(), C = b.useRef(), R = b.useRef(!0), L = b.useRef(!1), D = b.useRef(() => {
  }), N = b.useCallback(() => {
    var W;
    const U = (W = p.current.openEvent) == null ? void 0 : W.type;
    return (U == null ? void 0 : U.includes("mouse")) && U !== "mousedown";
  }, [p]);
  b.useEffect(() => {
    if (!n)
      return;
    function W() {
      clearTimeout(E.current), clearTimeout(C.current), R.current = !0;
    }
    return f.on("dismiss", W), () => {
      f.off("dismiss", W);
    };
  }, [n, f]), b.useEffect(() => {
    if (!n || !w.current || !s)
      return;
    function W() {
      N() && c(!1);
    }
    const U = Sl(h).documentElement;
    return U.addEventListener("mouseleave", W), () => {
      U.removeEventListener("mouseleave", W);
    };
  }, [h, s, c, n, w, p, N]);
  const H = b.useCallback(function(W) {
    W === void 0 && (W = !0);
    const U = Vg(x.current, "close", k.current);
    U && !O.current ? (clearTimeout(E.current), E.current = setTimeout(() => c(!1), U)) : W && (clearTimeout(E.current), c(!1));
  }, [x, c]), B = b.useCallback(() => {
    D.current(), O.current = void 0;
  }, []), K = b.useCallback(() => {
    if (L.current) {
      const W = Sl(g.floating.current).body;
      W.style.pointerEvents = "", W.removeAttribute(A$), L.current = !1;
    }
  }, [g]);
  return b.useEffect(() => {
    if (!n)
      return;
    function W() {
      return p.current.openEvent ? ["click", "mousedown"].includes(p.current.openEvent.type) : !1;
    }
    function U(q) {
      if (clearTimeout(E.current), R.current = !1, i && !KB(k.current) || a > 0 && Vg(x.current, "open") === 0)
        return;
      p.current.openEvent = q;
      const ee = Vg(x.current, "open", k.current);
      ee ? E.current = setTimeout(() => {
        c(!0);
      }, ee) : c(!0);
    }
    function Q(q) {
      if (W())
        return;
      D.current();
      const ee = Sl(h);
      if (clearTimeout(C.current), w.current) {
        s || clearTimeout(E.current), O.current = w.current({
          ...e,
          tree: v,
          x: q.clientX,
          y: q.clientY,
          onClose() {
            K(), B(), H();
          }
        });
        const A = O.current;
        ee.addEventListener("mousemove", A), D.current = () => {
          ee.removeEventListener("mousemove", A);
        };
        return;
      }
      H();
    }
    function J(q) {
      W() || w.current == null || w.current({
        ...e,
        tree: v,
        x: q.clientX,
        y: q.clientY,
        onClose() {
          K(), B(), H();
        }
      })(q);
    }
    if (Ui(m)) {
      const q = m;
      return s && q.addEventListener("mouseleave", J), h == null || h.addEventListener("mouseleave", J), l && q.addEventListener("mousemove", U, {
        once: !0
      }), q.addEventListener("mouseenter", U), q.addEventListener("mouseleave", Q), () => {
        s && q.removeEventListener("mouseleave", J), h == null || h.removeEventListener("mouseleave", J), l && q.removeEventListener("mousemove", U), q.removeEventListener("mouseenter", U), q.removeEventListener("mouseleave", Q);
      };
    }
  }, [m, h, n, e, i, a, l, H, B, K, c, s, v, x, w, p]), Nc(() => {
    var W;
    if (n && s && (W = w.current) != null && W.__options.blockPointerEvents && N()) {
      const J = Sl(h).body;
      if (J.setAttribute(A$, ""), J.style.pointerEvents = "none", L.current = !0, Ui(m) && h) {
        var U, Q;
        const q = m, ee = v == null || (U = v.nodesRef.current.find((A) => A.id === S)) == null || (Q = U.context) == null ? void 0 : Q.elements.floating;
        return ee && (ee.style.pointerEvents = ""), q.style.pointerEvents = "auto", h.style.pointerEvents = "auto", () => {
          q.style.pointerEvents = "", h.style.pointerEvents = "";
        };
      }
    }
  }, [n, s, S, h, m, v, w, p, N]), Nc(() => {
    s || (k.current = void 0, B(), K());
  }, [s, B, K]), b.useEffect(() => () => {
    B(), clearTimeout(E.current), clearTimeout(C.current), K();
  }, [n, B, K]), b.useMemo(() => {
    if (!n)
      return {};
    function W(U) {
      k.current = U.pointerType;
    }
    return {
      reference: {
        onPointerDown: W,
        onPointerEnter: W,
        onMouseMove() {
          s || a === 0 || (clearTimeout(C.current), C.current = setTimeout(() => {
            R.current || c(!0);
          }, a));
        }
      },
      floating: {
        onMouseEnter() {
          clearTimeout(E.current);
        },
        onMouseLeave() {
          f.emit("dismiss", {
            type: "mouseLeave",
            data: {
              returnFocus: !1
            }
          }), H(!1);
        }
      }
    };
  }, [f, n, a, s, c, H]);
}, YB = /* @__PURE__ */ b.createContext({
  delay: 0,
  initialDelay: 0,
  timeoutMs: 0,
  currentId: null,
  setCurrentId: () => {
  },
  setState: () => {
  },
  isInstantPhase: !1
}), XB = () => b.useContext(YB), tye = (e) => {
  let {
    children: t,
    delay: n,
    timeoutMs: r = 0
  } = e;
  const [o, i] = b.useReducer((s, c) => ({
    ...s,
    ...c
  }), {
    delay: n,
    timeoutMs: r,
    initialDelay: n,
    currentId: null,
    isInstantPhase: !1
  }), a = b.useRef(null), l = b.useCallback((s) => {
    i({
      currentId: s
    });
  }, []);
  return Nc(() => {
    o.currentId ? a.current === null ? a.current = o.currentId : i({
      isInstantPhase: !0
    }) : (i({
      isInstantPhase: !1
    }), a.current = null);
  }, [o.currentId]), /* @__PURE__ */ b.createElement(YB.Provider, {
    value: b.useMemo(() => ({
      ...o,
      setState: i,
      setCurrentId: l
    }), [o, i, l])
  }, t);
}, nye = (e, t) => {
  let {
    open: n,
    onOpenChange: r
  } = e, {
    id: o
  } = t;
  const {
    currentId: i,
    setCurrentId: a,
    initialDelay: l,
    setState: s,
    timeoutMs: c
  } = XB();
  b.useEffect(() => {
    i && (s({
      delay: {
        open: 1,
        close: Vg(l, "close")
      }
    }), i !== o && r(!1));
  }, [o, r, s, i, l]), b.useEffect(() => {
    function p() {
      r(!1), s({
        delay: l,
        currentId: null
      });
    }
    if (!n && i === o)
      if (c) {
        const f = window.setTimeout(p, c);
        return () => {
          clearTimeout(f);
        };
      } else
        p();
  }, [n, s, i, o, r, l, c]), b.useEffect(() => {
    n && a(o);
  }, [n, a, o]);
};
function rye(e) {
  let t = e.activeElement;
  for (; ((n = t) == null || (r = n.shadowRoot) == null ? void 0 : r.activeElement) != null; ) {
    var n, r;
    t = t.shadowRoot.activeElement;
  }
  return t;
}
function z$(e, t) {
  if (!e || !t)
    return !1;
  const n = t.getRootNode && t.getRootNode();
  if (e.contains(t))
    return !0;
  if (n && Zge(n)) {
    let r = t;
    do {
      if (r && e === r)
        return !0;
      r = r.parentNode || r.host;
    } while (r);
  }
  return !1;
}
function m_(e, t) {
  let n = e.filter((o) => {
    var i;
    return o.parentId === t && ((i = o.context) == null ? void 0 : i.open);
  }) || [], r = n;
  for (; r.length; )
    r = e.filter((o) => {
      var i;
      return (i = r) == null ? void 0 : i.some((a) => {
        var l;
        return o.parentId === a.id && ((l = o.context) == null ? void 0 : l.open);
      });
    }) || [], n = n.concat(r);
  return n;
}
function oye(e) {
  return "composedPath" in e ? e.composedPath()[0] : e.target;
}
const iye = b.useInsertionEffect, aye = iye || ((e) => e());
function ZB(e) {
  const t = b.useRef(() => {
  });
  return aye(() => {
    t.current = e;
  }), b.useCallback(function() {
    for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
      r[o] = arguments[o];
    return t.current == null ? void 0 : t.current(...r);
  }, []);
}
function qg(e, t) {
  if (t == null)
    return !1;
  if ("composedPath" in e)
    return e.composedPath().includes(t);
  const n = e;
  return n.target != null && t.contains(n.target);
}
const lye = {
  pointerdown: "onPointerDown",
  mousedown: "onMouseDown",
  click: "onClick"
}, sye = {
  pointerdown: "onPointerDownCapture",
  mousedown: "onMouseDownCapture",
  click: "onClickCapture"
}, uye = function(e) {
  var t, n;
  return e === void 0 && (e = !0), {
    escapeKeyBubbles: typeof e == "boolean" ? e : (t = e.escapeKey) != null ? t : !0,
    outsidePressBubbles: typeof e == "boolean" ? e : (n = e.outsidePress) != null ? n : !0
  };
}, cye = function(e, t) {
  let {
    open: n,
    onOpenChange: r,
    events: o,
    nodeId: i,
    elements: {
      reference: a,
      domReference: l,
      floating: s
    },
    dataRef: c
  } = e, {
    enabled: p = !0,
    escapeKey: f = !0,
    outsidePress: m = !0,
    outsidePressEvent: h = "pointerdown",
    referencePress: g = !1,
    referencePressEvent: v = "pointerdown",
    ancestorScroll: S = !1,
    bubbles: w = !0
  } = t === void 0 ? {} : t;
  const x = kP(), k = qB() != null, E = ZB(typeof m == "function" ? m : () => !1), O = typeof m == "function" ? E : m, C = b.useRef(!1), {
    escapeKeyBubbles: R,
    outsidePressBubbles: L
  } = uye(w);
  return b.useEffect(() => {
    if (!n || !p)
      return;
    c.current.__escapeKeyBubbles = R, c.current.__outsidePressBubbles = L;
    function D(W) {
      if (W.key === "Escape") {
        const U = x ? m_(x.nodesRef.current, i) : [];
        if (U.length > 0) {
          let Q = !0;
          if (U.forEach((J) => {
            var q;
            if ((q = J.context) != null && q.open && !J.context.dataRef.current.__escapeKeyBubbles) {
              Q = !1;
              return;
            }
          }), !Q)
            return;
        }
        o.emit("dismiss", {
          type: "escapeKey",
          data: {
            returnFocus: {
              preventScroll: !1
            }
          }
        }), r(!1);
      }
    }
    function N(W) {
      const U = C.current;
      if (C.current = !1, U || typeof O == "function" && !O(W))
        return;
      const Q = oye(W);
      if (GB(Q) && s) {
        const ee = s.ownerDocument.defaultView || window, A = Q.scrollWidth > Q.clientWidth, X = Q.scrollHeight > Q.clientHeight;
        let ie = X && W.offsetX > Q.clientWidth;
        if (X && ee.getComputedStyle(Q).direction === "rtl" && (ie = W.offsetX <= Q.offsetWidth - Q.clientWidth), ie || A && W.offsetY > Q.clientHeight)
          return;
      }
      const J = x && m_(x.nodesRef.current, i).some((ee) => {
        var A;
        return qg(W, (A = ee.context) == null ? void 0 : A.elements.floating);
      });
      if (qg(W, s) || qg(W, l) || J)
        return;
      const q = x ? m_(x.nodesRef.current, i) : [];
      if (q.length > 0) {
        let ee = !0;
        if (q.forEach((A) => {
          var X;
          if ((X = A.context) != null && X.open && !A.context.dataRef.current.__outsidePressBubbles) {
            ee = !1;
            return;
          }
        }), !ee)
          return;
      }
      o.emit("dismiss", {
        type: "outsidePress",
        data: {
          returnFocus: k ? {
            preventScroll: !0
          } : Qge(W) || Jge(W)
        }
      }), r(!1);
    }
    function H() {
      r(!1);
    }
    const B = Sl(s);
    f && B.addEventListener("keydown", D), O && B.addEventListener(h, N);
    let K = [];
    return S && (Ui(l) && (K = ka(l)), Ui(s) && (K = K.concat(ka(s))), !Ui(a) && a && a.contextElement && (K = K.concat(ka(a.contextElement)))), K = K.filter((W) => {
      var U;
      return W !== ((U = B.defaultView) == null ? void 0 : U.visualViewport);
    }), K.forEach((W) => {
      W.addEventListener("scroll", H, {
        passive: !0
      });
    }), () => {
      f && B.removeEventListener("keydown", D), O && B.removeEventListener(h, N), K.forEach((W) => {
        W.removeEventListener("scroll", H);
      });
    };
  }, [c, s, l, a, f, O, h, o, x, i, n, r, S, p, R, L, k]), b.useEffect(() => {
    C.current = !1;
  }, [O, h]), b.useMemo(() => p ? {
    reference: {
      [lye[v]]: () => {
        g && (o.emit("dismiss", {
          type: "referencePress",
          data: {
            returnFocus: !1
          }
        }), r(!1));
      }
    },
    floating: {
      [sye[h]]: () => {
        C.current = !0;
      }
    }
  } : {}, [p, o, g, h, v, r]);
}, fye = function(e, t) {
  let {
    open: n,
    onOpenChange: r,
    dataRef: o,
    events: i,
    refs: a,
    elements: {
      floating: l,
      domReference: s
    }
  } = e, {
    enabled: c = !0,
    keyboardOnly: p = !0
  } = t === void 0 ? {} : t;
  const f = b.useRef(""), m = b.useRef(!1), h = b.useRef();
  return b.useEffect(() => {
    if (!c)
      return;
    const g = Sl(l).defaultView || window;
    function v() {
      !n && GB(s) && s === rye(Sl(s)) && (m.current = !0);
    }
    return g.addEventListener("blur", v), () => {
      g.removeEventListener("blur", v);
    };
  }, [l, s, n, c]), b.useEffect(() => {
    if (!c)
      return;
    function g(v) {
      (v.type === "referencePress" || v.type === "escapeKey") && (m.current = !0);
    }
    return i.on("dismiss", g), () => {
      i.off("dismiss", g);
    };
  }, [i, c]), b.useEffect(() => () => {
    clearTimeout(h.current);
  }, []), b.useMemo(() => c ? {
    reference: {
      onPointerDown(g) {
        let {
          pointerType: v
        } = g;
        f.current = v, m.current = !!(v && p);
      },
      onMouseLeave() {
        m.current = !1;
      },
      onFocus(g) {
        var v;
        m.current || g.type === "focus" && ((v = o.current.openEvent) == null ? void 0 : v.type) === "mousedown" && o.current.openEvent && qg(o.current.openEvent, s) || (o.current.openEvent = g.nativeEvent, r(!0));
      },
      onBlur(g) {
        m.current = !1;
        const v = g.relatedTarget, S = Ui(v) && v.hasAttribute("data-floating-ui-focus-guard") && v.getAttribute("data-type") === "outside";
        h.current = setTimeout(() => {
          z$(a.floating.current, v) || z$(s, v) || S || r(!1);
        });
      }
    }
  } : {}, [c, p, s, a, o, r]);
}, dye = function(e, t) {
  let {
    open: n
  } = e, {
    enabled: r = !0,
    role: o = "dialog"
  } = t === void 0 ? {} : t;
  const i = $$(), a = $$();
  return b.useMemo(() => {
    const l = {
      id: i,
      role: o
    };
    return r ? o === "tooltip" ? {
      reference: {
        "aria-describedby": n ? i : void 0
      },
      floating: l
    } : {
      reference: {
        "aria-expanded": n ? "true" : "false",
        "aria-haspopup": o === "alertdialog" ? "dialog" : o,
        "aria-controls": n ? i : void 0,
        ...o === "listbox" && {
          role: "combobox"
        },
        ...o === "menu" && {
          id: a
        }
      },
      floating: {
        ...l,
        ...o === "menu" && {
          "aria-labelledby": a
        }
      }
    } : {};
  }, [r, o, n, i, a]);
};
function OP(e) {
  e === void 0 && (e = {});
  const {
    open: t = !1,
    onOpenChange: n,
    nodeId: r
  } = e, o = Uge(e), i = kP(), a = b.useRef(null), l = b.useRef({}), s = b.useState(() => qge())[0], [c, p] = b.useState(null), f = b.useCallback((w) => {
    const x = Ui(w) ? {
      getBoundingClientRect: () => w.getBoundingClientRect(),
      contextElement: w
    } : w;
    o.refs.setReference(x);
  }, [o.refs]), m = b.useCallback((w) => {
    (Ui(w) || w === null) && (a.current = w, p(w)), (Ui(o.refs.reference.current) || o.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
    // `null` to support `positionReference` + an unstable `reference`
    // callback ref.
    w !== null && !Ui(w)) && o.refs.setReference(w);
  }, [o.refs]), h = b.useMemo(() => ({
    ...o.refs,
    setReference: m,
    setPositionReference: f,
    domReference: a
  }), [o.refs, m, f]), g = b.useMemo(() => ({
    ...o.elements,
    domReference: c
  }), [o.elements, c]), v = ZB(n), S = b.useMemo(() => ({
    ...o,
    refs: h,
    elements: g,
    dataRef: l,
    nodeId: r,
    events: s,
    open: t,
    onOpenChange: v
  }), [o, r, s, t, v, h, g]);
  return Nc(() => {
    const w = i == null ? void 0 : i.nodesRef.current.find((x) => x.id === r);
    w && (w.context = S);
  }), b.useMemo(() => ({
    ...o,
    context: S,
    refs: h,
    reference: m,
    positionReference: f
  }), [o, h, S, m, f]);
}
function h_(e, t, n) {
  const r = /* @__PURE__ */ new Map();
  return {
    ...n === "floating" && {
      tabIndex: -1
    },
    ...e,
    ...t.map((o) => o ? o[n] : null).concat(e).reduce((o, i) => (i && Object.entries(i).forEach((a) => {
      let [l, s] = a;
      if (l.indexOf("on") === 0) {
        if (r.has(l) || r.set(l, []), typeof s == "function") {
          var c;
          (c = r.get(l)) == null || c.push(s), o[l] = function() {
            for (var p, f = arguments.length, m = new Array(f), h = 0; h < f; h++)
              m[h] = arguments[h];
            (p = r.get(l)) == null || p.forEach((g) => g(...m));
          };
        }
      } else
        o[l] = s;
    }), o), {})
  };
}
const pye = function(e) {
  e === void 0 && (e = []);
  const t = e, n = b.useCallback(
    (i) => h_(i, e, "reference"),
    // eslint-disable-next-line react-hooks/exhaustive-deps
    t
  ), r = b.useCallback(
    (i) => h_(i, e, "floating"),
    // eslint-disable-next-line react-hooks/exhaustive-deps
    t
  ), o = b.useCallback(
    (i) => h_(i, e, "item"),
    // Granularly check for `item` changes, because the `getItemProps` getter
    // should be as referentially stable as possible since it may be passed as
    // a prop to many components. All `item` key values must therefore be
    // memoized.
    // eslint-disable-next-line react-hooks/exhaustive-deps
    e.map((i) => i == null ? void 0 : i.item)
  );
  return b.useMemo(() => ({
    getReferenceProps: n,
    getFloatingProps: r,
    getItemProps: o
  }), [n, r, o]);
};
function QB({
  opened: e,
  floating: t,
  position: n,
  positionDependencies: r
}) {
  const [o, i] = b.useState(0);
  b.useEffect(() => {
    if (t.refs.reference.current && t.refs.floating.current)
      return Dge(t.refs.reference.current, t.refs.floating.current, t.update);
  }, [
    t.refs.reference.current,
    t.refs.floating.current,
    e,
    o,
    n
  ]), Hr(() => {
    t.update();
  }, r), Hr(() => {
    i((a) => a + 1);
  }, [e]);
}
function mye(e) {
  const t = [AB(e.offset)];
  return e.middlewares.shift && t.push(SP({ limiter: Mge() })), e.middlewares.flip && t.push(HB()), e.middlewares.inline && t.push(WB()), t.push(VB({ element: e.arrowRef, padding: e.arrowOffset })), t;
}
function hye(e) {
  const [t, n] = Xi({
    value: e.opened,
    defaultValue: e.defaultOpened,
    finalValue: !1,
    onChange: e.onChange
  }), r = () => {
    var a;
    (a = e.onClose) == null || a.call(e), n(!1);
  }, o = () => {
    var a, l;
    t ? ((a = e.onClose) == null || a.call(e), n(!1)) : ((l = e.onOpen) == null || l.call(e), n(!0));
  }, i = OP({
    placement: e.position,
    middleware: [
      ...mye(e),
      ...e.width === "target" ? [
        Fge({
          apply({ rects: a }) {
            var l, s;
            Object.assign((s = (l = i.refs.floating.current) == null ? void 0 : l.style) != null ? s : {}, {
              width: `${a.reference.width}px`
            });
          }
        })
      ] : []
    ]
  });
  return QB({
    opened: e.opened,
    position: e.position,
    positionDependencies: e.positionDependencies,
    floating: i
  }), Hr(() => {
    var a;
    (a = e.onPositionChange) == null || a.call(e, i.placement);
  }, [i.placement]), Hr(() => {
    var a, l;
    e.opened ? (l = e.onOpen) == null || l.call(e) : (a = e.onClose) == null || a.call(e);
  }, [e.opened]), {
    floating: i,
    controlled: typeof e.opened == "boolean",
    opened: t,
    onClose: r,
    onToggle: o
  };
}
const JB = {
  context: "Popover component was not found in the tree",
  children: "Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
}, [gye, e7] = Gl(JB.context);
var yye = Object.defineProperty, vye = Object.defineProperties, bye = Object.getOwnPropertyDescriptors, Sv = Object.getOwnPropertySymbols, t7 = Object.prototype.hasOwnProperty, n7 = Object.prototype.propertyIsEnumerable, L$ = (e, t, n) => t in e ? yye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ch = (e, t) => {
  for (var n in t || (t = {}))
    t7.call(t, n) && L$(e, n, t[n]);
  if (Sv)
    for (var n of Sv(t))
      n7.call(t, n) && L$(e, n, t[n]);
  return e;
}, wye = (e, t) => vye(e, bye(t)), xye = (e, t) => {
  var n = {};
  for (var r in e)
    t7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Sv)
    for (var r of Sv(e))
      t.indexOf(r) < 0 && n7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Sye = {
  refProp: "ref",
  popupType: "dialog",
  shouldOverrideDefaultTargetId: !0
}, r7 = b.forwardRef((e, t) => {
  const n = Te("PopoverTarget", Sye, e), { children: r, refProp: o, popupType: i, shouldOverrideDefaultTargetId: a } = n, l = xye(n, ["children", "refProp", "popupType", "shouldOverrideDefaultTargetId"]);
  if (!Qc(r))
    throw new Error(JB.children);
  const s = l, c = e7(), p = ta(c.reference, r.ref, t), f = c.withRoles ? {
    "aria-haspopup": i,
    "aria-expanded": c.opened,
    "aria-controls": c.getDropdownId(),
    id: a ? c.getTargetId() : r.props.id
  } : {};
  return b.cloneElement(r, Ch(wye(Ch(Ch(Ch({}, s), f), c.targetProps), {
    className: j9(c.targetProps.className, s.className, r.props.className),
    [o]: p
  }), c.controlled ? null : { onClick: c.onToggle }));
});
r7.displayName = "@mantine/core/PopoverTarget";
var kye = Ee((e, { radius: t, shadow: n }) => ({
  dropdown: {
    position: "absolute",
    backgroundColor: e.white,
    background: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
    border: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]}`,
    padding: `${e.spacing.sm} ${e.spacing.md}`,
    boxShadow: e.shadows[n] || n || "none",
    borderRadius: e.fn.radius(t),
    "&:focus": {
      outline: 0
    }
  },
  arrow: {
    backgroundColor: "inherit",
    border: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]}`,
    zIndex: 1
  }
}));
const _ye = kye;
var Oye = Object.defineProperty, D$ = Object.getOwnPropertySymbols, Eye = Object.prototype.hasOwnProperty, Cye = Object.prototype.propertyIsEnumerable, F$ = (e, t, n) => t in e ? Oye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Pu = (e, t) => {
  for (var n in t || (t = {}))
    Eye.call(t, n) && F$(e, n, t[n]);
  if (D$)
    for (var n of D$(t))
      Cye.call(t, n) && F$(e, n, t[n]);
  return e;
};
const M$ = {
  entering: "in",
  entered: "in",
  exiting: "out",
  exited: "out",
  "pre-exiting": "out",
  "pre-entering": "out"
};
function Pye({
  transition: e,
  state: t,
  duration: n,
  timingFunction: r
}) {
  const o = {
    transitionDuration: `${n}ms`,
    transitionTimingFunction: r
  };
  return typeof e == "string" ? e in vh ? Pu(Pu(Pu({
    transitionProperty: vh[e].transitionProperty
  }, o), vh[e].common), vh[e][M$[t]]) : null : Pu(Pu(Pu({
    transitionProperty: e.transitionProperty
  }, o), e.common), e[M$[t]]);
}
function Rye({
  duration: e,
  exitDuration: t,
  timingFunction: n,
  mounted: r,
  onEnter: o,
  onExit: i,
  onEntered: a,
  onExited: l
}) {
  const s = Yn(), c = ef(), p = s.respectReducedMotion ? c : !1, [f, m] = b.useState(p ? 0 : e), [h, g] = b.useState(r ? "entered" : "exited"), v = b.useRef(-1), S = (w) => {
    const x = w ? o : i, k = w ? a : l;
    g(w ? "pre-entering" : "pre-exiting"), window.clearTimeout(v.current);
    const E = p ? 0 : w ? e : t;
    if (m(E), E === 0)
      typeof x == "function" && x(), typeof k == "function" && k(), g(w ? "entered" : "exited");
    else {
      const O = window.setTimeout(() => {
        typeof x == "function" && x(), g(w ? "entering" : "exiting");
      }, 10);
      v.current = window.setTimeout(() => {
        window.clearTimeout(O), typeof k == "function" && k(), g(w ? "entered" : "exited");
      }, E);
    }
  };
  return Hr(() => {
    S(r);
  }, [r]), b.useEffect(() => () => window.clearTimeout(v.current), []), {
    transitionDuration: f,
    transitionStatus: h,
    transitionTimingFunction: n || s.transitionTimingFunction
  };
}
function Zs({
  keepMounted: e,
  transition: t,
  duration: n = 250,
  exitDuration: r = n,
  mounted: o,
  children: i,
  timingFunction: a,
  onExit: l,
  onEntered: s,
  onEnter: c,
  onExited: p
}) {
  const { transitionDuration: f, transitionStatus: m, transitionTimingFunction: h } = Rye({
    mounted: o,
    exitDuration: r,
    duration: n,
    timingFunction: a,
    onExit: l,
    onEntered: s,
    onEnter: c,
    onExited: p
  });
  return f === 0 ? o ? /* @__PURE__ */ P.createElement(P.Fragment, null, i({})) : e ? i({ display: "none" }) : null : m === "exited" ? e ? i({ display: "none" }) : null : /* @__PURE__ */ P.createElement(P.Fragment, null, i(Pye({
    transition: t,
    duration: f,
    state: m,
    timingFunction: h
  })));
}
Zs.displayName = "@mantine/core/Transition";
function EP({
  children: e,
  active: t = !0,
  refProp: n = "ref"
}) {
  const r = Nfe(t), o = ta(r, e == null ? void 0 : e.ref);
  return Qc(e) ? b.cloneElement(e, { [n]: o }) : e;
}
EP.displayName = "@mantine/core/FocusTrap";
var Tye = Object.defineProperty, jye = Object.defineProperties, Nye = Object.getOwnPropertyDescriptors, B$ = Object.getOwnPropertySymbols, $ye = Object.prototype.hasOwnProperty, Iye = Object.prototype.propertyIsEnumerable, U$ = (e, t, n) => t in e ? Tye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, il = (e, t) => {
  for (var n in t || (t = {}))
    $ye.call(t, n) && U$(e, n, t[n]);
  if (B$)
    for (var n of B$(t))
      Iye.call(t, n) && U$(e, n, t[n]);
  return e;
}, Ph = (e, t) => jye(e, Nye(t));
function H$(e, t, n, r) {
  return e === "center" || r === "center" ? { top: t } : e === "end" ? { bottom: n } : e === "start" ? { top: n } : {};
}
function W$(e, t, n, r, o) {
  return e === "center" || r === "center" ? { left: t } : e === "end" ? { [o === "ltr" ? "right" : "left"]: n } : e === "start" ? { [o === "ltr" ? "left" : "right"]: n } : {};
}
const Aye = {
  bottom: "borderTopLeftRadius",
  left: "borderTopRightRadius",
  right: "borderBottomLeftRadius",
  top: "borderBottomRightRadius"
};
function zye({
  position: e,
  arrowSize: t,
  arrowOffset: n,
  arrowRadius: r,
  arrowPosition: o,
  arrowX: i,
  arrowY: a,
  dir: l
}) {
  const [s, c = "center"] = e.split("-"), p = {
    width: F(t),
    height: F(t),
    transform: "rotate(45deg)",
    position: "absolute",
    [Aye[s]]: F(r)
  }, f = F(-t / 2);
  return s === "left" ? Ph(il(il({}, p), H$(c, a, n, o)), {
    right: f,
    borderLeftColor: "transparent",
    borderBottomColor: "transparent"
  }) : s === "right" ? Ph(il(il({}, p), H$(c, a, n, o)), {
    left: f,
    borderRightColor: "transparent",
    borderTopColor: "transparent"
  }) : s === "top" ? Ph(il(il({}, p), W$(c, i, n, o, l)), {
    bottom: f,
    borderTopColor: "transparent",
    borderLeftColor: "transparent"
  }) : s === "bottom" ? Ph(il(il({}, p), W$(c, i, n, o, l)), {
    top: f,
    borderBottomColor: "transparent",
    borderRightColor: "transparent"
  }) : {};
}
var Lye = Object.defineProperty, Dye = Object.defineProperties, Fye = Object.getOwnPropertyDescriptors, kv = Object.getOwnPropertySymbols, o7 = Object.prototype.hasOwnProperty, i7 = Object.prototype.propertyIsEnumerable, V$ = (e, t, n) => t in e ? Lye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Mye = (e, t) => {
  for (var n in t || (t = {}))
    o7.call(t, n) && V$(e, n, t[n]);
  if (kv)
    for (var n of kv(t))
      i7.call(t, n) && V$(e, n, t[n]);
  return e;
}, Bye = (e, t) => Dye(e, Fye(t)), Uye = (e, t) => {
  var n = {};
  for (var r in e)
    o7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && kv)
    for (var r of kv(e))
      t.indexOf(r) < 0 && i7.call(e, r) && (n[r] = e[r]);
  return n;
};
const CP = b.forwardRef((e, t) => {
  var n = e, {
    position: r,
    arrowSize: o,
    arrowOffset: i,
    arrowRadius: a,
    arrowPosition: l,
    visible: s,
    arrowX: c,
    arrowY: p
  } = n, f = Uye(n, [
    "position",
    "arrowSize",
    "arrowOffset",
    "arrowRadius",
    "arrowPosition",
    "visible",
    "arrowX",
    "arrowY"
  ]);
  const m = Yn();
  return s ? /* @__PURE__ */ P.createElement("div", Bye(Mye({}, f), {
    ref: t,
    style: zye({
      position: r,
      arrowSize: o,
      arrowOffset: i,
      arrowRadius: a,
      arrowPosition: l,
      dir: m.dir,
      arrowX: c,
      arrowY: p
    })
  })) : null;
});
CP.displayName = "@mantine/core/FloatingArrow";
var Hye = Object.defineProperty, Wye = Object.defineProperties, Vye = Object.getOwnPropertyDescriptors, _v = Object.getOwnPropertySymbols, a7 = Object.prototype.hasOwnProperty, l7 = Object.prototype.propertyIsEnumerable, q$ = (e, t, n) => t in e ? Hye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ru = (e, t) => {
  for (var n in t || (t = {}))
    a7.call(t, n) && q$(e, n, t[n]);
  if (_v)
    for (var n of _v(t))
      l7.call(t, n) && q$(e, n, t[n]);
  return e;
}, Rh = (e, t) => Wye(e, Vye(t)), qye = (e, t) => {
  var n = {};
  for (var r in e)
    a7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && _v)
    for (var r of _v(e))
      t.indexOf(r) < 0 && l7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Gye = {};
function s7(e) {
  var t;
  const n = Te("PopoverDropdown", Gye, e), { style: r, className: o, children: i, onKeyDownCapture: a } = n, l = qye(n, ["style", "className", "children", "onKeyDownCapture"]), s = e7(), { classes: c, cx: p } = _ye({ radius: s.radius, shadow: s.shadow }, {
    name: s.__staticSelector,
    classNames: s.classNames,
    styles: s.styles,
    unstyled: s.unstyled,
    variant: s.variant
  }), f = o8({
    opened: s.opened,
    shouldReturnFocus: s.returnFocus
  }), m = s.withRoles ? {
    "aria-labelledby": s.getTargetId(),
    id: s.getDropdownId(),
    role: "dialog"
  } : {};
  return s.disabled ? null : /* @__PURE__ */ P.createElement(rf, Rh(Ru({}, s.portalProps), {
    withinPortal: s.withinPortal
  }), /* @__PURE__ */ P.createElement(Zs, Rh(Ru({
    mounted: s.opened
  }, s.transitionProps), {
    transition: s.transitionProps.transition || "fade",
    duration: (t = s.transitionProps.duration) != null ? t : 150,
    keepMounted: s.keepMounted,
    exitDuration: typeof s.transitionProps.exitDuration == "number" ? s.transitionProps.exitDuration : s.transitionProps.duration
  }), (h) => {
    var g, v;
    return /* @__PURE__ */ P.createElement(EP, {
      active: s.trapFocus
    }, /* @__PURE__ */ P.createElement(qe, Ru(Rh(Ru({}, m), {
      tabIndex: -1,
      ref: s.floating,
      style: Rh(Ru(Ru({}, r), h), {
        zIndex: s.zIndex,
        top: (g = s.y) != null ? g : 0,
        left: (v = s.x) != null ? v : 0,
        width: s.width === "target" ? void 0 : F(s.width)
      }),
      className: p(c.dropdown, o),
      onKeyDownCapture: lue(s.onClose, {
        active: s.closeOnEscape,
        onTrigger: f,
        onKeyDown: a
      }),
      "data-position": s.placement
    }), l), i, /* @__PURE__ */ P.createElement(CP, {
      ref: s.arrowRef,
      arrowX: s.arrowX,
      arrowY: s.arrowY,
      visible: s.withArrow,
      position: s.placement,
      arrowSize: s.arrowSize,
      arrowRadius: s.arrowRadius,
      arrowOffset: s.arrowOffset,
      arrowPosition: s.arrowPosition,
      className: c.arrow
    })));
  }));
}
s7.displayName = "@mantine/core/PopoverDropdown";
function u7(e, t) {
  if (e === "rtl" && (t.includes("right") || t.includes("left"))) {
    const [n, r] = t.split("-"), o = n === "right" ? "left" : "right";
    return r === void 0 ? o : `${o}-${r}`;
  }
  return t;
}
var G$ = Object.getOwnPropertySymbols, Kye = Object.prototype.hasOwnProperty, Yye = Object.prototype.propertyIsEnumerable, Xye = (e, t) => {
  var n = {};
  for (var r in e)
    Kye.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && G$)
    for (var r of G$(e))
      t.indexOf(r) < 0 && Yye.call(e, r) && (n[r] = e[r]);
  return n;
};
const Zye = {
  position: "bottom",
  offset: 8,
  positionDependencies: [],
  transitionProps: { transition: "fade", duration: 150 },
  middlewares: { flip: !0, shift: !0, inline: !1 },
  arrowSize: 7,
  arrowOffset: 5,
  arrowRadius: 0,
  arrowPosition: "side",
  closeOnClickOutside: !0,
  withinPortal: !1,
  closeOnEscape: !0,
  trapFocus: !1,
  withRoles: !0,
  returnFocus: !1,
  clickOutsideEvents: ["mousedown", "touchstart"],
  zIndex: Ji("popover"),
  __staticSelector: "Popover",
  width: "max-content"
};
function Ma(e) {
  var t, n, r, o, i, a;
  const l = b.useRef(null), s = Te("Popover", Zye, e), {
    children: c,
    position: p,
    offset: f,
    onPositionChange: m,
    positionDependencies: h,
    opened: g,
    transitionProps: v,
    width: S,
    middlewares: w,
    withArrow: x,
    arrowSize: k,
    arrowOffset: E,
    arrowRadius: O,
    arrowPosition: C,
    unstyled: R,
    classNames: L,
    styles: D,
    closeOnClickOutside: N,
    withinPortal: H,
    portalProps: B,
    closeOnEscape: K,
    clickOutsideEvents: W,
    trapFocus: U,
    onClose: Q,
    onOpen: J,
    onChange: q,
    zIndex: ee,
    radius: A,
    shadow: X,
    id: ie,
    defaultOpened: j,
    __staticSelector: le,
    withRoles: re,
    disabled: he,
    returnFocus: xe,
    variant: ke,
    keepMounted: Ae
  } = s, pe = Xye(s, [
    "children",
    "position",
    "offset",
    "onPositionChange",
    "positionDependencies",
    "opened",
    "transitionProps",
    "width",
    "middlewares",
    "withArrow",
    "arrowSize",
    "arrowOffset",
    "arrowRadius",
    "arrowPosition",
    "unstyled",
    "classNames",
    "styles",
    "closeOnClickOutside",
    "withinPortal",
    "portalProps",
    "closeOnEscape",
    "clickOutsideEvents",
    "trapFocus",
    "onClose",
    "onOpen",
    "onChange",
    "zIndex",
    "radius",
    "shadow",
    "id",
    "defaultOpened",
    "__staticSelector",
    "withRoles",
    "disabled",
    "returnFocus",
    "variant",
    "keepMounted"
  ]), [Me, We] = b.useState(null), [ze, Fe] = b.useState(null), Ye = ea(ie), oe = Yn(), ae = hye({
    middlewares: w,
    width: S,
    position: u7(oe.dir, p),
    offset: typeof f == "number" ? f + (x ? k / 2 : 0) : f,
    arrowRef: l,
    arrowOffset: E,
    onPositionChange: m,
    positionDependencies: h,
    opened: g,
    defaultOpened: j,
    onChange: q,
    onOpen: J,
    onClose: Q
  });
  t8(() => ae.opened && N && ae.onClose(), W, [Me, ze]);
  const Ie = b.useCallback((ye) => {
    We(ye), ae.floating.reference(ye);
  }, [ae.floating.reference]), Ce = b.useCallback((ye) => {
    Fe(ye), ae.floating.floating(ye);
  }, [ae.floating.floating]);
  return /* @__PURE__ */ P.createElement(gye, {
    value: {
      returnFocus: xe,
      disabled: he,
      controlled: ae.controlled,
      reference: Ie,
      floating: Ce,
      x: ae.floating.x,
      y: ae.floating.y,
      arrowX: (r = (n = (t = ae.floating) == null ? void 0 : t.middlewareData) == null ? void 0 : n.arrow) == null ? void 0 : r.x,
      arrowY: (a = (i = (o = ae.floating) == null ? void 0 : o.middlewareData) == null ? void 0 : i.arrow) == null ? void 0 : a.y,
      opened: ae.opened,
      arrowRef: l,
      transitionProps: v,
      width: S,
      withArrow: x,
      arrowSize: k,
      arrowOffset: E,
      arrowRadius: O,
      arrowPosition: C,
      placement: ae.floating.placement,
      trapFocus: U,
      withinPortal: H,
      portalProps: B,
      zIndex: ee,
      radius: A,
      shadow: X,
      closeOnEscape: K,
      onClose: ae.onClose,
      onToggle: ae.onToggle,
      getTargetId: () => `${Ye}-target`,
      getDropdownId: () => `${Ye}-dropdown`,
      withRoles: re,
      targetProps: pe,
      __staticSelector: le,
      classNames: L,
      styles: D,
      unstyled: R,
      variant: ke,
      keepMounted: Ae
    }
  }, c);
}
Ma.Target = r7;
Ma.Dropdown = s7;
Ma.displayName = "@mantine/core/Popover";
var Qye = Object.defineProperty, Ov = Object.getOwnPropertySymbols, c7 = Object.prototype.hasOwnProperty, f7 = Object.prototype.propertyIsEnumerable, K$ = (e, t, n) => t in e ? Qye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Jye = (e, t) => {
  for (var n in t || (t = {}))
    c7.call(t, n) && K$(e, n, t[n]);
  if (Ov)
    for (var n of Ov(t))
      f7.call(t, n) && K$(e, n, t[n]);
  return e;
}, eve = (e, t) => {
  var n = {};
  for (var r in e)
    c7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Ov)
    for (var r of Ov(e))
      t.indexOf(r) < 0 && f7.call(e, r) && (n[r] = e[r]);
  return n;
};
function tve(e) {
  var t = e, {
    children: n,
    component: r = "div",
    maxHeight: o = 220,
    direction: i = "column",
    id: a,
    innerRef: l,
    __staticSelector: s,
    styles: c,
    classNames: p,
    unstyled: f
  } = t, m = eve(t, [
    "children",
    "component",
    "maxHeight",
    "direction",
    "id",
    "innerRef",
    "__staticSelector",
    "styles",
    "classNames",
    "unstyled"
  ]);
  const { classes: h } = oge(null, { name: s, styles: c, classNames: p, unstyled: f });
  return /* @__PURE__ */ P.createElement(Ma.Dropdown, Jye({
    p: 0,
    onMouseDown: (g) => g.preventDefault()
  }, m), /* @__PURE__ */ P.createElement("div", {
    style: { maxHeight: F(o), display: "flex" }
  }, /* @__PURE__ */ P.createElement(qe, {
    component: r || "div",
    id: `${a}-items`,
    "aria-labelledby": `${a}-label`,
    role: "listbox",
    onMouseDown: (g) => g.preventDefault(),
    style: { flex: 1, overflowY: r !== kx ? "auto" : void 0 },
    "data-combobox-popover": !0,
    tabIndex: -1,
    ref: l
  }, /* @__PURE__ */ P.createElement("div", {
    className: h.itemsWrapper,
    style: { flexDirection: i }
  }, n))));
}
function Il({
  opened: e,
  transitionProps: t = { transition: "fade", duration: 0 },
  shadow: n,
  withinPortal: r,
  portalProps: o,
  children: i,
  __staticSelector: a,
  onDirectionChange: l,
  switchDirectionOnFlip: s,
  zIndex: c,
  dropdownPosition: p,
  positionDependencies: f = [],
  classNames: m,
  styles: h,
  unstyled: g,
  readOnly: v,
  variant: S
}) {
  return /* @__PURE__ */ P.createElement(Ma, {
    unstyled: g,
    classNames: m,
    styles: h,
    width: "target",
    withRoles: !1,
    opened: e,
    middlewares: { flip: p === "flip", shift: !1 },
    position: p === "flip" ? "bottom" : p,
    positionDependencies: f,
    zIndex: c,
    __staticSelector: a,
    withinPortal: r,
    portalProps: o,
    transitionProps: t,
    shadow: n,
    disabled: v,
    onPositionChange: (w) => s && (l == null ? void 0 : l(w === "top" ? "column-reverse" : "column")),
    variant: S
  }, i);
}
Il.Target = Ma.Target;
Il.Dropdown = tve;
function nve({ data: e, limit: t, value: n, filter: r }) {
  const o = [];
  for (let i = 0; i < e.length && (r(n, e[i]) && o.push(e[i]), !(o.length >= t)); i += 1)
    ;
  return o;
}
var rve = Ee(() => ({
  wrapper: {
    position: "relative"
  }
})), ove = Object.defineProperty, ive = Object.defineProperties, ave = Object.getOwnPropertyDescriptors, Ev = Object.getOwnPropertySymbols, d7 = Object.prototype.hasOwnProperty, p7 = Object.prototype.propertyIsEnumerable, Y$ = (e, t, n) => t in e ? ove(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Th = (e, t) => {
  for (var n in t || (t = {}))
    d7.call(t, n) && Y$(e, n, t[n]);
  if (Ev)
    for (var n of Ev(t))
      p7.call(t, n) && Y$(e, n, t[n]);
  return e;
}, lve = (e, t) => ive(e, ave(t)), sve = (e, t) => {
  var n = {};
  for (var r in e)
    d7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Ev)
    for (var r of Ev(e))
      t.indexOf(r) < 0 && p7.call(e, r) && (n[r] = e[r]);
  return n;
};
function PP(e, t, n) {
  const r = Te(e, t, n), {
    label: o,
    description: i,
    error: a,
    required: l,
    classNames: s,
    styles: c,
    className: p,
    unstyled: f,
    __staticSelector: m,
    sx: h,
    errorProps: g,
    labelProps: v,
    descriptionProps: S,
    wrapperProps: w,
    id: x,
    size: k,
    style: E,
    inputContainer: O,
    inputWrapperOrder: C,
    withAsterisk: R,
    variant: L
  } = r, D = sve(r, [
    "label",
    "description",
    "error",
    "required",
    "classNames",
    "styles",
    "className",
    "unstyled",
    "__staticSelector",
    "sx",
    "errorProps",
    "labelProps",
    "descriptionProps",
    "wrapperProps",
    "id",
    "size",
    "style",
    "inputContainer",
    "inputWrapperOrder",
    "withAsterisk",
    "variant"
  ]), N = ea(x), { systemStyles: H, rest: B } = tf(D), K = Th({
    label: o,
    description: i,
    error: a,
    required: l,
    classNames: s,
    className: p,
    __staticSelector: m,
    sx: h,
    errorProps: g,
    labelProps: v,
    descriptionProps: S,
    unstyled: f,
    styles: c,
    id: N,
    size: k,
    style: E,
    inputContainer: O,
    inputWrapperOrder: C,
    withAsterisk: R,
    variant: L
  }, w);
  return lve(Th({}, B), {
    classNames: s,
    styles: c,
    unstyled: f,
    wrapperProps: Th(Th({}, K), H),
    inputProps: {
      required: l,
      classNames: s,
      styles: c,
      unstyled: f,
      id: N,
      size: k,
      __staticSelector: m,
      error: a,
      variant: L
    }
  });
}
var uve = Ee((e, t, { size: n }) => ({
  label: {
    display: "inline-block",
    fontSize: Re({ size: n, sizes: e.fontSizes }),
    fontWeight: 500,
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.gray[9],
    wordBreak: "break-word",
    cursor: "default",
    WebkitTapHighlightColor: "transparent"
  },
  required: {
    color: e.fn.variant({ variant: "filled", color: "red" }).background
  }
})), cve = Object.defineProperty, Cv = Object.getOwnPropertySymbols, m7 = Object.prototype.hasOwnProperty, h7 = Object.prototype.propertyIsEnumerable, X$ = (e, t, n) => t in e ? cve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, fve = (e, t) => {
  for (var n in t || (t = {}))
    m7.call(t, n) && X$(e, n, t[n]);
  if (Cv)
    for (var n of Cv(t))
      h7.call(t, n) && X$(e, n, t[n]);
  return e;
}, dve = (e, t) => {
  var n = {};
  for (var r in e)
    m7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Cv)
    for (var r of Cv(e))
      t.indexOf(r) < 0 && h7.call(e, r) && (n[r] = e[r]);
  return n;
};
const pve = {
  labelElement: "label",
  size: "sm"
}, RP = b.forwardRef((e, t) => {
  const n = Te("InputLabel", pve, e), {
    labelElement: r,
    children: o,
    required: i,
    size: a,
    classNames: l,
    styles: s,
    unstyled: c,
    className: p,
    htmlFor: f,
    __staticSelector: m,
    variant: h,
    onMouseDown: g
  } = n, v = dve(n, [
    "labelElement",
    "children",
    "required",
    "size",
    "classNames",
    "styles",
    "unstyled",
    "className",
    "htmlFor",
    "__staticSelector",
    "variant",
    "onMouseDown"
  ]), { classes: S, cx: w } = uve(null, {
    name: ["InputWrapper", m],
    classNames: l,
    styles: s,
    unstyled: c,
    variant: h,
    size: a
  });
  return /* @__PURE__ */ P.createElement(qe, fve({
    component: r,
    ref: t,
    className: w(S.label, p),
    htmlFor: r === "label" ? f : void 0,
    onMouseDown: (x) => {
      g == null || g(x), !x.defaultPrevented && x.detail > 1 && x.preventDefault();
    }
  }, v), o, i && /* @__PURE__ */ P.createElement("span", {
    className: S.required,
    "aria-hidden": !0
  }, " *"));
});
RP.displayName = "@mantine/core/InputLabel";
var mve = Ee((e, t, { size: n }) => ({
  error: {
    wordBreak: "break-word",
    color: e.fn.variant({ variant: "filled", color: "red" }).background,
    fontSize: `calc(${Re({ size: n, sizes: e.fontSizes })} - ${F(2)})`,
    lineHeight: 1.2,
    display: "block"
  }
})), hve = Object.defineProperty, Pv = Object.getOwnPropertySymbols, g7 = Object.prototype.hasOwnProperty, y7 = Object.prototype.propertyIsEnumerable, Z$ = (e, t, n) => t in e ? hve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, gve = (e, t) => {
  for (var n in t || (t = {}))
    g7.call(t, n) && Z$(e, n, t[n]);
  if (Pv)
    for (var n of Pv(t))
      y7.call(t, n) && Z$(e, n, t[n]);
  return e;
}, yve = (e, t) => {
  var n = {};
  for (var r in e)
    g7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Pv)
    for (var r of Pv(e))
      t.indexOf(r) < 0 && y7.call(e, r) && (n[r] = e[r]);
  return n;
};
const vve = {
  size: "sm"
}, TP = b.forwardRef((e, t) => {
  const n = Te("InputError", vve, e), {
    children: r,
    className: o,
    classNames: i,
    styles: a,
    unstyled: l,
    size: s,
    __staticSelector: c,
    variant: p
  } = n, f = yve(n, [
    "children",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "size",
    "__staticSelector",
    "variant"
  ]), { classes: m, cx: h } = mve(null, {
    name: ["InputWrapper", c],
    classNames: i,
    styles: a,
    unstyled: l,
    variant: p,
    size: s
  });
  return /* @__PURE__ */ P.createElement(Ft, gve({
    className: h(m.error, o),
    ref: t
  }, f), r);
});
TP.displayName = "@mantine/core/InputError";
var bve = Ee((e, t, { size: n }) => ({
  description: {
    wordBreak: "break-word",
    color: e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6],
    fontSize: `calc(${Re({ size: n, sizes: e.fontSizes })} - ${F(2)})`,
    lineHeight: 1.2,
    display: "block"
  }
})), wve = Object.defineProperty, Rv = Object.getOwnPropertySymbols, v7 = Object.prototype.hasOwnProperty, b7 = Object.prototype.propertyIsEnumerable, Q$ = (e, t, n) => t in e ? wve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, xve = (e, t) => {
  for (var n in t || (t = {}))
    v7.call(t, n) && Q$(e, n, t[n]);
  if (Rv)
    for (var n of Rv(t))
      b7.call(t, n) && Q$(e, n, t[n]);
  return e;
}, Sve = (e, t) => {
  var n = {};
  for (var r in e)
    v7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Rv)
    for (var r of Rv(e))
      t.indexOf(r) < 0 && b7.call(e, r) && (n[r] = e[r]);
  return n;
};
const kve = {
  size: "sm"
}, jP = b.forwardRef((e, t) => {
  const n = Te("InputDescription", kve, e), {
    children: r,
    className: o,
    classNames: i,
    styles: a,
    unstyled: l,
    size: s,
    __staticSelector: c,
    variant: p
  } = n, f = Sve(n, [
    "children",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "size",
    "__staticSelector",
    "variant"
  ]), { classes: m, cx: h } = bve(null, {
    name: ["InputWrapper", c],
    classNames: i,
    styles: a,
    unstyled: l,
    variant: p,
    size: s
  });
  return /* @__PURE__ */ P.createElement(Ft, xve({
    color: "dimmed",
    className: h(m.description, o),
    ref: t,
    unstyled: l
  }, f), r);
});
jP.displayName = "@mantine/core/InputDescription";
const w7 = b.createContext({
  offsetBottom: !1,
  offsetTop: !1,
  describedBy: void 0
}), _ve = w7.Provider, Ove = () => b.useContext(w7);
function Eve(e, { hasDescription: t, hasError: n }) {
  const r = e.findIndex((a) => a === "input"), o = e[r - 1], i = e[r + 1];
  return { offsetBottom: t && i === "description" || n && i === "error", offsetTop: t && o === "description" || n && o === "error" };
}
var Cve = Object.defineProperty, Pve = Object.defineProperties, Rve = Object.getOwnPropertyDescriptors, J$ = Object.getOwnPropertySymbols, Tve = Object.prototype.hasOwnProperty, jve = Object.prototype.propertyIsEnumerable, eI = (e, t, n) => t in e ? Cve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Nve = (e, t) => {
  for (var n in t || (t = {}))
    Tve.call(t, n) && eI(e, n, t[n]);
  if (J$)
    for (var n of J$(t))
      jve.call(t, n) && eI(e, n, t[n]);
  return e;
}, $ve = (e, t) => Pve(e, Rve(t)), Ive = Ee((e) => ({
  root: $ve(Nve({}, e.fn.fontStyles()), {
    lineHeight: e.lineHeight
  })
})), Ave = Object.defineProperty, zve = Object.defineProperties, Lve = Object.getOwnPropertyDescriptors, Tv = Object.getOwnPropertySymbols, x7 = Object.prototype.hasOwnProperty, S7 = Object.prototype.propertyIsEnumerable, tI = (e, t, n) => t in e ? Ave(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, al = (e, t) => {
  for (var n in t || (t = {}))
    x7.call(t, n) && tI(e, n, t[n]);
  if (Tv)
    for (var n of Tv(t))
      S7.call(t, n) && tI(e, n, t[n]);
  return e;
}, nI = (e, t) => zve(e, Lve(t)), Dve = (e, t) => {
  var n = {};
  for (var r in e)
    x7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Tv)
    for (var r of Tv(e))
      t.indexOf(r) < 0 && S7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Fve = {
  labelElement: "label",
  size: "sm",
  inputContainer: (e) => e,
  inputWrapperOrder: ["label", "description", "input", "error"]
}, k7 = b.forwardRef((e, t) => {
  const n = Te("InputWrapper", Fve, e), {
    className: r,
    label: o,
    children: i,
    required: a,
    id: l,
    error: s,
    description: c,
    labelElement: p,
    labelProps: f,
    descriptionProps: m,
    errorProps: h,
    classNames: g,
    styles: v,
    size: S,
    inputContainer: w,
    __staticSelector: x,
    unstyled: k,
    inputWrapperOrder: E,
    withAsterisk: O,
    variant: C
  } = n, R = Dve(n, [
    "className",
    "label",
    "children",
    "required",
    "id",
    "error",
    "description",
    "labelElement",
    "labelProps",
    "descriptionProps",
    "errorProps",
    "classNames",
    "styles",
    "size",
    "inputContainer",
    "__staticSelector",
    "unstyled",
    "inputWrapperOrder",
    "withAsterisk",
    "variant"
  ]), { classes: L, cx: D } = Ive(null, {
    classNames: g,
    styles: v,
    name: ["InputWrapper", x],
    unstyled: k,
    variant: C,
    size: S
  }), N = {
    classNames: g,
    styles: v,
    unstyled: k,
    size: S,
    variant: C,
    __staticSelector: x
  }, H = typeof O == "boolean" ? O : a, B = l ? `${l}-error` : h == null ? void 0 : h.id, K = l ? `${l}-description` : m == null ? void 0 : m.id, W = `${s && typeof s != "boolean" ? B : ""} ${c ? K : ""}`, U = W.trim().length > 0 ? W.trim() : void 0, Q = o && /* @__PURE__ */ P.createElement(RP, al(al({
    key: "label",
    labelElement: p,
    id: l ? `${l}-label` : void 0,
    htmlFor: l,
    required: H
  }, N), f), o), J = c && /* @__PURE__ */ P.createElement(jP, nI(al(al({
    key: "description"
  }, m), N), {
    size: (m == null ? void 0 : m.size) || N.size,
    id: (m == null ? void 0 : m.id) || K
  }), c), q = /* @__PURE__ */ P.createElement(b.Fragment, {
    key: "input"
  }, w(i)), ee = typeof s != "boolean" && s && /* @__PURE__ */ P.createElement(TP, nI(al(al({}, h), N), {
    size: (h == null ? void 0 : h.size) || N.size,
    key: "error",
    id: (h == null ? void 0 : h.id) || B
  }), s), A = E.map((X) => {
    switch (X) {
      case "label":
        return Q;
      case "input":
        return q;
      case "description":
        return J;
      case "error":
        return ee;
      default:
        return null;
    }
  });
  return /* @__PURE__ */ P.createElement(_ve, {
    value: al({
      describedBy: U
    }, Eve(E, {
      hasDescription: !!J,
      hasError: !!ee
    }))
  }, /* @__PURE__ */ P.createElement(qe, al({
    className: D(L.root, r),
    ref: t
  }, R), A));
});
k7.displayName = "@mantine/core/InputWrapper";
var Mve = Object.defineProperty, jv = Object.getOwnPropertySymbols, _7 = Object.prototype.hasOwnProperty, O7 = Object.prototype.propertyIsEnumerable, rI = (e, t, n) => t in e ? Mve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Bve = (e, t) => {
  for (var n in t || (t = {}))
    _7.call(t, n) && rI(e, n, t[n]);
  if (jv)
    for (var n of jv(t))
      O7.call(t, n) && rI(e, n, t[n]);
  return e;
}, Uve = (e, t) => {
  var n = {};
  for (var r in e)
    _7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && jv)
    for (var r of jv(e))
      t.indexOf(r) < 0 && O7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Hve = {}, E7 = b.forwardRef((e, t) => {
  const n = Te("InputPlaceholder", Hve, e), { sx: r } = n, o = Uve(n, ["sx"]);
  return /* @__PURE__ */ P.createElement(qe, Bve({
    component: "span",
    sx: [(i) => i.fn.placeholderStyles(), ...fx(r)],
    ref: t
  }, o));
});
E7.displayName = "@mantine/core/InputPlaceholder";
var Wve = Object.defineProperty, Vve = Object.defineProperties, qve = Object.getOwnPropertyDescriptors, oI = Object.getOwnPropertySymbols, Gve = Object.prototype.hasOwnProperty, Kve = Object.prototype.propertyIsEnumerable, iI = (e, t, n) => t in e ? Wve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, jh = (e, t) => {
  for (var n in t || (t = {}))
    Gve.call(t, n) && iI(e, n, t[n]);
  if (oI)
    for (var n of oI(t))
      Kve.call(t, n) && iI(e, n, t[n]);
  return e;
}, g_ = (e, t) => Vve(e, qve(t));
const gr = {
  xs: F(30),
  sm: F(36),
  md: F(42),
  lg: F(50),
  xl: F(60)
}, Yve = ["default", "filled", "unstyled"];
function Xve({ theme: e, variant: t }) {
  return Yve.includes(t) ? t === "default" ? {
    border: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4]}`,
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
    transition: "border-color 100ms ease",
    "&:focus, &:focus-within": e.focusRingStyles.inputStyles(e)
  } : t === "filled" ? {
    border: `${F(1)} solid transparent`,
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[1],
    "&:focus, &:focus-within": e.focusRingStyles.inputStyles(e)
  } : {
    borderWidth: 0,
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    backgroundColor: "transparent",
    minHeight: F(28),
    outline: 0,
    "&:focus, &:focus-within": {
      outline: "none",
      borderColor: "transparent"
    },
    "&:disabled": {
      backgroundColor: "transparent",
      "&:focus, &:focus-within": {
        outline: "none",
        borderColor: "transparent"
      }
    }
  } : null;
}
var Zve = Ee((e, {
  multiline: t,
  radius: n,
  invalid: r,
  rightSectionWidth: o,
  withRightSection: i,
  iconWidth: a,
  offsetBottom: l,
  offsetTop: s,
  pointer: c
}, { variant: p, size: f }) => {
  const m = e.fn.variant({
    variant: "filled",
    color: "red"
  }).background, h = p === "default" || p === "filled" ? {
    minHeight: Re({ size: f, sizes: gr }),
    paddingLeft: `calc(${Re({ size: f, sizes: gr })}  / 3)`,
    paddingRight: i ? o || Re({ size: f, sizes: gr }) : `calc(${Re({ size: f, sizes: gr })}  / 3)`,
    borderRadius: e.fn.radius(n)
  } : p === "unstyled" && i ? {
    paddingRight: o || Re({ size: f, sizes: gr })
  } : null;
  return {
    wrapper: {
      position: "relative",
      marginTop: s ? `calc(${e.spacing.xs} / 2)` : void 0,
      marginBottom: l ? `calc(${e.spacing.xs} / 2)` : void 0,
      "&:has(input:disabled)": {
        "& .mantine-Input-rightSection": {
          display: "none"
        }
      }
    },
    input: g_(jh(jh(g_(jh({}, e.fn.fontStyles()), {
      height: t ? p === "unstyled" ? void 0 : "auto" : Re({ size: f, sizes: gr }),
      WebkitTapHighlightColor: "transparent",
      lineHeight: t ? e.lineHeight : `calc(${Re({ size: f, sizes: gr })} - ${F(2)})`,
      appearance: "none",
      resize: "none",
      boxSizing: "border-box",
      fontSize: Re({ size: f, sizes: e.fontSizes }),
      width: "100%",
      color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
      display: "block",
      textAlign: "left",
      cursor: c ? "pointer" : void 0
    }), Xve({ theme: e, variant: p })), h), {
      "&:disabled, &[data-disabled]": {
        backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[1],
        color: e.colors.dark[2],
        opacity: 0.6,
        cursor: "not-allowed",
        pointerEvents: "none",
        "&::placeholder": {
          color: e.colors.dark[2]
        }
      },
      "&[data-invalid]": {
        color: m,
        borderColor: m,
        "&::placeholder": {
          opacity: 1,
          color: m
        }
      },
      "&[data-with-icon]": {
        paddingLeft: typeof a == "number" ? F(a) : Re({ size: f, sizes: gr })
      },
      "&::placeholder": g_(jh({}, e.fn.placeholderStyles()), {
        opacity: 1
      }),
      "&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration": {
        appearance: "none"
      },
      "&[type=number]": {
        MozAppearance: "textfield"
      }
    }),
    icon: {
      pointerEvents: "none",
      position: "absolute",
      zIndex: 1,
      left: 0,
      top: 0,
      bottom: 0,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: a ? F(a) : Re({ size: f, sizes: gr }),
      color: r ? e.colors.red[e.colorScheme === "dark" ? 6 : 7] : e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[5]
    },
    rightSection: {
      position: "absolute",
      top: 0,
      bottom: 0,
      right: 0,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: o || Re({ size: f, sizes: gr })
    }
  };
});
const Qve = Zve;
var Jve = Object.defineProperty, ebe = Object.defineProperties, tbe = Object.getOwnPropertyDescriptors, Nv = Object.getOwnPropertySymbols, C7 = Object.prototype.hasOwnProperty, P7 = Object.prototype.propertyIsEnumerable, aI = (e, t, n) => t in e ? Jve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Nh = (e, t) => {
  for (var n in t || (t = {}))
    C7.call(t, n) && aI(e, n, t[n]);
  if (Nv)
    for (var n of Nv(t))
      P7.call(t, n) && aI(e, n, t[n]);
  return e;
}, lI = (e, t) => ebe(e, tbe(t)), nbe = (e, t) => {
  var n = {};
  for (var r in e)
    C7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Nv)
    for (var r of Nv(e))
      t.indexOf(r) < 0 && P7.call(e, r) && (n[r] = e[r]);
  return n;
};
const rbe = {
  size: "sm",
  variant: "default"
}, Qs = b.forwardRef((e, t) => {
  const n = Te("Input", rbe, e), {
    className: r,
    error: o,
    required: i,
    disabled: a,
    variant: l,
    icon: s,
    style: c,
    rightSectionWidth: p,
    iconWidth: f,
    rightSection: m,
    rightSectionProps: h,
    radius: g,
    size: v,
    wrapperProps: S,
    classNames: w,
    styles: x,
    __staticSelector: k,
    multiline: E,
    sx: O,
    unstyled: C,
    pointer: R
  } = n, L = nbe(n, [
    "className",
    "error",
    "required",
    "disabled",
    "variant",
    "icon",
    "style",
    "rightSectionWidth",
    "iconWidth",
    "rightSection",
    "rightSectionProps",
    "radius",
    "size",
    "wrapperProps",
    "classNames",
    "styles",
    "__staticSelector",
    "multiline",
    "sx",
    "unstyled",
    "pointer"
  ]), { offsetBottom: D, offsetTop: N, describedBy: H } = Ove(), { classes: B, cx: K } = Qve({
    radius: g,
    multiline: E,
    invalid: !!o,
    rightSectionWidth: p ? F(p) : void 0,
    iconWidth: f,
    withRightSection: !!m,
    offsetBottom: D,
    offsetTop: N,
    pointer: R
  }, { classNames: w, styles: x, name: ["Input", k], unstyled: C, variant: l, size: v }), { systemStyles: W, rest: U } = tf(L);
  return /* @__PURE__ */ P.createElement(qe, Nh(Nh({
    className: K(B.wrapper, r),
    sx: O,
    style: c
  }, W), S), s && /* @__PURE__ */ P.createElement("div", {
    className: B.icon
  }, s), /* @__PURE__ */ P.createElement(qe, lI(Nh({
    component: "input"
  }, U), {
    ref: t,
    required: i,
    "aria-invalid": !!o,
    "aria-describedby": H,
    disabled: a,
    "data-disabled": a || void 0,
    "data-with-icon": !!s || void 0,
    "data-invalid": !!o || void 0,
    className: B.input
  })), m && /* @__PURE__ */ P.createElement("div", lI(Nh({}, h), {
    className: B.rightSection
  }), m));
});
Qs.displayName = "@mantine/core/Input";
Qs.Wrapper = k7;
Qs.Label = RP;
Qs.Description = jP;
Qs.Error = TP;
Qs.Placeholder = E7;
const Uo = Qs;
var obe = Object.defineProperty, ibe = Object.defineProperties, abe = Object.getOwnPropertyDescriptors, $v = Object.getOwnPropertySymbols, R7 = Object.prototype.hasOwnProperty, T7 = Object.prototype.propertyIsEnumerable, sI = (e, t, n) => t in e ? obe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y_ = (e, t) => {
  for (var n in t || (t = {}))
    R7.call(t, n) && sI(e, n, t[n]);
  if ($v)
    for (var n of $v(t))
      T7.call(t, n) && sI(e, n, t[n]);
  return e;
}, uI = (e, t) => ibe(e, abe(t)), lbe = (e, t) => {
  var n = {};
  for (var r in e)
    R7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && $v)
    for (var r of $v(e))
      t.indexOf(r) < 0 && T7.call(e, r) && (n[r] = e[r]);
  return n;
};
function sbe(e, t) {
  return t.value.toLowerCase().trim().includes(e.toLowerCase().trim());
}
const ube = {
  required: !1,
  size: "sm",
  shadow: "sm",
  limit: 5,
  itemComponent: dP,
  transitionProps: { transition: "fade", duration: 0 },
  initiallyOpened: !1,
  filter: sbe,
  switchDirectionOnFlip: !1,
  zIndex: Ji("popover"),
  dropdownPosition: "flip",
  maxDropdownHeight: "auto",
  positionDependencies: []
}, NP = b.forwardRef((e, t) => {
  const n = PP("Autocomplete", ube, e), {
    inputProps: r,
    wrapperProps: o,
    shadow: i,
    data: a,
    limit: l,
    value: s,
    defaultValue: c,
    onChange: p,
    unstyled: f,
    itemComponent: m,
    onItemSubmit: h,
    onKeyDown: g,
    onFocus: v,
    onBlur: S,
    onClick: w,
    transitionProps: x,
    initiallyOpened: k,
    classNames: E,
    styles: O,
    filter: C,
    nothingFound: R,
    onDropdownClose: L,
    onDropdownOpen: D,
    withinPortal: N,
    switchDirectionOnFlip: H,
    zIndex: B,
    dropdownPosition: K,
    maxDropdownHeight: W,
    dropdownComponent: U,
    positionDependencies: Q,
    readOnly: J,
    hoverOnSearchChange: q
  } = n, ee = lbe(n, [
    "inputProps",
    "wrapperProps",
    "shadow",
    "data",
    "limit",
    "value",
    "defaultValue",
    "onChange",
    "unstyled",
    "itemComponent",
    "onItemSubmit",
    "onKeyDown",
    "onFocus",
    "onBlur",
    "onClick",
    "transitionProps",
    "initiallyOpened",
    "classNames",
    "styles",
    "filter",
    "nothingFound",
    "onDropdownClose",
    "onDropdownOpen",
    "withinPortal",
    "switchDirectionOnFlip",
    "zIndex",
    "dropdownPosition",
    "maxDropdownHeight",
    "dropdownComponent",
    "positionDependencies",
    "readOnly",
    "hoverOnSearchChange"
  ]), { classes: A } = rve(null, { classNames: E, styles: O, name: "Autocomplete", unstyled: f }), [X, ie] = b.useState(k), [j, le] = b.useState(-1), [re, he] = b.useState("column"), xe = b.useRef(null), [ke, Ae] = b.useState(!1), [pe, Me] = Xi({
    value: s,
    defaultValue: c,
    finalValue: "",
    onChange: p
  }), We = (we) => {
    ie(we);
    const Ge = we ? D : L;
    typeof Ge == "function" && Ge();
  };
  Hr(() => {
    le(q && pe ? 0 : -1);
  }, [pe, q]);
  const ze = (we) => {
    Me(we.value), typeof h == "function" && h(we), We(!1);
  }, Fe = a.map((we) => typeof we == "string" ? { value: we } : we), Ye = R9({
    data: nve({ data: Fe, value: pe, limit: l, filter: C })
  }), oe = (we) => {
    if (ke)
      return;
    typeof g == "function" && g(we);
    const Ge = re === "column", $e = () => {
      le((Pe) => Pe < Ye.length - 1 ? Pe + 1 : Pe);
    }, ue = () => {
      le((Pe) => Pe > 0 ? Pe - 1 : Pe);
    };
    switch (we.key) {
      case "ArrowUp": {
        we.preventDefault(), Ge ? ue() : $e();
        break;
      }
      case "ArrowDown": {
        we.preventDefault(), Ge ? $e() : ue();
        break;
      }
      case "Enter": {
        Ye[j] && X && (we.preventDefault(), Me(Ye[j].value), typeof h == "function" && h(Ye[j]), We(!1));
        break;
      }
      case "Escape":
        X && (we.preventDefault(), We(!1));
    }
  }, ae = (we) => {
    typeof v == "function" && v(we), We(!0);
  }, Ie = (we) => {
    typeof S == "function" && S(we), We(!1);
  }, Ce = (we) => {
    typeof w == "function" && w(we), We(!0);
  }, ye = X && (Ye.length > 0 || Ye.length === 0 && !!R);
  return /* @__PURE__ */ P.createElement(Uo.Wrapper, uI(y_({}, o), {
    __staticSelector: "Autocomplete"
  }), /* @__PURE__ */ P.createElement(Il, {
    opened: ye,
    transitionProps: x,
    shadow: "sm",
    withinPortal: N,
    __staticSelector: "Autocomplete",
    onDirectionChange: he,
    switchDirectionOnFlip: H,
    zIndex: B,
    dropdownPosition: K,
    positionDependencies: Q,
    classNames: E,
    styles: O,
    unstyled: f,
    readOnly: J,
    variant: r.variant
  }, /* @__PURE__ */ P.createElement(Il.Target, null, /* @__PURE__ */ P.createElement("div", {
    className: A.wrapper,
    "aria-controls": r.id,
    onMouseLeave: () => le(-1),
    tabIndex: -1
  }, /* @__PURE__ */ P.createElement(Uo, uI(y_(y_({
    type: "search",
    autoComplete: "off"
  }, r), ee), {
    readOnly: J,
    "data-mantine-stop-propagation": X,
    ref: ta(t, xe),
    onKeyDown: oe,
    classNames: E,
    styles: O,
    __staticSelector: "Autocomplete",
    value: pe,
    onChange: (we) => {
      Me(we.currentTarget.value), We(!0);
    },
    onFocus: ae,
    onBlur: Ie,
    onClick: Ce,
    onCompositionStart: () => Ae(!0),
    onCompositionEnd: () => Ae(!1),
    role: "combobox",
    "aria-haspopup": "listbox",
    "aria-owns": ye ? `${r.id}-items` : null,
    "aria-expanded": ye,
    "aria-autocomplete": "list",
    "aria-controls": ye ? `${r.id}-items` : null,
    "aria-activedescendant": j >= 0 ? `${r.id}-${j}` : null
  })))), /* @__PURE__ */ P.createElement(Il.Dropdown, {
    component: U || kx,
    maxHeight: W,
    direction: re,
    id: r.id,
    __staticSelector: "Autocomplete",
    classNames: E,
    styles: O
  }, /* @__PURE__ */ P.createElement(fP, {
    data: Ye,
    hovered: j,
    classNames: E,
    styles: O,
    uuid: r.id,
    __staticSelector: "Autocomplete",
    onItemHover: le,
    onItemSelect: ze,
    itemComponent: m,
    size: r.size,
    nothingFound: R,
    variant: r.variant
  }))));
});
NP.displayName = "@mantine/core/Autocomplete";
var cbe = Ee((e, { orientation: t, buttonBorderWidth: n }) => ({
  root: {
    display: "flex",
    flexDirection: t === "vertical" ? "column" : "row",
    "& [data-button]": {
      "&:first-of-type:not(:last-of-type)": {
        borderBottomRightRadius: 0,
        [t === "vertical" ? "borderBottomLeftRadius" : "borderTopRightRadius"]: 0,
        [t === "vertical" ? "borderBottomWidth" : "borderRightWidth"]: `calc(${F(n)} / 2)`
      },
      "&:last-of-type:not(:first-of-type)": {
        borderTopLeftRadius: 0,
        [t === "vertical" ? "borderTopRightRadius" : "borderBottomLeftRadius"]: 0,
        [t === "vertical" ? "borderTopWidth" : "borderLeftWidth"]: `calc(${F(n)} / 2)`
      },
      "&:not(:first-of-type):not(:last-of-type)": {
        borderRadius: 0,
        [t === "vertical" ? "borderTopWidth" : "borderLeftWidth"]: `calc(${F(n)} / 2)`,
        [t === "vertical" ? "borderBottomWidth" : "borderRightWidth"]: `calc(${F(n)} / 2)`
      },
      "& + [data-button]": {
        [t === "vertical" ? "marginTop" : "marginLeft"]: `calc(${n} * -1)`,
        "@media (min-resolution: 192dpi)": {
          [t === "vertical" ? "marginTop" : "marginLeft"]: 0
        }
      }
    }
  }
})), fbe = Object.defineProperty, Iv = Object.getOwnPropertySymbols, j7 = Object.prototype.hasOwnProperty, N7 = Object.prototype.propertyIsEnumerable, cI = (e, t, n) => t in e ? fbe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, dbe = (e, t) => {
  for (var n in t || (t = {}))
    j7.call(t, n) && cI(e, n, t[n]);
  if (Iv)
    for (var n of Iv(t))
      N7.call(t, n) && cI(e, n, t[n]);
  return e;
}, pbe = (e, t) => {
  var n = {};
  for (var r in e)
    j7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Iv)
    for (var r of Iv(e))
      t.indexOf(r) < 0 && N7.call(e, r) && (n[r] = e[r]);
  return n;
};
const mbe = {
  orientation: "horizontal",
  buttonBorderWidth: 1
}, $7 = b.forwardRef((e, t) => {
  const n = Te("ButtonGroup", mbe, e), { className: r, orientation: o, buttonBorderWidth: i, unstyled: a } = n, l = pbe(n, ["className", "orientation", "buttonBorderWidth", "unstyled"]), { classes: s, cx: c } = cbe({ orientation: o, buttonBorderWidth: i }, { name: "ButtonGroup", unstyled: a });
  return /* @__PURE__ */ P.createElement(qe, dbe({
    className: c(s.root, r),
    ref: t
  }, l));
});
$7.displayName = "@mantine/core/ButtonGroup";
var hbe = Object.defineProperty, gbe = Object.defineProperties, ybe = Object.getOwnPropertyDescriptors, fI = Object.getOwnPropertySymbols, vbe = Object.prototype.hasOwnProperty, bbe = Object.prototype.propertyIsEnumerable, dI = (e, t, n) => t in e ? hbe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ga = (e, t) => {
  for (var n in t || (t = {}))
    vbe.call(t, n) && dI(e, n, t[n]);
  if (fI)
    for (var n of fI(t))
      bbe.call(t, n) && dI(e, n, t[n]);
  return e;
}, Gg = (e, t) => gbe(e, ybe(t));
const wbe = [
  "filled",
  "outline",
  "light",
  "white",
  "default",
  "subtle",
  "gradient"
], KO = {
  xs: { height: gr.xs, paddingLeft: F(14), paddingRight: F(14) },
  sm: { height: gr.sm, paddingLeft: F(18), paddingRight: F(18) },
  md: { height: gr.md, paddingLeft: F(22), paddingRight: F(22) },
  lg: { height: gr.lg, paddingLeft: F(26), paddingRight: F(26) },
  xl: { height: gr.xl, paddingLeft: F(32), paddingRight: F(32) },
  "compact-xs": { height: F(22), paddingLeft: F(7), paddingRight: F(7) },
  "compact-sm": { height: F(26), paddingLeft: F(8), paddingRight: F(8) },
  "compact-md": { height: F(30), paddingLeft: F(10), paddingRight: F(10) },
  "compact-lg": { height: F(34), paddingLeft: F(12), paddingRight: F(12) },
  "compact-xl": { height: F(40), paddingLeft: F(14), paddingRight: F(14) }
};
function xbe({ compact: e, size: t, withLeftIcon: n, withRightIcon: r }) {
  if (e)
    return KO[`compact-${t}`];
  const o = KO[t];
  return o ? Gg(ga({}, o), {
    paddingLeft: n ? `calc(${o.paddingLeft}  / 1.5)` : o.paddingLeft,
    paddingRight: r ? `calc(${o.paddingRight}  / 1.5)` : o.paddingRight
  }) : {};
}
const Sbe = (e) => ({
  display: e ? "block" : "inline-block",
  width: e ? "100%" : "auto"
});
function kbe({ variant: e, theme: t, color: n, gradient: r }) {
  if (!wbe.includes(e))
    return null;
  const o = t.fn.variant({ color: n, variant: e, gradient: r });
  return e === "gradient" ? ga({
    border: 0,
    backgroundImage: o.background,
    color: o.color
  }, t.fn.hover({ backgroundSize: "200%" })) : ga({
    border: `${F(1)} solid ${o.border}`,
    backgroundColor: o.background,
    color: o.color
  }, t.fn.hover({ backgroundColor: o.hover }));
}
var _be = Ee((e, {
  radius: t,
  fullWidth: n,
  compact: r,
  withLeftIcon: o,
  withRightIcon: i,
  color: a,
  gradient: l
}, { variant: s, size: c }) => ({
  root: Gg(ga(Gg(ga(ga(ga(ga({}, xbe({ compact: r, size: c, withLeftIcon: o, withRightIcon: i })), e.fn.fontStyles()), e.fn.focusStyles()), Sbe(n)), {
    borderRadius: e.fn.radius(t),
    fontWeight: 600,
    position: "relative",
    lineHeight: 1,
    fontSize: Re({ size: c, sizes: e.fontSizes }),
    userSelect: "none",
    cursor: "pointer"
  }), kbe({ variant: s, theme: e, color: a, gradient: l })), {
    "&:active": e.activeStyles,
    "&:disabled, &[data-disabled]": {
      borderColor: "transparent",
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2],
      color: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[5],
      cursor: "not-allowed",
      backgroundImage: "none",
      pointerEvents: "none",
      "&:active": {
        transform: "none"
      }
    },
    "&[data-loading]": {
      pointerEvents: "none",
      "&::before": Gg(ga({
        content: '""'
      }, e.fn.cover(F(-1))), {
        backgroundColor: e.colorScheme === "dark" ? e.fn.rgba(e.colors.dark[7], 0.5) : "rgba(255, 255, 255, .5)",
        borderRadius: e.fn.radius(t),
        cursor: "not-allowed"
      })
    }
  }),
  icon: {
    display: "flex",
    alignItems: "center"
  },
  leftIcon: {
    marginRight: e.spacing.xs
  },
  rightIcon: {
    marginLeft: e.spacing.xs
  },
  centerLoader: {
    position: "absolute",
    left: "50%",
    transform: "translateX(-50%)",
    opacity: 0.5
  },
  inner: {
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    height: "100%",
    overflow: "visible"
  },
  label: {
    whiteSpace: "nowrap",
    height: "100%",
    overflow: "hidden",
    display: "flex",
    alignItems: "center"
  }
})), Obe = Object.defineProperty, Av = Object.getOwnPropertySymbols, I7 = Object.prototype.hasOwnProperty, A7 = Object.prototype.propertyIsEnumerable, pI = (e, t, n) => t in e ? Obe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, mI = (e, t) => {
  for (var n in t || (t = {}))
    I7.call(t, n) && pI(e, n, t[n]);
  if (Av)
    for (var n of Av(t))
      A7.call(t, n) && pI(e, n, t[n]);
  return e;
}, Ebe = (e, t) => {
  var n = {};
  for (var r in e)
    I7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Av)
    for (var r of Av(e))
      t.indexOf(r) < 0 && A7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Cbe = {
  size: "sm",
  type: "button",
  variant: "filled",
  loaderPosition: "left"
}, $P = b.forwardRef((e, t) => {
  const n = Te("Button", Cbe, e), {
    className: r,
    size: o,
    color: i,
    type: a,
    disabled: l,
    children: s,
    leftIcon: c,
    rightIcon: p,
    fullWidth: f,
    variant: m,
    radius: h,
    uppercase: g,
    compact: v,
    loading: S,
    loaderPosition: w,
    loaderProps: x,
    gradient: k,
    classNames: E,
    styles: O,
    unstyled: C
  } = n, R = Ebe(n, [
    "className",
    "size",
    "color",
    "type",
    "disabled",
    "children",
    "leftIcon",
    "rightIcon",
    "fullWidth",
    "variant",
    "radius",
    "uppercase",
    "compact",
    "loading",
    "loaderPosition",
    "loaderProps",
    "gradient",
    "classNames",
    "styles",
    "unstyled"
  ]), { classes: L, cx: D, theme: N } = _be({
    radius: h,
    color: i,
    fullWidth: f,
    compact: v,
    gradient: k,
    withLeftIcon: !!c,
    withRightIcon: !!p
  }, { name: "Button", unstyled: C, classNames: E, styles: O, variant: m, size: o }), H = N.fn.variant({ color: i, variant: m }), B = /* @__PURE__ */ P.createElement(nf, mI({
    color: H.color,
    size: `calc(${Re({ size: o, sizes: KO }).height} / 2)`
  }, x));
  return /* @__PURE__ */ P.createElement(vx, mI({
    className: D(L.root, r),
    type: a,
    disabled: l,
    "data-button": !0,
    "data-disabled": l || void 0,
    "data-loading": S || void 0,
    ref: t,
    unstyled: C
  }, R), /* @__PURE__ */ P.createElement("div", {
    className: L.inner
  }, (c || S && w === "left") && /* @__PURE__ */ P.createElement("span", {
    className: D(L.icon, L.leftIcon)
  }, S && w === "left" ? B : c), S && w === "center" && /* @__PURE__ */ P.createElement("span", {
    className: L.centerLoader
  }, B), /* @__PURE__ */ P.createElement("span", {
    className: L.label,
    style: { textTransform: g ? "uppercase" : void 0 }
  }, s), (p || S && w === "right") && /* @__PURE__ */ P.createElement("span", {
    className: D(L.icon, L.rightIcon)
  }, S && w === "right" ? B : p)));
});
$P.displayName = "@mantine/core/Button";
$P.Group = $7;
const Hs = $P;
var Pbe = Ee((e, { radius: t, shadow: n }) => ({
  root: {
    outline: 0,
    WebkitTapHighlightColor: "transparent",
    display: "block",
    textDecoration: "none",
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.white,
    boxSizing: "border-box",
    borderRadius: e.fn.radius(t),
    boxShadow: e.shadows[n] || n || "none",
    "&[data-with-border]": {
      border: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`
    }
  }
})), Rbe = Object.defineProperty, zv = Object.getOwnPropertySymbols, z7 = Object.prototype.hasOwnProperty, L7 = Object.prototype.propertyIsEnumerable, hI = (e, t, n) => t in e ? Rbe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Tbe = (e, t) => {
  for (var n in t || (t = {}))
    z7.call(t, n) && hI(e, n, t[n]);
  if (zv)
    for (var n of zv(t))
      L7.call(t, n) && hI(e, n, t[n]);
  return e;
}, jbe = (e, t) => {
  var n = {};
  for (var r in e)
    z7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && zv)
    for (var r of zv(e))
      t.indexOf(r) < 0 && L7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Nbe = {}, D7 = b.forwardRef((e, t) => {
  const n = Te("Paper", Nbe, e), { className: r, children: o, radius: i, withBorder: a, shadow: l, unstyled: s, variant: c } = n, p = jbe(n, ["className", "children", "radius", "withBorder", "shadow", "unstyled", "variant"]), { classes: f, cx: m } = Pbe({ radius: i, shadow: l }, { name: "Paper", unstyled: s, variant: c });
  return /* @__PURE__ */ P.createElement(qe, Tbe({
    className: m(f.root, r),
    "data-with-border": a || void 0,
    ref: t
  }, p), o);
});
D7.displayName = "@mantine/core/Paper";
const F7 = D7, M7 = b.createContext({ padding: 0 }), $be = M7.Provider, Ibe = () => b.useContext(M7).padding;
var Abe = Ee((e, { padding: t, withBorder: n, inheritPadding: r }) => {
  const o = Re({ size: t, sizes: e.spacing }), i = `calc(-1 * ${o})`, a = e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3];
  return {
    cardSection: {
      display: "block",
      marginLeft: i,
      marginRight: i,
      paddingLeft: r ? o : void 0,
      paddingRight: r ? o : void 0,
      borderTop: n ? `${F(1)} solid ${a}` : void 0,
      borderBottom: n ? `${F(1)} solid ${a}` : void 0,
      "& + &": {
        borderTop: 0
      },
      "&[data-first]": {
        marginTop: i,
        borderTop: 0,
        borderBottom: n ? `${F(1)} solid ${a}` : void 0
      },
      "&[data-last]": {
        marginBottom: i,
        borderBottom: 0
      }
    }
  };
});
const zbe = Abe;
var Lbe = Object.defineProperty, Lv = Object.getOwnPropertySymbols, B7 = Object.prototype.hasOwnProperty, U7 = Object.prototype.propertyIsEnumerable, gI = (e, t, n) => t in e ? Lbe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Dbe = (e, t) => {
  for (var n in t || (t = {}))
    B7.call(t, n) && gI(e, n, t[n]);
  if (Lv)
    for (var n of Lv(t))
      U7.call(t, n) && gI(e, n, t[n]);
  return e;
}, Fbe = (e, t) => {
  var n = {};
  for (var r in e)
    B7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Lv)
    for (var r of Lv(e))
      t.indexOf(r) < 0 && U7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Mbe = {
  withBorder: !1,
  inheritPadding: !1
}, H7 = b.forwardRef((e, t) => {
  const n = Te("CardSection", Mbe, e), { className: r, withBorder: o, inheritPadding: i, unstyled: a, variant: l } = n, s = Fbe(n, ["className", "withBorder", "inheritPadding", "unstyled", "variant"]), { classes: c, cx: p } = zbe({ padding: Ibe(), withBorder: o, inheritPadding: i }, { name: "Card", unstyled: a, variant: l });
  return /* @__PURE__ */ P.createElement(qe, Dbe({
    className: p(c.cardSection, r),
    ref: t
  }, s));
});
H7.displayName = "@mantine/core/CardSection";
const W7 = H7;
var Bbe = Ee((e) => ({
  root: {
    position: "relative",
    overflow: "hidden",
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white
  }
})), Ube = Object.defineProperty, Dv = Object.getOwnPropertySymbols, V7 = Object.prototype.hasOwnProperty, q7 = Object.prototype.propertyIsEnumerable, yI = (e, t, n) => t in e ? Ube(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Hbe = (e, t) => {
  for (var n in t || (t = {}))
    V7.call(t, n) && yI(e, n, t[n]);
  if (Dv)
    for (var n of Dv(t))
      q7.call(t, n) && yI(e, n, t[n]);
  return e;
}, Wbe = (e, t) => {
  var n = {};
  for (var r in e)
    V7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Dv)
    for (var r of Dv(e))
      t.indexOf(r) < 0 && q7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Vbe = {
  padding: "md"
}, IP = b.forwardRef((e, t) => {
  const n = Te("Card", Vbe, e), { className: r, padding: o, radius: i, children: a, unstyled: l, variant: s } = n, c = Wbe(n, ["className", "padding", "radius", "children", "unstyled", "variant"]), { classes: p, cx: f } = Bbe(null, { name: "Card", unstyled: l, variant: s }), m = b.Children.toArray(a), h = m.map((g, v) => typeof g == "object" && g && "type" in g && g.type === W7 ? b.cloneElement(g, {
    variant: s,
    padding: o,
    "data-first": v === 0 || void 0,
    "data-last": v === m.length - 1 || void 0
  }) : g);
  return /* @__PURE__ */ P.createElement($be, {
    value: { padding: o }
  }, /* @__PURE__ */ P.createElement(F7, Hbe({
    className: f(p.root, r),
    radius: i,
    p: o,
    ref: t
  }, c), h));
});
IP.Section = W7;
IP.displayName = "@mantine/core/Card";
const qbe = IP, G7 = b.createContext(null), Gbe = G7.Provider, Kbe = () => b.useContext(G7);
var Ybe = Object.defineProperty, Fv = Object.getOwnPropertySymbols, K7 = Object.prototype.hasOwnProperty, Y7 = Object.prototype.propertyIsEnumerable, vI = (e, t, n) => t in e ? Ybe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, bI = (e, t) => {
  for (var n in t || (t = {}))
    K7.call(t, n) && vI(e, n, t[n]);
  if (Fv)
    for (var n of Fv(t))
      Y7.call(t, n) && vI(e, n, t[n]);
  return e;
}, Xbe = (e, t) => {
  var n = {};
  for (var r in e)
    K7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Fv)
    for (var r of Fv(e))
      t.indexOf(r) < 0 && Y7.call(e, r) && (n[r] = e[r]);
  return n;
};
const Zbe = {
  size: "sm"
}, X7 = b.forwardRef((e, t) => {
  const n = Te("CheckboxGroup", Zbe, e), { children: r, value: o, defaultValue: i, onChange: a, size: l, wrapperProps: s } = n, c = Xbe(n, ["children", "value", "defaultValue", "onChange", "size", "wrapperProps"]), [p, f] = Xi({
    value: o,
    defaultValue: i,
    finalValue: [],
    onChange: a
  }), m = (h) => {
    const g = h.currentTarget.value;
    f(p.includes(g) ? p.filter((v) => v !== g) : [...p, g]);
  };
  return /* @__PURE__ */ P.createElement(Gbe, {
    value: { value: p, onChange: m, size: l }
  }, /* @__PURE__ */ P.createElement(Uo.Wrapper, bI(bI({
    labelElement: "div",
    size: l,
    __staticSelector: "CheckboxGroup",
    ref: t
  }, s), c), r));
});
X7.displayName = "@mantine/core/CheckboxGroup";
var Qbe = Object.defineProperty, Mv = Object.getOwnPropertySymbols, Z7 = Object.prototype.hasOwnProperty, Q7 = Object.prototype.propertyIsEnumerable, wI = (e, t, n) => t in e ? Qbe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Bv = (e, t) => {
  for (var n in t || (t = {}))
    Z7.call(t, n) && wI(e, n, t[n]);
  if (Mv)
    for (var n of Mv(t))
      Q7.call(t, n) && wI(e, n, t[n]);
  return e;
}, J7 = (e, t) => {
  var n = {};
  for (var r in e)
    Z7.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Mv)
    for (var r of Mv(e))
      t.indexOf(r) < 0 && Q7.call(e, r) && (n[r] = e[r]);
  return n;
};
function Jbe(e) {
  const t = e, { width: n, height: r, style: o } = t, i = J7(t, ["width", "height", "style"]);
  return /* @__PURE__ */ P.createElement("svg", Bv({
    viewBox: "0 0 10 7",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    style: Bv({ width: n, height: r }, o)
  }, i), /* @__PURE__ */ P.createElement("path", {
    d: "M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
function ewe(e) {
  var t = e, { indeterminate: n } = t, r = J7(t, ["indeterminate"]);
  return n ? /* @__PURE__ */ P.createElement("svg", Bv({
    xmlns: "http://www.w3.org/2000/svg",
    fill: "none",
    viewBox: "0 0 32 6"
  }, r), /* @__PURE__ */ P.createElement("rect", {
    width: "32",
    height: "6",
    fill: "currentColor",
    rx: "3"
  })) : /* @__PURE__ */ P.createElement(Jbe, Bv({}, r));
}
var twe = Object.defineProperty, nwe = Object.defineProperties, rwe = Object.getOwnPropertyDescriptors, xI = Object.getOwnPropertySymbols, owe = Object.prototype.hasOwnProperty, iwe = Object.prototype.propertyIsEnumerable, SI = (e, t, n) => t in e ? twe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, kI = (e, t) => {
  for (var n in t || (t = {}))
    owe.call(t, n) && SI(e, n, t[n]);
  if (xI)
    for (var n of xI(t))
      iwe.call(t, n) && SI(e, n, t[n]);
  return e;
}, _I = (e, t) => nwe(e, rwe(t));
const awe = {
  xs: F(16),
  sm: F(20),
  md: F(24),
  lg: F(30),
  xl: F(36)
};
var lwe = Ee((e, {
  radius: t,
  color: n,
  transitionDuration: r,
  labelPosition: o,
  error: i,
  indeterminate: a
}, { size: l }) => {
  const s = Re({ size: l, sizes: awe }), c = e.fn.variant({ variant: "filled", color: n });
  return {
    icon: _I(kI({}, e.fn.cover()), {
      ref: Fi("icon"),
      color: a ? "inherit" : e.white,
      transform: a ? "none" : `translateY(${F(5)}) scale(0.5)`,
      opacity: a ? 1 : 0,
      transitionProperty: "opacity, transform",
      transitionTimingFunction: "ease",
      transitionDuration: `${r}ms`,
      pointerEvents: "none",
      width: "60%",
      position: "absolute",
      zIndex: 1,
      margin: "auto",
      "@media (prefers-reduced-motion)": {
        transitionDuration: e.respectReducedMotion ? "0ms" : void 0
      }
    }),
    inner: {
      position: "relative",
      width: s,
      height: s,
      order: o === "left" ? 2 : 1
    },
    input: _I(kI({}, e.fn.focusStyles()), {
      appearance: "none",
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
      border: `${F(1)} solid ${i ? e.fn.variant({ variant: "filled", color: "red" }).background : e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4]}`,
      width: s,
      height: s,
      borderRadius: e.fn.radius(t),
      padding: 0,
      display: "block",
      margin: 0,
      transition: `border-color ${r}ms ease, background-color ${r}ms ease`,
      cursor: e.cursorType,
      "&:checked": {
        backgroundColor: c.background,
        borderColor: c.background,
        [`& + .${Fi("icon")}`]: {
          opacity: 1,
          color: e.white,
          transform: "translateY(0) scale(1)"
        }
      },
      "&:disabled": {
        backgroundColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2],
        borderColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[3],
        cursor: "not-allowed",
        pointerEvents: "none",
        [`& + .${Fi("icon")}`]: {
          color: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[5]
        }
      }
    })
  };
});
const swe = lwe;
var uwe = Object.defineProperty, cwe = Object.defineProperties, fwe = Object.getOwnPropertyDescriptors, OI = Object.getOwnPropertySymbols, dwe = Object.prototype.hasOwnProperty, pwe = Object.prototype.propertyIsEnumerable, EI = (e, t, n) => t in e ? uwe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, mwe = (e, t) => {
  for (var n in t || (t = {}))
    dwe.call(t, n) && EI(e, n, t[n]);
  if (OI)
    for (var n of OI(t))
      pwe.call(t, n) && EI(e, n, t[n]);
  return e;
}, hwe = (e, t) => cwe(e, fwe(t));
const v_ = {
  xs: F(16),
  sm: F(20),
  md: F(24),
  lg: F(30),
  xl: F(36)
};
var gwe = Ee((e, { labelPosition: t }, { size: n }) => ({
  root: {},
  body: {
    display: "flex",
    "&:has(input:disabled) label": {
      color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5]
    }
  },
  labelWrapper: hwe(mwe({}, e.fn.fontStyles()), {
    display: "inline-flex",
    flexDirection: "column",
    WebkitTapHighlightColor: "transparent",
    fontSize: n in v_ ? Re({ size: n, sizes: e.fontSizes }) : void 0,
    lineHeight: n in v_ ? Re({ size: n, sizes: v_ }) : void 0,
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    cursor: e.cursorType,
    order: t === "left" ? 1 : 2
  }),
  description: {
    marginTop: `calc(${e.spacing.xs} / 2)`,
    [t === "left" ? "paddingRight" : "paddingLeft"]: e.spacing.sm
  },
  error: {
    marginTop: `calc(${e.spacing.xs} / 2)`,
    [t === "left" ? "paddingRight" : "paddingLeft"]: e.spacing.sm
  },
  label: {
    cursor: e.cursorType,
    [t === "left" ? "paddingRight" : "paddingLeft"]: e.spacing.sm,
    "&:disabled, &[data-disabled]": {
      color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5]
    }
  }
})), ywe = Object.defineProperty, Uv = Object.getOwnPropertySymbols, eU = Object.prototype.hasOwnProperty, tU = Object.prototype.propertyIsEnumerable, CI = (e, t, n) => t in e ? ywe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, vwe = (e, t) => {
  for (var n in t || (t = {}))
    eU.call(t, n) && CI(e, n, t[n]);
  if (Uv)
    for (var n of Uv(t))
      tU.call(t, n) && CI(e, n, t[n]);
  return e;
}, bwe = (e, t) => {
  var n = {};
  for (var r in e)
    eU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Uv)
    for (var r of Uv(e))
      t.indexOf(r) < 0 && tU.call(e, r) && (n[r] = e[r]);
  return n;
};
const nU = b.forwardRef((e, t) => {
  var n = e, {
    __staticSelector: r,
    className: o,
    classNames: i,
    styles: a,
    unstyled: l,
    children: s,
    label: c,
    description: p,
    id: f,
    disabled: m,
    error: h,
    size: g,
    labelPosition: v,
    variant: S
  } = n, w = bwe(n, [
    "__staticSelector",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "children",
    "label",
    "description",
    "id",
    "disabled",
    "error",
    "size",
    "labelPosition",
    "variant"
  ]);
  const { classes: x, cx: k } = gwe({ labelPosition: v }, { name: r, styles: a, classNames: i, unstyled: l, variant: S, size: g });
  return /* @__PURE__ */ P.createElement(qe, vwe({
    className: k(x.root, o),
    ref: t
  }, w), /* @__PURE__ */ P.createElement("div", {
    className: k(x.body)
  }, s, /* @__PURE__ */ P.createElement("div", {
    className: x.labelWrapper
  }, c != null && /* @__PURE__ */ P.createElement("label", {
    className: x.label,
    "data-disabled": m || void 0,
    htmlFor: f
  }, c), p && /* @__PURE__ */ P.createElement(Uo.Description, {
    className: x.description
  }, p), h && h !== "boolean" && /* @__PURE__ */ P.createElement(Uo.Error, {
    className: x.error
  }, h))));
});
nU.displayName = "@mantine/core/InlineInput";
var wwe = Object.defineProperty, Hv = Object.getOwnPropertySymbols, rU = Object.prototype.hasOwnProperty, oU = Object.prototype.propertyIsEnumerable, PI = (e, t, n) => t in e ? wwe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $h = (e, t) => {
  for (var n in t || (t = {}))
    rU.call(t, n) && PI(e, n, t[n]);
  if (Hv)
    for (var n of Hv(t))
      oU.call(t, n) && PI(e, n, t[n]);
  return e;
}, xwe = (e, t) => {
  var n = {};
  for (var r in e)
    rU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Hv)
    for (var r of Hv(e))
      t.indexOf(r) < 0 && oU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Swe = {
  size: "sm",
  transitionDuration: 100,
  icon: ewe,
  labelPosition: "right"
}, AP = b.forwardRef((e, t) => {
  const n = Te("Checkbox", Swe, e), {
    className: r,
    style: o,
    sx: i,
    checked: a,
    disabled: l,
    color: s,
    label: c,
    indeterminate: p,
    id: f,
    size: m,
    radius: h,
    wrapperProps: g,
    children: v,
    classNames: S,
    styles: w,
    transitionDuration: x,
    icon: k,
    unstyled: E,
    labelPosition: O,
    description: C,
    error: R,
    variant: L
  } = n, D = xwe(n, [
    "className",
    "style",
    "sx",
    "checked",
    "disabled",
    "color",
    "label",
    "indeterminate",
    "id",
    "size",
    "radius",
    "wrapperProps",
    "children",
    "classNames",
    "styles",
    "transitionDuration",
    "icon",
    "unstyled",
    "labelPosition",
    "description",
    "error",
    "variant"
  ]), N = Kbe(), H = ea(f), { systemStyles: B, rest: K } = tf(D), { classes: W } = swe({
    radius: h,
    color: s,
    transitionDuration: x,
    labelPosition: O,
    error: !!R,
    indeterminate: p
  }, { name: "Checkbox", classNames: S, styles: w, unstyled: E, variant: L, size: (N == null ? void 0 : N.size) || m }), U = N ? {
    checked: N.value.includes(K.value),
    onChange: N.onChange
  } : {};
  return /* @__PURE__ */ P.createElement(nU, $h($h({
    className: r,
    sx: i,
    style: o,
    id: H,
    size: (N == null ? void 0 : N.size) || m,
    labelPosition: O,
    label: c,
    description: C,
    error: R,
    disabled: l,
    __staticSelector: "Checkbox",
    classNames: S,
    styles: w,
    unstyled: E,
    "data-checked": U.checked || void 0,
    variant: L
  }, B), g), /* @__PURE__ */ P.createElement("div", {
    className: W.inner
  }, /* @__PURE__ */ P.createElement("input", $h($h({
    id: H,
    ref: t,
    type: "checkbox",
    className: W.input,
    checked: a,
    disabled: l
  }, K), U)), /* @__PURE__ */ P.createElement(k, {
    indeterminate: p,
    className: W.icon
  })));
});
AP.displayName = "@mantine/core/Checkbox";
AP.Group = X7;
var kwe = Ee((e, { fluid: t, sizes: n }, { size: r }) => ({
  root: {
    paddingLeft: e.spacing.md,
    paddingRight: e.spacing.md,
    maxWidth: t ? "100%" : Re({ size: r, sizes: n }),
    marginLeft: "auto",
    marginRight: "auto"
  }
})), _we = Object.defineProperty, Wv = Object.getOwnPropertySymbols, iU = Object.prototype.hasOwnProperty, aU = Object.prototype.propertyIsEnumerable, RI = (e, t, n) => t in e ? _we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Owe = (e, t) => {
  for (var n in t || (t = {}))
    iU.call(t, n) && RI(e, n, t[n]);
  if (Wv)
    for (var n of Wv(t))
      aU.call(t, n) && RI(e, n, t[n]);
  return e;
}, Ewe = (e, t) => {
  var n = {};
  for (var r in e)
    iU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Wv)
    for (var r of Wv(e))
      t.indexOf(r) < 0 && aU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Cwe = {
  sizes: {
    xs: F(540),
    sm: F(720),
    md: F(960),
    lg: F(1140),
    xl: F(1320)
  }
}, Js = b.forwardRef((e, t) => {
  const n = Te("Container", Cwe, e), { className: r, fluid: o, size: i, unstyled: a, sizes: l, variant: s } = n, c = Ewe(n, ["className", "fluid", "size", "unstyled", "sizes", "variant"]), { classes: p, cx: f } = kwe({ fluid: o, sizes: l }, { unstyled: a, name: "Container", variant: s, size: i });
  return /* @__PURE__ */ P.createElement(qe, Owe({
    className: f(p.root, r),
    ref: t
  }, c));
});
Js.displayName = "@mantine/core/Container";
var Pwe = Object.defineProperty, Vv = Object.getOwnPropertySymbols, lU = Object.prototype.hasOwnProperty, sU = Object.prototype.propertyIsEnumerable, TI = (e, t, n) => t in e ? Pwe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Rwe = (e, t) => {
  for (var n in t || (t = {}))
    lU.call(t, n) && TI(e, n, t[n]);
  if (Vv)
    for (var n of Vv(t))
      sU.call(t, n) && TI(e, n, t[n]);
  return e;
}, Twe = (e, t) => {
  var n = {};
  for (var r in e)
    lU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Vv)
    for (var r of Vv(e))
      t.indexOf(r) < 0 && sU.call(e, r) && (n[r] = e[r]);
  return n;
};
const jwe = {
  timeout: 1e3
};
function uU(e) {
  const t = Te("CopyButton", jwe, e), { children: n, timeout: r, value: o } = t, i = Twe(t, ["children", "timeout", "value"]), a = n8({ timeout: r }), l = () => a.copy(o);
  return /* @__PURE__ */ P.createElement(P.Fragment, null, n(Rwe({ copy: l, copied: a.copied }, i)));
}
uU.displayName = "@mantine/core/CopyButton";
const [Nwe, af] = Gl("ModalBase component was not found in tree");
var $we = Ee(() => ({
  close: {
    marginLeft: "auto",
    marginRight: 0
  }
}));
const Iwe = $we;
var Awe = Object.defineProperty, qv = Object.getOwnPropertySymbols, cU = Object.prototype.hasOwnProperty, fU = Object.prototype.propertyIsEnumerable, jI = (e, t, n) => t in e ? Awe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, zwe = (e, t) => {
  for (var n in t || (t = {}))
    cU.call(t, n) && jI(e, n, t[n]);
  if (qv)
    for (var n of qv(t))
      fU.call(t, n) && jI(e, n, t[n]);
  return e;
}, Lwe = (e, t) => {
  var n = {};
  for (var r in e)
    cU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && qv)
    for (var r of qv(e))
      t.indexOf(r) < 0 && fU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Dwe = {
  size: "sm"
}, Fwe = b.forwardRef((e, t) => {
  const n = af(), r = Te(`${n.__staticSelector}CloseButton`, Dwe, e), { className: o } = r, i = Lwe(r, ["className"]), { classes: a, cx: l } = Iwe(null, n.stylesApi);
  return /* @__PURE__ */ P.createElement(bx, zwe({
    className: l(a.close, o),
    ref: t,
    onClick: n.onClose
  }, i));
});
var Mwe = Ee(() => ({
  overlay: {}
}));
const Bwe = Mwe;
var Uwe = Object.defineProperty, Hwe = Object.defineProperties, Wwe = Object.getOwnPropertyDescriptors, NI = Object.getOwnPropertySymbols, Vwe = Object.prototype.hasOwnProperty, qwe = Object.prototype.propertyIsEnumerable, $I = (e, t, n) => t in e ? Uwe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Gwe = (e, t) => {
  for (var n in t || (t = {}))
    Vwe.call(t, n) && $I(e, n, t[n]);
  if (NI)
    for (var n of NI(t))
      qwe.call(t, n) && $I(e, n, t[n]);
  return e;
}, Kwe = (e, t) => Hwe(e, Wwe(t)), Ywe = Ee((e, { color: t, opacity: n, blur: r, radius: o, gradient: i, fixed: a, zIndex: l }) => ({
  root: Kwe(Gwe({}, e.fn.cover(0)), {
    position: a ? "fixed" : "absolute",
    backgroundColor: i ? void 0 : e.fn.rgba(t, n),
    backgroundImage: i,
    backdropFilter: r ? `blur(${F(r)})` : void 0,
    borderRadius: e.fn.radius(o),
    zIndex: l,
    "&[data-center]": {
      display: "flex",
      alignItems: "center",
      justifyContent: "center"
    }
  })
})), Xwe = Object.defineProperty, Gv = Object.getOwnPropertySymbols, dU = Object.prototype.hasOwnProperty, pU = Object.prototype.propertyIsEnumerable, II = (e, t, n) => t in e ? Xwe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Zwe = (e, t) => {
  for (var n in t || (t = {}))
    dU.call(t, n) && II(e, n, t[n]);
  if (Gv)
    for (var n of Gv(t))
      pU.call(t, n) && II(e, n, t[n]);
  return e;
}, Qwe = (e, t) => {
  var n = {};
  for (var r in e)
    dU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Gv)
    for (var r of Gv(e))
      t.indexOf(r) < 0 && pU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Jwe = {
  opacity: 0.6,
  color: "#000",
  zIndex: Ji("modal"),
  radius: 0
}, mU = b.forwardRef((e, t) => {
  const n = Te("Overlay", Jwe, e), {
    variant: r,
    opacity: o,
    color: i,
    blur: a,
    gradient: l,
    zIndex: s,
    radius: c,
    children: p,
    className: f,
    classNames: m,
    styles: h,
    unstyled: g,
    center: v,
    fixed: S
  } = n, w = Qwe(n, [
    "variant",
    "opacity",
    "color",
    "blur",
    "gradient",
    "zIndex",
    "radius",
    "children",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "center",
    "fixed"
  ]), { classes: x, cx: k } = Ywe({ color: i, opacity: o, blur: a, radius: c, gradient: l, fixed: S, zIndex: s }, { name: "Overlay", classNames: m, styles: h, unstyled: g, variant: r });
  return /* @__PURE__ */ P.createElement(qe, Zwe({
    ref: t,
    className: k(x.root, f),
    "data-center": v || void 0
  }, w), p);
});
mU.displayName = "@mantine/core/Overlay";
const hU = mU;
var exe = Object.defineProperty, txe = Object.defineProperties, nxe = Object.getOwnPropertyDescriptors, Kv = Object.getOwnPropertySymbols, gU = Object.prototype.hasOwnProperty, yU = Object.prototype.propertyIsEnumerable, AI = (e, t, n) => t in e ? exe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Zf = (e, t) => {
  for (var n in t || (t = {}))
    gU.call(t, n) && AI(e, n, t[n]);
  if (Kv)
    for (var n of Kv(t))
      yU.call(t, n) && AI(e, n, t[n]);
  return e;
}, rxe = (e, t) => txe(e, nxe(t)), oxe = (e, t) => {
  var n = {};
  for (var r in e)
    gU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Kv)
    for (var r of Kv(e))
      t.indexOf(r) < 0 && yU.call(e, r) && (n[r] = e[r]);
  return n;
};
const ixe = {}, axe = b.forwardRef((e, t) => {
  const n = af(), r = Te(`${n.__staticSelector}Overlay`, ixe, e), { onClick: o, transitionProps: i, style: a, className: l } = r, s = oxe(r, ["onClick", "transitionProps", "style", "className"]), { classes: c, cx: p } = Bwe(null, n.stylesApi), f = (m) => {
    o == null || o(m), n.closeOnClickOutside && n.onClose();
  };
  return /* @__PURE__ */ P.createElement(Zs, rxe(Zf(Zf({
    mounted: n.opened
  }, n.transitionProps), i), {
    transition: "fade"
  }), (m) => /* @__PURE__ */ P.createElement(hU, Zf({
    ref: t,
    onClick: f,
    fixed: !0,
    style: Zf(Zf({}, a), m),
    className: p(c.overlay, l),
    zIndex: n.zIndex
  }, s)));
});
var lxe = Ee((e, { zIndex: t }) => ({
  inner: {
    position: "fixed",
    width: "100%",
    top: 0,
    bottom: 0,
    maxHeight: "100%",
    zIndex: t,
    pointerEvents: "none"
  },
  content: {
    pointerEvents: "all"
  }
}));
const sxe = lxe;
var uxe = Object.defineProperty, Yv = Object.getOwnPropertySymbols, vU = Object.prototype.hasOwnProperty, bU = Object.prototype.propertyIsEnumerable, zI = (e, t, n) => t in e ? uxe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Qf = (e, t) => {
  for (var n in t || (t = {}))
    vU.call(t, n) && zI(e, n, t[n]);
  if (Yv)
    for (var n of Yv(t))
      bU.call(t, n) && zI(e, n, t[n]);
  return e;
}, cxe = (e, t) => {
  var n = {};
  for (var r in e)
    vU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Yv)
    for (var r of Yv(e))
      t.indexOf(r) < 0 && bU.call(e, r) && (n[r] = e[r]);
  return n;
};
const fxe = {}, dxe = b.forwardRef((e, t) => {
  const n = af(), r = Te(`${n.__staticSelector}Content`, fxe, e), { className: o, transitionProps: i, style: a, onKeyDown: l } = r, s = cxe(r, ["className", "transitionProps", "style", "onKeyDown"]), { classes: c, cx: p } = sxe({ zIndex: n.zIndex }, n.stylesApi), f = (m) => {
    var h;
    ((h = m.target) == null ? void 0 : h.getAttribute("data-mantine-stop-propagation")) !== "true" && m.key === "Escape" && n.closeOnEscape && n.onClose(), l == null || l(m);
  };
  return /* @__PURE__ */ P.createElement(Zs, Qf(Qf({
    mounted: n.opened,
    transition: "pop"
  }, n.transitionProps), i), (m) => /* @__PURE__ */ P.createElement("div", {
    className: p(c.inner)
  }, /* @__PURE__ */ P.createElement(EP, {
    active: n.opened && n.trapFocus
  }, /* @__PURE__ */ P.createElement(F7, Qf({
    component: "section",
    role: "dialog",
    tabIndex: -1,
    "aria-modal": !0,
    "aria-describedby": n.bodyMounted ? n.getBodyId() : void 0,
    "aria-labelledby": n.titleMounted ? n.getTitleId() : void 0,
    onKeyDown: f,
    ref: t,
    className: p(c.content, o),
    style: Qf(Qf({}, a), m),
    shadow: n.shadow
  }, s), s.children))));
});
var pxe = Ee((e, { padding: t }) => {
  const n = Re({ size: t, sizes: e.spacing });
  return {
    header: {
      display: "flex",
      justifyContent: "space-between",
      alignItems: "center",
      padding: n,
      paddingRight: `calc(${n} - ${F(5)})`,
      position: "sticky",
      top: 0,
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.white,
      zIndex: 1e3
    }
  };
});
const mxe = pxe;
var hxe = Object.defineProperty, Xv = Object.getOwnPropertySymbols, wU = Object.prototype.hasOwnProperty, xU = Object.prototype.propertyIsEnumerable, LI = (e, t, n) => t in e ? hxe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, gxe = (e, t) => {
  for (var n in t || (t = {}))
    wU.call(t, n) && LI(e, n, t[n]);
  if (Xv)
    for (var n of Xv(t))
      xU.call(t, n) && LI(e, n, t[n]);
  return e;
}, yxe = (e, t) => {
  var n = {};
  for (var r in e)
    wU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Xv)
    for (var r of Xv(e))
      t.indexOf(r) < 0 && xU.call(e, r) && (n[r] = e[r]);
  return n;
};
const vxe = {}, bxe = b.forwardRef((e, t) => {
  const n = af(), r = Te(`${n.__staticSelector}Header`, vxe, e), { className: o } = r, i = yxe(r, ["className"]), { classes: a, cx: l } = mxe({ padding: n.padding }, n.stylesApi);
  return /* @__PURE__ */ P.createElement(qe, gxe({
    ref: t,
    className: l(a.header, o)
  }, i));
});
var wxe = Ee((e) => ({
  title: {
    lineHeight: 1,
    padding: 0,
    margin: 0,
    fontWeight: 400,
    fontSize: e.fontSizes.md
  }
}));
const xxe = wxe;
var Sxe = Object.defineProperty, Zv = Object.getOwnPropertySymbols, SU = Object.prototype.hasOwnProperty, kU = Object.prototype.propertyIsEnumerable, DI = (e, t, n) => t in e ? Sxe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, kxe = (e, t) => {
  for (var n in t || (t = {}))
    SU.call(t, n) && DI(e, n, t[n]);
  if (Zv)
    for (var n of Zv(t))
      kU.call(t, n) && DI(e, n, t[n]);
  return e;
}, _xe = (e, t) => {
  var n = {};
  for (var r in e)
    SU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Zv)
    for (var r of Zv(e))
      t.indexOf(r) < 0 && kU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Oxe = {}, Exe = b.forwardRef((e, t) => {
  const n = af(), r = Te(`${n.__staticSelector}Title`, Oxe, e), { className: o } = r, i = _xe(r, ["className"]), { classes: a, cx: l } = xxe(null, n.stylesApi);
  return b.useEffect(() => (n.setTitleMounted(!0), () => n.setTitleMounted(!1)), []), /* @__PURE__ */ P.createElement(qe, kxe({
    component: "h2",
    id: n.getTitleId(),
    className: l(a.title, o),
    ref: t
  }, i));
});
var Cxe = Ee((e, { padding: t }) => ({
  body: {
    padding: Re({ size: t, sizes: e.spacing }),
    "&:not(:only-child)": {
      paddingTop: 0
    }
  }
}));
const Pxe = Cxe;
var Rxe = Object.defineProperty, Qv = Object.getOwnPropertySymbols, _U = Object.prototype.hasOwnProperty, OU = Object.prototype.propertyIsEnumerable, FI = (e, t, n) => t in e ? Rxe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Txe = (e, t) => {
  for (var n in t || (t = {}))
    _U.call(t, n) && FI(e, n, t[n]);
  if (Qv)
    for (var n of Qv(t))
      OU.call(t, n) && FI(e, n, t[n]);
  return e;
}, jxe = (e, t) => {
  var n = {};
  for (var r in e)
    _U.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Qv)
    for (var r of Qv(e))
      t.indexOf(r) < 0 && OU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Nxe = {}, $xe = b.forwardRef((e, t) => {
  const n = af(), r = Te(`${n.__staticSelector}Body`, Nxe, e), { className: o } = r, i = jxe(r, ["className"]), { classes: a, cx: l } = Pxe({ padding: n.padding }, n.stylesApi);
  return b.useEffect(() => (n.setBodyMounted(!0), () => n.setBodyMounted(!1)), []), /* @__PURE__ */ P.createElement(qe, Txe({
    id: n.getBodyId(),
    className: l(a.body, o),
    ref: t
  }, i));
});
function Ixe({ children: e }) {
  return /* @__PURE__ */ P.createElement(P.Fragment, null, e);
}
function Axe({ opened: e, transitionDuration: t }) {
  const [n, r] = b.useState(e), o = b.useRef(), i = ef() ? 0 : t;
  return b.useEffect(() => (e ? (r(!0), window.clearTimeout(o.current)) : i === 0 ? r(!1) : o.current = window.setTimeout(() => r(!1), i), () => window.clearTimeout(o.current)), [e, i]), n;
}
var zxe = Ee(() => ({
  root: {}
})), Lxe = Object.defineProperty, Dxe = Object.defineProperties, Fxe = Object.getOwnPropertyDescriptors, Jv = Object.getOwnPropertySymbols, EU = Object.prototype.hasOwnProperty, CU = Object.prototype.propertyIsEnumerable, MI = (e, t, n) => t in e ? Lxe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b_ = (e, t) => {
  for (var n in t || (t = {}))
    EU.call(t, n) && MI(e, n, t[n]);
  if (Jv)
    for (var n of Jv(t))
      CU.call(t, n) && MI(e, n, t[n]);
  return e;
}, BI = (e, t) => Dxe(e, Fxe(t)), Mxe = (e, t) => {
  var n = {};
  for (var r in e)
    EU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Jv)
    for (var r of Jv(e))
      t.indexOf(r) < 0 && CU.call(e, r) && (n[r] = e[r]);
  return n;
};
const zP = {
  closeOnClickOutside: !0,
  withinPortal: !0,
  lockScroll: !0,
  trapFocus: !0,
  returnFocus: !0,
  closeOnEscape: !0,
  keepMounted: !1,
  zIndex: Ji("modal"),
  padding: "md",
  size: "md",
  shadow: "xl"
};
function vn(e) {
  const t = Te("ModalBase", zP, e), {
    opened: n,
    onClose: r,
    children: o,
    closeOnClickOutside: i,
    __staticSelector: a,
    transitionProps: l,
    withinPortal: s,
    portalProps: c,
    keepMounted: p,
    target: f,
    zIndex: m,
    lockScroll: h,
    trapFocus: g,
    closeOnEscape: v,
    returnFocus: S,
    padding: w,
    shadow: x,
    id: k,
    size: E,
    variant: O,
    classNames: C,
    unstyled: R,
    styles: L,
    className: D
  } = t, N = Mxe(t, [
    "opened",
    "onClose",
    "children",
    "closeOnClickOutside",
    "__staticSelector",
    "transitionProps",
    "withinPortal",
    "portalProps",
    "keepMounted",
    "target",
    "zIndex",
    "lockScroll",
    "trapFocus",
    "closeOnEscape",
    "returnFocus",
    "padding",
    "shadow",
    "id",
    "size",
    "variant",
    "classNames",
    "unstyled",
    "styles",
    "className"
  ]), { classes: H, cx: B } = zxe(null, {
    name: a,
    classNames: C,
    styles: L,
    unstyled: R,
    variant: O,
    size: E
  }), K = ea(k), [W, U] = b.useState(!1), [Q, J] = b.useState(!1), q = typeof (l == null ? void 0 : l.duration) == "number" ? l == null ? void 0 : l.duration : 200, ee = Axe({ opened: n, transitionDuration: q });
  return FO("keydown", (A) => {
    !g && A.key === "Escape" && v && r();
  }), o8({ opened: n, shouldReturnFocus: g && S }), /* @__PURE__ */ P.createElement(rf, BI(b_({}, c), {
    withinPortal: s,
    target: f
  }), /* @__PURE__ */ P.createElement(Nwe, {
    value: {
      __staticSelector: a,
      opened: n,
      onClose: r,
      closeOnClickOutside: i,
      transitionProps: BI(b_({}, l), { duration: q, keepMounted: p }),
      zIndex: m,
      padding: w,
      id: K,
      getTitleId: () => `${K}-title`,
      getBodyId: () => `${K}-body`,
      titleMounted: W,
      bodyMounted: Q,
      setTitleMounted: U,
      setBodyMounted: J,
      trapFocus: g,
      closeOnEscape: v,
      shadow: x,
      stylesApi: {
        name: a,
        size: E,
        variant: O,
        classNames: C,
        styles: L,
        unstyled: R
      }
    }
  }, /* @__PURE__ */ P.createElement(tue, {
    enabled: ee && h
  }, /* @__PURE__ */ P.createElement(qe, b_({
    className: B(H.root, D)
  }, N), o))));
}
vn.CloseButton = Fwe;
vn.Overlay = axe;
vn.Content = dxe;
vn.Header = bxe;
vn.Title = Exe;
vn.Body = $xe;
vn.NativeScrollArea = Ixe;
const Bxe = {
  gap: { type: "spacing", property: "gap" },
  rowGap: { type: "spacing", property: "rowGap" },
  columnGap: { type: "spacing", property: "columnGap" },
  align: { type: "identity", property: "alignItems" },
  justify: { type: "identity", property: "justifyContent" },
  wrap: { type: "identity", property: "flexWrap" },
  direction: { type: "identity", property: "flexDirection" }
};
var Uxe = Object.defineProperty, Hxe = Object.defineProperties, Wxe = Object.getOwnPropertyDescriptors, eb = Object.getOwnPropertySymbols, PU = Object.prototype.hasOwnProperty, RU = Object.prototype.propertyIsEnumerable, UI = (e, t, n) => t in e ? Uxe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Vxe = (e, t) => {
  for (var n in t || (t = {}))
    PU.call(t, n) && UI(e, n, t[n]);
  if (eb)
    for (var n of eb(t))
      RU.call(t, n) && UI(e, n, t[n]);
  return e;
}, qxe = (e, t) => Hxe(e, Wxe(t)), Gxe = (e, t) => {
  var n = {};
  for (var r in e)
    PU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && eb)
    for (var r of eb(e))
      t.indexOf(r) < 0 && RU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Kxe = {}, jt = b.forwardRef((e, t) => {
  const n = Te("Flex", Kxe, e), { gap: r, rowGap: o, columnGap: i, align: a, justify: l, wrap: s, direction: c, sx: p } = n, f = Gxe(n, ["gap", "rowGap", "columnGap", "align", "justify", "wrap", "direction", "sx"]);
  return /* @__PURE__ */ P.createElement(qe, qxe(Vxe({}, f), {
    sx: [
      { display: "flex" },
      (m) => MO({ gap: r, rowGap: o, columnGap: i, align: a, justify: l, wrap: s, direction: c }, m, Bxe),
      ...fx(p)
    ],
    ref: t
  }));
});
jt.displayName = "@mantine/core/Flex";
function Yxe(e) {
  return b.Children.toArray(e).filter(Boolean);
}
const TU = {
  left: "flex-start",
  center: "center",
  right: "flex-end",
  apart: "space-between"
};
var Xxe = Ee((e, { spacing: t, position: n, noWrap: r, grow: o, align: i, count: a }) => ({
  root: {
    boxSizing: "border-box",
    display: "flex",
    flexDirection: "row",
    alignItems: i || "center",
    flexWrap: r ? "nowrap" : "wrap",
    justifyContent: TU[n],
    gap: Re({ size: t, sizes: e.spacing }),
    "& > *": {
      boxSizing: "border-box",
      maxWidth: o ? `calc(${100 / a}% - (${F(Re({ size: t, sizes: e.spacing }))} - ${Re({ size: t, sizes: e.spacing })} / ${a}))` : void 0,
      flexGrow: o ? 1 : 0
    }
  }
}));
const Zxe = Xxe;
var Qxe = Object.defineProperty, tb = Object.getOwnPropertySymbols, jU = Object.prototype.hasOwnProperty, NU = Object.prototype.propertyIsEnumerable, HI = (e, t, n) => t in e ? Qxe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Jxe = (e, t) => {
  for (var n in t || (t = {}))
    jU.call(t, n) && HI(e, n, t[n]);
  if (tb)
    for (var n of tb(t))
      NU.call(t, n) && HI(e, n, t[n]);
  return e;
}, eSe = (e, t) => {
  var n = {};
  for (var r in e)
    jU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && tb)
    for (var r of tb(e))
      t.indexOf(r) < 0 && NU.call(e, r) && (n[r] = e[r]);
  return n;
};
const tSe = {
  position: "left",
  spacing: "md"
}, As = b.forwardRef((e, t) => {
  const n = Te("Group", tSe, e), {
    className: r,
    position: o,
    align: i,
    children: a,
    noWrap: l,
    grow: s,
    spacing: c,
    unstyled: p,
    variant: f
  } = n, m = eSe(n, [
    "className",
    "position",
    "align",
    "children",
    "noWrap",
    "grow",
    "spacing",
    "unstyled",
    "variant"
  ]), h = Yxe(a), { classes: g, cx: v } = Zxe({
    align: i,
    grow: s,
    noWrap: l,
    spacing: c,
    position: o,
    count: h.length
  }, { unstyled: p, name: "Group", variant: f });
  return /* @__PURE__ */ P.createElement(qe, Jxe({
    className: v(g.root, r),
    ref: t
  }, m), h);
});
As.displayName = "@mantine/core/Group";
function nSe({ open: e, close: t, openDelay: n, closeDelay: r }) {
  const o = b.useRef(-1), i = b.useRef(-1), a = () => {
    window.clearTimeout(o.current), window.clearTimeout(i.current);
  }, l = () => {
    a(), n === 0 ? e() : o.current = window.setTimeout(e, n);
  }, s = () => {
    a(), r === 0 ? t() : i.current = window.setTimeout(t, r);
  };
  return b.useEffect(() => a, []), { openDropdown: l, closeDropdown: s };
}
var rSe = Object.defineProperty, nb = Object.getOwnPropertySymbols, $U = Object.prototype.hasOwnProperty, IU = Object.prototype.propertyIsEnumerable, WI = (e, t, n) => t in e ? rSe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, VI = (e, t) => {
  for (var n in t || (t = {}))
    $U.call(t, n) && WI(e, n, t[n]);
  if (nb)
    for (var n of nb(t))
      IU.call(t, n) && WI(e, n, t[n]);
  return e;
}, oSe = (e, t) => {
  var n = {};
  for (var r in e)
    $U.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && nb)
    for (var r of nb(e))
      t.indexOf(r) < 0 && IU.call(e, r) && (n[r] = e[r]);
  return n;
};
function iSe(e) {
  const t = e, { width: n, height: r, style: o } = t, i = oSe(t, ["width", "height", "style"]);
  return /* @__PURE__ */ P.createElement("svg", VI({
    viewBox: "0 0 15 15",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    style: VI({ width: n, height: r }, o)
  }, i), /* @__PURE__ */ P.createElement("path", {
    d: "M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
var aSe = Object.defineProperty, lSe = Object.defineProperties, sSe = Object.getOwnPropertyDescriptors, qI = Object.getOwnPropertySymbols, uSe = Object.prototype.hasOwnProperty, cSe = Object.prototype.propertyIsEnumerable, GI = (e, t, n) => t in e ? aSe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, KI = (e, t) => {
  for (var n in t || (t = {}))
    uSe.call(t, n) && GI(e, n, t[n]);
  if (qI)
    for (var n of qI(t))
      cSe.call(t, n) && GI(e, n, t[n]);
  return e;
}, YI = (e, t) => lSe(e, sSe(t)), fSe = Ee((e, { radius: t }) => ({
  root: {},
  imageWrapper: {
    position: "relative"
  },
  figure: {
    margin: 0
  },
  image: YI(KI({}, e.fn.fontStyles()), {
    display: "block",
    width: "100%",
    height: "100%",
    border: 0,
    borderRadius: e.fn.radius(t)
  }),
  caption: {
    color: e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[7],
    marginTop: e.spacing.xs
  },
  placeholder: YI(KI({}, e.fn.cover()), {
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    color: e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6],
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[8] : e.colors.gray[0],
    borderRadius: e.fn.radius(t)
  })
})), dSe = Object.defineProperty, pSe = Object.defineProperties, mSe = Object.getOwnPropertyDescriptors, rb = Object.getOwnPropertySymbols, AU = Object.prototype.hasOwnProperty, zU = Object.prototype.propertyIsEnumerable, XI = (e, t, n) => t in e ? dSe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Jf = (e, t) => {
  for (var n in t || (t = {}))
    AU.call(t, n) && XI(e, n, t[n]);
  if (rb)
    for (var n of rb(t))
      zU.call(t, n) && XI(e, n, t[n]);
  return e;
}, hSe = (e, t) => pSe(e, mSe(t)), gSe = (e, t) => {
  var n = {};
  for (var r in e)
    AU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && rb)
    for (var r of rb(e))
      t.indexOf(r) < 0 && zU.call(e, r) && (n[r] = e[r]);
  return n;
};
const ySe = {
  fit: "cover",
  width: "100%",
  height: "auto",
  radius: 0
}, LU = b.forwardRef((e, t) => {
  const n = Te("Image", ySe, e), {
    className: r,
    alt: o,
    src: i,
    fit: a,
    width: l,
    height: s,
    radius: c,
    imageProps: p,
    withPlaceholder: f,
    placeholder: m,
    imageRef: h,
    classNames: g,
    styles: v,
    caption: S,
    unstyled: w,
    style: x,
    variant: k
  } = n, E = gSe(n, [
    "className",
    "alt",
    "src",
    "fit",
    "width",
    "height",
    "radius",
    "imageProps",
    "withPlaceholder",
    "placeholder",
    "imageRef",
    "classNames",
    "styles",
    "caption",
    "unstyled",
    "style",
    "variant"
  ]), { classes: O, cx: C } = fSe({ radius: c }, { classNames: g, styles: v, unstyled: w, name: "Image", variant: k }), [R, L] = b.useState(!i), D = f && R;
  return Hr(() => {
    L(!i);
  }, [i]), /* @__PURE__ */ P.createElement(qe, Jf({
    className: C(O.root, r),
    style: Jf({ width: F(l) }, x),
    ref: t
  }, E), /* @__PURE__ */ P.createElement("figure", {
    className: O.figure
  }, /* @__PURE__ */ P.createElement("div", {
    className: O.imageWrapper
  }, /* @__PURE__ */ P.createElement("img", hSe(Jf({
    src: i,
    alt: o,
    ref: h
  }, p), {
    className: C(O.image, p == null ? void 0 : p.className),
    onError: (N) => {
      L(!0), typeof (p == null ? void 0 : p.onError) == "function" && p.onError(N);
    },
    style: Jf(Jf({
      objectFit: a,
      width: F(l),
      height: F(s)
    }, D && { overflow: "hidden" }), p == null ? void 0 : p.style)
  })), D && /* @__PURE__ */ P.createElement("div", {
    className: O.placeholder,
    title: o
  }, m || /* @__PURE__ */ P.createElement("div", null, /* @__PURE__ */ P.createElement(iSe, {
    width: F(40),
    height: F(40)
  })))), !!S && /* @__PURE__ */ P.createElement(Ft, {
    component: "figcaption",
    size: "sm",
    align: "center",
    className: O.caption
  }, S)));
});
LU.displayName = "@mantine/core/Image";
function LP(e, t) {
  if (e == null)
    return {};
  var n = {}, r = Object.keys(e), o, i;
  for (i = 0; i < r.length; i++)
    o = r[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
  return n;
}
var vSe = b.useLayoutEffect, bSe = function(e) {
  var t = b.useRef(e);
  return vSe(function() {
    t.current = e;
  }), t;
}, ZI = function(e, t) {
  if (typeof e == "function") {
    e(t);
    return;
  }
  e.current = t;
}, wSe = function(e, t) {
  var n = b.useRef();
  return b.useCallback(function(r) {
    e.current = r, n.current && ZI(n.current, null), n.current = t, t && ZI(t, r);
  }, [t]);
}, QI = {
  "min-height": "0",
  "max-height": "none",
  height: "0",
  visibility: "hidden",
  overflow: "hidden",
  position: "absolute",
  "z-index": "-1000",
  top: "0",
  right: "0"
}, JI = function(e) {
  Object.keys(QI).forEach(function(t) {
    e.style.setProperty(t, QI[t], "important");
  });
}, Jr = null, xSe = function(e, t) {
  var n = e.scrollHeight;
  return t.sizingStyle.boxSizing === "border-box" ? n + t.borderSize : n - t.paddingSize;
};
function SSe(e, t, n, r) {
  n === void 0 && (n = 1), r === void 0 && (r = 1 / 0), Jr || (Jr = document.createElement("textarea"), Jr.setAttribute("tabindex", "-1"), Jr.setAttribute("aria-hidden", "true"), JI(Jr)), Jr.parentNode === null && document.body.appendChild(Jr);
  var o = e.paddingSize, i = e.borderSize, a = e.sizingStyle, l = a.boxSizing;
  Object.keys(a).forEach(function(m) {
    var h = m;
    Jr.style[h] = a[h];
  }), JI(Jr), Jr.value = t;
  var s = xSe(Jr, e);
  Jr.value = "x";
  var c = Jr.scrollHeight - o, p = c * n;
  l === "border-box" && (p = p + o + i), s = Math.max(p, s);
  var f = c * r;
  return l === "border-box" && (f = f + o + i), s = Math.min(f, s), [s, c];
}
var e5 = function() {
}, kSe = function(e, t) {
  return e.reduce(function(n, r) {
    return n[r] = t[r], n;
  }, {});
}, _Se = [
  "borderBottomWidth",
  "borderLeftWidth",
  "borderRightWidth",
  "borderTopWidth",
  "boxSizing",
  "fontFamily",
  "fontSize",
  "fontStyle",
  "fontWeight",
  "letterSpacing",
  "lineHeight",
  "paddingBottom",
  "paddingLeft",
  "paddingRight",
  "paddingTop",
  // non-standard
  "tabSize",
  "textIndent",
  // non-standard
  "textRendering",
  "textTransform",
  "width",
  "wordBreak"
], OSe = !!document.documentElement.currentStyle, ESe = function(e) {
  var t = window.getComputedStyle(e);
  if (t === null)
    return null;
  var n = kSe(_Se, t), r = n.boxSizing;
  if (r === "")
    return null;
  OSe && r === "border-box" && (n.width = parseFloat(n.width) + parseFloat(n.borderRightWidth) + parseFloat(n.borderLeftWidth) + parseFloat(n.paddingRight) + parseFloat(n.paddingLeft) + "px");
  var o = parseFloat(n.paddingBottom) + parseFloat(n.paddingTop), i = parseFloat(n.borderBottomWidth) + parseFloat(n.borderTopWidth);
  return {
    sizingStyle: n,
    paddingSize: o,
    borderSize: i
  };
}, CSe = function(e) {
  var t = bSe(e);
  b.useLayoutEffect(function() {
    var n = function(r) {
      t.current(r);
    };
    return window.addEventListener("resize", n), function() {
      window.removeEventListener("resize", n);
    };
  }, []);
}, PSe = function(e, t) {
  var n = e.cacheMeasurements, r = e.maxRows, o = e.minRows, i = e.onChange, a = i === void 0 ? e5 : i, l = e.onHeightChange, s = l === void 0 ? e5 : l, c = LP(e, ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"]), p = c.value !== void 0, f = b.useRef(null), m = wSe(f, t), h = b.useRef(0), g = b.useRef(), v = function() {
    var w = f.current, x = n && g.current ? g.current : ESe(w);
    if (x) {
      g.current = x;
      var k = SSe(x, w.value || w.placeholder || "x", o, r), E = k[0], O = k[1];
      h.current !== E && (h.current = E, w.style.setProperty("height", E + "px", "important"), s(E, {
        rowHeight: O
      }));
    }
  }, S = function(w) {
    p || v(), a(w);
  };
  return b.useLayoutEffect(v), CSe(v), /* @__PURE__ */ b.createElement("textarea", qt({}, c, {
    onChange: S,
    ref: m
  }));
}, RSe = /* @__PURE__ */ b.forwardRef(PSe);
const TSe = RSe;
var jSe = Ee((e) => ({
  input: {
    paddingTop: e.spacing.xs,
    paddingBottom: e.spacing.xs
  }
})), NSe = Object.defineProperty, $Se = Object.defineProperties, ISe = Object.getOwnPropertyDescriptors, ob = Object.getOwnPropertySymbols, DU = Object.prototype.hasOwnProperty, FU = Object.prototype.propertyIsEnumerable, t5 = (e, t, n) => t in e ? NSe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Tu = (e, t) => {
  for (var n in t || (t = {}))
    DU.call(t, n) && t5(e, n, t[n]);
  if (ob)
    for (var n of ob(t))
      FU.call(t, n) && t5(e, n, t[n]);
  return e;
}, w_ = (e, t) => $Se(e, ISe(t)), ASe = (e, t) => {
  var n = {};
  for (var r in e)
    DU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ob)
    for (var r of ob(e))
      t.indexOf(r) < 0 && FU.call(e, r) && (n[r] = e[r]);
  return n;
};
const zSe = {
  autosize: !1,
  size: "sm",
  __staticSelector: "Textarea"
}, Bl = b.forwardRef((e, t) => {
  const n = Te("Textarea", zSe, e), {
    autosize: r,
    maxRows: o,
    minRows: i,
    label: a,
    error: l,
    description: s,
    id: c,
    className: p,
    required: f,
    style: m,
    wrapperProps: h,
    classNames: g,
    styles: v,
    size: S,
    __staticSelector: w,
    sx: x,
    errorProps: k,
    descriptionProps: E,
    labelProps: O,
    inputWrapperOrder: C,
    inputContainer: R,
    unstyled: L,
    withAsterisk: D,
    variant: N
  } = n, H = ASe(n, [
    "autosize",
    "maxRows",
    "minRows",
    "label",
    "error",
    "description",
    "id",
    "className",
    "required",
    "style",
    "wrapperProps",
    "classNames",
    "styles",
    "size",
    "__staticSelector",
    "sx",
    "errorProps",
    "descriptionProps",
    "labelProps",
    "inputWrapperOrder",
    "inputContainer",
    "unstyled",
    "withAsterisk",
    "variant"
  ]), B = ea(c), { classes: K, cx: W } = jSe(), { systemStyles: U, rest: Q } = tf(H), J = Tu({
    required: f,
    ref: t,
    error: l,
    id: B,
    classNames: w_(Tu({}, g), { input: W(K.input, g == null ? void 0 : g.input) }),
    styles: v,
    __staticSelector: w,
    size: S,
    multiline: !0,
    unstyled: L,
    variant: N
  }, Q);
  return /* @__PURE__ */ P.createElement(Uo.Wrapper, Tu(Tu({
    label: a,
    error: l,
    id: B,
    description: s,
    required: f,
    style: m,
    className: p,
    classNames: g,
    styles: v,
    size: S,
    __staticSelector: w,
    sx: x,
    errorProps: k,
    labelProps: O,
    descriptionProps: E,
    inputContainer: R,
    inputWrapperOrder: C,
    unstyled: L,
    withAsterisk: D,
    variant: N
  }, U), h), r ? /* @__PURE__ */ P.createElement(Uo, w_(Tu({}, J), {
    component: TSe,
    maxRows: o,
    minRows: i
  })) : /* @__PURE__ */ P.createElement(Uo, w_(Tu({}, J), {
    component: "textarea",
    rows: i
  })));
});
Bl.displayName = "@mantine/core/Textarea";
var LSe = Object.defineProperty, DSe = Object.defineProperties, FSe = Object.getOwnPropertyDescriptors, n5 = Object.getOwnPropertySymbols, MSe = Object.prototype.hasOwnProperty, BSe = Object.prototype.propertyIsEnumerable, r5 = (e, t, n) => t in e ? LSe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, USe = (e, t) => {
  for (var n in t || (t = {}))
    MSe.call(t, n) && r5(e, n, t[n]);
  if (n5)
    for (var n of n5(t))
      BSe.call(t, n) && r5(e, n, t[n]);
  return e;
}, HSe = (e, t) => DSe(e, FSe(t)), WSe = Ee((e) => ({
  root: HSe(USe({}, e.fn.cover()), {
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    overflow: "hidden"
  })
})), VSe = Object.defineProperty, qSe = Object.defineProperties, GSe = Object.getOwnPropertyDescriptors, ib = Object.getOwnPropertySymbols, MU = Object.prototype.hasOwnProperty, BU = Object.prototype.propertyIsEnumerable, o5 = (e, t, n) => t in e ? VSe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ih = (e, t) => {
  for (var n in t || (t = {}))
    MU.call(t, n) && o5(e, n, t[n]);
  if (ib)
    for (var n of ib(t))
      BU.call(t, n) && o5(e, n, t[n]);
  return e;
}, KSe = (e, t) => qSe(e, GSe(t)), YSe = (e, t) => {
  var n = {};
  for (var r in e)
    MU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ib)
    for (var r of ib(e))
      t.indexOf(r) < 0 && BU.call(e, r) && (n[r] = e[r]);
  return n;
};
const XSe = {
  overlayOpacity: 0.75,
  transitionDuration: 0,
  radius: 0,
  zIndex: Ji("overlay")
}, UU = b.forwardRef((e, t) => {
  const n = Te("LoadingOverlay", XSe, e), {
    className: r,
    visible: o,
    loaderProps: i,
    overlayOpacity: a,
    overlayColor: l,
    transitionDuration: s,
    exitTransitionDuration: c,
    zIndex: p,
    style: f,
    loader: m,
    radius: h,
    overlayBlur: g,
    unstyled: v,
    variant: S,
    keepMounted: w
  } = n, x = YSe(n, [
    "className",
    "visible",
    "loaderProps",
    "overlayOpacity",
    "overlayColor",
    "transitionDuration",
    "exitTransitionDuration",
    "zIndex",
    "style",
    "loader",
    "radius",
    "overlayBlur",
    "unstyled",
    "variant",
    "keepMounted"
  ]), { classes: k, cx: E, theme: O } = WSe(null, { name: "LoadingOverlay", unstyled: v, variant: S }), C = `calc(${p} + 1)`;
  return /* @__PURE__ */ P.createElement(Zs, {
    keepMounted: w,
    duration: s,
    exitDuration: c,
    mounted: o,
    transition: "fade"
  }, (R) => /* @__PURE__ */ P.createElement(qe, Ih({
    className: E(k.root, r),
    style: KSe(Ih(Ih({}, R), f), { zIndex: p }),
    ref: t
  }, x), m ? /* @__PURE__ */ P.createElement("div", {
    style: { zIndex: C }
  }, m) : /* @__PURE__ */ P.createElement(nf, Ih({
    style: { zIndex: C }
  }, i)), /* @__PURE__ */ P.createElement(hU, {
    opacity: a,
    zIndex: p,
    radius: h,
    blur: g,
    unstyled: v,
    color: l || (O.colorScheme === "dark" ? O.colors.dark[5] : O.white)
  })));
});
UU.displayName = "@mantine/core/LoadingOverlay";
const HU = {
  context: "Menu component was not found in the tree",
  children: "Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
}, [ZSe, Mp] = Gl(HU.context);
var QSe = Ee((e) => ({
  divider: {
    marginTop: F(4),
    marginBottom: F(4),
    borderTop: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]}`
  }
})), JSe = Object.defineProperty, ab = Object.getOwnPropertySymbols, WU = Object.prototype.hasOwnProperty, VU = Object.prototype.propertyIsEnumerable, i5 = (e, t, n) => t in e ? JSe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, eke = (e, t) => {
  for (var n in t || (t = {}))
    WU.call(t, n) && i5(e, n, t[n]);
  if (ab)
    for (var n of ab(t))
      VU.call(t, n) && i5(e, n, t[n]);
  return e;
}, tke = (e, t) => {
  var n = {};
  for (var r in e)
    WU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ab)
    for (var r of ab(e))
      t.indexOf(r) < 0 && VU.call(e, r) && (n[r] = e[r]);
  return n;
};
const nke = {}, qU = b.forwardRef((e, t) => {
  const n = Te("MenuDivider", nke, e), { children: r, className: o } = n, i = tke(n, ["children", "className"]), { classNames: a, styles: l, unstyled: s, variant: c } = Mp(), { classes: p, cx: f } = QSe(null, { name: "Menu", classNames: a, styles: l, unstyled: s, variant: c });
  return /* @__PURE__ */ P.createElement(qe, eke({
    className: f(p.divider, o),
    ref: t
  }, i));
});
qU.displayName = "@mantine/core/MenuDivider";
var rke = Object.defineProperty, lb = Object.getOwnPropertySymbols, GU = Object.prototype.hasOwnProperty, KU = Object.prototype.propertyIsEnumerable, a5 = (e, t, n) => t in e ? rke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, oke = (e, t) => {
  for (var n in t || (t = {}))
    GU.call(t, n) && a5(e, n, t[n]);
  if (lb)
    for (var n of lb(t))
      KU.call(t, n) && a5(e, n, t[n]);
  return e;
}, ike = (e, t) => {
  var n = {};
  for (var r in e)
    GU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && lb)
    for (var r of lb(e))
      t.indexOf(r) < 0 && KU.call(e, r) && (n[r] = e[r]);
  return n;
};
const ake = {};
function YU(e) {
  const t = Te("MenuDropdown", ake, e), { children: n, onMouseEnter: r, onMouseLeave: o } = t, i = ike(t, ["children", "onMouseEnter", "onMouseLeave"]), a = b.useRef(), l = Mp(), s = (f) => {
    var m;
    (f.key === "ArrowUp" || f.key === "ArrowDown") && (f.preventDefault(), (m = a.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0]) == null || m.focus());
  }, c = wa(r, () => l.trigger === "hover" && l.openDropdown()), p = wa(o, () => l.trigger === "hover" && l.closeDropdown());
  return /* @__PURE__ */ P.createElement(Ma.Dropdown, oke({
    onMouseEnter: c,
    onMouseLeave: p,
    role: "menu",
    "aria-orientation": "vertical"
  }, i), /* @__PURE__ */ P.createElement("div", {
    tabIndex: -1,
    "data-menu-dropdown": !0,
    "data-autofocus": !0,
    onKeyDown: s,
    ref: a,
    style: { outline: 0 }
  }, n));
}
YU.displayName = "@mantine/core/MenuDropdown";
var lke = Object.defineProperty, ske = Object.defineProperties, uke = Object.getOwnPropertyDescriptors, l5 = Object.getOwnPropertySymbols, cke = Object.prototype.hasOwnProperty, fke = Object.prototype.propertyIsEnumerable, s5 = (e, t, n) => t in e ? lke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, dke = (e, t) => {
  for (var n in t || (t = {}))
    cke.call(t, n) && s5(e, n, t[n]);
  if (l5)
    for (var n of l5(t))
      fke.call(t, n) && s5(e, n, t[n]);
  return e;
}, pke = (e, t) => ske(e, uke(t)), mke = Ee((e, { color: t, radius: n }) => ({
  item: pke(dke({}, e.fn.fontStyles()), {
    WebkitTapHighlightColor: "transparent",
    fontSize: e.fontSizes.sm,
    border: 0,
    backgroundColor: "transparent",
    outline: 0,
    width: "100%",
    textAlign: "left",
    textDecoration: "none",
    boxSizing: "border-box",
    padding: `${e.spacing.xs} ${e.spacing.sm}`,
    cursor: "pointer",
    borderRadius: e.fn.radius(n),
    color: t ? e.fn.variant({ variant: "filled", primaryFallback: !1, color: t }).background : e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    display: "flex",
    alignItems: "center",
    "&:disabled": {
      color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5],
      pointerEvents: "none",
      userSelect: "none"
    },
    "&[data-hovered]": {
      backgroundColor: t ? e.fn.variant({ variant: "light", color: t }).background : e.colorScheme === "dark" ? e.fn.rgba(e.colors.dark[3], 0.35) : e.colors.gray[1]
    }
  }),
  itemLabel: {
    flex: 1
  },
  itemIcon: {
    display: "flex",
    justifyContent: "center",
    alignItems: "center",
    marginRight: e.spacing.xs
  },
  itemRightSection: {}
}));
const hke = mke;
var gke = Object.defineProperty, yke = Object.defineProperties, vke = Object.getOwnPropertyDescriptors, sb = Object.getOwnPropertySymbols, XU = Object.prototype.hasOwnProperty, ZU = Object.prototype.propertyIsEnumerable, u5 = (e, t, n) => t in e ? gke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, bke = (e, t) => {
  for (var n in t || (t = {}))
    XU.call(t, n) && u5(e, n, t[n]);
  if (sb)
    for (var n of sb(t))
      ZU.call(t, n) && u5(e, n, t[n]);
  return e;
}, wke = (e, t) => yke(e, vke(t)), xke = (e, t) => {
  var n = {};
  for (var r in e)
    XU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && sb)
    for (var r of sb(e))
      t.indexOf(r) < 0 && ZU.call(e, r) && (n[r] = e[r]);
  return n;
};
const Ske = {}, QU = b.forwardRef((e, t) => {
  const n = Te("MenuItem", Ske, e), { children: r, className: o, color: i, closeMenuOnClick: a, icon: l, rightSection: s } = n, c = xke(n, ["children", "className", "color", "closeMenuOnClick", "icon", "rightSection"]), p = Mp(), { classes: f, cx: m, theme: h } = hke({ radius: p.radius, color: i }, {
    name: "Menu",
    classNames: p.classNames,
    styles: p.styles,
    unstyled: p.unstyled,
    variant: p.variant
  }), g = b.useRef(), v = p.getItemIndex(g.current), S = c, w = wa(S.onMouseLeave, () => p.setHovered(-1)), x = wa(S.onMouseEnter, () => p.setHovered(p.getItemIndex(g.current))), k = wa(S.onClick, () => {
    typeof a == "boolean" ? a && p.closeDropdownImmediately() : p.closeOnItemClick && p.closeDropdownImmediately();
  }), E = wa(S.onFocus, () => p.setHovered(p.getItemIndex(g.current)));
  return /* @__PURE__ */ P.createElement(qe, wke(bke({
    component: "button",
    type: "button"
  }, c), {
    tabIndex: -1,
    onFocus: E,
    className: m(f.item, o),
    ref: ta(g, t),
    role: "menuitem",
    "data-menu-item": !0,
    "data-hovered": p.hovered === v ? !0 : void 0,
    onMouseEnter: x,
    onMouseLeave: w,
    onClick: k,
    onKeyDown: tP({
      siblingSelector: "[data-menu-item]",
      parentSelector: "[data-menu-dropdown]",
      activateOnFocus: !1,
      loop: p.loop,
      dir: h.dir,
      orientation: "vertical",
      onKeyDown: S.onKeydown
    })
  }), l && /* @__PURE__ */ P.createElement("div", {
    className: f.itemIcon
  }, l), r && /* @__PURE__ */ P.createElement("div", {
    className: f.itemLabel
  }, r), s && /* @__PURE__ */ P.createElement("div", {
    className: f.itemRightSection
  }, s));
});
QU.displayName = "@mantine/core/MenuItem";
const kke = QU;
var _ke = Ee((e) => ({
  label: {
    color: e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6],
    fontWeight: 500,
    fontSize: e.fontSizes.xs,
    padding: `calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,
    cursor: "default"
  }
})), Oke = Object.defineProperty, ub = Object.getOwnPropertySymbols, JU = Object.prototype.hasOwnProperty, eH = Object.prototype.propertyIsEnumerable, c5 = (e, t, n) => t in e ? Oke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Eke = (e, t) => {
  for (var n in t || (t = {}))
    JU.call(t, n) && c5(e, n, t[n]);
  if (ub)
    for (var n of ub(t))
      eH.call(t, n) && c5(e, n, t[n]);
  return e;
}, Cke = (e, t) => {
  var n = {};
  for (var r in e)
    JU.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ub)
    for (var r of ub(e))
      t.indexOf(r) < 0 && eH.call(e, r) && (n[r] = e[r]);
  return n;
};
const Pke = {}, tH = b.forwardRef((e, t) => {
  const n = Te("MenuLabel", Pke, e), { children: r, className: o } = n, i = Cke(n, ["children", "className"]), { classNames: a, styles: l, unstyled: s, variant: c } = Mp(), { classes: p, cx: f } = _ke(null, { name: "Menu", classNames: a, styles: l, unstyled: s, variant: c });
  return /* @__PURE__ */ P.createElement(Ft, Eke({
    className: f(p.label, o),
    ref: t
  }, i), r);
});
tH.displayName = "@mantine/core/MenuLabel";
var Rke = Object.defineProperty, cb = Object.getOwnPropertySymbols, nH = Object.prototype.hasOwnProperty, rH = Object.prototype.propertyIsEnumerable, f5 = (e, t, n) => t in e ? Rke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Tke = (e, t) => {
  for (var n in t || (t = {}))
    nH.call(t, n) && f5(e, n, t[n]);
  if (cb)
    for (var n of cb(t))
      rH.call(t, n) && f5(e, n, t[n]);
  return e;
}, jke = (e, t) => {
  var n = {};
  for (var r in e)
    nH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && cb)
    for (var r of cb(e))
      t.indexOf(r) < 0 && rH.call(e, r) && (n[r] = e[r]);
  return n;
};
const Nke = {
  refProp: "ref"
}, oH = b.forwardRef((e, t) => {
  const n = Te("MenuTarget", Nke, e), { children: r, refProp: o } = n, i = jke(n, ["children", "refProp"]);
  if (!Qc(r))
    throw new Error(HU.children);
  const a = Mp(), l = wa(r.props.onClick, () => a.trigger === "click" && a.toggleDropdown()), s = wa(r.props.onMouseEnter, () => a.trigger === "hover" && a.openDropdown()), c = wa(r.props.onMouseLeave, () => a.trigger === "hover" && a.closeDropdown());
  return /* @__PURE__ */ P.createElement(Ma.Target, Tke({
    refProp: o,
    popupType: "menu",
    ref: t
  }, i), b.cloneElement(r, {
    onClick: l,
    onMouseEnter: s,
    onMouseLeave: c,
    "data-expanded": a.opened ? !0 : void 0
  }));
});
oH.displayName = "@mantine/core/MenuTarget";
var $ke = Ee({
  dropdown: { padding: F(4) }
}), Ike = Object.defineProperty, Ake = Object.defineProperties, zke = Object.getOwnPropertyDescriptors, fb = Object.getOwnPropertySymbols, iH = Object.prototype.hasOwnProperty, aH = Object.prototype.propertyIsEnumerable, d5 = (e, t, n) => t in e ? Ike(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, p5 = (e, t) => {
  for (var n in t || (t = {}))
    iH.call(t, n) && d5(e, n, t[n]);
  if (fb)
    for (var n of fb(t))
      aH.call(t, n) && d5(e, n, t[n]);
  return e;
}, m5 = (e, t) => Ake(e, zke(t)), Lke = (e, t) => {
  var n = {};
  for (var r in e)
    iH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && fb)
    for (var r of fb(e))
      t.indexOf(r) < 0 && aH.call(e, r) && (n[r] = e[r]);
  return n;
};
const Dke = {
  closeOnItemClick: !0,
  loop: !0,
  trigger: "click",
  openDelay: 0,
  closeDelay: 100
};
function xr(e) {
  const t = Te("Menu", Dke, e), {
    children: n,
    onOpen: r,
    onClose: o,
    opened: i,
    defaultOpened: a,
    onChange: l,
    closeOnItemClick: s,
    loop: c,
    closeOnEscape: p,
    trigger: f,
    openDelay: m,
    closeDelay: h,
    classNames: g,
    styles: v,
    unstyled: S,
    radius: w,
    variant: x
  } = t, k = Lke(t, [
    "children",
    "onOpen",
    "onClose",
    "opened",
    "defaultOpened",
    "onChange",
    "closeOnItemClick",
    "loop",
    "closeOnEscape",
    "trigger",
    "openDelay",
    "closeDelay",
    "classNames",
    "styles",
    "unstyled",
    "radius",
    "variant"
  ]), { classes: E, cx: O } = $ke(), [C, { setHovered: R, resetHovered: L }] = sue(), [D, N] = Xi({
    value: i,
    defaultValue: a,
    finalValue: !1,
    onChange: l
  }), H = () => {
    N(!1), D && (o == null || o());
  }, B = () => {
    N(!0), !D && (r == null || r());
  }, K = () => D ? H() : B(), { openDropdown: W, closeDropdown: U } = nSe({ open: B, close: H, closeDelay: h, openDelay: m }), Q = (J) => iue("[data-menu-item]", "[data-menu-dropdown]", J);
  return Hr(() => {
    L();
  }, [D]), /* @__PURE__ */ P.createElement(ZSe, {
    value: {
      opened: D,
      toggleDropdown: K,
      getItemIndex: Q,
      hovered: C,
      setHovered: R,
      closeOnItemClick: s,
      closeDropdown: f === "click" ? H : U,
      openDropdown: f === "click" ? B : W,
      closeDropdownImmediately: H,
      loop: c,
      trigger: f,
      radius: w,
      classNames: g,
      styles: v,
      unstyled: S,
      variant: x
    }
  }, /* @__PURE__ */ P.createElement(Ma, m5(p5({}, k), {
    radius: w,
    opened: D,
    onChange: K,
    defaultOpened: a,
    trapFocus: f === "click",
    closeOnEscape: p && f === "click",
    __staticSelector: "Menu",
    classNames: m5(p5({}, g), { dropdown: O(E.dropdown, g == null ? void 0 : g.dropdown) }),
    styles: v,
    unstyled: S,
    variant: x
  }), n));
}
xr.displayName = "@mantine/core/Menu";
xr.Item = kke;
xr.Label = tH;
xr.Dropdown = YU;
xr.Target = oH;
xr.Divider = qU;
const [Fke, Mke] = Gl("Modal component was not found in tree"), Bke = {
  xs: F(320),
  sm: F(380),
  md: F(440),
  lg: F(620),
  xl: F(780)
};
var Uke = Ee((e, { yOffset: t, xOffset: n, centered: r, fullScreen: o }, { size: i }) => ({
  content: {
    flex: o ? "0 0 100%" : `0 0 ${Re({ size: i, sizes: Bke })}`,
    maxWidth: "100%",
    maxHeight: o ? void 0 : `calc(100dvh - (${F(t)} * 2))`,
    height: o ? "100vh" : void 0,
    borderRadius: o ? 0 : void 0,
    overflowY: "auto"
  },
  inner: {
    paddingTop: o ? 0 : t,
    paddingBottom: o ? 0 : t,
    paddingLeft: o ? 0 : n,
    paddingRight: o ? 0 : n,
    display: "flex",
    justifyContent: "center",
    alignItems: r ? "center" : "flex-start"
  }
})), Hke = Object.defineProperty, Wke = Object.defineProperties, Vke = Object.getOwnPropertyDescriptors, db = Object.getOwnPropertySymbols, lH = Object.prototype.hasOwnProperty, sH = Object.prototype.propertyIsEnumerable, h5 = (e, t, n) => t in e ? Hke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, YO = (e, t) => {
  for (var n in t || (t = {}))
    lH.call(t, n) && h5(e, n, t[n]);
  if (db)
    for (var n of db(t))
      sH.call(t, n) && h5(e, n, t[n]);
  return e;
}, uH = (e, t) => Wke(e, Vke(t)), qke = (e, t) => {
  var n = {};
  for (var r in e)
    lH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && db)
    for (var r of db(e))
      t.indexOf(r) < 0 && sH.call(e, r) && (n[r] = e[r]);
  return n;
};
const Gke = uH(YO({}, zP), {
  yOffset: "5dvh",
  xOffset: "5vw"
});
function cH(e) {
  const t = Te("ModalRoot", Gke, e), {
    classNames: n,
    variant: r,
    size: o,
    yOffset: i,
    xOffset: a,
    scrollAreaComponent: l,
    radius: s,
    centered: c,
    fullScreen: p
  } = t, f = qke(t, [
    "classNames",
    "variant",
    "size",
    "yOffset",
    "xOffset",
    "scrollAreaComponent",
    "radius",
    "centered",
    "fullScreen"
  ]), { classes: m, cx: h } = Uke({ yOffset: i, xOffset: a, centered: c, fullScreen: p }, { name: "Modal", variant: r, size: o });
  return /* @__PURE__ */ P.createElement(Fke, {
    value: { yOffset: i, scrollAreaComponent: l, radius: s }
  }, /* @__PURE__ */ P.createElement(vn, YO({
    __staticSelector: "Modal",
    size: o,
    variant: r,
    classNames: uH(YO({}, n), {
      content: h(m.content, n == null ? void 0 : n.content),
      inner: h(m.inner, n == null ? void 0 : n.inner)
    })
  }, f)));
}
var Kke = Object.defineProperty, pb = Object.getOwnPropertySymbols, fH = Object.prototype.hasOwnProperty, dH = Object.prototype.propertyIsEnumerable, g5 = (e, t, n) => t in e ? Kke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Yke = (e, t) => {
  for (var n in t || (t = {}))
    fH.call(t, n) && g5(e, n, t[n]);
  if (pb)
    for (var n of pb(t))
      dH.call(t, n) && g5(e, n, t[n]);
  return e;
}, Xke = (e, t) => {
  var n = {};
  for (var r in e)
    fH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && pb)
    for (var r of pb(e))
      t.indexOf(r) < 0 && dH.call(e, r) && (n[r] = e[r]);
  return n;
};
const Zke = {
  shadow: "xl"
}, pH = b.forwardRef((e, t) => {
  const n = Te("ModalContent", Zke, e), { children: r, scrollAreaComponent: o } = n, i = Xke(n, ["children", "scrollAreaComponent"]), a = Mke(), l = o || a.scrollAreaComponent || vn.NativeScrollArea;
  return /* @__PURE__ */ P.createElement(vn.Content, Yke({
    ref: t,
    radius: a.radius
  }, i), /* @__PURE__ */ P.createElement(l, {
    style: { maxHeight: `calc(100dvh - (${F(a.yOffset)} * 2))` }
  }, r));
});
var Qke = Object.defineProperty, Jke = Object.defineProperties, e_e = Object.getOwnPropertyDescriptors, mb = Object.getOwnPropertySymbols, mH = Object.prototype.hasOwnProperty, hH = Object.prototype.propertyIsEnumerable, y5 = (e, t, n) => t in e ? Qke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Kg = (e, t) => {
  for (var n in t || (t = {}))
    mH.call(t, n) && y5(e, n, t[n]);
  if (mb)
    for (var n of mb(t))
      hH.call(t, n) && y5(e, n, t[n]);
  return e;
}, t_e = (e, t) => Jke(e, e_e(t)), n_e = (e, t) => {
  var n = {};
  for (var r in e)
    mH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && mb)
    for (var r of mb(e))
      t.indexOf(r) < 0 && hH.call(e, r) && (n[r] = e[r]);
  return n;
};
const r_e = t_e(Kg({}, zP), {
  transitionProps: { duration: 200, transition: "pop" },
  withOverlay: !0,
  withCloseButton: !0
});
function Ba(e) {
  const t = Te("Modal", r_e, e), {
    title: n,
    withOverlay: r,
    overlayProps: o,
    withCloseButton: i,
    closeButtonProps: a,
    children: l
  } = t, s = n_e(t, [
    "title",
    "withOverlay",
    "overlayProps",
    "withCloseButton",
    "closeButtonProps",
    "children"
  ]), c = !!n || i;
  return /* @__PURE__ */ P.createElement(cH, Kg({}, s), r && /* @__PURE__ */ P.createElement(vn.Overlay, Kg({}, o)), /* @__PURE__ */ P.createElement(pH, null, c && /* @__PURE__ */ P.createElement(vn.Header, null, n && /* @__PURE__ */ P.createElement(vn.Title, null, n), i && /* @__PURE__ */ P.createElement(vn.CloseButton, Kg({}, a))), /* @__PURE__ */ P.createElement(vn.Body, null, l)));
}
Ba.Root = cH;
Ba.CloseButton = vn.CloseButton;
Ba.Overlay = vn.Overlay;
Ba.Content = pH;
Ba.Header = vn.Header;
Ba.Title = vn.Title;
Ba.Body = vn.Body;
Ba.NativeScrollArea = vn.NativeScrollArea;
var o_e = Object.defineProperty, hb = Object.getOwnPropertySymbols, gH = Object.prototype.hasOwnProperty, yH = Object.prototype.propertyIsEnumerable, v5 = (e, t, n) => t in e ? o_e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b5 = (e, t) => {
  for (var n in t || (t = {}))
    gH.call(t, n) && v5(e, n, t[n]);
  if (hb)
    for (var n of hb(t))
      yH.call(t, n) && v5(e, n, t[n]);
  return e;
}, i_e = (e, t) => {
  var n = {};
  for (var r in e)
    gH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && hb)
    for (var r of hb(e))
      t.indexOf(r) < 0 && yH.call(e, r) && (n[r] = e[r]);
  return n;
};
const a_e = {
  xs: F(14),
  sm: F(18),
  md: F(20),
  lg: F(24),
  xl: F(28)
};
function l_e(e) {
  var t = e, { size: n, error: r, style: o } = t, i = i_e(t, ["size", "error", "style"]);
  const a = Yn(), l = Re({ size: n, sizes: a_e });
  return /* @__PURE__ */ P.createElement("svg", b5({
    viewBox: "0 0 15 15",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    style: b5({
      color: r ? a.colors.red[6] : a.colors.gray[6],
      width: l,
      height: l
    }, o),
    "data-chevron": !0
  }, i), /* @__PURE__ */ P.createElement("path", {
    d: "M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
var s_e = Object.defineProperty, u_e = Object.defineProperties, c_e = Object.getOwnPropertyDescriptors, w5 = Object.getOwnPropertySymbols, f_e = Object.prototype.hasOwnProperty, d_e = Object.prototype.propertyIsEnumerable, x5 = (e, t, n) => t in e ? s_e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, p_e = (e, t) => {
  for (var n in t || (t = {}))
    f_e.call(t, n) && x5(e, n, t[n]);
  if (w5)
    for (var n of w5(t))
      d_e.call(t, n) && x5(e, n, t[n]);
  return e;
}, m_e = (e, t) => u_e(e, c_e(t));
function vH({
  shouldClear: e,
  clearButtonProps: t,
  onClear: n,
  size: r,
  error: o
}) {
  return e ? /* @__PURE__ */ P.createElement(bx, m_e(p_e({}, t), {
    variant: "transparent",
    onClick: n,
    size: r,
    onMouseDown: (i) => i.preventDefault()
  })) : /* @__PURE__ */ P.createElement(l_e, {
    error: o,
    size: r
  });
}
vH.displayName = "@mantine/core/SelectRightSection";
var h_e = Object.defineProperty, g_e = Object.defineProperties, y_e = Object.getOwnPropertyDescriptors, gb = Object.getOwnPropertySymbols, bH = Object.prototype.hasOwnProperty, wH = Object.prototype.propertyIsEnumerable, S5 = (e, t, n) => t in e ? h_e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, x_ = (e, t) => {
  for (var n in t || (t = {}))
    bH.call(t, n) && S5(e, n, t[n]);
  if (gb)
    for (var n of gb(t))
      wH.call(t, n) && S5(e, n, t[n]);
  return e;
}, k5 = (e, t) => g_e(e, y_e(t)), v_e = (e, t) => {
  var n = {};
  for (var r in e)
    bH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && gb)
    for (var r of gb(e))
      t.indexOf(r) < 0 && wH.call(e, r) && (n[r] = e[r]);
  return n;
};
function b_e(e) {
  var t = e, {
    styles: n,
    rightSection: r,
    rightSectionWidth: o,
    theme: i
  } = t, a = v_e(t, [
    "styles",
    "rightSection",
    "rightSectionWidth",
    "theme"
  ]);
  if (r)
    return { rightSection: r, rightSectionWidth: o, styles: n };
  const l = typeof n == "function" ? n(i) : n;
  return {
    rightSection: !a.readOnly && !(a.disabled && a.shouldClear) && /* @__PURE__ */ P.createElement(vH, x_({}, a)),
    styles: k5(x_({}, l), {
      rightSection: k5(x_({}, l == null ? void 0 : l.rightSection), {
        pointerEvents: a.shouldClear ? void 0 : "none"
      })
    })
  };
}
var w_e = Ee((e, { color: t, radius: n, withTitle: r }) => {
  const o = e.fn.radius(n), i = e.fn.variant({ variant: "filled", color: t });
  return {
    closeButton: e.fn.hover({
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[8] : e.colors.gray[0]
    }),
    icon: {
      boxSizing: "border-box",
      marginRight: e.spacing.md,
      width: F(28),
      height: F(28),
      borderRadius: F(28),
      display: "flex",
      flex: "none",
      alignItems: "center",
      justifyContent: "center",
      backgroundColor: i.background,
      color: e.white
    },
    root: {
      overflow: "hidden",
      boxSizing: "border-box",
      position: "relative",
      display: "flex",
      alignItems: "center",
      paddingLeft: F(22),
      paddingRight: e.spacing.xs,
      paddingTop: e.spacing.xs,
      paddingBottom: e.spacing.xs,
      borderRadius: o,
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
      boxShadow: e.shadows.lg,
      "&::before": {
        content: '""',
        display: "block",
        position: "absolute",
        width: F(6),
        top: o,
        bottom: o,
        left: F(4),
        borderRadius: o,
        backgroundColor: i.background
      },
      "&[data-with-icon]": {
        paddingLeft: e.spacing.xs,
        "&::before": {
          display: "none"
        }
      },
      "&[data-with-border]": {
        border: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`
      }
    },
    body: {
      flex: 1,
      overflow: "hidden",
      marginRight: e.spacing.xs
    },
    loader: {
      marginRight: e.spacing.md
    },
    title: {
      lineHeight: 1.4,
      marginBottom: F(2),
      overflow: "hidden",
      textOverflow: "ellipsis",
      color: e.colorScheme === "dark" ? e.white : e.colors.gray[9]
    },
    description: {
      color: r ? e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6] : e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
      lineHeight: 1.4,
      overflow: "hidden",
      textOverflow: "ellipsis"
    }
  };
}), x_e = Object.defineProperty, S_e = Object.defineProperties, k_e = Object.getOwnPropertyDescriptors, yb = Object.getOwnPropertySymbols, xH = Object.prototype.hasOwnProperty, SH = Object.prototype.propertyIsEnumerable, _5 = (e, t, n) => t in e ? x_e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, O5 = (e, t) => {
  for (var n in t || (t = {}))
    xH.call(t, n) && _5(e, n, t[n]);
  if (yb)
    for (var n of yb(t))
      SH.call(t, n) && _5(e, n, t[n]);
  return e;
}, __e = (e, t) => S_e(e, k_e(t)), O_e = (e, t) => {
  var n = {};
  for (var r in e)
    xH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && yb)
    for (var r of yb(e))
      t.indexOf(r) < 0 && SH.call(e, r) && (n[r] = e[r]);
  return n;
};
const E_e = {
  withCloseButton: !0
}, kH = b.forwardRef((e, t) => {
  const n = Te("Notification", E_e, e), {
    className: r,
    color: o,
    radius: i,
    loading: a,
    withCloseButton: l,
    withBorder: s,
    title: c,
    icon: p,
    children: f,
    onClose: m,
    closeButtonProps: h,
    classNames: g,
    styles: v,
    unstyled: S,
    variant: w
  } = n, x = O_e(n, [
    "className",
    "color",
    "radius",
    "loading",
    "withCloseButton",
    "withBorder",
    "title",
    "icon",
    "children",
    "onClose",
    "closeButtonProps",
    "classNames",
    "styles",
    "unstyled",
    "variant"
  ]), { classes: k, cx: E } = w_e({ color: o, radius: i, withTitle: !!c }, { name: "Notification", classNames: g, styles: v, unstyled: S, variant: w });
  return /* @__PURE__ */ P.createElement(qe, O5({
    className: E(k.root, r),
    "data-with-icon": !!p || a || void 0,
    "data-with-border": s || void 0,
    role: "alert",
    ref: t
  }, x), p && !a && /* @__PURE__ */ P.createElement("div", {
    className: k.icon
  }, p), a && /* @__PURE__ */ P.createElement(nf, {
    size: 28,
    color: o,
    className: k.loader
  }), /* @__PURE__ */ P.createElement("div", {
    className: k.body
  }, c && /* @__PURE__ */ P.createElement(Ft, {
    className: k.title,
    size: "sm",
    weight: 500
  }, c), /* @__PURE__ */ P.createElement(Ft, {
    color: "dimmed",
    className: k.description,
    size: "sm"
  }, f)), l && /* @__PURE__ */ P.createElement(bx, __e(O5({
    iconSize: 16,
    color: "gray"
  }, h), {
    onClick: m,
    className: k.closeButton
  })));
});
kH.displayName = "@mantine/core/Notification";
const C_e = (e, t, n) => Number.isInteger(e) && e >= 0 && t === 0 ? "numeric" : !Number.isInteger(e) && e >= 0 && t !== 0 ? "decimal" : Number.isInteger(e) && e < 0 && t === 0 || !Number.isInteger(e) && e < 0 && t !== 0 ? n === "ios" ? "text" : "decimal" : "numeric";
function E5({ direction: e, size: t }) {
  return /* @__PURE__ */ P.createElement("svg", {
    style: {
      width: F(t),
      height: F(t),
      transform: e === "up" ? "rotate(180deg)" : void 0
    },
    viewBox: "0 0 15 15",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg"
  }, /* @__PURE__ */ P.createElement("path", {
    d: "M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
const _H = {
  xs: F(20),
  sm: F(24),
  md: F(30),
  lg: F(34),
  xl: F(36)
};
var P_e = Ee((e, { radius: t }, { size: n }) => ({
  rightSection: {
    display: "flex",
    flexDirection: "column",
    height: `calc(100% - ${F(2)})`,
    margin: F(1),
    overflow: "hidden",
    borderTopRightRadius: e.fn.radius(t),
    borderBottomRightRadius: e.fn.radius(t)
  },
  control: {
    margin: 0,
    position: "relative",
    flex: "0 0 50%",
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    boxSizing: "border-box",
    width: Re({ size: n, sizes: _H }),
    padding: 0,
    WebkitTapHighlightColor: "transparent",
    borderBottom: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4]}`,
    borderLeft: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4]}`,
    borderTop: 0,
    borderRight: 0,
    backgroundColor: "transparent",
    marginRight: F(1),
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    "&:not(:disabled):hover": {
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[0]
    },
    "&:disabled": {
      color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[4]
    }
  },
  controlUp: {},
  controlDown: {
    borderBottom: 0
  }
})), R_e = Object.defineProperty, T_e = Object.defineProperties, j_e = Object.getOwnPropertyDescriptors, vb = Object.getOwnPropertySymbols, OH = Object.prototype.hasOwnProperty, EH = Object.prototype.propertyIsEnumerable, C5 = (e, t, n) => t in e ? R_e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, S_ = (e, t) => {
  for (var n in t || (t = {}))
    OH.call(t, n) && C5(e, n, t[n]);
  if (vb)
    for (var n of vb(t))
      EH.call(t, n) && C5(e, n, t[n]);
  return e;
}, N_e = (e, t) => T_e(e, j_e(t)), $_e = (e, t) => {
  var n = {};
  for (var r in e)
    OH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && vb)
    for (var r of vb(e))
      t.indexOf(r) < 0 && EH.call(e, r) && (n[r] = e[r]);
  return n;
};
const I_e = {
  type: "text",
  size: "sm",
  __staticSelector: "TextInput"
}, lf = b.forwardRef((e, t) => {
  const n = PP("TextInput", I_e, e), { inputProps: r, wrapperProps: o } = n, i = $_e(n, ["inputProps", "wrapperProps"]);
  return /* @__PURE__ */ P.createElement(Uo.Wrapper, S_({}, o), /* @__PURE__ */ P.createElement(Uo, N_e(S_(S_({}, r), i), {
    ref: t
  })));
});
lf.displayName = "@mantine/core/TextInput";
var A_e = Object.defineProperty, z_e = Object.defineProperties, L_e = Object.getOwnPropertyDescriptors, bb = Object.getOwnPropertySymbols, CH = Object.prototype.hasOwnProperty, PH = Object.prototype.propertyIsEnumerable, P5 = (e, t, n) => t in e ? A_e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, D_e = (e, t) => {
  for (var n in t || (t = {}))
    CH.call(t, n) && P5(e, n, t[n]);
  if (bb)
    for (var n of bb(t))
      PH.call(t, n) && P5(e, n, t[n]);
  return e;
}, F_e = (e, t) => z_e(e, L_e(t)), M_e = (e, t) => {
  var n = {};
  for (var r in e)
    CH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && bb)
    for (var r of bb(e))
      t.indexOf(r) < 0 && PH.call(e, r) && (n[r] = e[r]);
  return n;
};
const B_e = (e) => e || "", U_e = (e) => {
  if (e === "-")
    return e;
  let t = e;
  t[0] === "." && (t = `0${e}`);
  const n = parseFloat(t);
  return Number.isNaN(n) ? "" : e;
}, R5 = {
  xs: F(10),
  sm: F(14),
  md: F(16),
  lg: F(18),
  xl: F(20)
}, H_e = {
  step: 1,
  hideControls: !1,
  size: "sm",
  precision: 0,
  noClampOnBlur: !1,
  removeTrailingZeros: !1,
  decimalSeparator: ".",
  formatter: B_e,
  parser: U_e,
  type: "text"
}, XO = b.forwardRef((e, t) => {
  const n = Te("NumberInput", H_e, e), {
    readOnly: r,
    disabled: o,
    value: i,
    onChange: a,
    decimalSeparator: l,
    thousandsSeparator: s,
    min: c,
    max: p,
    startValue: f,
    step: m,
    stepHoldInterval: h,
    stepHoldDelay: g,
    onFocus: v,
    onBlur: S,
    onKeyDown: w,
    onKeyUp: x,
    hideControls: k,
    radius: E,
    variant: O,
    precision: C,
    removeTrailingZeros: R,
    defaultValue: L,
    noClampOnBlur: D,
    handlersRef: N,
    classNames: H,
    styles: B,
    size: K,
    rightSection: W,
    rightSectionWidth: U,
    formatter: Q,
    parser: J,
    inputMode: q,
    unstyled: ee,
    type: A
  } = n, X = M_e(n, [
    "readOnly",
    "disabled",
    "value",
    "onChange",
    "decimalSeparator",
    "thousandsSeparator",
    "min",
    "max",
    "startValue",
    "step",
    "stepHoldInterval",
    "stepHoldDelay",
    "onFocus",
    "onBlur",
    "onKeyDown",
    "onKeyUp",
    "hideControls",
    "radius",
    "variant",
    "precision",
    "removeTrailingZeros",
    "defaultValue",
    "noClampOnBlur",
    "handlersRef",
    "classNames",
    "styles",
    "size",
    "rightSection",
    "rightSectionWidth",
    "formatter",
    "parser",
    "inputMode",
    "unstyled",
    "type"
  ]), { classes: ie, cx: j } = P_e({ radius: E }, { classNames: H, styles: B, unstyled: ee, name: "NumberInput", variant: O, size: K }), le = (_e) => {
    if (_e === "")
      return "";
    let Ve = _e.toFixed(C);
    return R && C > 0 && (Ve = Ve.replace(new RegExp(`[0]{0,${C}}$`), ""), Ve.endsWith(".") && (Ve = Ve.slice(0, -1))), Ve;
  }, re = (_e) => {
    let Ve = _e;
    return l && (Ve = Ve.replace(".", l)), Q(Ve);
  }, he = (_e) => {
    let Ve = _e;
    return l && (Ve = Ve.replaceAll(s, "").replace(l, ".")), J(Ve);
  }, xe = (_e) => re(le(_e)), [ke, Ae] = b.useState(typeof i == "number" ? i : typeof L == "number" ? L : ""), [pe, Me] = b.useState(() => xe(ke)), We = b.useRef(), [ze, Fe] = b.useState(!1), Ye = (_e, Ve) => {
    if (!ze || Ve) {
      const dn = xe(_e);
      dn !== pe && Me(dn);
    }
    _e !== ke && Ae(_e);
  }, oe = typeof c == "number" ? c : -1 / 0, ae = typeof p == "number" ? p : 1 / 0, Ie = b.useRef();
  Ie.current = () => {
    var _e;
    let Ve;
    ke === "" ? Ve = (_e = f ?? c) != null ? _e : 0 : Ve = parseFloat(le($l(ke + m, oe, ae))), Ye(Ve, !0), a == null || a(Ve);
  };
  const Ce = b.useRef();
  Ce.current = () => {
    var _e;
    let Ve;
    ke === "" ? Ve = (_e = f ?? c) != null ? _e : 0 : Ve = parseFloat(le($l(ke - m, oe, ae))), Ye(Ve, !0), a == null || a(Ve);
  }, sP(N, { increment: Ie.current, decrement: Ce.current }), b.useEffect(() => {
    ze || Ye(i === void 0 ? ke : i, !0);
  }, [i, ze]);
  const ye = g !== void 0 && h !== void 0, we = b.useRef(null), Ge = b.useRef(0), $e = () => {
    we.current && window.clearTimeout(we.current), we.current = null, Ge.current = 0;
  }, ue = (_e) => {
    _e ? Ie.current() : Ce.current(), Ge.current += 1;
  }, Pe = (_e) => {
    if (ue(_e), ye) {
      const Ve = typeof h == "number" ? h : h(Ge.current);
      we.current = window.setTimeout(() => Pe(_e), Ve);
    }
  }, Je = (_e, Ve) => {
    _e.preventDefault(), We.current.focus(), ue(Ve), ye && (we.current = window.setTimeout(() => Pe(Ve), g));
  };
  b.useEffect(() => ($e(), $e), []);
  const Y = /* @__PURE__ */ P.createElement("div", {
    className: ie.rightSection
  }, /* @__PURE__ */ P.createElement("button", {
    type: "button",
    tabIndex: -1,
    "aria-hidden": !0,
    disabled: ke >= p,
    className: j(ie.control, ie.controlUp),
    onPointerDown: (_e) => {
      Je(_e, !0);
    },
    onPointerUp: $e,
    onPointerLeave: $e
  }, /* @__PURE__ */ P.createElement(E5, {
    size: Re({ size: K, sizes: R5 }),
    direction: "up"
  })), /* @__PURE__ */ P.createElement("button", {
    type: "button",
    tabIndex: -1,
    "aria-hidden": !0,
    disabled: ke <= c,
    className: j(ie.control, ie.controlDown),
    onPointerDown: (_e) => {
      Je(_e, !1);
    },
    onPointerUp: $e,
    onPointerLeave: $e
  }, /* @__PURE__ */ P.createElement(E5, {
    size: Re({ size: K, sizes: R5 }),
    direction: "down"
  }))), te = (_e) => {
    let Ve = _e;
    (Ve[0] === `${l}` || Ve[0] === ".") && (Ve = `0${Ve}`);
    const dn = parseFloat(le(parseFloat(he(Ve)))), pt = D ? dn : $l(dn, oe, ae), Gt = Number.isNaN(pt) ? "" : pt, pn = ke !== Gt;
    Me(_e), Ye(Gt), pn && (a == null || a(Gt));
  }, Ne = (_e) => {
    _e.nativeEvent.isComposing || te(_e.target.value);
  }, et = (_e) => {
    Fe(!0), v == null || v(_e);
  }, ft = (_e) => {
    Fe(!1), S == null || S(_e);
  }, un = (_e) => {
    if (typeof w == "function" && w(_e), _e.repeat && ye && (_e.key === "ArrowUp" || _e.key === "ArrowDown")) {
      _e.preventDefault();
      return;
    }
    r || (_e.key === "ArrowUp" ? Je(_e, !0) : _e.key === "ArrowDown" && Je(_e, !1));
  }, Ct = (_e) => {
    typeof x == "function" && x(_e), (_e.key === "ArrowUp" || _e.key === "ArrowDown") && $e();
  };
  return /* @__PURE__ */ P.createElement(lf, F_e(D_e({}, X), {
    type: A,
    variant: O,
    value: pe,
    disabled: o,
    readOnly: r,
    ref: ta(We, t),
    onChange: Ne,
    onFocus: et,
    onBlur: ft,
    onKeyDown: un,
    onKeyUp: Ct,
    rightSection: W || (o || r || k || O === "unstyled" ? null : Y),
    rightSectionWidth: U ?? `calc(${Re({ size: K, sizes: _H })} + ${F(1)})`,
    radius: E,
    max: p,
    min: c,
    step: m,
    size: K,
    styles: B,
    classNames: H,
    inputMode: q || C_e(m, C, qfe()),
    __staticSelector: "NumberInput",
    unstyled: ee
  }));
});
XO.displayName = "@mantine/core/NumberInput";
const RH = b.createContext(!1), W_e = RH.Provider, V_e = () => b.useContext(RH);
function TH({ children: e, openDelay: t = 0, closeDelay: n = 0 }) {
  return /* @__PURE__ */ P.createElement(W_e, {
    value: !0
  }, /* @__PURE__ */ P.createElement(tye, {
    delay: { open: t, close: n }
  }, e));
}
TH.displayName = "@mantine/core/TooltipGroup";
var q_e = Object.defineProperty, G_e = Object.defineProperties, K_e = Object.getOwnPropertyDescriptors, T5 = Object.getOwnPropertySymbols, Y_e = Object.prototype.hasOwnProperty, X_e = Object.prototype.propertyIsEnumerable, j5 = (e, t, n) => t in e ? q_e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, N5 = (e, t) => {
  for (var n in t || (t = {}))
    Y_e.call(t, n) && j5(e, n, t[n]);
  if (T5)
    for (var n of T5(t))
      X_e.call(t, n) && j5(e, n, t[n]);
  return e;
}, Z_e = (e, t) => G_e(e, K_e(t));
function Q_e(e, t) {
  if (!t)
    return {
      backgroundColor: e.colorScheme === "dark" ? e.colors.gray[2] : e.colors.gray[9],
      color: e.colorScheme === "dark" ? e.black : e.white
    };
  const n = e.fn.variant({ variant: "filled", color: t, primaryFallback: !1 });
  return {
    backgroundColor: n.background,
    color: n.color
  };
}
var jH = Ee((e, { color: t, radius: n, width: r, multiline: o }) => ({
  tooltip: Z_e(N5(N5({}, e.fn.fontStyles()), Q_e(e, t)), {
    lineHeight: e.lineHeight,
    fontSize: e.fontSizes.sm,
    borderRadius: e.fn.radius(n),
    padding: `calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,
    position: "absolute",
    whiteSpace: o ? "unset" : "nowrap",
    pointerEvents: "none",
    width: r
  }),
  arrow: {
    backgroundColor: "inherit",
    border: 0,
    zIndex: 1
  }
}));
const NH = {
  children: "Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"
};
function J_e({
  offset: e,
  position: t
}) {
  const [n, r] = b.useState(!1), o = b.useRef(), { x: i, y: a, reference: l, floating: s, refs: c, update: p, placement: f } = OP({
    placement: t,
    middleware: [
      SP({
        crossAxis: !0,
        padding: 5,
        rootBoundary: "document"
      })
    ]
  }), m = f.includes("right") ? e : t.includes("left") ? e * -1 : 0, h = f.includes("bottom") ? e : t.includes("top") ? e * -1 : 0, g = b.useCallback(({ clientX: v, clientY: S }) => {
    l({
      getBoundingClientRect() {
        return {
          width: 0,
          height: 0,
          x: v,
          y: S,
          left: v + m,
          top: S + h,
          right: v,
          bottom: S
        };
      }
    });
  }, [l]);
  return b.useEffect(() => {
    if (c.floating.current) {
      const v = o.current;
      v.addEventListener("mousemove", g);
      const S = ka(c.floating.current);
      return S.forEach((w) => {
        w.addEventListener("scroll", p);
      }), () => {
        v.removeEventListener("mousemove", g), S.forEach((w) => {
          w.removeEventListener("scroll", p);
        });
      };
    }
  }, [l, c.floating.current, p, g, n]), { handleMouseMove: g, x: i, y: a, opened: n, setOpened: r, boundaryRef: o, floating: s };
}
var e0e = Object.defineProperty, t0e = Object.defineProperties, n0e = Object.getOwnPropertyDescriptors, wb = Object.getOwnPropertySymbols, $H = Object.prototype.hasOwnProperty, IH = Object.prototype.propertyIsEnumerable, $5 = (e, t, n) => t in e ? e0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ah = (e, t) => {
  for (var n in t || (t = {}))
    $H.call(t, n) && $5(e, n, t[n]);
  if (wb)
    for (var n of wb(t))
      IH.call(t, n) && $5(e, n, t[n]);
  return e;
}, zh = (e, t) => t0e(e, n0e(t)), r0e = (e, t) => {
  var n = {};
  for (var r in e)
    $H.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && wb)
    for (var r of wb(e))
      t.indexOf(r) < 0 && IH.call(e, r) && (n[r] = e[r]);
  return n;
};
const o0e = {
  refProp: "ref",
  withinPortal: !0,
  offset: 10,
  position: "right",
  zIndex: Ji("popover")
};
function AH(e) {
  var t;
  const n = Te("TooltipFloating", o0e, e), {
    children: r,
    refProp: o,
    withinPortal: i,
    portalProps: a,
    style: l,
    className: s,
    classNames: c,
    styles: p,
    unstyled: f,
    radius: m,
    color: h,
    label: g,
    offset: v,
    position: S,
    multiline: w,
    width: x,
    zIndex: k,
    disabled: E,
    variant: O
  } = n, C = r0e(n, [
    "children",
    "refProp",
    "withinPortal",
    "portalProps",
    "style",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "radius",
    "color",
    "label",
    "offset",
    "position",
    "multiline",
    "width",
    "zIndex",
    "disabled",
    "variant"
  ]), { handleMouseMove: R, x: L, y: D, opened: N, boundaryRef: H, floating: B, setOpened: K } = J_e({
    offset: v,
    position: S
  }), { classes: W, cx: U } = jH({ radius: m, color: h, multiline: w, width: x }, { name: "TooltipFloating", classNames: c, styles: p, unstyled: f, variant: O });
  if (!Qc(r))
    throw new Error(NH.children);
  const Q = ta(H, r.ref), J = (ee) => {
    var A, X;
    (X = (A = r.props).onMouseEnter) == null || X.call(A, ee), R(ee), K(!0);
  }, q = (ee) => {
    var A, X;
    (X = (A = r.props).onMouseLeave) == null || X.call(A, ee), K(!1);
  };
  return /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement(rf, zh(Ah({}, a), {
    withinPortal: i
  }), /* @__PURE__ */ P.createElement(qe, zh(Ah({}, C), {
    ref: B,
    className: U(W.tooltip, s),
    style: zh(Ah({}, l), {
      zIndex: k,
      display: !E && N ? "block" : "none",
      top: D ?? "",
      left: (t = Math.round(L)) != null ? t : ""
    })
  }), g)), b.cloneElement(r, zh(Ah({}, r.props), {
    [o]: Q,
    onMouseEnter: J,
    onMouseLeave: q
  })));
}
AH.displayName = "@mantine/core/TooltipFloating";
function i0e(e) {
  const [t, n] = b.useState(!1), r = typeof e.opened == "boolean" ? e.opened : t, o = V_e(), i = ea(), { delay: a, currentId: l, setCurrentId: s } = XB(), c = b.useCallback((C) => {
    n(C), C && s(i);
  }, [s, i]), {
    x: p,
    y: f,
    reference: m,
    floating: h,
    context: g,
    refs: v,
    update: S,
    placement: w,
    middlewareData: { arrow: { x, y: k } = {} }
  } = OP({
    placement: e.position,
    open: r,
    onOpenChange: c,
    middleware: [
      AB(e.offset),
      SP({ padding: 8 }),
      HB(),
      VB({ element: e.arrowRef, padding: e.arrowOffset }),
      ...e.inline ? [WB()] : []
    ]
  }), { getReferenceProps: E, getFloatingProps: O } = pye([
    eye(g, {
      enabled: e.events.hover,
      delay: o ? a : { open: e.openDelay, close: e.closeDelay },
      mouseOnly: !e.events.touch
    }),
    fye(g, { enabled: e.events.focus, keyboardOnly: !0 }),
    dye(g, { role: "tooltip" }),
    cye(g, { enabled: typeof e.opened === void 0 }),
    nye(g, { id: i })
  ]);
  return QB({
    opened: r,
    position: e.position,
    positionDependencies: e.positionDependencies,
    floating: { refs: v, update: S }
  }), Hr(() => {
    var C;
    (C = e.onPositionChange) == null || C.call(e, w);
  }, [w]), {
    x: p,
    y: f,
    arrowX: x,
    arrowY: k,
    reference: m,
    floating: h,
    getFloatingProps: O,
    getReferenceProps: E,
    isGroupPhase: r && l && l !== i,
    opened: r,
    placement: w
  };
}
var a0e = Object.defineProperty, l0e = Object.defineProperties, s0e = Object.getOwnPropertyDescriptors, xb = Object.getOwnPropertySymbols, zH = Object.prototype.hasOwnProperty, LH = Object.prototype.propertyIsEnumerable, I5 = (e, t, n) => t in e ? a0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ss = (e, t) => {
  for (var n in t || (t = {}))
    zH.call(t, n) && I5(e, n, t[n]);
  if (xb)
    for (var n of xb(t))
      LH.call(t, n) && I5(e, n, t[n]);
  return e;
}, k_ = (e, t) => l0e(e, s0e(t)), u0e = (e, t) => {
  var n = {};
  for (var r in e)
    zH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && xb)
    for (var r of xb(e))
      t.indexOf(r) < 0 && LH.call(e, r) && (n[r] = e[r]);
  return n;
};
const c0e = {
  position: "top",
  refProp: "ref",
  withinPortal: !1,
  inline: !1,
  arrowSize: 4,
  arrowOffset: 5,
  arrowRadius: 0,
  arrowPosition: "side",
  offset: 5,
  transitionProps: { duration: 100, transition: "fade" },
  width: "auto",
  events: { hover: !0, focus: !1, touch: !1 },
  zIndex: Ji("popover"),
  positionDependencies: []
}, Ex = b.forwardRef((e, t) => {
  var n;
  const r = b.useRef(null), o = Te("Tooltip", c0e, e), {
    children: i,
    position: a,
    refProp: l,
    label: s,
    openDelay: c,
    closeDelay: p,
    onPositionChange: f,
    opened: m,
    withinPortal: h,
    portalProps: g,
    radius: v,
    color: S,
    classNames: w,
    styles: x,
    unstyled: k,
    style: E,
    className: O,
    withArrow: C,
    arrowSize: R,
    arrowOffset: L,
    arrowRadius: D,
    arrowPosition: N,
    offset: H,
    transitionProps: B,
    multiline: K,
    width: W,
    events: U,
    zIndex: Q,
    disabled: J,
    positionDependencies: q,
    onClick: ee,
    onMouseEnter: A,
    onMouseLeave: X,
    inline: ie,
    variant: j,
    keepMounted: le
  } = o, re = u0e(o, [
    "children",
    "position",
    "refProp",
    "label",
    "openDelay",
    "closeDelay",
    "onPositionChange",
    "opened",
    "withinPortal",
    "portalProps",
    "radius",
    "color",
    "classNames",
    "styles",
    "unstyled",
    "style",
    "className",
    "withArrow",
    "arrowSize",
    "arrowOffset",
    "arrowRadius",
    "arrowPosition",
    "offset",
    "transitionProps",
    "multiline",
    "width",
    "events",
    "zIndex",
    "disabled",
    "positionDependencies",
    "onClick",
    "onMouseEnter",
    "onMouseLeave",
    "inline",
    "variant",
    "keepMounted"
  ]), { classes: he, cx: xe, theme: ke } = jH({ radius: v, color: S, width: W, multiline: K }, { name: "Tooltip", classNames: w, styles: x, unstyled: k, variant: j }), Ae = i0e({
    position: u7(ke.dir, a),
    closeDelay: p,
    openDelay: c,
    onPositionChange: f,
    opened: m,
    events: U,
    arrowRef: r,
    arrowOffset: L,
    offset: H + (C ? R / 2 : 0),
    positionDependencies: [...q, i],
    inline: ie
  });
  if (!Qc(i))
    throw new Error(NH.children);
  const pe = ta(Ae.reference, i.ref, t);
  return /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement(rf, k_(ss({}, g), {
    withinPortal: h
  }), /* @__PURE__ */ P.createElement(Zs, k_(ss({
    keepMounted: le,
    mounted: !J && Ae.opened
  }, B), {
    transition: B.transition || "fade",
    duration: Ae.isGroupPhase ? 10 : (n = B.duration) != null ? n : 100
  }), (Me) => {
    var We, ze;
    return /* @__PURE__ */ P.createElement(qe, ss(ss({}, re), Ae.getFloatingProps({
      ref: Ae.floating,
      className: he.tooltip,
      style: k_(ss(ss({}, E), Me), {
        zIndex: Q,
        top: (We = Ae.y) != null ? We : 0,
        left: (ze = Ae.x) != null ? ze : 0
      })
    })), s, /* @__PURE__ */ P.createElement(CP, {
      ref: r,
      arrowX: Ae.arrowX,
      arrowY: Ae.arrowY,
      visible: C,
      position: Ae.placement,
      arrowSize: R,
      arrowOffset: L,
      arrowRadius: D,
      arrowPosition: N,
      className: he.arrow
    }));
  })), b.cloneElement(i, Ae.getReferenceProps(ss({
    onClick: ee,
    onMouseEnter: A,
    onMouseLeave: X,
    onMouseMove: e.onMouseMove,
    onPointerDown: e.onPointerDown,
    onPointerEnter: e.onPointerEnter,
    [l]: pe,
    className: xe(O, i.props.className)
  }, i.props))));
});
Ex.Group = TH;
Ex.Floating = AH;
Ex.displayName = "@mantine/core/Tooltip";
const fr = Ex;
var f0e = Object.defineProperty, d0e = Object.defineProperties, p0e = Object.getOwnPropertyDescriptors, A5 = Object.getOwnPropertySymbols, m0e = Object.prototype.hasOwnProperty, h0e = Object.prototype.propertyIsEnumerable, z5 = (e, t, n) => t in e ? f0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Lh = (e, t) => {
  for (var n in t || (t = {}))
    m0e.call(t, n) && z5(e, n, t[n]);
  if (A5)
    for (var n of A5(t))
      h0e.call(t, n) && z5(e, n, t[n]);
  return e;
}, g0e = (e, t) => d0e(e, p0e(t));
const Yg = 4, L5 = {
  xs: `${F(3)} ${F(6)}`,
  sm: `${F(5)} ${F(10)}`,
  md: `${F(7)} ${F(14)}`,
  lg: `${F(9)} ${F(16)}`,
  xl: `${F(12)} ${F(20)}`
};
var y0e = Ee((e, {
  fullWidth: t,
  color: n,
  radius: r,
  shouldAnimate: o,
  transitionDuration: i,
  transitionTimingFunction: a,
  orientation: l
}, { size: s }) => {
  const c = l === "vertical", p = e.fn.variant({ variant: "filled", color: n });
  return {
    label: g0e(Lh(Lh({
      ref: Fi("label")
    }, e.fn.focusStyles()), e.fn.fontStyles()), {
      WebkitTapHighlightColor: "transparent",
      borderRadius: e.fn.radius(r),
      fontWeight: 500,
      fontSize: s in e.fontSizes ? e.fontSizes[s] : e.fontSizes.sm,
      cursor: "pointer",
      display: "block",
      textAlign: "center",
      padding: L5[s in L5 ? s : "sm"],
      whiteSpace: "nowrap",
      overflow: "hidden",
      textOverflow: "ellipsis",
      userSelect: "none",
      color: e.colorScheme === "dark" ? e.colors.dark[1] : e.colors.gray[7],
      transition: `color ${o ? 0 : i}ms ${a || e.transitionTimingFunction}`,
      "&:hover": {
        color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black
      },
      "&[data-disabled]": {
        "&, &:hover": {
          color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5],
          cursor: "not-allowed",
          pointerEvents: "none"
        }
      },
      "&[data-active]": {
        "&, &:hover": {
          color: n || e.colorScheme === "dark" ? e.white : e.black
        }
      }
    }),
    control: {
      ref: Fi("control"),
      position: "relative",
      boxSizing: "border-box",
      flex: 1,
      zIndex: 2,
      transition: `border-left-color ${o ? 0 : i}ms ${a || e.transitionTimingFunction}`,
      "&:not(:first-of-type)": {
        borderStyle: "solid",
        borderWidth: c ? `${F(1)} 0 0 0` : `0 0 0 ${F(1)}`,
        borderColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]
      }
    },
    input: {
      height: 0,
      width: 0,
      position: "absolute",
      overflow: "hidden",
      whiteSpace: "nowrap",
      opacity: 0,
      "&:focus": {
        outline: "none",
        [`& + .${Fi("label")}`]: Lh({}, e.focusRing === "always" || e.focusRing === "auto" ? e.focusRingStyles.styles(e) : e.focusRingStyles.resetStyles(e)),
        "&:focus:not(:focus-visible)": {
          [`& + .${Fi("label")}`]: Lh({}, e.focusRing === "auto" || e.focusRing === "never" ? e.focusRingStyles.resetStyles(e) : null)
        }
      },
      "&:disabled + label": {
        "&, &:hover": {
          color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5],
          cursor: "not-allowed",
          pointerEvents: "none"
        }
      }
    },
    root: {
      position: "relative",
      display: t || c ? "flex" : "inline-flex",
      width: c && !t ? "max-content" : "auto",
      flexDirection: c ? "column" : "row",
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[8] : e.colors.gray[1],
      borderRadius: e.fn.radius(r),
      overflow: "hidden",
      padding: Yg
    },
    controlActive: {
      borderLeftColor: "transparent !important",
      borderTopColor: "transparent !important",
      [`& + .${Fi("control")}`]: {
        [c ? "borderTopColor" : "borderLeftColor"]: "transparent !important"
      },
      borderRadius: e.fn.radius(r),
      boxShadow: o ? n || e.colorScheme === "dark" ? "none" : e.shadows.xs : void 0,
      backgroundColor: o ? n ? p.background : e.colorScheme === "dark" ? e.colors.dark[5] : e.white : void 0
    },
    indicator: {
      boxSizing: "border-box",
      borderRadius: e.fn.radius(r),
      position: "absolute",
      zIndex: 1,
      boxShadow: n || e.colorScheme === "dark" ? "none" : e.shadows.xs,
      transition: `transform ${o ? 0 : i}ms ${e.transitionTimingFunction}, width ${o ? 0 : i / 2}ms ${a || e.transitionTimingFunction}`,
      backgroundColor: n ? p.background : e.colorScheme === "dark" ? e.colors.dark[5] : e.white
    }
  };
}), v0e = Object.defineProperty, Sb = Object.getOwnPropertySymbols, DH = Object.prototype.hasOwnProperty, FH = Object.prototype.propertyIsEnumerable, D5 = (e, t, n) => t in e ? v0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b0e = (e, t) => {
  for (var n in t || (t = {}))
    DH.call(t, n) && D5(e, n, t[n]);
  if (Sb)
    for (var n of Sb(t))
      FH.call(t, n) && D5(e, n, t[n]);
  return e;
}, w0e = (e, t) => {
  var n = {};
  for (var r in e)
    DH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Sb)
    for (var r of Sb(e))
      t.indexOf(r) < 0 && FH.call(e, r) && (n[r] = e[r]);
  return n;
};
const x0e = {
  disabled: !1,
  size: "sm",
  transitionDuration: 200
}, MH = b.forwardRef((e, t) => {
  var n, r, o, i;
  const a = Te("SegmentedControl", x0e, e), {
    className: l,
    disabled: s,
    data: c,
    name: p,
    value: f,
    onChange: m,
    color: h,
    fullWidth: g,
    radius: v,
    size: S,
    transitionDuration: w,
    transitionTimingFunction: x,
    classNames: k,
    styles: E,
    defaultValue: O,
    orientation: C,
    unstyled: R,
    variant: L,
    readOnly: D
  } = a, N = w0e(a, [
    "className",
    "disabled",
    "data",
    "name",
    "value",
    "onChange",
    "color",
    "fullWidth",
    "radius",
    "size",
    "transitionDuration",
    "transitionTimingFunction",
    "classNames",
    "styles",
    "defaultValue",
    "orientation",
    "unstyled",
    "variant",
    "readOnly"
  ]), H = Yn(), B = ef(), K = H.respectReducedMotion ? B : !1, W = c.map((pe) => typeof pe == "string" ? { label: pe, value: pe } : pe), U = b.useRef(), [Q, J] = b.useState(!1), [q, ee] = Xi({
    value: f,
    defaultValue: O,
    finalValue: Array.isArray(W) && (i = (o = (n = W.find((pe) => !pe.disabled)) == null ? void 0 : n.value) != null ? o : (r = W[0]) == null ? void 0 : r.value) != null ? i : null,
    onChange: m
  }), { classes: A, cx: X } = y0e({
    fullWidth: g,
    color: h,
    radius: v,
    shouldAnimate: K || !Q,
    transitionDuration: w,
    transitionTimingFunction: x,
    orientation: C
  }, { name: "SegmentedControl", classNames: k, styles: E, unstyled: R, variant: L, size: S }), [ie, j] = b.useState({
    width: 0,
    height: 0,
    translate: [0, 0]
  }), le = ea(p), re = b.useRef({}), [he, xe] = u8();
  Ap(() => {
    U.current ? J(!0) : (U.current = !0, J(!1));
  }), b.useEffect(() => {
    if (q in re.current && he.current) {
      const pe = re.current[q], Me = pe.getBoundingClientRect(), We = pe.offsetWidth / Me.width, ze = Me.width * We || 0, Fe = Me.height * We || 0, Ye = xe.width - pe.parentElement.offsetLeft + Yg - ze, oe = pe.parentElement.offsetLeft - Yg;
      j({
        width: ze,
        height: Fe,
        translate: [
          H.dir === "rtl" ? Ye : oe,
          pe.parentElement.offsetTop - Yg
        ]
      });
    }
  }, [q, xe]);
  const ke = W.map((pe) => /* @__PURE__ */ P.createElement("div", {
    className: X(A.control, { [A.controlActive]: q === pe.value }),
    key: pe.value
  }, /* @__PURE__ */ P.createElement("input", {
    className: A.input,
    disabled: s || pe.disabled,
    type: "radio",
    name: le,
    value: pe.value,
    id: `${le}-${pe.value}`,
    checked: q === pe.value,
    onChange: () => !D && ee(pe.value)
  }), /* @__PURE__ */ P.createElement("label", {
    className: A.label,
    "data-active": q === pe.value && !(s || pe.disabled) || void 0,
    "data-disabled": s || pe.disabled || void 0,
    htmlFor: `${le}-${pe.value}`,
    ref: (Me) => {
      re.current[pe.value] = Me;
    }
  }, pe.label))), Ae = ta(he, t);
  return W.length === 0 ? null : /* @__PURE__ */ P.createElement(qe, b0e({
    className: X(A.root, l),
    ref: Ae
  }, N), typeof q == "string" && Q && /* @__PURE__ */ P.createElement(qe, {
    component: "span",
    className: A.indicator,
    sx: {
      width: ie.width,
      height: ie.height,
      transform: `translate(${ie.translate[0]}px, ${ie.translate[1]}px)`
    }
  }), ke);
});
MH.displayName = "@mantine/core/SegmentedControl";
function S0e({
  data: e,
  searchable: t,
  limit: n,
  searchValue: r,
  filter: o,
  value: i,
  filterDataOnExactSearchMatch: a
}) {
  if (!t)
    return e;
  const l = i != null && e.find((c) => c.value === i) || null;
  if (l && !a && (l == null ? void 0 : l.label) === r) {
    if (n) {
      if (n >= e.length)
        return e;
      const c = e.indexOf(l), p = c + n, f = p - e.length;
      return f > 0 ? e.slice(c - f) : e.slice(c, p);
    }
    return e;
  }
  const s = [];
  for (let c = 0; c < e.length && (o(r, e[c]) && s.push(e[c]), !(s.length >= n)); c += 1)
    ;
  return s;
}
var k0e = Ee(() => ({
  input: {
    "&:not(:disabled)": {
      cursor: "pointer",
      "&::selection": {
        backgroundColor: "transparent"
      }
    }
  }
})), _0e = Object.defineProperty, O0e = Object.defineProperties, E0e = Object.getOwnPropertyDescriptors, kb = Object.getOwnPropertySymbols, BH = Object.prototype.hasOwnProperty, UH = Object.prototype.propertyIsEnumerable, F5 = (e, t, n) => t in e ? _0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ed = (e, t) => {
  for (var n in t || (t = {}))
    BH.call(t, n) && F5(e, n, t[n]);
  if (kb)
    for (var n of kb(t))
      UH.call(t, n) && F5(e, n, t[n]);
  return e;
}, __ = (e, t) => O0e(e, E0e(t)), C0e = (e, t) => {
  var n = {};
  for (var r in e)
    BH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && kb)
    for (var r of kb(e))
      t.indexOf(r) < 0 && UH.call(e, r) && (n[r] = e[r]);
  return n;
};
function P0e(e, t) {
  return t.label.toLowerCase().trim().includes(e.toLowerCase().trim());
}
function R0e(e, t) {
  return !!e && !t.some((n) => n.label.toLowerCase() === e.toLowerCase());
}
const T0e = {
  required: !1,
  size: "sm",
  shadow: "sm",
  itemComponent: dP,
  transitionProps: { transition: "fade", duration: 0 },
  initiallyOpened: !1,
  filter: P0e,
  maxDropdownHeight: 220,
  searchable: !1,
  clearable: !1,
  limit: 1 / 0,
  disabled: !1,
  creatable: !1,
  shouldCreate: R0e,
  selectOnBlur: !1,
  switchDirectionOnFlip: !1,
  filterDataOnExactSearchMatch: !1,
  zIndex: Ji("popover"),
  positionDependencies: [],
  dropdownPosition: "flip"
}, HH = b.forwardRef((e, t) => {
  const n = PP("Select", T0e, e), {
    inputProps: r,
    wrapperProps: o,
    shadow: i,
    data: a,
    value: l,
    defaultValue: s,
    onChange: c,
    itemComponent: p,
    onKeyDown: f,
    onBlur: m,
    onFocus: h,
    transitionProps: g,
    initiallyOpened: v,
    unstyled: S,
    classNames: w,
    styles: x,
    filter: k,
    maxDropdownHeight: E,
    searchable: O,
    clearable: C,
    nothingFound: R,
    limit: L,
    disabled: D,
    onSearchChange: N,
    searchValue: H,
    rightSection: B,
    rightSectionWidth: K,
    creatable: W,
    getCreateLabel: U,
    shouldCreate: Q,
    selectOnBlur: J,
    onCreate: q,
    dropdownComponent: ee,
    onDropdownClose: A,
    onDropdownOpen: X,
    withinPortal: ie,
    portalProps: j,
    switchDirectionOnFlip: le,
    zIndex: re,
    name: he,
    dropdownPosition: xe,
    allowDeselect: ke,
    placeholder: Ae,
    filterDataOnExactSearchMatch: pe,
    form: Me,
    positionDependencies: We,
    readOnly: ze,
    clearButtonProps: Fe,
    hoverOnSearchChange: Ye
  } = n, oe = C0e(n, [
    "inputProps",
    "wrapperProps",
    "shadow",
    "data",
    "value",
    "defaultValue",
    "onChange",
    "itemComponent",
    "onKeyDown",
    "onBlur",
    "onFocus",
    "transitionProps",
    "initiallyOpened",
    "unstyled",
    "classNames",
    "styles",
    "filter",
    "maxDropdownHeight",
    "searchable",
    "clearable",
    "nothingFound",
    "limit",
    "disabled",
    "onSearchChange",
    "searchValue",
    "rightSection",
    "rightSectionWidth",
    "creatable",
    "getCreateLabel",
    "shouldCreate",
    "selectOnBlur",
    "onCreate",
    "dropdownComponent",
    "onDropdownClose",
    "onDropdownOpen",
    "withinPortal",
    "portalProps",
    "switchDirectionOnFlip",
    "zIndex",
    "name",
    "dropdownPosition",
    "allowDeselect",
    "placeholder",
    "filterDataOnExactSearchMatch",
    "form",
    "positionDependencies",
    "readOnly",
    "clearButtonProps",
    "hoverOnSearchChange"
  ]), { classes: ae, cx: Ie, theme: Ce } = k0e(), [ye, we] = b.useState(v), [Ge, $e] = b.useState(-1), ue = b.useRef(), Pe = b.useRef({}), [Je, Y] = b.useState("column"), te = Je === "column", { scrollIntoView: Ne, targetRef: et, scrollableRef: ft } = Hfe({
    duration: 0,
    offset: 5,
    cancelable: !1,
    isList: !0
  }), un = ke === void 0 ? C : ke, Ct = (He) => {
    if (ye !== He) {
      we(He);
      const Lt = He ? X : A;
      typeof Lt == "function" && Lt();
    }
  }, _e = W && typeof U == "function";
  let Ve = null;
  const dn = a.map((He) => typeof He == "string" ? { label: He, value: He } : He), pt = R9({ data: dn }), [Gt, pn, nm] = Xi({
    value: l,
    defaultValue: s,
    finalValue: null,
    onChange: c
  }), _o = pt.find((He) => He.value === Gt), [Oo, eS] = Xi({
    value: H,
    defaultValue: (_o == null ? void 0 : _o.label) || "",
    finalValue: void 0,
    onChange: N
  }), ra = (He) => {
    eS(He), O && typeof N == "function" && N(He);
  }, tS = () => {
    var He;
    ze || (pn(null), nm || ra(""), (He = ue.current) == null || He.focus());
  };
  b.useEffect(() => {
    const He = pt.find((Lt) => Lt.value === Gt);
    He ? ra(He.label) : (!_e || !Gt) && ra("");
  }, [Gt]), b.useEffect(() => {
    _o && (!O || !ye) && ra(_o.label);
  }, [_o == null ? void 0 : _o.label]);
  const su = (He) => {
    if (!ze)
      if (un && (_o == null ? void 0 : _o.value) === He.value)
        pn(null), Ct(!1);
      else {
        if (He.creatable && typeof q == "function") {
          const Lt = q(He.value);
          typeof Lt < "u" && Lt !== null && pn(typeof Lt == "string" ? Lt : Lt.value);
        } else
          pn(He.value);
        nm || ra(He.label), $e(-1), Ct(!1), ue.current.focus();
      }
  }, mn = S0e({
    data: pt,
    searchable: O,
    limit: L,
    searchValue: Oo,
    filter: k,
    filterDataOnExactSearchMatch: pe,
    value: Gt
  });
  _e && Q(Oo, mn) && (Ve = U(Oo), mn.push({ label: Oo, value: Oo, creatable: !0 }));
  const rm = (He, Lt, dr) => {
    let Xn = He;
    for (; dr(Xn); )
      if (Xn = Lt(Xn), !mn[Xn].disabled)
        return Xn;
    return He;
  };
  Hr(() => {
    $e(Ye && Oo ? 0 : -1);
  }, [Oo, Ye]);
  const Zl = Gt ? mn.findIndex((He) => He.value === Gt) : 0, qr = !ze && (mn.length > 0 ? ye : ye && !!R), uu = () => {
    $e((He) => {
      var Lt;
      const dr = rm(He, (Xn) => Xn - 1, (Xn) => Xn > 0);
      return et.current = Pe.current[(Lt = mn[dr]) == null ? void 0 : Lt.value], qr && Ne({ alignment: te ? "start" : "end" }), dr;
    });
  }, om = () => {
    $e((He) => {
      var Lt;
      const dr = rm(He, (Xn) => Xn + 1, (Xn) => Xn < mn.length - 1);
      return et.current = Pe.current[(Lt = mn[dr]) == null ? void 0 : Lt.value], qr && Ne({ alignment: te ? "end" : "start" }), dr;
    });
  }, Ga = () => window.setTimeout(() => {
    var He;
    et.current = Pe.current[(He = mn[Zl]) == null ? void 0 : He.value], Ne({ alignment: te ? "end" : "start" });
  }, 50);
  Hr(() => {
    qr && Ga();
  }, [qr]);
  const nS = (He) => {
    switch (typeof f == "function" && f(He), He.key) {
      case "ArrowUp": {
        He.preventDefault(), ye ? te ? uu() : om() : ($e(Zl), Ct(!0), Ga());
        break;
      }
      case "ArrowDown": {
        He.preventDefault(), ye ? te ? om() : uu() : ($e(Zl), Ct(!0), Ga());
        break;
      }
      case "Home": {
        if (!O) {
          He.preventDefault(), ye || Ct(!0);
          const Lt = mn.findIndex((dr) => !dr.disabled);
          $e(Lt), qr && Ne({ alignment: te ? "end" : "start" });
        }
        break;
      }
      case "End": {
        if (!O) {
          He.preventDefault(), ye || Ct(!0);
          const Lt = mn.map((dr) => !!dr.disabled).lastIndexOf(!1);
          $e(Lt), qr && Ne({ alignment: te ? "end" : "start" });
        }
        break;
      }
      case "Escape": {
        He.preventDefault(), Ct(!1), $e(-1);
        break;
      }
      case " ": {
        O || (He.preventDefault(), mn[Ge] && ye ? su(mn[Ge]) : (Ct(!0), $e(Zl), Ga()));
        break;
      }
      case "Enter":
        O || He.preventDefault(), mn[Ge] && ye && (He.preventDefault(), su(mn[Ge]));
    }
  }, rS = (He) => {
    typeof m == "function" && m(He);
    const Lt = pt.find((dr) => dr.value === Gt);
    J && mn[Ge] && ye && su(mn[Ge]), ra((Lt == null ? void 0 : Lt.label) || ""), Ct(!1);
  }, oS = (He) => {
    typeof h == "function" && h(He), O && Ct(!0);
  }, iS = (He) => {
    ze || (ra(He.currentTarget.value), C && He.currentTarget.value === "" && pn(null), $e(-1), Ct(!0));
  }, aS = () => {
    ze || (Ct(!ye), Gt && !ye && $e(Zl));
  };
  return /* @__PURE__ */ P.createElement(Uo.Wrapper, __(ed({}, o), {
    __staticSelector: "Select"
  }), /* @__PURE__ */ P.createElement(Il, {
    opened: qr,
    transitionProps: g,
    shadow: i,
    withinPortal: ie,
    portalProps: j,
    __staticSelector: "Select",
    onDirectionChange: Y,
    switchDirectionOnFlip: le,
    zIndex: re,
    dropdownPosition: xe,
    positionDependencies: [...We, Oo],
    classNames: w,
    styles: x,
    unstyled: S,
    variant: r.variant
  }, /* @__PURE__ */ P.createElement(Il.Target, null, /* @__PURE__ */ P.createElement("div", {
    role: "combobox",
    "aria-haspopup": "listbox",
    "aria-owns": qr ? `${r.id}-items` : null,
    "aria-controls": r.id,
    "aria-expanded": qr,
    onMouseLeave: () => $e(-1),
    tabIndex: -1
  }, /* @__PURE__ */ P.createElement("input", {
    type: "hidden",
    name: he,
    value: Gt || "",
    form: Me,
    disabled: D
  }), /* @__PURE__ */ P.createElement(Uo, ed(__(ed(ed({
    autoComplete: "off",
    type: "search"
  }, r), oe), {
    ref: ta(t, ue),
    onKeyDown: nS,
    __staticSelector: "Select",
    value: Oo,
    placeholder: Ae,
    onChange: iS,
    "aria-autocomplete": "list",
    "aria-controls": qr ? `${r.id}-items` : null,
    "aria-activedescendant": Ge >= 0 ? `${r.id}-${Ge}` : null,
    onMouseDown: aS,
    onBlur: rS,
    onFocus: oS,
    readOnly: !O || ze,
    disabled: D,
    "data-mantine-stop-propagation": qr,
    name: null,
    classNames: __(ed({}, w), {
      input: Ie({ [ae.input]: !O }, w == null ? void 0 : w.input)
    })
  }), b_e({
    theme: Ce,
    rightSection: B,
    rightSectionWidth: K,
    styles: x,
    size: r.size,
    shouldClear: C && !!_o,
    onClear: tS,
    error: o.error,
    clearButtonProps: Fe,
    disabled: D,
    readOnly: ze
  }))))), /* @__PURE__ */ P.createElement(Il.Dropdown, {
    component: ee || kx,
    maxHeight: E,
    direction: Je,
    id: r.id,
    innerRef: ft,
    __staticSelector: "Select",
    classNames: w,
    styles: x
  }, /* @__PURE__ */ P.createElement(fP, {
    data: mn,
    hovered: Ge,
    classNames: w,
    styles: x,
    isItemSelected: (He) => He === Gt,
    uuid: r.id,
    __staticSelector: "Select",
    onItemHover: $e,
    onItemSelect: su,
    itemsRefs: Pe,
    itemComponent: p,
    size: r.size,
    nothingFound: R,
    creatable: _e && !!Ve,
    createLabel: Ve,
    "aria-label": o.label,
    unstyled: S,
    variant: r.variant
  }))));
});
HH.displayName = "@mantine/core/Select";
function WH({ value: e, min: t, max: n }) {
  const r = (e - t) / (n - t) * 100;
  return Math.min(Math.max(r, 0), 100);
}
function j0e({
  value: e,
  containerWidth: t,
  min: n,
  max: r,
  step: o,
  precision: i
}) {
  const a = (t ? Math.min(Math.max(e, 0), t) / t : e) * (r - n), l = (a !== 0 ? Math.round(a / o) * o : 0) + n, s = Math.max(l, n);
  return i !== void 0 ? Number(s.toFixed(i)) : s;
}
var N0e = Object.defineProperty, $0e = Object.defineProperties, I0e = Object.getOwnPropertyDescriptors, M5 = Object.getOwnPropertySymbols, A0e = Object.prototype.hasOwnProperty, z0e = Object.prototype.propertyIsEnumerable, B5 = (e, t, n) => t in e ? N0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, L0e = (e, t) => {
  for (var n in t || (t = {}))
    A0e.call(t, n) && B5(e, n, t[n]);
  if (M5)
    for (var n of M5(t))
      z0e.call(t, n) && B5(e, n, t[n]);
  return e;
}, D0e = (e, t) => $0e(e, I0e(t));
const ar = {
  xs: F(4),
  sm: F(6),
  md: F(8),
  lg: F(10),
  xl: F(12)
};
var F0e = Ee((e) => ({
  root: D0e(L0e({}, e.fn.fontStyles()), {
    WebkitTapHighlightColor: "transparent",
    outline: 0,
    display: "flex",
    flexDirection: "column",
    alignItems: "center",
    touchAction: "none",
    position: "relative"
  })
}));
const M0e = F0e;
var B0e = Object.defineProperty, U0e = Object.defineProperties, H0e = Object.getOwnPropertyDescriptors, U5 = Object.getOwnPropertySymbols, W0e = Object.prototype.hasOwnProperty, V0e = Object.prototype.propertyIsEnumerable, H5 = (e, t, n) => t in e ? B0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, q0e = (e, t) => {
  for (var n in t || (t = {}))
    W0e.call(t, n) && H5(e, n, t[n]);
  if (U5)
    for (var n of U5(t))
      V0e.call(t, n) && H5(e, n, t[n]);
  return e;
}, G0e = (e, t) => U0e(e, H0e(t)), K0e = Ee((e, { color: t, disabled: n, thumbSize: r }, { size: o }) => ({
  label: {
    position: "absolute",
    top: F(-36),
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[9],
    fontSize: e.fontSizes.xs,
    color: e.white,
    padding: `calc(${e.spacing.xs} / 2)`,
    borderRadius: e.radius.sm,
    whiteSpace: "nowrap",
    pointerEvents: "none",
    userSelect: "none",
    touchAction: "none"
  },
  thumb: G0e(q0e({}, e.fn.focusStyles()), {
    boxSizing: "border-box",
    position: "absolute",
    display: n ? "none" : "flex",
    height: r ? F(r) : `calc(${Re({ sizes: ar, size: o })} * 2)`,
    width: r ? F(r) : `calc(${Re({ sizes: ar, size: o })} * 2)`,
    backgroundColor: e.colorScheme === "dark" ? e.fn.themeColor(t, e.fn.primaryShade()) : e.white,
    border: `${F(4)} solid ${e.colorScheme === "dark" ? e.white : e.fn.themeColor(t, e.fn.primaryShade())}`,
    color: e.colorScheme === "dark" ? e.white : e.fn.themeColor(t, e.fn.primaryShade()),
    transform: "translate(-50%, -50%)",
    top: "50%",
    cursor: "pointer",
    borderRadius: 1e3,
    alignItems: "center",
    justifyContent: "center",
    transitionDuration: "100ms",
    transitionProperty: "box-shadow, transform",
    transitionTimingFunction: e.transitionTimingFunction,
    zIndex: 3,
    userSelect: "none",
    touchAction: "none"
  }),
  dragging: {
    transform: "translate(-50%, -50%) scale(1.05)",
    boxShadow: e.shadows.sm
  }
}));
const VH = b.forwardRef(({
  max: e,
  min: t,
  value: n,
  position: r,
  label: o,
  dragging: i,
  onMouseDown: a,
  onKeyDownCapture: l,
  color: s,
  classNames: c,
  styles: p,
  size: f,
  labelTransition: m,
  labelTransitionDuration: h,
  labelTransitionTimingFunction: g,
  labelAlwaysOn: v,
  thumbLabel: S,
  onFocus: w,
  onBlur: x,
  showLabelOnHover: k,
  isHovered: E,
  children: O = null,
  disabled: C,
  unstyled: R,
  thumbSize: L,
  variant: D
}, N) => {
  const { classes: H, cx: B, theme: K } = K0e({ color: s, disabled: C, thumbSize: L }, { name: "Slider", classNames: c, styles: p, unstyled: R, variant: D, size: f }), [W, U] = b.useState(!1), Q = v || i || W || k && E;
  return /* @__PURE__ */ P.createElement(qe, {
    tabIndex: 0,
    role: "slider",
    "aria-label": S,
    "aria-valuemax": e,
    "aria-valuemin": t,
    "aria-valuenow": n,
    ref: N,
    className: B(H.thumb, { [H.dragging]: i }),
    onFocus: () => {
      U(!0), typeof w == "function" && w();
    },
    onBlur: () => {
      U(!1), typeof x == "function" && x();
    },
    onTouchStart: a,
    onMouseDown: a,
    onKeyDownCapture: l,
    onClick: (J) => J.stopPropagation(),
    style: { [K.dir === "rtl" ? "right" : "left"]: `${r}%` }
  }, O, /* @__PURE__ */ P.createElement(Zs, {
    mounted: o != null && Q,
    duration: h,
    transition: m,
    timingFunction: g || K.transitionTimingFunction
  }, (J) => /* @__PURE__ */ P.createElement("div", {
    style: J,
    className: H.label
  }, o)));
});
VH.displayName = "@mantine/core/SliderThumb";
function Y0e({ mark: e, offset: t, value: n, inverted: r = !1 }) {
  return r ? typeof t == "number" && e.value <= t || e.value >= n : typeof t == "number" ? e.value >= t && e.value <= n : e.value <= n;
}
var X0e = Ee((e, { color: t, disabled: n, thumbSize: r }, { size: o }) => ({
  marksContainer: {
    position: "absolute",
    right: r ? F(r / 2) : Re({ sizes: ar, size: o }),
    left: r ? F(r / 2) : Re({ sizes: ar, size: o }),
    "&:has(~ input:disabled)": {
      "& .mantine-Slider-markFilled": {
        border: `${F(2)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]}`,
        borderColor: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[4]
      }
    }
  },
  markWrapper: {
    position: "absolute",
    top: `calc(${F(Re({ sizes: ar, size: o }))} / 2)`,
    zIndex: 2,
    height: 0
  },
  mark: {
    boxSizing: "border-box",
    border: `${F(2)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]}`,
    height: Re({ sizes: ar, size: o }),
    width: Re({ sizes: ar, size: o }),
    borderRadius: 1e3,
    transform: `translateX(calc(-${Re({ sizes: ar, size: o })} / 2))`,
    backgroundColor: e.white,
    pointerEvents: "none"
  },
  markFilled: {
    borderColor: n ? e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[4] : e.fn.variant({ variant: "filled", color: t }).background
  },
  markLabel: {
    transform: `translate(-50%, calc(${e.spacing.xs} / 2))`,
    fontSize: e.fontSizes.sm,
    color: e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6],
    whiteSpace: "nowrap",
    cursor: "pointer",
    userSelect: "none"
  }
}));
function qH({
  marks: e,
  color: t,
  size: n,
  thumbSize: r,
  min: o,
  max: i,
  value: a,
  classNames: l,
  styles: s,
  offset: c,
  onChange: p,
  disabled: f,
  unstyled: m,
  inverted: h,
  variant: g
}) {
  const { classes: v, cx: S } = X0e({ color: t, disabled: f, thumbSize: r }, { name: "Slider", classNames: l, styles: s, unstyled: m, variant: g, size: n }), w = e.map((x, k) => /* @__PURE__ */ P.createElement(qe, {
    className: v.markWrapper,
    sx: { left: `${WH({ value: x.value, min: o, max: i })}%` },
    key: k
  }, /* @__PURE__ */ P.createElement("div", {
    className: S(v.mark, {
      [v.markFilled]: Y0e({ mark: x, value: a, offset: c, inverted: h })
    })
  }), x.label && /* @__PURE__ */ P.createElement("div", {
    className: v.markLabel,
    onMouseDown: (E) => {
      E.stopPropagation(), !f && p(x.value);
    },
    onTouchStart: (E) => {
      E.stopPropagation(), !f && p(x.value);
    }
  }, x.label)));
  return /* @__PURE__ */ P.createElement("div", {
    className: v.marksContainer
  }, w);
}
qH.displayName = "@mantine/core/SliderMarks";
var Z0e = Ee((e, { radius: t, color: n, disabled: r, inverted: o, thumbSize: i }, { size: a }) => ({
  trackContainer: {
    display: "flex",
    alignItems: "center",
    width: "100%",
    height: `calc(${Re({ sizes: ar, size: a })} * 2)`,
    cursor: "pointer",
    "&:has(~ input:disabled)": {
      "&": {
        pointerEvents: "none"
      },
      "& .mantine-Slider-thumb": {
        display: "none"
      },
      "& .mantine-Slider-track::before": {
        content: '""',
        backgroundColor: o ? e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[4] : e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]
      },
      "& .mantine-Slider-bar": {
        backgroundColor: o ? e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2] : e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[4]
      }
    }
  },
  track: {
    position: "relative",
    height: Re({ sizes: ar, size: a }),
    width: "100%",
    marginRight: i ? F(i / 2) : Re({ size: a, sizes: ar }),
    marginLeft: i ? F(i / 2) : Re({ size: a, sizes: ar }),
    "&::before": {
      content: '""',
      position: "absolute",
      top: 0,
      bottom: 0,
      borderRadius: e.fn.radius(t),
      right: `calc(${i ? F(i / 2) : Re({ size: a, sizes: ar })} * -1)`,
      left: `calc(${i ? F(i / 2) : Re({ size: a, sizes: ar })} * -1)`,
      backgroundColor: o ? r ? e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[4] : e.fn.variant({ variant: "filled", color: n }).background : e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2],
      zIndex: 0
    }
  },
  bar: {
    position: "absolute",
    zIndex: 1,
    top: 0,
    bottom: 0,
    backgroundColor: o ? e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2] : r ? e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[4] : e.fn.variant({ variant: "filled", color: n }).background,
    borderRadius: e.fn.radius(t)
  }
})), Q0e = Object.defineProperty, J0e = Object.defineProperties, eOe = Object.getOwnPropertyDescriptors, _b = Object.getOwnPropertySymbols, GH = Object.prototype.hasOwnProperty, KH = Object.prototype.propertyIsEnumerable, W5 = (e, t, n) => t in e ? Q0e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, V5 = (e, t) => {
  for (var n in t || (t = {}))
    GH.call(t, n) && W5(e, n, t[n]);
  if (_b)
    for (var n of _b(t))
      KH.call(t, n) && W5(e, n, t[n]);
  return e;
}, tOe = (e, t) => J0e(e, eOe(t)), nOe = (e, t) => {
  var n = {};
  for (var r in e)
    GH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && _b)
    for (var r of _b(e))
      t.indexOf(r) < 0 && KH.call(e, r) && (n[r] = e[r]);
  return n;
};
function YH(e) {
  var t = e, {
    filled: n,
    size: r,
    thumbSize: o,
    color: i,
    classNames: a,
    styles: l,
    radius: s,
    children: c,
    offset: p,
    disabled: f,
    marksOffset: m,
    unstyled: h,
    inverted: g,
    variant: v,
    containerProps: S
  } = t, w = nOe(t, [
    "filled",
    "size",
    "thumbSize",
    "color",
    "classNames",
    "styles",
    "radius",
    "children",
    "offset",
    "disabled",
    "marksOffset",
    "unstyled",
    "inverted",
    "variant",
    "containerProps"
  ]);
  const { classes: x } = Z0e({ color: i, radius: s, disabled: f, inverted: g, thumbSize: o }, { name: "Slider", classNames: a, styles: l, unstyled: h, variant: v, size: r });
  return /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("div", V5({
    className: x.trackContainer
  }, S), /* @__PURE__ */ P.createElement("div", {
    className: x.track
  }, /* @__PURE__ */ P.createElement(qe, {
    className: x.bar,
    sx: {
      left: `calc(${p}% - ${o ? F(o / 2) : Re({ size: r, sizes: ar })})`,
      width: `calc(${n}% + 2 * ${o ? F(o / 2) : Re({ size: r, sizes: ar })})`
    }
  }), c)), /* @__PURE__ */ P.createElement(qH, tOe(V5({}, w), {
    size: r,
    thumbSize: o,
    color: i,
    offset: m,
    classNames: a,
    styles: l,
    disabled: f,
    unstyled: h,
    inverted: g,
    variant: v
  })));
}
YH.displayName = "@mantine/core/SliderTrack";
var rOe = Object.defineProperty, oOe = Object.defineProperties, iOe = Object.getOwnPropertyDescriptors, Ob = Object.getOwnPropertySymbols, XH = Object.prototype.hasOwnProperty, ZH = Object.prototype.propertyIsEnumerable, q5 = (e, t, n) => t in e ? rOe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, aOe = (e, t) => {
  for (var n in t || (t = {}))
    XH.call(t, n) && q5(e, n, t[n]);
  if (Ob)
    for (var n of Ob(t))
      ZH.call(t, n) && q5(e, n, t[n]);
  return e;
}, lOe = (e, t) => oOe(e, iOe(t)), sOe = (e, t) => {
  var n = {};
  for (var r in e)
    XH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Ob)
    for (var r of Ob(e))
      t.indexOf(r) < 0 && ZH.call(e, r) && (n[r] = e[r]);
  return n;
};
const QH = b.forwardRef((e, t) => {
  var n = e, {
    className: r,
    size: o,
    classNames: i,
    styles: a,
    disabled: l,
    unstyled: s,
    variant: c
  } = n, p = sOe(n, [
    "className",
    "size",
    "classNames",
    "styles",
    "disabled",
    "unstyled",
    "variant"
  ]);
  const { classes: f, cx: m } = M0e(null, {
    name: "Slider",
    classNames: i,
    styles: a,
    unstyled: s,
    variant: c,
    size: o
  });
  return /* @__PURE__ */ P.createElement(qe, lOe(aOe({}, p), {
    tabIndex: -1,
    className: m(f.root, r),
    ref: t
  }));
});
QH.displayName = "@mantine/core/SliderRoot";
function Dh(e, t) {
  return parseFloat(e.toFixed(t));
}
function uOe(e) {
  if (!e)
    return 0;
  const t = e.toString().split(".");
  return t.length > 1 ? t[1].length : 0;
}
var cOe = Object.defineProperty, fOe = Object.defineProperties, dOe = Object.getOwnPropertyDescriptors, Eb = Object.getOwnPropertySymbols, JH = Object.prototype.hasOwnProperty, eW = Object.prototype.propertyIsEnumerable, G5 = (e, t, n) => t in e ? cOe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, pOe = (e, t) => {
  for (var n in t || (t = {}))
    JH.call(t, n) && G5(e, n, t[n]);
  if (Eb)
    for (var n of Eb(t))
      eW.call(t, n) && G5(e, n, t[n]);
  return e;
}, mOe = (e, t) => fOe(e, dOe(t)), hOe = (e, t) => {
  var n = {};
  for (var r in e)
    JH.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Eb)
    for (var r of Eb(e))
      t.indexOf(r) < 0 && eW.call(e, r) && (n[r] = e[r]);
  return n;
};
const gOe = {
  size: "md",
  radius: "xl",
  min: 0,
  max: 100,
  step: 1,
  marks: [],
  label: (e) => e,
  labelTransition: "skew-down",
  labelTransitionDuration: 0,
  labelAlwaysOn: !1,
  thumbLabel: "",
  showLabelOnHover: !0,
  disabled: !1,
  scale: (e) => e
}, ZO = b.forwardRef((e, t) => {
  const n = Te("Slider", gOe, e), {
    classNames: r,
    styles: o,
    color: i,
    value: a,
    onChange: l,
    onChangeEnd: s,
    size: c,
    radius: p,
    min: f,
    max: m,
    step: h,
    precision: g,
    defaultValue: v,
    name: S,
    marks: w,
    label: x,
    labelTransition: k,
    labelTransitionDuration: E,
    labelTransitionTimingFunction: O,
    labelAlwaysOn: C,
    thumbLabel: R,
    showLabelOnHover: L,
    thumbChildren: D,
    disabled: N,
    unstyled: H,
    thumbSize: B,
    scale: K,
    inverted: W,
    variant: U
  } = n, Q = hOe(n, [
    "classNames",
    "styles",
    "color",
    "value",
    "onChange",
    "onChangeEnd",
    "size",
    "radius",
    "min",
    "max",
    "step",
    "precision",
    "defaultValue",
    "name",
    "marks",
    "label",
    "labelTransition",
    "labelTransitionDuration",
    "labelTransitionTimingFunction",
    "labelAlwaysOn",
    "thumbLabel",
    "showLabelOnHover",
    "thumbChildren",
    "disabled",
    "unstyled",
    "thumbSize",
    "scale",
    "inverted",
    "variant"
  ]), J = g ?? uOe(h), q = Yn(), [ee, A] = b.useState(!1), [X, ie] = Xi({
    value: typeof a == "number" ? $l(a, f, m) : a,
    defaultValue: typeof v == "number" ? $l(v, f, m) : v,
    finalValue: $l(0, f, m),
    onChange: l
  }), j = b.useRef(X), le = b.useRef(), re = b.useRef(), he = WH({ value: X, min: f, max: m }), xe = K(X), ke = typeof x == "function" ? x(xe) : x, Ae = b.useCallback(({ x: ze }) => {
    if (!N) {
      const Fe = j0e({ value: ze, min: f, max: m, step: h, precision: J });
      ie(Fe), j.current = Fe;
    }
  }, [N, f, m, h, J, ie]), { ref: pe, active: Me } = Lfe(Ae, { onScrubEnd: () => s == null ? void 0 : s(j.current) }, q.dir), We = (ze) => {
    if (!N)
      switch (ze.key) {
        case "ArrowUp": {
          ze.preventDefault(), re.current.focus();
          const Fe = Dh(Math.min(Math.max(X + h, f), m), J);
          s == null || s(Fe), ie(Fe);
          break;
        }
        case "ArrowRight": {
          ze.preventDefault(), re.current.focus();
          const Fe = Dh(Math.min(Math.max(q.dir === "rtl" ? X - h : X + h, f), m), J);
          s == null || s(Fe), ie(Fe);
          break;
        }
        case "ArrowDown": {
          ze.preventDefault(), re.current.focus();
          const Fe = Dh(Math.min(Math.max(X - h, f), m), J);
          s == null || s(Fe), ie(Fe);
          break;
        }
        case "ArrowLeft": {
          ze.preventDefault(), re.current.focus();
          const Fe = Dh(Math.min(Math.max(q.dir === "rtl" ? X + h : X - h, f), m), J);
          s == null || s(Fe), ie(Fe);
          break;
        }
        case "Home": {
          ze.preventDefault(), re.current.focus(), s == null || s(f), ie(f);
          break;
        }
        case "End": {
          ze.preventDefault(), re.current.focus(), s == null || s(m), ie(m);
          break;
        }
      }
  };
  return /* @__PURE__ */ P.createElement(QH, mOe(pOe({}, Q), {
    ref: ta(t, le),
    onKeyDownCapture: We,
    onMouseDownCapture: () => {
      var ze;
      return (ze = le.current) == null ? void 0 : ze.focus();
    },
    size: c,
    classNames: r,
    styles: o,
    disabled: N,
    unstyled: H,
    variant: U
  }), /* @__PURE__ */ P.createElement(YH, {
    inverted: W,
    offset: 0,
    filled: he,
    marks: w,
    size: c,
    thumbSize: B,
    radius: p,
    color: i,
    min: f,
    max: m,
    value: xe,
    onChange: ie,
    classNames: r,
    styles: o,
    disabled: N,
    unstyled: H,
    variant: U,
    containerProps: {
      ref: pe,
      onMouseEnter: L ? () => A(!0) : void 0,
      onMouseLeave: L ? () => A(!1) : void 0
    }
  }, /* @__PURE__ */ P.createElement(VH, {
    max: m,
    min: f,
    value: xe,
    position: he,
    dragging: Me,
    color: i,
    size: c,
    label: ke,
    ref: re,
    labelTransition: k,
    labelTransitionDuration: E,
    labelTransitionTimingFunction: O,
    labelAlwaysOn: C,
    classNames: r,
    styles: o,
    thumbLabel: R,
    showLabelOnHover: L,
    isHovered: ee,
    disabled: N,
    unstyled: H,
    thumbSize: B,
    variant: U
  }, D)), /* @__PURE__ */ P.createElement("input", {
    type: "hidden",
    name: S,
    value: xe
  }));
});
ZO.displayName = "@mantine/core/Slider";
var yOe = Ee((e, { transitionDuration: t }) => ({
  control: {},
  root: {
    position: "relative"
  },
  content: {
    display: "flex",
    flexDirection: "column",
    overflow: "hidden",
    transitionProperty: "max-height",
    transitionTimingFunction: e.transitionTimingFunction,
    transitionDuration: `${t}ms`,
    "@media (prefers-reduced-motion)": {
      transitionDuration: e.respectReducedMotion ? "0ms" : void 0
    }
  }
})), vOe = Object.defineProperty, Cb = Object.getOwnPropertySymbols, tW = Object.prototype.hasOwnProperty, nW = Object.prototype.propertyIsEnumerable, K5 = (e, t, n) => t in e ? vOe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, bOe = (e, t) => {
  for (var n in t || (t = {}))
    tW.call(t, n) && K5(e, n, t[n]);
  if (Cb)
    for (var n of Cb(t))
      nW.call(t, n) && K5(e, n, t[n]);
  return e;
}, wOe = (e, t) => {
  var n = {};
  for (var r in e)
    tW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Cb)
    for (var r of Cb(e))
      t.indexOf(r) < 0 && nW.call(e, r) && (n[r] = e[r]);
  return n;
};
const xOe = {
  maxHeight: 100,
  transitionDuration: 200,
  initialState: !1
}, Cx = b.forwardRef((e, t) => {
  const n = Te("Spoiler", xOe, e), {
    className: r,
    children: o,
    maxHeight: i,
    hideLabel: a,
    showLabel: l,
    transitionDuration: s,
    controlRef: c,
    initialState: p,
    classNames: f,
    styles: m,
    unstyled: h,
    variant: g
  } = n, v = wOe(n, [
    "className",
    "children",
    "maxHeight",
    "hideLabel",
    "showLabel",
    "transitionDuration",
    "controlRef",
    "initialState",
    "classNames",
    "styles",
    "unstyled",
    "variant"
  ]), { classes: S, cx: w } = yOe({ transitionDuration: s }, { name: "Spoiler", classNames: f, styles: m, unstyled: h, variant: g }), [x, k] = b.useState(p), { ref: E, height: O } = Vfe(), C = i < O, R = x ? a : l;
  return /* @__PURE__ */ P.createElement(qe, bOe({
    className: w(S.root, r),
    ref: t
  }, v), /* @__PURE__ */ P.createElement("div", {
    className: S.content,
    style: {
      maxHeight: x ? O ? F(O) : void 0 : F(i)
    }
  }, /* @__PURE__ */ P.createElement("div", {
    ref: E
  }, o)), C && /* @__PURE__ */ P.createElement(Yme, {
    component: "button",
    ref: c,
    onClick: () => k((L) => !L),
    className: S.control
  }, R));
});
Cx.displayName = "@mantine/core/Spoiler";
var SOe = Ee((e, { spacing: t, align: n, justify: r }) => ({
  root: {
    display: "flex",
    flexDirection: "column",
    alignItems: n,
    justifyContent: r,
    gap: Re({ size: t, sizes: e.spacing })
  }
})), kOe = Object.defineProperty, Pb = Object.getOwnPropertySymbols, rW = Object.prototype.hasOwnProperty, oW = Object.prototype.propertyIsEnumerable, Y5 = (e, t, n) => t in e ? kOe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _Oe = (e, t) => {
  for (var n in t || (t = {}))
    rW.call(t, n) && Y5(e, n, t[n]);
  if (Pb)
    for (var n of Pb(t))
      oW.call(t, n) && Y5(e, n, t[n]);
  return e;
}, OOe = (e, t) => {
  var n = {};
  for (var r in e)
    rW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Pb)
    for (var r of Pb(e))
      t.indexOf(r) < 0 && oW.call(e, r) && (n[r] = e[r]);
  return n;
};
const EOe = {
  spacing: "md",
  align: "stretch",
  justify: "flex-start"
}, ui = b.forwardRef((e, t) => {
  const n = Te("Stack", EOe, e), { spacing: r, className: o, align: i, justify: a, unstyled: l, variant: s } = n, c = OOe(n, ["spacing", "className", "align", "justify", "unstyled", "variant"]), { classes: p, cx: f } = SOe({ spacing: r, align: i, justify: a }, { name: "Stack", unstyled: l, variant: s });
  return /* @__PURE__ */ P.createElement(qe, _Oe({
    className: f(p.root, o),
    ref: t
  }, c));
});
ui.displayName = "@mantine/core/Stack";
const QO = {
  context: "Tabs component was not found in the tree",
  value: "Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value"
}, [COe, DP] = Gl(QO.context);
var POe = Object.defineProperty, X5 = Object.getOwnPropertySymbols, ROe = Object.prototype.hasOwnProperty, TOe = Object.prototype.propertyIsEnumerable, Z5 = (e, t, n) => t in e ? POe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, jOe = (e, t) => {
  for (var n in t || (t = {}))
    ROe.call(t, n) && Z5(e, n, t[n]);
  if (X5)
    for (var n of X5(t))
      TOe.call(t, n) && Z5(e, n, t[n]);
  return e;
};
function NOe({ orientation: e, inverted: t, placement: n }, r, o) {
  const i = e === "vertical";
  return o === "default" ? {
    [i ? n === "left" ? "borderRight" : "borderLeft" : t ? "borderTop" : "borderBottom"]: `${F(2)} solid ${r.colorScheme === "dark" ? r.colors.dark[4] : r.colors.gray[3]}`
  } : o === "outline" ? {
    [i ? n === "left" ? "borderRight" : "borderLeft" : t ? "borderTop" : "borderBottom"]: `${F(1)} solid ${r.colorScheme === "dark" ? r.colors.dark[4] : r.colors.gray[3]}`
  } : o === "pills" ? {
    gap: `calc(${r.spacing.sm} / 2)`
  } : {};
}
var $Oe = Ee((e, t, { variant: n }) => {
  const r = t.orientation === "vertical";
  return {
    tabsList: jOe({
      display: "flex",
      flexWrap: "wrap",
      flexDirection: r ? "column" : "row",
      justifyContent: TU[t.position],
      '& [role="tab"]': {
        flex: t.grow ? 1 : void 0
      }
    }, NOe(t, e, n))
  };
}), IOe = Object.defineProperty, AOe = Object.defineProperties, zOe = Object.getOwnPropertyDescriptors, Rb = Object.getOwnPropertySymbols, iW = Object.prototype.hasOwnProperty, aW = Object.prototype.propertyIsEnumerable, Q5 = (e, t, n) => t in e ? IOe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, LOe = (e, t) => {
  for (var n in t || (t = {}))
    iW.call(t, n) && Q5(e, n, t[n]);
  if (Rb)
    for (var n of Rb(t))
      aW.call(t, n) && Q5(e, n, t[n]);
  return e;
}, DOe = (e, t) => AOe(e, zOe(t)), FOe = (e, t) => {
  var n = {};
  for (var r in e)
    iW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Rb)
    for (var r of Rb(e))
      t.indexOf(r) < 0 && aW.call(e, r) && (n[r] = e[r]);
  return n;
};
const MOe = {
  grow: !1,
  position: "left"
}, lW = b.forwardRef((e, t) => {
  const n = Te("TabsList", MOe, e), { children: r, className: o, grow: i, position: a } = n, l = FOe(n, ["children", "className", "grow", "position"]), { orientation: s, variant: c, color: p, radius: f, inverted: m, placement: h, classNames: g, styles: v, unstyled: S } = DP(), { classes: w, cx: x } = $Oe({ orientation: s, grow: i, color: p, position: a, radius: f, inverted: m, placement: h }, { name: "Tabs", unstyled: S, classNames: g, styles: v, variant: c });
  return /* @__PURE__ */ P.createElement(qe, DOe(LOe({}, l), {
    className: x(w.tabsList, o),
    ref: t,
    role: "tablist",
    "aria-orientation": s
  }), r);
});
lW.displayName = "@mantine/core/TabsList";
var BOe = Ee((e, { orientation: t }) => ({
  panel: {
    flex: t === "vertical" ? 1 : void 0
  }
}));
const UOe = BOe;
var HOe = Object.defineProperty, WOe = Object.defineProperties, VOe = Object.getOwnPropertyDescriptors, Tb = Object.getOwnPropertySymbols, sW = Object.prototype.hasOwnProperty, uW = Object.prototype.propertyIsEnumerable, J5 = (e, t, n) => t in e ? HOe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, qOe = (e, t) => {
  for (var n in t || (t = {}))
    sW.call(t, n) && J5(e, n, t[n]);
  if (Tb)
    for (var n of Tb(t))
      uW.call(t, n) && J5(e, n, t[n]);
  return e;
}, GOe = (e, t) => WOe(e, VOe(t)), KOe = (e, t) => {
  var n = {};
  for (var r in e)
    sW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Tb)
    for (var r of Tb(e))
      t.indexOf(r) < 0 && uW.call(e, r) && (n[r] = e[r]);
  return n;
};
const YOe = {}, cW = b.forwardRef((e, t) => {
  const n = Te("TabsPanel", YOe, e), { value: r, children: o, sx: i, className: a } = n, l = KOe(n, ["value", "children", "sx", "className"]), s = DP(), { classes: c, cx: p } = UOe({
    orientation: s.orientation,
    color: s.color,
    radius: s.radius,
    inverted: s.inverted,
    placement: s.placement
  }, {
    name: "Tabs",
    unstyled: s.unstyled,
    classNames: s.classNames,
    styles: s.styles,
    variant: s.variant
  }), f = s.getPanelId(r), m = s.value === r, h = s.keepMounted || m ? o : null;
  return b.useEffect(() => (s.setMountedPanelIds((g) => [...g, f]), s.setMountedPanelIds((g) => g.filter((v) => v !== f))), [f]), /* @__PURE__ */ P.createElement(qe, GOe(qOe({}, l), {
    ref: t,
    sx: [{ display: m ? void 0 : "none" }, ...fx(i)],
    className: p(c.panel, a),
    role: "tabpanel",
    id: f,
    "aria-labelledby": s.getTabId(r)
  }), h);
});
cW.displayName = "@mantine/core/TabsPanel";
var XOe = Object.defineProperty, ZOe = Object.defineProperties, QOe = Object.getOwnPropertyDescriptors, eA = Object.getOwnPropertySymbols, JOe = Object.prototype.hasOwnProperty, eEe = Object.prototype.propertyIsEnumerable, tA = (e, t, n) => t in e ? XOe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, nc = (e, t) => {
  for (var n in t || (t = {}))
    JOe.call(t, n) && tA(e, n, t[n]);
  if (eA)
    for (var n of eA(t))
      eEe.call(t, n) && tA(e, n, t[n]);
  return e;
}, nA = (e, t) => ZOe(e, QOe(t));
function tEe(e, { orientation: t, color: n, radius: r, inverted: o, placement: i }, a) {
  const l = t === "vertical", s = e.fn.variant({ color: n, variant: "filled" }), c = F(e.fn.radius(r)), p = t === "vertical" ? i === "left" ? `${c} 0 0 ${c}` : ` 0 ${c} ${c} 0` : o ? `0 0 ${c} ${c}` : `${c} ${c} 0 0`;
  return a === "default" ? nA(nc({
    [l ? i === "left" ? "borderRight" : "borderLeft" : o ? "borderTop" : "borderBottom"]: `${F(2)} solid transparent`,
    [l ? i === "left" ? "marginRight" : "marginLeft" : o ? "marginTop" : "marginBottom"]: F(-2),
    borderRadius: p
  }, e.fn.hover({
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[0],
    borderColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]
  })), {
    "&[data-active]": nc({
      borderColor: s.background,
      color: e.colorScheme === "dark" ? e.white : e.black
    }, e.fn.hover({ borderColor: s.background }))
  }) : a === "outline" ? {
    borderRadius: p,
    border: `${F(1)} solid transparent`,
    [l ? i === "left" ? "borderRight" : "borderLeft" : o ? "borderTop" : "borderBottom"]: "none",
    "&[data-active]": {
      borderColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3],
      "&::before": {
        content: '""',
        backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.white,
        position: "absolute",
        bottom: l ? 0 : o ? "unset" : F(-1),
        top: l ? 0 : o ? F(-1) : "unset",
        [l ? "width" : "height"]: F(1),
        right: l ? i === "left" ? F(-1) : "unset" : 0,
        left: l ? i === "left" ? "unset" : F(-1) : 0
      }
    }
  } : a === "pills" ? nA(nc({
    borderRadius: e.fn.radius(r)
  }, e.fn.hover({
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[0]
  })), {
    "&[data-active]": nc({
      backgroundColor: s.background,
      color: e.white
    }, e.fn.hover({ backgroundColor: s.background }))
  }) : {};
}
var nEe = Ee((e, t, { variant: n }) => ({
  tabLabel: {},
  tab: nc({
    position: "relative",
    padding: `${e.spacing.xs} ${e.spacing.md}`,
    paddingLeft: t.withIcon ? e.spacing.xs : void 0,
    paddingRight: t.withRightSection ? e.spacing.xs : void 0,
    fontSize: e.fontSizes.sm,
    whiteSpace: "nowrap",
    zIndex: 0,
    display: "flex",
    alignItems: "center",
    justifyContent: t.orientation === "horizontal" ? "center" : void 0,
    lineHeight: 1,
    "&:disabled": nc({
      opacity: 0.5,
      cursor: "not-allowed"
    }, e.fn.hover({ backgroundColor: "transparent" })),
    "&:focus": {
      zIndex: 1
    }
  }, tEe(e, t, n)),
  tabRightSection: {
    display: "flex",
    justifyContent: "center",
    alignItems: "center",
    "&:not(:only-child)": {
      marginLeft: F(7)
    }
  },
  tabIcon: {
    display: "flex",
    justifyContent: "center",
    alignItems: "center",
    "&:not(:only-child)": {
      marginRight: F(7)
    }
  }
}));
const rEe = nEe;
var oEe = Object.defineProperty, iEe = Object.defineProperties, aEe = Object.getOwnPropertyDescriptors, jb = Object.getOwnPropertySymbols, fW = Object.prototype.hasOwnProperty, dW = Object.prototype.propertyIsEnumerable, rA = (e, t, n) => t in e ? oEe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, lEe = (e, t) => {
  for (var n in t || (t = {}))
    fW.call(t, n) && rA(e, n, t[n]);
  if (jb)
    for (var n of jb(t))
      dW.call(t, n) && rA(e, n, t[n]);
  return e;
}, sEe = (e, t) => iEe(e, aEe(t)), uEe = (e, t) => {
  var n = {};
  for (var r in e)
    fW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && jb)
    for (var r of jb(e))
      t.indexOf(r) < 0 && dW.call(e, r) && (n[r] = e[r]);
  return n;
};
const cEe = {}, pW = b.forwardRef((e, t) => {
  const n = Te("TabsTab", cEe, e), { value: r, children: o, onKeyDown: i, onClick: a, className: l, icon: s, rightSection: c, color: p } = n, f = uEe(n, ["value", "children", "onKeyDown", "onClick", "className", "icon", "rightSection", "color"]), m = DP(), h = !!s, g = !!c, { theme: v, classes: S, cx: w } = rEe({
    withIcon: h || g && !o,
    withRightSection: g || h && !o,
    orientation: m.orientation,
    color: p || m.color,
    radius: m.radius,
    inverted: m.inverted,
    placement: m.placement
  }, {
    name: "Tabs",
    unstyled: m.unstyled,
    classNames: m.classNames,
    styles: m.styles,
    variant: m.variant
  }), x = r === m.value, k = m.getPanelId(r), E = m.mountedPanelIds.includes(r) ? k : void 0, O = (C) => {
    m.onTabChange(m.allowTabDeactivation && r === m.value ? null : r), a == null || a(C);
  };
  return /* @__PURE__ */ P.createElement(vx, sEe(lEe({}, f), {
    unstyled: m.unstyled,
    className: w(S.tab, l),
    "data-active": x || void 0,
    ref: t,
    type: "button",
    role: "tab",
    id: m.getTabId(r),
    "aria-selected": x,
    tabIndex: x || m.value === null ? 0 : -1,
    "aria-controls": E,
    onClick: O,
    onKeyDown: tP({
      siblingSelector: '[role="tab"]',
      parentSelector: '[role="tablist"]',
      activateOnFocus: m.activateTabWithKeyboard,
      loop: m.loop,
      dir: v.dir,
      orientation: m.orientation,
      onKeyDown: i
    })
  }), s && /* @__PURE__ */ P.createElement("span", {
    className: S.tabIcon
  }, s), o && /* @__PURE__ */ P.createElement("span", {
    className: S.tabLabel
  }, o), c && /* @__PURE__ */ P.createElement("span", {
    className: S.tabRightSection
  }, c));
});
pW.displayName = "@mantine/core/Tab";
function mW({
  defaultValue: e,
  value: t,
  onTabChange: n,
  orientation: r,
  children: o,
  loop: i,
  id: a,
  activateTabWithKeyboard: l,
  allowTabDeactivation: s,
  variant: c,
  color: p,
  radius: f,
  inverted: m,
  placement: h,
  keepMounted: g = !0,
  classNames: v,
  styles: S,
  unstyled: w
}) {
  const x = ea(a), [k, E] = b.useState([]), [O, C] = Xi({
    value: t,
    defaultValue: e,
    finalValue: null,
    onChange: n
  });
  return /* @__PURE__ */ P.createElement(COe, {
    value: {
      placement: h,
      value: O,
      orientation: r,
      id: x,
      loop: i,
      activateTabWithKeyboard: l,
      getTabId: By(`${x}-tab`, QO.value),
      getPanelId: By(`${x}-panel`, QO.value),
      onTabChange: C,
      setMountedPanelIds: E,
      mountedPanelIds: k,
      allowTabDeactivation: s,
      variant: c,
      color: p,
      radius: f,
      inverted: m,
      keepMounted: g,
      classNames: v,
      styles: S,
      unstyled: w
    }
  }, o);
}
mW.displayName = "@mantine/core/TabsProvider";
var fEe = Ee((e, { orientation: t, placement: n }) => ({
  root: {
    display: t === "vertical" ? "flex" : void 0,
    flexDirection: n === "right" ? "row-reverse" : "row"
  }
})), dEe = Object.defineProperty, pEe = Object.defineProperties, mEe = Object.getOwnPropertyDescriptors, Nb = Object.getOwnPropertySymbols, hW = Object.prototype.hasOwnProperty, gW = Object.prototype.propertyIsEnumerable, oA = (e, t, n) => t in e ? dEe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, hEe = (e, t) => {
  for (var n in t || (t = {}))
    hW.call(t, n) && oA(e, n, t[n]);
  if (Nb)
    for (var n of Nb(t))
      gW.call(t, n) && oA(e, n, t[n]);
  return e;
}, gEe = (e, t) => pEe(e, mEe(t)), yEe = (e, t) => {
  var n = {};
  for (var r in e)
    hW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Nb)
    for (var r of Nb(e))
      t.indexOf(r) < 0 && gW.call(e, r) && (n[r] = e[r]);
  return n;
};
const vEe = {
  orientation: "horizontal",
  loop: !0,
  activateTabWithKeyboard: !0,
  allowTabDeactivation: !1,
  unstyled: !1,
  inverted: !1,
  variant: "default",
  placement: "left"
}, zr = b.forwardRef((e, t) => {
  const n = Te("Tabs", vEe, e), {
    defaultValue: r,
    value: o,
    orientation: i,
    loop: a,
    activateTabWithKeyboard: l,
    allowTabDeactivation: s,
    children: c,
    id: p,
    onTabChange: f,
    variant: m,
    color: h,
    className: g,
    unstyled: v,
    classNames: S,
    styles: w,
    radius: x,
    inverted: k,
    keepMounted: E,
    placement: O
  } = n, C = yEe(n, [
    "defaultValue",
    "value",
    "orientation",
    "loop",
    "activateTabWithKeyboard",
    "allowTabDeactivation",
    "children",
    "id",
    "onTabChange",
    "variant",
    "color",
    "className",
    "unstyled",
    "classNames",
    "styles",
    "radius",
    "inverted",
    "keepMounted",
    "placement"
  ]), { classes: R, cx: L } = fEe({ orientation: i, color: h, radius: x, inverted: k, placement: O }, { unstyled: v, name: "Tabs", classNames: S, styles: w, variant: m });
  return /* @__PURE__ */ P.createElement(mW, {
    activateTabWithKeyboard: l,
    defaultValue: r,
    orientation: i,
    onTabChange: f,
    value: o,
    id: p,
    loop: a,
    allowTabDeactivation: s,
    color: h,
    variant: m,
    radius: x,
    inverted: k,
    keepMounted: E,
    placement: O,
    classNames: S,
    styles: w,
    unstyled: v
  }, /* @__PURE__ */ P.createElement(qe, gEe(hEe({}, C), {
    className: L(R.root, g),
    id: p,
    ref: t
  }), c));
});
zr.List = lW;
zr.Tab = pW;
zr.Panel = cW;
zr.displayName = "@mantine/core/Tabs";
var bEe = Object.defineProperty, wEe = Object.defineProperties, xEe = Object.getOwnPropertyDescriptors, iA = Object.getOwnPropertySymbols, SEe = Object.prototype.hasOwnProperty, kEe = Object.prototype.propertyIsEnumerable, aA = (e, t, n) => t in e ? bEe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _Ee = (e, t) => {
  for (var n in t || (t = {}))
    SEe.call(t, n) && aA(e, n, t[n]);
  if (iA)
    for (var n of iA(t))
      kEe.call(t, n) && aA(e, n, t[n]);
  return e;
}, OEe = (e, t) => wEe(e, xEe(t));
function EEe(e, t, n) {
  return typeof e < "u" ? e in n.headings.sizes ? n.headings.sizes[e].fontSize : F(e) : n.headings.sizes[t].fontSize;
}
function CEe(e, t, n) {
  return typeof e < "u" && e in n.headings.sizes ? n.headings.sizes[e].lineHeight : n.headings.sizes[t].lineHeight;
}
var PEe = Ee((e, { element: t, weight: n, inline: r }, { size: o }) => ({
  root: OEe(_Ee({}, e.fn.fontStyles()), {
    fontFamily: e.headings.fontFamily,
    fontWeight: n || e.headings.sizes[t].fontWeight || e.headings.fontWeight,
    fontSize: EEe(o, t, e),
    lineHeight: r ? 1 : CEe(o, t, e),
    margin: 0
  })
})), REe = Object.defineProperty, $b = Object.getOwnPropertySymbols, yW = Object.prototype.hasOwnProperty, vW = Object.prototype.propertyIsEnumerable, lA = (e, t, n) => t in e ? REe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, TEe = (e, t) => {
  for (var n in t || (t = {}))
    yW.call(t, n) && lA(e, n, t[n]);
  if ($b)
    for (var n of $b(t))
      vW.call(t, n) && lA(e, n, t[n]);
  return e;
}, jEe = (e, t) => {
  var n = {};
  for (var r in e)
    yW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && $b)
    for (var r of $b(e))
      t.indexOf(r) < 0 && vW.call(e, r) && (n[r] = e[r]);
  return n;
};
const NEe = {
  order: 1
}, Px = b.forwardRef((e, t) => {
  const n = Te("Title", NEe, e), { className: r, order: o, children: i, unstyled: a, size: l, weight: s, inline: c, variant: p } = n, f = jEe(n, ["className", "order", "children", "unstyled", "size", "weight", "inline", "variant"]), { classes: m, cx: h } = PEe({ element: `h${o}`, weight: s, inline: c }, { name: "Title", unstyled: a, variant: p, size: l });
  return [1, 2, 3, 4, 5, 6].includes(o) ? /* @__PURE__ */ P.createElement(Ft, TEe({
    variant: p,
    component: `h${o}`,
    ref: t,
    className: h(m.root, r)
  }, f), i) : null;
});
Px.displayName = "@mantine/core/Title";
let Fh;
const $Ee = new Uint8Array(16);
function IEe() {
  if (!Fh && (Fh = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Fh))
    throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
  return Fh($Ee);
}
const Fn = [];
for (let e = 0; e < 256; ++e)
  Fn.push((e + 256).toString(16).slice(1));
function AEe(e, t = 0) {
  return Fn[e[t + 0]] + Fn[e[t + 1]] + Fn[e[t + 2]] + Fn[e[t + 3]] + "-" + Fn[e[t + 4]] + Fn[e[t + 5]] + "-" + Fn[e[t + 6]] + Fn[e[t + 7]] + "-" + Fn[e[t + 8]] + Fn[e[t + 9]] + "-" + Fn[e[t + 10]] + Fn[e[t + 11]] + Fn[e[t + 12]] + Fn[e[t + 13]] + Fn[e[t + 14]] + Fn[e[t + 15]];
}
const zEe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), sA = {
  randomUUID: zEe
};
function LEe(e, t, n) {
  if (sA.randomUUID && !t && !e)
    return sA.randomUUID();
  e = e || {};
  const r = e.random || (e.rng || IEe)();
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
    n = n || 0;
    for (let o = 0; o < 16; ++o)
      t[n + o] = r[o];
    return t;
  }
  return AEe(r);
}
const Io = {
  // https://platform.openai.com/docs/api-reference/chat/create
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string"
      },
      system_prompt: {
        type: "string"
      },
      frequency_penalty: {
        type: "number",
        minimum: -2,
        maximum: 2,
        description: `Number between -2.0 and 2.0. 
        Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`
      },
      function_call: {
        type: "union",
        types: [
          {
            type: "string",
            enum: ["none", "auto"]
          },
          {
            type: "object",
            required: ["name"],
            properties: {
              name: {
                type: "string"
              }
            }
          }
        ],
        description: `Controls which (if any) function is called by the model. none means the model will not call a function and instead generates a message. 
        auto means the model can pick between generating a message or calling a function. 
        Specifying a particular function via {"name": "my_function"} forces the model to call that function.
        none is the default when no functions are present. auto is the default if functions are present.`
      },
      functions: {
        type: "array",
        items: {
          type: "object",
          required: ["name", "parameters"],
          properties: {
            name: {
              type: "string"
            },
            parameters: {
              type: "object"
              // TODO: Figure this out -- it's a JSON schema object
            },
            description: {
              type: "string"
            }
          }
        },
        description: "A list of functions the model may generate JSON inputs for."
      },
      logit_bias: {
        type: "map",
        keys: {
          type: "string"
        },
        items: {
          type: "integer",
          minimum: -100,
          maximum: 100
        },
        description: `Modify the likelihood of specified tokens appearing in the completion.
        Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. 
        You can use this tokenizer tool (which works for both GPT-2 and GPT-3) to convert text to token IDs. 
        Mathematically, the bias is added to the logits generated by the model prior to sampling. 
        The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; 
        values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
        As an example, you can pass {"50256": -100} to prevent the <|endoftext|> token from being generated.`
      },
      max_tokens: {
        type: "integer",
        description: `The maximum number of tokens that can be generated in the completion.
        The token count of your prompt plus max_tokens cannot exceed the model's context length.`
      },
      n: {
        type: "integer",
        description: `How many completions to generate for each prompt.
        Note: Because this parameter generates many completions, it can quickly consume your token quota. 
        Use carefully and ensure that you have reasonable settings for max_tokens and stop.`
      },
      presence_penalty: {
        type: "number",
        minimum: -2,
        maximum: 2,
        description: `Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, 
        increasing the model's likelihood to talk about new topics.`
      },
      stop: {
        type: "array",
        items: {
          type: "string"
        },
        description: "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence."
      },
      stream: {
        type: "boolean",
        default: !0,
        description: `Whether to stream back partial progress. 
        If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example Python code.`
      },
      temperature: {
        type: "number",
        minimum: 0,
        maximum: 2,
        description: `What sampling temperature to use, between 0 and 2. 
        Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
        We generally recommend altering this or top_p but not both.`
      },
      top_p: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. 
        So 0.1 means only the tokens comprising the top 10% probability mass are considered.
        We generally recommend altering this or temperature but not both.`
      },
      user: {
        type: "string",
        description: "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse"
      }
    }
  },
  prompt_metadata: {
    type: "object",
    properties: {
      remember_chat_context: {
        type: "boolean"
      }
    }
  }
}, DEe = {
  ...Io,
  input: {
    type: "object",
    required: ["data"],
    properties: {
      data: {
        type: "string"
      },
      attachments: {
        type: "array",
        items: {
          type: "attachment",
          required: ["data"],
          mime_types: ["image/png"],
          properties: {
            data: {
              type: "string"
            }
          }
        }
      }
    }
  }
}, Ib = {
  // See /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.12/site-packages/openai/resources/images.py
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      // Exclude model since it should be the first property for any schema, regardless of spread order
      response_format: {
        type: "string",
        enum: ["url", "b64_json"],
        description: "The format in which the generated images are returned."
      },
      user: {
        type: "string",
        description: "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse."
      }
    }
  }
}, FEe = {
  // Extend DalleCommonPromptSchema with properties specific to Dalle2
  // See https://platform.openai.com/docs/api-reference/images/create
  ...Ib,
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string"
      },
      n: {
        type: "integer",
        minimum: 1,
        maximum: 10,
        description: "Number of images to generate"
      },
      size: {
        type: "string",
        enum: ["256x256", "512x512", "1024x1024"],
        description: "The size of the generated images."
      },
      // Intentionally spread last to be ordered last
      ...Ib.model_settings.properties
    }
  }
}, MEe = {
  // Extend DalleCommonPromptSchema with properties specific to Dalle3
  // See https://platform.openai.com/docs/api-reference/images/create
  ...Ib,
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string"
      },
      quality: {
        type: "string",
        enum: ["standard", "hd"],
        description: `The quality of the image that will be generated. 
        'hd' creates images with finer details and greater consistency across the image`
      },
      size: {
        type: "string",
        enum: ["1024x1024", "1792x1024", "1024x1792"],
        description: "The size of the generated images."
      },
      style: {
        type: "string",
        enum: ["vivid", "natural"],
        description: `The style of the generated images. Must be one of vivid or natural. 
        Vivid causes the model to lean towards generating hyper-real and dramatic images. 
        Natural causes the model to produce more natural, less hyper-real looking images.`
      },
      // Intentionally spread last to be ordered last
      ...Ib.model_settings.properties
    }
  }
}, BEe = {
  // See https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/text for settings
  // and defaults. The settings below are supported settings specified in the PaLMTextParser
  // refine_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string"
      },
      candidate_count: {
        type: "integer",
        minimum: 1,
        maximum: 4,
        description: "The number of response variations to return."
      },
      temperature: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `The temperature is used for sampling during response generation, 
        which occurs when topP and topK are applied. Temperature controls the degree of 
        randomness in token selection. Lower temperatures are good for prompts that require 
        a less open-ended or creative response, while higher temperatures can lead to more 
        diverse or creative results. A temperature of 0 means that the highest probability 
        tokens are always selected. In this case, responses for a given prompt are mostly 
        deterministic, but a small amount of variation is still possible.
        If the model returns a response that's too generic, too short, or the model gives a 
        fallback response, try increasing the temperature.`
      },
      top_p: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `Top-P changes how the model selects tokens for output. Tokens are selected 
        from the most (see top-K) to least probable until the sum of their probabilities equals 
        the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 
        and the top-P value is 0.5, then the model will select either A or B as the next token by 
        using temperature and excludes C as a candidate.
        Specify a lower value for less random responses and a higher value for more random responses.`
      },
      top_k: {
        type: "integer",
        minimum: 1,
        maximum: 40,
        description: `Top-K changes how the model selects tokens for output. A top-K of 1 means the 
        next selected token is the most probable among all tokens in the model's vocabulary 
        (also called greedy decoding), while a top-K of 3 means that the next token is selected 
        from among the three most probable tokens by using temperature.
        For each token selection step, the top-K tokens with the highest probabilities are sampled. 
        Then tokens are further filtered based on top-P with the final token selected using temperature sampling.
        
        Specify a lower value for less random responses and a higher value for more random responses.`
      }
    }
  },
  prompt_metadata: {
    type: "object",
    properties: {
      remember_chat_context: {
        type: "boolean"
      }
    }
  }
}, UEe = {
  // See https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/text-chat for settings
  // and defaults. The settings below are supported settings specified in the PaLMChatParser
  // refine_chat_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string"
      },
      context: {
        type: "string",
        description: `Context shapes how the model responds throughout the conversation. 
        For example, you can use context to specify words the model can or cannot use, 
        topics to focus on or avoid, or the response format or style.`
      },
      candidate_count: {
        type: "integer",
        minimum: 1,
        maximum: 4,
        description: "The number of response variations to return."
      },
      temperature: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `The temperature is used for sampling during response generation, 
        which occurs when topP and topK are applied. Temperature controls the degree of 
        randomness in token selection. Lower temperatures are good for prompts that require 
        a less open-ended or creative response, while higher temperatures can lead to more 
        diverse or creative results. A temperature of 0 means that the highest probability 
        tokens are always selected. In this case, responses for a given prompt are mostly 
        deterministic, but a small amount of variation is still possible.
        If the model returns a response that's too generic, too short, or the model gives 
        a fallback response, try increasing the temperature.`
      },
      top_p: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `Top-P changes how the model selects tokens for output. Tokens are selected from 
        the most (see top-K) to least probable until the sum of their probabilities equals the top-P value. 
        For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, 
        then the model will select either A or B as the next token by using temperature and excludes C as a candidate.
        Specify a lower value for less random responses and a higher value for more random responses.`
      },
      top_k: {
        type: "integer",
        minimum: 1,
        maximum: 40,
        description: `Top-K changes how the model selects tokens for output. A top-K of 1 means the next 
        selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), 
        while a top-K of 3 means that the next token is selected from among the three most probable tokens 
        by using temperature.
        For each token selection step, the top-K tokens with the highest probabilities are sampled. 
        Then tokens are further filtered based on top-P with the final token selected using temperature sampling.
        Specify a lower value for less random responses and a higher value for more random responses.`
      },
      examples: {
        type: "array",
        items: {
          type: "object",
          required: ["input", "output"],
          properties: {
            input: {
              type: "string"
            },
            output: {
              type: "string"
            }
          }
        },
        description: "Examples for the model to learn how to respond to the conversation."
      }
    }
  },
  prompt_metadata: {
    type: "object",
    properties: {
      remember_chat_context: {
        type: "boolean"
      }
    }
  }
}, HEe = {
  // See https://docs.anyscale.com/endpoints/model-serving/openai-migration-guide#step-3-check-parameter-compatibility
  // for settings and defaults. The settings below are supported settings specified in the OpenAIInference
  // refine_chat_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string"
      },
      frequency_penalty: {
        type: "number",
        minimum: -2,
        maximum: 2,
        description: `Number between -2.0 and 2.0. 
        Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`
      },
      max_tokens: {
        type: "integer",
        description: "The maximum number of tokens to generate in the chat completion."
      },
      presence_penalty: {
        type: "number",
        minimum: -2,
        maximum: 2,
        description: `Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, 
        increasing the model's likelihood to talk about new topics.`
      },
      stop: {
        type: "array",
        items: {
          type: "string"
        },
        description: "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence."
      },
      stream: {
        type: "boolean",
        default: !0,
        description: "If true, send messages token by token. If false, messages send in bulk."
      },
      temperature: {
        type: "number",
        minimum: 0,
        maximum: 2,
        description: "A number between 0 and 2. Higher values correspond to more random responses and lower values being more deterministic."
      },
      top_p: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `The percentage of tokens with top_p probability mass to consider. 
        For example, 0.1 means only tokens comprising the top 10% probability mass become candidates.`
      }
    }
  },
  prompt_metadata: {
    type: "object",
    properties: {
      remember_chat_context: {
        type: "boolean"
      }
    }
  }
}, uA = {
  // See https://huggingface.co/docs/transformers/v4.36.1/en/main_classes/pipelines#transformers.AutomaticSpeechRecognitionPipeline
  // for descriptions.
  // The following supported properties cannot be cleanly modeled in the schema and must be implemented programatically:
  // tokenizer, feature_extractor, device, decoder
  input: {
    type: "object",
    required: ["attachments"],
    properties: {
      attachments: {
        type: "array",
        items: {
          type: "attachment",
          required: ["data"],
          mime_types: [
            "audio/mpeg",
            "audio/wav",
            "audio/webm",
            "audio/flac",
            "audio/ogg",
            "audio/ogg"
          ],
          properties: {
            data: {
              type: "string"
            }
          }
        },
        max_items: 1
      }
    }
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: "Hugging Face model to use"
      },
      chunk_length_s: {
        type: "number",
        description: "The input length for each chunk. If chunk_length_s = 0 then chunking is disabled (default)."
      },
      stride_length_s: {
        type: "number",
        description: `The length of stride on the left and right of each chunk.
         Used only with chunk_length_s > 0. This enables the model to see more context and 
         infer letters better than without this context but the pipeline discards the stride 
         bits at the end to make the final reconstitution as perfect as possible.
         Defaults to defaults to chunk_length_s / 6`
      },
      device: {
        type: "string",
        enum: ["cuda", "mps", "cpu"],
        description: "The device to load the pipeline to. Mps backend not supported for all models."
      },
      framework: {
        type: "string",
        enum: ["pt", "tf"],
        description: `The framework to use, either "pt" for PyTorch or "tf" for TensorFlow. 
        The specified framework must be installed. If no framework is specified, will 
        default to the one currently installed. If no framework is specified and both 
        frameworks are installed, will default to the framework of the model, or to PyTorch if 
        no model is provided.`
      },
      tokenizer: {
        type: "string"
      },
      return_timestamps: {
        type: "string",
        enum: ["word", "char", "True", ""],
        description: "Only available for pure CTC models (Wav2Vec2, HuBERT, etc) and the Whisper model. Not available for other sequence-to-sequence models."
      },
      max_new_tokens: {
        type: "integer",
        description: "The maximum numbers of tokens to generate, ignoring the number of tokens in the prompt"
      }
    }
  }
}, cA = {
  // See https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/inference/_client.py#L302for supported params.
  // The settings below are supported settings specified in the HuggingFaceAutomaticSpeechRecognitionRemoteInference refine_completion_params implementation.
  input: {
    type: "object",
    required: ["attachments"],
    properties: {
      attachments: {
        type: "array",
        items: {
          type: "attachment",
          required: ["data"],
          mime_types: [
            "audio/mpeg",
            "audio/wav",
            "audio/webm",
            "audio/flac",
            "audio/ogg",
            "audio/ogg"
          ],
          properties: {
            data: {
              type: "string"
            }
          }
        },
        max_items: 1
      }
    }
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: "Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed Inference Endpoint",
        default: "openai/whisper-large-v2"
      }
    }
  }
}, fA = {
  // See https://github.com/huggingface/transformers/blob/cbbe30749b425f7c327acdab11473b33567a6e26/src/transformers/pipelines/image_to_text.py#L83
  // for settings and defaults. The settings below are supported settings
  // specified in the HuggingFaceImage2TextTransformer
  // refine_completion_params implementation.
  input: {
    type: "object",
    required: ["data"],
    properties: {
      attachments: {
        type: "array",
        items: {
          type: "attachment",
          required: ["data"],
          mime_types: ["image/png"],
          properties: {
            data: {
              type: "string"
            }
          }
        },
        max_items: 1
      }
    }
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: "Hugging Face model to use"
      },
      max_new_tokens: {
        type: "integer",
        description: "The amount of maximum tokens to generate. \n        By default it will use `generate` default."
      },
      timeout: {
        type: "number",
        description: `The maximum time in seconds to wait for fetching images 
        from the web. If None, no timeout is set and the call may block forever.`
      }
    }
  }
}, O_ = {
  // See /Users/ryanholinshead/Projects/aiconfig/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/text_2_image.py
  // for supported settings.
  // See https://huggingface.co/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline.__call__
  // for descriptions.
  // This is currently for Kandinsky 2.2
  // The following supported properties cannot be cleanly modeled in the schema and must be implemented programatically:
  // generator, latents, prompt_embeds, negative_prompt_embeds, callback
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: "Hugging Face model to use"
      },
      height: {
        type: "integer",
        description: "The height in pixels of the generated image."
      },
      width: {
        type: "integer",
        description: "The width in pixels of the generated image."
      },
      num_inference_steps: {
        type: "integer",
        description: `The number of denoising steps. More denoising steps usually lead to a higher 
        quality image at the expense of slower inference.`
      },
      guidance_scale: {
        type: "number",
        description: `A higher guidance scale value encourages the model to generate images closely linked 
        to the text prompt at the expense of lower image quality. Guidance scale is enabled when guidance_scale > 1.`
      },
      // TODO: Convert to anyOf once renderer supports it
      negative_prompt: {
        type: "union",
        types: [
          {
            type: "string"
          },
          {
            type: "array",
            items: {
              type: "string"
            }
          }
        ]
      },
      num_images_per_prompt: {
        type: "integer",
        description: "The number of images to generate per prompt."
      },
      eta: {
        type: "number",
        description: `Corresponds to parameter eta (η) from the DDIM paper. 
        Only applies to the DDIMScheduler, and is ignored in other schedulers.`
      },
      output_type: {
        type: "string",
        enum: ["pil", "array"],
        description: "The output format of the generated image. Choose between PIL.Image or np.array."
      },
      return_dict: {
        type: "boolean",
        description: "Whether or not to return a StableDiffusionPipelineOutput instead of a plain tuple."
      },
      cross_attention_kwargs: {
        type: "map",
        keys: {
          type: "string"
        },
        items: {
          type: "string"
        },
        description: "A kwargs dictionary that if specified is passed along to the AttentionProcessor as defined in self.processor."
      },
      guidance_rescale: {
        type: "number",
        description: `Guidance rescale factor from Common Diffusion Noise Schedules and Sample Steps are Flawed.
         Guidance rescale factor should fix overexposure when using zero terminal SNR.`
      },
      clip_skip: {
        type: "integer",
        description: `Number of layers to be skipped from CLIP while computing the prompt embeddings. 
        A value of 1 means that the output of the pre-final layer will be used for computing the prompt embeddings.`
      },
      requires_safety_checker: {
        type: "boolean",
        description: "Whether or not the model requires a safety checker to be used."
      },
      callback_steps: {
        type: "integer",
        description: `The frequency at which the callback function will be called. 
        If not specified, the callback will be called at every step.`
      }
    }
  }
}, dA = {
  // See https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/inference/_client.py#L1544 for supported params.
  // The settings below are supported settings specified in the HuggingFaceText2ImageRemoteInference refine_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: `Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL 
        to a deployed Inference Endpoint`,
        default: "CompVis/stable-diffusion-v1-4"
      },
      negative_prompt: {
        type: "string",
        description: "Describe content that should be avoided in the generated image."
      },
      height: {
        type: "number",
        description: "The height in pixels of the image to generate."
      },
      width: {
        type: "number",
        description: "The width in pixels of the image to generate."
      },
      num_inference_steps: {
        type: "integer",
        description: `The number of denoising steps. More denoising steps usually lead to a 
        higher quality image at the expense of slower inference.`
      },
      guidance_scale: {
        type: "number",
        description: `Higher guidance scale encourages to generate images that are closely linked to the text 'prompt',
        usually at the expense of lower image quality.`
      }
    }
  }
}, pA = {
  // See https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/inference/_client.py#L1624 for supported params.
  // The settings below are supported settings specified in the HuggingFaceText2SpeechRemoteInference refine_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: `Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL 
        to a deployed Inference Endpoint`,
        default: "facebook/fastspeech2-en-ljspeech"
      }
    }
  }
}, E_ = {
  // See https://huggingface.co/transformers/v4.11.3/main_classes/model.html and
  // https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: "Hugging Face model to use"
      },
      torch_dtype: {
        type: "string",
        description: `Override the default torch.dtype and load the model under this dtype. 
        If "auto" is passed the dtype will be automatically derived from the model’s weights.`
      },
      force_download: {
        type: "boolean",
        description: `Whether or not to force the (re-)download of the model weights and configuration files, 
        overriding the cached versions if they exist.`
      },
      cache_dir: {
        type: "string",
        description: ` Path to a directory in which a downloaded pretrained model configuration should be cached 
        if the standard cache should not be used.`
      },
      resume_download: {
        type: "boolean",
        description: `Whether or not to delete incompletely received files. 
        Will attempt to resume the download if such a file exists.`
      },
      proxies: {
        type: "map",
        keys: {
          type: "string"
        },
        items: {
          type: "string"
        },
        description: `A dictionary of proxy servers to use by protocol or endpoint, 
        e.g., {'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}. 
        The proxies are used on each request.`
      },
      output_loading_info: {
        type: "boolean",
        description: "Whether ot not to also return a dictionary containing missing keys, unexpected keys and error messages."
      },
      local_files_only: {
        type: "boolean",
        description: "Whether or not to only look at local files (i.e., do not try to download the model)."
      },
      use_auth_token: {
        type: "boolean",
        description: `The token to use as HTTP bearer authorization for remote files. 
        If True, will use the token generated when running transformers-cli login (stored in huggingface).`
      },
      revision: {
        type: "string",
        description: `The specific model version to use. It can be a branch name, a tag name, or a commit id,
         since we use a git-based system for storing models and other artifacts on huggingface.co, so revision 
         can be any identifier allowed by git.`
      },
      mirror: {
        type: "string",
        description: `Mirror source to accelerate downloads in China. If you are from China and have an accessibility 
        problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety. 
        Please refer to the mirror site for more information.`
      },
      low_cpu_mem_usage: {
        type: "boolean",
        description: `Tries to not use more than 1x model size in CPU memory (including peak memory) while loading 
        the model. This is an experimental feature and a subject to change at any moment.`
      },
      max_memory: {
        type: "map",
        keys: {
          type: "string"
        },
        items: {
          type: "number"
        },
        description: `A dictionary device identifier to maximum memory. Will default to the maximum memory available for each
        GPU and the available CPU RAM if unset.`
      },
      offload_folder: {
        type: "string",
        description: `If the 'device_map' contains any value "disk", the folder where we will offload weights.`
      },
      offload_state_dict: {
        type: "boolean",
        description: `If True, will temporarily offload the CPU state dict to the hard drive to avoid getting out of CPU
        RAM if the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to
        True when there is some disk offload.`
      },
      use_safetensors: {
        type: "boolean",
        description: `Whether or not to use safetensors checkpoints. Defaults to None. If not specified and safetensors
        is not installed, it will be set to False.`
      },
      variant: {
        type: "string",
        description: `If specified load weights from 'variant' filename, *e.g.* pytorch_model.<variant>.bin. 'variant' is
        ignored when using 'from_tf' or 'from_flax'`
      }
    }
  }
}, Fu = {
  // See https://huggingface.co/docs/transformers/main_classes/text_generation
  // The following supported properties cannot be cleanly modeled in the schema and must be implemented programatically:
  // constraints, exponential_decay_length_penalty, sequence_bias
  // TODO: Add tuple support for exponential_decay_length_penalty and sequence_bias
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: "Hugging Face model to use"
      },
      max_length: {
        type: "integer",
        description: `The maximum length the generated tokens can have. Corresponds to the length
        of the input prompt + max_new_tokens. Its effect is overridden by max_new_tokens, if also set.`
      },
      max_new_tokens: {
        type: "integer",
        description: "The maximum numbers of tokens to generate, ignoring the number of tokens in the prompt."
      },
      min_length: {
        type: "integer",
        description: `The minimum length of the sequence to be generated.
         Corresponds to the length of the input prompt + min_new_tokens. 
         Its effect is overridden by min_new_tokens, if also set.`
      },
      min_new_tokens: {
        type: "integer",
        description: "The minimum numbers of tokens to generate, ignoring the number of tokens in the prompt."
      },
      early_stopping: {
        // TODO: update to anyOf
        type: "union",
        types: [
          {
            type: "boolean"
          },
          {
            type: "string",
            enum: ["never"]
          }
        ],
        description: `Controls the stopping condition for beam-based methods, like beam-search. 
        It accepts the following values: True, where the generation stops as soon as there are num_beams 
        complete candidates; False, where an heuristic is applied and the generation stops when is it 
        very unlikely to find better candidates; "never", where the beam search procedure only stops when 
        there cannot be better candidates (canonical beam search algorithm).`
      },
      max_time: {
        type: "number",
        description: `The maximum amount of time you allow the computation to run for in seconds. 
        Generation will still finish the current pass after allocated time has been passed.`
      },
      do_sample: {
        type: "boolean",
        description: "Whether or not to use sampling ; use greedy decoding otherwise."
      },
      num_beams: {
        type: "integer",
        description: "Number of beams for beam search. 1 means no beam search."
      },
      num_beam_groups: {
        type: "integer",
        description: "Number of groups to divide num_beams into in order to ensure diversity among different groups of beams."
      },
      penality_alpha: {
        type: "number",
        description: "The values balance the model confidence and the degeneration penalty in contrastive search decoding."
      },
      use_cache: {
        type: "boolean",
        description: "Whether or not the model should use the past last key/values attentions (if applicable to the model) to speed up decoding."
      },
      temperature: {
        type: "number",
        description: "The value used to modulate the next token probabilities."
      },
      top_k: {
        type: "integer",
        description: "The number of highest probability vocabulary tokens to keep for top-k-filtering."
      },
      top_p: {
        type: "number",
        description: "If set to float < 1, only the most probable tokens with probabilities that add up to top_p or higher are kept for generation."
      },
      typical_p: {
        type: "number",
        description: `Local typicality measures how similar the conditional probability of predicting a target token next is to 
        the expected conditional probability of predicting a random token next, given the partial text already generated. 
        If set to float < 1, the smallest set of the most locally typical tokens with probabilities that add up to typical_p 
        or higher are kept for generation.`
      },
      epsilon_cutoff: {
        type: "number",
        description: ` If set to float strictly between 0 and 1, only tokens with a conditional probability greater than 
        epsilon_cutoff will be sampled. In the paper, suggested values range from 3e-4 to 9e-4, depending on the size of the model.
         See Truncation Sampling as Language Model Desmoothing for more details.`
      },
      eta_cutoff: {
        type: "number",
        description: `Eta sampling is a hybrid of locally typical sampling and epsilon sampling. If set to float strictly between 0 
        and 1, a token is only considered if it is greater than either 
        eta_cutoff or sqrt(eta_cutoff) * exp(-entropy(softmax(next_token_logits))). The latter term is intuitively the expected 
        next token probability, scaled by sqrt(eta_cutoff). In the paper, suggested values range from 3e-4 to 2e-3, depending 
        on the size of the model. See Truncation Sampling as Language Model Desmoothing for more details.`
      },
      diveristy_penalty: {
        type: "number",
        description: `This value is subtracted from a beam’s score if it generates a token same as any beam from other group at a 
        particular time. Note that diversity_penalty is only effective if group beam search is enabled.`
      },
      repetition_penalty: {
        type: "number",
        description: "The parameter for repetition penalty. 1.0 means no penalty."
      },
      encoder_repetition_penalty: {
        type: "number",
        description: `The paramater for encoder_repetition_penalty. An exponential penalty on sequences that are not in the 
        original input. 1.0 means no penalty.`
      },
      length_penalty: {
        type: "number",
        description: `Exponential penalty to the length that is used with beam-based generation. It is applied as an exponent 
        to the sequence length, which in turn is used to divide the score of the sequence. Since the score is the log likelihood 
        of the sequence (i.e. negative), length_penalty > 0.0 promotes longer sequences, while length_penalty < 0.0 encourages 
        shorter sequences.`
      },
      no_repeat_ngram_size: {
        type: "integer",
        description: "If set to int > 0, all ngrams of that size can only occur once."
      },
      bad_words_ids: {
        type: "array",
        items: {
          type: "array",
          items: {
            type: "integer"
          }
        },
        description: `List of list of token ids that are not allowed to be generated. 
        Check NoBadWordsLogitsProcessor for further documentation and examples.`
      },
      force_words_ids: {
        type: "union",
        types: [
          {
            type: "array",
            items: {
              type: "array",
              items: {
                type: "integer"
              }
            }
          },
          {
            type: "array",
            items: {
              type: "array",
              items: {
                type: "array",
                items: {
                  type: "integer"
                }
              }
            }
          }
        ],
        description: `List of token ids that must be generated. If given a List[List[int]], this is treated as a simple 
        list of words that must be included, the opposite to bad_words_ids. If given List[List[List[int]]], 
        this triggers a disjunctive constraint, where one can allow different forms of each word.`
      },
      renormalize_logits: {
        type: "boolean",
        description: `Whether to renormalize the logits after applying all the logits processors or warpers 
        (including the custom ones). It’s highly recommended to set this flag to True as the search algorithms suppose the 
        score logits are normalized but some logit processors or warpers break the normalization.`
      },
      forced_bos_token_id: {
        type: "integer",
        description: `The id of the token to force as the first generated token after the decoder_start_token_id. 
        Useful for multilingual models like mBART where the first generated token needs to be the target language token.`
      },
      forced_eos_token_id: {
        type: "union",
        types: [
          {
            type: "integer"
          },
          {
            type: "array",
            items: {
              type: "integer"
            }
          }
        ],
        description: `The id of the token to force as the last generated token when max_length is reached. Optionally, use a list 
        to set multiple end-of-sequence tokens.`
      },
      remove_invalid_values: {
        type: "boolean",
        description: `Whether to remove possible nan and inf outputs of the model to prevent the generation method to crash. 
        Note that using remove_invalid_values can slow down generation.`
      },
      suppress_tokens: {
        type: "array",
        items: {
          type: "integer"
        },
        description: `A list of tokens that will be suppressed at generation. The SupressTokens logit processor will set their 
        log probs to -inf so that they are not sampled.`
      },
      begin_suppress_tokens: {
        type: "array",
        items: {
          type: "integer"
        },
        description: `A list of tokens that will be suppressed at the beginning of the generation. The SupressBeginTokens logit 
        processor will set their log probs to -inf so that they are not sampled.`
      },
      forced_decover_ids: {
        type: "array",
        items: {
          type: "array",
          items: {
            type: "integer"
          }
        },
        description: `A list of pairs of integers which indicates a mapping from generation indices to token indices that will be 
        forced before sampling. For example, [[1, 123]] means the second generated token will always be a token of index 123.`
      },
      guidance_scale: {
        type: "number",
        description: `The guidance scale for classifier free guidance (CFG). CFG is enabled by setting guidance_scale > 1. 
        Higher guidance scale encourages the model to generate samples that are more closely linked to the input prompt, usually 
        at the expense of poorer quality.`
      },
      low_memory: {
        type: "boolean",
        description: "Switch to sequential topk for contrastive search to reduce peak memory. Used with contrastive search."
      },
      num_return_sequences: {
        type: "integer",
        description: "The number of independently computed returned sequences for each element in the batch."
      },
      output_attentions: {
        type: "boolean",
        description: `Whether or not to return the attentions tensors of all attention layers. See attentions under 
        returned tensors for more details.`
      },
      output_hidden_states: {
        type: "boolean",
        description: `Whether or not to return the hidden states of all layers. See hidden_states under returned tensors for 
        more details.`
      },
      output_scores: {
        type: "boolean",
        description: "Whether or not to return the prediction scores. See scores under returned tensors for more details."
      },
      return_dict_in_generate: {
        type: "boolean",
        description: "Whether or not to return a ModelOutput instead of a plain tuple."
      },
      pad_token_id: {
        type: "integer",
        description: "The id of the padding token."
      },
      bos_token_id: {
        type: "integer",
        description: "The id of the beginning-of-sequence token."
      },
      eos_token_id: {
        type: "union",
        types: [
          {
            type: "integer"
          },
          {
            type: "array",
            items: {
              type: "integer"
            }
          }
        ],
        description: `The id of the end-of-sequence token. Optionally, use a list to set multiple end-of-sequence tokens.
        `
      },
      encoder_no_repeat_ngram_size: {
        type: "integer",
        description: `If set to int > 0, all ngrams of that size that occur in the encoder_input_ids cannot occur 
        in the decoder_input_ids.`
      },
      decoder_start_token_id: {
        type: "integer",
        description: "If an encoder-decoder model starts decoding with a different token than bos, the id of that token."
      },
      num_assistant_tokens: {
        type: "integer",
        description: `Defines the number of speculative tokens that shall be generated by the assistant model before being checked 
        by the target model at each iteration. Higher values for num_assistant_tokens make the generation more speculative : 
        If the assistant model is performant larger speed-ups can be reached, if the assistant model requires lots of corrections, 
        lower speed-ups are reached.`
      },
      num_assistant_tokens_schedule: {
        type: "string",
        description: "Defines the schedule at which max assistant tokens shall be changed during inference."
      }
    }
  }
}, mA = {
  ...Fu
}, hA = {
  // See https://github.com/huggingface/huggingface_hub/blob/a331e82aad1bc63038194611236db28fa013814c/src/huggingface_hub/inference/_client.py#L1206
  // for settings and https://huggingface.co/docs/api-inference/detailed_parameters for defaults.
  // The settings below are supported settings specified in the HuggingFaceTextGenerationRemoteInference
  // refine_chat_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: `Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL 
        to a deployed Inference Endpoint`,
        default: "HuggingFaceH4/zephyr-7b-beta"
      },
      temperature: {
        type: "number",
        minimum: 0,
        maximum: 100,
        description: `The temperature of the sampling operation. 
        1 means regular sampling, 0 means always take the highest score, 
        100.0 is getting closer to uniform probability.`
      },
      top_k: {
        type: "integer",
        description: "Integer to define the top tokens considered within the sample operation to create new text."
      },
      top_p: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `Float to define the tokens that are within the sample operation of text generation. 
        Add tokens in the sample for more probable to least probable until the sum of the probabilities 
        is greater than top_p.`
      },
      details: {
        type: "boolean"
      },
      stream: {
        type: "boolean",
        default: !0
      },
      do_sample: {
        type: "boolean",
        description: "Whether or not to use sampling, use greedy decoding otherwise."
      },
      max_new_tokens: {
        type: "integer",
        default: 400,
        description: `The amount of new tokens to be generated, this does not include the input length 
        it is a estimate of the size of generated text you want. Each new tokens slows down the request, 
        so look for balance between response times and length of text generated.`
      },
      best_of: {
        type: "integer"
      },
      repetition_penalty: {
        type: "number",
        minimum: 0,
        maximum: 100,
        description: `The more a token is used within generation the more it is penalized to not be picked
         in successive generation passes.`
      },
      return_full_text: {
        type: "boolean",
        description: "If set to False, the return results will not contain the original query making it easier for prompting."
      },
      seed: {
        type: "integer"
      },
      stop_sequences: {
        type: "array",
        items: {
          type: "string"
        }
      },
      truncate: {
        type: "integer"
      },
      typical_p: {
        type: "number"
      },
      watermark: {
        type: "boolean"
      }
    }
  }
}, gA = {
  // See https://huggingface.co/docs/api-inference/detailed_parameters#summarization-task for supported params.
  // The settings below are supported settings specified in the HuggingFaceTextSummarizationRemoteInference
  // refine_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: `Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL 
        to a deployed Inference Endpoint`,
        default: "sshleifer/distilbart-cnn-12-6"
      },
      min_length: {
        type: "integer",
        description: "Integer to define the minimum length in tokens of the output summary."
      },
      max_length: {
        type: "integer",
        description: "Integer to define the maximum length in tokens of the output summary."
      },
      top_k: {
        type: "integer",
        description: "Integer to define the top tokens considered within the sample operation to create new text."
      },
      top_p: {
        type: "number",
        description: `Float to define the tokens that are within the sample operation of text generation. 
        Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top_p.`
      },
      temperature: {
        type: "number",
        minimum: 0,
        maximum: 100,
        description: `The temperature of the sampling operation. 1 means regular sampling, 0 means always take the highest score, 
        100.0 is getting closer to uniform probability.`
      },
      repetition_penalty: {
        type: "number",
        minimum: 0,
        maximum: 100,
        description: "The more a token is used within generation the more it is penalized to not be picked in successive generation passes."
      },
      max_time: {
        type: "number",
        minimum: 0,
        maximum: 120,
        description: `The amount of time in seconds that the query should take maximum. 
        Network can cause some overhead so it will be a soft limit.`
      },
      use_cache: {
        type: "boolean",
        description: `There is a cache layer on the inference API to speedup requests we have already seen. 
        Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). 
        However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used 
        resulting in a real new query.`
      },
      wait_for_model: {
        type: "boolean",
        description: `If the model is not ready, wait for it instead of receiving 503. 
        It limits the number of requests required to get your inference done. 
        It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places.`
      }
    }
  }
}, yA = {
  // See https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/inference/_client.py#L1704
  // for supported params.
  // The settings below are supported settings specified in the HuggingFaceTextTranslationRemoteInference
  // refine_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: `Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL 
        to a deployed Inference Endpoint`,
        default: "t5-small"
      },
      src_lang: {
        type: "string",
        description: `The source language of the text to translate, if the model supports multiple languages. 
        Must be in locale format supported by the model (e.g. en_XX, fr_XX, etc.)`
      },
      tgt_lang: {
        type: "string",
        description: `The target language of the translation, if the model supports multiple languages. 
        Must be in locale format supported by the model (e.g. en_XX, fr_XX, etc.)`
      }
    }
  }
}, vA = {
  // See https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/inference/_client.py#L731for supported params.
  // The settings below are supported settings specified in the HuggingFaceImage2TextRemoteInference refine_completion_params implementation.
  input: {
    type: "object",
    required: ["data"],
    properties: {
      attachments: {
        type: "array",
        items: {
          type: "attachment",
          required: ["data"],
          mime_types: ["image/*"],
          properties: {
            data: {
              type: "string"
            }
          }
        },
        max_items: 1
      }
    }
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: `Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL 
        to a deployed Inference Endpoint`,
        default: "Salesforce/blip-image-captioning-base"
      }
    }
  }
}, WEe = {
  // See https://docs.anthropic.com/claude/reference/complete_post
  // for settings and defaults. The settings below are supported settings specified in the ClaudeBedrockModelParser
  // refine_chat_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string"
      },
      max_tokens_to_sample: {
        type: "number",
        description: `The maximum number of tokens to generate before stopping.
        Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.`
      },
      stop_sequences: {
        type: "array",
        items: {
          type: "string"
        },
        description: "Sequences that will cause the model to stop generating."
      },
      stream: {
        type: "boolean",
        default: !0,
        description: "If true, send messages token by token. If false, messages send in bulk."
      },
      temperature: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: "Amount of randomness injected into the response."
      },
      top_p: {
        type: "number",
        minimum: 0,
        maximum: 1,
        description: `In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by top_p. 
        You should either alter temperature or top_p, but not both.`
      },
      top_k: {
        type: "number",
        description: `Only sample from the top K options for each subsequent token.
        Used to remove "long tail" low probability responses.`
      },
      metadata: {
        type: "object",
        properties: {
          user_id: {
            type: "string"
          }
        },
        description: "An object describing metadata about the request. (Claude specific)"
      }
    },
    required: ["model", "max_tokens_to_sample", "stop_sequences"]
  },
  prompt_metadata: {
    type: "object",
    properties: {
      remember_chat_context: {
        type: "boolean"
      }
    }
  }
}, bA = {
  // See API Ref: https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/inference/_client.py#L338
  // See Docs ref: https://huggingface.co/docs/huggingface_hub/package_reference/inference_client#huggingface_hub.InferenceClient.conversational
  // for supported params.
  // The settings below are supported settings specified in the HuggingFaceConversationalRemoteInference
  // refine_completion_params implementation.
  input: {
    type: "string"
  },
  model_settings: {
    type: "object",
    properties: {
      model: {
        type: "string",
        description: `Hugging Face model to use. Can be a model ID hosted on the Hugging Face Hub or a URL 
        to a deployed Inference Endpoint`,
        default: "facebook/blenderbot-400M-distill"
      },
      parameters: {
        type: "object",
        description: "Additional parameters for the conversational task.",
        properties: {
          min_length: {
            type: "integer",
            description: "Integer to define the minimum length in tokens of the output summary.."
          },
          max_length: {
            type: "integer",
            description: "Integer to define the maximum length in tokens of the output summary."
          },
          top_k: {
            type: "integer",
            description: "Integer to define the top tokens considered within the sample operation to create new text."
          },
          top_p: {
            type: "number",
            description: "Float to define the tokens that are within the sample operation of text generation. Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top_p."
          },
          temperature: {
            type: "number",
            description: "The temperature of the sampling operation. 1 means regular sampling, 0 means always take the highest score, 100.0 is getting closer to uniform probability.",
            minimum: 0,
            maximum: 100
          },
          repetition_penalty: {
            type: "number",
            description: "The more a token is used within generation the more it is penalized to not be picked in successive generation passes.",
            minimum: 0,
            maximum: 100
          },
          max_time: {
            type: "number",
            description: "The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit.",
            minimum: 0,
            maximum: 120
          }
        }
      }
    }
  }
};
function $c(e, t) {
  var n;
  const r = (n = e.metadata) == null ? void 0 : n.model;
  return r ? typeof r == "string" ? r : r.name : t;
}
const bW = {
  // OpenAIChatModelParser
  "gpt-4": Io,
  "gpt-4-0314": Io,
  "gpt-4-0613": Io,
  "gpt-4-32k": Io,
  "gpt-4-32k-0314": Io,
  "gpt-4-32k-0613": Io,
  "gpt-3.5-turbo": Io,
  "gpt-3.5-turbo-16k": Io,
  "gpt-3.5-turbo-0301": Io,
  "gpt-3.5-turbo-0613": Io,
  "gpt-3.5-turbo-16k-0613": Io,
  // TODO: Add GPT4-V parser in AIConfig
  "gpt-4-vision-preview": DEe,
  // DalleImageGenerationParser
  "dall-e-2": FEe,
  "dall-e-3": MEe,
  ClaudeBedrockModelParser: WEe,
  HuggingFaceImage2TextRemoteInference: vA,
  HuggingFaceConversationalRemoteInference: bA,
  HuggingFaceAutomaticSpeechRecognitionRemoteInference: cA,
  HuggingFaceText2ImageRemoteInference: dA,
  HuggingFaceText2SpeechRemoteInference: pA,
  // TODO: core parser and remote inference share the same code, delete
  // hf core parser and keep it in the extension instead
  // HuggingFaceTextGenerationRemoteInference (Core parser and remote inference extension)
  HuggingFaceTextGenerationRemoteInference: hA,
  HuggingFaceTextSummarizationRemoteInference: gA,
  HuggingFaceTextTranslationRemoteInference: yA,
  // PaLMTextParser
  "models/text-bison-001": BEe,
  // PaLMChatParser
  "models/chat-bison-001": UEe,
  // AnyscaleEndpoint
  AnyscaleEndpoint: HEe,
  // Local HuggingFace Parser Extensions
  HuggingFaceAutomaticSpeechRecognitionTransformer: uA,
  HuggingFaceImage2TextTransformer: fA,
  HuggingFaceText2ImageDiffusor: O_,
  Text2Image: O_,
  HuggingFaceText2SpeechTransformer: E_,
  Text2Speech: E_,
  HuggingFaceTextGenerationTransformer: Fu,
  TextGeneration: Fu,
  HuggingFaceTextSummarizationTransformer: mA,
  HuggingFaceTextTranslationTransformer: Fu,
  // Temporary mapping of HF model parsers to task names. This won't be needed
  // once we have prompt schemas implemented at the parser layer
  "Automatic Speech Recognition": cA,
  "Image-to-Text": vA,
  "Text-to-Image": dA,
  "Text-to-Speech": pA,
  "Text Generation": hA,
  Summarization: gA,
  Translation: yA,
  Conversational: bA,
  "Automatic Speech Recognition (Local)": uA,
  "Image-to-Text (Local)": fA,
  "Text-to-Image (Local)": O_,
  "Text-to-Speech (Local)": E_,
  "Text Generation (Local)": Fu,
  "Summarization (Local)": mA,
  "Translation (Local)": Fu
};
function wW(e, t) {
  const n = $c(e, t);
  if (n)
    return bW[n];
}
function VEe(e) {
  const t = wW(e);
  return t ? t.input.type === "string" : (
    // TODO: Handle case where data is object with values associated with mimetype?
    typeof e.input == "string" || typeof e.input.data == "string"
  );
}
function wA(e) {
  var t;
  return ((t = e.metadata) == null ? void 0 : t.parameters) != null || VEe(e);
}
function qEe(e) {
  const t = bW[e];
  return t ? t.input.type === "string" ? "" : t.input.properties.data ? {
    data: t.input.properties.data.type === "string" ? "" : {}
  } : {} : "";
}
function oo(e, t, n) {
  return {
    ...e,
    prompts: e.prompts.map(
      (r) => r._ui.id === t ? n(r) : r
    )
  };
}
function GEe(e, t, n) {
  return {
    ...e,
    prompts: [
      ...e.prompts.slice(0, t),
      n,
      ...e.prompts.slice(t)
    ]
  };
}
function Mh(e, t) {
  return {
    ...e,
    _ui: {
      ...e._ui,
      runningPromptId: t
    }
  };
}
function KEe(e, t, n) {
  const r = (o) => {
    const i = n.prompts.find(
      (a) => a.name === o.name
    );
    return {
      ...i,
      ...o,
      metadata: {
        ...i == null ? void 0 : i.metadata,
        ...o.metadata
      }
    };
  };
  switch (t.type) {
    case "ADD_PROMPT_AT_INDEX":
      return oo(
        e,
        t.prompt._ui.id,
        r
      );
    case "UPDATE_PROMPT_INPUT":
      return oo(e, t.id, r);
    default:
      return e;
  }
}
function YEe(e, t) {
  const n = {
    ...e,
    _ui: {
      ...e._ui,
      isDirty: !0
    }
  };
  switch (t.type) {
    case "ADD_PROMPT_AT_INDEX":
      return GEe(n, t.index, t.prompt);
    case "CLEAR_OUTPUTS": {
      const r = e.prompts.map((o) => o.outputs ? {
        ...o,
        outputs: void 0
      } : o);
      for (const o of r)
        o.outputs && delete o.outputs;
      return {
        ...n,
        prompts: r
      };
    }
    case "DELETE_PROMPT":
      return {
        ...n,
        prompts: n.prompts.filter(
          (r) => r._ui.id !== t.id
        )
      };
    case "SET_DESCRIPTION":
      return {
        ...n,
        description: t.description
      };
    case "SET_NAME":
      return {
        ...n,
        name: t.name
      };
    case "UPDATE_PROMPT_INPUT":
      return oo(n, t.id, (r) => ({
        ...r,
        input: t.input
      }));
    case "UPDATE_PROMPT_NAME":
      return n.prompts.map(
        (r) => r.name
      ).find((r) => t.name === r) ? e : oo(n, t.id, (r) => ({
        ...r,
        name: t.name
      }));
    case "UPDATE_PROMPT_MODEL":
      return oo(n, t.id, (r) => {
        var o;
        let i;
        const a = (o = r.metadata) == null ? void 0 : o.model;
        return a && typeof a != "string" && (i = a.settings), {
          ...r,
          metadata: {
            ...r.metadata,
            model: t.modelName ? {
              name: t.modelName,
              settings: i
            } : void 0
          }
        };
      });
    case "UPDATE_PROMPT_MODEL_SETTINGS":
      return oo(n, t.id, (r) => ({
        ...r,
        metadata: {
          ...r.metadata,
          model: {
            // TODO: Figure out why 'as' is needed here. Should just be ClientAIConfig and that
            // should properly type metadata
            // ModelMetadata must have name here
            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
            name: $c(
              r,
              e.metadata.default_model
            ),
            settings: t.modelSettings
          }
        }
      }));
    case "UPDATE_PROMPT_PARAMETERS":
      return oo(n, t.id, (r) => ({
        ...r,
        metadata: {
          ...r.metadata,
          parameters: t.parameters
        }
      }));
    case "UPDATE_GLOBAL_PARAMETERS":
      return {
        ...n,
        metadata: {
          ...e.metadata,
          parameters: t.parameters
        }
      };
    case "RUN_PROMPT_START": {
      const r = Mh(n, t.promptId);
      return oo(r, t.promptId, (o) => ({
        ...o,
        _ui: {
          ...o._ui,
          isRunning: !0,
          cancellationToken: t.cancellationToken
        },
        // clear the outputs before running so that new outputs are noticeable, even if they are identical
        outputs: []
      }));
    }
    case "RUN_PROMPT_CANCEL": {
      const r = Mh(n, void 0), o = (i) => {
        const a = t.config.prompts.find(
          (l) => l.name === i.name
        );
        return {
          ...i,
          outputs: a == null ? void 0 : a.outputs,
          _ui: {
            ...i._ui,
            isRunning: !1,
            cancellationToken: void 0
          }
        };
      };
      return oo(
        r,
        t.promptId,
        o
      );
    }
    case "RUN_PROMPT_ERROR": {
      const r = Mh(n, void 0);
      return oo(
        r,
        t.promptId,
        (o) => ({
          ...o,
          outputs: [
            {
              output_type: "error",
              ename: "Error",
              evalue: t.message ?? "Error running prompt",
              traceback: []
            }
          ],
          _ui: {
            ...o._ui,
            isRunning: !1,
            cancellationToken: void 0
          }
        })
      );
    }
    case "RUN_PROMPT_SUCCESS": {
      const r = Mh(n, void 0), o = (i) => {
        var a;
        const l = (a = t.config) == null ? void 0 : a.prompts.find(
          (s) => s.name === i.name
        );
        return {
          ...i,
          outputs: (l == null ? void 0 : l.outputs) ?? i.outputs,
          _ui: {
            ...i._ui,
            isRunning: !1,
            cancellationToken: void 0
          }
        };
      };
      return oo(
        r,
        t.promptId,
        o
      );
    }
    case "STREAM_AICONFIG_CHUNK": {
      const r = (o) => {
        const i = t.config.prompts.find(
          (a) => a.name === o.name
        );
        return {
          // Note: Don't need to set `isRunning` or `cancellationToken`
          // because we already call RUN_PROMPT_START earlier in `onRunPrompt`
          ...o,
          outputs: i == null ? void 0 : i.outputs
        };
      };
      return oo(
        n,
        n._ui.runningPromptId,
        r
      );
    }
    case "STREAM_OUTPUT_CHUNK":
      return oo(n, t.promptId, (r) => ({
        ...r,
        outputs: [t.output]
      }));
    case "SAVE_CONFIG_SUCCESS":
      return {
        ...e,
        _ui: {
          ...e._ui,
          isDirty: !1
        }
      };
    case "CONSOLIDATE_AICONFIG":
      return KEe(
        n,
        t.action,
        t.config
      );
  }
}
var Ab = { exports: {} };
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
Ab.exports;
(function(e, t) {
  (function() {
    var n, r = "4.17.21", o = 200, i = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", a = "Expected a function", l = "Invalid `variable` option passed into `_.template`", s = "__lodash_hash_undefined__", c = 500, p = "__lodash_placeholder__", f = 1, m = 2, h = 4, g = 1, v = 2, S = 1, w = 2, x = 4, k = 8, E = 16, O = 32, C = 64, R = 128, L = 256, D = 512, N = 30, H = "...", B = 800, K = 16, W = 1, U = 2, Q = 3, J = 1 / 0, q = 9007199254740991, ee = 17976931348623157e292, A = NaN, X = 4294967295, ie = X - 1, j = X >>> 1, le = [
      ["ary", R],
      ["bind", S],
      ["bindKey", w],
      ["curry", k],
      ["curryRight", E],
      ["flip", D],
      ["partial", O],
      ["partialRight", C],
      ["rearg", L]
    ], re = "[object Arguments]", he = "[object Array]", xe = "[object AsyncFunction]", ke = "[object Boolean]", Ae = "[object Date]", pe = "[object DOMException]", Me = "[object Error]", We = "[object Function]", ze = "[object GeneratorFunction]", Fe = "[object Map]", Ye = "[object Number]", oe = "[object Null]", ae = "[object Object]", Ie = "[object Promise]", Ce = "[object Proxy]", ye = "[object RegExp]", we = "[object Set]", Ge = "[object String]", $e = "[object Symbol]", ue = "[object Undefined]", Pe = "[object WeakMap]", Je = "[object WeakSet]", Y = "[object ArrayBuffer]", te = "[object DataView]", Ne = "[object Float32Array]", et = "[object Float64Array]", ft = "[object Int8Array]", un = "[object Int16Array]", Ct = "[object Int32Array]", _e = "[object Uint8Array]", Ve = "[object Uint8ClampedArray]", dn = "[object Uint16Array]", pt = "[object Uint32Array]", Gt = /\b__p \+= '';/g, pn = /\b(__p \+=) '' \+/g, nm = /(__e\(.*?\)|\b__t\)) \+\n'';/g, _o = /&(?:amp|lt|gt|quot|#39);/g, Oo = /[&<>"']/g, eS = RegExp(_o.source), ra = RegExp(Oo.source), tS = /<%-([\s\S]+?)%>/g, su = /<%([\s\S]+?)%>/g, mn = /<%=([\s\S]+?)%>/g, rm = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Zl = /^\w*$/, qr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, uu = /[\\^$.*+?()[\]{}|]/g, om = RegExp(uu.source), Ga = /^\s+/, nS = /\s/, rS = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, oS = /\{\n\/\* \[wrapped with (.+)\] \*/, iS = /,? & /, aS = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, He = /[()=,{}\[\]\/\s]/, Lt = /\\(\\)?/g, dr = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Xn = /\w*$/, WY = /^[-+]0x[0-9a-f]+$/i, VY = /^0b[01]+$/i, qY = /^\[object .+?Constructor\]$/, GY = /^0o[0-7]+$/i, KY = /^(?:0|[1-9]\d*)$/, YY = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, im = /($^)/, XY = /['\n\r\u2028\u2029\\]/g, am = "\\ud800-\\udfff", ZY = "\\u0300-\\u036f", QY = "\\ufe20-\\ufe2f", JY = "\\u20d0-\\u20ff", K2 = ZY + QY + JY, Y2 = "\\u2700-\\u27bf", X2 = "a-z\\xdf-\\xf6\\xf8-\\xff", eX = "\\xac\\xb1\\xd7\\xf7", tX = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", nX = "\\u2000-\\u206f", rX = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", Z2 = "A-Z\\xc0-\\xd6\\xd8-\\xde", Q2 = "\\ufe0e\\ufe0f", J2 = eX + tX + nX + rX, lS = "['’]", oX = "[" + am + "]", eR = "[" + J2 + "]", lm = "[" + K2 + "]", tR = "\\d+", iX = "[" + Y2 + "]", nR = "[" + X2 + "]", rR = "[^" + am + J2 + tR + Y2 + X2 + Z2 + "]", sS = "\\ud83c[\\udffb-\\udfff]", aX = "(?:" + lm + "|" + sS + ")", oR = "[^" + am + "]", uS = "(?:\\ud83c[\\udde6-\\uddff]){2}", cS = "[\\ud800-\\udbff][\\udc00-\\udfff]", cu = "[" + Z2 + "]", iR = "\\u200d", aR = "(?:" + nR + "|" + rR + ")", lX = "(?:" + cu + "|" + rR + ")", lR = "(?:" + lS + "(?:d|ll|m|re|s|t|ve))?", sR = "(?:" + lS + "(?:D|LL|M|RE|S|T|VE))?", uR = aX + "?", cR = "[" + Q2 + "]?", sX = "(?:" + iR + "(?:" + [oR, uS, cS].join("|") + ")" + cR + uR + ")*", uX = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", cX = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", fR = cR + uR + sX, fX = "(?:" + [iX, uS, cS].join("|") + ")" + fR, dX = "(?:" + [oR + lm + "?", lm, uS, cS, oX].join("|") + ")", pX = RegExp(lS, "g"), mX = RegExp(lm, "g"), fS = RegExp(sS + "(?=" + sS + ")|" + dX + fR, "g"), hX = RegExp([
      cu + "?" + nR + "+" + lR + "(?=" + [eR, cu, "$"].join("|") + ")",
      lX + "+" + sR + "(?=" + [eR, cu + aR, "$"].join("|") + ")",
      cu + "?" + aR + "+" + lR,
      cu + "+" + sR,
      cX,
      uX,
      tR,
      fX
    ].join("|"), "g"), gX = RegExp("[" + iR + am + K2 + Q2 + "]"), yX = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, vX = [
      "Array",
      "Buffer",
      "DataView",
      "Date",
      "Error",
      "Float32Array",
      "Float64Array",
      "Function",
      "Int8Array",
      "Int16Array",
      "Int32Array",
      "Map",
      "Math",
      "Object",
      "Promise",
      "RegExp",
      "Set",
      "String",
      "Symbol",
      "TypeError",
      "Uint8Array",
      "Uint8ClampedArray",
      "Uint16Array",
      "Uint32Array",
      "WeakMap",
      "_",
      "clearTimeout",
      "isFinite",
      "parseInt",
      "setTimeout"
    ], bX = -1, Kt = {};
    Kt[Ne] = Kt[et] = Kt[ft] = Kt[un] = Kt[Ct] = Kt[_e] = Kt[Ve] = Kt[dn] = Kt[pt] = !0, Kt[re] = Kt[he] = Kt[Y] = Kt[ke] = Kt[te] = Kt[Ae] = Kt[Me] = Kt[We] = Kt[Fe] = Kt[Ye] = Kt[ae] = Kt[ye] = Kt[we] = Kt[Ge] = Kt[Pe] = !1;
    var Bt = {};
    Bt[re] = Bt[he] = Bt[Y] = Bt[te] = Bt[ke] = Bt[Ae] = Bt[Ne] = Bt[et] = Bt[ft] = Bt[un] = Bt[Ct] = Bt[Fe] = Bt[Ye] = Bt[ae] = Bt[ye] = Bt[we] = Bt[Ge] = Bt[$e] = Bt[_e] = Bt[Ve] = Bt[dn] = Bt[pt] = !0, Bt[Me] = Bt[We] = Bt[Pe] = !1;
    var wX = {
      // Latin-1 Supplement block.
      À: "A",
      Á: "A",
      Â: "A",
      Ã: "A",
      Ä: "A",
      Å: "A",
      à: "a",
      á: "a",
      â: "a",
      ã: "a",
      ä: "a",
      å: "a",
      Ç: "C",
      ç: "c",
      Ð: "D",
      ð: "d",
      È: "E",
      É: "E",
      Ê: "E",
      Ë: "E",
      è: "e",
      é: "e",
      ê: "e",
      ë: "e",
      Ì: "I",
      Í: "I",
      Î: "I",
      Ï: "I",
      ì: "i",
      í: "i",
      î: "i",
      ï: "i",
      Ñ: "N",
      ñ: "n",
      Ò: "O",
      Ó: "O",
      Ô: "O",
      Õ: "O",
      Ö: "O",
      Ø: "O",
      ò: "o",
      ó: "o",
      ô: "o",
      õ: "o",
      ö: "o",
      ø: "o",
      Ù: "U",
      Ú: "U",
      Û: "U",
      Ü: "U",
      ù: "u",
      ú: "u",
      û: "u",
      ü: "u",
      Ý: "Y",
      ý: "y",
      ÿ: "y",
      Æ: "Ae",
      æ: "ae",
      Þ: "Th",
      þ: "th",
      ß: "ss",
      // Latin Extended-A block.
      Ā: "A",
      Ă: "A",
      Ą: "A",
      ā: "a",
      ă: "a",
      ą: "a",
      Ć: "C",
      Ĉ: "C",
      Ċ: "C",
      Č: "C",
      ć: "c",
      ĉ: "c",
      ċ: "c",
      č: "c",
      Ď: "D",
      Đ: "D",
      ď: "d",
      đ: "d",
      Ē: "E",
      Ĕ: "E",
      Ė: "E",
      Ę: "E",
      Ě: "E",
      ē: "e",
      ĕ: "e",
      ė: "e",
      ę: "e",
      ě: "e",
      Ĝ: "G",
      Ğ: "G",
      Ġ: "G",
      Ģ: "G",
      ĝ: "g",
      ğ: "g",
      ġ: "g",
      ģ: "g",
      Ĥ: "H",
      Ħ: "H",
      ĥ: "h",
      ħ: "h",
      Ĩ: "I",
      Ī: "I",
      Ĭ: "I",
      Į: "I",
      İ: "I",
      ĩ: "i",
      ī: "i",
      ĭ: "i",
      į: "i",
      ı: "i",
      Ĵ: "J",
      ĵ: "j",
      Ķ: "K",
      ķ: "k",
      ĸ: "k",
      Ĺ: "L",
      Ļ: "L",
      Ľ: "L",
      Ŀ: "L",
      Ł: "L",
      ĺ: "l",
      ļ: "l",
      ľ: "l",
      ŀ: "l",
      ł: "l",
      Ń: "N",
      Ņ: "N",
      Ň: "N",
      Ŋ: "N",
      ń: "n",
      ņ: "n",
      ň: "n",
      ŋ: "n",
      Ō: "O",
      Ŏ: "O",
      Ő: "O",
      ō: "o",
      ŏ: "o",
      ő: "o",
      Ŕ: "R",
      Ŗ: "R",
      Ř: "R",
      ŕ: "r",
      ŗ: "r",
      ř: "r",
      Ś: "S",
      Ŝ: "S",
      Ş: "S",
      Š: "S",
      ś: "s",
      ŝ: "s",
      ş: "s",
      š: "s",
      Ţ: "T",
      Ť: "T",
      Ŧ: "T",
      ţ: "t",
      ť: "t",
      ŧ: "t",
      Ũ: "U",
      Ū: "U",
      Ŭ: "U",
      Ů: "U",
      Ű: "U",
      Ų: "U",
      ũ: "u",
      ū: "u",
      ŭ: "u",
      ů: "u",
      ű: "u",
      ų: "u",
      Ŵ: "W",
      ŵ: "w",
      Ŷ: "Y",
      ŷ: "y",
      Ÿ: "Y",
      Ź: "Z",
      Ż: "Z",
      Ž: "Z",
      ź: "z",
      ż: "z",
      ž: "z",
      Ĳ: "IJ",
      ĳ: "ij",
      Œ: "Oe",
      œ: "oe",
      ŉ: "'n",
      ſ: "s"
    }, xX = {
      "&": "&amp;",
      "<": "&lt;",
      ">": "&gt;",
      '"': "&quot;",
      "'": "&#39;"
    }, SX = {
      "&amp;": "&",
      "&lt;": "<",
      "&gt;": ">",
      "&quot;": '"',
      "&#39;": "'"
    }, kX = {
      "\\": "\\",
      "'": "'",
      "\n": "n",
      "\r": "r",
      "\u2028": "u2028",
      "\u2029": "u2029"
    }, _X = parseFloat, OX = parseInt, dR = typeof Wf == "object" && Wf && Wf.Object === Object && Wf, EX = typeof self == "object" && self && self.Object === Object && self, Ln = dR || EX || Function("return this")(), dS = t && !t.nodeType && t, Ql = dS && !0 && e && !e.nodeType && e, pR = Ql && Ql.exports === dS, pS = pR && dR.process, Eo = function() {
      try {
        var G = Ql && Ql.require && Ql.require("util").types;
        return G || pS && pS.binding && pS.binding("util");
      } catch {
      }
    }(), mR = Eo && Eo.isArrayBuffer, hR = Eo && Eo.isDate, gR = Eo && Eo.isMap, yR = Eo && Eo.isRegExp, vR = Eo && Eo.isSet, bR = Eo && Eo.isTypedArray;
    function Gr(G, se, ne) {
      switch (ne.length) {
        case 0:
          return G.call(se);
        case 1:
          return G.call(se, ne[0]);
        case 2:
          return G.call(se, ne[0], ne[1]);
        case 3:
          return G.call(se, ne[0], ne[1], ne[2]);
      }
      return G.apply(se, ne);
    }
    function CX(G, se, ne, Le) {
      for (var tt = -1, St = G == null ? 0 : G.length; ++tt < St; ) {
        var _n = G[tt];
        se(Le, _n, ne(_n), G);
      }
      return Le;
    }
    function Co(G, se) {
      for (var ne = -1, Le = G == null ? 0 : G.length; ++ne < Le && se(G[ne], ne, G) !== !1; )
        ;
      return G;
    }
    function PX(G, se) {
      for (var ne = G == null ? 0 : G.length; ne-- && se(G[ne], ne, G) !== !1; )
        ;
      return G;
    }
    function wR(G, se) {
      for (var ne = -1, Le = G == null ? 0 : G.length; ++ne < Le; )
        if (!se(G[ne], ne, G))
          return !1;
      return !0;
    }
    function Ka(G, se) {
      for (var ne = -1, Le = G == null ? 0 : G.length, tt = 0, St = []; ++ne < Le; ) {
        var _n = G[ne];
        se(_n, ne, G) && (St[tt++] = _n);
      }
      return St;
    }
    function sm(G, se) {
      var ne = G == null ? 0 : G.length;
      return !!ne && fu(G, se, 0) > -1;
    }
    function mS(G, se, ne) {
      for (var Le = -1, tt = G == null ? 0 : G.length; ++Le < tt; )
        if (ne(se, G[Le]))
          return !0;
      return !1;
    }
    function Qt(G, se) {
      for (var ne = -1, Le = G == null ? 0 : G.length, tt = Array(Le); ++ne < Le; )
        tt[ne] = se(G[ne], ne, G);
      return tt;
    }
    function Ya(G, se) {
      for (var ne = -1, Le = se.length, tt = G.length; ++ne < Le; )
        G[tt + ne] = se[ne];
      return G;
    }
    function hS(G, se, ne, Le) {
      var tt = -1, St = G == null ? 0 : G.length;
      for (Le && St && (ne = G[++tt]); ++tt < St; )
        ne = se(ne, G[tt], tt, G);
      return ne;
    }
    function RX(G, se, ne, Le) {
      var tt = G == null ? 0 : G.length;
      for (Le && tt && (ne = G[--tt]); tt--; )
        ne = se(ne, G[tt], tt, G);
      return ne;
    }
    function gS(G, se) {
      for (var ne = -1, Le = G == null ? 0 : G.length; ++ne < Le; )
        if (se(G[ne], ne, G))
          return !0;
      return !1;
    }
    var TX = yS("length");
    function jX(G) {
      return G.split("");
    }
    function NX(G) {
      return G.match(aS) || [];
    }
    function xR(G, se, ne) {
      var Le;
      return ne(G, function(tt, St, _n) {
        if (se(tt, St, _n))
          return Le = St, !1;
      }), Le;
    }
    function um(G, se, ne, Le) {
      for (var tt = G.length, St = ne + (Le ? 1 : -1); Le ? St-- : ++St < tt; )
        if (se(G[St], St, G))
          return St;
      return -1;
    }
    function fu(G, se, ne) {
      return se === se ? WX(G, se, ne) : um(G, SR, ne);
    }
    function $X(G, se, ne, Le) {
      for (var tt = ne - 1, St = G.length; ++tt < St; )
        if (Le(G[tt], se))
          return tt;
      return -1;
    }
    function SR(G) {
      return G !== G;
    }
    function kR(G, se) {
      var ne = G == null ? 0 : G.length;
      return ne ? bS(G, se) / ne : A;
    }
    function yS(G) {
      return function(se) {
        return se == null ? n : se[G];
      };
    }
    function vS(G) {
      return function(se) {
        return G == null ? n : G[se];
      };
    }
    function _R(G, se, ne, Le, tt) {
      return tt(G, function(St, _n, Dt) {
        ne = Le ? (Le = !1, St) : se(ne, St, _n, Dt);
      }), ne;
    }
    function IX(G, se) {
      var ne = G.length;
      for (G.sort(se); ne--; )
        G[ne] = G[ne].value;
      return G;
    }
    function bS(G, se) {
      for (var ne, Le = -1, tt = G.length; ++Le < tt; ) {
        var St = se(G[Le]);
        St !== n && (ne = ne === n ? St : ne + St);
      }
      return ne;
    }
    function wS(G, se) {
      for (var ne = -1, Le = Array(G); ++ne < G; )
        Le[ne] = se(ne);
      return Le;
    }
    function AX(G, se) {
      return Qt(se, function(ne) {
        return [ne, G[ne]];
      });
    }
    function OR(G) {
      return G && G.slice(0, RR(G) + 1).replace(Ga, "");
    }
    function Kr(G) {
      return function(se) {
        return G(se);
      };
    }
    function xS(G, se) {
      return Qt(se, function(ne) {
        return G[ne];
      });
    }
    function wf(G, se) {
      return G.has(se);
    }
    function ER(G, se) {
      for (var ne = -1, Le = G.length; ++ne < Le && fu(se, G[ne], 0) > -1; )
        ;
      return ne;
    }
    function CR(G, se) {
      for (var ne = G.length; ne-- && fu(se, G[ne], 0) > -1; )
        ;
      return ne;
    }
    function zX(G, se) {
      for (var ne = G.length, Le = 0; ne--; )
        G[ne] === se && ++Le;
      return Le;
    }
    var LX = vS(wX), DX = vS(xX);
    function FX(G) {
      return "\\" + kX[G];
    }
    function MX(G, se) {
      return G == null ? n : G[se];
    }
    function du(G) {
      return gX.test(G);
    }
    function BX(G) {
      return yX.test(G);
    }
    function UX(G) {
      for (var se, ne = []; !(se = G.next()).done; )
        ne.push(se.value);
      return ne;
    }
    function SS(G) {
      var se = -1, ne = Array(G.size);
      return G.forEach(function(Le, tt) {
        ne[++se] = [tt, Le];
      }), ne;
    }
    function PR(G, se) {
      return function(ne) {
        return G(se(ne));
      };
    }
    function Xa(G, se) {
      for (var ne = -1, Le = G.length, tt = 0, St = []; ++ne < Le; ) {
        var _n = G[ne];
        (_n === se || _n === p) && (G[ne] = p, St[tt++] = ne);
      }
      return St;
    }
    function cm(G) {
      var se = -1, ne = Array(G.size);
      return G.forEach(function(Le) {
        ne[++se] = Le;
      }), ne;
    }
    function HX(G) {
      var se = -1, ne = Array(G.size);
      return G.forEach(function(Le) {
        ne[++se] = [Le, Le];
      }), ne;
    }
    function WX(G, se, ne) {
      for (var Le = ne - 1, tt = G.length; ++Le < tt; )
        if (G[Le] === se)
          return Le;
      return -1;
    }
    function VX(G, se, ne) {
      for (var Le = ne + 1; Le--; )
        if (G[Le] === se)
          return Le;
      return Le;
    }
    function pu(G) {
      return du(G) ? GX(G) : TX(G);
    }
    function Qo(G) {
      return du(G) ? KX(G) : jX(G);
    }
    function RR(G) {
      for (var se = G.length; se-- && nS.test(G.charAt(se)); )
        ;
      return se;
    }
    var qX = vS(SX);
    function GX(G) {
      for (var se = fS.lastIndex = 0; fS.test(G); )
        ++se;
      return se;
    }
    function KX(G) {
      return G.match(fS) || [];
    }
    function YX(G) {
      return G.match(hX) || [];
    }
    var XX = function G(se) {
      se = se == null ? Ln : mu.defaults(Ln.Object(), se, mu.pick(Ln, vX));
      var ne = se.Array, Le = se.Date, tt = se.Error, St = se.Function, _n = se.Math, Dt = se.Object, kS = se.RegExp, ZX = se.String, Po = se.TypeError, fm = ne.prototype, QX = St.prototype, hu = Dt.prototype, dm = se["__core-js_shared__"], pm = QX.toString, Nt = hu.hasOwnProperty, JX = 0, TR = function() {
        var u = /[^.]+$/.exec(dm && dm.keys && dm.keys.IE_PROTO || "");
        return u ? "Symbol(src)_1." + u : "";
      }(), mm = hu.toString, eZ = pm.call(Dt), tZ = Ln._, nZ = kS(
        "^" + pm.call(Nt).replace(uu, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
      ), hm = pR ? se.Buffer : n, Za = se.Symbol, gm = se.Uint8Array, jR = hm ? hm.allocUnsafe : n, ym = PR(Dt.getPrototypeOf, Dt), NR = Dt.create, $R = hu.propertyIsEnumerable, vm = fm.splice, IR = Za ? Za.isConcatSpreadable : n, xf = Za ? Za.iterator : n, Jl = Za ? Za.toStringTag : n, bm = function() {
        try {
          var u = os(Dt, "defineProperty");
          return u({}, "", {}), u;
        } catch {
        }
      }(), rZ = se.clearTimeout !== Ln.clearTimeout && se.clearTimeout, oZ = Le && Le.now !== Ln.Date.now && Le.now, iZ = se.setTimeout !== Ln.setTimeout && se.setTimeout, wm = _n.ceil, xm = _n.floor, _S = Dt.getOwnPropertySymbols, aZ = hm ? hm.isBuffer : n, AR = se.isFinite, lZ = fm.join, sZ = PR(Dt.keys, Dt), On = _n.max, Zn = _n.min, uZ = Le.now, cZ = se.parseInt, zR = _n.random, fZ = fm.reverse, OS = os(se, "DataView"), Sf = os(se, "Map"), ES = os(se, "Promise"), gu = os(se, "Set"), kf = os(se, "WeakMap"), _f = os(Dt, "create"), Sm = kf && new kf(), yu = {}, dZ = is(OS), pZ = is(Sf), mZ = is(ES), hZ = is(gu), gZ = is(kf), km = Za ? Za.prototype : n, Of = km ? km.valueOf : n, LR = km ? km.toString : n;
      function I(u) {
        if (cn(u) && !nt(u) && !(u instanceof gt)) {
          if (u instanceof Ro)
            return u;
          if (Nt.call(u, "__wrapped__"))
            return DT(u);
        }
        return new Ro(u);
      }
      var vu = /* @__PURE__ */ function() {
        function u() {
        }
        return function(d) {
          if (!tn(d))
            return {};
          if (NR)
            return NR(d);
          u.prototype = d;
          var y = new u();
          return u.prototype = n, y;
        };
      }();
      function _m() {
      }
      function Ro(u, d) {
        this.__wrapped__ = u, this.__actions__ = [], this.__chain__ = !!d, this.__index__ = 0, this.__values__ = n;
      }
      I.templateSettings = {
        /**
         * Used to detect `data` property values to be HTML-escaped.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        escape: tS,
        /**
         * Used to detect code to be evaluated.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        evaluate: su,
        /**
         * Used to detect `data` property values to inject.
         *
         * @memberOf _.templateSettings
         * @type {RegExp}
         */
        interpolate: mn,
        /**
         * Used to reference the data object in the template text.
         *
         * @memberOf _.templateSettings
         * @type {string}
         */
        variable: "",
        /**
         * Used to import variables into the compiled template.
         *
         * @memberOf _.templateSettings
         * @type {Object}
         */
        imports: {
          /**
           * A reference to the `lodash` function.
           *
           * @memberOf _.templateSettings.imports
           * @type {Function}
           */
          _: I
        }
      }, I.prototype = _m.prototype, I.prototype.constructor = I, Ro.prototype = vu(_m.prototype), Ro.prototype.constructor = Ro;
      function gt(u) {
        this.__wrapped__ = u, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = X, this.__views__ = [];
      }
      function yZ() {
        var u = new gt(this.__wrapped__);
        return u.__actions__ = Pr(this.__actions__), u.__dir__ = this.__dir__, u.__filtered__ = this.__filtered__, u.__iteratees__ = Pr(this.__iteratees__), u.__takeCount__ = this.__takeCount__, u.__views__ = Pr(this.__views__), u;
      }
      function vZ() {
        if (this.__filtered__) {
          var u = new gt(this);
          u.__dir__ = -1, u.__filtered__ = !0;
        } else
          u = this.clone(), u.__dir__ *= -1;
        return u;
      }
      function bZ() {
        var u = this.__wrapped__.value(), d = this.__dir__, y = nt(u), _ = d < 0, T = y ? u.length : 0, z = jQ(0, T, this.__views__), M = z.start, V = z.end, Z = V - M, ce = _ ? V : M - 1, fe = this.__iteratees__, me = fe.length, Oe = 0, Be = Zn(Z, this.__takeCount__);
        if (!y || !_ && T == Z && Be == Z)
          return lT(u, this.__actions__);
        var Ze = [];
        e:
          for (; Z-- && Oe < Be; ) {
            ce += d;
            for (var st = -1, Qe = u[ce]; ++st < me; ) {
              var mt = fe[st], vt = mt.iteratee, Zr = mt.type, hr = vt(Qe);
              if (Zr == U)
                Qe = hr;
              else if (!hr) {
                if (Zr == W)
                  continue e;
                break e;
              }
            }
            Ze[Oe++] = Qe;
          }
        return Ze;
      }
      gt.prototype = vu(_m.prototype), gt.prototype.constructor = gt;
      function es(u) {
        var d = -1, y = u == null ? 0 : u.length;
        for (this.clear(); ++d < y; ) {
          var _ = u[d];
          this.set(_[0], _[1]);
        }
      }
      function wZ() {
        this.__data__ = _f ? _f(null) : {}, this.size = 0;
      }
      function xZ(u) {
        var d = this.has(u) && delete this.__data__[u];
        return this.size -= d ? 1 : 0, d;
      }
      function SZ(u) {
        var d = this.__data__;
        if (_f) {
          var y = d[u];
          return y === s ? n : y;
        }
        return Nt.call(d, u) ? d[u] : n;
      }
      function kZ(u) {
        var d = this.__data__;
        return _f ? d[u] !== n : Nt.call(d, u);
      }
      function _Z(u, d) {
        var y = this.__data__;
        return this.size += this.has(u) ? 0 : 1, y[u] = _f && d === n ? s : d, this;
      }
      es.prototype.clear = wZ, es.prototype.delete = xZ, es.prototype.get = SZ, es.prototype.has = kZ, es.prototype.set = _Z;
      function oa(u) {
        var d = -1, y = u == null ? 0 : u.length;
        for (this.clear(); ++d < y; ) {
          var _ = u[d];
          this.set(_[0], _[1]);
        }
      }
      function OZ() {
        this.__data__ = [], this.size = 0;
      }
      function EZ(u) {
        var d = this.__data__, y = Om(d, u);
        if (y < 0)
          return !1;
        var _ = d.length - 1;
        return y == _ ? d.pop() : vm.call(d, y, 1), --this.size, !0;
      }
      function CZ(u) {
        var d = this.__data__, y = Om(d, u);
        return y < 0 ? n : d[y][1];
      }
      function PZ(u) {
        return Om(this.__data__, u) > -1;
      }
      function RZ(u, d) {
        var y = this.__data__, _ = Om(y, u);
        return _ < 0 ? (++this.size, y.push([u, d])) : y[_][1] = d, this;
      }
      oa.prototype.clear = OZ, oa.prototype.delete = EZ, oa.prototype.get = CZ, oa.prototype.has = PZ, oa.prototype.set = RZ;
      function ia(u) {
        var d = -1, y = u == null ? 0 : u.length;
        for (this.clear(); ++d < y; ) {
          var _ = u[d];
          this.set(_[0], _[1]);
        }
      }
      function TZ() {
        this.size = 0, this.__data__ = {
          hash: new es(),
          map: new (Sf || oa)(),
          string: new es()
        };
      }
      function jZ(u) {
        var d = Lm(this, u).delete(u);
        return this.size -= d ? 1 : 0, d;
      }
      function NZ(u) {
        return Lm(this, u).get(u);
      }
      function $Z(u) {
        return Lm(this, u).has(u);
      }
      function IZ(u, d) {
        var y = Lm(this, u), _ = y.size;
        return y.set(u, d), this.size += y.size == _ ? 0 : 1, this;
      }
      ia.prototype.clear = TZ, ia.prototype.delete = jZ, ia.prototype.get = NZ, ia.prototype.has = $Z, ia.prototype.set = IZ;
      function ts(u) {
        var d = -1, y = u == null ? 0 : u.length;
        for (this.__data__ = new ia(); ++d < y; )
          this.add(u[d]);
      }
      function AZ(u) {
        return this.__data__.set(u, s), this;
      }
      function zZ(u) {
        return this.__data__.has(u);
      }
      ts.prototype.add = ts.prototype.push = AZ, ts.prototype.has = zZ;
      function Jo(u) {
        var d = this.__data__ = new oa(u);
        this.size = d.size;
      }
      function LZ() {
        this.__data__ = new oa(), this.size = 0;
      }
      function DZ(u) {
        var d = this.__data__, y = d.delete(u);
        return this.size = d.size, y;
      }
      function FZ(u) {
        return this.__data__.get(u);
      }
      function MZ(u) {
        return this.__data__.has(u);
      }
      function BZ(u, d) {
        var y = this.__data__;
        if (y instanceof oa) {
          var _ = y.__data__;
          if (!Sf || _.length < o - 1)
            return _.push([u, d]), this.size = ++y.size, this;
          y = this.__data__ = new ia(_);
        }
        return y.set(u, d), this.size = y.size, this;
      }
      Jo.prototype.clear = LZ, Jo.prototype.delete = DZ, Jo.prototype.get = FZ, Jo.prototype.has = MZ, Jo.prototype.set = BZ;
      function DR(u, d) {
        var y = nt(u), _ = !y && as(u), T = !y && !_ && nl(u), z = !y && !_ && !T && Su(u), M = y || _ || T || z, V = M ? wS(u.length, ZX) : [], Z = V.length;
        for (var ce in u)
          (d || Nt.call(u, ce)) && !(M && // Safari 9 has enumerable `arguments.length` in strict mode.
          (ce == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
          T && (ce == "offset" || ce == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
          z && (ce == "buffer" || ce == "byteLength" || ce == "byteOffset") || // Skip index properties.
          ua(ce, Z))) && V.push(ce);
        return V;
      }
      function FR(u) {
        var d = u.length;
        return d ? u[LS(0, d - 1)] : n;
      }
      function UZ(u, d) {
        return Dm(Pr(u), ns(d, 0, u.length));
      }
      function HZ(u) {
        return Dm(Pr(u));
      }
      function CS(u, d, y) {
        (y !== n && !ei(u[d], y) || y === n && !(d in u)) && aa(u, d, y);
      }
      function Ef(u, d, y) {
        var _ = u[d];
        (!(Nt.call(u, d) && ei(_, y)) || y === n && !(d in u)) && aa(u, d, y);
      }
      function Om(u, d) {
        for (var y = u.length; y--; )
          if (ei(u[y][0], d))
            return y;
        return -1;
      }
      function WZ(u, d, y, _) {
        return Qa(u, function(T, z, M) {
          d(_, T, y(T), M);
        }), _;
      }
      function MR(u, d) {
        return u && wi(d, Nn(d), u);
      }
      function VZ(u, d) {
        return u && wi(d, Tr(d), u);
      }
      function aa(u, d, y) {
        d == "__proto__" && bm ? bm(u, d, {
          configurable: !0,
          enumerable: !0,
          value: y,
          writable: !0
        }) : u[d] = y;
      }
      function PS(u, d) {
        for (var y = -1, _ = d.length, T = ne(_), z = u == null; ++y < _; )
          T[y] = z ? n : sk(u, d[y]);
        return T;
      }
      function ns(u, d, y) {
        return u === u && (y !== n && (u = u <= y ? u : y), d !== n && (u = u >= d ? u : d)), u;
      }
      function To(u, d, y, _, T, z) {
        var M, V = d & f, Z = d & m, ce = d & h;
        if (y && (M = T ? y(u, _, T, z) : y(u)), M !== n)
          return M;
        if (!tn(u))
          return u;
        var fe = nt(u);
        if (fe) {
          if (M = $Q(u), !V)
            return Pr(u, M);
        } else {
          var me = Qn(u), Oe = me == We || me == ze;
          if (nl(u))
            return cT(u, V);
          if (me == ae || me == re || Oe && !T) {
            if (M = Z || Oe ? {} : RT(u), !V)
              return Z ? SQ(u, VZ(M, u)) : xQ(u, MR(M, u));
          } else {
            if (!Bt[me])
              return T ? u : {};
            M = IQ(u, me, V);
          }
        }
        z || (z = new Jo());
        var Be = z.get(u);
        if (Be)
          return Be;
        z.set(u, M), oj(u) ? u.forEach(function(Qe) {
          M.add(To(Qe, d, y, Qe, u, z));
        }) : nj(u) && u.forEach(function(Qe, mt) {
          M.set(mt, To(Qe, d, y, mt, u, z));
        });
        var Ze = ce ? Z ? KS : GS : Z ? Tr : Nn, st = fe ? n : Ze(u);
        return Co(st || u, function(Qe, mt) {
          st && (mt = Qe, Qe = u[mt]), Ef(M, mt, To(Qe, d, y, mt, u, z));
        }), M;
      }
      function qZ(u) {
        var d = Nn(u);
        return function(y) {
          return BR(y, u, d);
        };
      }
      function BR(u, d, y) {
        var _ = y.length;
        if (u == null)
          return !_;
        for (u = Dt(u); _--; ) {
          var T = y[_], z = d[T], M = u[T];
          if (M === n && !(T in u) || !z(M))
            return !1;
        }
        return !0;
      }
      function UR(u, d, y) {
        if (typeof u != "function")
          throw new Po(a);
        return $f(function() {
          u.apply(n, y);
        }, d);
      }
      function Cf(u, d, y, _) {
        var T = -1, z = sm, M = !0, V = u.length, Z = [], ce = d.length;
        if (!V)
          return Z;
        y && (d = Qt(d, Kr(y))), _ ? (z = mS, M = !1) : d.length >= o && (z = wf, M = !1, d = new ts(d));
        e:
          for (; ++T < V; ) {
            var fe = u[T], me = y == null ? fe : y(fe);
            if (fe = _ || fe !== 0 ? fe : 0, M && me === me) {
              for (var Oe = ce; Oe--; )
                if (d[Oe] === me)
                  continue e;
              Z.push(fe);
            } else
              z(d, me, _) || Z.push(fe);
          }
        return Z;
      }
      var Qa = hT(bi), HR = hT(TS, !0);
      function GZ(u, d) {
        var y = !0;
        return Qa(u, function(_, T, z) {
          return y = !!d(_, T, z), y;
        }), y;
      }
      function Em(u, d, y) {
        for (var _ = -1, T = u.length; ++_ < T; ) {
          var z = u[_], M = d(z);
          if (M != null && (V === n ? M === M && !Xr(M) : y(M, V)))
            var V = M, Z = z;
        }
        return Z;
      }
      function KZ(u, d, y, _) {
        var T = u.length;
        for (y = it(y), y < 0 && (y = -y > T ? 0 : T + y), _ = _ === n || _ > T ? T : it(_), _ < 0 && (_ += T), _ = y > _ ? 0 : aj(_); y < _; )
          u[y++] = d;
        return u;
      }
      function WR(u, d) {
        var y = [];
        return Qa(u, function(_, T, z) {
          d(_, T, z) && y.push(_);
        }), y;
      }
      function Dn(u, d, y, _, T) {
        var z = -1, M = u.length;
        for (y || (y = zQ), T || (T = []); ++z < M; ) {
          var V = u[z];
          d > 0 && y(V) ? d > 1 ? Dn(V, d - 1, y, _, T) : Ya(T, V) : _ || (T[T.length] = V);
        }
        return T;
      }
      var RS = gT(), VR = gT(!0);
      function bi(u, d) {
        return u && RS(u, d, Nn);
      }
      function TS(u, d) {
        return u && VR(u, d, Nn);
      }
      function Cm(u, d) {
        return Ka(d, function(y) {
          return ca(u[y]);
        });
      }
      function rs(u, d) {
        d = el(d, u);
        for (var y = 0, _ = d.length; u != null && y < _; )
          u = u[xi(d[y++])];
        return y && y == _ ? u : n;
      }
      function qR(u, d, y) {
        var _ = d(u);
        return nt(u) ? _ : Ya(_, y(u));
      }
      function pr(u) {
        return u == null ? u === n ? ue : oe : Jl && Jl in Dt(u) ? TQ(u) : HQ(u);
      }
      function jS(u, d) {
        return u > d;
      }
      function YZ(u, d) {
        return u != null && Nt.call(u, d);
      }
      function XZ(u, d) {
        return u != null && d in Dt(u);
      }
      function ZZ(u, d, y) {
        return u >= Zn(d, y) && u < On(d, y);
      }
      function NS(u, d, y) {
        for (var _ = y ? mS : sm, T = u[0].length, z = u.length, M = z, V = ne(z), Z = 1 / 0, ce = []; M--; ) {
          var fe = u[M];
          M && d && (fe = Qt(fe, Kr(d))), Z = Zn(fe.length, Z), V[M] = !y && (d || T >= 120 && fe.length >= 120) ? new ts(M && fe) : n;
        }
        fe = u[0];
        var me = -1, Oe = V[0];
        e:
          for (; ++me < T && ce.length < Z; ) {
            var Be = fe[me], Ze = d ? d(Be) : Be;
            if (Be = y || Be !== 0 ? Be : 0, !(Oe ? wf(Oe, Ze) : _(ce, Ze, y))) {
              for (M = z; --M; ) {
                var st = V[M];
                if (!(st ? wf(st, Ze) : _(u[M], Ze, y)))
                  continue e;
              }
              Oe && Oe.push(Ze), ce.push(Be);
            }
          }
        return ce;
      }
      function QZ(u, d, y, _) {
        return bi(u, function(T, z, M) {
          d(_, y(T), z, M);
        }), _;
      }
      function Pf(u, d, y) {
        d = el(d, u), u = $T(u, d);
        var _ = u == null ? u : u[xi(No(d))];
        return _ == null ? n : Gr(_, u, y);
      }
      function GR(u) {
        return cn(u) && pr(u) == re;
      }
      function JZ(u) {
        return cn(u) && pr(u) == Y;
      }
      function eQ(u) {
        return cn(u) && pr(u) == Ae;
      }
      function Rf(u, d, y, _, T) {
        return u === d ? !0 : u == null || d == null || !cn(u) && !cn(d) ? u !== u && d !== d : tQ(u, d, y, _, Rf, T);
      }
      function tQ(u, d, y, _, T, z) {
        var M = nt(u), V = nt(d), Z = M ? he : Qn(u), ce = V ? he : Qn(d);
        Z = Z == re ? ae : Z, ce = ce == re ? ae : ce;
        var fe = Z == ae, me = ce == ae, Oe = Z == ce;
        if (Oe && nl(u)) {
          if (!nl(d))
            return !1;
          M = !0, fe = !1;
        }
        if (Oe && !fe)
          return z || (z = new Jo()), M || Su(u) ? ET(u, d, y, _, T, z) : PQ(u, d, Z, y, _, T, z);
        if (!(y & g)) {
          var Be = fe && Nt.call(u, "__wrapped__"), Ze = me && Nt.call(d, "__wrapped__");
          if (Be || Ze) {
            var st = Be ? u.value() : u, Qe = Ze ? d.value() : d;
            return z || (z = new Jo()), T(st, Qe, y, _, z);
          }
        }
        return Oe ? (z || (z = new Jo()), RQ(u, d, y, _, T, z)) : !1;
      }
      function nQ(u) {
        return cn(u) && Qn(u) == Fe;
      }
      function $S(u, d, y, _) {
        var T = y.length, z = T, M = !_;
        if (u == null)
          return !z;
        for (u = Dt(u); T--; ) {
          var V = y[T];
          if (M && V[2] ? V[1] !== u[V[0]] : !(V[0] in u))
            return !1;
        }
        for (; ++T < z; ) {
          V = y[T];
          var Z = V[0], ce = u[Z], fe = V[1];
          if (M && V[2]) {
            if (ce === n && !(Z in u))
              return !1;
          } else {
            var me = new Jo();
            if (_)
              var Oe = _(ce, fe, Z, u, d, me);
            if (!(Oe === n ? Rf(fe, ce, g | v, _, me) : Oe))
              return !1;
          }
        }
        return !0;
      }
      function KR(u) {
        if (!tn(u) || DQ(u))
          return !1;
        var d = ca(u) ? nZ : qY;
        return d.test(is(u));
      }
      function rQ(u) {
        return cn(u) && pr(u) == ye;
      }
      function oQ(u) {
        return cn(u) && Qn(u) == we;
      }
      function iQ(u) {
        return cn(u) && Wm(u.length) && !!Kt[pr(u)];
      }
      function YR(u) {
        return typeof u == "function" ? u : u == null ? jr : typeof u == "object" ? nt(u) ? QR(u[0], u[1]) : ZR(u) : yj(u);
      }
      function IS(u) {
        if (!Nf(u))
          return sZ(u);
        var d = [];
        for (var y in Dt(u))
          Nt.call(u, y) && y != "constructor" && d.push(y);
        return d;
      }
      function aQ(u) {
        if (!tn(u))
          return UQ(u);
        var d = Nf(u), y = [];
        for (var _ in u)
          _ == "constructor" && (d || !Nt.call(u, _)) || y.push(_);
        return y;
      }
      function AS(u, d) {
        return u < d;
      }
      function XR(u, d) {
        var y = -1, _ = Rr(u) ? ne(u.length) : [];
        return Qa(u, function(T, z, M) {
          _[++y] = d(T, z, M);
        }), _;
      }
      function ZR(u) {
        var d = XS(u);
        return d.length == 1 && d[0][2] ? jT(d[0][0], d[0][1]) : function(y) {
          return y === u || $S(y, u, d);
        };
      }
      function QR(u, d) {
        return QS(u) && TT(d) ? jT(xi(u), d) : function(y) {
          var _ = sk(y, u);
          return _ === n && _ === d ? uk(y, u) : Rf(d, _, g | v);
        };
      }
      function Pm(u, d, y, _, T) {
        u !== d && RS(d, function(z, M) {
          if (T || (T = new Jo()), tn(z))
            lQ(u, d, M, y, Pm, _, T);
          else {
            var V = _ ? _(ek(u, M), z, M + "", u, d, T) : n;
            V === n && (V = z), CS(u, M, V);
          }
        }, Tr);
      }
      function lQ(u, d, y, _, T, z, M) {
        var V = ek(u, y), Z = ek(d, y), ce = M.get(Z);
        if (ce) {
          CS(u, y, ce);
          return;
        }
        var fe = z ? z(V, Z, y + "", u, d, M) : n, me = fe === n;
        if (me) {
          var Oe = nt(Z), Be = !Oe && nl(Z), Ze = !Oe && !Be && Su(Z);
          fe = Z, Oe || Be || Ze ? nt(V) ? fe = V : hn(V) ? fe = Pr(V) : Be ? (me = !1, fe = cT(Z, !0)) : Ze ? (me = !1, fe = fT(Z, !0)) : fe = [] : If(Z) || as(Z) ? (fe = V, as(V) ? fe = lj(V) : (!tn(V) || ca(V)) && (fe = RT(Z))) : me = !1;
        }
        me && (M.set(Z, fe), T(fe, Z, _, z, M), M.delete(Z)), CS(u, y, fe);
      }
      function JR(u, d) {
        var y = u.length;
        if (y)
          return d += d < 0 ? y : 0, ua(d, y) ? u[d] : n;
      }
      function eT(u, d, y) {
        d.length ? d = Qt(d, function(z) {
          return nt(z) ? function(M) {
            return rs(M, z.length === 1 ? z[0] : z);
          } : z;
        }) : d = [jr];
        var _ = -1;
        d = Qt(d, Kr(Xe()));
        var T = XR(u, function(z, M, V) {
          var Z = Qt(d, function(ce) {
            return ce(z);
          });
          return { criteria: Z, index: ++_, value: z };
        });
        return IX(T, function(z, M) {
          return wQ(z, M, y);
        });
      }
      function sQ(u, d) {
        return tT(u, d, function(y, _) {
          return uk(u, _);
        });
      }
      function tT(u, d, y) {
        for (var _ = -1, T = d.length, z = {}; ++_ < T; ) {
          var M = d[_], V = rs(u, M);
          y(V, M) && Tf(z, el(M, u), V);
        }
        return z;
      }
      function uQ(u) {
        return function(d) {
          return rs(d, u);
        };
      }
      function zS(u, d, y, _) {
        var T = _ ? $X : fu, z = -1, M = d.length, V = u;
        for (u === d && (d = Pr(d)), y && (V = Qt(u, Kr(y))); ++z < M; )
          for (var Z = 0, ce = d[z], fe = y ? y(ce) : ce; (Z = T(V, fe, Z, _)) > -1; )
            V !== u && vm.call(V, Z, 1), vm.call(u, Z, 1);
        return u;
      }
      function nT(u, d) {
        for (var y = u ? d.length : 0, _ = y - 1; y--; ) {
          var T = d[y];
          if (y == _ || T !== z) {
            var z = T;
            ua(T) ? vm.call(u, T, 1) : MS(u, T);
          }
        }
        return u;
      }
      function LS(u, d) {
        return u + xm(zR() * (d - u + 1));
      }
      function cQ(u, d, y, _) {
        for (var T = -1, z = On(wm((d - u) / (y || 1)), 0), M = ne(z); z--; )
          M[_ ? z : ++T] = u, u += y;
        return M;
      }
      function DS(u, d) {
        var y = "";
        if (!u || d < 1 || d > q)
          return y;
        do
          d % 2 && (y += u), d = xm(d / 2), d && (u += u);
        while (d);
        return y;
      }
      function ut(u, d) {
        return tk(NT(u, d, jr), u + "");
      }
      function fQ(u) {
        return FR(ku(u));
      }
      function dQ(u, d) {
        var y = ku(u);
        return Dm(y, ns(d, 0, y.length));
      }
      function Tf(u, d, y, _) {
        if (!tn(u))
          return u;
        d = el(d, u);
        for (var T = -1, z = d.length, M = z - 1, V = u; V != null && ++T < z; ) {
          var Z = xi(d[T]), ce = y;
          if (Z === "__proto__" || Z === "constructor" || Z === "prototype")
            return u;
          if (T != M) {
            var fe = V[Z];
            ce = _ ? _(fe, Z, V) : n, ce === n && (ce = tn(fe) ? fe : ua(d[T + 1]) ? [] : {});
          }
          Ef(V, Z, ce), V = V[Z];
        }
        return u;
      }
      var rT = Sm ? function(u, d) {
        return Sm.set(u, d), u;
      } : jr, pQ = bm ? function(u, d) {
        return bm(u, "toString", {
          configurable: !0,
          enumerable: !1,
          value: fk(d),
          writable: !0
        });
      } : jr;
      function mQ(u) {
        return Dm(ku(u));
      }
      function jo(u, d, y) {
        var _ = -1, T = u.length;
        d < 0 && (d = -d > T ? 0 : T + d), y = y > T ? T : y, y < 0 && (y += T), T = d > y ? 0 : y - d >>> 0, d >>>= 0;
        for (var z = ne(T); ++_ < T; )
          z[_] = u[_ + d];
        return z;
      }
      function hQ(u, d) {
        var y;
        return Qa(u, function(_, T, z) {
          return y = d(_, T, z), !y;
        }), !!y;
      }
      function Rm(u, d, y) {
        var _ = 0, T = u == null ? _ : u.length;
        if (typeof d == "number" && d === d && T <= j) {
          for (; _ < T; ) {
            var z = _ + T >>> 1, M = u[z];
            M !== null && !Xr(M) && (y ? M <= d : M < d) ? _ = z + 1 : T = z;
          }
          return T;
        }
        return FS(u, d, jr, y);
      }
      function FS(u, d, y, _) {
        var T = 0, z = u == null ? 0 : u.length;
        if (z === 0)
          return 0;
        d = y(d);
        for (var M = d !== d, V = d === null, Z = Xr(d), ce = d === n; T < z; ) {
          var fe = xm((T + z) / 2), me = y(u[fe]), Oe = me !== n, Be = me === null, Ze = me === me, st = Xr(me);
          if (M)
            var Qe = _ || Ze;
          else
            ce ? Qe = Ze && (_ || Oe) : V ? Qe = Ze && Oe && (_ || !Be) : Z ? Qe = Ze && Oe && !Be && (_ || !st) : Be || st ? Qe = !1 : Qe = _ ? me <= d : me < d;
          Qe ? T = fe + 1 : z = fe;
        }
        return Zn(z, ie);
      }
      function oT(u, d) {
        for (var y = -1, _ = u.length, T = 0, z = []; ++y < _; ) {
          var M = u[y], V = d ? d(M) : M;
          if (!y || !ei(V, Z)) {
            var Z = V;
            z[T++] = M === 0 ? 0 : M;
          }
        }
        return z;
      }
      function iT(u) {
        return typeof u == "number" ? u : Xr(u) ? A : +u;
      }
      function Yr(u) {
        if (typeof u == "string")
          return u;
        if (nt(u))
          return Qt(u, Yr) + "";
        if (Xr(u))
          return LR ? LR.call(u) : "";
        var d = u + "";
        return d == "0" && 1 / u == -J ? "-0" : d;
      }
      function Ja(u, d, y) {
        var _ = -1, T = sm, z = u.length, M = !0, V = [], Z = V;
        if (y)
          M = !1, T = mS;
        else if (z >= o) {
          var ce = d ? null : EQ(u);
          if (ce)
            return cm(ce);
          M = !1, T = wf, Z = new ts();
        } else
          Z = d ? [] : V;
        e:
          for (; ++_ < z; ) {
            var fe = u[_], me = d ? d(fe) : fe;
            if (fe = y || fe !== 0 ? fe : 0, M && me === me) {
              for (var Oe = Z.length; Oe--; )
                if (Z[Oe] === me)
                  continue e;
              d && Z.push(me), V.push(fe);
            } else
              T(Z, me, y) || (Z !== V && Z.push(me), V.push(fe));
          }
        return V;
      }
      function MS(u, d) {
        return d = el(d, u), u = $T(u, d), u == null || delete u[xi(No(d))];
      }
      function aT(u, d, y, _) {
        return Tf(u, d, y(rs(u, d)), _);
      }
      function Tm(u, d, y, _) {
        for (var T = u.length, z = _ ? T : -1; (_ ? z-- : ++z < T) && d(u[z], z, u); )
          ;
        return y ? jo(u, _ ? 0 : z, _ ? z + 1 : T) : jo(u, _ ? z + 1 : 0, _ ? T : z);
      }
      function lT(u, d) {
        var y = u;
        return y instanceof gt && (y = y.value()), hS(d, function(_, T) {
          return T.func.apply(T.thisArg, Ya([_], T.args));
        }, y);
      }
      function BS(u, d, y) {
        var _ = u.length;
        if (_ < 2)
          return _ ? Ja(u[0]) : [];
        for (var T = -1, z = ne(_); ++T < _; )
          for (var M = u[T], V = -1; ++V < _; )
            V != T && (z[T] = Cf(z[T] || M, u[V], d, y));
        return Ja(Dn(z, 1), d, y);
      }
      function sT(u, d, y) {
        for (var _ = -1, T = u.length, z = d.length, M = {}; ++_ < T; ) {
          var V = _ < z ? d[_] : n;
          y(M, u[_], V);
        }
        return M;
      }
      function US(u) {
        return hn(u) ? u : [];
      }
      function HS(u) {
        return typeof u == "function" ? u : jr;
      }
      function el(u, d) {
        return nt(u) ? u : QS(u, d) ? [u] : LT(Pt(u));
      }
      var gQ = ut;
      function tl(u, d, y) {
        var _ = u.length;
        return y = y === n ? _ : y, !d && y >= _ ? u : jo(u, d, y);
      }
      var uT = rZ || function(u) {
        return Ln.clearTimeout(u);
      };
      function cT(u, d) {
        if (d)
          return u.slice();
        var y = u.length, _ = jR ? jR(y) : new u.constructor(y);
        return u.copy(_), _;
      }
      function WS(u) {
        var d = new u.constructor(u.byteLength);
        return new gm(d).set(new gm(u)), d;
      }
      function yQ(u, d) {
        var y = d ? WS(u.buffer) : u.buffer;
        return new u.constructor(y, u.byteOffset, u.byteLength);
      }
      function vQ(u) {
        var d = new u.constructor(u.source, Xn.exec(u));
        return d.lastIndex = u.lastIndex, d;
      }
      function bQ(u) {
        return Of ? Dt(Of.call(u)) : {};
      }
      function fT(u, d) {
        var y = d ? WS(u.buffer) : u.buffer;
        return new u.constructor(y, u.byteOffset, u.length);
      }
      function dT(u, d) {
        if (u !== d) {
          var y = u !== n, _ = u === null, T = u === u, z = Xr(u), M = d !== n, V = d === null, Z = d === d, ce = Xr(d);
          if (!V && !ce && !z && u > d || z && M && Z && !V && !ce || _ && M && Z || !y && Z || !T)
            return 1;
          if (!_ && !z && !ce && u < d || ce && y && T && !_ && !z || V && y && T || !M && T || !Z)
            return -1;
        }
        return 0;
      }
      function wQ(u, d, y) {
        for (var _ = -1, T = u.criteria, z = d.criteria, M = T.length, V = y.length; ++_ < M; ) {
          var Z = dT(T[_], z[_]);
          if (Z) {
            if (_ >= V)
              return Z;
            var ce = y[_];
            return Z * (ce == "desc" ? -1 : 1);
          }
        }
        return u.index - d.index;
      }
      function pT(u, d, y, _) {
        for (var T = -1, z = u.length, M = y.length, V = -1, Z = d.length, ce = On(z - M, 0), fe = ne(Z + ce), me = !_; ++V < Z; )
          fe[V] = d[V];
        for (; ++T < M; )
          (me || T < z) && (fe[y[T]] = u[T]);
        for (; ce--; )
          fe[V++] = u[T++];
        return fe;
      }
      function mT(u, d, y, _) {
        for (var T = -1, z = u.length, M = -1, V = y.length, Z = -1, ce = d.length, fe = On(z - V, 0), me = ne(fe + ce), Oe = !_; ++T < fe; )
          me[T] = u[T];
        for (var Be = T; ++Z < ce; )
          me[Be + Z] = d[Z];
        for (; ++M < V; )
          (Oe || T < z) && (me[Be + y[M]] = u[T++]);
        return me;
      }
      function Pr(u, d) {
        var y = -1, _ = u.length;
        for (d || (d = ne(_)); ++y < _; )
          d[y] = u[y];
        return d;
      }
      function wi(u, d, y, _) {
        var T = !y;
        y || (y = {});
        for (var z = -1, M = d.length; ++z < M; ) {
          var V = d[z], Z = _ ? _(y[V], u[V], V, y, u) : n;
          Z === n && (Z = u[V]), T ? aa(y, V, Z) : Ef(y, V, Z);
        }
        return y;
      }
      function xQ(u, d) {
        return wi(u, ZS(u), d);
      }
      function SQ(u, d) {
        return wi(u, CT(u), d);
      }
      function jm(u, d) {
        return function(y, _) {
          var T = nt(y) ? CX : WZ, z = d ? d() : {};
          return T(y, u, Xe(_, 2), z);
        };
      }
      function bu(u) {
        return ut(function(d, y) {
          var _ = -1, T = y.length, z = T > 1 ? y[T - 1] : n, M = T > 2 ? y[2] : n;
          for (z = u.length > 3 && typeof z == "function" ? (T--, z) : n, M && mr(y[0], y[1], M) && (z = T < 3 ? n : z, T = 1), d = Dt(d); ++_ < T; ) {
            var V = y[_];
            V && u(d, V, _, z);
          }
          return d;
        });
      }
      function hT(u, d) {
        return function(y, _) {
          if (y == null)
            return y;
          if (!Rr(y))
            return u(y, _);
          for (var T = y.length, z = d ? T : -1, M = Dt(y); (d ? z-- : ++z < T) && _(M[z], z, M) !== !1; )
            ;
          return y;
        };
      }
      function gT(u) {
        return function(d, y, _) {
          for (var T = -1, z = Dt(d), M = _(d), V = M.length; V--; ) {
            var Z = M[u ? V : ++T];
            if (y(z[Z], Z, z) === !1)
              break;
          }
          return d;
        };
      }
      function kQ(u, d, y) {
        var _ = d & S, T = jf(u);
        function z() {
          var M = this && this !== Ln && this instanceof z ? T : u;
          return M.apply(_ ? y : this, arguments);
        }
        return z;
      }
      function yT(u) {
        return function(d) {
          d = Pt(d);
          var y = du(d) ? Qo(d) : n, _ = y ? y[0] : d.charAt(0), T = y ? tl(y, 1).join("") : d.slice(1);
          return _[u]() + T;
        };
      }
      function wu(u) {
        return function(d) {
          return hS(hj(mj(d).replace(pX, "")), u, "");
        };
      }
      function jf(u) {
        return function() {
          var d = arguments;
          switch (d.length) {
            case 0:
              return new u();
            case 1:
              return new u(d[0]);
            case 2:
              return new u(d[0], d[1]);
            case 3:
              return new u(d[0], d[1], d[2]);
            case 4:
              return new u(d[0], d[1], d[2], d[3]);
            case 5:
              return new u(d[0], d[1], d[2], d[3], d[4]);
            case 6:
              return new u(d[0], d[1], d[2], d[3], d[4], d[5]);
            case 7:
              return new u(d[0], d[1], d[2], d[3], d[4], d[5], d[6]);
          }
          var y = vu(u.prototype), _ = u.apply(y, d);
          return tn(_) ? _ : y;
        };
      }
      function _Q(u, d, y) {
        var _ = jf(u);
        function T() {
          for (var z = arguments.length, M = ne(z), V = z, Z = xu(T); V--; )
            M[V] = arguments[V];
          var ce = z < 3 && M[0] !== Z && M[z - 1] !== Z ? [] : Xa(M, Z);
          if (z -= ce.length, z < y)
            return ST(
              u,
              d,
              Nm,
              T.placeholder,
              n,
              M,
              ce,
              n,
              n,
              y - z
            );
          var fe = this && this !== Ln && this instanceof T ? _ : u;
          return Gr(fe, this, M);
        }
        return T;
      }
      function vT(u) {
        return function(d, y, _) {
          var T = Dt(d);
          if (!Rr(d)) {
            var z = Xe(y, 3);
            d = Nn(d), y = function(V) {
              return z(T[V], V, T);
            };
          }
          var M = u(d, y, _);
          return M > -1 ? T[z ? d[M] : M] : n;
        };
      }
      function bT(u) {
        return sa(function(d) {
          var y = d.length, _ = y, T = Ro.prototype.thru;
          for (u && d.reverse(); _--; ) {
            var z = d[_];
            if (typeof z != "function")
              throw new Po(a);
            if (T && !M && zm(z) == "wrapper")
              var M = new Ro([], !0);
          }
          for (_ = M ? _ : y; ++_ < y; ) {
            z = d[_];
            var V = zm(z), Z = V == "wrapper" ? YS(z) : n;
            Z && JS(Z[0]) && Z[1] == (R | k | O | L) && !Z[4].length && Z[9] == 1 ? M = M[zm(Z[0])].apply(M, Z[3]) : M = z.length == 1 && JS(z) ? M[V]() : M.thru(z);
          }
          return function() {
            var ce = arguments, fe = ce[0];
            if (M && ce.length == 1 && nt(fe))
              return M.plant(fe).value();
            for (var me = 0, Oe = y ? d[me].apply(this, ce) : fe; ++me < y; )
              Oe = d[me].call(this, Oe);
            return Oe;
          };
        });
      }
      function Nm(u, d, y, _, T, z, M, V, Z, ce) {
        var fe = d & R, me = d & S, Oe = d & w, Be = d & (k | E), Ze = d & D, st = Oe ? n : jf(u);
        function Qe() {
          for (var mt = arguments.length, vt = ne(mt), Zr = mt; Zr--; )
            vt[Zr] = arguments[Zr];
          if (Be)
            var hr = xu(Qe), Qr = zX(vt, hr);
          if (_ && (vt = pT(vt, _, T, Be)), z && (vt = mT(vt, z, M, Be)), mt -= Qr, Be && mt < ce) {
            var gn = Xa(vt, hr);
            return ST(
              u,
              d,
              Nm,
              Qe.placeholder,
              y,
              vt,
              gn,
              V,
              Z,
              ce - mt
            );
          }
          var ti = me ? y : this, da = Oe ? ti[u] : u;
          return mt = vt.length, V ? vt = WQ(vt, V) : Ze && mt > 1 && vt.reverse(), fe && Z < mt && (vt.length = Z), this && this !== Ln && this instanceof Qe && (da = st || jf(da)), da.apply(ti, vt);
        }
        return Qe;
      }
      function wT(u, d) {
        return function(y, _) {
          return QZ(y, u, d(_), {});
        };
      }
      function $m(u, d) {
        return function(y, _) {
          var T;
          if (y === n && _ === n)
            return d;
          if (y !== n && (T = y), _ !== n) {
            if (T === n)
              return _;
            typeof y == "string" || typeof _ == "string" ? (y = Yr(y), _ = Yr(_)) : (y = iT(y), _ = iT(_)), T = u(y, _);
          }
          return T;
        };
      }
      function VS(u) {
        return sa(function(d) {
          return d = Qt(d, Kr(Xe())), ut(function(y) {
            var _ = this;
            return u(d, function(T) {
              return Gr(T, _, y);
            });
          });
        });
      }
      function Im(u, d) {
        d = d === n ? " " : Yr(d);
        var y = d.length;
        if (y < 2)
          return y ? DS(d, u) : d;
        var _ = DS(d, wm(u / pu(d)));
        return du(d) ? tl(Qo(_), 0, u).join("") : _.slice(0, u);
      }
      function OQ(u, d, y, _) {
        var T = d & S, z = jf(u);
        function M() {
          for (var V = -1, Z = arguments.length, ce = -1, fe = _.length, me = ne(fe + Z), Oe = this && this !== Ln && this instanceof M ? z : u; ++ce < fe; )
            me[ce] = _[ce];
          for (; Z--; )
            me[ce++] = arguments[++V];
          return Gr(Oe, T ? y : this, me);
        }
        return M;
      }
      function xT(u) {
        return function(d, y, _) {
          return _ && typeof _ != "number" && mr(d, y, _) && (y = _ = n), d = fa(d), y === n ? (y = d, d = 0) : y = fa(y), _ = _ === n ? d < y ? 1 : -1 : fa(_), cQ(d, y, _, u);
        };
      }
      function Am(u) {
        return function(d, y) {
          return typeof d == "string" && typeof y == "string" || (d = $o(d), y = $o(y)), u(d, y);
        };
      }
      function ST(u, d, y, _, T, z, M, V, Z, ce) {
        var fe = d & k, me = fe ? M : n, Oe = fe ? n : M, Be = fe ? z : n, Ze = fe ? n : z;
        d |= fe ? O : C, d &= ~(fe ? C : O), d & x || (d &= ~(S | w));
        var st = [
          u,
          d,
          T,
          Be,
          me,
          Ze,
          Oe,
          V,
          Z,
          ce
        ], Qe = y.apply(n, st);
        return JS(u) && IT(Qe, st), Qe.placeholder = _, AT(Qe, u, d);
      }
      function qS(u) {
        var d = _n[u];
        return function(y, _) {
          if (y = $o(y), _ = _ == null ? 0 : Zn(it(_), 292), _ && AR(y)) {
            var T = (Pt(y) + "e").split("e"), z = d(T[0] + "e" + (+T[1] + _));
            return T = (Pt(z) + "e").split("e"), +(T[0] + "e" + (+T[1] - _));
          }
          return d(y);
        };
      }
      var EQ = gu && 1 / cm(new gu([, -0]))[1] == J ? function(u) {
        return new gu(u);
      } : mk;
      function kT(u) {
        return function(d) {
          var y = Qn(d);
          return y == Fe ? SS(d) : y == we ? HX(d) : AX(d, u(d));
        };
      }
      function la(u, d, y, _, T, z, M, V) {
        var Z = d & w;
        if (!Z && typeof u != "function")
          throw new Po(a);
        var ce = _ ? _.length : 0;
        if (ce || (d &= ~(O | C), _ = T = n), M = M === n ? M : On(it(M), 0), V = V === n ? V : it(V), ce -= T ? T.length : 0, d & C) {
          var fe = _, me = T;
          _ = T = n;
        }
        var Oe = Z ? n : YS(u), Be = [
          u,
          d,
          y,
          _,
          T,
          fe,
          me,
          z,
          M,
          V
        ];
        if (Oe && BQ(Be, Oe), u = Be[0], d = Be[1], y = Be[2], _ = Be[3], T = Be[4], V = Be[9] = Be[9] === n ? Z ? 0 : u.length : On(Be[9] - ce, 0), !V && d & (k | E) && (d &= ~(k | E)), !d || d == S)
          var Ze = kQ(u, d, y);
        else
          d == k || d == E ? Ze = _Q(u, d, V) : (d == O || d == (S | O)) && !T.length ? Ze = OQ(u, d, y, _) : Ze = Nm.apply(n, Be);
        var st = Oe ? rT : IT;
        return AT(st(Ze, Be), u, d);
      }
      function _T(u, d, y, _) {
        return u === n || ei(u, hu[y]) && !Nt.call(_, y) ? d : u;
      }
      function OT(u, d, y, _, T, z) {
        return tn(u) && tn(d) && (z.set(d, u), Pm(u, d, n, OT, z), z.delete(d)), u;
      }
      function CQ(u) {
        return If(u) ? n : u;
      }
      function ET(u, d, y, _, T, z) {
        var M = y & g, V = u.length, Z = d.length;
        if (V != Z && !(M && Z > V))
          return !1;
        var ce = z.get(u), fe = z.get(d);
        if (ce && fe)
          return ce == d && fe == u;
        var me = -1, Oe = !0, Be = y & v ? new ts() : n;
        for (z.set(u, d), z.set(d, u); ++me < V; ) {
          var Ze = u[me], st = d[me];
          if (_)
            var Qe = M ? _(st, Ze, me, d, u, z) : _(Ze, st, me, u, d, z);
          if (Qe !== n) {
            if (Qe)
              continue;
            Oe = !1;
            break;
          }
          if (Be) {
            if (!gS(d, function(mt, vt) {
              if (!wf(Be, vt) && (Ze === mt || T(Ze, mt, y, _, z)))
                return Be.push(vt);
            })) {
              Oe = !1;
              break;
            }
          } else if (!(Ze === st || T(Ze, st, y, _, z))) {
            Oe = !1;
            break;
          }
        }
        return z.delete(u), z.delete(d), Oe;
      }
      function PQ(u, d, y, _, T, z, M) {
        switch (y) {
          case te:
            if (u.byteLength != d.byteLength || u.byteOffset != d.byteOffset)
              return !1;
            u = u.buffer, d = d.buffer;
          case Y:
            return !(u.byteLength != d.byteLength || !z(new gm(u), new gm(d)));
          case ke:
          case Ae:
          case Ye:
            return ei(+u, +d);
          case Me:
            return u.name == d.name && u.message == d.message;
          case ye:
          case Ge:
            return u == d + "";
          case Fe:
            var V = SS;
          case we:
            var Z = _ & g;
            if (V || (V = cm), u.size != d.size && !Z)
              return !1;
            var ce = M.get(u);
            if (ce)
              return ce == d;
            _ |= v, M.set(u, d);
            var fe = ET(V(u), V(d), _, T, z, M);
            return M.delete(u), fe;
          case $e:
            if (Of)
              return Of.call(u) == Of.call(d);
        }
        return !1;
      }
      function RQ(u, d, y, _, T, z) {
        var M = y & g, V = GS(u), Z = V.length, ce = GS(d), fe = ce.length;
        if (Z != fe && !M)
          return !1;
        for (var me = Z; me--; ) {
          var Oe = V[me];
          if (!(M ? Oe in d : Nt.call(d, Oe)))
            return !1;
        }
        var Be = z.get(u), Ze = z.get(d);
        if (Be && Ze)
          return Be == d && Ze == u;
        var st = !0;
        z.set(u, d), z.set(d, u);
        for (var Qe = M; ++me < Z; ) {
          Oe = V[me];
          var mt = u[Oe], vt = d[Oe];
          if (_)
            var Zr = M ? _(vt, mt, Oe, d, u, z) : _(mt, vt, Oe, u, d, z);
          if (!(Zr === n ? mt === vt || T(mt, vt, y, _, z) : Zr)) {
            st = !1;
            break;
          }
          Qe || (Qe = Oe == "constructor");
        }
        if (st && !Qe) {
          var hr = u.constructor, Qr = d.constructor;
          hr != Qr && "constructor" in u && "constructor" in d && !(typeof hr == "function" && hr instanceof hr && typeof Qr == "function" && Qr instanceof Qr) && (st = !1);
        }
        return z.delete(u), z.delete(d), st;
      }
      function sa(u) {
        return tk(NT(u, n, BT), u + "");
      }
      function GS(u) {
        return qR(u, Nn, ZS);
      }
      function KS(u) {
        return qR(u, Tr, CT);
      }
      var YS = Sm ? function(u) {
        return Sm.get(u);
      } : mk;
      function zm(u) {
        for (var d = u.name + "", y = yu[d], _ = Nt.call(yu, d) ? y.length : 0; _--; ) {
          var T = y[_], z = T.func;
          if (z == null || z == u)
            return T.name;
        }
        return d;
      }
      function xu(u) {
        var d = Nt.call(I, "placeholder") ? I : u;
        return d.placeholder;
      }
      function Xe() {
        var u = I.iteratee || dk;
        return u = u === dk ? YR : u, arguments.length ? u(arguments[0], arguments[1]) : u;
      }
      function Lm(u, d) {
        var y = u.__data__;
        return LQ(d) ? y[typeof d == "string" ? "string" : "hash"] : y.map;
      }
      function XS(u) {
        for (var d = Nn(u), y = d.length; y--; ) {
          var _ = d[y], T = u[_];
          d[y] = [_, T, TT(T)];
        }
        return d;
      }
      function os(u, d) {
        var y = MX(u, d);
        return KR(y) ? y : n;
      }
      function TQ(u) {
        var d = Nt.call(u, Jl), y = u[Jl];
        try {
          u[Jl] = n;
          var _ = !0;
        } catch {
        }
        var T = mm.call(u);
        return _ && (d ? u[Jl] = y : delete u[Jl]), T;
      }
      var ZS = _S ? function(u) {
        return u == null ? [] : (u = Dt(u), Ka(_S(u), function(d) {
          return $R.call(u, d);
        }));
      } : hk, CT = _S ? function(u) {
        for (var d = []; u; )
          Ya(d, ZS(u)), u = ym(u);
        return d;
      } : hk, Qn = pr;
      (OS && Qn(new OS(new ArrayBuffer(1))) != te || Sf && Qn(new Sf()) != Fe || ES && Qn(ES.resolve()) != Ie || gu && Qn(new gu()) != we || kf && Qn(new kf()) != Pe) && (Qn = function(u) {
        var d = pr(u), y = d == ae ? u.constructor : n, _ = y ? is(y) : "";
        if (_)
          switch (_) {
            case dZ:
              return te;
            case pZ:
              return Fe;
            case mZ:
              return Ie;
            case hZ:
              return we;
            case gZ:
              return Pe;
          }
        return d;
      });
      function jQ(u, d, y) {
        for (var _ = -1, T = y.length; ++_ < T; ) {
          var z = y[_], M = z.size;
          switch (z.type) {
            case "drop":
              u += M;
              break;
            case "dropRight":
              d -= M;
              break;
            case "take":
              d = Zn(d, u + M);
              break;
            case "takeRight":
              u = On(u, d - M);
              break;
          }
        }
        return { start: u, end: d };
      }
      function NQ(u) {
        var d = u.match(oS);
        return d ? d[1].split(iS) : [];
      }
      function PT(u, d, y) {
        d = el(d, u);
        for (var _ = -1, T = d.length, z = !1; ++_ < T; ) {
          var M = xi(d[_]);
          if (!(z = u != null && y(u, M)))
            break;
          u = u[M];
        }
        return z || ++_ != T ? z : (T = u == null ? 0 : u.length, !!T && Wm(T) && ua(M, T) && (nt(u) || as(u)));
      }
      function $Q(u) {
        var d = u.length, y = new u.constructor(d);
        return d && typeof u[0] == "string" && Nt.call(u, "index") && (y.index = u.index, y.input = u.input), y;
      }
      function RT(u) {
        return typeof u.constructor == "function" && !Nf(u) ? vu(ym(u)) : {};
      }
      function IQ(u, d, y) {
        var _ = u.constructor;
        switch (d) {
          case Y:
            return WS(u);
          case ke:
          case Ae:
            return new _(+u);
          case te:
            return yQ(u, y);
          case Ne:
          case et:
          case ft:
          case un:
          case Ct:
          case _e:
          case Ve:
          case dn:
          case pt:
            return fT(u, y);
          case Fe:
            return new _();
          case Ye:
          case Ge:
            return new _(u);
          case ye:
            return vQ(u);
          case we:
            return new _();
          case $e:
            return bQ(u);
        }
      }
      function AQ(u, d) {
        var y = d.length;
        if (!y)
          return u;
        var _ = y - 1;
        return d[_] = (y > 1 ? "& " : "") + d[_], d = d.join(y > 2 ? ", " : " "), u.replace(rS, `{
/* [wrapped with ` + d + `] */
`);
      }
      function zQ(u) {
        return nt(u) || as(u) || !!(IR && u && u[IR]);
      }
      function ua(u, d) {
        var y = typeof u;
        return d = d ?? q, !!d && (y == "number" || y != "symbol" && KY.test(u)) && u > -1 && u % 1 == 0 && u < d;
      }
      function mr(u, d, y) {
        if (!tn(y))
          return !1;
        var _ = typeof d;
        return (_ == "number" ? Rr(y) && ua(d, y.length) : _ == "string" && d in y) ? ei(y[d], u) : !1;
      }
      function QS(u, d) {
        if (nt(u))
          return !1;
        var y = typeof u;
        return y == "number" || y == "symbol" || y == "boolean" || u == null || Xr(u) ? !0 : Zl.test(u) || !rm.test(u) || d != null && u in Dt(d);
      }
      function LQ(u) {
        var d = typeof u;
        return d == "string" || d == "number" || d == "symbol" || d == "boolean" ? u !== "__proto__" : u === null;
      }
      function JS(u) {
        var d = zm(u), y = I[d];
        if (typeof y != "function" || !(d in gt.prototype))
          return !1;
        if (u === y)
          return !0;
        var _ = YS(y);
        return !!_ && u === _[0];
      }
      function DQ(u) {
        return !!TR && TR in u;
      }
      var FQ = dm ? ca : gk;
      function Nf(u) {
        var d = u && u.constructor, y = typeof d == "function" && d.prototype || hu;
        return u === y;
      }
      function TT(u) {
        return u === u && !tn(u);
      }
      function jT(u, d) {
        return function(y) {
          return y == null ? !1 : y[u] === d && (d !== n || u in Dt(y));
        };
      }
      function MQ(u) {
        var d = Um(u, function(_) {
          return y.size === c && y.clear(), _;
        }), y = d.cache;
        return d;
      }
      function BQ(u, d) {
        var y = u[1], _ = d[1], T = y | _, z = T < (S | w | R), M = _ == R && y == k || _ == R && y == L && u[7].length <= d[8] || _ == (R | L) && d[7].length <= d[8] && y == k;
        if (!(z || M))
          return u;
        _ & S && (u[2] = d[2], T |= y & S ? 0 : x);
        var V = d[3];
        if (V) {
          var Z = u[3];
          u[3] = Z ? pT(Z, V, d[4]) : V, u[4] = Z ? Xa(u[3], p) : d[4];
        }
        return V = d[5], V && (Z = u[5], u[5] = Z ? mT(Z, V, d[6]) : V, u[6] = Z ? Xa(u[5], p) : d[6]), V = d[7], V && (u[7] = V), _ & R && (u[8] = u[8] == null ? d[8] : Zn(u[8], d[8])), u[9] == null && (u[9] = d[9]), u[0] = d[0], u[1] = T, u;
      }
      function UQ(u) {
        var d = [];
        if (u != null)
          for (var y in Dt(u))
            d.push(y);
        return d;
      }
      function HQ(u) {
        return mm.call(u);
      }
      function NT(u, d, y) {
        return d = On(d === n ? u.length - 1 : d, 0), function() {
          for (var _ = arguments, T = -1, z = On(_.length - d, 0), M = ne(z); ++T < z; )
            M[T] = _[d + T];
          T = -1;
          for (var V = ne(d + 1); ++T < d; )
            V[T] = _[T];
          return V[d] = y(M), Gr(u, this, V);
        };
      }
      function $T(u, d) {
        return d.length < 2 ? u : rs(u, jo(d, 0, -1));
      }
      function WQ(u, d) {
        for (var y = u.length, _ = Zn(d.length, y), T = Pr(u); _--; ) {
          var z = d[_];
          u[_] = ua(z, y) ? T[z] : n;
        }
        return u;
      }
      function ek(u, d) {
        if (!(d === "constructor" && typeof u[d] == "function") && d != "__proto__")
          return u[d];
      }
      var IT = zT(rT), $f = iZ || function(u, d) {
        return Ln.setTimeout(u, d);
      }, tk = zT(pQ);
      function AT(u, d, y) {
        var _ = d + "";
        return tk(u, AQ(_, VQ(NQ(_), y)));
      }
      function zT(u) {
        var d = 0, y = 0;
        return function() {
          var _ = uZ(), T = K - (_ - y);
          if (y = _, T > 0) {
            if (++d >= B)
              return arguments[0];
          } else
            d = 0;
          return u.apply(n, arguments);
        };
      }
      function Dm(u, d) {
        var y = -1, _ = u.length, T = _ - 1;
        for (d = d === n ? _ : d; ++y < d; ) {
          var z = LS(y, T), M = u[z];
          u[z] = u[y], u[y] = M;
        }
        return u.length = d, u;
      }
      var LT = MQ(function(u) {
        var d = [];
        return u.charCodeAt(0) === 46 && d.push(""), u.replace(qr, function(y, _, T, z) {
          d.push(T ? z.replace(Lt, "$1") : _ || y);
        }), d;
      });
      function xi(u) {
        if (typeof u == "string" || Xr(u))
          return u;
        var d = u + "";
        return d == "0" && 1 / u == -J ? "-0" : d;
      }
      function is(u) {
        if (u != null) {
          try {
            return pm.call(u);
          } catch {
          }
          try {
            return u + "";
          } catch {
          }
        }
        return "";
      }
      function VQ(u, d) {
        return Co(le, function(y) {
          var _ = "_." + y[0];
          d & y[1] && !sm(u, _) && u.push(_);
        }), u.sort();
      }
      function DT(u) {
        if (u instanceof gt)
          return u.clone();
        var d = new Ro(u.__wrapped__, u.__chain__);
        return d.__actions__ = Pr(u.__actions__), d.__index__ = u.__index__, d.__values__ = u.__values__, d;
      }
      function qQ(u, d, y) {
        (y ? mr(u, d, y) : d === n) ? d = 1 : d = On(it(d), 0);
        var _ = u == null ? 0 : u.length;
        if (!_ || d < 1)
          return [];
        for (var T = 0, z = 0, M = ne(wm(_ / d)); T < _; )
          M[z++] = jo(u, T, T += d);
        return M;
      }
      function GQ(u) {
        for (var d = -1, y = u == null ? 0 : u.length, _ = 0, T = []; ++d < y; ) {
          var z = u[d];
          z && (T[_++] = z);
        }
        return T;
      }
      function KQ() {
        var u = arguments.length;
        if (!u)
          return [];
        for (var d = ne(u - 1), y = arguments[0], _ = u; _--; )
          d[_ - 1] = arguments[_];
        return Ya(nt(y) ? Pr(y) : [y], Dn(d, 1));
      }
      var YQ = ut(function(u, d) {
        return hn(u) ? Cf(u, Dn(d, 1, hn, !0)) : [];
      }), XQ = ut(function(u, d) {
        var y = No(d);
        return hn(y) && (y = n), hn(u) ? Cf(u, Dn(d, 1, hn, !0), Xe(y, 2)) : [];
      }), ZQ = ut(function(u, d) {
        var y = No(d);
        return hn(y) && (y = n), hn(u) ? Cf(u, Dn(d, 1, hn, !0), n, y) : [];
      });
      function QQ(u, d, y) {
        var _ = u == null ? 0 : u.length;
        return _ ? (d = y || d === n ? 1 : it(d), jo(u, d < 0 ? 0 : d, _)) : [];
      }
      function JQ(u, d, y) {
        var _ = u == null ? 0 : u.length;
        return _ ? (d = y || d === n ? 1 : it(d), d = _ - d, jo(u, 0, d < 0 ? 0 : d)) : [];
      }
      function eJ(u, d) {
        return u && u.length ? Tm(u, Xe(d, 3), !0, !0) : [];
      }
      function tJ(u, d) {
        return u && u.length ? Tm(u, Xe(d, 3), !0) : [];
      }
      function nJ(u, d, y, _) {
        var T = u == null ? 0 : u.length;
        return T ? (y && typeof y != "number" && mr(u, d, y) && (y = 0, _ = T), KZ(u, d, y, _)) : [];
      }
      function FT(u, d, y) {
        var _ = u == null ? 0 : u.length;
        if (!_)
          return -1;
        var T = y == null ? 0 : it(y);
        return T < 0 && (T = On(_ + T, 0)), um(u, Xe(d, 3), T);
      }
      function MT(u, d, y) {
        var _ = u == null ? 0 : u.length;
        if (!_)
          return -1;
        var T = _ - 1;
        return y !== n && (T = it(y), T = y < 0 ? On(_ + T, 0) : Zn(T, _ - 1)), um(u, Xe(d, 3), T, !0);
      }
      function BT(u) {
        var d = u == null ? 0 : u.length;
        return d ? Dn(u, 1) : [];
      }
      function rJ(u) {
        var d = u == null ? 0 : u.length;
        return d ? Dn(u, J) : [];
      }
      function oJ(u, d) {
        var y = u == null ? 0 : u.length;
        return y ? (d = d === n ? 1 : it(d), Dn(u, d)) : [];
      }
      function iJ(u) {
        for (var d = -1, y = u == null ? 0 : u.length, _ = {}; ++d < y; ) {
          var T = u[d];
          _[T[0]] = T[1];
        }
        return _;
      }
      function UT(u) {
        return u && u.length ? u[0] : n;
      }
      function aJ(u, d, y) {
        var _ = u == null ? 0 : u.length;
        if (!_)
          return -1;
        var T = y == null ? 0 : it(y);
        return T < 0 && (T = On(_ + T, 0)), fu(u, d, T);
      }
      function lJ(u) {
        var d = u == null ? 0 : u.length;
        return d ? jo(u, 0, -1) : [];
      }
      var sJ = ut(function(u) {
        var d = Qt(u, US);
        return d.length && d[0] === u[0] ? NS(d) : [];
      }), uJ = ut(function(u) {
        var d = No(u), y = Qt(u, US);
        return d === No(y) ? d = n : y.pop(), y.length && y[0] === u[0] ? NS(y, Xe(d, 2)) : [];
      }), cJ = ut(function(u) {
        var d = No(u), y = Qt(u, US);
        return d = typeof d == "function" ? d : n, d && y.pop(), y.length && y[0] === u[0] ? NS(y, n, d) : [];
      });
      function fJ(u, d) {
        return u == null ? "" : lZ.call(u, d);
      }
      function No(u) {
        var d = u == null ? 0 : u.length;
        return d ? u[d - 1] : n;
      }
      function dJ(u, d, y) {
        var _ = u == null ? 0 : u.length;
        if (!_)
          return -1;
        var T = _;
        return y !== n && (T = it(y), T = T < 0 ? On(_ + T, 0) : Zn(T, _ - 1)), d === d ? VX(u, d, T) : um(u, SR, T, !0);
      }
      function pJ(u, d) {
        return u && u.length ? JR(u, it(d)) : n;
      }
      var mJ = ut(HT);
      function HT(u, d) {
        return u && u.length && d && d.length ? zS(u, d) : u;
      }
      function hJ(u, d, y) {
        return u && u.length && d && d.length ? zS(u, d, Xe(y, 2)) : u;
      }
      function gJ(u, d, y) {
        return u && u.length && d && d.length ? zS(u, d, n, y) : u;
      }
      var yJ = sa(function(u, d) {
        var y = u == null ? 0 : u.length, _ = PS(u, d);
        return nT(u, Qt(d, function(T) {
          return ua(T, y) ? +T : T;
        }).sort(dT)), _;
      });
      function vJ(u, d) {
        var y = [];
        if (!(u && u.length))
          return y;
        var _ = -1, T = [], z = u.length;
        for (d = Xe(d, 3); ++_ < z; ) {
          var M = u[_];
          d(M, _, u) && (y.push(M), T.push(_));
        }
        return nT(u, T), y;
      }
      function nk(u) {
        return u == null ? u : fZ.call(u);
      }
      function bJ(u, d, y) {
        var _ = u == null ? 0 : u.length;
        return _ ? (y && typeof y != "number" && mr(u, d, y) ? (d = 0, y = _) : (d = d == null ? 0 : it(d), y = y === n ? _ : it(y)), jo(u, d, y)) : [];
      }
      function wJ(u, d) {
        return Rm(u, d);
      }
      function xJ(u, d, y) {
        return FS(u, d, Xe(y, 2));
      }
      function SJ(u, d) {
        var y = u == null ? 0 : u.length;
        if (y) {
          var _ = Rm(u, d);
          if (_ < y && ei(u[_], d))
            return _;
        }
        return -1;
      }
      function kJ(u, d) {
        return Rm(u, d, !0);
      }
      function _J(u, d, y) {
        return FS(u, d, Xe(y, 2), !0);
      }
      function OJ(u, d) {
        var y = u == null ? 0 : u.length;
        if (y) {
          var _ = Rm(u, d, !0) - 1;
          if (ei(u[_], d))
            return _;
        }
        return -1;
      }
      function EJ(u) {
        return u && u.length ? oT(u) : [];
      }
      function CJ(u, d) {
        return u && u.length ? oT(u, Xe(d, 2)) : [];
      }
      function PJ(u) {
        var d = u == null ? 0 : u.length;
        return d ? jo(u, 1, d) : [];
      }
      function RJ(u, d, y) {
        return u && u.length ? (d = y || d === n ? 1 : it(d), jo(u, 0, d < 0 ? 0 : d)) : [];
      }
      function TJ(u, d, y) {
        var _ = u == null ? 0 : u.length;
        return _ ? (d = y || d === n ? 1 : it(d), d = _ - d, jo(u, d < 0 ? 0 : d, _)) : [];
      }
      function jJ(u, d) {
        return u && u.length ? Tm(u, Xe(d, 3), !1, !0) : [];
      }
      function NJ(u, d) {
        return u && u.length ? Tm(u, Xe(d, 3)) : [];
      }
      var $J = ut(function(u) {
        return Ja(Dn(u, 1, hn, !0));
      }), IJ = ut(function(u) {
        var d = No(u);
        return hn(d) && (d = n), Ja(Dn(u, 1, hn, !0), Xe(d, 2));
      }), AJ = ut(function(u) {
        var d = No(u);
        return d = typeof d == "function" ? d : n, Ja(Dn(u, 1, hn, !0), n, d);
      });
      function zJ(u) {
        return u && u.length ? Ja(u) : [];
      }
      function LJ(u, d) {
        return u && u.length ? Ja(u, Xe(d, 2)) : [];
      }
      function DJ(u, d) {
        return d = typeof d == "function" ? d : n, u && u.length ? Ja(u, n, d) : [];
      }
      function rk(u) {
        if (!(u && u.length))
          return [];
        var d = 0;
        return u = Ka(u, function(y) {
          if (hn(y))
            return d = On(y.length, d), !0;
        }), wS(d, function(y) {
          return Qt(u, yS(y));
        });
      }
      function WT(u, d) {
        if (!(u && u.length))
          return [];
        var y = rk(u);
        return d == null ? y : Qt(y, function(_) {
          return Gr(d, n, _);
        });
      }
      var FJ = ut(function(u, d) {
        return hn(u) ? Cf(u, d) : [];
      }), MJ = ut(function(u) {
        return BS(Ka(u, hn));
      }), BJ = ut(function(u) {
        var d = No(u);
        return hn(d) && (d = n), BS(Ka(u, hn), Xe(d, 2));
      }), UJ = ut(function(u) {
        var d = No(u);
        return d = typeof d == "function" ? d : n, BS(Ka(u, hn), n, d);
      }), HJ = ut(rk);
      function WJ(u, d) {
        return sT(u || [], d || [], Ef);
      }
      function VJ(u, d) {
        return sT(u || [], d || [], Tf);
      }
      var qJ = ut(function(u) {
        var d = u.length, y = d > 1 ? u[d - 1] : n;
        return y = typeof y == "function" ? (u.pop(), y) : n, WT(u, y);
      });
      function VT(u) {
        var d = I(u);
        return d.__chain__ = !0, d;
      }
      function GJ(u, d) {
        return d(u), u;
      }
      function Fm(u, d) {
        return d(u);
      }
      var KJ = sa(function(u) {
        var d = u.length, y = d ? u[0] : 0, _ = this.__wrapped__, T = function(z) {
          return PS(z, u);
        };
        return d > 1 || this.__actions__.length || !(_ instanceof gt) || !ua(y) ? this.thru(T) : (_ = _.slice(y, +y + (d ? 1 : 0)), _.__actions__.push({
          func: Fm,
          args: [T],
          thisArg: n
        }), new Ro(_, this.__chain__).thru(function(z) {
          return d && !z.length && z.push(n), z;
        }));
      });
      function YJ() {
        return VT(this);
      }
      function XJ() {
        return new Ro(this.value(), this.__chain__);
      }
      function ZJ() {
        this.__values__ === n && (this.__values__ = ij(this.value()));
        var u = this.__index__ >= this.__values__.length, d = u ? n : this.__values__[this.__index__++];
        return { done: u, value: d };
      }
      function QJ() {
        return this;
      }
      function JJ(u) {
        for (var d, y = this; y instanceof _m; ) {
          var _ = DT(y);
          _.__index__ = 0, _.__values__ = n, d ? T.__wrapped__ = _ : d = _;
          var T = _;
          y = y.__wrapped__;
        }
        return T.__wrapped__ = u, d;
      }
      function eee() {
        var u = this.__wrapped__;
        if (u instanceof gt) {
          var d = u;
          return this.__actions__.length && (d = new gt(this)), d = d.reverse(), d.__actions__.push({
            func: Fm,
            args: [nk],
            thisArg: n
          }), new Ro(d, this.__chain__);
        }
        return this.thru(nk);
      }
      function tee() {
        return lT(this.__wrapped__, this.__actions__);
      }
      var nee = jm(function(u, d, y) {
        Nt.call(u, y) ? ++u[y] : aa(u, y, 1);
      });
      function ree(u, d, y) {
        var _ = nt(u) ? wR : GZ;
        return y && mr(u, d, y) && (d = n), _(u, Xe(d, 3));
      }
      function oee(u, d) {
        var y = nt(u) ? Ka : WR;
        return y(u, Xe(d, 3));
      }
      var iee = vT(FT), aee = vT(MT);
      function lee(u, d) {
        return Dn(Mm(u, d), 1);
      }
      function see(u, d) {
        return Dn(Mm(u, d), J);
      }
      function uee(u, d, y) {
        return y = y === n ? 1 : it(y), Dn(Mm(u, d), y);
      }
      function qT(u, d) {
        var y = nt(u) ? Co : Qa;
        return y(u, Xe(d, 3));
      }
      function GT(u, d) {
        var y = nt(u) ? PX : HR;
        return y(u, Xe(d, 3));
      }
      var cee = jm(function(u, d, y) {
        Nt.call(u, y) ? u[y].push(d) : aa(u, y, [d]);
      });
      function fee(u, d, y, _) {
        u = Rr(u) ? u : ku(u), y = y && !_ ? it(y) : 0;
        var T = u.length;
        return y < 0 && (y = On(T + y, 0)), Vm(u) ? y <= T && u.indexOf(d, y) > -1 : !!T && fu(u, d, y) > -1;
      }
      var dee = ut(function(u, d, y) {
        var _ = -1, T = typeof d == "function", z = Rr(u) ? ne(u.length) : [];
        return Qa(u, function(M) {
          z[++_] = T ? Gr(d, M, y) : Pf(M, d, y);
        }), z;
      }), pee = jm(function(u, d, y) {
        aa(u, y, d);
      });
      function Mm(u, d) {
        var y = nt(u) ? Qt : XR;
        return y(u, Xe(d, 3));
      }
      function mee(u, d, y, _) {
        return u == null ? [] : (nt(d) || (d = d == null ? [] : [d]), y = _ ? n : y, nt(y) || (y = y == null ? [] : [y]), eT(u, d, y));
      }
      var hee = jm(function(u, d, y) {
        u[y ? 0 : 1].push(d);
      }, function() {
        return [[], []];
      });
      function gee(u, d, y) {
        var _ = nt(u) ? hS : _R, T = arguments.length < 3;
        return _(u, Xe(d, 4), y, T, Qa);
      }
      function yee(u, d, y) {
        var _ = nt(u) ? RX : _R, T = arguments.length < 3;
        return _(u, Xe(d, 4), y, T, HR);
      }
      function vee(u, d) {
        var y = nt(u) ? Ka : WR;
        return y(u, Hm(Xe(d, 3)));
      }
      function bee(u) {
        var d = nt(u) ? FR : fQ;
        return d(u);
      }
      function wee(u, d, y) {
        (y ? mr(u, d, y) : d === n) ? d = 1 : d = it(d);
        var _ = nt(u) ? UZ : dQ;
        return _(u, d);
      }
      function xee(u) {
        var d = nt(u) ? HZ : mQ;
        return d(u);
      }
      function See(u) {
        if (u == null)
          return 0;
        if (Rr(u))
          return Vm(u) ? pu(u) : u.length;
        var d = Qn(u);
        return d == Fe || d == we ? u.size : IS(u).length;
      }
      function kee(u, d, y) {
        var _ = nt(u) ? gS : hQ;
        return y && mr(u, d, y) && (d = n), _(u, Xe(d, 3));
      }
      var _ee = ut(function(u, d) {
        if (u == null)
          return [];
        var y = d.length;
        return y > 1 && mr(u, d[0], d[1]) ? d = [] : y > 2 && mr(d[0], d[1], d[2]) && (d = [d[0]]), eT(u, Dn(d, 1), []);
      }), Bm = oZ || function() {
        return Ln.Date.now();
      };
      function Oee(u, d) {
        if (typeof d != "function")
          throw new Po(a);
        return u = it(u), function() {
          if (--u < 1)
            return d.apply(this, arguments);
        };
      }
      function KT(u, d, y) {
        return d = y ? n : d, d = u && d == null ? u.length : d, la(u, R, n, n, n, n, d);
      }
      function YT(u, d) {
        var y;
        if (typeof d != "function")
          throw new Po(a);
        return u = it(u), function() {
          return --u > 0 && (y = d.apply(this, arguments)), u <= 1 && (d = n), y;
        };
      }
      var ok = ut(function(u, d, y) {
        var _ = S;
        if (y.length) {
          var T = Xa(y, xu(ok));
          _ |= O;
        }
        return la(u, _, d, y, T);
      }), XT = ut(function(u, d, y) {
        var _ = S | w;
        if (y.length) {
          var T = Xa(y, xu(XT));
          _ |= O;
        }
        return la(d, _, u, y, T);
      });
      function ZT(u, d, y) {
        d = y ? n : d;
        var _ = la(u, k, n, n, n, n, n, d);
        return _.placeholder = ZT.placeholder, _;
      }
      function QT(u, d, y) {
        d = y ? n : d;
        var _ = la(u, E, n, n, n, n, n, d);
        return _.placeholder = QT.placeholder, _;
      }
      function JT(u, d, y) {
        var _, T, z, M, V, Z, ce = 0, fe = !1, me = !1, Oe = !0;
        if (typeof u != "function")
          throw new Po(a);
        d = $o(d) || 0, tn(y) && (fe = !!y.leading, me = "maxWait" in y, z = me ? On($o(y.maxWait) || 0, d) : z, Oe = "trailing" in y ? !!y.trailing : Oe);
        function Be(gn) {
          var ti = _, da = T;
          return _ = T = n, ce = gn, M = u.apply(da, ti), M;
        }
        function Ze(gn) {
          return ce = gn, V = $f(mt, d), fe ? Be(gn) : M;
        }
        function st(gn) {
          var ti = gn - Z, da = gn - ce, vj = d - ti;
          return me ? Zn(vj, z - da) : vj;
        }
        function Qe(gn) {
          var ti = gn - Z, da = gn - ce;
          return Z === n || ti >= d || ti < 0 || me && da >= z;
        }
        function mt() {
          var gn = Bm();
          if (Qe(gn))
            return vt(gn);
          V = $f(mt, st(gn));
        }
        function vt(gn) {
          return V = n, Oe && _ ? Be(gn) : (_ = T = n, M);
        }
        function Zr() {
          V !== n && uT(V), ce = 0, _ = Z = T = V = n;
        }
        function hr() {
          return V === n ? M : vt(Bm());
        }
        function Qr() {
          var gn = Bm(), ti = Qe(gn);
          if (_ = arguments, T = this, Z = gn, ti) {
            if (V === n)
              return Ze(Z);
            if (me)
              return uT(V), V = $f(mt, d), Be(Z);
          }
          return V === n && (V = $f(mt, d)), M;
        }
        return Qr.cancel = Zr, Qr.flush = hr, Qr;
      }
      var Eee = ut(function(u, d) {
        return UR(u, 1, d);
      }), Cee = ut(function(u, d, y) {
        return UR(u, $o(d) || 0, y);
      });
      function Pee(u) {
        return la(u, D);
      }
      function Um(u, d) {
        if (typeof u != "function" || d != null && typeof d != "function")
          throw new Po(a);
        var y = function() {
          var _ = arguments, T = d ? d.apply(this, _) : _[0], z = y.cache;
          if (z.has(T))
            return z.get(T);
          var M = u.apply(this, _);
          return y.cache = z.set(T, M) || z, M;
        };
        return y.cache = new (Um.Cache || ia)(), y;
      }
      Um.Cache = ia;
      function Hm(u) {
        if (typeof u != "function")
          throw new Po(a);
        return function() {
          var d = arguments;
          switch (d.length) {
            case 0:
              return !u.call(this);
            case 1:
              return !u.call(this, d[0]);
            case 2:
              return !u.call(this, d[0], d[1]);
            case 3:
              return !u.call(this, d[0], d[1], d[2]);
          }
          return !u.apply(this, d);
        };
      }
      function Ree(u) {
        return YT(2, u);
      }
      var Tee = gQ(function(u, d) {
        d = d.length == 1 && nt(d[0]) ? Qt(d[0], Kr(Xe())) : Qt(Dn(d, 1), Kr(Xe()));
        var y = d.length;
        return ut(function(_) {
          for (var T = -1, z = Zn(_.length, y); ++T < z; )
            _[T] = d[T].call(this, _[T]);
          return Gr(u, this, _);
        });
      }), ik = ut(function(u, d) {
        var y = Xa(d, xu(ik));
        return la(u, O, n, d, y);
      }), ej = ut(function(u, d) {
        var y = Xa(d, xu(ej));
        return la(u, C, n, d, y);
      }), jee = sa(function(u, d) {
        return la(u, L, n, n, n, d);
      });
      function Nee(u, d) {
        if (typeof u != "function")
          throw new Po(a);
        return d = d === n ? d : it(d), ut(u, d);
      }
      function $ee(u, d) {
        if (typeof u != "function")
          throw new Po(a);
        return d = d == null ? 0 : On(it(d), 0), ut(function(y) {
          var _ = y[d], T = tl(y, 0, d);
          return _ && Ya(T, _), Gr(u, this, T);
        });
      }
      function Iee(u, d, y) {
        var _ = !0, T = !0;
        if (typeof u != "function")
          throw new Po(a);
        return tn(y) && (_ = "leading" in y ? !!y.leading : _, T = "trailing" in y ? !!y.trailing : T), JT(u, d, {
          leading: _,
          maxWait: d,
          trailing: T
        });
      }
      function Aee(u) {
        return KT(u, 1);
      }
      function zee(u, d) {
        return ik(HS(d), u);
      }
      function Lee() {
        if (!arguments.length)
          return [];
        var u = arguments[0];
        return nt(u) ? u : [u];
      }
      function Dee(u) {
        return To(u, h);
      }
      function Fee(u, d) {
        return d = typeof d == "function" ? d : n, To(u, h, d);
      }
      function Mee(u) {
        return To(u, f | h);
      }
      function Bee(u, d) {
        return d = typeof d == "function" ? d : n, To(u, f | h, d);
      }
      function Uee(u, d) {
        return d == null || BR(u, d, Nn(d));
      }
      function ei(u, d) {
        return u === d || u !== u && d !== d;
      }
      var Hee = Am(jS), Wee = Am(function(u, d) {
        return u >= d;
      }), as = GR(/* @__PURE__ */ function() {
        return arguments;
      }()) ? GR : function(u) {
        return cn(u) && Nt.call(u, "callee") && !$R.call(u, "callee");
      }, nt = ne.isArray, Vee = mR ? Kr(mR) : JZ;
      function Rr(u) {
        return u != null && Wm(u.length) && !ca(u);
      }
      function hn(u) {
        return cn(u) && Rr(u);
      }
      function qee(u) {
        return u === !0 || u === !1 || cn(u) && pr(u) == ke;
      }
      var nl = aZ || gk, Gee = hR ? Kr(hR) : eQ;
      function Kee(u) {
        return cn(u) && u.nodeType === 1 && !If(u);
      }
      function Yee(u) {
        if (u == null)
          return !0;
        if (Rr(u) && (nt(u) || typeof u == "string" || typeof u.splice == "function" || nl(u) || Su(u) || as(u)))
          return !u.length;
        var d = Qn(u);
        if (d == Fe || d == we)
          return !u.size;
        if (Nf(u))
          return !IS(u).length;
        for (var y in u)
          if (Nt.call(u, y))
            return !1;
        return !0;
      }
      function Xee(u, d) {
        return Rf(u, d);
      }
      function Zee(u, d, y) {
        y = typeof y == "function" ? y : n;
        var _ = y ? y(u, d) : n;
        return _ === n ? Rf(u, d, n, y) : !!_;
      }
      function ak(u) {
        if (!cn(u))
          return !1;
        var d = pr(u);
        return d == Me || d == pe || typeof u.message == "string" && typeof u.name == "string" && !If(u);
      }
      function Qee(u) {
        return typeof u == "number" && AR(u);
      }
      function ca(u) {
        if (!tn(u))
          return !1;
        var d = pr(u);
        return d == We || d == ze || d == xe || d == Ce;
      }
      function tj(u) {
        return typeof u == "number" && u == it(u);
      }
      function Wm(u) {
        return typeof u == "number" && u > -1 && u % 1 == 0 && u <= q;
      }
      function tn(u) {
        var d = typeof u;
        return u != null && (d == "object" || d == "function");
      }
      function cn(u) {
        return u != null && typeof u == "object";
      }
      var nj = gR ? Kr(gR) : nQ;
      function Jee(u, d) {
        return u === d || $S(u, d, XS(d));
      }
      function ete(u, d, y) {
        return y = typeof y == "function" ? y : n, $S(u, d, XS(d), y);
      }
      function tte(u) {
        return rj(u) && u != +u;
      }
      function nte(u) {
        if (FQ(u))
          throw new tt(i);
        return KR(u);
      }
      function rte(u) {
        return u === null;
      }
      function ote(u) {
        return u == null;
      }
      function rj(u) {
        return typeof u == "number" || cn(u) && pr(u) == Ye;
      }
      function If(u) {
        if (!cn(u) || pr(u) != ae)
          return !1;
        var d = ym(u);
        if (d === null)
          return !0;
        var y = Nt.call(d, "constructor") && d.constructor;
        return typeof y == "function" && y instanceof y && pm.call(y) == eZ;
      }
      var lk = yR ? Kr(yR) : rQ;
      function ite(u) {
        return tj(u) && u >= -q && u <= q;
      }
      var oj = vR ? Kr(vR) : oQ;
      function Vm(u) {
        return typeof u == "string" || !nt(u) && cn(u) && pr(u) == Ge;
      }
      function Xr(u) {
        return typeof u == "symbol" || cn(u) && pr(u) == $e;
      }
      var Su = bR ? Kr(bR) : iQ;
      function ate(u) {
        return u === n;
      }
      function lte(u) {
        return cn(u) && Qn(u) == Pe;
      }
      function ste(u) {
        return cn(u) && pr(u) == Je;
      }
      var ute = Am(AS), cte = Am(function(u, d) {
        return u <= d;
      });
      function ij(u) {
        if (!u)
          return [];
        if (Rr(u))
          return Vm(u) ? Qo(u) : Pr(u);
        if (xf && u[xf])
          return UX(u[xf]());
        var d = Qn(u), y = d == Fe ? SS : d == we ? cm : ku;
        return y(u);
      }
      function fa(u) {
        if (!u)
          return u === 0 ? u : 0;
        if (u = $o(u), u === J || u === -J) {
          var d = u < 0 ? -1 : 1;
          return d * ee;
        }
        return u === u ? u : 0;
      }
      function it(u) {
        var d = fa(u), y = d % 1;
        return d === d ? y ? d - y : d : 0;
      }
      function aj(u) {
        return u ? ns(it(u), 0, X) : 0;
      }
      function $o(u) {
        if (typeof u == "number")
          return u;
        if (Xr(u))
          return A;
        if (tn(u)) {
          var d = typeof u.valueOf == "function" ? u.valueOf() : u;
          u = tn(d) ? d + "" : d;
        }
        if (typeof u != "string")
          return u === 0 ? u : +u;
        u = OR(u);
        var y = VY.test(u);
        return y || GY.test(u) ? OX(u.slice(2), y ? 2 : 8) : WY.test(u) ? A : +u;
      }
      function lj(u) {
        return wi(u, Tr(u));
      }
      function fte(u) {
        return u ? ns(it(u), -q, q) : u === 0 ? u : 0;
      }
      function Pt(u) {
        return u == null ? "" : Yr(u);
      }
      var dte = bu(function(u, d) {
        if (Nf(d) || Rr(d)) {
          wi(d, Nn(d), u);
          return;
        }
        for (var y in d)
          Nt.call(d, y) && Ef(u, y, d[y]);
      }), sj = bu(function(u, d) {
        wi(d, Tr(d), u);
      }), qm = bu(function(u, d, y, _) {
        wi(d, Tr(d), u, _);
      }), pte = bu(function(u, d, y, _) {
        wi(d, Nn(d), u, _);
      }), mte = sa(PS);
      function hte(u, d) {
        var y = vu(u);
        return d == null ? y : MR(y, d);
      }
      var gte = ut(function(u, d) {
        u = Dt(u);
        var y = -1, _ = d.length, T = _ > 2 ? d[2] : n;
        for (T && mr(d[0], d[1], T) && (_ = 1); ++y < _; )
          for (var z = d[y], M = Tr(z), V = -1, Z = M.length; ++V < Z; ) {
            var ce = M[V], fe = u[ce];
            (fe === n || ei(fe, hu[ce]) && !Nt.call(u, ce)) && (u[ce] = z[ce]);
          }
        return u;
      }), yte = ut(function(u) {
        return u.push(n, OT), Gr(uj, n, u);
      });
      function vte(u, d) {
        return xR(u, Xe(d, 3), bi);
      }
      function bte(u, d) {
        return xR(u, Xe(d, 3), TS);
      }
      function wte(u, d) {
        return u == null ? u : RS(u, Xe(d, 3), Tr);
      }
      function xte(u, d) {
        return u == null ? u : VR(u, Xe(d, 3), Tr);
      }
      function Ste(u, d) {
        return u && bi(u, Xe(d, 3));
      }
      function kte(u, d) {
        return u && TS(u, Xe(d, 3));
      }
      function _te(u) {
        return u == null ? [] : Cm(u, Nn(u));
      }
      function Ote(u) {
        return u == null ? [] : Cm(u, Tr(u));
      }
      function sk(u, d, y) {
        var _ = u == null ? n : rs(u, d);
        return _ === n ? y : _;
      }
      function Ete(u, d) {
        return u != null && PT(u, d, YZ);
      }
      function uk(u, d) {
        return u != null && PT(u, d, XZ);
      }
      var Cte = wT(function(u, d, y) {
        d != null && typeof d.toString != "function" && (d = mm.call(d)), u[d] = y;
      }, fk(jr)), Pte = wT(function(u, d, y) {
        d != null && typeof d.toString != "function" && (d = mm.call(d)), Nt.call(u, d) ? u[d].push(y) : u[d] = [y];
      }, Xe), Rte = ut(Pf);
      function Nn(u) {
        return Rr(u) ? DR(u) : IS(u);
      }
      function Tr(u) {
        return Rr(u) ? DR(u, !0) : aQ(u);
      }
      function Tte(u, d) {
        var y = {};
        return d = Xe(d, 3), bi(u, function(_, T, z) {
          aa(y, d(_, T, z), _);
        }), y;
      }
      function jte(u, d) {
        var y = {};
        return d = Xe(d, 3), bi(u, function(_, T, z) {
          aa(y, T, d(_, T, z));
        }), y;
      }
      var Nte = bu(function(u, d, y) {
        Pm(u, d, y);
      }), uj = bu(function(u, d, y, _) {
        Pm(u, d, y, _);
      }), $te = sa(function(u, d) {
        var y = {};
        if (u == null)
          return y;
        var _ = !1;
        d = Qt(d, function(z) {
          return z = el(z, u), _ || (_ = z.length > 1), z;
        }), wi(u, KS(u), y), _ && (y = To(y, f | m | h, CQ));
        for (var T = d.length; T--; )
          MS(y, d[T]);
        return y;
      });
      function Ite(u, d) {
        return cj(u, Hm(Xe(d)));
      }
      var Ate = sa(function(u, d) {
        return u == null ? {} : sQ(u, d);
      });
      function cj(u, d) {
        if (u == null)
          return {};
        var y = Qt(KS(u), function(_) {
          return [_];
        });
        return d = Xe(d), tT(u, y, function(_, T) {
          return d(_, T[0]);
        });
      }
      function zte(u, d, y) {
        d = el(d, u);
        var _ = -1, T = d.length;
        for (T || (T = 1, u = n); ++_ < T; ) {
          var z = u == null ? n : u[xi(d[_])];
          z === n && (_ = T, z = y), u = ca(z) ? z.call(u) : z;
        }
        return u;
      }
      function Lte(u, d, y) {
        return u == null ? u : Tf(u, d, y);
      }
      function Dte(u, d, y, _) {
        return _ = typeof _ == "function" ? _ : n, u == null ? u : Tf(u, d, y, _);
      }
      var fj = kT(Nn), dj = kT(Tr);
      function Fte(u, d, y) {
        var _ = nt(u), T = _ || nl(u) || Su(u);
        if (d = Xe(d, 4), y == null) {
          var z = u && u.constructor;
          T ? y = _ ? new z() : [] : tn(u) ? y = ca(z) ? vu(ym(u)) : {} : y = {};
        }
        return (T ? Co : bi)(u, function(M, V, Z) {
          return d(y, M, V, Z);
        }), y;
      }
      function Mte(u, d) {
        return u == null ? !0 : MS(u, d);
      }
      function Bte(u, d, y) {
        return u == null ? u : aT(u, d, HS(y));
      }
      function Ute(u, d, y, _) {
        return _ = typeof _ == "function" ? _ : n, u == null ? u : aT(u, d, HS(y), _);
      }
      function ku(u) {
        return u == null ? [] : xS(u, Nn(u));
      }
      function Hte(u) {
        return u == null ? [] : xS(u, Tr(u));
      }
      function Wte(u, d, y) {
        return y === n && (y = d, d = n), y !== n && (y = $o(y), y = y === y ? y : 0), d !== n && (d = $o(d), d = d === d ? d : 0), ns($o(u), d, y);
      }
      function Vte(u, d, y) {
        return d = fa(d), y === n ? (y = d, d = 0) : y = fa(y), u = $o(u), ZZ(u, d, y);
      }
      function qte(u, d, y) {
        if (y && typeof y != "boolean" && mr(u, d, y) && (d = y = n), y === n && (typeof d == "boolean" ? (y = d, d = n) : typeof u == "boolean" && (y = u, u = n)), u === n && d === n ? (u = 0, d = 1) : (u = fa(u), d === n ? (d = u, u = 0) : d = fa(d)), u > d) {
          var _ = u;
          u = d, d = _;
        }
        if (y || u % 1 || d % 1) {
          var T = zR();
          return Zn(u + T * (d - u + _X("1e-" + ((T + "").length - 1))), d);
        }
        return LS(u, d);
      }
      var Gte = wu(function(u, d, y) {
        return d = d.toLowerCase(), u + (y ? pj(d) : d);
      });
      function pj(u) {
        return ck(Pt(u).toLowerCase());
      }
      function mj(u) {
        return u = Pt(u), u && u.replace(YY, LX).replace(mX, "");
      }
      function Kte(u, d, y) {
        u = Pt(u), d = Yr(d);
        var _ = u.length;
        y = y === n ? _ : ns(it(y), 0, _);
        var T = y;
        return y -= d.length, y >= 0 && u.slice(y, T) == d;
      }
      function Yte(u) {
        return u = Pt(u), u && ra.test(u) ? u.replace(Oo, DX) : u;
      }
      function Xte(u) {
        return u = Pt(u), u && om.test(u) ? u.replace(uu, "\\$&") : u;
      }
      var Zte = wu(function(u, d, y) {
        return u + (y ? "-" : "") + d.toLowerCase();
      }), Qte = wu(function(u, d, y) {
        return u + (y ? " " : "") + d.toLowerCase();
      }), Jte = yT("toLowerCase");
      function ene(u, d, y) {
        u = Pt(u), d = it(d);
        var _ = d ? pu(u) : 0;
        if (!d || _ >= d)
          return u;
        var T = (d - _) / 2;
        return Im(xm(T), y) + u + Im(wm(T), y);
      }
      function tne(u, d, y) {
        u = Pt(u), d = it(d);
        var _ = d ? pu(u) : 0;
        return d && _ < d ? u + Im(d - _, y) : u;
      }
      function nne(u, d, y) {
        u = Pt(u), d = it(d);
        var _ = d ? pu(u) : 0;
        return d && _ < d ? Im(d - _, y) + u : u;
      }
      function rne(u, d, y) {
        return y || d == null ? d = 0 : d && (d = +d), cZ(Pt(u).replace(Ga, ""), d || 0);
      }
      function one(u, d, y) {
        return (y ? mr(u, d, y) : d === n) ? d = 1 : d = it(d), DS(Pt(u), d);
      }
      function ine() {
        var u = arguments, d = Pt(u[0]);
        return u.length < 3 ? d : d.replace(u[1], u[2]);
      }
      var ane = wu(function(u, d, y) {
        return u + (y ? "_" : "") + d.toLowerCase();
      });
      function lne(u, d, y) {
        return y && typeof y != "number" && mr(u, d, y) && (d = y = n), y = y === n ? X : y >>> 0, y ? (u = Pt(u), u && (typeof d == "string" || d != null && !lk(d)) && (d = Yr(d), !d && du(u)) ? tl(Qo(u), 0, y) : u.split(d, y)) : [];
      }
      var sne = wu(function(u, d, y) {
        return u + (y ? " " : "") + ck(d);
      });
      function une(u, d, y) {
        return u = Pt(u), y = y == null ? 0 : ns(it(y), 0, u.length), d = Yr(d), u.slice(y, y + d.length) == d;
      }
      function cne(u, d, y) {
        var _ = I.templateSettings;
        y && mr(u, d, y) && (d = n), u = Pt(u), d = qm({}, d, _, _T);
        var T = qm({}, d.imports, _.imports, _T), z = Nn(T), M = xS(T, z), V, Z, ce = 0, fe = d.interpolate || im, me = "__p += '", Oe = kS(
          (d.escape || im).source + "|" + fe.source + "|" + (fe === mn ? dr : im).source + "|" + (d.evaluate || im).source + "|$",
          "g"
        ), Be = "//# sourceURL=" + (Nt.call(d, "sourceURL") ? (d.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++bX + "]") + `
`;
        u.replace(Oe, function(Qe, mt, vt, Zr, hr, Qr) {
          return vt || (vt = Zr), me += u.slice(ce, Qr).replace(XY, FX), mt && (V = !0, me += `' +
__e(` + mt + `) +
'`), hr && (Z = !0, me += `';
` + hr + `;
__p += '`), vt && (me += `' +
((__t = (` + vt + `)) == null ? '' : __t) +
'`), ce = Qr + Qe.length, Qe;
        }), me += `';
`;
        var Ze = Nt.call(d, "variable") && d.variable;
        if (!Ze)
          me = `with (obj) {
` + me + `
}
`;
        else if (He.test(Ze))
          throw new tt(l);
        me = (Z ? me.replace(Gt, "") : me).replace(pn, "$1").replace(nm, "$1;"), me = "function(" + (Ze || "obj") + `) {
` + (Ze ? "" : `obj || (obj = {});
`) + "var __t, __p = ''" + (V ? ", __e = _.escape" : "") + (Z ? `, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
` : `;
`) + me + `return __p
}`;
        var st = gj(function() {
          return St(z, Be + "return " + me).apply(n, M);
        });
        if (st.source = me, ak(st))
          throw st;
        return st;
      }
      function fne(u) {
        return Pt(u).toLowerCase();
      }
      function dne(u) {
        return Pt(u).toUpperCase();
      }
      function pne(u, d, y) {
        if (u = Pt(u), u && (y || d === n))
          return OR(u);
        if (!u || !(d = Yr(d)))
          return u;
        var _ = Qo(u), T = Qo(d), z = ER(_, T), M = CR(_, T) + 1;
        return tl(_, z, M).join("");
      }
      function mne(u, d, y) {
        if (u = Pt(u), u && (y || d === n))
          return u.slice(0, RR(u) + 1);
        if (!u || !(d = Yr(d)))
          return u;
        var _ = Qo(u), T = CR(_, Qo(d)) + 1;
        return tl(_, 0, T).join("");
      }
      function hne(u, d, y) {
        if (u = Pt(u), u && (y || d === n))
          return u.replace(Ga, "");
        if (!u || !(d = Yr(d)))
          return u;
        var _ = Qo(u), T = ER(_, Qo(d));
        return tl(_, T).join("");
      }
      function gne(u, d) {
        var y = N, _ = H;
        if (tn(d)) {
          var T = "separator" in d ? d.separator : T;
          y = "length" in d ? it(d.length) : y, _ = "omission" in d ? Yr(d.omission) : _;
        }
        u = Pt(u);
        var z = u.length;
        if (du(u)) {
          var M = Qo(u);
          z = M.length;
        }
        if (y >= z)
          return u;
        var V = y - pu(_);
        if (V < 1)
          return _;
        var Z = M ? tl(M, 0, V).join("") : u.slice(0, V);
        if (T === n)
          return Z + _;
        if (M && (V += Z.length - V), lk(T)) {
          if (u.slice(V).search(T)) {
            var ce, fe = Z;
            for (T.global || (T = kS(T.source, Pt(Xn.exec(T)) + "g")), T.lastIndex = 0; ce = T.exec(fe); )
              var me = ce.index;
            Z = Z.slice(0, me === n ? V : me);
          }
        } else if (u.indexOf(Yr(T), V) != V) {
          var Oe = Z.lastIndexOf(T);
          Oe > -1 && (Z = Z.slice(0, Oe));
        }
        return Z + _;
      }
      function yne(u) {
        return u = Pt(u), u && eS.test(u) ? u.replace(_o, qX) : u;
      }
      var vne = wu(function(u, d, y) {
        return u + (y ? " " : "") + d.toUpperCase();
      }), ck = yT("toUpperCase");
      function hj(u, d, y) {
        return u = Pt(u), d = y ? n : d, d === n ? BX(u) ? YX(u) : NX(u) : u.match(d) || [];
      }
      var gj = ut(function(u, d) {
        try {
          return Gr(u, n, d);
        } catch (y) {
          return ak(y) ? y : new tt(y);
        }
      }), bne = sa(function(u, d) {
        return Co(d, function(y) {
          y = xi(y), aa(u, y, ok(u[y], u));
        }), u;
      });
      function wne(u) {
        var d = u == null ? 0 : u.length, y = Xe();
        return u = d ? Qt(u, function(_) {
          if (typeof _[1] != "function")
            throw new Po(a);
          return [y(_[0]), _[1]];
        }) : [], ut(function(_) {
          for (var T = -1; ++T < d; ) {
            var z = u[T];
            if (Gr(z[0], this, _))
              return Gr(z[1], this, _);
          }
        });
      }
      function xne(u) {
        return qZ(To(u, f));
      }
      function fk(u) {
        return function() {
          return u;
        };
      }
      function Sne(u, d) {
        return u == null || u !== u ? d : u;
      }
      var kne = bT(), _ne = bT(!0);
      function jr(u) {
        return u;
      }
      function dk(u) {
        return YR(typeof u == "function" ? u : To(u, f));
      }
      function One(u) {
        return ZR(To(u, f));
      }
      function Ene(u, d) {
        return QR(u, To(d, f));
      }
      var Cne = ut(function(u, d) {
        return function(y) {
          return Pf(y, u, d);
        };
      }), Pne = ut(function(u, d) {
        return function(y) {
          return Pf(u, y, d);
        };
      });
      function pk(u, d, y) {
        var _ = Nn(d), T = Cm(d, _);
        y == null && !(tn(d) && (T.length || !_.length)) && (y = d, d = u, u = this, T = Cm(d, Nn(d)));
        var z = !(tn(y) && "chain" in y) || !!y.chain, M = ca(u);
        return Co(T, function(V) {
          var Z = d[V];
          u[V] = Z, M && (u.prototype[V] = function() {
            var ce = this.__chain__;
            if (z || ce) {
              var fe = u(this.__wrapped__), me = fe.__actions__ = Pr(this.__actions__);
              return me.push({ func: Z, args: arguments, thisArg: u }), fe.__chain__ = ce, fe;
            }
            return Z.apply(u, Ya([this.value()], arguments));
          });
        }), u;
      }
      function Rne() {
        return Ln._ === this && (Ln._ = tZ), this;
      }
      function mk() {
      }
      function Tne(u) {
        return u = it(u), ut(function(d) {
          return JR(d, u);
        });
      }
      var jne = VS(Qt), Nne = VS(wR), $ne = VS(gS);
      function yj(u) {
        return QS(u) ? yS(xi(u)) : uQ(u);
      }
      function Ine(u) {
        return function(d) {
          return u == null ? n : rs(u, d);
        };
      }
      var Ane = xT(), zne = xT(!0);
      function hk() {
        return [];
      }
      function gk() {
        return !1;
      }
      function Lne() {
        return {};
      }
      function Dne() {
        return "";
      }
      function Fne() {
        return !0;
      }
      function Mne(u, d) {
        if (u = it(u), u < 1 || u > q)
          return [];
        var y = X, _ = Zn(u, X);
        d = Xe(d), u -= X;
        for (var T = wS(_, d); ++y < u; )
          d(y);
        return T;
      }
      function Bne(u) {
        return nt(u) ? Qt(u, xi) : Xr(u) ? [u] : Pr(LT(Pt(u)));
      }
      function Une(u) {
        var d = ++JX;
        return Pt(u) + d;
      }
      var Hne = $m(function(u, d) {
        return u + d;
      }, 0), Wne = qS("ceil"), Vne = $m(function(u, d) {
        return u / d;
      }, 1), qne = qS("floor");
      function Gne(u) {
        return u && u.length ? Em(u, jr, jS) : n;
      }
      function Kne(u, d) {
        return u && u.length ? Em(u, Xe(d, 2), jS) : n;
      }
      function Yne(u) {
        return kR(u, jr);
      }
      function Xne(u, d) {
        return kR(u, Xe(d, 2));
      }
      function Zne(u) {
        return u && u.length ? Em(u, jr, AS) : n;
      }
      function Qne(u, d) {
        return u && u.length ? Em(u, Xe(d, 2), AS) : n;
      }
      var Jne = $m(function(u, d) {
        return u * d;
      }, 1), ere = qS("round"), tre = $m(function(u, d) {
        return u - d;
      }, 0);
      function nre(u) {
        return u && u.length ? bS(u, jr) : 0;
      }
      function rre(u, d) {
        return u && u.length ? bS(u, Xe(d, 2)) : 0;
      }
      return I.after = Oee, I.ary = KT, I.assign = dte, I.assignIn = sj, I.assignInWith = qm, I.assignWith = pte, I.at = mte, I.before = YT, I.bind = ok, I.bindAll = bne, I.bindKey = XT, I.castArray = Lee, I.chain = VT, I.chunk = qQ, I.compact = GQ, I.concat = KQ, I.cond = wne, I.conforms = xne, I.constant = fk, I.countBy = nee, I.create = hte, I.curry = ZT, I.curryRight = QT, I.debounce = JT, I.defaults = gte, I.defaultsDeep = yte, I.defer = Eee, I.delay = Cee, I.difference = YQ, I.differenceBy = XQ, I.differenceWith = ZQ, I.drop = QQ, I.dropRight = JQ, I.dropRightWhile = eJ, I.dropWhile = tJ, I.fill = nJ, I.filter = oee, I.flatMap = lee, I.flatMapDeep = see, I.flatMapDepth = uee, I.flatten = BT, I.flattenDeep = rJ, I.flattenDepth = oJ, I.flip = Pee, I.flow = kne, I.flowRight = _ne, I.fromPairs = iJ, I.functions = _te, I.functionsIn = Ote, I.groupBy = cee, I.initial = lJ, I.intersection = sJ, I.intersectionBy = uJ, I.intersectionWith = cJ, I.invert = Cte, I.invertBy = Pte, I.invokeMap = dee, I.iteratee = dk, I.keyBy = pee, I.keys = Nn, I.keysIn = Tr, I.map = Mm, I.mapKeys = Tte, I.mapValues = jte, I.matches = One, I.matchesProperty = Ene, I.memoize = Um, I.merge = Nte, I.mergeWith = uj, I.method = Cne, I.methodOf = Pne, I.mixin = pk, I.negate = Hm, I.nthArg = Tne, I.omit = $te, I.omitBy = Ite, I.once = Ree, I.orderBy = mee, I.over = jne, I.overArgs = Tee, I.overEvery = Nne, I.overSome = $ne, I.partial = ik, I.partialRight = ej, I.partition = hee, I.pick = Ate, I.pickBy = cj, I.property = yj, I.propertyOf = Ine, I.pull = mJ, I.pullAll = HT, I.pullAllBy = hJ, I.pullAllWith = gJ, I.pullAt = yJ, I.range = Ane, I.rangeRight = zne, I.rearg = jee, I.reject = vee, I.remove = vJ, I.rest = Nee, I.reverse = nk, I.sampleSize = wee, I.set = Lte, I.setWith = Dte, I.shuffle = xee, I.slice = bJ, I.sortBy = _ee, I.sortedUniq = EJ, I.sortedUniqBy = CJ, I.split = lne, I.spread = $ee, I.tail = PJ, I.take = RJ, I.takeRight = TJ, I.takeRightWhile = jJ, I.takeWhile = NJ, I.tap = GJ, I.throttle = Iee, I.thru = Fm, I.toArray = ij, I.toPairs = fj, I.toPairsIn = dj, I.toPath = Bne, I.toPlainObject = lj, I.transform = Fte, I.unary = Aee, I.union = $J, I.unionBy = IJ, I.unionWith = AJ, I.uniq = zJ, I.uniqBy = LJ, I.uniqWith = DJ, I.unset = Mte, I.unzip = rk, I.unzipWith = WT, I.update = Bte, I.updateWith = Ute, I.values = ku, I.valuesIn = Hte, I.without = FJ, I.words = hj, I.wrap = zee, I.xor = MJ, I.xorBy = BJ, I.xorWith = UJ, I.zip = HJ, I.zipObject = WJ, I.zipObjectDeep = VJ, I.zipWith = qJ, I.entries = fj, I.entriesIn = dj, I.extend = sj, I.extendWith = qm, pk(I, I), I.add = Hne, I.attempt = gj, I.camelCase = Gte, I.capitalize = pj, I.ceil = Wne, I.clamp = Wte, I.clone = Dee, I.cloneDeep = Mee, I.cloneDeepWith = Bee, I.cloneWith = Fee, I.conformsTo = Uee, I.deburr = mj, I.defaultTo = Sne, I.divide = Vne, I.endsWith = Kte, I.eq = ei, I.escape = Yte, I.escapeRegExp = Xte, I.every = ree, I.find = iee, I.findIndex = FT, I.findKey = vte, I.findLast = aee, I.findLastIndex = MT, I.findLastKey = bte, I.floor = qne, I.forEach = qT, I.forEachRight = GT, I.forIn = wte, I.forInRight = xte, I.forOwn = Ste, I.forOwnRight = kte, I.get = sk, I.gt = Hee, I.gte = Wee, I.has = Ete, I.hasIn = uk, I.head = UT, I.identity = jr, I.includes = fee, I.indexOf = aJ, I.inRange = Vte, I.invoke = Rte, I.isArguments = as, I.isArray = nt, I.isArrayBuffer = Vee, I.isArrayLike = Rr, I.isArrayLikeObject = hn, I.isBoolean = qee, I.isBuffer = nl, I.isDate = Gee, I.isElement = Kee, I.isEmpty = Yee, I.isEqual = Xee, I.isEqualWith = Zee, I.isError = ak, I.isFinite = Qee, I.isFunction = ca, I.isInteger = tj, I.isLength = Wm, I.isMap = nj, I.isMatch = Jee, I.isMatchWith = ete, I.isNaN = tte, I.isNative = nte, I.isNil = ote, I.isNull = rte, I.isNumber = rj, I.isObject = tn, I.isObjectLike = cn, I.isPlainObject = If, I.isRegExp = lk, I.isSafeInteger = ite, I.isSet = oj, I.isString = Vm, I.isSymbol = Xr, I.isTypedArray = Su, I.isUndefined = ate, I.isWeakMap = lte, I.isWeakSet = ste, I.join = fJ, I.kebabCase = Zte, I.last = No, I.lastIndexOf = dJ, I.lowerCase = Qte, I.lowerFirst = Jte, I.lt = ute, I.lte = cte, I.max = Gne, I.maxBy = Kne, I.mean = Yne, I.meanBy = Xne, I.min = Zne, I.minBy = Qne, I.stubArray = hk, I.stubFalse = gk, I.stubObject = Lne, I.stubString = Dne, I.stubTrue = Fne, I.multiply = Jne, I.nth = pJ, I.noConflict = Rne, I.noop = mk, I.now = Bm, I.pad = ene, I.padEnd = tne, I.padStart = nne, I.parseInt = rne, I.random = qte, I.reduce = gee, I.reduceRight = yee, I.repeat = one, I.replace = ine, I.result = zte, I.round = ere, I.runInContext = G, I.sample = bee, I.size = See, I.snakeCase = ane, I.some = kee, I.sortedIndex = wJ, I.sortedIndexBy = xJ, I.sortedIndexOf = SJ, I.sortedLastIndex = kJ, I.sortedLastIndexBy = _J, I.sortedLastIndexOf = OJ, I.startCase = sne, I.startsWith = une, I.subtract = tre, I.sum = nre, I.sumBy = rre, I.template = cne, I.times = Mne, I.toFinite = fa, I.toInteger = it, I.toLength = aj, I.toLower = fne, I.toNumber = $o, I.toSafeInteger = fte, I.toString = Pt, I.toUpper = dne, I.trim = pne, I.trimEnd = mne, I.trimStart = hne, I.truncate = gne, I.unescape = yne, I.uniqueId = Une, I.upperCase = vne, I.upperFirst = ck, I.each = qT, I.eachRight = GT, I.first = UT, pk(I, function() {
        var u = {};
        return bi(I, function(d, y) {
          Nt.call(I.prototype, y) || (u[y] = d);
        }), u;
      }(), { chain: !1 }), I.VERSION = r, Co(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(u) {
        I[u].placeholder = I;
      }), Co(["drop", "take"], function(u, d) {
        gt.prototype[u] = function(y) {
          y = y === n ? 1 : On(it(y), 0);
          var _ = this.__filtered__ && !d ? new gt(this) : this.clone();
          return _.__filtered__ ? _.__takeCount__ = Zn(y, _.__takeCount__) : _.__views__.push({
            size: Zn(y, X),
            type: u + (_.__dir__ < 0 ? "Right" : "")
          }), _;
        }, gt.prototype[u + "Right"] = function(y) {
          return this.reverse()[u](y).reverse();
        };
      }), Co(["filter", "map", "takeWhile"], function(u, d) {
        var y = d + 1, _ = y == W || y == Q;
        gt.prototype[u] = function(T) {
          var z = this.clone();
          return z.__iteratees__.push({
            iteratee: Xe(T, 3),
            type: y
          }), z.__filtered__ = z.__filtered__ || _, z;
        };
      }), Co(["head", "last"], function(u, d) {
        var y = "take" + (d ? "Right" : "");
        gt.prototype[u] = function() {
          return this[y](1).value()[0];
        };
      }), Co(["initial", "tail"], function(u, d) {
        var y = "drop" + (d ? "" : "Right");
        gt.prototype[u] = function() {
          return this.__filtered__ ? new gt(this) : this[y](1);
        };
      }), gt.prototype.compact = function() {
        return this.filter(jr);
      }, gt.prototype.find = function(u) {
        return this.filter(u).head();
      }, gt.prototype.findLast = function(u) {
        return this.reverse().find(u);
      }, gt.prototype.invokeMap = ut(function(u, d) {
        return typeof u == "function" ? new gt(this) : this.map(function(y) {
          return Pf(y, u, d);
        });
      }), gt.prototype.reject = function(u) {
        return this.filter(Hm(Xe(u)));
      }, gt.prototype.slice = function(u, d) {
        u = it(u);
        var y = this;
        return y.__filtered__ && (u > 0 || d < 0) ? new gt(y) : (u < 0 ? y = y.takeRight(-u) : u && (y = y.drop(u)), d !== n && (d = it(d), y = d < 0 ? y.dropRight(-d) : y.take(d - u)), y);
      }, gt.prototype.takeRightWhile = function(u) {
        return this.reverse().takeWhile(u).reverse();
      }, gt.prototype.toArray = function() {
        return this.take(X);
      }, bi(gt.prototype, function(u, d) {
        var y = /^(?:filter|find|map|reject)|While$/.test(d), _ = /^(?:head|last)$/.test(d), T = I[_ ? "take" + (d == "last" ? "Right" : "") : d], z = _ || /^find/.test(d);
        T && (I.prototype[d] = function() {
          var M = this.__wrapped__, V = _ ? [1] : arguments, Z = M instanceof gt, ce = V[0], fe = Z || nt(M), me = function(mt) {
            var vt = T.apply(I, Ya([mt], V));
            return _ && Oe ? vt[0] : vt;
          };
          fe && y && typeof ce == "function" && ce.length != 1 && (Z = fe = !1);
          var Oe = this.__chain__, Be = !!this.__actions__.length, Ze = z && !Oe, st = Z && !Be;
          if (!z && fe) {
            M = st ? M : new gt(this);
            var Qe = u.apply(M, V);
            return Qe.__actions__.push({ func: Fm, args: [me], thisArg: n }), new Ro(Qe, Oe);
          }
          return Ze && st ? u.apply(this, V) : (Qe = this.thru(me), Ze ? _ ? Qe.value()[0] : Qe.value() : Qe);
        });
      }), Co(["pop", "push", "shift", "sort", "splice", "unshift"], function(u) {
        var d = fm[u], y = /^(?:push|sort|unshift)$/.test(u) ? "tap" : "thru", _ = /^(?:pop|shift)$/.test(u);
        I.prototype[u] = function() {
          var T = arguments;
          if (_ && !this.__chain__) {
            var z = this.value();
            return d.apply(nt(z) ? z : [], T);
          }
          return this[y](function(M) {
            return d.apply(nt(M) ? M : [], T);
          });
        };
      }), bi(gt.prototype, function(u, d) {
        var y = I[d];
        if (y) {
          var _ = y.name + "";
          Nt.call(yu, _) || (yu[_] = []), yu[_].push({ name: d, func: y });
        }
      }), yu[Nm(n, w).name] = [{
        name: "wrapper",
        func: n
      }], gt.prototype.clone = yZ, gt.prototype.reverse = vZ, gt.prototype.value = bZ, I.prototype.at = KJ, I.prototype.chain = YJ, I.prototype.commit = XJ, I.prototype.next = ZJ, I.prototype.plant = JJ, I.prototype.reverse = eee, I.prototype.toJSON = I.prototype.valueOf = I.prototype.value = tee, I.prototype.first = I.prototype.head, xf && (I.prototype[xf] = QJ), I;
    }, mu = XX();
    Ql ? ((Ql.exports = mu)._ = mu, dS._ = mu) : Ln._ = mu;
  }).call(Wf);
})(Ab, Ab.exports);
var Lr = Ab.exports;
function JO(e) {
  const t = {
    ...e,
    _ui: void 0
  };
  return delete t._ui, t;
}
function xA(e) {
  const t = {
    ...e,
    prompts: e.prompts.map(JO),
    _ui: void 0
  };
  return delete t._ui, t;
}
function XEe(e) {
  return {
    ...e,
    prompts: e.prompts.map((t) => ({
      ...t,
      _ui: {
        id: Lr.uniqueId()
      }
    })),
    _ui: {
      isDirty: !1
    }
  };
}
function ZEe(e) {
  const t = e.prompts.map((r) => r.name);
  let n = t.length + 1;
  for (; t.includes(`prompt_${n}`); )
    n++;
  return `prompt_${n}`;
}
function _i(e, t) {
  return e.prompts.find((n) => n._ui.id === t);
}
function QEe(e, t) {
  var n, r, o, i, a;
  const l = (n = e.metadata) != null && n.model && typeof e.metadata.model != "string" ? (r = e.metadata.model) == null ? void 0 : r.settings : void 0;
  if (l) {
    if ((l == null ? void 0 : l.stream) === !0)
      return !0;
    if ((l == null ? void 0 : l.stream) === !1)
      return !1;
  }
  const s = $c(e);
  if (s) {
    const c = (a = (i = (o = t.metadata) == null ? void 0 : o.models) == null ? void 0 : i[s]) == null ? void 0 : a.settings;
    if ((c == null ? void 0 : c.stream) === !0)
      return !0;
    if ((l == null ? void 0 : l.stream) === !1)
      return !1;
  }
}
var xW = { exports: {} }, C_, SA;
function JEe() {
  if (SA)
    return C_;
  SA = 1;
  var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
  return C_ = e, C_;
}
var P_, kA;
function eCe() {
  if (kA)
    return P_;
  kA = 1;
  var e = JEe();
  function t() {
  }
  function n() {
  }
  return n.resetWarningCache = t, P_ = function() {
    function r(a, l, s, c, p, f) {
      if (f !== e) {
        var m = new Error(
          "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
        );
        throw m.name = "Invariant Violation", m;
      }
    }
    r.isRequired = r;
    function o() {
      return r;
    }
    var i = {
      array: r,
      bigint: r,
      bool: r,
      func: r,
      number: r,
      object: r,
      string: r,
      symbol: r,
      any: r,
      arrayOf: o,
      element: r,
      elementType: r,
      instanceOf: o,
      node: r,
      objectOf: o,
      oneOf: o,
      oneOfType: o,
      shape: o,
      exact: o,
      checkPropTypes: n,
      resetWarningCache: t
    };
    return i.PropTypes = i, i;
  }, P_;
}
xW.exports = eCe()();
var tCe = xW.exports;
const Se = /* @__PURE__ */ Np(tCe);
var nCe = {
  xmlns: "http://www.w3.org/2000/svg",
  width: 24,
  height: 24,
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  strokeWidth: 2,
  strokeLinecap: "round",
  strokeLinejoin: "round"
}, rCe = Object.defineProperty, oCe = Object.defineProperties, iCe = Object.getOwnPropertyDescriptors, zb = Object.getOwnPropertySymbols, SW = Object.prototype.hasOwnProperty, kW = Object.prototype.propertyIsEnumerable, _A = (e, t, n) => t in e ? rCe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, OA = (e, t) => {
  for (var n in t || (t = {}))
    SW.call(t, n) && _A(e, n, t[n]);
  if (zb)
    for (var n of zb(t))
      kW.call(t, n) && _A(e, n, t[n]);
  return e;
}, aCe = (e, t) => oCe(e, iCe(t)), lCe = (e, t) => {
  var n = {};
  for (var r in e)
    SW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && zb)
    for (var r of zb(e))
      t.indexOf(r) < 0 && kW.call(e, r) && (n[r] = e[r]);
  return n;
}, An = (e, t, n) => {
  const r = b.forwardRef(
    (o, i) => {
      var a = o, { color: l = "currentColor", size: s = 24, stroke: c = 2, children: p } = a, f = lCe(a, ["color", "size", "stroke", "children"]);
      return b.createElement(
        "svg",
        OA(aCe(OA({
          ref: i
        }, nCe), {
          width: s,
          height: s,
          stroke: l,
          strokeWidth: c,
          className: `tabler-icon tabler-icon-${e}`
        }), f),
        [...n.map(([m, h]) => b.createElement(m, h)), ...p || []]
      );
    }
  );
  return r.propTypes = {
    color: Se.string,
    size: Se.oneOfType([Se.string, Se.number]),
    stroke: Se.oneOfType([Se.string, Se.number])
  }, r.displayName = `${t}`, r;
}, _W = An("braces-off", "IconBracesOff", [
  [
    "path",
    {
      d: "M5.176 5.177c-.113 .251 -.176 .53 -.176 .823v3c0 1.657 -.895 3 -2 3c1.105 0 2 1.343 2 3v3a2 2 0 0 0 2 2",
      key: "svg-0"
    }
  ],
  [
    "path",
    {
      d: "M17 4a2 2 0 0 1 2 2v3c0 1.657 .895 3 2 3c-1.105 0 -2 1.343 -2 3m-.176 3.821a2 2 0 0 1 -1.824 1.179",
      key: "svg-1"
    }
  ],
  ["path", { d: "M3 3l18 18", key: "svg-2" }]
]), FP = An("braces", "IconBraces", [
  [
    "path",
    {
      d: "M7 4a2 2 0 0 0 -2 2v3a2 3 0 0 1 -2 3a2 3 0 0 1 2 3v3a2 2 0 0 0 2 2",
      key: "svg-0"
    }
  ],
  [
    "path",
    {
      d: "M17 4a2 2 0 0 1 2 2v3a2 3 0 0 0 2 3a2 3 0 0 0 -2 3v3a2 2 0 0 1 -2 2",
      key: "svg-1"
    }
  ]
]), sCe = An("check", "IconCheck", [
  ["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]
]), EA = An("clear-all", "IconClearAll", [
  ["path", { d: "M8 6h12", key: "svg-0" }],
  ["path", { d: "M6 12h12", key: "svg-1" }],
  ["path", { d: "M4 18h12", key: "svg-2" }]
]), uCe = An("copy", "IconCopy", [
  [
    "path",
    {
      d: "M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",
      key: "svg-0"
    }
  ],
  [
    "path",
    {
      d: "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",
      key: "svg-1"
    }
  ]
]), cCe = An("device-floppy", "IconDeviceFloppy", [
  [
    "path",
    {
      d: "M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",
      key: "svg-0"
    }
  ],
  ["path", { d: "M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", key: "svg-1" }],
  ["path", { d: "M14 4l0 4l-6 0l0 -4", key: "svg-2" }]
]), fCe = An("dots-vertical", "IconDotsVertical", [
  ["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }],
  ["path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-1" }],
  ["path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-2" }]
]), dCe = An("download", "IconDownload", [
  ["path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2", key: "svg-0" }],
  ["path", { d: "M7 11l5 5l5 -5", key: "svg-1" }],
  ["path", { d: "M12 4l0 12", key: "svg-2" }]
]), pCe = An("edit", "IconEdit", [
  [
    "path",
    {
      d: "M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",
      key: "svg-0"
    }
  ],
  [
    "path",
    {
      d: "M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",
      key: "svg-1"
    }
  ],
  ["path", { d: "M16 5l3 3", key: "svg-2" }]
]), OW = An("help", "IconHelp", [
  ["path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }],
  ["path", { d: "M12 17l0 .01", key: "svg-1" }],
  [
    "path",
    { d: "M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4", key: "svg-2" }
  ]
]), mCe = An(
  "player-play-filled",
  "IconPlayerPlayFilled",
  [
    [
      "path",
      {
        d: "M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z",
        fill: "currentColor",
        key: "svg-0",
        strokeWidth: "0"
      }
    ]
  ]
), hCe = An("player-stop", "IconPlayerStop", [
  [
    "path",
    {
      d: "M5 5m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",
      key: "svg-0"
    }
  ]
]), MP = An("plus", "IconPlus", [
  ["path", { d: "M12 5l0 14", key: "svg-0" }],
  ["path", { d: "M5 12l14 0", key: "svg-1" }]
]), gCe = An("search", "IconSearch", [
  ["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }],
  ["path", { d: "M21 21l-6 -6", key: "svg-1" }]
]), yCe = An("share", "IconShare", [
  ["path", { d: "M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-0" }],
  ["path", { d: "M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-1" }],
  ["path", { d: "M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-2" }],
  ["path", { d: "M8.7 10.7l6.6 -3.4", key: "svg-3" }],
  ["path", { d: "M8.7 13.3l6.6 3.4", key: "svg-4" }]
]), vCe = An("text-caption", "IconTextCaption", [
  ["path", { d: "M4 15h16", key: "svg-0" }],
  [
    "path",
    {
      d: "M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",
      key: "svg-1"
    }
  ],
  ["path", { d: "M4 20h12", key: "svg-2" }]
]), vp = An("trash", "IconTrash", [
  ["path", { d: "M4 7l16 0", key: "svg-0" }],
  ["path", { d: "M10 11l0 6", key: "svg-1" }],
  ["path", { d: "M14 11l0 6", key: "svg-2" }],
  [
    "path",
    { d: "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12", key: "svg-3" }
  ],
  ["path", { d: "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3", key: "svg-4" }]
]), EW = An("x", "IconX", [
  ["path", { d: "M18 6l-12 12", key: "svg-0" }],
  ["path", { d: "M6 6l12 12", key: "svg-1" }]
]);
const kn = b.createContext({
  getState: () => ({ prompts: [], _ui: { isDirty: !1 } }),
  readOnly: !1
});
function CA(e) {
  return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e);
}
const bCe = b.memo(function(e) {
  const { initialItemValue: t, removeParameter: n, onUpdateParameter: r } = e, { readOnly: o } = b.useContext(kn), [i, a] = b.useState(
    (t == null ? void 0 : t.parameterName) ?? ""
  ), [l, s] = b.useState(i), c = t == null ? void 0 : t.parameterValue, [p, f] = b.useState(
    typeof c == "string" ? c : JSON.stringify(c)
  ), m = b.useMemo(
    () => Lr.debounce((g, v) => {
      CA(g) && (r({
        oldParameterName: l,
        parameterName: g,
        parameterValue: v
      }), s(g));
    }, 250),
    [l, r]
  ), h = Yn().colorScheme === "dark" ? "1px solid #2C2E33" : "1px solid #e9ecef";
  return /* @__PURE__ */ $.jsx(As, { children: /* @__PURE__ */ $.jsxs(ui, { p: "xs", spacing: "xs", style: { flexGrow: 1, borderBottom: h }, children: [
    /* @__PURE__ */ $.jsx(
      lf,
      {
        placeholder: "Enter parameter name",
        disabled: o,
        error: i && !CA(i) ? "Name must contain only letters, numbers, and underscores" : null,
        radius: "md",
        size: "xs",
        value: i,
        onChange: (g) => {
          a(g.target.value), g.target.value && m(
            g.target.value,
            p
          );
        }
      }
    ),
    /* @__PURE__ */ $.jsx(
      Bl,
      {
        placeholder: "Enter parameter value",
        disabled: o,
        radius: "md",
        value: p,
        autosize: !0,
        size: "xs",
        maxRows: 5,
        onChange: (g) => {
          f(g.target.value), m(i, g.target.value);
        }
      }
    ),
    !o && /* @__PURE__ */ $.jsx(jn, { onClick: () => n(i), children: /* @__PURE__ */ $.jsx(vp, { size: 16, color: "red" }) })
  ] }) });
});
function R_(e) {
  const t = {};
  for (const n of e ?? []) {
    const r = n.parameterName, o = n.parameterValue;
    t[r] = o;
  }
  return t;
}
const CW = b.memo(function(e) {
  const { initialValue: t, onUpdateParameters: n } = e, { readOnly: r } = b.useContext(kn), [o, i] = b.useState(
    t && Object.keys(t).length > 0 ? Object.keys(t).map((s) => ({
      key: s,
      parameterName: s,
      parameterValue: t[s]
    })) : [
      {
        key: Lr.uniqueId(),
        parameterName: "",
        parameterValue: ""
      }
    ]
  ), a = b.useCallback(
    async (s, c) => {
      i((p) => {
        const f = p.filter((m) => m.key !== s);
        return n(R_(f)), f;
      });
    },
    [i, n]
  ), l = b.useCallback(async () => {
    i((s) => {
      const c = [
        ...s,
        {
          key: Lr.uniqueId(),
          parameterName: "",
          parameterValue: ""
        }
      ];
      return n(R_(c)), c;
    });
  }, [n]);
  return /* @__PURE__ */ $.jsxs("div", { children: [
    /* @__PURE__ */ $.jsxs(
      "div",
      {
        style: {
          maxHeight: e.maxHeight,
          overflow: "auto",
          width: "100%"
        },
        children: [
          e.customDescription ?? /* @__PURE__ */ $.jsxs(
            Ft,
            {
              color: "dimmed",
              size: "sm",
              p: "xs",
              style: { display: "block", margin: "0 auto" },
              children: [
                "Use parameters in your prompt or system prompt with",
                " ",
                "{{parameter}}"
              ]
            }
          ),
          /* @__PURE__ */ $.jsx(ui, { children: o.map((s, c) => /* @__PURE__ */ $.jsx(
            bCe,
            {
              onUpdateParameter: ({ parameterName: p, parameterValue: f }) => {
                i((m) => {
                  const h = [...m], g = h[c];
                  return g.parameterName = p, g.parameterValue = f ?? "", n(
                    R_(h)
                  ), h;
                });
              },
              removeParameter: (p) => a(s.key, p),
              initialItemValue: {
                parameterName: s.parameterName,
                parameterValue: s.parameterValue
              }
            },
            s.key
          )) })
        ]
      }
    ),
    r ? null : /* @__PURE__ */ $.jsx(fr, { label: "Add parameter", children: /* @__PURE__ */ $.jsx(jn, { onClick: l, className: "addParameterButton", children: /* @__PURE__ */ $.jsx(MP, { size: 16 }) }) })
  ] });
}), wCe = 15 * 1e3, Mu = 300, BP = 36, xCe = 5 * 1e3, SCe = Ee(() => ({
  parametersContainer: {
    margin: `16px auto 16px ${BP}px`
  },
  parametersContainerReadonly: {
    margin: "16px auto"
  }
})), kCe = b.memo(function({
  initialValue: e,
  onUpdateParameters: t
}) {
  const [n, r] = b.useState(!1), { classes: o } = SCe(), { readOnly: i } = b.useContext(kn);
  return (
    // Set local and global classname. Global will override if specified
    // Local is readonly or not. Global will always have parametersContainer class
    // and if readonly, will also have parametersContainerReadonly class (to allow overrides)
    /* @__PURE__ */ $.jsx(
      "div",
      {
        className: `${i ? o.parametersContainerReadonly : o.parametersContainer} parametersContainer ${i ? "parametersContainerReadonly" : ""}`,
        children: /* @__PURE__ */ $.jsx(
          xl,
          {
            styles: {
              item: { borderBottom: 0 },
              label: {
                textAlign: "center",
                paddingTop: "0.5em",
                paddingBottom: "0.5em",
                fontSize: "0.85em"
              }
            },
            onChange: (a) => r(a === "parameters"),
            children: /* @__PURE__ */ $.jsxs(xl.Item, { value: "parameters", children: [
              /* @__PURE__ */ $.jsx(xl.Control, { children: /* @__PURE__ */ $.jsxs(Ft, { color: "blue", children: [
                "Global Parameters ",
                "{}"
              ] }) }),
              /* @__PURE__ */ $.jsx(xl.Panel, { children: n && /* @__PURE__ */ $.jsx(
                CW,
                {
                  initialValue: e,
                  onUpdateParameters: t,
                  maxHeight: "300px"
                }
              ) })
            ] })
          }
        )
      }
    )
  );
});
/**
 * Prism: Lightweight, robust, elegant syntax highlighting
 *
 * @license MIT <https://opensource.org/licenses/MIT>
 * @author Lea Verou <https://lea.verou.me>
 * @namespace
 * @public
 */
var eE = function() {
  var e = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, t = 0, n = {}, r = {
    /**
     * A namespace for utility methods.
     *
     * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
     * change or disappear at any time.
     *
     * @namespace
     * @memberof Prism
     */
    util: {
      encode: function f(m) {
        return m instanceof o ? new o(m.type, f(m.content), m.alias) : Array.isArray(m) ? m.map(f) : m.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
      },
      /**
       * Returns the name of the type of the given value.
       *
       * @param {any} o
       * @returns {string}
       * @example
       * type(null)      === 'Null'
       * type(undefined) === 'Undefined'
       * type(123)       === 'Number'
       * type('foo')     === 'String'
       * type(true)      === 'Boolean'
       * type([1, 2])    === 'Array'
       * type({})        === 'Object'
       * type(String)    === 'Function'
       * type(/abc+/)    === 'RegExp'
       */
      type: function(f) {
        return Object.prototype.toString.call(f).slice(8, -1);
      },
      /**
       * Returns a unique number for the given object. Later calls will still return the same number.
       *
       * @param {Object} obj
       * @returns {number}
       */
      objId: function(f) {
        return f.__id || Object.defineProperty(f, "__id", { value: ++t }), f.__id;
      },
      /**
       * Creates a deep clone of the given object.
       *
       * The main intended use of this function is to clone language definitions.
       *
       * @param {T} o
       * @param {Record<number, any>} [visited]
       * @returns {T}
       * @template T
       */
      clone: function f(m, h) {
        h = h || {};
        var g, v;
        switch (r.util.type(m)) {
          case "Object":
            if (v = r.util.objId(m), h[v])
              return h[v];
            g = /** @type {Record<string, any>} */
            {}, h[v] = g;
            for (var S in m)
              m.hasOwnProperty(S) && (g[S] = f(m[S], h));
            return (
              /** @type {any} */
              g
            );
          case "Array":
            return v = r.util.objId(m), h[v] ? h[v] : (g = [], h[v] = g, /** @type {Array} */
            /** @type {any} */
            m.forEach(function(w, x) {
              g[x] = f(w, h);
            }), /** @type {any} */
            g);
          default:
            return m;
        }
      },
      /**
       * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
       *
       * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
       *
       * @param {Element} element
       * @returns {string}
       */
      getLanguage: function(f) {
        for (; f; ) {
          var m = e.exec(f.className);
          if (m)
            return m[1].toLowerCase();
          f = f.parentElement;
        }
        return "none";
      },
      /**
       * Sets the Prism `language-xxxx` class of the given element.
       *
       * @param {Element} element
       * @param {string} language
       * @returns {void}
       */
      setLanguage: function(f, m) {
        f.className = f.className.replace(RegExp(e, "gi"), ""), f.classList.add("language-" + m);
      },
      /**
       * Returns whether a given class is active for `element`.
       *
       * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
       * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
       * given class is just the given class with a `no-` prefix.
       *
       * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
       * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
       * ancestors have the given class or the negated version of it, then the default activation will be returned.
       *
       * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
       * version of it, the class is considered active.
       *
       * @param {Element} element
       * @param {string} className
       * @param {boolean} [defaultActivation=false]
       * @returns {boolean}
       */
      isActive: function(f, m, h) {
        for (var g = "no-" + m; f; ) {
          var v = f.classList;
          if (v.contains(m))
            return !0;
          if (v.contains(g))
            return !1;
          f = f.parentElement;
        }
        return !!h;
      }
    },
    /**
     * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
     *
     * @namespace
     * @memberof Prism
     * @public
     */
    languages: {
      /**
       * The grammar for plain, unformatted text.
       */
      plain: n,
      plaintext: n,
      text: n,
      txt: n,
      /**
       * Creates a deep copy of the language with the given id and appends the given tokens.
       *
       * If a token in `redef` also appears in the copied language, then the existing token in the copied language
       * will be overwritten at its original position.
       *
       * ## Best practices
       *
       * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
       * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
       * understand the language definition because, normally, the order of tokens matters in Prism grammars.
       *
       * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
       * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
       *
       * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
       * @param {Grammar} redef The new tokens to append.
       * @returns {Grammar} The new language created.
       * @public
       * @example
       * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
       *     // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
       *     // at its original position
       *     'comment': { ... },
       *     // CSS doesn't have a 'color' token, so this token will be appended
       *     'color': /\b(?:red|green|blue)\b/
       * });
       */
      extend: function(f, m) {
        var h = r.util.clone(r.languages[f]);
        for (var g in m)
          h[g] = m[g];
        return h;
      },
      /**
       * Inserts tokens _before_ another token in a language definition or any other grammar.
       *
       * ## Usage
       *
       * This helper method makes it easy to modify existing languages. For example, the CSS language definition
       * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
       * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
       * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
       * this:
       *
       * ```js
       * Prism.languages.markup.style = {
       *     // token
       * };
       * ```
       *
       * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
       * before existing tokens. For the CSS example above, you would use it like this:
       *
       * ```js
       * Prism.languages.insertBefore('markup', 'cdata', {
       *     'style': {
       *         // token
       *     }
       * });
       * ```
       *
       * ## Special cases
       *
       * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
       * will be ignored.
       *
       * This behavior can be used to insert tokens after `before`:
       *
       * ```js
       * Prism.languages.insertBefore('markup', 'comment', {
       *     'comment': Prism.languages.markup.comment,
       *     // tokens after 'comment'
       * });
       * ```
       *
       * ## Limitations
       *
       * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
       * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
       * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
       * deleting properties which is necessary to insert at arbitrary positions.
       *
       * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
       * Instead, it will create a new object and replace all references to the target object with the new one. This
       * can be done without temporarily deleting properties, so the iteration order is well-defined.
       *
       * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
       * you hold the target object in a variable, then the value of the variable will not change.
       *
       * ```js
       * var oldMarkup = Prism.languages.markup;
       * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
       *
       * assert(oldMarkup !== Prism.languages.markup);
       * assert(newMarkup === Prism.languages.markup);
       * ```
       *
       * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
       * object to be modified.
       * @param {string} before The key to insert before.
       * @param {Grammar} insert An object containing the key-value pairs to be inserted.
       * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
       * object to be modified.
       *
       * Defaults to `Prism.languages`.
       * @returns {Grammar} The new grammar object.
       * @public
       */
      insertBefore: function(f, m, h, g) {
        g = g || /** @type {any} */
        r.languages;
        var v = g[f], S = {};
        for (var w in v)
          if (v.hasOwnProperty(w)) {
            if (w == m)
              for (var x in h)
                h.hasOwnProperty(x) && (S[x] = h[x]);
            h.hasOwnProperty(w) || (S[w] = v[w]);
          }
        var k = g[f];
        return g[f] = S, r.languages.DFS(r.languages, function(E, O) {
          O === k && E != f && (this[E] = S);
        }), S;
      },
      // Traverse a language definition with Depth First Search
      DFS: function f(m, h, g, v) {
        v = v || {};
        var S = r.util.objId;
        for (var w in m)
          if (m.hasOwnProperty(w)) {
            h.call(m, w, m[w], g || w);
            var x = m[w], k = r.util.type(x);
            k === "Object" && !v[S(x)] ? (v[S(x)] = !0, f(x, h, null, v)) : k === "Array" && !v[S(x)] && (v[S(x)] = !0, f(x, h, w, v));
          }
      }
    },
    plugins: {},
    /**
     * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
     * and the language definitions to use, and returns a string with the HTML produced.
     *
     * The following hooks will be run:
     * 1. `before-tokenize`
     * 2. `after-tokenize`
     * 3. `wrap`: On each {@link Token}.
     *
     * @param {string} text A string with the code to be highlighted.
     * @param {Grammar} grammar An object containing the tokens to use.
     *
     * Usually a language definition like `Prism.languages.markup`.
     * @param {string} language The name of the language definition passed to `grammar`.
     * @returns {string} The highlighted HTML.
     * @memberof Prism
     * @public
     * @example
     * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
     */
    highlight: function(f, m, h) {
      var g = {
        code: f,
        grammar: m,
        language: h
      };
      return r.hooks.run("before-tokenize", g), g.tokens = r.tokenize(g.code, g.grammar), r.hooks.run("after-tokenize", g), o.stringify(r.util.encode(g.tokens), g.language);
    },
    /**
     * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
     * and the language definitions to use, and returns an array with the tokenized code.
     *
     * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
     *
     * This method could be useful in other contexts as well, as a very crude parser.
     *
     * @param {string} text A string with the code to be highlighted.
     * @param {Grammar} grammar An object containing the tokens to use.
     *
     * Usually a language definition like `Prism.languages.markup`.
     * @returns {TokenStream} An array of strings and tokens, a token stream.
     * @memberof Prism
     * @public
     * @example
     * let code = `var foo = 0;`;
     * let tokens = Prism.tokenize(code, Prism.languages.javascript);
     * tokens.forEach(token => {
     *     if (token instanceof Prism.Token && token.type === 'number') {
     *         console.log(`Found numeric literal: ${token.content}`);
     *     }
     * });
     */
    tokenize: function(f, m) {
      var h = m.rest;
      if (h) {
        for (var g in h)
          m[g] = h[g];
        delete m.rest;
      }
      var v = new l();
      return s(v, v.head, f), a(f, v, m, v.head, 0), p(v);
    },
    /**
     * @namespace
     * @memberof Prism
     * @public
     */
    hooks: {
      all: {},
      /**
       * Adds the given callback to the list of callbacks for the given hook.
       *
       * The callback will be invoked when the hook it is registered for is run.
       * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
       *
       * One callback function can be registered to multiple hooks and the same hook multiple times.
       *
       * @param {string} name The name of the hook.
       * @param {HookCallback} callback The callback function which is given environment variables.
       * @public
       */
      add: function(f, m) {
        var h = r.hooks.all;
        h[f] = h[f] || [], h[f].push(m);
      },
      /**
       * Runs a hook invoking all registered callbacks with the given environment variables.
       *
       * Callbacks will be invoked synchronously and in the order in which they were registered.
       *
       * @param {string} name The name of the hook.
       * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
       * @public
       */
      run: function(f, m) {
        var h = r.hooks.all[f];
        if (!(!h || !h.length))
          for (var g = 0, v; v = h[g++]; )
            v(m);
      }
    },
    Token: o
  };
  function o(f, m, h, g) {
    this.type = f, this.content = m, this.alias = h, this.length = (g || "").length | 0;
  }
  o.stringify = function f(m, h) {
    if (typeof m == "string")
      return m;
    if (Array.isArray(m)) {
      var g = "";
      return m.forEach(function(k) {
        g += f(k, h);
      }), g;
    }
    var v = {
      type: m.type,
      content: f(m.content, h),
      tag: "span",
      classes: ["token", m.type],
      attributes: {},
      language: h
    }, S = m.alias;
    S && (Array.isArray(S) ? Array.prototype.push.apply(v.classes, S) : v.classes.push(S)), r.hooks.run("wrap", v);
    var w = "";
    for (var x in v.attributes)
      w += " " + x + '="' + (v.attributes[x] || "").replace(/"/g, "&quot;") + '"';
    return "<" + v.tag + ' class="' + v.classes.join(" ") + '"' + w + ">" + v.content + "</" + v.tag + ">";
  };
  function i(f, m, h, g) {
    f.lastIndex = m;
    var v = f.exec(h);
    if (v && g && v[1]) {
      var S = v[1].length;
      v.index += S, v[0] = v[0].slice(S);
    }
    return v;
  }
  function a(f, m, h, g, v, S) {
    for (var w in h)
      if (!(!h.hasOwnProperty(w) || !h[w])) {
        var x = h[w];
        x = Array.isArray(x) ? x : [x];
        for (var k = 0; k < x.length; ++k) {
          if (S && S.cause == w + "," + k)
            return;
          var E = x[k], O = E.inside, C = !!E.lookbehind, R = !!E.greedy, L = E.alias;
          if (R && !E.pattern.global) {
            var D = E.pattern.toString().match(/[imsuy]*$/)[0];
            E.pattern = RegExp(E.pattern.source, D + "g");
          }
          for (var N = E.pattern || E, H = g.next, B = v; H !== m.tail && !(S && B >= S.reach); B += H.value.length, H = H.next) {
            var K = H.value;
            if (m.length > f.length)
              return;
            if (!(K instanceof o)) {
              var W = 1, U;
              if (R) {
                if (U = i(N, B, f, C), !U || U.index >= f.length)
                  break;
                var ee = U.index, Q = U.index + U[0].length, J = B;
                for (J += H.value.length; ee >= J; )
                  H = H.next, J += H.value.length;
                if (J -= H.value.length, B = J, H.value instanceof o)
                  continue;
                for (var q = H; q !== m.tail && (J < Q || typeof q.value == "string"); q = q.next)
                  W++, J += q.value.length;
                W--, K = f.slice(B, J), U.index -= B;
              } else if (U = i(N, 0, K, C), !U)
                continue;
              var ee = U.index, A = U[0], X = K.slice(0, ee), ie = K.slice(ee + A.length), j = B + K.length;
              S && j > S.reach && (S.reach = j);
              var le = H.prev;
              X && (le = s(m, le, X), B += X.length), c(m, le, W);
              var re = new o(w, O ? r.tokenize(A, O) : A, L, A);
              if (H = s(m, le, re), ie && s(m, H, ie), W > 1) {
                var he = {
                  cause: w + "," + k,
                  reach: j
                };
                a(f, m, h, H.prev, B, he), S && he.reach > S.reach && (S.reach = he.reach);
              }
            }
          }
        }
      }
  }
  function l() {
    var f = { value: null, prev: null, next: null }, m = { value: null, prev: f, next: null };
    f.next = m, this.head = f, this.tail = m, this.length = 0;
  }
  function s(f, m, h) {
    var g = m.next, v = { value: h, prev: m, next: g };
    return m.next = v, g.prev = v, f.length++, v;
  }
  function c(f, m, h) {
    for (var g = m.next, v = 0; v < h && g !== f.tail; v++)
      g = g.next;
    m.next = g, g.prev = m, f.length -= v;
  }
  function p(f) {
    for (var m = [], h = f.head.next; h !== f.tail; )
      m.push(h.value), h = h.next;
    return m;
  }
  return r;
}(), de = eE;
eE.default = eE;
de.languages.markup = {
  comment: {
    pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
    greedy: !0
  },
  prolog: {
    pattern: /<\?[\s\S]+?\?>/,
    greedy: !0
  },
  doctype: {
    // https://www.w3.org/TR/xml/#NT-doctypedecl
    pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
    greedy: !0,
    inside: {
      "internal-subset": {
        pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
        lookbehind: !0,
        greedy: !0,
        inside: null
        // see below
      },
      string: {
        pattern: /"[^"]*"|'[^']*'/,
        greedy: !0
      },
      punctuation: /^<!|>$|[[\]]/,
      "doctype-tag": /^DOCTYPE/i,
      name: /[^\s<>'"]+/
    }
  },
  cdata: {
    pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
    greedy: !0
  },
  tag: {
    pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
    greedy: !0,
    inside: {
      tag: {
        pattern: /^<\/?[^\s>\/]+/,
        inside: {
          punctuation: /^<\/?/,
          namespace: /^[^\s>\/:]+:/
        }
      },
      "special-attr": [],
      "attr-value": {
        pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
        inside: {
          punctuation: [{
            pattern: /^=/,
            alias: "attr-equals"
          }, /"|'/]
        }
      },
      punctuation: /\/?>/,
      "attr-name": {
        pattern: /[^\s>\/]+/,
        inside: {
          namespace: /^[^\s>\/:]+:/
        }
      }
    }
  },
  entity: [{
    pattern: /&[\da-z]{1,8};/i,
    alias: "named-entity"
  }, /&#x?[\da-f]{1,8};/i]
};
de.languages.markup.tag.inside["attr-value"].inside.entity = de.languages.markup.entity;
de.languages.markup.doctype.inside["internal-subset"].inside = de.languages.markup;
de.hooks.add("wrap", function(e) {
  e.type === "entity" && (e.attributes.title = e.content.replace(/&amp;/, "&"));
});
Object.defineProperty(de.languages.markup.tag, "addInlined", {
  /**
   * Adds an inlined language to markup.
   *
   * An example of an inlined language is CSS with `<style>` tags.
   *
   * @param {string} tagName The name of the tag that contains the inlined language. This name will be treated as
   * case insensitive.
   * @param {string} lang The language key.
   * @example
   * addInlined('style', 'css');
   */
  value: function(e, t) {
    var n = {};
    n["language-" + t] = {
      pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
      lookbehind: !0,
      inside: de.languages[t]
    }, n.cdata = /^<!\[CDATA\[|\]\]>$/i;
    var r = {
      "included-cdata": {
        pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
        inside: n
      }
    };
    r["language-" + t] = {
      pattern: /[\s\S]+/,
      inside: de.languages[t]
    };
    var o = {};
    o[e] = {
      pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
        return e;
      }), "i"),
      lookbehind: !0,
      greedy: !0,
      inside: r
    }, de.languages.insertBefore("markup", "cdata", o);
  }
});
Object.defineProperty(de.languages.markup.tag, "addAttribute", {
  /**
   * Adds an pattern to highlight languages embedded in HTML attributes.
   *
   * An example of an inlined language is CSS with `style` attributes.
   *
   * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as
   * case insensitive.
   * @param {string} lang The language key.
   * @example
   * addAttribute('style', 'css');
   */
  value: function(e, t) {
    de.languages.markup.tag.inside["special-attr"].push({
      pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"),
      lookbehind: !0,
      inside: {
        "attr-name": /^[^\s=]+/,
        "attr-value": {
          pattern: /=[\s\S]+/,
          inside: {
            value: {
              pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
              lookbehind: !0,
              alias: [t, "language-" + t],
              inside: de.languages[t]
            },
            punctuation: [{
              pattern: /^=/,
              alias: "attr-equals"
            }, /"|'/]
          }
        }
      }
    });
  }
});
de.languages.html = de.languages.markup;
de.languages.mathml = de.languages.markup;
de.languages.svg = de.languages.markup;
de.languages.xml = de.languages.extend("markup", {});
de.languages.ssml = de.languages.xml;
de.languages.atom = de.languages.xml;
de.languages.rss = de.languages.xml;
(function(e) {
  var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
    pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
    lookbehind: !0,
    alias: "punctuation",
    // this looks reasonably well in all themes
    inside: null
    // see below
  }, r = {
    bash: n,
    environment: {
      pattern: RegExp("\\$" + t),
      alias: "constant"
    },
    variable: [
      // [0]: Arithmetic Environment
      {
        pattern: /\$?\(\([\s\S]+?\)\)/,
        greedy: !0,
        inside: {
          // If there is a $ sign at the beginning highlight $(( and )) as variable
          variable: [{
            pattern: /(^\$\(\([\s\S]+)\)\)/,
            lookbehind: !0
          }, /^\$\(\(/],
          number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
          // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
          operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
          // If there is no $ sign at the beginning highlight (( and )) as punctuation
          punctuation: /\(\(?|\)\)?|,|;/
        }
      },
      // [1]: Command Substitution
      {
        pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
        greedy: !0,
        inside: {
          variable: /^\$\(|^`|\)$|`$/
        }
      },
      // [2]: Brace expansion
      {
        pattern: /\$\{[^}]+\}/,
        greedy: !0,
        inside: {
          operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
          punctuation: /[\[\]]/,
          environment: {
            pattern: RegExp("(\\{)" + t),
            lookbehind: !0,
            alias: "constant"
          }
        }
      },
      /\$(?:\w+|[#?*!@$])/
    ],
    // Escape sequences from echo and printf's manuals, and escaped quotes.
    entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
  };
  e.languages.bash = {
    shebang: {
      pattern: /^#!\s*\/.*/,
      alias: "important"
    },
    comment: {
      pattern: /(^|[^"{\\$])#.*/,
      lookbehind: !0
    },
    "function-name": [
      // a) function foo {
      // b) foo() {
      // c) function foo() {
      // but not “foo {”
      {
        // a) and c)
        pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
        lookbehind: !0,
        alias: "function"
      },
      {
        // b)
        pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
        alias: "function"
      }
    ],
    // Highlight variable names as variables in for and select beginnings.
    "for-or-select": {
      pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
      alias: "variable",
      lookbehind: !0
    },
    // Highlight variable names as variables in the left-hand part
    // of assignments (“=” and “+=”).
    "assign-left": {
      pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,
      inside: {
        environment: {
          pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t),
          lookbehind: !0,
          alias: "constant"
        }
      },
      alias: "variable",
      lookbehind: !0
    },
    string: [
      // Support for Here-documents https://en.wikipedia.org/wiki/Here_document
      {
        pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
        lookbehind: !0,
        greedy: !0,
        inside: r
      },
      // Here-document with quotes around the tag
      // → No expansion (so no “inside”).
      {
        pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
        lookbehind: !0,
        greedy: !0,
        inside: {
          bash: n
        }
      },
      // “Normal” string
      {
        // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
        pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
        lookbehind: !0,
        greedy: !0,
        inside: r
      },
      {
        // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
        pattern: /(^|[^$\\])'[^']*'/,
        lookbehind: !0,
        greedy: !0
      },
      {
        // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
        pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
        greedy: !0,
        inside: {
          entity: r.entity
        }
      }
    ],
    environment: {
      pattern: RegExp("\\$?" + t),
      alias: "constant"
    },
    variable: r.variable,
    function: {
      pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    keyword: {
      pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
    builtin: {
      pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
      lookbehind: !0,
      // Alias added to make those easier to distinguish from strings.
      alias: "class-name"
    },
    boolean: {
      pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
      lookbehind: !0
    },
    "file-descriptor": {
      pattern: /\B&\d\b/,
      alias: "important"
    },
    operator: {
      // Lots of redirections here, but not just that.
      pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
      inside: {
        "file-descriptor": {
          pattern: /^\d/,
          alias: "important"
        }
      }
    },
    punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
    number: {
      pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
      lookbehind: !0
    }
  }, n.inside = e.languages.bash;
  for (var o = ["comment", "function-name", "for-or-select", "assign-left", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], i = r.variable[1].inside, a = 0; a < o.length; a++)
    i[o[a]] = e.languages.bash[o[a]];
  e.languages.shell = e.languages.bash;
})(de);
de.languages.clike = {
  comment: [{
    pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
    lookbehind: !0,
    greedy: !0
  }, {
    pattern: /(^|[^\\:])\/\/.*/,
    lookbehind: !0,
    greedy: !0
  }],
  string: {
    pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
    greedy: !0
  },
  "class-name": {
    pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
    lookbehind: !0,
    inside: {
      punctuation: /[.\\]/
    }
  },
  keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
  boolean: /\b(?:false|true)\b/,
  function: /\b\w+(?=\()/,
  number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
  operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
  punctuation: /[{}[\];(),.:]/
};
de.languages.c = de.languages.extend("clike", {
  comment: {
    pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
    greedy: !0
  },
  string: {
    // https://en.cppreference.com/w/c/language/string_literal
    pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
    greedy: !0
  },
  "class-name": {
    pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
    lookbehind: !0
  },
  keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
  function: /\b[a-z_]\w*(?=\s*\()/i,
  number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
  operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
});
de.languages.insertBefore("c", "string", {
  char: {
    // https://en.cppreference.com/w/c/language/character_constant
    pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
    greedy: !0
  }
});
de.languages.insertBefore("c", "string", {
  macro: {
    // allow for multiline macro definitions
    // spaces after the # character compile fine with gcc
    pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
    lookbehind: !0,
    greedy: !0,
    alias: "property",
    inside: {
      string: [{
        // highlight the path of the include statement as a string
        pattern: /^(#\s*include\s*)<[^>]+>/,
        lookbehind: !0
      }, de.languages.c.string],
      char: de.languages.c.char,
      comment: de.languages.c.comment,
      "macro-name": [{
        pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
        lookbehind: !0
      }, {
        pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
        lookbehind: !0,
        alias: "function"
      }],
      // highlight macro directives as keywords
      directive: {
        pattern: /^(#\s*)[a-z]+/,
        lookbehind: !0,
        alias: "keyword"
      },
      "directive-hash": /^#/,
      punctuation: /##|\\(?=[\r\n])/,
      expression: {
        pattern: /\S[\s\S]*/,
        inside: de.languages.c
      }
    }
  }
});
de.languages.insertBefore("c", "function", {
  // highlight predefined macros as constants
  constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
});
delete de.languages.c.boolean;
(function(e) {
  var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, n = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
    return t.source;
  });
  e.languages.cpp = e.languages.extend("c", {
    "class-name": [
      {
        pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
          return t.source;
        })),
        lookbehind: !0
      },
      // This is intended to capture the class name of method implementations like:
      //   void foo::bar() const {}
      // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
      // it starts with an uppercase letter. This approximation should give decent results.
      /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
      // This will capture the class name before destructors like:
      //   Foo::~Foo() {}
      /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
      // This also intends to capture the class name of method implementations but here the class has template
      // parameters, so it can't be a namespace (until C++ adds generic namespaces).
      /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
    ],
    keyword: t,
    number: {
      pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
      greedy: !0
    },
    operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
    boolean: /\b(?:false|true)\b/
  }), e.languages.insertBefore("cpp", "string", {
    module: {
      // https://en.cppreference.com/w/cpp/language/modules
      pattern: RegExp(/(\b(?:import|module)\s+)/.source + "(?:" + // header-name
      /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + // module name or partition or both
      /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
        return n;
      }) + ")"),
      lookbehind: !0,
      greedy: !0,
      inside: {
        string: /^[<"][\s\S]+/,
        operator: /:/,
        punctuation: /\./
      }
    },
    "raw-string": {
      pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
      alias: "string",
      greedy: !0
    }
  }), e.languages.insertBefore("cpp", "keyword", {
    "generic-function": {
      pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
      inside: {
        function: /^\w+/,
        generic: {
          pattern: /<[\s\S]+/,
          alias: "class-name",
          inside: e.languages.cpp
        }
      }
    }
  }), e.languages.insertBefore("cpp", "operator", {
    "double-colon": {
      pattern: /::/,
      alias: "punctuation"
    }
  }), e.languages.insertBefore("cpp", "class-name", {
    // the base clause is an optional list of parent classes
    // https://en.cppreference.com/w/cpp/language/class
    "base-clause": {
      pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
      lookbehind: !0,
      greedy: !0,
      inside: e.languages.extend("cpp", {})
    }
  }), e.languages.insertBefore("inside", "double-colon", {
    // All untokenized words that are not namespaces should be class names
    "class-name": /\b[a-z_]\w*\b(?!\s*::)/i
  }, e.languages.cpp["base-clause"]);
})(de);
(function(e) {
  var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
  e.languages.css = {
    comment: /\/\*[\s\S]*?\*\//,
    atrule: {
      pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,
      inside: {
        rule: /^@[\w-]+/,
        "selector-function-argument": {
          pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
          lookbehind: !0,
          alias: "selector"
        },
        keyword: {
          pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
          lookbehind: !0
        }
        // See rest below
      }
    },
    url: {
      // https://drafts.csswg.org/css-values-3/#urls
      pattern: RegExp("\\burl\\((?:" + t.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
      greedy: !0,
      inside: {
        function: /^url/i,
        punctuation: /^\(|\)$/,
        string: {
          pattern: RegExp("^" + t.source + "$"),
          alias: "url"
        }
      }
    },
    selector: {
      pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + t.source + ")*(?=\\s*\\{)"),
      lookbehind: !0
    },
    string: {
      pattern: t,
      greedy: !0
    },
    property: {
      pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
      lookbehind: !0
    },
    important: /!important\b/i,
    function: {
      pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
      lookbehind: !0
    },
    punctuation: /[(){};:,]/
  }, e.languages.css.atrule.inside.rest = e.languages.css;
  var n = e.languages.markup;
  n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
})(de);
(function(e) {
  var t = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, n;
  e.languages.css.selector = {
    pattern: e.languages.css.selector.pattern,
    lookbehind: !0,
    inside: n = {
      "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
      "pseudo-class": /:[-\w]+/,
      class: /\.[-\w]+/,
      id: /#[-\w]+/,
      attribute: {
        pattern: RegExp(`\\[(?:[^[\\]"']|` + t.source + ")*\\]"),
        greedy: !0,
        inside: {
          punctuation: /^\[|\]$/,
          "case-sensitivity": {
            pattern: /(\s)[si]$/i,
            lookbehind: !0,
            alias: "keyword"
          },
          namespace: {
            pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,
            lookbehind: !0,
            inside: {
              punctuation: /\|$/
            }
          },
          "attr-name": {
            pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,
            lookbehind: !0
          },
          "attr-value": [t, {
            pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,
            lookbehind: !0
          }],
          operator: /[|~*^$]?=/
        }
      },
      "n-th": [{
        pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,
        lookbehind: !0,
        inside: {
          number: /[\dn]+/,
          operator: /[+-]/
        }
      }, {
        pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i,
        lookbehind: !0
      }],
      combinator: />|\+|~|\|\|/,
      // the `tag` token has been existed and removed.
      // because we can't find a perfect tokenize to match it.
      // if you want to add it, please read https://github.com/PrismJS/prism/pull/2373 first.
      punctuation: /[(),]/
    }
  }, e.languages.css.atrule.inside["selector-function-argument"].inside = n, e.languages.insertBefore("css", "property", {
    variable: {
      pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,
      lookbehind: !0
    }
  });
  var r = {
    pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
    lookbehind: !0
  }, o = {
    pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
    lookbehind: !0
  };
  e.languages.insertBefore("css", "function", {
    operator: {
      pattern: /(\s)[+\-*\/](?=\s)/,
      lookbehind: !0
    },
    // CAREFUL!
    // Previewers and Inline color use hexcode and color.
    hexcode: {
      pattern: /\B#[\da-f]{3,8}\b/i,
      alias: "color"
    },
    color: [{
      pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
      lookbehind: !0
    }, {
      pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
      inside: {
        unit: r,
        number: o,
        function: /[\w-]+(?=\()/,
        punctuation: /[(),]/
      }
    }],
    // it's important that there is no boundary assertion after the hex digits
    entity: /\\[\da-f]{1,8}/i,
    unit: r,
    number: o
  });
})(de);
de.languages.javascript = de.languages.extend("clike", {
  "class-name": [de.languages.clike["class-name"], {
    pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
    lookbehind: !0
  }],
  keyword: [{
    pattern: /((?:^|\})\s*)catch\b/,
    lookbehind: !0
  }, {
    pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
    lookbehind: !0
  }],
  // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
  function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
  number: {
    pattern: RegExp(/(^|[^\w$])/.source + "(?:" + // constant
    (/NaN|Infinity/.source + "|" + // binary integer
    /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
    /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
    /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
    /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
    /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source),
    lookbehind: !0
  },
  operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
});
de.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
de.languages.insertBefore("javascript", "keyword", {
  regex: {
    // eslint-disable-next-line regexp/no-dupe-characters-character-class
    pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,
    lookbehind: !0,
    greedy: !0,
    inside: {
      "regex-source": {
        pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
        lookbehind: !0,
        alias: "language-regex",
        inside: de.languages.regex
      },
      "regex-delimiter": /^\/|\/$/,
      "regex-flags": /^[a-z]+$/
    }
  },
  // This must be declared before keyword because we use "function" inside the look-forward
  "function-variable": {
    pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
    alias: "function"
  },
  parameter: [{
    pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
    lookbehind: !0,
    inside: de.languages.javascript
  }, {
    pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
    lookbehind: !0,
    inside: de.languages.javascript
  }, {
    pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
    lookbehind: !0,
    inside: de.languages.javascript
  }, {
    pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
    lookbehind: !0,
    inside: de.languages.javascript
  }],
  constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
});
de.languages.insertBefore("javascript", "string", {
  hashbang: {
    pattern: /^#!.*/,
    greedy: !0,
    alias: "comment"
  },
  "template-string": {
    pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
    greedy: !0,
    inside: {
      "template-punctuation": {
        pattern: /^`|`$/,
        alias: "string"
      },
      interpolation: {
        pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
        lookbehind: !0,
        inside: {
          "interpolation-punctuation": {
            pattern: /^\$\{|\}$/,
            alias: "punctuation"
          },
          rest: de.languages.javascript
        }
      },
      string: /[\s\S]+/
    }
  },
  "string-property": {
    pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
    lookbehind: !0,
    greedy: !0,
    alias: "property"
  }
});
de.languages.insertBefore("javascript", "operator", {
  "literal-property": {
    pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
    lookbehind: !0,
    alias: "property"
  }
});
de.languages.markup && (de.languages.markup.tag.addInlined("script", "javascript"), de.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript"));
de.languages.js = de.languages.javascript;
(function(e) {
  var t = /#(?!\{).+/, n = {
    pattern: /#\{[^}]+\}/,
    alias: "variable"
  };
  e.languages.coffeescript = e.languages.extend("javascript", {
    comment: t,
    string: [
      // Strings are multiline
      {
        pattern: /'(?:\\[\s\S]|[^\\'])*'/,
        greedy: !0
      },
      {
        // Strings are multiline
        pattern: /"(?:\\[\s\S]|[^\\"])*"/,
        greedy: !0,
        inside: {
          interpolation: n
        }
      }
    ],
    keyword: /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
    "class-member": {
      pattern: /@(?!\d)\w+/,
      alias: "variable"
    }
  }), e.languages.insertBefore("coffeescript", "comment", {
    "multiline-comment": {
      pattern: /###[\s\S]+?###/,
      alias: "comment"
    },
    // Block regexp can contain comments and interpolation
    "block-regex": {
      pattern: /\/{3}[\s\S]*?\/{3}/,
      alias: "regex",
      inside: {
        comment: t,
        interpolation: n
      }
    }
  }), e.languages.insertBefore("coffeescript", "string", {
    "inline-javascript": {
      pattern: /`(?:\\[\s\S]|[^\\`])*`/,
      inside: {
        delimiter: {
          pattern: /^`|`$/,
          alias: "punctuation"
        },
        script: {
          pattern: /[\s\S]+/,
          alias: "language-javascript",
          inside: e.languages.javascript
        }
      }
    },
    // Block strings
    "multiline-string": [{
      pattern: /'''[\s\S]*?'''/,
      greedy: !0,
      alias: "string"
    }, {
      pattern: /"""[\s\S]*?"""/,
      greedy: !0,
      alias: "string",
      inside: {
        interpolation: n
      }
    }]
  }), e.languages.insertBefore("coffeescript", "keyword", {
    // Object property
    property: /(?!\d)\w+(?=\s*:(?!:))/
  }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
})(de);
(function(e) {
  var t = /[*&][^\s[\]{},]+/, n = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, r = "(?:" + n.source + "(?:[ 	]+" + t.source + ")?|" + t.source + "(?:[ 	]+" + n.source + ")?)", o = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
    return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
  }), i = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
  function a(l, s) {
    s = (s || "").replace(/m/g, "") + "m";
    var c = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
      return r;
    }).replace(/<<value>>/g, function() {
      return l;
    });
    return RegExp(c, s);
  }
  e.languages.yaml = {
    scalar: {
      pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
        return r;
      })),
      lookbehind: !0,
      alias: "string"
    },
    comment: /#.*/,
    key: {
      pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
        return r;
      }).replace(/<<key>>/g, function() {
        return "(?:" + o + "|" + i + ")";
      })),
      lookbehind: !0,
      greedy: !0,
      alias: "atrule"
    },
    directive: {
      pattern: /(^[ \t]*)%.+/m,
      lookbehind: !0,
      alias: "important"
    },
    datetime: {
      pattern: a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),
      lookbehind: !0,
      alias: "number"
    },
    boolean: {
      pattern: a(/false|true/.source, "i"),
      lookbehind: !0,
      alias: "important"
    },
    null: {
      pattern: a(/null|~/.source, "i"),
      lookbehind: !0,
      alias: "important"
    },
    string: {
      pattern: a(i),
      lookbehind: !0,
      greedy: !0
    },
    number: {
      pattern: a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"),
      lookbehind: !0
    },
    tag: n,
    important: t,
    punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
  }, e.languages.yml = e.languages.yaml;
})(de);
(function(e) {
  var t = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
  function n(p) {
    return p = p.replace(/<inner>/g, function() {
      return t;
    }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + p + ")");
  }
  var r = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, o = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
    return r;
  }), i = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
  e.languages.markdown = e.languages.extend("markup", {}), e.languages.insertBefore("markdown", "prolog", {
    "front-matter-block": {
      pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
      lookbehind: !0,
      greedy: !0,
      inside: {
        punctuation: /^---|---$/,
        "front-matter": {
          pattern: /\S+(?:\s+\S+)*/,
          alias: ["yaml", "language-yaml"],
          inside: e.languages.yaml
        }
      }
    },
    blockquote: {
      // > ...
      pattern: /^>(?:[\t ]*>)*/m,
      alias: "punctuation"
    },
    table: {
      pattern: RegExp("^" + o + i + "(?:" + o + ")*", "m"),
      inside: {
        "table-data-rows": {
          pattern: RegExp("^(" + o + i + ")(?:" + o + ")*$"),
          lookbehind: !0,
          inside: {
            "table-data": {
              pattern: RegExp(r),
              inside: e.languages.markdown
            },
            punctuation: /\|/
          }
        },
        "table-line": {
          pattern: RegExp("^(" + o + ")" + i + "$"),
          lookbehind: !0,
          inside: {
            punctuation: /\||:?-{3,}:?/
          }
        },
        "table-header-row": {
          pattern: RegExp("^" + o + "$"),
          inside: {
            "table-header": {
              pattern: RegExp(r),
              alias: "important",
              inside: e.languages.markdown
            },
            punctuation: /\|/
          }
        }
      }
    },
    code: [{
      // Prefixed by 4 spaces or 1 tab and preceded by an empty line
      pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
      lookbehind: !0,
      alias: "keyword"
    }, {
      // ```optional language
      // code block
      // ```
      pattern: /^```[\s\S]*?^```$/m,
      greedy: !0,
      inside: {
        "code-block": {
          pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
          lookbehind: !0
        },
        "code-language": {
          pattern: /^(```).+/,
          lookbehind: !0
        },
        punctuation: /```/
      }
    }],
    title: [{
      // title 1
      // =======
      // title 2
      // -------
      pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
      alias: "important",
      inside: {
        punctuation: /==+$|--+$/
      }
    }, {
      // # title 1
      // ###### title 6
      pattern: /(^\s*)#.+/m,
      lookbehind: !0,
      alias: "important",
      inside: {
        punctuation: /^#+|#+$/
      }
    }],
    hr: {
      // ***
      // ---
      // * * *
      // -----------
      pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
      lookbehind: !0,
      alias: "punctuation"
    },
    list: {
      // * item
      // + item
      // - item
      // 1. item
      pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
      lookbehind: !0,
      alias: "punctuation"
    },
    "url-reference": {
      // [id]: http://example.com "Optional title"
      // [id]: http://example.com 'Optional title'
      // [id]: http://example.com (Optional title)
      // [id]: <http://example.com> "Optional title"
      pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
      inside: {
        variable: {
          pattern: /^(!?\[)[^\]]+/,
          lookbehind: !0
        },
        string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
        punctuation: /^[\[\]!:]|[<>]/
      },
      alias: "url"
    },
    bold: {
      // **strong**
      // __strong__
      // allow one nested instance of italic text using the same delimiter
      pattern: n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        content: {
          pattern: /(^..)[\s\S]+(?=..$)/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        punctuation: /\*\*|__/
      }
    },
    italic: {
      // *em*
      // _em_
      // allow one nested instance of bold text using the same delimiter
      pattern: n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        content: {
          pattern: /(^.)[\s\S]+(?=.$)/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        punctuation: /[*_]/
      }
    },
    strike: {
      // ~~strike through~~
      // ~strike~
      // eslint-disable-next-line regexp/strict
      pattern: n(/(~~?)(?:(?!~)<inner>)+\2/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        content: {
          pattern: /(^~~?)[\s\S]+(?=\1$)/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        punctuation: /~~?/
      }
    },
    "code-snippet": {
      // `code`
      // ``code``
      pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
      lookbehind: !0,
      greedy: !0,
      alias: ["code", "keyword"]
    },
    url: {
      // [example](http://example.com "Optional title")
      // [example][id]
      // [example] [id]
      pattern: n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
      lookbehind: !0,
      greedy: !0,
      inside: {
        operator: /^!/,
        content: {
          pattern: /(^\[)[^\]]+(?=\])/,
          lookbehind: !0,
          inside: {}
          // see below
        },
        variable: {
          pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
          lookbehind: !0
        },
        url: {
          pattern: /(^\]\()[^\s)]+/,
          lookbehind: !0
        },
        string: {
          pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
          lookbehind: !0
        }
      }
    }
  }), ["url", "bold", "italic", "strike"].forEach(function(p) {
    ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(f) {
      p !== f && (e.languages.markdown[p].inside.content.inside[f] = e.languages.markdown[f]);
    });
  }), e.hooks.add("after-tokenize", function(p) {
    if (p.language !== "markdown" && p.language !== "md")
      return;
    function f(m) {
      if (!(!m || typeof m == "string"))
        for (var h = 0, g = m.length; h < g; h++) {
          var v = m[h];
          if (v.type !== "code") {
            f(v.content);
            continue;
          }
          var S = v.content[1], w = v.content[3];
          if (S && w && S.type === "code-language" && w.type === "code-block" && typeof S.content == "string") {
            var x = S.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
            x = (/[a-z][\w-]*/i.exec(x) || [""])[0].toLowerCase();
            var k = "language-" + x;
            w.alias ? typeof w.alias == "string" ? w.alias = [w.alias, k] : w.alias.push(k) : w.alias = [k];
          }
        }
    }
    f(p.tokens);
  }), e.hooks.add("wrap", function(p) {
    if (p.type === "code-block") {
      for (var f = "", m = 0, h = p.classes.length; m < h; m++) {
        var g = p.classes[m], v = /language-(.+)/.exec(g);
        if (v) {
          f = v[1];
          break;
        }
      }
      var S = e.languages[f];
      if (S)
        p.content = e.highlight(c(p.content), S, f);
      else if (f && f !== "none" && e.plugins.autoloader) {
        var w = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
        p.attributes.id = w, e.plugins.autoloader.loadLanguages(f, function() {
          var x = document.getElementById(w);
          x && (x.innerHTML = e.highlight(x.textContent, e.languages[f], f));
        });
      }
    }
  });
  var a = RegExp(e.languages.markup.tag.pattern.source, "gi"), l = {
    amp: "&",
    lt: "<",
    gt: ">",
    quot: '"'
  }, s = String.fromCodePoint || String.fromCharCode;
  function c(p) {
    var f = p.replace(a, "");
    return f = f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(m, h) {
      if (h = h.toLowerCase(), h[0] === "#") {
        var g;
        return h[1] === "x" ? g = parseInt(h.slice(2), 16) : g = Number(h.slice(1)), s(g);
      } else {
        var v = l[h];
        return v || m;
      }
    }), f;
  }
  e.languages.md = e.languages.markdown;
})(de);
de.languages.graphql = {
  comment: /#.*/,
  description: {
    pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,
    greedy: !0,
    alias: "string",
    inside: {
      "language-markdown": {
        pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,
        lookbehind: !0,
        inside: de.languages.markdown
      }
    }
  },
  string: {
    pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,
    greedy: !0
  },
  number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
  boolean: /\b(?:false|true)\b/,
  variable: /\$[a-z_]\w*/i,
  directive: {
    pattern: /@[a-z_]\w*/i,
    alias: "function"
  },
  "attr-name": {
    pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,
    greedy: !0
  },
  "atom-input": {
    pattern: /\b[A-Z]\w*Input\b/,
    alias: "class-name"
  },
  scalar: /\b(?:Boolean|Float|ID|Int|String)\b/,
  constant: /\b[A-Z][A-Z_\d]*\b/,
  "class-name": {
    pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,
    lookbehind: !0
  },
  fragment: {
    pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,
    lookbehind: !0,
    alias: "function"
  },
  "definition-mutation": {
    pattern: /(\bmutation\s+)[a-zA-Z_]\w*/,
    lookbehind: !0,
    alias: "function"
  },
  "definition-query": {
    pattern: /(\bquery\s+)[a-zA-Z_]\w*/,
    lookbehind: !0,
    alias: "function"
  },
  keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,
  operator: /[!=|&]|\.{3}/,
  "property-query": /\w+(?=\s*\()/,
  object: /\w+(?=\s*\{)/,
  punctuation: /[!(){}\[\]:=,]/,
  property: /\w+/
};
de.hooks.add("after-tokenize", function(e) {
  if (e.language !== "graphql")
    return;
  var t = e.tokens.filter(function(g) {
    return typeof g != "string" && g.type !== "comment" && g.type !== "scalar";
  }), n = 0;
  function r(g) {
    return t[n + g];
  }
  function o(g, v) {
    v = v || 0;
    for (var S = 0; S < g.length; S++) {
      var w = r(S + v);
      if (!w || w.type !== g[S])
        return !1;
    }
    return !0;
  }
  function i(g, v) {
    for (var S = 1, w = n; w < t.length; w++) {
      var x = t[w], k = x.content;
      if (x.type === "punctuation" && typeof k == "string") {
        if (g.test(k))
          S++;
        else if (v.test(k) && (S--, S === 0))
          return w;
      }
    }
    return -1;
  }
  function a(g, v) {
    var S = g.alias;
    S ? Array.isArray(S) || (g.alias = S = [S]) : g.alias = S = [], S.push(v);
  }
  for (; n < t.length; ) {
    var l = t[n++];
    if (l.type === "keyword" && l.content === "mutation") {
      var s = [];
      if (o(["definition-mutation", "punctuation"]) && r(1).content === "(") {
        n += 2;
        var c = i(/^\($/, /^\)$/);
        if (c === -1)
          continue;
        for (; n < c; n++) {
          var p = r(0);
          p.type === "variable" && (a(p, "variable-input"), s.push(p.content));
        }
        n = c + 1;
      }
      if (o(["punctuation", "property-query"]) && r(0).content === "{" && (n++, a(r(0), "property-mutation"), s.length > 0)) {
        var f = i(/^\{$/, /^\}$/);
        if (f === -1)
          continue;
        for (var m = n; m < f; m++) {
          var h = t[m];
          h.type === "variable" && s.indexOf(h.content) >= 0 && a(h, "variable-input");
        }
      }
    }
  }
});
de.languages.sql = {
  comment: {
    pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
    lookbehind: !0
  },
  variable: [{
    pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
    greedy: !0
  }, /@[\w.$]+/],
  string: {
    pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
    greedy: !0,
    lookbehind: !0
  },
  identifier: {
    pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
    greedy: !0,
    lookbehind: !0,
    inside: {
      punctuation: /^`|`$/
    }
  },
  function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,
  // Should we highlight user defined functions too?
  keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
  boolean: /\b(?:FALSE|NULL|TRUE)\b/i,
  number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
  operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
  punctuation: /[;[\]()`,.]/
};
(function(e) {
  var t = e.languages.javascript["template-string"], n = t.pattern.source, r = t.inside.interpolation, o = r.inside["interpolation-punctuation"], i = r.pattern.source;
  function a(h, g) {
    if (e.languages[h])
      return {
        pattern: RegExp("((?:" + g + ")\\s*)" + n),
        lookbehind: !0,
        greedy: !0,
        inside: {
          "template-punctuation": {
            pattern: /^`|`$/,
            alias: "string"
          },
          "embedded-code": {
            pattern: /[\s\S]+/,
            alias: h
          }
        }
      };
  }
  e.languages.javascript["template-string"] = [
    // styled-jsx:
    //   css`a { color: #25F; }`
    // styled-components:
    //   styled.h1`color: red;`
    a("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),
    // html`<p></p>`
    // div.innerHTML = `<p></p>`
    a("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),
    // svg`<path fill="#fff" d="M55.37 ..."/>`
    a("svg", /\bsvg/.source),
    // md`# h1`, markdown`## h2`
    a("markdown", /\b(?:markdown|md)/.source),
    // gql`...`, graphql`...`, graphql.experimental`...`
    a("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),
    // sql`...`
    a("sql", /\bsql/.source),
    // vanilla template string
    t
  ].filter(Boolean);
  function l(h, g) {
    return "___" + g.toUpperCase() + "_" + h + "___";
  }
  function s(h, g, v) {
    var S = {
      code: h,
      grammar: g,
      language: v
    };
    return e.hooks.run("before-tokenize", S), S.tokens = e.tokenize(S.code, S.grammar), e.hooks.run("after-tokenize", S), S.tokens;
  }
  function c(h) {
    var g = {};
    g["interpolation-punctuation"] = o;
    var v = e.tokenize(h, g);
    if (v.length === 3) {
      var S = [1, 1];
      S.push.apply(S, s(v[1], e.languages.javascript, "javascript")), v.splice.apply(v, S);
    }
    return new e.Token("interpolation", v, r.alias, h);
  }
  function p(h, g, v) {
    var S = e.tokenize(h, {
      interpolation: {
        pattern: RegExp(i),
        lookbehind: !0
      }
    }), w = 0, x = {}, k = S.map(function(R) {
      if (typeof R == "string")
        return R;
      for (var L = R.content, D; h.indexOf(D = l(w++, v)) !== -1; )
        ;
      return x[D] = L, D;
    }).join(""), E = s(k, g, v), O = Object.keys(x);
    w = 0;
    function C(R) {
      for (var L = 0; L < R.length; L++) {
        if (w >= O.length)
          return;
        var D = R[L];
        if (typeof D == "string" || typeof D.content == "string") {
          var N = O[w], H = typeof D == "string" ? D : (
            /** @type {string} */
            D.content
          ), B = H.indexOf(N);
          if (B !== -1) {
            ++w;
            var K = H.substring(0, B), W = c(x[N]), U = H.substring(B + N.length), Q = [];
            if (K && Q.push(K), Q.push(W), U) {
              var J = [U];
              C(J), Q.push.apply(Q, J);
            }
            typeof D == "string" ? (R.splice.apply(R, [L, 1].concat(Q)), L += Q.length - 1) : D.content = Q;
          }
        } else {
          var q = D.content;
          Array.isArray(q) ? C(q) : C([q]);
        }
      }
    }
    return C(E), new e.Token(v, E, "language-" + v, h);
  }
  var f = {
    javascript: !0,
    js: !0,
    typescript: !0,
    ts: !0,
    jsx: !0,
    tsx: !0
  };
  e.hooks.add("after-tokenize", function(h) {
    if (!(h.language in f))
      return;
    function g(v) {
      for (var S = 0, w = v.length; S < w; S++) {
        var x = v[S];
        if (typeof x != "string") {
          var k = x.content;
          if (!Array.isArray(k)) {
            typeof k != "string" && g([k]);
            continue;
          }
          if (x.type === "template-string") {
            var E = k[1];
            if (k.length === 3 && typeof E != "string" && E.type === "embedded-code") {
              var O = m(E), C = E.alias, R = Array.isArray(C) ? C[0] : C, L = e.languages[R];
              if (!L)
                continue;
              k[1] = p(O, L, R);
            }
          } else
            g(k);
        }
      }
    }
    g(h.tokens);
  });
  function m(h) {
    return typeof h == "string" ? h : Array.isArray(h) ? h.map(m).join("") : m(h.content);
  }
})(de);
(function(e) {
  e.languages.typescript = e.languages.extend("javascript", {
    "class-name": {
      pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
      lookbehind: !0,
      greedy: !0,
      inside: null
      // see below
    },
    builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
  }), e.languages.typescript.keyword.push(
    /\b(?:abstract|declare|is|keyof|readonly|require)\b/,
    // keywords that have to be followed by an identifier
    /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,
    // This is for `import type *, {}`
    /\btype\b(?=\s*(?:[\{*]|$))/
  ), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
  var t = e.languages.extend("typescript", {});
  delete t["class-name"], e.languages.typescript["class-name"].inside = t, e.languages.insertBefore("typescript", "function", {
    decorator: {
      pattern: /@[$\w\xA0-\uFFFF]+/,
      inside: {
        at: {
          pattern: /^@/,
          alias: "operator"
        },
        function: /^[\s\S]+/
      }
    },
    "generic-function": {
      // e.g. foo<T extends "bar" | "baz">( ...
      pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
      greedy: !0,
      inside: {
        function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
        generic: {
          pattern: /<[\s\S]+/,
          // everything after the first <
          alias: "class-name",
          inside: t
        }
      }
    }
  }), e.languages.ts = e.languages.typescript;
})(de);
(function(e) {
  e.languages.insertBefore("javascript", "function-variable", {
    "method-variable": {
      pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source),
      lookbehind: !0,
      alias: ["function-variable", "method", "function", "property-access"]
    }
  }), e.languages.insertBefore("javascript", "function", {
    method: {
      pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source),
      lookbehind: !0,
      alias: ["function", "property-access"]
    }
  }), e.languages.insertBefore("javascript", "constant", {
    "known-class-name": [{
      // standard built-ins
      // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
      pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,
      alias: "class-name"
    }, {
      // errors
      pattern: /\b(?:[A-Z]\w*)Error\b/,
      alias: "class-name"
    }]
  });
  function t(l, s) {
    return RegExp(l.replace(/<ID>/g, function() {
      return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
    }), s);
  }
  e.languages.insertBefore("javascript", "keyword", {
    imports: {
      // https://tc39.es/ecma262/#sec-imports
      pattern: t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),
      lookbehind: !0,
      inside: e.languages.javascript
    },
    exports: {
      // https://tc39.es/ecma262/#sec-exports
      pattern: t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),
      lookbehind: !0,
      inside: e.languages.javascript
    }
  }), e.languages.javascript.keyword.unshift({
    pattern: /\b(?:as|default|export|from|import)\b/,
    alias: "module"
  }, {
    pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,
    alias: "control-flow"
  }, {
    pattern: /\bnull\b/,
    alias: ["null", "nil"]
  }, {
    pattern: /\bundefined\b/,
    alias: "nil"
  }), e.languages.insertBefore("javascript", "operator", {
    spread: {
      pattern: /\.{3}/,
      alias: "operator"
    },
    arrow: {
      pattern: /=>/,
      alias: "operator"
    }
  }), e.languages.insertBefore("javascript", "punctuation", {
    "property-access": {
      pattern: t(/(\.\s*)#?<ID>/.source),
      lookbehind: !0
    },
    "maybe-class-name": {
      pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,
      lookbehind: !0
    },
    dom: {
      // this contains only a few commonly used DOM variables
      pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,
      alias: "variable"
    },
    console: {
      pattern: /\bconsole(?=\s*\.)/,
      alias: "class-name"
    }
  });
  for (var n = ["function", "function-variable", "method", "method-variable", "property-access"], r = 0; r < n.length; r++) {
    var o = n[r], i = e.languages.javascript[o];
    e.util.type(i) === "RegExp" && (i = e.languages.javascript[o] = {
      pattern: i
    });
    var a = i.inside || {};
    i.inside = a, a["maybe-class-name"] = /^[A-Z][\s\S]*/;
  }
})(de);
(function(e) {
  var t = e.util.clone(e.languages.javascript), n = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, r = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, o = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
  function i(s, c) {
    return s = s.replace(/<S>/g, function() {
      return n;
    }).replace(/<BRACES>/g, function() {
      return r;
    }).replace(/<SPREAD>/g, function() {
      return o;
    }), RegExp(s, c);
  }
  o = i(o).source, e.languages.jsx = e.languages.extend("markup", t), e.languages.jsx.tag.pattern = i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = t.comment, e.languages.insertBefore("inside", "attr-name", {
    spread: {
      pattern: i(/<SPREAD>/.source),
      inside: e.languages.jsx
    }
  }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", {
    script: {
      // Allow for two levels of nesting
      pattern: i(/=<BRACES>/.source),
      alias: "language-javascript",
      inside: {
        "script-punctuation": {
          pattern: /^=(?=\{)/,
          alias: "punctuation"
        },
        rest: e.languages.jsx
      }
    }
  }, e.languages.jsx.tag);
  var a = function(s) {
    return s ? typeof s == "string" ? s : typeof s.content == "string" ? s.content : s.content.map(a).join("") : "";
  }, l = function(s) {
    for (var c = [], p = 0; p < s.length; p++) {
      var f = s[p], m = !1;
      if (typeof f != "string" && (f.type === "tag" && f.content[0] && f.content[0].type === "tag" ? f.content[0].content[0].content === "</" ? c.length > 0 && c[c.length - 1].tagName === a(f.content[0].content[1]) && c.pop() : f.content[f.content.length - 1].content === "/>" || c.push({
        tagName: a(f.content[0].content[1]),
        openedBraces: 0
      }) : c.length > 0 && f.type === "punctuation" && f.content === "{" ? c[c.length - 1].openedBraces++ : c.length > 0 && c[c.length - 1].openedBraces > 0 && f.type === "punctuation" && f.content === "}" ? c[c.length - 1].openedBraces-- : m = !0), (m || typeof f == "string") && c.length > 0 && c[c.length - 1].openedBraces === 0) {
        var h = a(f);
        p < s.length - 1 && (typeof s[p + 1] == "string" || s[p + 1].type === "plain-text") && (h += a(s[p + 1]), s.splice(p + 1, 1)), p > 0 && (typeof s[p - 1] == "string" || s[p - 1].type === "plain-text") && (h = a(s[p - 1]) + h, s.splice(p - 1, 1), p--), s[p] = new e.Token("plain-text", h, null, h);
      }
      f.content && typeof f.content != "string" && l(f.content);
    }
  };
  e.hooks.add("after-tokenize", function(s) {
    s.language !== "jsx" && s.language !== "tsx" || l(s.tokens);
  });
})(de);
(function(e) {
  e.languages.diff = {
    coord: [
      // Match all kinds of coord lines (prefixed by "+++", "---" or "***").
      /^(?:\*{3}|-{3}|\+{3}).*$/m,
      // Match "@@ ... @@" coord lines in unified diff.
      /^@@.*@@$/m,
      // Match coord lines in normal diff (starts with a number).
      /^\d.*$/m
    ]
    // deleted, inserted, unchanged, diff
  };
  var t = {
    "deleted-sign": "-",
    "deleted-arrow": "<",
    "inserted-sign": "+",
    "inserted-arrow": ">",
    unchanged: " ",
    diff: "!"
  };
  Object.keys(t).forEach(function(n) {
    var r = t[n], o = [];
    /^\w+$/.test(n) || o.push(/\w+/.exec(n)[0]), n === "diff" && o.push("bold"), e.languages.diff[n] = {
      pattern: RegExp("^(?:[" + r + `].*(?:\r
?|
|(?![\\s\\S])))+`, "m"),
      alias: o,
      inside: {
        line: {
          pattern: /(.)(?=[\s\S]).*(?:\r\n?|\n)?/,
          lookbehind: !0
        },
        prefix: {
          pattern: /[\s\S]/,
          alias: /\w+/.exec(n)[0]
        }
      }
    };
  }), Object.defineProperty(e.languages.diff, "PREFIXES", {
    value: t
  });
})(de);
de.languages.git = {
  /*
   * A simple one line comment like in a git status command
   * For instance:
   * $ git status
   * # On branch infinite-scroll
   * # Your branch and 'origin/sharedBranches/frontendTeam/infinite-scroll' have diverged,
   * # and have 1 and 2 different commits each, respectively.
   * nothing to commit (working directory clean)
   */
  comment: /^#.*/m,
  /*
   * Regexp to match the changed lines in a git diff output. Check the example below.
   */
  deleted: /^[-–].*/m,
  inserted: /^\+.*/m,
  /*
   * a string (double and simple quote)
   */
  string: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
  /*
   * a git command. It starts with a random prompt finishing by a $, then "git" then some other parameters
   * For instance:
   * $ git add file.txt
   */
  command: {
    pattern: /^.*\$ git .*$/m,
    inside: {
      /*
       * A git command can contain a parameter starting by a single or a double dash followed by a string
       * For instance:
       * $ git diff --cached
       * $ git log -p
       */
      parameter: /\s--?\w+/
    }
  },
  /*
   * Coordinates displayed in a git diff command
   * For instance:
   * $ git diff
   * diff --git file.txt file.txt
   * index 6214953..1d54a52 100644
   * --- file.txt
   * +++ file.txt
   * @@ -1 +1,2 @@
   * -Here's my tetx file
   * +Here's my text file
   * +And this is the second line
   */
  coord: /^@@.*@@$/m,
  /*
   * Match a "commit [SHA1]" line in a git log output.
   * For instance:
   * $ git log
   * commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09
   * Author: lgiraudel
   * Date:   Mon Feb 17 11:18:34 2014 +0100
   *
   *     Add of a new line
   */
  "commit-sha1": /^commit \w{40}$/m
};
de.languages.go = de.languages.extend("clike", {
  string: {
    pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
    lookbehind: !0,
    greedy: !0
  },
  keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,
  boolean: /\b(?:_|false|iota|nil|true)\b/,
  number: [
    // binary and octal integers
    /\b0(?:b[01_]+|o[0-7_]+)i?\b/i,
    // hexadecimal integers and floats
    /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
    // decimal integers and floats
    /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i
  ],
  operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
  builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/
});
de.languages.insertBefore("go", "string", {
  char: {
    pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/,
    greedy: !0
  }
});
delete de.languages.go["class-name"];
(function(e) {
  function t(n, r) {
    return "___" + n.toUpperCase() + r + "___";
  }
  Object.defineProperties(e.languages["markup-templating"] = {}, {
    buildPlaceholders: {
      /**
       * Tokenize all inline templating expressions matching `placeholderPattern`.
       *
       * If `replaceFilter` is provided, only matches of `placeholderPattern` for which `replaceFilter` returns
       * `true` will be replaced.
       *
       * @param {object} env The environment of the `before-tokenize` hook.
       * @param {string} language The language id.
       * @param {RegExp} placeholderPattern The matches of this pattern will be replaced by placeholders.
       * @param {(match: string) => boolean} [replaceFilter]
       */
      value: function(n, r, o, i) {
        if (n.language === r) {
          var a = n.tokenStack = [];
          n.code = n.code.replace(o, function(l) {
            if (typeof i == "function" && !i(l))
              return l;
            for (var s = a.length, c; n.code.indexOf(c = t(r, s)) !== -1; )
              ++s;
            return a[s] = l, c;
          }), n.grammar = e.languages.markup;
        }
      }
    },
    tokenizePlaceholders: {
      /**
       * Replace placeholders with proper tokens after tokenizing.
       *
       * @param {object} env The environment of the `after-tokenize` hook.
       * @param {string} language The language id.
       */
      value: function(n, r) {
        if (n.language !== r || !n.tokenStack)
          return;
        n.grammar = e.languages[r];
        var o = 0, i = Object.keys(n.tokenStack);
        function a(l) {
          for (var s = 0; s < l.length && !(o >= i.length); s++) {
            var c = l[s];
            if (typeof c == "string" || c.content && typeof c.content == "string") {
              var p = i[o], f = n.tokenStack[p], m = typeof c == "string" ? c : c.content, h = t(r, p), g = m.indexOf(h);
              if (g > -1) {
                ++o;
                var v = m.substring(0, g), S = new e.Token(r, e.tokenize(f, n.grammar), "language-" + r, f), w = m.substring(g + h.length), x = [];
                v && x.push.apply(x, a([v])), x.push(S), w && x.push.apply(x, a([w])), typeof c == "string" ? l.splice.apply(l, [s, 1].concat(x)) : c.content = x;
              }
            } else
              c.content && a(c.content);
          }
          return l;
        }
        a(n.tokens);
      }
    }
  });
})(de);
(function(e) {
  e.languages.handlebars = {
    comment: /\{\{![\s\S]*?\}\}/,
    delimiter: {
      pattern: /^\{\{\{?|\}\}\}?$/,
      alias: "punctuation"
    },
    string: /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,
    number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,
    boolean: /\b(?:false|true)\b/,
    block: {
      pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,
      lookbehind: !0,
      alias: "keyword"
    },
    brackets: {
      pattern: /\[[^\]]+\]/,
      inside: {
        punctuation: /\[|\]/,
        variable: /[\s\S]+/
      }
    },
    punctuation: /[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,
    variable: /[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/
  }, e.hooks.add("before-tokenize", function(t) {
    var n = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;
    e.languages["markup-templating"].buildPlaceholders(t, "handlebars", n);
  }), e.hooks.add("after-tokenize", function(t) {
    e.languages["markup-templating"].tokenizePlaceholders(t, "handlebars");
  }), e.languages.hbs = e.languages.handlebars;
})(de);
de.languages.json = {
  property: {
    pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
    lookbehind: !0,
    greedy: !0
  },
  string: {
    pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
    lookbehind: !0,
    greedy: !0
  },
  comment: {
    pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
    greedy: !0
  },
  number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
  punctuation: /[{}[\],]/,
  operator: /:/,
  boolean: /\b(?:false|true)\b/,
  null: {
    pattern: /\bnull\b/,
    alias: "keyword"
  }
};
de.languages.webmanifest = de.languages.json;
de.languages.less = de.languages.extend("css", {
  comment: [/\/\*[\s\S]*?\*\//, {
    pattern: /(^|[^\\])\/\/.*/,
    lookbehind: !0
  }],
  atrule: {
    pattern: /@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,
    inside: {
      punctuation: /[:()]/
    }
  },
  // selectors and mixins are considered the same
  selector: {
    pattern: /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,
    inside: {
      // mixin parameters
      variable: /@+[\w-]+/
    }
  },
  property: /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,
  operator: /[+\-*\/]/
});
de.languages.insertBefore("less", "property", {
  variable: [
    // Variable declaration (the colon must be consumed!)
    {
      pattern: /@[\w-]+\s*:/,
      inside: {
        punctuation: /:/
      }
    },
    // Variable usage
    /@@?[\w-]+/
  ],
  "mixin-usage": {
    pattern: /([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,
    lookbehind: !0,
    alias: "function"
  }
});
de.languages.makefile = {
  comment: {
    pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
    lookbehind: !0
  },
  string: {
    pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
    greedy: !0
  },
  "builtin-target": {
    pattern: /\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,
    alias: "builtin"
  },
  target: {
    pattern: /^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,
    alias: "symbol",
    inside: {
      variable: /\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/
    }
  },
  variable: /\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,
  // Directives
  keyword: /-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,
  function: {
    pattern: /(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,
    lookbehind: !0
  },
  operator: /(?:::|[?:+!])?=|[|@]/,
  punctuation: /[:;(){}]/
};
de.languages.objectivec = de.languages.extend("c", {
  string: {
    pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
    greedy: !0
  },
  keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,
  operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
});
delete de.languages.objectivec["class-name"];
de.languages.objc = de.languages.objectivec;
de.languages.ocaml = {
  comment: {
    pattern: /\(\*[\s\S]*?\*\)/,
    greedy: !0
  },
  char: {
    pattern: /'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,
    greedy: !0
  },
  string: [{
    pattern: /"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,
    greedy: !0
  }, {
    pattern: /\{([a-z_]*)\|[\s\S]*?\|\1\}/,
    greedy: !0
  }],
  number: [
    // binary and octal
    /\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,
    // hexadecimal
    /\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,
    // decimal
    /\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i
  ],
  directive: {
    pattern: /\B#\w+/,
    alias: "property"
  },
  label: {
    pattern: /\B~\w+/,
    alias: "property"
  },
  "type-variable": {
    pattern: /\B'\w+/,
    alias: "function"
  },
  variant: {
    pattern: /`\w+/,
    alias: "symbol"
  },
  // For the list of keywords and operators,
  // see: http://caml.inria.fr/pub/docs/manual-ocaml/lex.html#sec84
  keyword: /\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,
  boolean: /\b(?:false|true)\b/,
  "operator-like-punctuation": {
    pattern: /\[[<>|]|[>|]\]|\{<|>\}/,
    alias: "punctuation"
  },
  // Custom operators are allowed
  operator: /\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,
  punctuation: /;;|::|[(){}\[\].,:;#]|\b_\b/
};
de.languages.python = {
  comment: {
    pattern: /(^|[^\\])#.*/,
    lookbehind: !0,
    greedy: !0
  },
  "string-interpolation": {
    pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
    greedy: !0,
    inside: {
      interpolation: {
        // "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
        pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
        lookbehind: !0,
        inside: {
          "format-spec": {
            pattern: /(:)[^:(){}]+(?=\}$)/,
            lookbehind: !0
          },
          "conversion-option": {
            pattern: /![sra](?=[:}]$)/,
            alias: "punctuation"
          },
          rest: null
        }
      },
      string: /[\s\S]+/
    }
  },
  "triple-quoted-string": {
    pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
    greedy: !0,
    alias: "string"
  },
  string: {
    pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
    greedy: !0
  },
  function: {
    pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
    lookbehind: !0
  },
  "class-name": {
    pattern: /(\bclass\s+)\w+/i,
    lookbehind: !0
  },
  decorator: {
    pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
    lookbehind: !0,
    alias: ["annotation", "punctuation"],
    inside: {
      punctuation: /\./
    }
  },
  keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
  builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
  boolean: /\b(?:False|None|True)\b/,
  number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
  operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
  punctuation: /[{}[\];(),.:]/
};
de.languages.python["string-interpolation"].inside.interpolation.inside.rest = de.languages.python;
de.languages.py = de.languages.python;
de.languages.reason = de.languages.extend("clike", {
  string: {
    pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
    greedy: !0
  },
  // 'class-name' must be matched *after* 'constructor' defined below
  "class-name": /\b[A-Z]\w*/,
  keyword: /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,
  operator: /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/
});
de.languages.insertBefore("reason", "class-name", {
  char: {
    pattern: /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,
    greedy: !0
  },
  // Negative look-ahead prevents from matching things like String.capitalize
  constructor: /\b[A-Z]\w*\b(?!\s*\.)/,
  label: {
    pattern: /\b[a-z]\w*(?=::)/,
    alias: "symbol"
  }
});
delete de.languages.reason.function;
(function(e) {
  e.languages.sass = e.languages.extend("css", {
    // Sass comments don't need to be closed, only indented
    comment: {
      pattern: /^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,
      lookbehind: !0,
      greedy: !0
    }
  }), e.languages.insertBefore("sass", "atrule", {
    // We want to consume the whole line
    "atrule-line": {
      // Includes support for = and + shortcuts
      pattern: /^(?:[ \t]*)[@+=].+/m,
      greedy: !0,
      inside: {
        atrule: /(?:@[\w-]+|[+=])/
      }
    }
  }), delete e.languages.sass.atrule;
  var t = /\$[-\w]+|#\{\$[-\w]+\}/, n = [/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/, {
    pattern: /(\s)-(?=\s)/,
    lookbehind: !0
  }];
  e.languages.insertBefore("sass", "property", {
    // We want to consume the whole line
    "variable-line": {
      pattern: /^[ \t]*\$.+/m,
      greedy: !0,
      inside: {
        punctuation: /:/,
        variable: t,
        operator: n
      }
    },
    // We want to consume the whole line
    "property-line": {
      pattern: /^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,
      greedy: !0,
      inside: {
        property: [/[^:\s]+(?=\s*:)/, {
          pattern: /(:)[^:\s]+/,
          lookbehind: !0
        }],
        punctuation: /:/,
        variable: t,
        operator: n,
        important: e.languages.sass.important
      }
    }
  }), delete e.languages.sass.property, delete e.languages.sass.important, e.languages.insertBefore("sass", "punctuation", {
    selector: {
      pattern: /^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,
      lookbehind: !0,
      greedy: !0
    }
  });
})(de);
de.languages.scss = de.languages.extend("css", {
  comment: {
    pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
    lookbehind: !0
  },
  atrule: {
    pattern: /@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,
    inside: {
      rule: /@[\w-]+/
      // See rest below
    }
  },
  // url, compassified
  url: /(?:[-a-z]+-)?url(?=\()/i,
  // CSS selector regex is not appropriate for Sass
  // since there can be lot more things (var, @ directive, nesting..)
  // a selector must start at the end of a property or after a brace (end of other rules or nesting)
  // it can contain some characters that aren't used for defining rules or end of selector, & (parent selector), or interpolated variable
  // the end of a selector is found when there is no rules in it ( {} or {\s}) or if there is a property (because an interpolated var
  // can "pass" as a selector- e.g: proper#{$erty})
  // this one was hard to do, so please be careful if you edit this one :)
  selector: {
    // Initial look-ahead is used to prevent matching of blank selectors
    pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,
    inside: {
      parent: {
        pattern: /&/,
        alias: "important"
      },
      placeholder: /%[-\w]+/,
      variable: /\$[-\w]+|#\{\$[-\w]+\}/
    }
  },
  property: {
    pattern: /(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,
    inside: {
      variable: /\$[-\w]+|#\{\$[-\w]+\}/
    }
  }
});
de.languages.insertBefore("scss", "atrule", {
  keyword: [/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i, {
    pattern: /( )(?:from|through)(?= )/,
    lookbehind: !0
  }]
});
de.languages.insertBefore("scss", "important", {
  // var and interpolated vars
  variable: /\$[-\w]+|#\{\$[-\w]+\}/
});
de.languages.insertBefore("scss", "function", {
  "module-modifier": {
    pattern: /\b(?:as|hide|show|with)\b/i,
    alias: "keyword"
  },
  placeholder: {
    pattern: /%[-\w]+/,
    alias: "selector"
  },
  statement: {
    pattern: /\B!(?:default|optional)\b/i,
    alias: "keyword"
  },
  boolean: /\b(?:false|true)\b/,
  null: {
    pattern: /\bnull\b/,
    alias: "keyword"
  },
  operator: {
    pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,
    lookbehind: !0
  }
});
de.languages.scss.atrule.inside.rest = de.languages.scss;
(function(e) {
  var t = {
    pattern: /(\b\d+)(?:%|[a-z]+)/,
    lookbehind: !0
  }, n = {
    pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
    lookbehind: !0
  }, r = {
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
      lookbehind: !0
    },
    url: {
      pattern: /\burl\((["']?).*?\1\)/i,
      greedy: !0
    },
    string: {
      pattern: /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,
      greedy: !0
    },
    interpolation: null,
    // See below
    func: null,
    // See below
    important: /\B!(?:important|optional)\b/i,
    keyword: {
      pattern: /(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,
      lookbehind: !0
    },
    hexcode: /#[\da-f]{3,6}/i,
    color: [/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, {
      pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
      inside: {
        unit: t,
        number: n,
        function: /[\w-]+(?=\()/,
        punctuation: /[(),]/
      }
    }],
    entity: /\\[\da-f]{1,8}/i,
    unit: t,
    boolean: /\b(?:false|true)\b/,
    operator: [
      // We want non-word chars around "-" because it is
      // accepted in property names.
      /~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/
    ],
    number: n,
    punctuation: /[{}()\[\];:,]/
  };
  r.interpolation = {
    pattern: /\{[^\r\n}:]+\}/,
    alias: "variable",
    inside: {
      delimiter: {
        pattern: /^\{|\}$/,
        alias: "punctuation"
      },
      rest: r
    }
  }, r.func = {
    pattern: /[\w-]+\([^)]*\).*/,
    inside: {
      function: /^[^(]+/,
      rest: r
    }
  }, e.languages.stylus = {
    "atrule-declaration": {
      pattern: /(^[ \t]*)@.+/m,
      lookbehind: !0,
      inside: {
        atrule: /^@[\w-]+/,
        rest: r
      }
    },
    "variable-declaration": {
      pattern: /(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,
      lookbehind: !0,
      inside: {
        variable: /^\S+/,
        rest: r
      }
    },
    statement: {
      pattern: /(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,
      lookbehind: !0,
      inside: {
        keyword: /^\S+/,
        rest: r
      }
    },
    // A property/value pair cannot end with a comma or a brace
    // It cannot have indented content unless it ended with a semicolon
    "property-declaration": {
      pattern: /((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,
      lookbehind: !0,
      inside: {
        property: {
          pattern: /^[^\s:]+/,
          inside: {
            interpolation: r.interpolation
          }
        },
        rest: r
      }
    },
    // A selector can contain parentheses only as part of a pseudo-element
    // It can span multiple lines.
    // It must end with a comma or an accolade or have indented content.
    selector: {
      pattern: /(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,
      lookbehind: !0,
      inside: {
        interpolation: r.interpolation,
        comment: r.comment,
        punctuation: /[{},]/
      }
    },
    func: r.func,
    string: r.string,
    comment: {
      pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
      lookbehind: !0,
      greedy: !0
    },
    interpolation: r.interpolation,
    punctuation: /[{}()\[\];:.]/
  };
})(de);
(function(e) {
  var t = e.util.clone(e.languages.typescript);
  e.languages.tsx = e.languages.extend("jsx", t), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"];
  var n = e.languages.tsx.tag;
  n.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + n.pattern.source + ")", n.pattern.flags), n.lookbehind = !0;
})(de);
de.languages.wasm = {
  comment: [/\(;[\s\S]*?;\)/, {
    pattern: /;;.*/,
    greedy: !0
  }],
  string: {
    pattern: /"(?:\\[\s\S]|[^"\\])*"/,
    greedy: !0
  },
  keyword: [{
    pattern: /\b(?:align|offset)=/,
    inside: {
      operator: /=/
    }
  }, {
    pattern: /\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,
    inside: {
      punctuation: /\./
    }
  }, /\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],
  variable: /\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,
  number: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,
  punctuation: /[()]/
};
var _Ce = {
  plain: {
    backgroundColor: "#2a2734",
    color: "#9a86fd"
  },
  styles: [{
    types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
    style: {
      color: "#6c6783"
    }
  }, {
    types: ["namespace"],
    style: {
      opacity: 0.7
    }
  }, {
    types: ["tag", "operator", "number"],
    style: {
      color: "#e09142"
    }
  }, {
    types: ["property", "function"],
    style: {
      color: "#9a86fd"
    }
  }, {
    types: ["tag-id", "selector", "atrule-id"],
    style: {
      color: "#eeebff"
    }
  }, {
    types: ["attr-name"],
    style: {
      color: "#c4b9fe"
    }
  }, {
    types: ["boolean", "string", "entity", "url", "attr-value", "keyword", "control", "directive", "unit", "statement", "regex", "atrule", "placeholder", "variable"],
    style: {
      color: "#ffcc99"
    }
  }, {
    types: ["deleted"],
    style: {
      textDecorationLine: "line-through"
    }
  }, {
    types: ["inserted"],
    style: {
      textDecorationLine: "underline"
    }
  }, {
    types: ["italic"],
    style: {
      fontStyle: "italic"
    }
  }, {
    types: ["important", "bold"],
    style: {
      fontWeight: "bold"
    }
  }, {
    types: ["important"],
    style: {
      color: "#c4b9fe"
    }
  }]
};
const OCe = _Ce;
var ECe = {
  // $FlowFixMe
  Prism: de,
  theme: OCe
};
function td(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function kl() {
  return kl = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
    }
    return e;
  }, kl.apply(this, arguments);
}
var CCe = /\r\n|\r|\n/, PA = function(e) {
  e.length === 0 ? e.push({
    types: ["plain"],
    content: `
`,
    empty: !0
  }) : e.length === 1 && e[0].content === "" && (e[0].content = `
`, e[0].empty = !0);
}, RA = function(e, t) {
  var n = e.length;
  return n > 0 && e[n - 1] === t ? e : e.concat(t);
}, PCe = function(e) {
  for (var t = [[]], n = [e], r = [0], o = [e.length], i = 0, a = 0, l = [], s = [l]; a > -1; ) {
    for (; (i = r[a]++) < o[a]; ) {
      var c = void 0, p = t[a], f = n[a], m = f[i];
      if (typeof m == "string" ? (p = a > 0 ? p : ["plain"], c = m) : (p = RA(p, m.type), m.alias && (p = RA(p, m.alias)), c = m.content), typeof c != "string") {
        a++, t.push(p), n.push(c), r.push(0), o.push(c.length);
        continue;
      }
      var h = c.split(CCe), g = h.length;
      l.push({
        types: p,
        content: h[0]
      });
      for (var v = 1; v < g; v++)
        PA(l), s.push(l = []), l.push({
          types: p,
          content: h[v]
        });
    }
    a--, t.pop(), n.pop(), r.pop(), o.pop();
  }
  return PA(l), s;
}, RCe = function(e, t) {
  var n = e.plain, r = /* @__PURE__ */ Object.create(null), o = e.styles.reduce(function(i, a) {
    var l = a.languages, s = a.style;
    return l && !l.includes(t) || a.types.forEach(function(c) {
      var p = kl({}, i[c], s);
      i[c] = p;
    }), i;
  }, r);
  return o.root = n, o.plain = kl({}, n, {
    backgroundColor: null
  }), o;
};
function TA(e, t) {
  var n = {};
  for (var r in e)
    Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) === -1 && (n[r] = e[r]);
  return n;
}
var TCe = /* @__PURE__ */ function(e) {
  function t() {
    for (var n = this, r = [], o = arguments.length; o--; )
      r[o] = arguments[o];
    e.apply(this, r), td(this, "getThemeDict", function(i) {
      if (n.themeDict !== void 0 && i.theme === n.prevTheme && i.language === n.prevLanguage)
        return n.themeDict;
      n.prevTheme = i.theme, n.prevLanguage = i.language;
      var a = i.theme ? RCe(i.theme, i.language) : void 0;
      return n.themeDict = a;
    }), td(this, "getLineProps", function(i) {
      var a = i.key, l = i.className, s = i.style, c = TA(i, ["key", "className", "style", "line"]), p = c, f = kl({}, p, {
        className: "token-line",
        style: void 0,
        key: void 0
      }), m = n.getThemeDict(n.props);
      return m !== void 0 && (f.style = m.plain), s !== void 0 && (f.style = f.style !== void 0 ? kl({}, f.style, s) : s), a !== void 0 && (f.key = a), l && (f.className += " " + l), f;
    }), td(this, "getStyleForToken", function(i) {
      var a = i.types, l = i.empty, s = a.length, c = n.getThemeDict(n.props);
      if (c !== void 0) {
        {
          if (s === 1 && a[0] === "plain")
            return l ? {
              display: "inline-block"
            } : void 0;
          if (s === 1 && !l)
            return c[a[0]];
        }
        var p = l ? {
          display: "inline-block"
        } : {}, f = a.map(function(m) {
          return c[m];
        });
        return Object.assign.apply(Object, [p].concat(f));
      }
    }), td(this, "getTokenProps", function(i) {
      var a = i.key, l = i.className, s = i.style, c = i.token, p = TA(i, ["key", "className", "style", "token"]), f = p, m = kl({}, f, {
        className: "token " + c.types.join(" "),
        children: c.content,
        style: n.getStyleForToken(c),
        key: void 0
      });
      return s !== void 0 && (m.style = m.style !== void 0 ? kl({}, m.style, s) : s), a !== void 0 && (m.key = a), l && (m.className += " " + l), m;
    }), td(this, "tokenize", function(i, a, l, s) {
      var c = {
        code: a,
        grammar: l,
        language: s,
        tokens: []
      };
      i.hooks.run("before-tokenize", c);
      var p = c.tokens = i.tokenize(c.code, c.grammar, c.language);
      return i.hooks.run("after-tokenize", c), p;
    });
  }
  return e && (t.__proto__ = e), t.prototype = Object.create(e && e.prototype), t.prototype.constructor = t, t.prototype.render = function() {
    var n = this.props, r = n.Prism, o = n.language, i = n.code, a = n.children, l = this.getThemeDict(this.props), s = r.languages[o], c = s !== void 0 ? this.tokenize(r, i, s, o) : [i], p = PCe(c);
    return a({
      tokens: p,
      className: "prism-code language-" + o,
      style: l !== void 0 ? l.root : {},
      getLineProps: this.getLineProps,
      getTokenProps: this.getTokenProps
    });
  }, t;
}(b.Component);
const jCe = TCe;
function PW({ copied: e }) {
  return /* @__PURE__ */ P.createElement("svg", {
    viewBox: "0 0 15 15",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    style: { width: "1rem", height: "1rem" }
  }, e ? /* @__PURE__ */ P.createElement("path", {
    d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }) : /* @__PURE__ */ P.createElement("path", {
    d: "M5 2V1H10V2H5ZM4.75 0C4.33579 0 4 0.335786 4 0.75V1H3.5C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V2.5C13 1.67157 12.3284 1 11.5 1H11V0.75C11 0.335786 10.6642 0 10.25 0H4.75ZM11 2V2.25C11 2.66421 10.6642 3 10.25 3H4.75C4.33579 3 4 2.66421 4 2.25V2H3.5C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V2.5C12 2.22386 11.7761 2 11.5 2H11Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
PW.displayName = "@mantine/prism/CopyIcon";
const NCe = (e) => ({
  plain: {
    color: e.colors.gray[4],
    backgroundColor: e.colors.dark[8]
  },
  styles: [
    {
      types: ["comment"],
      style: {
        color: e.colors.gray[6]
      }
    },
    {
      types: ["string", "inserted", "selector", "atrule"],
      style: {
        color: e.colors.teal[4]
      }
    },
    {
      types: ["number"],
      style: {
        color: e.colors.blue[4]
      }
    },
    {
      types: ["builtin", "char", "constant", "function"],
      style: {
        color: e.colors.orange[5]
      }
    },
    {
      types: ["punctuation"],
      style: {
        color: e.colors.gray[5]
      }
    },
    {
      types: ["variable"],
      style: {
        color: e.colors.gray[5]
      }
    },
    {
      types: ["class-name", "attr-name"],
      style: {
        color: e.colors.yellow[5]
      }
    },
    {
      types: ["tag", "deleted"],
      style: {
        color: e.colors.red[6]
      }
    },
    {
      types: ["operator"],
      style: {
        color: e.colors.gray[5]
      }
    },
    {
      types: ["boolean"],
      style: {
        color: e.colors.red[6]
      }
    },
    {
      types: ["keyword"],
      style: {
        color: e.colors.indigo[3]
      }
    },
    {
      types: ["doctype"],
      style: {
        color: e.colors.gray[5]
      }
    },
    {
      types: ["url"],
      style: {
        color: e.colors.gray[5]
      }
    }
  ]
}), $Ce = (e) => ({
  plain: {
    color: e.colors.gray[9],
    backgroundColor: e.fn.rgba(e.colors.gray[0], 0.65)
  },
  styles: [
    {
      types: ["comment"],
      style: {
        color: e.colors.gray[6]
      }
    },
    {
      types: ["string", "inserted"],
      style: {
        color: e.colors.indigo[9]
      }
    },
    {
      types: ["number"],
      style: {
        color: e.colors.blue[7]
      }
    },
    {
      types: ["builtin", "char", "constant", "function", "selector", "atrule"],
      style: {
        color: e.colors.lime[9]
      }
    },
    {
      types: ["punctuation"],
      style: {
        color: e.colors.gray[7]
      }
    },
    {
      types: ["variable"],
      style: {
        color: e.colors.violet[9]
      }
    },
    {
      types: ["attr-name"],
      style: {
        color: e.colors.green[9]
      }
    },
    {
      types: ["class-name"],
      style: {
        color: e.colors.red[9]
      }
    },
    {
      types: ["tag", "deleted"],
      style: {
        color: e.colors.violet[9]
      }
    },
    {
      types: ["operator"],
      style: {
        color: e.colors.red[9]
      }
    },
    {
      types: ["boolean"],
      style: {
        color: e.colors.red[9]
      }
    },
    {
      types: ["keyword"],
      style: {
        color: e.colors.red[9]
      }
    },
    {
      types: ["doctype"],
      style: {
        color: e.colors.gray[7]
      }
    },
    {
      types: ["url"],
      style: {
        color: e.colors.gray[7]
      }
    }
  ]
}), ICe = (e, t) => t === "dark" ? NCe(e) : $Ce(e);
var ACe = Ee((e, { colorScheme: t, native: n, maxLineSize: r, radius: o }) => ({
  scrollArea: {},
  root: {
    position: "relative"
  },
  code: {
    boxSizing: "border-box",
    position: "relative",
    fontFamily: e.fontFamilyMonospace,
    lineHeight: 1.7,
    fontSize: F(13),
    overflowX: n ? "auto" : void 0,
    borderRadius: e.fn.radius(o),
    padding: `${e.spacing.sm} 0`,
    "&.mantine-Prism-code": {
      marginTop: 0,
      marginBottom: 0
    }
  },
  copy: {
    position: "absolute",
    top: e.spacing.xs,
    right: e.dir === "ltr" ? e.spacing.xs : "unset",
    left: e.dir === "rtl" ? e.spacing.xs : "unset",
    zIndex: 2,
    "&, &:hover": {
      backgroundColor: t === "dark" ? e.colors.dark[8] : e.colors.gray[0]
    }
  },
  line: {
    display: "flex",
    width: "100%",
    padding: `0 ${e.spacing.md}`
  },
  lineNumber: {
    color: t === "dark" ? e.colors.dark[4] : e.colors.gray[4],
    textAlign: "right",
    width: `calc(8 * ${F(r)})`,
    marginRight: e.dir === "ltr" ? e.spacing.xs : void 0,
    marginLeft: e.dir === "rtl" ? e.spacing.xs : void 0,
    userSelect: "none"
  },
  lineContent: {
    width: "100%"
  }
})), zCe = Object.defineProperty, LCe = Object.defineProperties, DCe = Object.getOwnPropertyDescriptors, Lb = Object.getOwnPropertySymbols, RW = Object.prototype.hasOwnProperty, TW = Object.prototype.propertyIsEnumerable, jA = (e, t, n) => t in e ? zCe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ju = (e, t) => {
  for (var n in t || (t = {}))
    RW.call(t, n) && jA(e, n, t[n]);
  if (Lb)
    for (var n of Lb(t))
      TW.call(t, n) && jA(e, n, t[n]);
  return e;
}, nd = (e, t) => LCe(e, DCe(t)), FCe = (e, t) => {
  var n = {};
  for (var r in e)
    RW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Lb)
    for (var r of Lb(e))
      t.indexOf(r) < 0 && TW.call(e, r) && (n[r] = e[r]);
  return n;
};
const MCe = {
  noCopy: !1,
  copyLabel: "Copy code",
  copiedLabel: "Copied",
  withLineNumbers: !1,
  trim: !0,
  highlightLines: {},
  scrollAreaComponent: Dp,
  getPrismTheme: ICe
}, UP = b.forwardRef((e, t) => {
  const n = Te("Prism", MCe, e), {
    className: r,
    children: o,
    language: i,
    noCopy: a,
    classNames: l,
    styles: s,
    copyLabel: c,
    copiedLabel: p,
    withLineNumbers: f,
    highlightLines: m,
    scrollAreaComponent: h,
    colorScheme: g,
    trim: v,
    unstyled: S,
    radius: w,
    getPrismTheme: x,
    variant: k
  } = n, E = FCe(n, [
    "className",
    "children",
    "language",
    "noCopy",
    "classNames",
    "styles",
    "copyLabel",
    "copiedLabel",
    "withLineNumbers",
    "highlightLines",
    "scrollAreaComponent",
    "colorScheme",
    "trim",
    "unstyled",
    "radius",
    "getPrismTheme",
    "variant"
  ]), O = v && typeof o == "string" ? o.trim() : o, C = O.split(`
`).length.toString().length, R = Yn(), L = n8(), D = g || R.colorScheme, { classes: N, cx: H } = ACe({
    colorScheme: D,
    native: h !== Dp,
    maxLineSize: C,
    radius: w
  }, { name: "Prism", classNames: l, styles: s, unstyled: S, variant: k });
  return /* @__PURE__ */ P.createElement(qe, nd(ju({
    className: H(N.root, r),
    ref: t
  }, E), {
    translate: "no"
  }), !a && /* @__PURE__ */ P.createElement(fr, {
    label: L.copied ? p : c,
    position: "left",
    withArrow: !0,
    arrowSize: 6,
    offset: 6,
    color: L.copied ? "teal" : void 0,
    unstyled: S
  }, /* @__PURE__ */ P.createElement(jn, {
    className: N.copy,
    "aria-label": L.copied ? p : c,
    onClick: () => L.copy(O),
    unstyled: S
  }, /* @__PURE__ */ P.createElement(PW, {
    copied: L.copied
  }))), /* @__PURE__ */ P.createElement(jCe, nd(ju({}, ECe), {
    theme: x(R, D),
    code: O,
    language: i
  }), ({
    className: B,
    style: K,
    tokens: W,
    getLineProps: U,
    getTokenProps: Q
  }) => /* @__PURE__ */ P.createElement(h, {
    className: N.scrollArea,
    dir: "ltr"
  }, /* @__PURE__ */ P.createElement("pre", {
    className: H(N.code, B),
    style: K,
    dir: "ltr"
  }, W.map((J, q) => {
    var ee, A, X, ie;
    if (q === W.length - 1 && J.length === 1 && J[0].content === `
`)
      return null;
    const j = q + 1, le = U({ line: J, key: q }), re = j in m, he = D === "dark" ? R.fn.rgba(R.fn.themeColor((ee = m[j]) == null ? void 0 : ee.color, 9), 0.25) : R.fn.themeColor((A = m[j]) == null ? void 0 : A.color, 0);
    return /* @__PURE__ */ P.createElement("div", nd(ju({}, le), {
      className: H(N.line, le.className),
      style: ju({}, re ? { backgroundColor: he } : null)
    }), f && /* @__PURE__ */ P.createElement("div", {
      className: N.lineNumber,
      style: {
        color: re ? R.fn.themeColor((X = m[j]) == null ? void 0 : X.color, D === "dark" ? 5 : 8) : void 0
      }
    }, ((ie = m[j]) == null ? void 0 : ie.label) || j), /* @__PURE__ */ P.createElement("div", {
      className: N.lineContent
    }, J.map((xe, ke) => {
      var Ae, pe;
      const Me = Q({ token: xe, key: ke });
      return /* @__PURE__ */ P.createElement("span", nd(ju({}, Me), {
        style: nd(ju({}, Me.style), {
          color: re ? R.fn.themeColor((Ae = m[j]) == null ? void 0 : Ae.color, D === "dark" ? 5 : 8) : (pe = Me == null ? void 0 : Me.style) == null ? void 0 : pe.color
        })
      }));
    })));
  }).filter(Boolean)))));
});
UP.displayName = "@mantine/prism/Prism";
var BCe = Ee((e, { radius: t }) => ({
  tab: {
    paddingLeft: e.spacing.sm,
    paddingRight: e.spacing.sm,
    height: F(34),
    border: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[3]}`,
    borderBottom: 0,
    fontSize: e.fontSizes.sm,
    color: e.colorScheme === "dark" ? e.colors.dark[1] : e.colors.gray[7],
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
    borderRadius: 0,
    "&:first-of-type": {
      borderTopLeftRadius: e.radius.sm
    },
    "&:not(:first-of-type)": {
      borderLeft: 0
    },
    "&:last-of-type": {
      borderTopRightRadius: e.radius.sm
    },
    "&:hover": {
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.colors.gray[0]
    },
    "&[data-active]": {
      color: e.colorScheme === "dark" ? e.white : e.black,
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[8] : e.fn.rgba(e.colors.gray[0], 0.65),
      "&::before": {
        backgroundColor: "transparent"
      }
    }
  },
  prism: {
    borderRadius: e.fn.radius(t),
    borderTopRightRadius: 0,
    borderTopLeftRadius: 0,
    border: `${F(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`,
    borderTop: 0,
    overflow: "hidden"
  },
  code: {
    borderTopRightRadius: 0,
    borderTopLeftRadius: 0,
    border: 0
  }
}));
const jW = BCe;
var UCe = Object.defineProperty, HCe = Object.defineProperties, WCe = Object.getOwnPropertyDescriptors, Db = Object.getOwnPropertySymbols, NW = Object.prototype.hasOwnProperty, $W = Object.prototype.propertyIsEnumerable, NA = (e, t, n) => t in e ? UCe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, IW = (e, t) => {
  for (var n in t || (t = {}))
    NW.call(t, n) && NA(e, n, t[n]);
  if (Db)
    for (var n of Db(t))
      $W.call(t, n) && NA(e, n, t[n]);
  return e;
}, VCe = (e, t) => HCe(e, WCe(t)), qCe = (e, t) => {
  var n = {};
  for (var r in e)
    NW.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Db)
    for (var r of Db(e))
      t.indexOf(r) < 0 && $W.call(e, r) && (n[r] = e[r]);
  return n;
};
function GCe(e) {
  const { classes: t } = jW({ radius: e.radius });
  return /* @__PURE__ */ P.createElement(zr, VCe(IW({}, e), {
    variant: "outline",
    classNames: { tab: t.tab },
    translate: "no"
  }));
}
function KCe(e) {
  var t = e, {
    language: n,
    children: r,
    radius: o,
    noCopy: i,
    copyLabel: a,
    copiedLabel: l,
    withLineNumbers: s,
    highlightLines: c,
    scrollAreaComponent: p,
    trim: f,
    getPrismTheme: m,
    colorScheme: h,
    variant: g
  } = t, v = qCe(t, [
    "language",
    "children",
    "radius",
    "noCopy",
    "copyLabel",
    "copiedLabel",
    "withLineNumbers",
    "highlightLines",
    "scrollAreaComponent",
    "trim",
    "getPrismTheme",
    "colorScheme",
    "variant"
  ]);
  const { classes: S } = jW({ radius: o });
  return /* @__PURE__ */ P.createElement(zr.Panel, IW({}, v), /* @__PURE__ */ P.createElement(UP, {
    language: n,
    classNames: { root: S.prism, code: S.code },
    radius: o,
    noCopy: i,
    copyLabel: a,
    copiedLabel: l,
    withLineNumbers: s,
    highlightLines: c,
    scrollAreaComponent: p,
    trim: f,
    getPrismTheme: m,
    colorScheme: h,
    variant: g
  }, r));
}
const sf = UP;
sf.Tabs = GCe;
sf.Tab = zr.Tab;
sf.TabsList = zr.List;
sf.Panel = KCe;
const $A = ["http", "https", "mailto", "tel"];
function YCe(e) {
  const t = (e || "").trim(), n = t.charAt(0);
  if (n === "#" || n === "/")
    return t;
  const r = t.indexOf(":");
  if (r === -1)
    return t;
  let o = -1;
  for (; ++o < $A.length; ) {
    const i = $A[o];
    if (r === i.length && t.slice(0, i.length).toLowerCase() === i)
      return t;
  }
  return o = t.indexOf("?"), o !== -1 && r > o || (o = t.indexOf("#"), o !== -1 && r > o) ? t : "javascript:void(0)";
}
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
var XCe = function(e) {
  return e != null && e.constructor != null && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
};
const AW = /* @__PURE__ */ Np(XCe);
function Fd(e) {
  return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? IA(e.position) : "start" in e || "end" in e ? IA(e) : "line" in e || "column" in e ? tE(e) : "";
}
function tE(e) {
  return AA(e && e.line) + ":" + AA(e && e.column);
}
function IA(e) {
  return tE(e && e.start) + "-" + tE(e && e.end);
}
function AA(e) {
  return e && typeof e == "number" ? e : 1;
}
class Xo extends Error {
  /**
   * Create a message for `reason` at `place` from `origin`.
   *
   * When an error is passed in as `reason`, the `stack` is copied.
   *
   * @param {string | Error | VFileMessage} reason
   *   Reason for message, uses the stack and message of the error if given.
   *
   *   > 👉 **Note**: you should use markdown.
   * @param {Node | NodeLike | Position | Point | null | undefined} [place]
   *   Place in file where the message occurred.
   * @param {string | null | undefined} [origin]
   *   Place in code where the message originates (example:
   *   `'my-package:my-rule'` or `'my-rule'`).
   * @returns
   *   Instance of `VFileMessage`.
   */
  // To do: next major: expose `undefined` everywhere instead of `null`.
  constructor(t, n, r) {
    const o = [null, null];
    let i = {
      // @ts-expect-error: we always follows the structure of `position`.
      start: { line: null, column: null },
      // @ts-expect-error: "
      end: { line: null, column: null }
    };
    if (super(), typeof n == "string" && (r = n, n = void 0), typeof r == "string") {
      const a = r.indexOf(":");
      a === -1 ? o[1] = r : (o[0] = r.slice(0, a), o[1] = r.slice(a + 1));
    }
    n && ("type" in n || "position" in n ? n.position && (i = n.position) : "start" in n || "end" in n ? i = n : ("line" in n || "column" in n) && (i.start = n)), this.name = Fd(n) || "1:1", this.message = typeof t == "object" ? t.message : t, this.stack = "", typeof t == "object" && t.stack && (this.stack = t.stack), this.reason = this.message, this.fatal, this.line = i.start.line, this.column = i.start.column, this.position = i, this.source = o[0], this.ruleId = o[1], this.file, this.actual, this.expected, this.url, this.note;
  }
}
Xo.prototype.file = "";
Xo.prototype.name = "";
Xo.prototype.reason = "";
Xo.prototype.message = "";
Xo.prototype.stack = "";
Xo.prototype.fatal = null;
Xo.prototype.column = null;
Xo.prototype.line = null;
Xo.prototype.source = null;
Xo.prototype.ruleId = null;
Xo.prototype.position = null;
const ji = { basename: ZCe, dirname: QCe, extname: JCe, join: ePe, sep: "/" };
function ZCe(e, t) {
  if (t !== void 0 && typeof t != "string")
    throw new TypeError('"ext" argument must be a string');
  Bp(e);
  let n = 0, r = -1, o = e.length, i;
  if (t === void 0 || t.length === 0 || t.length > e.length) {
    for (; o--; )
      if (e.charCodeAt(o) === 47) {
        if (i) {
          n = o + 1;
          break;
        }
      } else
        r < 0 && (i = !0, r = o + 1);
    return r < 0 ? "" : e.slice(n, r);
  }
  if (t === e)
    return "";
  let a = -1, l = t.length - 1;
  for (; o--; )
    if (e.charCodeAt(o) === 47) {
      if (i) {
        n = o + 1;
        break;
      }
    } else
      a < 0 && (i = !0, a = o + 1), l > -1 && (e.charCodeAt(o) === t.charCodeAt(l--) ? l < 0 && (r = o) : (l = -1, r = a));
  return n === r ? r = a : r < 0 && (r = e.length), e.slice(n, r);
}
function QCe(e) {
  if (Bp(e), e.length === 0)
    return ".";
  let t = -1, n = e.length, r;
  for (; --n; )
    if (e.charCodeAt(n) === 47) {
      if (r) {
        t = n;
        break;
      }
    } else
      r || (r = !0);
  return t < 0 ? e.charCodeAt(0) === 47 ? "/" : "." : t === 1 && e.charCodeAt(0) === 47 ? "//" : e.slice(0, t);
}
function JCe(e) {
  Bp(e);
  let t = e.length, n = -1, r = 0, o = -1, i = 0, a;
  for (; t--; ) {
    const l = e.charCodeAt(t);
    if (l === 47) {
      if (a) {
        r = t + 1;
        break;
      }
      continue;
    }
    n < 0 && (a = !0, n = t + 1), l === 46 ? o < 0 ? o = t : i !== 1 && (i = 1) : o > -1 && (i = -1);
  }
  return o < 0 || n < 0 || // We saw a non-dot character immediately before the dot.
  i === 0 || // The (right-most) trimmed path component is exactly `..`.
  i === 1 && o === n - 1 && o === r + 1 ? "" : e.slice(o, n);
}
function ePe(...e) {
  let t = -1, n;
  for (; ++t < e.length; )
    Bp(e[t]), e[t] && (n = n === void 0 ? e[t] : n + "/" + e[t]);
  return n === void 0 ? "." : tPe(n);
}
function tPe(e) {
  Bp(e);
  const t = e.charCodeAt(0) === 47;
  let n = nPe(e, !t);
  return n.length === 0 && !t && (n = "."), n.length > 0 && e.charCodeAt(e.length - 1) === 47 && (n += "/"), t ? "/" + n : n;
}
function nPe(e, t) {
  let n = "", r = 0, o = -1, i = 0, a = -1, l, s;
  for (; ++a <= e.length; ) {
    if (a < e.length)
      l = e.charCodeAt(a);
    else {
      if (l === 47)
        break;
      l = 47;
    }
    if (l === 47) {
      if (!(o === a - 1 || i === 1))
        if (o !== a - 1 && i === 2) {
          if (n.length < 2 || r !== 2 || n.charCodeAt(n.length - 1) !== 46 || n.charCodeAt(n.length - 2) !== 46) {
            if (n.length > 2) {
              if (s = n.lastIndexOf("/"), s !== n.length - 1) {
                s < 0 ? (n = "", r = 0) : (n = n.slice(0, s), r = n.length - 1 - n.lastIndexOf("/")), o = a, i = 0;
                continue;
              }
            } else if (n.length > 0) {
              n = "", r = 0, o = a, i = 0;
              continue;
            }
          }
          t && (n = n.length > 0 ? n + "/.." : "..", r = 2);
        } else
          n.length > 0 ? n += "/" + e.slice(o + 1, a) : n = e.slice(o + 1, a), r = a - o - 1;
      o = a, i = 0;
    } else
      l === 46 && i > -1 ? i++ : i = -1;
  }
  return n;
}
function Bp(e) {
  if (typeof e != "string")
    throw new TypeError(
      "Path must be a string. Received " + JSON.stringify(e)
    );
}
const rPe = { cwd: oPe };
function oPe() {
  return "/";
}
function nE(e) {
  return e !== null && typeof e == "object" && // @ts-expect-error: indexable.
  e.href && // @ts-expect-error: indexable.
  e.origin;
}
function iPe(e) {
  if (typeof e == "string")
    e = new URL(e);
  else if (!nE(e)) {
    const t = new TypeError(
      'The "path" argument must be of type string or an instance of URL. Received `' + e + "`"
    );
    throw t.code = "ERR_INVALID_ARG_TYPE", t;
  }
  if (e.protocol !== "file:") {
    const t = new TypeError("The URL must be of scheme file");
    throw t.code = "ERR_INVALID_URL_SCHEME", t;
  }
  return aPe(e);
}
function aPe(e) {
  if (e.hostname !== "") {
    const r = new TypeError(
      'File URL host must be "localhost" or empty on darwin'
    );
    throw r.code = "ERR_INVALID_FILE_URL_HOST", r;
  }
  const t = e.pathname;
  let n = -1;
  for (; ++n < t.length; )
    if (t.charCodeAt(n) === 37 && t.charCodeAt(n + 1) === 50) {
      const r = t.charCodeAt(n + 2);
      if (r === 70 || r === 102) {
        const o = new TypeError(
          "File URL path must not include encoded / characters"
        );
        throw o.code = "ERR_INVALID_FILE_URL_PATH", o;
      }
    }
  return decodeURIComponent(t);
}
const T_ = ["history", "path", "basename", "stem", "extname", "dirname"];
class zW {
  /**
   * Create a new virtual file.
   *
   * `options` is treated as:
   *
   * *   `string` or `Buffer` — `{value: options}`
   * *   `URL` — `{path: options}`
   * *   `VFile` — shallow copies its data over to the new file
   * *   `object` — all fields are shallow copied over to the new file
   *
   * Path related fields are set in the following order (least specific to
   * most specific): `history`, `path`, `basename`, `stem`, `extname`,
   * `dirname`.
   *
   * You cannot set `dirname` or `extname` without setting either `history`,
   * `path`, `basename`, or `stem` too.
   *
   * @param {Compatible | null | undefined} [value]
   *   File value.
   * @returns
   *   New instance.
   */
  constructor(t) {
    let n;
    t ? typeof t == "string" || lPe(t) ? n = { value: t } : nE(t) ? n = { path: t } : n = t : n = {}, this.data = {}, this.messages = [], this.history = [], this.cwd = rPe.cwd(), this.value, this.stored, this.result, this.map;
    let r = -1;
    for (; ++r < T_.length; ) {
      const i = T_[r];
      i in n && n[i] !== void 0 && n[i] !== null && (this[i] = i === "history" ? [...n[i]] : n[i]);
    }
    let o;
    for (o in n)
      T_.includes(o) || (this[o] = n[o]);
  }
  /**
   * Get the full path (example: `'~/index.min.js'`).
   *
   * @returns {string}
   */
  get path() {
    return this.history[this.history.length - 1];
  }
  /**
   * Set the full path (example: `'~/index.min.js'`).
   *
   * Cannot be nullified.
   * You can set a file URL (a `URL` object with a `file:` protocol) which will
   * be turned into a path with `url.fileURLToPath`.
   *
   * @param {string | URL} path
   */
  set path(t) {
    nE(t) && (t = iPe(t)), N_(t, "path"), this.path !== t && this.history.push(t);
  }
  /**
   * Get the parent path (example: `'~'`).
   */
  get dirname() {
    return typeof this.path == "string" ? ji.dirname(this.path) : void 0;
  }
  /**
   * Set the parent path (example: `'~'`).
   *
   * Cannot be set if there’s no `path` yet.
   */
  set dirname(t) {
    zA(this.basename, "dirname"), this.path = ji.join(t || "", this.basename);
  }
  /**
   * Get the basename (including extname) (example: `'index.min.js'`).
   */
  get basename() {
    return typeof this.path == "string" ? ji.basename(this.path) : void 0;
  }
  /**
   * Set basename (including extname) (`'index.min.js'`).
   *
   * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
   * on windows).
   * Cannot be nullified (use `file.path = file.dirname` instead).
   */
  set basename(t) {
    N_(t, "basename"), j_(t, "basename"), this.path = ji.join(this.dirname || "", t);
  }
  /**
   * Get the extname (including dot) (example: `'.js'`).
   */
  get extname() {
    return typeof this.path == "string" ? ji.extname(this.path) : void 0;
  }
  /**
   * Set the extname (including dot) (example: `'.js'`).
   *
   * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
   * on windows).
   * Cannot be set if there’s no `path` yet.
   */
  set extname(t) {
    if (j_(t, "extname"), zA(this.dirname, "extname"), t) {
      if (t.charCodeAt(0) !== 46)
        throw new Error("`extname` must start with `.`");
      if (t.includes(".", 1))
        throw new Error("`extname` cannot contain multiple dots");
    }
    this.path = ji.join(this.dirname, this.stem + (t || ""));
  }
  /**
   * Get the stem (basename w/o extname) (example: `'index.min'`).
   */
  get stem() {
    return typeof this.path == "string" ? ji.basename(this.path, this.extname) : void 0;
  }
  /**
   * Set the stem (basename w/o extname) (example: `'index.min'`).
   *
   * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
   * on windows).
   * Cannot be nullified (use `file.path = file.dirname` instead).
   */
  set stem(t) {
    N_(t, "stem"), j_(t, "stem"), this.path = ji.join(this.dirname || "", t + (this.extname || ""));
  }
  /**
   * Serialize the file.
   *
   * @param {BufferEncoding | null | undefined} [encoding='utf8']
   *   Character encoding to understand `value` as when it’s a `Buffer`
   *   (default: `'utf8'`).
   * @returns {string}
   *   Serialized file.
   */
  toString(t) {
    return (this.value || "").toString(t || void 0);
  }
  /**
   * Create a warning message associated with the file.
   *
   * Its `fatal` is set to `false` and `file` is set to the current file path.
   * Its added to `file.messages`.
   *
   * @param {string | Error | VFileMessage} reason
   *   Reason for message, uses the stack and message of the error if given.
   * @param {Node | NodeLike | Position | Point | null | undefined} [place]
   *   Place in file where the message occurred.
   * @param {string | null | undefined} [origin]
   *   Place in code where the message originates (example:
   *   `'my-package:my-rule'` or `'my-rule'`).
   * @returns {VFileMessage}
   *   Message.
   */
  message(t, n, r) {
    const o = new Xo(t, n, r);
    return this.path && (o.name = this.path + ":" + o.name, o.file = this.path), o.fatal = !1, this.messages.push(o), o;
  }
  /**
   * Create an info message associated with the file.
   *
   * Its `fatal` is set to `null` and `file` is set to the current file path.
   * Its added to `file.messages`.
   *
   * @param {string | Error | VFileMessage} reason
   *   Reason for message, uses the stack and message of the error if given.
   * @param {Node | NodeLike | Position | Point | null | undefined} [place]
   *   Place in file where the message occurred.
   * @param {string | null | undefined} [origin]
   *   Place in code where the message originates (example:
   *   `'my-package:my-rule'` or `'my-rule'`).
   * @returns {VFileMessage}
   *   Message.
   */
  info(t, n, r) {
    const o = this.message(t, n, r);
    return o.fatal = null, o;
  }
  /**
   * Create a fatal error associated with the file.
   *
   * Its `fatal` is set to `true` and `file` is set to the current file path.
   * Its added to `file.messages`.
   *
   * > 👉 **Note**: a fatal error means that a file is no longer processable.
   *
   * @param {string | Error | VFileMessage} reason
   *   Reason for message, uses the stack and message of the error if given.
   * @param {Node | NodeLike | Position | Point | null | undefined} [place]
   *   Place in file where the message occurred.
   * @param {string | null | undefined} [origin]
   *   Place in code where the message originates (example:
   *   `'my-package:my-rule'` or `'my-rule'`).
   * @returns {never}
   *   Message.
   * @throws {VFileMessage}
   *   Message.
   */
  fail(t, n, r) {
    const o = this.message(t, n, r);
    throw o.fatal = !0, o;
  }
}
function j_(e, t) {
  if (e && e.includes(ji.sep))
    throw new Error(
      "`" + t + "` cannot be a path: did not expect `" + ji.sep + "`"
    );
}
function N_(e, t) {
  if (!e)
    throw new Error("`" + t + "` cannot be empty");
}
function zA(e, t) {
  if (!e)
    throw new Error("Setting `" + t + "` requires `path` to be set too");
}
function lPe(e) {
  return AW(e);
}
function LA(e) {
  if (e)
    throw e;
}
var Xg = Object.prototype.hasOwnProperty, LW = Object.prototype.toString, DA = Object.defineProperty, FA = Object.getOwnPropertyDescriptor, MA = function(e) {
  return typeof Array.isArray == "function" ? Array.isArray(e) : LW.call(e) === "[object Array]";
}, BA = function(e) {
  if (!e || LW.call(e) !== "[object Object]")
    return !1;
  var t = Xg.call(e, "constructor"), n = e.constructor && e.constructor.prototype && Xg.call(e.constructor.prototype, "isPrototypeOf");
  if (e.constructor && !t && !n)
    return !1;
  var r;
  for (r in e)
    ;
  return typeof r > "u" || Xg.call(e, r);
}, UA = function(e, t) {
  DA && t.name === "__proto__" ? DA(e, t.name, {
    enumerable: !0,
    configurable: !0,
    value: t.newValue,
    writable: !0
  }) : e[t.name] = t.newValue;
}, HA = function(e, t) {
  if (t === "__proto__")
    if (Xg.call(e, t)) {
      if (FA)
        return FA(e, t).value;
    } else
      return;
  return e[t];
}, sPe = function e() {
  var t, n, r, o, i, a, l = arguments[0], s = 1, c = arguments.length, p = !1;
  for (typeof l == "boolean" && (p = l, l = arguments[1] || {}, s = 2), (l == null || typeof l != "object" && typeof l != "function") && (l = {}); s < c; ++s)
    if (t = arguments[s], t != null)
      for (n in t)
        r = HA(l, n), o = HA(t, n), l !== o && (p && o && (BA(o) || (i = MA(o))) ? (i ? (i = !1, a = r && MA(r) ? r : []) : a = r && BA(r) ? r : {}, UA(l, { name: n, newValue: e(p, a, o) })) : typeof o < "u" && UA(l, { name: n, newValue: o }));
  return l;
};
const WA = /* @__PURE__ */ Np(sPe);
function rE(e) {
  if (typeof e != "object" || e === null)
    return !1;
  const t = Object.getPrototypeOf(e);
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
}
function uPe() {
  const e = [], t = { run: n, use: r };
  return t;
  function n(...o) {
    let i = -1;
    const a = o.pop();
    if (typeof a != "function")
      throw new TypeError("Expected function as last argument, not " + a);
    l(null, ...o);
    function l(s, ...c) {
      const p = e[++i];
      let f = -1;
      if (s) {
        a(s);
        return;
      }
      for (; ++f < o.length; )
        (c[f] === null || c[f] === void 0) && (c[f] = o[f]);
      o = c, p ? cPe(p, l)(...c) : a(null, ...c);
    }
  }
  function r(o) {
    if (typeof o != "function")
      throw new TypeError(
        "Expected `middelware` to be a function, not " + o
      );
    return e.push(o), t;
  }
}
function cPe(e, t) {
  let n;
  return r;
  function r(...a) {
    const l = e.length > a.length;
    let s;
    l && a.push(o);
    try {
      s = e.apply(this, a);
    } catch (c) {
      const p = (
        /** @type {Error} */
        c
      );
      if (l && n)
        throw p;
      return o(p);
    }
    l || (s instanceof Promise ? s.then(i, o) : s instanceof Error ? o(s) : i(s));
  }
  function o(a, ...l) {
    n || (n = !0, t(a, ...l));
  }
  function i(a) {
    o(null, a);
  }
}
const fPe = FW().freeze(), DW = {}.hasOwnProperty;
function FW() {
  const e = uPe(), t = [];
  let n = {}, r, o = -1;
  return i.data = a, i.Parser = void 0, i.Compiler = void 0, i.freeze = l, i.attachers = t, i.use = s, i.parse = c, i.stringify = p, i.run = f, i.runSync = m, i.process = h, i.processSync = g, i;
  function i() {
    const v = FW();
    let S = -1;
    for (; ++S < t.length; )
      v.use(...t[S]);
    return v.data(WA(!0, {}, n)), v;
  }
  function a(v, S) {
    return typeof v == "string" ? arguments.length === 2 ? (A_("data", r), n[v] = S, i) : DW.call(n, v) && n[v] || null : v ? (A_("data", r), n = v, i) : n;
  }
  function l() {
    if (r)
      return i;
    for (; ++o < t.length; ) {
      const [v, ...S] = t[o];
      if (S[0] === !1)
        continue;
      S[0] === !0 && (S[0] = void 0);
      const w = v.call(i, ...S);
      typeof w == "function" && e.use(w);
    }
    return r = !0, o = Number.POSITIVE_INFINITY, i;
  }
  function s(v, ...S) {
    let w;
    if (A_("use", r), v != null)
      if (typeof v == "function")
        O(v, ...S);
      else if (typeof v == "object")
        Array.isArray(v) ? E(v) : k(v);
      else
        throw new TypeError("Expected usable value, not `" + v + "`");
    return w && (n.settings = Object.assign(n.settings || {}, w)), i;
    function x(C) {
      if (typeof C == "function")
        O(C);
      else if (typeof C == "object")
        if (Array.isArray(C)) {
          const [R, ...L] = C;
          O(R, ...L);
        } else
          k(C);
      else
        throw new TypeError("Expected usable value, not `" + C + "`");
    }
    function k(C) {
      E(C.plugins), C.settings && (w = Object.assign(w || {}, C.settings));
    }
    function E(C) {
      let R = -1;
      if (C != null)
        if (Array.isArray(C))
          for (; ++R < C.length; ) {
            const L = C[R];
            x(L);
          }
        else
          throw new TypeError("Expected a list of plugins, not `" + C + "`");
    }
    function O(C, R) {
      let L = -1, D;
      for (; ++L < t.length; )
        if (t[L][0] === C) {
          D = t[L];
          break;
        }
      D ? (rE(D[1]) && rE(R) && (R = WA(!0, D[1], R)), D[1] = R) : t.push([...arguments]);
    }
  }
  function c(v) {
    i.freeze();
    const S = rd(v), w = i.Parser;
    return $_("parse", w), VA(w, "parse") ? new w(String(S), S).parse() : w(String(S), S);
  }
  function p(v, S) {
    i.freeze();
    const w = rd(S), x = i.Compiler;
    return I_("stringify", x), qA(v), VA(x, "compile") ? new x(v, w).compile() : x(v, w);
  }
  function f(v, S, w) {
    if (qA(v), i.freeze(), !w && typeof S == "function" && (w = S, S = void 0), !w)
      return new Promise(x);
    x(null, w);
    function x(k, E) {
      e.run(v, rd(S), O);
      function O(C, R, L) {
        R = R || v, C ? E(C) : k ? k(R) : w(null, R, L);
      }
    }
  }
  function m(v, S) {
    let w, x;
    return i.run(v, S, k), GA("runSync", "run", x), w;
    function k(E, O) {
      LA(E), w = O, x = !0;
    }
  }
  function h(v, S) {
    if (i.freeze(), $_("process", i.Parser), I_("process", i.Compiler), !S)
      return new Promise(w);
    w(null, S);
    function w(x, k) {
      const E = rd(v);
      i.run(i.parse(E), E, (C, R, L) => {
        if (C || !R || !L)
          O(C);
        else {
          const D = i.stringify(R, L);
          D == null || (mPe(D) ? L.value = D : L.result = D), O(C, L);
        }
      });
      function O(C, R) {
        C || !R ? k(C) : x ? x(R) : S(null, R);
      }
    }
  }
  function g(v) {
    let S;
    i.freeze(), $_("processSync", i.Parser), I_("processSync", i.Compiler);
    const w = rd(v);
    return i.process(w, x), GA("processSync", "process", S), w;
    function x(k) {
      S = !0, LA(k);
    }
  }
}
function VA(e, t) {
  return typeof e == "function" && // Prototypes do exist.
  // type-coverage:ignore-next-line
  e.prototype && // A function with keys in its prototype is probably a constructor.
  // Classes’ prototype methods are not enumerable, so we check if some value
  // exists in the prototype.
  // type-coverage:ignore-next-line
  (dPe(e.prototype) || t in e.prototype);
}
function dPe(e) {
  let t;
  for (t in e)
    if (DW.call(e, t))
      return !0;
  return !1;
}
function $_(e, t) {
  if (typeof t != "function")
    throw new TypeError("Cannot `" + e + "` without `Parser`");
}
function I_(e, t) {
  if (typeof t != "function")
    throw new TypeError("Cannot `" + e + "` without `Compiler`");
}
function A_(e, t) {
  if (t)
    throw new Error(
      "Cannot call `" + e + "` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`."
    );
}
function qA(e) {
  if (!rE(e) || typeof e.type != "string")
    throw new TypeError("Expected node, got `" + e + "`");
}
function GA(e, t, n) {
  if (!n)
    throw new Error(
      "`" + e + "` finished async. Use `" + t + "` instead"
    );
}
function rd(e) {
  return pPe(e) ? e : new zW(e);
}
function pPe(e) {
  return !!(e && typeof e == "object" && "message" in e && "messages" in e);
}
function mPe(e) {
  return typeof e == "string" || AW(e);
}
const hPe = {};
function gPe(e, t) {
  const n = t || hPe, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, o = typeof n.includeHtml == "boolean" ? n.includeHtml : !0;
  return MW(e, r, o);
}
function MW(e, t, n) {
  if (yPe(e)) {
    if ("value" in e)
      return e.type === "html" && !n ? "" : e.value;
    if (t && "alt" in e && e.alt)
      return e.alt;
    if ("children" in e)
      return KA(e.children, t, n);
  }
  return Array.isArray(e) ? KA(e, t, n) : "";
}
function KA(e, t, n) {
  const r = [];
  let o = -1;
  for (; ++o < e.length; )
    r[o] = MW(e[o], t, n);
  return r.join("");
}
function yPe(e) {
  return !!(e && typeof e == "object");
}
function go(e, t, n, r) {
  const o = e.length;
  let i = 0, a;
  if (t < 0 ? t = -t > o ? 0 : o + t : t = t > o ? o : t, n = n > 0 ? n : 0, r.length < 1e4)
    a = Array.from(r), a.unshift(t, n), e.splice(...a);
  else
    for (n && e.splice(t, n); i < r.length; )
      a = r.slice(i, i + 1e4), a.unshift(t, 0), e.splice(...a), i += 1e4, t += 1e4;
}
function Do(e, t) {
  return e.length > 0 ? (go(e, e.length, 0, t), e) : t;
}
const YA = {}.hasOwnProperty;
function BW(e) {
  const t = {};
  let n = -1;
  for (; ++n < e.length; )
    vPe(t, e[n]);
  return t;
}
function vPe(e, t) {
  let n;
  for (n in t) {
    const r = (YA.call(e, n) ? e[n] : void 0) || (e[n] = {}), o = t[n];
    let i;
    if (o)
      for (i in o) {
        YA.call(r, i) || (r[i] = []);
        const a = o[i];
        bPe(
          // @ts-expect-error Looks like a list.
          r[i],
          Array.isArray(a) ? a : a ? [a] : []
        );
      }
  }
}
function bPe(e, t) {
  let n = -1;
  const r = [];
  for (; ++n < t.length; )
    (t[n].add === "after" ? e : r).push(t[n]);
  go(e, 0, 0, r);
}
const wPe = /[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/, wr = Kl(/[A-Za-z]/), sr = Kl(/[\dA-Za-z]/), xPe = Kl(/[#-'*+\--9=?A-Z^-~]/);
function Fb(e) {
  return (
    // Special whitespace codes (which have negative values), C0 and Control
    // character DEL
    e !== null && (e < 32 || e === 127)
  );
}
const oE = Kl(/\d/), SPe = Kl(/[\dA-Fa-f]/), kPe = Kl(/[!-/:-@[-`{-~]/);
function Ke(e) {
  return e !== null && e < -2;
}
function Mt(e) {
  return e !== null && (e < 0 || e === 32);
}
function ht(e) {
  return e === -2 || e === -1 || e === 32;
}
const Rx = Kl(wPe), Ws = Kl(/\s/);
function Kl(e) {
  return t;
  function t(n) {
    return n !== null && e.test(String.fromCharCode(n));
  }
}
function bt(e, t, n, r) {
  const o = r ? r - 1 : Number.POSITIVE_INFINITY;
  let i = 0;
  return a;
  function a(s) {
    return ht(s) ? (e.enter(n), l(s)) : t(s);
  }
  function l(s) {
    return ht(s) && i++ < o ? (e.consume(s), l) : (e.exit(n), t(s));
  }
}
const _Pe = {
  tokenize: OPe
};
function OPe(e) {
  const t = e.attempt(
    this.parser.constructs.contentInitial,
    r,
    o
  );
  let n;
  return t;
  function r(l) {
    if (l === null) {
      e.consume(l);
      return;
    }
    return e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), bt(e, t, "linePrefix");
  }
  function o(l) {
    return e.enter("paragraph"), i(l);
  }
  function i(l) {
    const s = e.enter("chunkText", {
      contentType: "text",
      previous: n
    });
    return n && (n.next = s), n = s, a(l);
  }
  function a(l) {
    if (l === null) {
      e.exit("chunkText"), e.exit("paragraph"), e.consume(l);
      return;
    }
    return Ke(l) ? (e.consume(l), e.exit("chunkText"), i) : (e.consume(l), a);
  }
}
const EPe = {
  tokenize: CPe
}, XA = {
  tokenize: PPe
};
function CPe(e) {
  const t = this, n = [];
  let r = 0, o, i, a;
  return l;
  function l(k) {
    if (r < n.length) {
      const E = n[r];
      return t.containerState = E[1], e.attempt(
        E[0].continuation,
        s,
        c
      )(k);
    }
    return c(k);
  }
  function s(k) {
    if (r++, t.containerState._closeFlow) {
      t.containerState._closeFlow = void 0, o && x();
      const E = t.events.length;
      let O = E, C;
      for (; O--; )
        if (t.events[O][0] === "exit" && t.events[O][1].type === "chunkFlow") {
          C = t.events[O][1].end;
          break;
        }
      w(r);
      let R = E;
      for (; R < t.events.length; )
        t.events[R][1].end = Object.assign({}, C), R++;
      return go(
        t.events,
        O + 1,
        0,
        t.events.slice(E)
      ), t.events.length = R, c(k);
    }
    return l(k);
  }
  function c(k) {
    if (r === n.length) {
      if (!o)
        return m(k);
      if (o.currentConstruct && o.currentConstruct.concrete)
        return g(k);
      t.interrupt = !!(o.currentConstruct && !o._gfmTableDynamicInterruptHack);
    }
    return t.containerState = {}, e.check(
      XA,
      p,
      f
    )(k);
  }
  function p(k) {
    return o && x(), w(r), m(k);
  }
  function f(k) {
    return t.parser.lazy[t.now().line] = r !== n.length, a = t.now().offset, g(k);
  }
  function m(k) {
    return t.containerState = {}, e.attempt(
      XA,
      h,
      g
    )(k);
  }
  function h(k) {
    return r++, n.push([t.currentConstruct, t.containerState]), m(k);
  }
  function g(k) {
    if (k === null) {
      o && x(), w(0), e.consume(k);
      return;
    }
    return o = o || t.parser.flow(t.now()), e.enter("chunkFlow", {
      contentType: "flow",
      previous: i,
      _tokenizer: o
    }), v(k);
  }
  function v(k) {
    if (k === null) {
      S(e.exit("chunkFlow"), !0), w(0), e.consume(k);
      return;
    }
    return Ke(k) ? (e.consume(k), S(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, l) : (e.consume(k), v);
  }
  function S(k, E) {
    const O = t.sliceStream(k);
    if (E && O.push(null), k.previous = i, i && (i.next = k), i = k, o.defineSkip(k.start), o.write(O), t.parser.lazy[k.start.line]) {
      let C = o.events.length;
      for (; C--; )
        if (
          // The token starts before the line ending…
          o.events[C][1].start.offset < a && // …and either is not ended yet…
          (!o.events[C][1].end || // …or ends after it.
          o.events[C][1].end.offset > a)
        )
          return;
      const R = t.events.length;
      let L = R, D, N;
      for (; L--; )
        if (t.events[L][0] === "exit" && t.events[L][1].type === "chunkFlow") {
          if (D) {
            N = t.events[L][1].end;
            break;
          }
          D = !0;
        }
      for (w(r), C = R; C < t.events.length; )
        t.events[C][1].end = Object.assign({}, N), C++;
      go(
        t.events,
        L + 1,
        0,
        t.events.slice(R)
      ), t.events.length = C;
    }
  }
  function w(k) {
    let E = n.length;
    for (; E-- > k; ) {
      const O = n[E];
      t.containerState = O[1], O[0].exit.call(t, e);
    }
    n.length = k;
  }
  function x() {
    o.write([null]), i = void 0, o = void 0, t.containerState._closeFlow = void 0;
  }
}
function PPe(e, t, n) {
  return bt(
    e,
    e.attempt(this.parser.constructs.document, t, n),
    "linePrefix",
    this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
  );
}
function Mb(e) {
  if (e === null || Mt(e) || Ws(e))
    return 1;
  if (Rx(e))
    return 2;
}
function Tx(e, t, n) {
  const r = [];
  let o = -1;
  for (; ++o < e.length; ) {
    const i = e[o].resolveAll;
    i && !r.includes(i) && (t = i(t, n), r.push(i));
  }
  return t;
}
const iE = {
  name: "attention",
  tokenize: TPe,
  resolveAll: RPe
};
function RPe(e, t) {
  let n = -1, r, o, i, a, l, s, c, p;
  for (; ++n < e.length; )
    if (e[n][0] === "enter" && e[n][1].type === "attentionSequence" && e[n][1]._close) {
      for (r = n; r--; )
        if (e[r][0] === "exit" && e[r][1].type === "attentionSequence" && e[r][1]._open && // If the markers are the same:
        t.sliceSerialize(e[r][1]).charCodeAt(0) === t.sliceSerialize(e[n][1]).charCodeAt(0)) {
          if ((e[r][1]._close || e[n][1]._open) && (e[n][1].end.offset - e[n][1].start.offset) % 3 && !((e[r][1].end.offset - e[r][1].start.offset + e[n][1].end.offset - e[n][1].start.offset) % 3))
            continue;
          s = e[r][1].end.offset - e[r][1].start.offset > 1 && e[n][1].end.offset - e[n][1].start.offset > 1 ? 2 : 1;
          const f = Object.assign({}, e[r][1].end), m = Object.assign({}, e[n][1].start);
          ZA(f, -s), ZA(m, s), a = {
            type: s > 1 ? "strongSequence" : "emphasisSequence",
            start: f,
            end: Object.assign({}, e[r][1].end)
          }, l = {
            type: s > 1 ? "strongSequence" : "emphasisSequence",
            start: Object.assign({}, e[n][1].start),
            end: m
          }, i = {
            type: s > 1 ? "strongText" : "emphasisText",
            start: Object.assign({}, e[r][1].end),
            end: Object.assign({}, e[n][1].start)
          }, o = {
            type: s > 1 ? "strong" : "emphasis",
            start: Object.assign({}, a.start),
            end: Object.assign({}, l.end)
          }, e[r][1].end = Object.assign({}, a.start), e[n][1].start = Object.assign({}, l.end), c = [], e[r][1].end.offset - e[r][1].start.offset && (c = Do(c, [
            ["enter", e[r][1], t],
            ["exit", e[r][1], t]
          ])), c = Do(c, [
            ["enter", o, t],
            ["enter", a, t],
            ["exit", a, t],
            ["enter", i, t]
          ]), c = Do(
            c,
            Tx(
              t.parser.constructs.insideSpan.null,
              e.slice(r + 1, n),
              t
            )
          ), c = Do(c, [
            ["exit", i, t],
            ["enter", l, t],
            ["exit", l, t],
            ["exit", o, t]
          ]), e[n][1].end.offset - e[n][1].start.offset ? (p = 2, c = Do(c, [
            ["enter", e[n][1], t],
            ["exit", e[n][1], t]
          ])) : p = 0, go(e, r - 1, n - r + 3, c), n = r + c.length - p - 2;
          break;
        }
    }
  for (n = -1; ++n < e.length; )
    e[n][1].type === "attentionSequence" && (e[n][1].type = "data");
  return e;
}
function TPe(e, t) {
  const n = this.parser.constructs.attentionMarkers.null, r = this.previous, o = Mb(r);
  let i;
  return a;
  function a(s) {
    return i = s, e.enter("attentionSequence"), l(s);
  }
  function l(s) {
    if (s === i)
      return e.consume(s), l;
    const c = e.exit("attentionSequence"), p = Mb(s), f = !p || p === 2 && o || n.includes(s), m = !o || o === 2 && p || n.includes(r);
    return c._open = !!(i === 42 ? f : f && (o || !m)), c._close = !!(i === 42 ? m : m && (p || !f)), t(s);
  }
}
function ZA(e, t) {
  e.column += t, e.offset += t, e._bufferIndex += t;
}
const jPe = {
  name: "autolink",
  tokenize: NPe
};
function NPe(e, t, n) {
  let r = 0;
  return o;
  function o(h) {
    return e.enter("autolink"), e.enter("autolinkMarker"), e.consume(h), e.exit("autolinkMarker"), e.enter("autolinkProtocol"), i;
  }
  function i(h) {
    return wr(h) ? (e.consume(h), a) : c(h);
  }
  function a(h) {
    return h === 43 || h === 45 || h === 46 || sr(h) ? (r = 1, l(h)) : c(h);
  }
  function l(h) {
    return h === 58 ? (e.consume(h), r = 0, s) : (h === 43 || h === 45 || h === 46 || sr(h)) && r++ < 32 ? (e.consume(h), l) : (r = 0, c(h));
  }
  function s(h) {
    return h === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(h), e.exit("autolinkMarker"), e.exit("autolink"), t) : h === null || h === 32 || h === 60 || Fb(h) ? n(h) : (e.consume(h), s);
  }
  function c(h) {
    return h === 64 ? (e.consume(h), p) : xPe(h) ? (e.consume(h), c) : n(h);
  }
  function p(h) {
    return sr(h) ? f(h) : n(h);
  }
  function f(h) {
    return h === 46 ? (e.consume(h), r = 0, p) : h === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(h), e.exit("autolinkMarker"), e.exit("autolink"), t) : m(h);
  }
  function m(h) {
    if ((h === 45 || sr(h)) && r++ < 63) {
      const g = h === 45 ? m : f;
      return e.consume(h), g;
    }
    return n(h);
  }
}
const Up = {
  tokenize: $Pe,
  partial: !0
};
function $Pe(e, t, n) {
  return r;
  function r(i) {
    return ht(i) ? bt(e, o, "linePrefix")(i) : o(i);
  }
  function o(i) {
    return i === null || Ke(i) ? t(i) : n(i);
  }
}
const UW = {
  name: "blockQuote",
  tokenize: IPe,
  continuation: {
    tokenize: APe
  },
  exit: zPe
};
function IPe(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    if (a === 62) {
      const l = r.containerState;
      return l.open || (e.enter("blockQuote", {
        _container: !0
      }), l.open = !0), e.enter("blockQuotePrefix"), e.enter("blockQuoteMarker"), e.consume(a), e.exit("blockQuoteMarker"), i;
    }
    return n(a);
  }
  function i(a) {
    return ht(a) ? (e.enter("blockQuotePrefixWhitespace"), e.consume(a), e.exit("blockQuotePrefixWhitespace"), e.exit("blockQuotePrefix"), t) : (e.exit("blockQuotePrefix"), t(a));
  }
}
function APe(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    return ht(a) ? bt(
      e,
      i,
      "linePrefix",
      r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
    )(a) : i(a);
  }
  function i(a) {
    return e.attempt(UW, t, n)(a);
  }
}
function zPe(e) {
  e.exit("blockQuote");
}
const HW = {
  name: "characterEscape",
  tokenize: LPe
};
function LPe(e, t, n) {
  return r;
  function r(i) {
    return e.enter("characterEscape"), e.enter("escapeMarker"), e.consume(i), e.exit("escapeMarker"), o;
  }
  function o(i) {
    return kPe(i) ? (e.enter("characterEscapeValue"), e.consume(i), e.exit("characterEscapeValue"), e.exit("characterEscape"), t) : n(i);
  }
}
const QA = document.createElement("i");
function HP(e) {
  const t = "&" + e + ";";
  QA.innerHTML = t;
  const n = QA.textContent;
  return n.charCodeAt(n.length - 1) === 59 && e !== "semi" || n === t ? !1 : n;
}
const WW = {
  name: "characterReference",
  tokenize: DPe
};
function DPe(e, t, n) {
  const r = this;
  let o = 0, i, a;
  return l;
  function l(f) {
    return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(f), e.exit("characterReferenceMarker"), s;
  }
  function s(f) {
    return f === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(f), e.exit("characterReferenceMarkerNumeric"), c) : (e.enter("characterReferenceValue"), i = 31, a = sr, p(f));
  }
  function c(f) {
    return f === 88 || f === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(f), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), i = 6, a = SPe, p) : (e.enter("characterReferenceValue"), i = 7, a = oE, p(f));
  }
  function p(f) {
    if (f === 59 && o) {
      const m = e.exit("characterReferenceValue");
      return a === sr && !HP(r.sliceSerialize(m)) ? n(f) : (e.enter("characterReferenceMarker"), e.consume(f), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
    }
    return a(f) && o++ < i ? (e.consume(f), p) : n(f);
  }
}
const JA = {
  tokenize: MPe,
  partial: !0
}, ez = {
  name: "codeFenced",
  tokenize: FPe,
  concrete: !0
};
function FPe(e, t, n) {
  const r = this, o = {
    tokenize: O,
    partial: !0
  };
  let i = 0, a = 0, l;
  return s;
  function s(C) {
    return c(C);
  }
  function c(C) {
    const R = r.events[r.events.length - 1];
    return i = R && R[1].type === "linePrefix" ? R[2].sliceSerialize(R[1], !0).length : 0, l = C, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), p(C);
  }
  function p(C) {
    return C === l ? (a++, e.consume(C), p) : a < 3 ? n(C) : (e.exit("codeFencedFenceSequence"), ht(C) ? bt(e, f, "whitespace")(C) : f(C));
  }
  function f(C) {
    return C === null || Ke(C) ? (e.exit("codeFencedFence"), r.interrupt ? t(C) : e.check(JA, v, E)(C)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
      contentType: "string"
    }), m(C));
  }
  function m(C) {
    return C === null || Ke(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), f(C)) : ht(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), bt(e, h, "whitespace")(C)) : C === 96 && C === l ? n(C) : (e.consume(C), m);
  }
  function h(C) {
    return C === null || Ke(C) ? f(C) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
      contentType: "string"
    }), g(C));
  }
  function g(C) {
    return C === null || Ke(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(C)) : C === 96 && C === l ? n(C) : (e.consume(C), g);
  }
  function v(C) {
    return e.attempt(o, E, S)(C);
  }
  function S(C) {
    return e.enter("lineEnding"), e.consume(C), e.exit("lineEnding"), w;
  }
  function w(C) {
    return i > 0 && ht(C) ? bt(
      e,
      x,
      "linePrefix",
      i + 1
    )(C) : x(C);
  }
  function x(C) {
    return C === null || Ke(C) ? e.check(JA, v, E)(C) : (e.enter("codeFlowValue"), k(C));
  }
  function k(C) {
    return C === null || Ke(C) ? (e.exit("codeFlowValue"), x(C)) : (e.consume(C), k);
  }
  function E(C) {
    return e.exit("codeFenced"), t(C);
  }
  function O(C, R, L) {
    let D = 0;
    return N;
    function N(U) {
      return C.enter("lineEnding"), C.consume(U), C.exit("lineEnding"), H;
    }
    function H(U) {
      return C.enter("codeFencedFence"), ht(U) ? bt(
        C,
        B,
        "linePrefix",
        r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
      )(U) : B(U);
    }
    function B(U) {
      return U === l ? (C.enter("codeFencedFenceSequence"), K(U)) : L(U);
    }
    function K(U) {
      return U === l ? (D++, C.consume(U), K) : D >= a ? (C.exit("codeFencedFenceSequence"), ht(U) ? bt(C, W, "whitespace")(U) : W(U)) : L(U);
    }
    function W(U) {
      return U === null || Ke(U) ? (C.exit("codeFencedFence"), R(U)) : L(U);
    }
  }
}
function MPe(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    return a === null ? n(a) : (e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), i);
  }
  function i(a) {
    return r.parser.lazy[r.now().line] ? n(a) : t(a);
  }
}
const z_ = {
  name: "codeIndented",
  tokenize: UPe
}, BPe = {
  tokenize: HPe,
  partial: !0
};
function UPe(e, t, n) {
  const r = this;
  return o;
  function o(c) {
    return e.enter("codeIndented"), bt(e, i, "linePrefix", 5)(c);
  }
  function i(c) {
    const p = r.events[r.events.length - 1];
    return p && p[1].type === "linePrefix" && p[2].sliceSerialize(p[1], !0).length >= 4 ? a(c) : n(c);
  }
  function a(c) {
    return c === null ? s(c) : Ke(c) ? e.attempt(BPe, a, s)(c) : (e.enter("codeFlowValue"), l(c));
  }
  function l(c) {
    return c === null || Ke(c) ? (e.exit("codeFlowValue"), a(c)) : (e.consume(c), l);
  }
  function s(c) {
    return e.exit("codeIndented"), t(c);
  }
}
function HPe(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    return r.parser.lazy[r.now().line] ? n(a) : Ke(a) ? (e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), o) : bt(e, i, "linePrefix", 5)(a);
  }
  function i(a) {
    const l = r.events[r.events.length - 1];
    return l && l[1].type === "linePrefix" && l[2].sliceSerialize(l[1], !0).length >= 4 ? t(a) : Ke(a) ? o(a) : n(a);
  }
}
const WPe = {
  name: "codeText",
  tokenize: GPe,
  resolve: VPe,
  previous: qPe
};
function VPe(e) {
  let t = e.length - 4, n = 3, r, o;
  if ((e[n][1].type === "lineEnding" || e[n][1].type === "space") && (e[t][1].type === "lineEnding" || e[t][1].type === "space")) {
    for (r = n; ++r < t; )
      if (e[r][1].type === "codeTextData") {
        e[n][1].type = "codeTextPadding", e[t][1].type = "codeTextPadding", n += 2, t -= 2;
        break;
      }
  }
  for (r = n - 1, t++; ++r <= t; )
    o === void 0 ? r !== t && e[r][1].type !== "lineEnding" && (o = r) : (r === t || e[r][1].type === "lineEnding") && (e[o][1].type = "codeTextData", r !== o + 2 && (e[o][1].end = e[r - 1][1].end, e.splice(o + 2, r - o - 2), t -= r - o - 2, r = o + 2), o = void 0);
  return e;
}
function qPe(e) {
  return e !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
}
function GPe(e, t, n) {
  let r = 0, o, i;
  return a;
  function a(f) {
    return e.enter("codeText"), e.enter("codeTextSequence"), l(f);
  }
  function l(f) {
    return f === 96 ? (e.consume(f), r++, l) : (e.exit("codeTextSequence"), s(f));
  }
  function s(f) {
    return f === null ? n(f) : f === 32 ? (e.enter("space"), e.consume(f), e.exit("space"), s) : f === 96 ? (i = e.enter("codeTextSequence"), o = 0, p(f)) : Ke(f) ? (e.enter("lineEnding"), e.consume(f), e.exit("lineEnding"), s) : (e.enter("codeTextData"), c(f));
  }
  function c(f) {
    return f === null || f === 32 || f === 96 || Ke(f) ? (e.exit("codeTextData"), s(f)) : (e.consume(f), c);
  }
  function p(f) {
    return f === 96 ? (e.consume(f), o++, p) : o === r ? (e.exit("codeTextSequence"), e.exit("codeText"), t(f)) : (i.type = "codeTextData", c(f));
  }
}
function VW(e) {
  const t = {};
  let n = -1, r, o, i, a, l, s, c;
  for (; ++n < e.length; ) {
    for (; n in t; )
      n = t[n];
    if (r = e[n], n && r[1].type === "chunkFlow" && e[n - 1][1].type === "listItemPrefix" && (s = r[1]._tokenizer.events, i = 0, i < s.length && s[i][1].type === "lineEndingBlank" && (i += 2), i < s.length && s[i][1].type === "content"))
      for (; ++i < s.length && s[i][1].type !== "content"; )
        s[i][1].type === "chunkText" && (s[i][1]._isInFirstContentOfListItem = !0, i++);
    if (r[0] === "enter")
      r[1].contentType && (Object.assign(t, KPe(e, n)), n = t[n], c = !0);
    else if (r[1]._container) {
      for (i = n, o = void 0; i-- && (a = e[i], a[1].type === "lineEnding" || a[1].type === "lineEndingBlank"); )
        a[0] === "enter" && (o && (e[o][1].type = "lineEndingBlank"), a[1].type = "lineEnding", o = i);
      o && (r[1].end = Object.assign({}, e[o][1].start), l = e.slice(o, n), l.unshift(r), go(e, o, n - o + 1, l));
    }
  }
  return !c;
}
function KPe(e, t) {
  const n = e[t][1], r = e[t][2];
  let o = t - 1;
  const i = [], a = n._tokenizer || r.parser[n.contentType](n.start), l = a.events, s = [], c = {};
  let p, f, m = -1, h = n, g = 0, v = 0;
  const S = [v];
  for (; h; ) {
    for (; e[++o][1] !== h; )
      ;
    i.push(o), h._tokenizer || (p = r.sliceStream(h), h.next || p.push(null), f && a.defineSkip(h.start), h._isInFirstContentOfListItem && (a._gfmTasklistFirstContentOfListItem = !0), a.write(p), h._isInFirstContentOfListItem && (a._gfmTasklistFirstContentOfListItem = void 0)), f = h, h = h.next;
  }
  for (h = n; ++m < l.length; )
    l[m][0] === "exit" && l[m - 1][0] === "enter" && l[m][1].type === l[m - 1][1].type && l[m][1].start.line !== l[m][1].end.line && (v = m + 1, S.push(v), h._tokenizer = void 0, h.previous = void 0, h = h.next);
  for (a.events = [], h ? (h._tokenizer = void 0, h.previous = void 0) : S.pop(), m = S.length; m--; ) {
    const w = l.slice(S[m], S[m + 1]), x = i.pop();
    s.unshift([x, x + w.length - 1]), go(e, x, 2, w);
  }
  for (m = -1; ++m < s.length; )
    c[g + s[m][0]] = g + s[m][1], g += s[m][1] - s[m][0] - 1;
  return c;
}
const YPe = {
  tokenize: QPe,
  resolve: ZPe
}, XPe = {
  tokenize: JPe,
  partial: !0
};
function ZPe(e) {
  return VW(e), e;
}
function QPe(e, t) {
  let n;
  return r;
  function r(l) {
    return e.enter("content"), n = e.enter("chunkContent", {
      contentType: "content"
    }), o(l);
  }
  function o(l) {
    return l === null ? i(l) : Ke(l) ? e.check(
      XPe,
      a,
      i
    )(l) : (e.consume(l), o);
  }
  function i(l) {
    return e.exit("chunkContent"), e.exit("content"), t(l);
  }
  function a(l) {
    return e.consume(l), e.exit("chunkContent"), n.next = e.enter("chunkContent", {
      contentType: "content",
      previous: n
    }), n = n.next, o;
  }
}
function JPe(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), bt(e, i, "linePrefix");
  }
  function i(a) {
    if (a === null || Ke(a))
      return n(a);
    const l = r.events[r.events.length - 1];
    return !r.parser.constructs.disable.null.includes("codeIndented") && l && l[1].type === "linePrefix" && l[2].sliceSerialize(l[1], !0).length >= 4 ? t(a) : e.interrupt(r.parser.constructs.flow, n, t)(a);
  }
}
function qW(e, t, n, r, o, i, a, l, s) {
  const c = s || Number.POSITIVE_INFINITY;
  let p = 0;
  return f;
  function f(w) {
    return w === 60 ? (e.enter(r), e.enter(o), e.enter(i), e.consume(w), e.exit(i), m) : w === null || w === 32 || w === 41 || Fb(w) ? n(w) : (e.enter(r), e.enter(a), e.enter(l), e.enter("chunkString", {
      contentType: "string"
    }), v(w));
  }
  function m(w) {
    return w === 62 ? (e.enter(i), e.consume(w), e.exit(i), e.exit(o), e.exit(r), t) : (e.enter(l), e.enter("chunkString", {
      contentType: "string"
    }), h(w));
  }
  function h(w) {
    return w === 62 ? (e.exit("chunkString"), e.exit(l), m(w)) : w === null || w === 60 || Ke(w) ? n(w) : (e.consume(w), w === 92 ? g : h);
  }
  function g(w) {
    return w === 60 || w === 62 || w === 92 ? (e.consume(w), h) : h(w);
  }
  function v(w) {
    return !p && (w === null || w === 41 || Mt(w)) ? (e.exit("chunkString"), e.exit(l), e.exit(a), e.exit(r), t(w)) : p < c && w === 40 ? (e.consume(w), p++, v) : w === 41 ? (e.consume(w), p--, v) : w === null || w === 32 || w === 40 || Fb(w) ? n(w) : (e.consume(w), w === 92 ? S : v);
  }
  function S(w) {
    return w === 40 || w === 41 || w === 92 ? (e.consume(w), v) : v(w);
  }
}
function GW(e, t, n, r, o, i) {
  const a = this;
  let l = 0, s;
  return c;
  function c(h) {
    return e.enter(r), e.enter(o), e.consume(h), e.exit(o), e.enter(i), p;
  }
  function p(h) {
    return l > 999 || h === null || h === 91 || h === 93 && !s || // To do: remove in the future once we’ve switched from
    // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
    // which doesn’t need this.
    // Hidden footnotes hook.
    /* c8 ignore next 3 */
    h === 94 && !l && "_hiddenFootnoteSupport" in a.parser.constructs ? n(h) : h === 93 ? (e.exit(i), e.enter(o), e.consume(h), e.exit(o), e.exit(r), t) : Ke(h) ? (e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), p) : (e.enter("chunkString", {
      contentType: "string"
    }), f(h));
  }
  function f(h) {
    return h === null || h === 91 || h === 93 || Ke(h) || l++ > 999 ? (e.exit("chunkString"), p(h)) : (e.consume(h), s || (s = !ht(h)), h === 92 ? m : f);
  }
  function m(h) {
    return h === 91 || h === 92 || h === 93 ? (e.consume(h), l++, f) : f(h);
  }
}
function KW(e, t, n, r, o, i) {
  let a;
  return l;
  function l(m) {
    return m === 34 || m === 39 || m === 40 ? (e.enter(r), e.enter(o), e.consume(m), e.exit(o), a = m === 40 ? 41 : m, s) : n(m);
  }
  function s(m) {
    return m === a ? (e.enter(o), e.consume(m), e.exit(o), e.exit(r), t) : (e.enter(i), c(m));
  }
  function c(m) {
    return m === a ? (e.exit(i), s(a)) : m === null ? n(m) : Ke(m) ? (e.enter("lineEnding"), e.consume(m), e.exit("lineEnding"), bt(e, c, "linePrefix")) : (e.enter("chunkString", {
      contentType: "string"
    }), p(m));
  }
  function p(m) {
    return m === a || m === null || Ke(m) ? (e.exit("chunkString"), c(m)) : (e.consume(m), m === 92 ? f : p);
  }
  function f(m) {
    return m === a || m === 92 ? (e.consume(m), p) : p(m);
  }
}
function Md(e, t) {
  let n;
  return r;
  function r(o) {
    return Ke(o) ? (e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), n = !0, r) : ht(o) ? bt(
      e,
      r,
      n ? "linePrefix" : "lineSuffix"
    )(o) : t(o);
  }
}
function di(e) {
  return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
}
const e2e = {
  name: "definition",
  tokenize: n2e
}, t2e = {
  tokenize: r2e,
  partial: !0
};
function n2e(e, t, n) {
  const r = this;
  let o;
  return i;
  function i(h) {
    return e.enter("definition"), a(h);
  }
  function a(h) {
    return GW.call(
      r,
      e,
      l,
      // Note: we don’t need to reset the way `markdown-rs` does.
      n,
      "definitionLabel",
      "definitionLabelMarker",
      "definitionLabelString"
    )(h);
  }
  function l(h) {
    return o = di(
      r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1)
    ), h === 58 ? (e.enter("definitionMarker"), e.consume(h), e.exit("definitionMarker"), s) : n(h);
  }
  function s(h) {
    return Mt(h) ? Md(e, c)(h) : c(h);
  }
  function c(h) {
    return qW(
      e,
      p,
      // Note: we don’t need to reset the way `markdown-rs` does.
      n,
      "definitionDestination",
      "definitionDestinationLiteral",
      "definitionDestinationLiteralMarker",
      "definitionDestinationRaw",
      "definitionDestinationString"
    )(h);
  }
  function p(h) {
    return e.attempt(t2e, f, f)(h);
  }
  function f(h) {
    return ht(h) ? bt(e, m, "whitespace")(h) : m(h);
  }
  function m(h) {
    return h === null || Ke(h) ? (e.exit("definition"), r.parser.defined.push(o), t(h)) : n(h);
  }
}
function r2e(e, t, n) {
  return r;
  function r(l) {
    return Mt(l) ? Md(e, o)(l) : n(l);
  }
  function o(l) {
    return KW(
      e,
      i,
      n,
      "definitionTitle",
      "definitionTitleMarker",
      "definitionTitleString"
    )(l);
  }
  function i(l) {
    return ht(l) ? bt(e, a, "whitespace")(l) : a(l);
  }
  function a(l) {
    return l === null || Ke(l) ? t(l) : n(l);
  }
}
const o2e = {
  name: "hardBreakEscape",
  tokenize: i2e
};
function i2e(e, t, n) {
  return r;
  function r(i) {
    return e.enter("hardBreakEscape"), e.consume(i), o;
  }
  function o(i) {
    return Ke(i) ? (e.exit("hardBreakEscape"), t(i)) : n(i);
  }
}
const a2e = {
  name: "headingAtx",
  tokenize: s2e,
  resolve: l2e
};
function l2e(e, t) {
  let n = e.length - 2, r = 3, o, i;
  return e[r][1].type === "whitespace" && (r += 2), n - 2 > r && e[n][1].type === "whitespace" && (n -= 2), e[n][1].type === "atxHeadingSequence" && (r === n - 1 || n - 4 > r && e[n - 2][1].type === "whitespace") && (n -= r + 1 === n ? 2 : 4), n > r && (o = {
    type: "atxHeadingText",
    start: e[r][1].start,
    end: e[n][1].end
  }, i = {
    type: "chunkText",
    start: e[r][1].start,
    end: e[n][1].end,
    contentType: "text"
  }, go(e, r, n - r + 1, [
    ["enter", o, t],
    ["enter", i, t],
    ["exit", i, t],
    ["exit", o, t]
  ])), e;
}
function s2e(e, t, n) {
  let r = 0;
  return o;
  function o(p) {
    return e.enter("atxHeading"), i(p);
  }
  function i(p) {
    return e.enter("atxHeadingSequence"), a(p);
  }
  function a(p) {
    return p === 35 && r++ < 6 ? (e.consume(p), a) : p === null || Mt(p) ? (e.exit("atxHeadingSequence"), l(p)) : n(p);
  }
  function l(p) {
    return p === 35 ? (e.enter("atxHeadingSequence"), s(p)) : p === null || Ke(p) ? (e.exit("atxHeading"), t(p)) : ht(p) ? bt(e, l, "whitespace")(p) : (e.enter("atxHeadingText"), c(p));
  }
  function s(p) {
    return p === 35 ? (e.consume(p), s) : (e.exit("atxHeadingSequence"), l(p));
  }
  function c(p) {
    return p === null || p === 35 || Mt(p) ? (e.exit("atxHeadingText"), l(p)) : (e.consume(p), c);
  }
}
const u2e = [
  "address",
  "article",
  "aside",
  "base",
  "basefont",
  "blockquote",
  "body",
  "caption",
  "center",
  "col",
  "colgroup",
  "dd",
  "details",
  "dialog",
  "dir",
  "div",
  "dl",
  "dt",
  "fieldset",
  "figcaption",
  "figure",
  "footer",
  "form",
  "frame",
  "frameset",
  "h1",
  "h2",
  "h3",
  "h4",
  "h5",
  "h6",
  "head",
  "header",
  "hr",
  "html",
  "iframe",
  "legend",
  "li",
  "link",
  "main",
  "menu",
  "menuitem",
  "nav",
  "noframes",
  "ol",
  "optgroup",
  "option",
  "p",
  "param",
  "search",
  "section",
  "summary",
  "table",
  "tbody",
  "td",
  "tfoot",
  "th",
  "thead",
  "title",
  "tr",
  "track",
  "ul"
], tz = ["pre", "script", "style", "textarea"], c2e = {
  name: "htmlFlow",
  tokenize: m2e,
  resolveTo: p2e,
  concrete: !0
}, f2e = {
  tokenize: g2e,
  partial: !0
}, d2e = {
  tokenize: h2e,
  partial: !0
};
function p2e(e) {
  let t = e.length;
  for (; t-- && !(e[t][0] === "enter" && e[t][1].type === "htmlFlow"); )
    ;
  return t > 1 && e[t - 2][1].type === "linePrefix" && (e[t][1].start = e[t - 2][1].start, e[t + 1][1].start = e[t - 2][1].start, e.splice(t - 2, 2)), e;
}
function m2e(e, t, n) {
  const r = this;
  let o, i, a, l, s;
  return c;
  function c(j) {
    return p(j);
  }
  function p(j) {
    return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(j), f;
  }
  function f(j) {
    return j === 33 ? (e.consume(j), m) : j === 47 ? (e.consume(j), i = !0, v) : j === 63 ? (e.consume(j), o = 3, r.interrupt ? t : A) : wr(j) ? (e.consume(j), a = String.fromCharCode(j), S) : n(j);
  }
  function m(j) {
    return j === 45 ? (e.consume(j), o = 2, h) : j === 91 ? (e.consume(j), o = 5, l = 0, g) : wr(j) ? (e.consume(j), o = 4, r.interrupt ? t : A) : n(j);
  }
  function h(j) {
    return j === 45 ? (e.consume(j), r.interrupt ? t : A) : n(j);
  }
  function g(j) {
    const le = "CDATA[";
    return j === le.charCodeAt(l++) ? (e.consume(j), l === le.length ? r.interrupt ? t : B : g) : n(j);
  }
  function v(j) {
    return wr(j) ? (e.consume(j), a = String.fromCharCode(j), S) : n(j);
  }
  function S(j) {
    if (j === null || j === 47 || j === 62 || Mt(j)) {
      const le = j === 47, re = a.toLowerCase();
      return !le && !i && tz.includes(re) ? (o = 1, r.interrupt ? t(j) : B(j)) : u2e.includes(a.toLowerCase()) ? (o = 6, le ? (e.consume(j), w) : r.interrupt ? t(j) : B(j)) : (o = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(j) : i ? x(j) : k(j));
    }
    return j === 45 || sr(j) ? (e.consume(j), a += String.fromCharCode(j), S) : n(j);
  }
  function w(j) {
    return j === 62 ? (e.consume(j), r.interrupt ? t : B) : n(j);
  }
  function x(j) {
    return ht(j) ? (e.consume(j), x) : N(j);
  }
  function k(j) {
    return j === 47 ? (e.consume(j), N) : j === 58 || j === 95 || wr(j) ? (e.consume(j), E) : ht(j) ? (e.consume(j), k) : N(j);
  }
  function E(j) {
    return j === 45 || j === 46 || j === 58 || j === 95 || sr(j) ? (e.consume(j), E) : O(j);
  }
  function O(j) {
    return j === 61 ? (e.consume(j), C) : ht(j) ? (e.consume(j), O) : k(j);
  }
  function C(j) {
    return j === null || j === 60 || j === 61 || j === 62 || j === 96 ? n(j) : j === 34 || j === 39 ? (e.consume(j), s = j, R) : ht(j) ? (e.consume(j), C) : L(j);
  }
  function R(j) {
    return j === s ? (e.consume(j), s = null, D) : j === null || Ke(j) ? n(j) : (e.consume(j), R);
  }
  function L(j) {
    return j === null || j === 34 || j === 39 || j === 47 || j === 60 || j === 61 || j === 62 || j === 96 || Mt(j) ? O(j) : (e.consume(j), L);
  }
  function D(j) {
    return j === 47 || j === 62 || ht(j) ? k(j) : n(j);
  }
  function N(j) {
    return j === 62 ? (e.consume(j), H) : n(j);
  }
  function H(j) {
    return j === null || Ke(j) ? B(j) : ht(j) ? (e.consume(j), H) : n(j);
  }
  function B(j) {
    return j === 45 && o === 2 ? (e.consume(j), Q) : j === 60 && o === 1 ? (e.consume(j), J) : j === 62 && o === 4 ? (e.consume(j), X) : j === 63 && o === 3 ? (e.consume(j), A) : j === 93 && o === 5 ? (e.consume(j), ee) : Ke(j) && (o === 6 || o === 7) ? (e.exit("htmlFlowData"), e.check(
      f2e,
      ie,
      K
    )(j)) : j === null || Ke(j) ? (e.exit("htmlFlowData"), K(j)) : (e.consume(j), B);
  }
  function K(j) {
    return e.check(
      d2e,
      W,
      ie
    )(j);
  }
  function W(j) {
    return e.enter("lineEnding"), e.consume(j), e.exit("lineEnding"), U;
  }
  function U(j) {
    return j === null || Ke(j) ? K(j) : (e.enter("htmlFlowData"), B(j));
  }
  function Q(j) {
    return j === 45 ? (e.consume(j), A) : B(j);
  }
  function J(j) {
    return j === 47 ? (e.consume(j), a = "", q) : B(j);
  }
  function q(j) {
    if (j === 62) {
      const le = a.toLowerCase();
      return tz.includes(le) ? (e.consume(j), X) : B(j);
    }
    return wr(j) && a.length < 8 ? (e.consume(j), a += String.fromCharCode(j), q) : B(j);
  }
  function ee(j) {
    return j === 93 ? (e.consume(j), A) : B(j);
  }
  function A(j) {
    return j === 62 ? (e.consume(j), X) : j === 45 && o === 2 ? (e.consume(j), A) : B(j);
  }
  function X(j) {
    return j === null || Ke(j) ? (e.exit("htmlFlowData"), ie(j)) : (e.consume(j), X);
  }
  function ie(j) {
    return e.exit("htmlFlow"), t(j);
  }
}
function h2e(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    return Ke(a) ? (e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), i) : n(a);
  }
  function i(a) {
    return r.parser.lazy[r.now().line] ? n(a) : t(a);
  }
}
function g2e(e, t, n) {
  return r;
  function r(o) {
    return e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), e.attempt(Up, t, n);
  }
}
const y2e = {
  name: "htmlText",
  tokenize: v2e
};
function v2e(e, t, n) {
  const r = this;
  let o, i, a;
  return l;
  function l(A) {
    return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(A), s;
  }
  function s(A) {
    return A === 33 ? (e.consume(A), c) : A === 47 ? (e.consume(A), O) : A === 63 ? (e.consume(A), k) : wr(A) ? (e.consume(A), L) : n(A);
  }
  function c(A) {
    return A === 45 ? (e.consume(A), p) : A === 91 ? (e.consume(A), i = 0, g) : wr(A) ? (e.consume(A), x) : n(A);
  }
  function p(A) {
    return A === 45 ? (e.consume(A), h) : n(A);
  }
  function f(A) {
    return A === null ? n(A) : A === 45 ? (e.consume(A), m) : Ke(A) ? (a = f, J(A)) : (e.consume(A), f);
  }
  function m(A) {
    return A === 45 ? (e.consume(A), h) : f(A);
  }
  function h(A) {
    return A === 62 ? Q(A) : A === 45 ? m(A) : f(A);
  }
  function g(A) {
    const X = "CDATA[";
    return A === X.charCodeAt(i++) ? (e.consume(A), i === X.length ? v : g) : n(A);
  }
  function v(A) {
    return A === null ? n(A) : A === 93 ? (e.consume(A), S) : Ke(A) ? (a = v, J(A)) : (e.consume(A), v);
  }
  function S(A) {
    return A === 93 ? (e.consume(A), w) : v(A);
  }
  function w(A) {
    return A === 62 ? Q(A) : A === 93 ? (e.consume(A), w) : v(A);
  }
  function x(A) {
    return A === null || A === 62 ? Q(A) : Ke(A) ? (a = x, J(A)) : (e.consume(A), x);
  }
  function k(A) {
    return A === null ? n(A) : A === 63 ? (e.consume(A), E) : Ke(A) ? (a = k, J(A)) : (e.consume(A), k);
  }
  function E(A) {
    return A === 62 ? Q(A) : k(A);
  }
  function O(A) {
    return wr(A) ? (e.consume(A), C) : n(A);
  }
  function C(A) {
    return A === 45 || sr(A) ? (e.consume(A), C) : R(A);
  }
  function R(A) {
    return Ke(A) ? (a = R, J(A)) : ht(A) ? (e.consume(A), R) : Q(A);
  }
  function L(A) {
    return A === 45 || sr(A) ? (e.consume(A), L) : A === 47 || A === 62 || Mt(A) ? D(A) : n(A);
  }
  function D(A) {
    return A === 47 ? (e.consume(A), Q) : A === 58 || A === 95 || wr(A) ? (e.consume(A), N) : Ke(A) ? (a = D, J(A)) : ht(A) ? (e.consume(A), D) : Q(A);
  }
  function N(A) {
    return A === 45 || A === 46 || A === 58 || A === 95 || sr(A) ? (e.consume(A), N) : H(A);
  }
  function H(A) {
    return A === 61 ? (e.consume(A), B) : Ke(A) ? (a = H, J(A)) : ht(A) ? (e.consume(A), H) : D(A);
  }
  function B(A) {
    return A === null || A === 60 || A === 61 || A === 62 || A === 96 ? n(A) : A === 34 || A === 39 ? (e.consume(A), o = A, K) : Ke(A) ? (a = B, J(A)) : ht(A) ? (e.consume(A), B) : (e.consume(A), W);
  }
  function K(A) {
    return A === o ? (e.consume(A), o = void 0, U) : A === null ? n(A) : Ke(A) ? (a = K, J(A)) : (e.consume(A), K);
  }
  function W(A) {
    return A === null || A === 34 || A === 39 || A === 60 || A === 61 || A === 96 ? n(A) : A === 47 || A === 62 || Mt(A) ? D(A) : (e.consume(A), W);
  }
  function U(A) {
    return A === 47 || A === 62 || Mt(A) ? D(A) : n(A);
  }
  function Q(A) {
    return A === 62 ? (e.consume(A), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(A);
  }
  function J(A) {
    return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), q;
  }
  function q(A) {
    return ht(A) ? bt(
      e,
      ee,
      "linePrefix",
      r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
    )(A) : ee(A);
  }
  function ee(A) {
    return e.enter("htmlTextData"), a(A);
  }
}
const WP = {
  name: "labelEnd",
  tokenize: _2e,
  resolveTo: k2e,
  resolveAll: S2e
}, b2e = {
  tokenize: O2e
}, w2e = {
  tokenize: E2e
}, x2e = {
  tokenize: C2e
};
function S2e(e) {
  let t = -1;
  for (; ++t < e.length; ) {
    const n = e[t][1];
    (n.type === "labelImage" || n.type === "labelLink" || n.type === "labelEnd") && (e.splice(t + 1, n.type === "labelImage" ? 4 : 2), n.type = "data", t++);
  }
  return e;
}
function k2e(e, t) {
  let n = e.length, r = 0, o, i, a, l;
  for (; n--; )
    if (o = e[n][1], i) {
      if (o.type === "link" || o.type === "labelLink" && o._inactive)
        break;
      e[n][0] === "enter" && o.type === "labelLink" && (o._inactive = !0);
    } else if (a) {
      if (e[n][0] === "enter" && (o.type === "labelImage" || o.type === "labelLink") && !o._balanced && (i = n, o.type !== "labelLink")) {
        r = 2;
        break;
      }
    } else
      o.type === "labelEnd" && (a = n);
  const s = {
    type: e[i][1].type === "labelLink" ? "link" : "image",
    start: Object.assign({}, e[i][1].start),
    end: Object.assign({}, e[e.length - 1][1].end)
  }, c = {
    type: "label",
    start: Object.assign({}, e[i][1].start),
    end: Object.assign({}, e[a][1].end)
  }, p = {
    type: "labelText",
    start: Object.assign({}, e[i + r + 2][1].end),
    end: Object.assign({}, e[a - 2][1].start)
  };
  return l = [
    ["enter", s, t],
    ["enter", c, t]
  ], l = Do(l, e.slice(i + 1, i + r + 3)), l = Do(l, [["enter", p, t]]), l = Do(
    l,
    Tx(
      t.parser.constructs.insideSpan.null,
      e.slice(i + r + 4, a - 3),
      t
    )
  ), l = Do(l, [
    ["exit", p, t],
    e[a - 2],
    e[a - 1],
    ["exit", c, t]
  ]), l = Do(l, e.slice(a + 1)), l = Do(l, [["exit", s, t]]), go(e, i, e.length, l), e;
}
function _2e(e, t, n) {
  const r = this;
  let o = r.events.length, i, a;
  for (; o--; )
    if ((r.events[o][1].type === "labelImage" || r.events[o][1].type === "labelLink") && !r.events[o][1]._balanced) {
      i = r.events[o][1];
      break;
    }
  return l;
  function l(m) {
    return i ? i._inactive ? f(m) : (a = r.parser.defined.includes(
      di(
        r.sliceSerialize({
          start: i.end,
          end: r.now()
        })
      )
    ), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(m), e.exit("labelMarker"), e.exit("labelEnd"), s) : n(m);
  }
  function s(m) {
    return m === 40 ? e.attempt(
      b2e,
      p,
      a ? p : f
    )(m) : m === 91 ? e.attempt(
      w2e,
      p,
      a ? c : f
    )(m) : a ? p(m) : f(m);
  }
  function c(m) {
    return e.attempt(
      x2e,
      p,
      f
    )(m);
  }
  function p(m) {
    return t(m);
  }
  function f(m) {
    return i._balanced = !0, n(m);
  }
}
function O2e(e, t, n) {
  return r;
  function r(f) {
    return e.enter("resource"), e.enter("resourceMarker"), e.consume(f), e.exit("resourceMarker"), o;
  }
  function o(f) {
    return Mt(f) ? Md(e, i)(f) : i(f);
  }
  function i(f) {
    return f === 41 ? p(f) : qW(
      e,
      a,
      l,
      "resourceDestination",
      "resourceDestinationLiteral",
      "resourceDestinationLiteralMarker",
      "resourceDestinationRaw",
      "resourceDestinationString",
      32
    )(f);
  }
  function a(f) {
    return Mt(f) ? Md(e, s)(f) : p(f);
  }
  function l(f) {
    return n(f);
  }
  function s(f) {
    return f === 34 || f === 39 || f === 40 ? KW(
      e,
      c,
      n,
      "resourceTitle",
      "resourceTitleMarker",
      "resourceTitleString"
    )(f) : p(f);
  }
  function c(f) {
    return Mt(f) ? Md(e, p)(f) : p(f);
  }
  function p(f) {
    return f === 41 ? (e.enter("resourceMarker"), e.consume(f), e.exit("resourceMarker"), e.exit("resource"), t) : n(f);
  }
}
function E2e(e, t, n) {
  const r = this;
  return o;
  function o(l) {
    return GW.call(
      r,
      e,
      i,
      a,
      "reference",
      "referenceMarker",
      "referenceString"
    )(l);
  }
  function i(l) {
    return r.parser.defined.includes(
      di(
        r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1)
      )
    ) ? t(l) : n(l);
  }
  function a(l) {
    return n(l);
  }
}
function C2e(e, t, n) {
  return r;
  function r(i) {
    return e.enter("reference"), e.enter("referenceMarker"), e.consume(i), e.exit("referenceMarker"), o;
  }
  function o(i) {
    return i === 93 ? (e.enter("referenceMarker"), e.consume(i), e.exit("referenceMarker"), e.exit("reference"), t) : n(i);
  }
}
const P2e = {
  name: "labelStartImage",
  tokenize: R2e,
  resolveAll: WP.resolveAll
};
function R2e(e, t, n) {
  const r = this;
  return o;
  function o(l) {
    return e.enter("labelImage"), e.enter("labelImageMarker"), e.consume(l), e.exit("labelImageMarker"), i;
  }
  function i(l) {
    return l === 91 ? (e.enter("labelMarker"), e.consume(l), e.exit("labelMarker"), e.exit("labelImage"), a) : n(l);
  }
  function a(l) {
    return l === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(l) : t(l);
  }
}
const T2e = {
  name: "labelStartLink",
  tokenize: j2e,
  resolveAll: WP.resolveAll
};
function j2e(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    return e.enter("labelLink"), e.enter("labelMarker"), e.consume(a), e.exit("labelMarker"), e.exit("labelLink"), i;
  }
  function i(a) {
    return a === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(a) : t(a);
  }
}
const L_ = {
  name: "lineEnding",
  tokenize: N2e
};
function N2e(e, t) {
  return n;
  function n(r) {
    return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), bt(e, t, "linePrefix");
  }
}
const Zg = {
  name: "thematicBreak",
  tokenize: $2e
};
function $2e(e, t, n) {
  let r = 0, o;
  return i;
  function i(c) {
    return e.enter("thematicBreak"), a(c);
  }
  function a(c) {
    return o = c, l(c);
  }
  function l(c) {
    return c === o ? (e.enter("thematicBreakSequence"), s(c)) : r >= 3 && (c === null || Ke(c)) ? (e.exit("thematicBreak"), t(c)) : n(c);
  }
  function s(c) {
    return c === o ? (e.consume(c), r++, s) : (e.exit("thematicBreakSequence"), ht(c) ? bt(e, l, "whitespace")(c) : l(c));
  }
}
const Nr = {
  name: "list",
  tokenize: z2e,
  continuation: {
    tokenize: L2e
  },
  exit: F2e
}, I2e = {
  tokenize: M2e,
  partial: !0
}, A2e = {
  tokenize: D2e,
  partial: !0
};
function z2e(e, t, n) {
  const r = this, o = r.events[r.events.length - 1];
  let i = o && o[1].type === "linePrefix" ? o[2].sliceSerialize(o[1], !0).length : 0, a = 0;
  return l;
  function l(h) {
    const g = r.containerState.type || (h === 42 || h === 43 || h === 45 ? "listUnordered" : "listOrdered");
    if (g === "listUnordered" ? !r.containerState.marker || h === r.containerState.marker : oE(h)) {
      if (r.containerState.type || (r.containerState.type = g, e.enter(g, {
        _container: !0
      })), g === "listUnordered")
        return e.enter("listItemPrefix"), h === 42 || h === 45 ? e.check(Zg, n, c)(h) : c(h);
      if (!r.interrupt || h === 49)
        return e.enter("listItemPrefix"), e.enter("listItemValue"), s(h);
    }
    return n(h);
  }
  function s(h) {
    return oE(h) && ++a < 10 ? (e.consume(h), s) : (!r.interrupt || a < 2) && (r.containerState.marker ? h === r.containerState.marker : h === 41 || h === 46) ? (e.exit("listItemValue"), c(h)) : n(h);
  }
  function c(h) {
    return e.enter("listItemMarker"), e.consume(h), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || h, e.check(
      Up,
      // Can’t be empty when interrupting.
      r.interrupt ? n : p,
      e.attempt(
        I2e,
        m,
        f
      )
    );
  }
  function p(h) {
    return r.containerState.initialBlankLine = !0, i++, m(h);
  }
  function f(h) {
    return ht(h) ? (e.enter("listItemPrefixWhitespace"), e.consume(h), e.exit("listItemPrefixWhitespace"), m) : n(h);
  }
  function m(h) {
    return r.containerState.size = i + r.sliceSerialize(e.exit("listItemPrefix"), !0).length, t(h);
  }
}
function L2e(e, t, n) {
  const r = this;
  return r.containerState._closeFlow = void 0, e.check(Up, o, i);
  function o(l) {
    return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, bt(
      e,
      t,
      "listItemIndent",
      r.containerState.size + 1
    )(l);
  }
  function i(l) {
    return r.containerState.furtherBlankLines || !ht(l) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, a(l)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(A2e, t, a)(l));
  }
  function a(l) {
    return r.containerState._closeFlow = !0, r.interrupt = void 0, bt(
      e,
      e.attempt(Nr, t, n),
      "linePrefix",
      r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
    )(l);
  }
}
function D2e(e, t, n) {
  const r = this;
  return bt(
    e,
    o,
    "listItemIndent",
    r.containerState.size + 1
  );
  function o(i) {
    const a = r.events[r.events.length - 1];
    return a && a[1].type === "listItemIndent" && a[2].sliceSerialize(a[1], !0).length === r.containerState.size ? t(i) : n(i);
  }
}
function F2e(e) {
  e.exit(this.containerState.type);
}
function M2e(e, t, n) {
  const r = this;
  return bt(
    e,
    o,
    "listItemPrefixWhitespace",
    r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5
  );
  function o(i) {
    const a = r.events[r.events.length - 1];
    return !ht(i) && a && a[1].type === "listItemPrefixWhitespace" ? t(i) : n(i);
  }
}
const nz = {
  name: "setextUnderline",
  tokenize: U2e,
  resolveTo: B2e
};
function B2e(e, t) {
  let n = e.length, r, o, i;
  for (; n--; )
    if (e[n][0] === "enter") {
      if (e[n][1].type === "content") {
        r = n;
        break;
      }
      e[n][1].type === "paragraph" && (o = n);
    } else
      e[n][1].type === "content" && e.splice(n, 1), !i && e[n][1].type === "definition" && (i = n);
  const a = {
    type: "setextHeading",
    start: Object.assign({}, e[o][1].start),
    end: Object.assign({}, e[e.length - 1][1].end)
  };
  return e[o][1].type = "setextHeadingText", i ? (e.splice(o, 0, ["enter", a, t]), e.splice(i + 1, 0, ["exit", e[r][1], t]), e[r][1].end = Object.assign({}, e[i][1].end)) : e[r][1] = a, e.push(["exit", a, t]), e;
}
function U2e(e, t, n) {
  const r = this;
  let o;
  return i;
  function i(c) {
    let p = r.events.length, f;
    for (; p--; )
      if (r.events[p][1].type !== "lineEnding" && r.events[p][1].type !== "linePrefix" && r.events[p][1].type !== "content") {
        f = r.events[p][1].type === "paragraph";
        break;
      }
    return !r.parser.lazy[r.now().line] && (r.interrupt || f) ? (e.enter("setextHeadingLine"), o = c, a(c)) : n(c);
  }
  function a(c) {
    return e.enter("setextHeadingLineSequence"), l(c);
  }
  function l(c) {
    return c === o ? (e.consume(c), l) : (e.exit("setextHeadingLineSequence"), ht(c) ? bt(e, s, "lineSuffix")(c) : s(c));
  }
  function s(c) {
    return c === null || Ke(c) ? (e.exit("setextHeadingLine"), t(c)) : n(c);
  }
}
const H2e = {
  tokenize: W2e
};
function W2e(e) {
  const t = this, n = e.attempt(
    // Try to parse a blank line.
    Up,
    r,
    // Try to parse initial flow (essentially, only code).
    e.attempt(
      this.parser.constructs.flowInitial,
      o,
      bt(
        e,
        e.attempt(
          this.parser.constructs.flow,
          o,
          e.attempt(YPe, o)
        ),
        "linePrefix"
      )
    )
  );
  return n;
  function r(i) {
    if (i === null) {
      e.consume(i);
      return;
    }
    return e.enter("lineEndingBlank"), e.consume(i), e.exit("lineEndingBlank"), t.currentConstruct = void 0, n;
  }
  function o(i) {
    if (i === null) {
      e.consume(i);
      return;
    }
    return e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), t.currentConstruct = void 0, n;
  }
}
const V2e = {
  resolveAll: XW()
}, q2e = YW("string"), G2e = YW("text");
function YW(e) {
  return {
    tokenize: t,
    resolveAll: XW(
      e === "text" ? K2e : void 0
    )
  };
  function t(n) {
    const r = this, o = this.parser.constructs[e], i = n.attempt(o, a, l);
    return a;
    function a(p) {
      return c(p) ? i(p) : l(p);
    }
    function l(p) {
      if (p === null) {
        n.consume(p);
        return;
      }
      return n.enter("data"), n.consume(p), s;
    }
    function s(p) {
      return c(p) ? (n.exit("data"), i(p)) : (n.consume(p), s);
    }
    function c(p) {
      if (p === null)
        return !0;
      const f = o[p];
      let m = -1;
      if (f)
        for (; ++m < f.length; ) {
          const h = f[m];
          if (!h.previous || h.previous.call(r, r.previous))
            return !0;
        }
      return !1;
    }
  }
}
function XW(e) {
  return t;
  function t(n, r) {
    let o = -1, i;
    for (; ++o <= n.length; )
      i === void 0 ? n[o] && n[o][1].type === "data" && (i = o, o++) : (!n[o] || n[o][1].type !== "data") && (o !== i + 2 && (n[i][1].end = n[o - 1][1].end, n.splice(i + 2, o - i - 2), o = i + 2), i = void 0);
    return e ? e(n, r) : n;
  }
}
function K2e(e, t) {
  let n = 0;
  for (; ++n <= e.length; )
    if ((n === e.length || e[n][1].type === "lineEnding") && e[n - 1][1].type === "data") {
      const r = e[n - 1][1], o = t.sliceStream(r);
      let i = o.length, a = -1, l = 0, s;
      for (; i--; ) {
        const c = o[i];
        if (typeof c == "string") {
          for (a = c.length; c.charCodeAt(a - 1) === 32; )
            l++, a--;
          if (a)
            break;
          a = -1;
        } else if (c === -2)
          s = !0, l++;
        else if (c !== -1) {
          i++;
          break;
        }
      }
      if (l) {
        const c = {
          type: n === e.length || s || l < 2 ? "lineSuffix" : "hardBreakTrailing",
          start: {
            line: r.end.line,
            column: r.end.column - l,
            offset: r.end.offset - l,
            _index: r.start._index + i,
            _bufferIndex: i ? a : r.start._bufferIndex + a
          },
          end: Object.assign({}, r.end)
        };
        r.end = Object.assign({}, c.start), r.start.offset === r.end.offset ? Object.assign(r, c) : (e.splice(
          n,
          0,
          ["enter", c, t],
          ["exit", c, t]
        ), n += 2);
      }
      n++;
    }
  return e;
}
function Y2e(e, t, n) {
  let r = Object.assign(
    n ? Object.assign({}, n) : {
      line: 1,
      column: 1,
      offset: 0
    },
    {
      _index: 0,
      _bufferIndex: -1
    }
  );
  const o = {}, i = [];
  let a = [], l = [];
  const s = {
    consume: x,
    enter: k,
    exit: E,
    attempt: R(O),
    check: R(C),
    interrupt: R(C, {
      interrupt: !0
    })
  }, c = {
    previous: null,
    code: null,
    containerState: {},
    events: [],
    parser: e,
    sliceStream: h,
    sliceSerialize: m,
    now: g,
    defineSkip: v,
    write: f
  };
  let p = t.tokenize.call(c, s);
  return t.resolveAll && i.push(t), c;
  function f(H) {
    return a = Do(a, H), S(), a[a.length - 1] !== null ? [] : (L(t, 0), c.events = Tx(i, c.events, c), c.events);
  }
  function m(H, B) {
    return Z2e(h(H), B);
  }
  function h(H) {
    return X2e(a, H);
  }
  function g() {
    const { line: H, column: B, offset: K, _index: W, _bufferIndex: U } = r;
    return {
      line: H,
      column: B,
      offset: K,
      _index: W,
      _bufferIndex: U
    };
  }
  function v(H) {
    o[H.line] = H.column, N();
  }
  function S() {
    let H;
    for (; r._index < a.length; ) {
      const B = a[r._index];
      if (typeof B == "string")
        for (H = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === H && r._bufferIndex < B.length; )
          w(B.charCodeAt(r._bufferIndex));
      else
        w(B);
    }
  }
  function w(H) {
    p = p(H);
  }
  function x(H) {
    Ke(H) ? (r.line++, r.column = 1, r.offset += H === -3 ? 2 : 1, N()) : H !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === a[r._index].length && (r._bufferIndex = -1, r._index++)), c.previous = H;
  }
  function k(H, B) {
    const K = B || {};
    return K.type = H, K.start = g(), c.events.push(["enter", K, c]), l.push(K), K;
  }
  function E(H) {
    const B = l.pop();
    return B.end = g(), c.events.push(["exit", B, c]), B;
  }
  function O(H, B) {
    L(H, B.from);
  }
  function C(H, B) {
    B.restore();
  }
  function R(H, B) {
    return K;
    function K(W, U, Q) {
      let J, q, ee, A;
      return Array.isArray(W) ? ie(W) : "tokenize" in W ? (
        // @ts-expect-error Looks like a construct.
        ie([W])
      ) : X(W);
      function X(he) {
        return xe;
        function xe(ke) {
          const Ae = ke !== null && he[ke], pe = ke !== null && he.null, Me = [
            // To do: add more extension tests.
            /* c8 ignore next 2 */
            ...Array.isArray(Ae) ? Ae : Ae ? [Ae] : [],
            ...Array.isArray(pe) ? pe : pe ? [pe] : []
          ];
          return ie(Me)(ke);
        }
      }
      function ie(he) {
        return J = he, q = 0, he.length === 0 ? Q : j(he[q]);
      }
      function j(he) {
        return xe;
        function xe(ke) {
          return A = D(), ee = he, he.partial || (c.currentConstruct = he), he.name && c.parser.constructs.disable.null.includes(he.name) ? re() : he.tokenize.call(
            // If we do have fields, create an object w/ `context` as its
            // prototype.
            // This allows a “live binding”, which is needed for `interrupt`.
            B ? Object.assign(Object.create(c), B) : c,
            s,
            le,
            re
          )(ke);
        }
      }
      function le(he) {
        return H(ee, A), U;
      }
      function re(he) {
        return A.restore(), ++q < J.length ? j(J[q]) : Q;
      }
    }
  }
  function L(H, B) {
    H.resolveAll && !i.includes(H) && i.push(H), H.resolve && go(
      c.events,
      B,
      c.events.length - B,
      H.resolve(c.events.slice(B), c)
    ), H.resolveTo && (c.events = H.resolveTo(c.events, c));
  }
  function D() {
    const H = g(), B = c.previous, K = c.currentConstruct, W = c.events.length, U = Array.from(l);
    return {
      restore: Q,
      from: W
    };
    function Q() {
      r = H, c.previous = B, c.currentConstruct = K, c.events.length = W, l = U, N();
    }
  }
  function N() {
    r.line in o && r.column < 2 && (r.column = o[r.line], r.offset += o[r.line] - 1);
  }
}
function X2e(e, t) {
  const n = t.start._index, r = t.start._bufferIndex, o = t.end._index, i = t.end._bufferIndex;
  let a;
  if (n === o)
    a = [e[n].slice(r, i)];
  else {
    if (a = e.slice(n, o), r > -1) {
      const l = a[0];
      typeof l == "string" ? a[0] = l.slice(r) : a.shift();
    }
    i > 0 && a.push(e[o].slice(0, i));
  }
  return a;
}
function Z2e(e, t) {
  let n = -1;
  const r = [];
  let o;
  for (; ++n < e.length; ) {
    const i = e[n];
    let a;
    if (typeof i == "string")
      a = i;
    else
      switch (i) {
        case -5: {
          a = "\r";
          break;
        }
        case -4: {
          a = `
`;
          break;
        }
        case -3: {
          a = `\r
`;
          break;
        }
        case -2: {
          a = t ? " " : "	";
          break;
        }
        case -1: {
          if (!t && o)
            continue;
          a = " ";
          break;
        }
        default:
          a = String.fromCharCode(i);
      }
    o = i === -2, r.push(a);
  }
  return r.join("");
}
const Q2e = {
  42: Nr,
  43: Nr,
  45: Nr,
  48: Nr,
  49: Nr,
  50: Nr,
  51: Nr,
  52: Nr,
  53: Nr,
  54: Nr,
  55: Nr,
  56: Nr,
  57: Nr,
  62: UW
}, J2e = {
  91: e2e
}, eRe = {
  [-2]: z_,
  [-1]: z_,
  32: z_
}, tRe = {
  35: a2e,
  42: Zg,
  45: [nz, Zg],
  60: c2e,
  61: nz,
  95: Zg,
  96: ez,
  126: ez
}, nRe = {
  38: WW,
  92: HW
}, rRe = {
  [-5]: L_,
  [-4]: L_,
  [-3]: L_,
  33: P2e,
  38: WW,
  42: iE,
  60: [jPe, y2e],
  91: T2e,
  92: [o2e, HW],
  93: WP,
  95: iE,
  96: WPe
}, oRe = {
  null: [iE, V2e]
}, iRe = {
  null: [42, 95]
}, aRe = {
  null: []
}, lRe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  attentionMarkers: iRe,
  contentInitial: J2e,
  disable: aRe,
  document: Q2e,
  flow: tRe,
  flowInitial: eRe,
  insideSpan: oRe,
  string: nRe,
  text: rRe
}, Symbol.toStringTag, { value: "Module" }));
function sRe(e) {
  const t = (
    /** @type {FullNormalizedExtension} */
    BW([lRe, ...(e || {}).extensions || []])
  ), n = {
    defined: [],
    lazy: {},
    constructs: t,
    content: r(_Pe),
    document: r(EPe),
    flow: r(H2e),
    string: r(q2e),
    text: r(G2e)
  };
  return n;
  function r(o) {
    return i;
    function i(a) {
      return Y2e(n, o, a);
    }
  }
}
const rz = /[\0\t\n\r]/g;
function uRe() {
  let e = 1, t = "", n = !0, r;
  return o;
  function o(i, a, l) {
    const s = [];
    let c, p, f, m, h;
    for (i = t + i.toString(a), f = 0, t = "", n && (i.charCodeAt(0) === 65279 && f++, n = void 0); f < i.length; ) {
      if (rz.lastIndex = f, c = rz.exec(i), m = c && c.index !== void 0 ? c.index : i.length, h = i.charCodeAt(m), !c) {
        t = i.slice(f);
        break;
      }
      if (h === 10 && f === m && r)
        s.push(-3), r = void 0;
      else
        switch (r && (s.push(-5), r = void 0), f < m && (s.push(i.slice(f, m)), e += m - f), h) {
          case 0: {
            s.push(65533), e++;
            break;
          }
          case 9: {
            for (p = Math.ceil(e / 4) * 4, s.push(-2); e++ < p; )
              s.push(-1);
            break;
          }
          case 10: {
            s.push(-4), e = 1;
            break;
          }
          default:
            r = !0, e = 1;
        }
      f = m + 1;
    }
    return l && (r && s.push(-5), t && s.push(t), s.push(null)), s;
  }
}
function cRe(e) {
  for (; !VW(e); )
    ;
  return e;
}
function ZW(e, t) {
  const n = Number.parseInt(e, t);
  return (
    // C0 except for HT, LF, FF, CR, space.
    n < 9 || n === 11 || n > 13 && n < 32 || // Control character (DEL) of C0, and C1 controls.
    n > 126 && n < 160 || // Lone high surrogates and low surrogates.
    n > 55295 && n < 57344 || // Noncharacters.
    n > 64975 && n < 65008 || (n & 65535) === 65535 || (n & 65535) === 65534 || // Out of range
    n > 1114111 ? "�" : String.fromCharCode(n)
  );
}
const fRe = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
function QW(e) {
  return e.replace(fRe, dRe);
}
function dRe(e, t, n) {
  if (t)
    return t;
  if (n.charCodeAt(0) === 35) {
    const r = n.charCodeAt(1), o = r === 120 || r === 88;
    return ZW(n.slice(o ? 2 : 1), o ? 16 : 10);
  }
  return HP(n) || e;
}
const JW = {}.hasOwnProperty, pRe = (
  /**
   * @type {(
   *   ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
   *   ((value: Value, options?: Options | null | undefined) => Root)
   * )}
   */
  /**
   * @param {Value} value
   * @param {Encoding | Options | null | undefined} [encoding]
   * @param {Options | null | undefined} [options]
   * @returns {Root}
   */
  function(e, t, n) {
    return typeof t != "string" && (n = t, t = void 0), mRe(n)(
      cRe(
        sRe(n).document().write(uRe()(e, t, !0))
      )
    );
  }
);
function mRe(e) {
  const t = {
    transforms: [],
    canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
    enter: {
      autolink: l(ye),
      autolinkProtocol: H,
      autolinkEmail: H,
      atxHeading: l(oe),
      blockQuote: l(Me),
      characterEscape: H,
      characterReference: H,
      codeFenced: l(We),
      codeFencedFenceInfo: s,
      codeFencedFenceMeta: s,
      codeIndented: l(We, s),
      codeText: l(ze, s),
      codeTextData: H,
      data: H,
      codeFlowValue: H,
      definition: l(Fe),
      definitionDestinationString: s,
      definitionLabelString: s,
      definitionTitleString: s,
      emphasis: l(Ye),
      hardBreakEscape: l(ae),
      hardBreakTrailing: l(ae),
      htmlFlow: l(Ie, s),
      htmlFlowData: H,
      htmlText: l(Ie, s),
      htmlTextData: H,
      image: l(Ce),
      label: s,
      link: l(ye),
      listItem: l(Ge),
      listItemValue: g,
      listOrdered: l(we, h),
      listUnordered: l(we),
      paragraph: l($e),
      reference: re,
      referenceString: s,
      resourceDestinationString: s,
      resourceTitleString: s,
      setextHeading: l(oe),
      strong: l(ue),
      thematicBreak: l(Je)
    },
    exit: {
      atxHeading: p(),
      atxHeadingSequence: R,
      autolink: p(),
      autolinkEmail: pe,
      autolinkProtocol: Ae,
      blockQuote: p(),
      characterEscapeValue: B,
      characterReferenceMarkerHexadecimal: xe,
      characterReferenceMarkerNumeric: xe,
      characterReferenceValue: ke,
      codeFenced: p(x),
      codeFencedFence: w,
      codeFencedFenceInfo: v,
      codeFencedFenceMeta: S,
      codeFlowValue: B,
      codeIndented: p(k),
      codeText: p(J),
      codeTextData: B,
      data: B,
      definition: p(),
      definitionDestinationString: C,
      definitionLabelString: E,
      definitionTitleString: O,
      emphasis: p(),
      hardBreakEscape: p(W),
      hardBreakTrailing: p(W),
      htmlFlow: p(U),
      htmlFlowData: B,
      htmlText: p(Q),
      htmlTextData: B,
      image: p(ee),
      label: X,
      labelText: A,
      lineEnding: K,
      link: p(q),
      listItem: p(),
      listOrdered: p(),
      listUnordered: p(),
      paragraph: p(),
      referenceString: he,
      resourceDestinationString: ie,
      resourceTitleString: j,
      resource: le,
      setextHeading: p(N),
      setextHeadingLineSequence: D,
      setextHeadingText: L,
      strong: p(),
      thematicBreak: p()
    }
  };
  eV(t, (e || {}).mdastExtensions || []);
  const n = {};
  return r;
  function r(Y) {
    let te = {
      type: "root",
      children: []
    };
    const Ne = {
      stack: [te],
      tokenStack: [],
      config: t,
      enter: c,
      exit: f,
      buffer: s,
      resume: m,
      setData: i,
      getData: a
    }, et = [];
    let ft = -1;
    for (; ++ft < Y.length; )
      if (Y[ft][1].type === "listOrdered" || Y[ft][1].type === "listUnordered")
        if (Y[ft][0] === "enter")
          et.push(ft);
        else {
          const un = et.pop();
          ft = o(Y, un, ft);
        }
    for (ft = -1; ++ft < Y.length; ) {
      const un = t[Y[ft][0]];
      JW.call(un, Y[ft][1].type) && un[Y[ft][1].type].call(
        Object.assign(
          {
            sliceSerialize: Y[ft][2].sliceSerialize
          },
          Ne
        ),
        Y[ft][1]
      );
    }
    if (Ne.tokenStack.length > 0) {
      const un = Ne.tokenStack[Ne.tokenStack.length - 1];
      (un[1] || oz).call(Ne, void 0, un[0]);
    }
    for (te.position = {
      start: ll(
        Y.length > 0 ? Y[0][1].start : {
          line: 1,
          column: 1,
          offset: 0
        }
      ),
      end: ll(
        Y.length > 0 ? Y[Y.length - 2][1].end : {
          line: 1,
          column: 1,
          offset: 0
        }
      )
    }, ft = -1; ++ft < t.transforms.length; )
      te = t.transforms[ft](te) || te;
    return te;
  }
  function o(Y, te, Ne) {
    let et = te - 1, ft = -1, un = !1, Ct, _e, Ve, dn;
    for (; ++et <= Ne; ) {
      const pt = Y[et];
      if (pt[1].type === "listUnordered" || pt[1].type === "listOrdered" || pt[1].type === "blockQuote" ? (pt[0] === "enter" ? ft++ : ft--, dn = void 0) : pt[1].type === "lineEndingBlank" ? pt[0] === "enter" && (Ct && !dn && !ft && !Ve && (Ve = et), dn = void 0) : pt[1].type === "linePrefix" || pt[1].type === "listItemValue" || pt[1].type === "listItemMarker" || pt[1].type === "listItemPrefix" || pt[1].type === "listItemPrefixWhitespace" || (dn = void 0), !ft && pt[0] === "enter" && pt[1].type === "listItemPrefix" || ft === -1 && pt[0] === "exit" && (pt[1].type === "listUnordered" || pt[1].type === "listOrdered")) {
        if (Ct) {
          let Gt = et;
          for (_e = void 0; Gt--; ) {
            const pn = Y[Gt];
            if (pn[1].type === "lineEnding" || pn[1].type === "lineEndingBlank") {
              if (pn[0] === "exit")
                continue;
              _e && (Y[_e][1].type = "lineEndingBlank", un = !0), pn[1].type = "lineEnding", _e = Gt;
            } else if (!(pn[1].type === "linePrefix" || pn[1].type === "blockQuotePrefix" || pn[1].type === "blockQuotePrefixWhitespace" || pn[1].type === "blockQuoteMarker" || pn[1].type === "listItemIndent"))
              break;
          }
          Ve && (!_e || Ve < _e) && (Ct._spread = !0), Ct.end = Object.assign(
            {},
            _e ? Y[_e][1].start : pt[1].end
          ), Y.splice(_e || et, 0, ["exit", Ct, pt[2]]), et++, Ne++;
        }
        pt[1].type === "listItemPrefix" && (Ct = {
          type: "listItem",
          _spread: !1,
          start: Object.assign({}, pt[1].start),
          // @ts-expect-error: we’ll add `end` in a second.
          end: void 0
        }, Y.splice(et, 0, ["enter", Ct, pt[2]]), et++, Ne++, Ve = void 0, dn = !0);
      }
    }
    return Y[te][1]._spread = un, Ne;
  }
  function i(Y, te) {
    n[Y] = te;
  }
  function a(Y) {
    return n[Y];
  }
  function l(Y, te) {
    return Ne;
    function Ne(et) {
      c.call(this, Y(et), et), te && te.call(this, et);
    }
  }
  function s() {
    this.stack.push({
      type: "fragment",
      children: []
    });
  }
  function c(Y, te, Ne) {
    return this.stack[this.stack.length - 1].children.push(Y), this.stack.push(Y), this.tokenStack.push([te, Ne]), Y.position = {
      start: ll(te.start)
    }, Y;
  }
  function p(Y) {
    return te;
    function te(Ne) {
      Y && Y.call(this, Ne), f.call(this, Ne);
    }
  }
  function f(Y, te) {
    const Ne = this.stack.pop(), et = this.tokenStack.pop();
    if (et)
      et[0].type !== Y.type && (te ? te.call(this, Y, et[0]) : (et[1] || oz).call(this, Y, et[0]));
    else
      throw new Error(
        "Cannot close `" + Y.type + "` (" + Fd({
          start: Y.start,
          end: Y.end
        }) + "): it’s not open"
      );
    return Ne.position.end = ll(Y.end), Ne;
  }
  function m() {
    return gPe(this.stack.pop());
  }
  function h() {
    i("expectingFirstListItemValue", !0);
  }
  function g(Y) {
    if (a("expectingFirstListItemValue")) {
      const te = this.stack[this.stack.length - 2];
      te.start = Number.parseInt(this.sliceSerialize(Y), 10), i("expectingFirstListItemValue");
    }
  }
  function v() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.lang = Y;
  }
  function S() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.meta = Y;
  }
  function w() {
    a("flowCodeInside") || (this.buffer(), i("flowCodeInside", !0));
  }
  function x() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.value = Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), i("flowCodeInside");
  }
  function k() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.value = Y.replace(/(\r?\n|\r)$/g, "");
  }
  function E(Y) {
    const te = this.resume(), Ne = this.stack[this.stack.length - 1];
    Ne.label = te, Ne.identifier = di(
      this.sliceSerialize(Y)
    ).toLowerCase();
  }
  function O() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.title = Y;
  }
  function C() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.url = Y;
  }
  function R(Y) {
    const te = this.stack[this.stack.length - 1];
    if (!te.depth) {
      const Ne = this.sliceSerialize(Y).length;
      te.depth = Ne;
    }
  }
  function L() {
    i("setextHeadingSlurpLineEnding", !0);
  }
  function D(Y) {
    const te = this.stack[this.stack.length - 1];
    te.depth = this.sliceSerialize(Y).charCodeAt(0) === 61 ? 1 : 2;
  }
  function N() {
    i("setextHeadingSlurpLineEnding");
  }
  function H(Y) {
    const te = this.stack[this.stack.length - 1];
    let Ne = te.children[te.children.length - 1];
    (!Ne || Ne.type !== "text") && (Ne = Pe(), Ne.position = {
      start: ll(Y.start)
    }, te.children.push(Ne)), this.stack.push(Ne);
  }
  function B(Y) {
    const te = this.stack.pop();
    te.value += this.sliceSerialize(Y), te.position.end = ll(Y.end);
  }
  function K(Y) {
    const te = this.stack[this.stack.length - 1];
    if (a("atHardBreak")) {
      const Ne = te.children[te.children.length - 1];
      Ne.position.end = ll(Y.end), i("atHardBreak");
      return;
    }
    !a("setextHeadingSlurpLineEnding") && t.canContainEols.includes(te.type) && (H.call(this, Y), B.call(this, Y));
  }
  function W() {
    i("atHardBreak", !0);
  }
  function U() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.value = Y;
  }
  function Q() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.value = Y;
  }
  function J() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.value = Y;
  }
  function q() {
    const Y = this.stack[this.stack.length - 1];
    if (a("inReference")) {
      const te = a("referenceType") || "shortcut";
      Y.type += "Reference", Y.referenceType = te, delete Y.url, delete Y.title;
    } else
      delete Y.identifier, delete Y.label;
    i("referenceType");
  }
  function ee() {
    const Y = this.stack[this.stack.length - 1];
    if (a("inReference")) {
      const te = a("referenceType") || "shortcut";
      Y.type += "Reference", Y.referenceType = te, delete Y.url, delete Y.title;
    } else
      delete Y.identifier, delete Y.label;
    i("referenceType");
  }
  function A(Y) {
    const te = this.sliceSerialize(Y), Ne = this.stack[this.stack.length - 2];
    Ne.label = QW(te), Ne.identifier = di(te).toLowerCase();
  }
  function X() {
    const Y = this.stack[this.stack.length - 1], te = this.resume(), Ne = this.stack[this.stack.length - 1];
    if (i("inReference", !0), Ne.type === "link") {
      const et = Y.children;
      Ne.children = et;
    } else
      Ne.alt = te;
  }
  function ie() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.url = Y;
  }
  function j() {
    const Y = this.resume(), te = this.stack[this.stack.length - 1];
    te.title = Y;
  }
  function le() {
    i("inReference");
  }
  function re() {
    i("referenceType", "collapsed");
  }
  function he(Y) {
    const te = this.resume(), Ne = this.stack[this.stack.length - 1];
    Ne.label = te, Ne.identifier = di(
      this.sliceSerialize(Y)
    ).toLowerCase(), i("referenceType", "full");
  }
  function xe(Y) {
    i("characterReferenceType", Y.type);
  }
  function ke(Y) {
    const te = this.sliceSerialize(Y), Ne = a("characterReferenceType");
    let et;
    Ne ? (et = ZW(
      te,
      Ne === "characterReferenceMarkerNumeric" ? 10 : 16
    ), i("characterReferenceType")) : et = HP(te);
    const ft = this.stack.pop();
    ft.value += et, ft.position.end = ll(Y.end);
  }
  function Ae(Y) {
    B.call(this, Y);
    const te = this.stack[this.stack.length - 1];
    te.url = this.sliceSerialize(Y);
  }
  function pe(Y) {
    B.call(this, Y);
    const te = this.stack[this.stack.length - 1];
    te.url = "mailto:" + this.sliceSerialize(Y);
  }
  function Me() {
    return {
      type: "blockquote",
      children: []
    };
  }
  function We() {
    return {
      type: "code",
      lang: null,
      meta: null,
      value: ""
    };
  }
  function ze() {
    return {
      type: "inlineCode",
      value: ""
    };
  }
  function Fe() {
    return {
      type: "definition",
      identifier: "",
      label: null,
      title: null,
      url: ""
    };
  }
  function Ye() {
    return {
      type: "emphasis",
      children: []
    };
  }
  function oe() {
    return {
      type: "heading",
      depth: void 0,
      children: []
    };
  }
  function ae() {
    return {
      type: "break"
    };
  }
  function Ie() {
    return {
      type: "html",
      value: ""
    };
  }
  function Ce() {
    return {
      type: "image",
      title: null,
      url: "",
      alt: null
    };
  }
  function ye() {
    return {
      type: "link",
      title: null,
      url: "",
      children: []
    };
  }
  function we(Y) {
    return {
      type: "list",
      ordered: Y.type === "listOrdered",
      start: null,
      spread: Y._spread,
      children: []
    };
  }
  function Ge(Y) {
    return {
      type: "listItem",
      spread: Y._spread,
      checked: null,
      children: []
    };
  }
  function $e() {
    return {
      type: "paragraph",
      children: []
    };
  }
  function ue() {
    return {
      type: "strong",
      children: []
    };
  }
  function Pe() {
    return {
      type: "text",
      value: ""
    };
  }
  function Je() {
    return {
      type: "thematicBreak"
    };
  }
}
function ll(e) {
  return {
    line: e.line,
    column: e.column,
    offset: e.offset
  };
}
function eV(e, t) {
  let n = -1;
  for (; ++n < t.length; ) {
    const r = t[n];
    Array.isArray(r) ? eV(e, r) : hRe(e, r);
  }
}
function hRe(e, t) {
  let n;
  for (n in t)
    if (JW.call(t, n)) {
      if (n === "canContainEols") {
        const r = t[n];
        r && e[n].push(...r);
      } else if (n === "transforms") {
        const r = t[n];
        r && e[n].push(...r);
      } else if (n === "enter" || n === "exit") {
        const r = t[n];
        r && Object.assign(e[n], r);
      }
    }
}
function oz(e, t) {
  throw e ? new Error(
    "Cannot close `" + e.type + "` (" + Fd({
      start: e.start,
      end: e.end
    }) + "): a different token (`" + t.type + "`, " + Fd({
      start: t.start,
      end: t.end
    }) + ") is open"
  ) : new Error(
    "Cannot close document, a token (`" + t.type + "`, " + Fd({
      start: t.start,
      end: t.end
    }) + ") is still open"
  );
}
function gRe(e) {
  Object.assign(this, { Parser: (t) => {
    const n = (
      /** @type {Options} */
      this.data("settings")
    );
    return pRe(
      t,
      Object.assign({}, n, e, {
        // Note: these options are not in the readme.
        // The goal is for them to be set by plugins on `data` instead of being
        // passed by users.
        extensions: this.data("micromarkExtensions") || [],
        mdastExtensions: this.data("fromMarkdownExtensions") || []
      })
    );
  } });
}
function yRe(e, t) {
  const n = {
    type: "element",
    tagName: "blockquote",
    properties: {},
    children: e.wrap(e.all(t), !0)
  };
  return e.patch(t, n), e.applyData(t, n);
}
function vRe(e, t) {
  const n = { type: "element", tagName: "br", properties: {}, children: [] };
  return e.patch(t, n), [e.applyData(t, n), { type: "text", value: `
` }];
}
function bRe(e, t) {
  const n = t.value ? t.value + `
` : "", r = t.lang ? t.lang.match(/^[^ \t]+(?=[ \t]|$)/) : null, o = {};
  r && (o.className = ["language-" + r]);
  let i = {
    type: "element",
    tagName: "code",
    properties: o,
    children: [{ type: "text", value: n }]
  };
  return t.meta && (i.data = { meta: t.meta }), e.patch(t, i), i = e.applyData(t, i), i = { type: "element", tagName: "pre", properties: {}, children: [i] }, e.patch(t, i), i;
}
function wRe(e, t) {
  const n = {
    type: "element",
    tagName: "del",
    properties: {},
    children: e.all(t)
  };
  return e.patch(t, n), e.applyData(t, n);
}
function xRe(e, t) {
  const n = {
    type: "element",
    tagName: "em",
    properties: {},
    children: e.all(t)
  };
  return e.patch(t, n), e.applyData(t, n);
}
function uf(e) {
  const t = [];
  let n = -1, r = 0, o = 0;
  for (; ++n < e.length; ) {
    const i = e.charCodeAt(n);
    let a = "";
    if (i === 37 && sr(e.charCodeAt(n + 1)) && sr(e.charCodeAt(n + 2)))
      o = 2;
    else if (i < 128)
      /[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i)) || (a = String.fromCharCode(i));
    else if (i > 55295 && i < 57344) {
      const l = e.charCodeAt(n + 1);
      i < 56320 && l > 56319 && l < 57344 ? (a = String.fromCharCode(i, l), o = 1) : a = "�";
    } else
      a = String.fromCharCode(i);
    a && (t.push(e.slice(r, n), encodeURIComponent(a)), r = n + o + 1, a = ""), o && (n += o, o = 0);
  }
  return t.join("") + e.slice(r);
}
function tV(e, t) {
  const n = String(t.identifier).toUpperCase(), r = uf(n.toLowerCase()), o = e.footnoteOrder.indexOf(n);
  let i;
  o === -1 ? (e.footnoteOrder.push(n), e.footnoteCounts[n] = 1, i = e.footnoteOrder.length) : (e.footnoteCounts[n]++, i = o + 1);
  const a = e.footnoteCounts[n], l = {
    type: "element",
    tagName: "a",
    properties: {
      href: "#" + e.clobberPrefix + "fn-" + r,
      id: e.clobberPrefix + "fnref-" + r + (a > 1 ? "-" + a : ""),
      dataFootnoteRef: !0,
      ariaDescribedBy: ["footnote-label"]
    },
    children: [{ type: "text", value: String(i) }]
  };
  e.patch(t, l);
  const s = {
    type: "element",
    tagName: "sup",
    properties: {},
    children: [l]
  };
  return e.patch(t, s), e.applyData(t, s);
}
function SRe(e, t) {
  const n = e.footnoteById;
  let r = 1;
  for (; r in n; )
    r++;
  const o = String(r);
  return n[o] = {
    type: "footnoteDefinition",
    identifier: o,
    children: [{ type: "paragraph", children: t.children }],
    position: t.position
  }, tV(e, {
    type: "footnoteReference",
    identifier: o,
    position: t.position
  });
}
function kRe(e, t) {
  const n = {
    type: "element",
    tagName: "h" + t.depth,
    properties: {},
    children: e.all(t)
  };
  return e.patch(t, n), e.applyData(t, n);
}
function _Re(e, t) {
  if (e.dangerous) {
    const n = { type: "raw", value: t.value };
    return e.patch(t, n), e.applyData(t, n);
  }
  return null;
}
function nV(e, t) {
  const n = t.referenceType;
  let r = "]";
  if (n === "collapsed" ? r += "[]" : n === "full" && (r += "[" + (t.label || t.identifier) + "]"), t.type === "imageReference")
    return { type: "text", value: "![" + t.alt + r };
  const o = e.all(t), i = o[0];
  i && i.type === "text" ? i.value = "[" + i.value : o.unshift({ type: "text", value: "[" });
  const a = o[o.length - 1];
  return a && a.type === "text" ? a.value += r : o.push({ type: "text", value: r }), o;
}
function ORe(e, t) {
  const n = e.definition(t.identifier);
  if (!n)
    return nV(e, t);
  const r = { src: uf(n.url || ""), alt: t.alt };
  n.title !== null && n.title !== void 0 && (r.title = n.title);
  const o = { type: "element", tagName: "img", properties: r, children: [] };
  return e.patch(t, o), e.applyData(t, o);
}
function ERe(e, t) {
  const n = { src: uf(t.url) };
  t.alt !== null && t.alt !== void 0 && (n.alt = t.alt), t.title !== null && t.title !== void 0 && (n.title = t.title);
  const r = { type: "element", tagName: "img", properties: n, children: [] };
  return e.patch(t, r), e.applyData(t, r);
}
function CRe(e, t) {
  const n = { type: "text", value: t.value.replace(/\r?\n|\r/g, " ") };
  e.patch(t, n);
  const r = {
    type: "element",
    tagName: "code",
    properties: {},
    children: [n]
  };
  return e.patch(t, r), e.applyData(t, r);
}
function PRe(e, t) {
  const n = e.definition(t.identifier);
  if (!n)
    return nV(e, t);
  const r = { href: uf(n.url || "") };
  n.title !== null && n.title !== void 0 && (r.title = n.title);
  const o = {
    type: "element",
    tagName: "a",
    properties: r,
    children: e.all(t)
  };
  return e.patch(t, o), e.applyData(t, o);
}
function RRe(e, t) {
  const n = { href: uf(t.url) };
  t.title !== null && t.title !== void 0 && (n.title = t.title);
  const r = {
    type: "element",
    tagName: "a",
    properties: n,
    children: e.all(t)
  };
  return e.patch(t, r), e.applyData(t, r);
}
function TRe(e, t, n) {
  const r = e.all(t), o = n ? jRe(n) : rV(t), i = {}, a = [];
  if (typeof t.checked == "boolean") {
    const p = r[0];
    let f;
    p && p.type === "element" && p.tagName === "p" ? f = p : (f = { type: "element", tagName: "p", properties: {}, children: [] }, r.unshift(f)), f.children.length > 0 && f.children.unshift({ type: "text", value: " " }), f.children.unshift({
      type: "element",
      tagName: "input",
      properties: { type: "checkbox", checked: t.checked, disabled: !0 },
      children: []
    }), i.className = ["task-list-item"];
  }
  let l = -1;
  for (; ++l < r.length; ) {
    const p = r[l];
    (o || l !== 0 || p.type !== "element" || p.tagName !== "p") && a.push({ type: "text", value: `
` }), p.type === "element" && p.tagName === "p" && !o ? a.push(...p.children) : a.push(p);
  }
  const s = r[r.length - 1];
  s && (o || s.type !== "element" || s.tagName !== "p") && a.push({ type: "text", value: `
` });
  const c = { type: "element", tagName: "li", properties: i, children: a };
  return e.patch(t, c), e.applyData(t, c);
}
function jRe(e) {
  let t = !1;
  if (e.type === "list") {
    t = e.spread || !1;
    const n = e.children;
    let r = -1;
    for (; !t && ++r < n.length; )
      t = rV(n[r]);
  }
  return t;
}
function rV(e) {
  return e.spread ?? e.children.length > 1;
}
function NRe(e, t) {
  const n = {}, r = e.all(t);
  let o = -1;
  for (typeof t.start == "number" && t.start !== 1 && (n.start = t.start); ++o < r.length; ) {
    const a = r[o];
    if (a.type === "element" && a.tagName === "li" && a.properties && Array.isArray(a.properties.className) && a.properties.className.includes("task-list-item")) {
      n.className = ["contains-task-list"];
      break;
    }
  }
  const i = {
    type: "element",
    tagName: t.ordered ? "ol" : "ul",
    properties: n,
    children: e.wrap(r, !0)
  };
  return e.patch(t, i), e.applyData(t, i);
}
function $Re(e, t) {
  const n = {
    type: "element",
    tagName: "p",
    properties: {},
    children: e.all(t)
  };
  return e.patch(t, n), e.applyData(t, n);
}
function IRe(e, t) {
  const n = { type: "root", children: e.wrap(e.all(t)) };
  return e.patch(t, n), e.applyData(t, n);
}
function ARe(e, t) {
  const n = {
    type: "element",
    tagName: "strong",
    properties: {},
    children: e.all(t)
  };
  return e.patch(t, n), e.applyData(t, n);
}
const VP = oV("start"), qP = oV("end");
function zRe(e) {
  return { start: VP(e), end: qP(e) };
}
function oV(e) {
  return t;
  function t(n) {
    const r = n && n.position && n.position[e] || {};
    return {
      // @ts-expect-error: in practice, null is allowed.
      line: r.line || null,
      // @ts-expect-error: in practice, null is allowed.
      column: r.column || null,
      // @ts-expect-error: in practice, null is allowed.
      offset: r.offset > -1 ? r.offset : null
    };
  }
}
function LRe(e, t) {
  const n = e.all(t), r = n.shift(), o = [];
  if (r) {
    const a = {
      type: "element",
      tagName: "thead",
      properties: {},
      children: e.wrap([r], !0)
    };
    e.patch(t.children[0], a), o.push(a);
  }
  if (n.length > 0) {
    const a = {
      type: "element",
      tagName: "tbody",
      properties: {},
      children: e.wrap(n, !0)
    }, l = VP(t.children[1]), s = qP(t.children[t.children.length - 1]);
    l.line && s.line && (a.position = { start: l, end: s }), o.push(a);
  }
  const i = {
    type: "element",
    tagName: "table",
    properties: {},
    children: e.wrap(o, !0)
  };
  return e.patch(t, i), e.applyData(t, i);
}
function DRe(e, t, n) {
  const r = n ? n.children : void 0, o = (r ? r.indexOf(t) : 1) === 0 ? "th" : "td", i = n && n.type === "table" ? n.align : void 0, a = i ? i.length : t.children.length;
  let l = -1;
  const s = [];
  for (; ++l < a; ) {
    const p = t.children[l], f = {}, m = i ? i[l] : void 0;
    m && (f.align = m);
    let h = { type: "element", tagName: o, properties: f, children: [] };
    p && (h.children = e.all(p), e.patch(p, h), h = e.applyData(t, h)), s.push(h);
  }
  const c = {
    type: "element",
    tagName: "tr",
    properties: {},
    children: e.wrap(s, !0)
  };
  return e.patch(t, c), e.applyData(t, c);
}
function FRe(e, t) {
  const n = {
    type: "element",
    tagName: "td",
    // Assume body cell.
    properties: {},
    children: e.all(t)
  };
  return e.patch(t, n), e.applyData(t, n);
}
const iz = 9, az = 32;
function MRe(e) {
  const t = String(e), n = /\r?\n|\r/g;
  let r = n.exec(t), o = 0;
  const i = [];
  for (; r; )
    i.push(
      lz(t.slice(o, r.index), o > 0, !0),
      r[0]
    ), o = r.index + r[0].length, r = n.exec(t);
  return i.push(lz(t.slice(o), o > 0, !1)), i.join("");
}
function lz(e, t, n) {
  let r = 0, o = e.length;
  if (t) {
    let i = e.codePointAt(r);
    for (; i === iz || i === az; )
      r++, i = e.codePointAt(r);
  }
  if (n) {
    let i = e.codePointAt(o - 1);
    for (; i === iz || i === az; )
      o--, i = e.codePointAt(o - 1);
  }
  return o > r ? e.slice(r, o) : "";
}
function BRe(e, t) {
  const n = { type: "text", value: MRe(String(t.value)) };
  return e.patch(t, n), e.applyData(t, n);
}
function URe(e, t) {
  const n = {
    type: "element",
    tagName: "hr",
    properties: {},
    children: []
  };
  return e.patch(t, n), e.applyData(t, n);
}
const HRe = {
  blockquote: yRe,
  break: vRe,
  code: bRe,
  delete: wRe,
  emphasis: xRe,
  footnoteReference: tV,
  footnote: SRe,
  heading: kRe,
  html: _Re,
  imageReference: ORe,
  image: ERe,
  inlineCode: CRe,
  linkReference: PRe,
  link: RRe,
  listItem: TRe,
  list: NRe,
  paragraph: $Re,
  root: IRe,
  strong: ARe,
  table: LRe,
  tableCell: FRe,
  tableRow: DRe,
  text: BRe,
  thematicBreak: URe,
  toml: Bh,
  yaml: Bh,
  definition: Bh,
  footnoteDefinition: Bh
};
function Bh() {
  return null;
}
const GP = (
  /**
   * @type {(
   *   (<Kind extends Node>(test: PredicateTest<Kind>) => AssertPredicate<Kind>) &
   *   ((test?: Test) => AssertAnything)
   * )}
   */
  /**
   * @param {Test} [test]
   * @returns {AssertAnything}
   */
  function(e) {
    if (e == null)
      return GRe;
    if (typeof e == "string")
      return qRe(e);
    if (typeof e == "object")
      return Array.isArray(e) ? WRe(e) : VRe(e);
    if (typeof e == "function")
      return jx(e);
    throw new Error("Expected function, string, or object as test");
  }
);
function WRe(e) {
  const t = [];
  let n = -1;
  for (; ++n < e.length; )
    t[n] = GP(e[n]);
  return jx(r);
  function r(...o) {
    let i = -1;
    for (; ++i < t.length; )
      if (t[i].call(this, ...o))
        return !0;
    return !1;
  }
}
function VRe(e) {
  return jx(t);
  function t(n) {
    let r;
    for (r in e)
      if (n[r] !== e[r])
        return !1;
    return !0;
  }
}
function qRe(e) {
  return jx(t);
  function t(n) {
    return n && n.type === e;
  }
}
function jx(e) {
  return t;
  function t(n, ...r) {
    return !!(n && typeof n == "object" && "type" in n && e.call(this, n, ...r));
  }
}
function GRe() {
  return !0;
}
const KRe = !0, sz = !1, YRe = "skip", iV = (
  /**
   * @type {(
   *   (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &
   *   (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)
   * )}
   */
  /**
   * @param {Node} tree
   * @param {Test} test
   * @param {Visitor<Node>} visitor
   * @param {boolean | null | undefined} [reverse]
   * @returns {void}
   */
  function(e, t, n, r) {
    typeof t == "function" && typeof n != "function" && (r = n, n = t, t = null);
    const o = GP(t), i = r ? -1 : 1;
    a(e, void 0, [])();
    function a(l, s, c) {
      const p = l && typeof l == "object" ? l : {};
      if (typeof p.type == "string") {
        const m = (
          // `hast`
          typeof p.tagName == "string" ? p.tagName : (
            // `xast`
            typeof p.name == "string" ? p.name : void 0
          )
        );
        Object.defineProperty(f, "name", {
          value: "node (" + (l.type + (m ? "<" + m + ">" : "")) + ")"
        });
      }
      return f;
      function f() {
        let m = [], h, g, v;
        if ((!t || o(l, s, c[c.length - 1] || null)) && (m = XRe(n(l, c)), m[0] === sz))
          return m;
        if (l.children && m[0] !== YRe)
          for (g = (r ? l.children.length : -1) + i, v = c.concat(l); g > -1 && g < l.children.length; ) {
            if (h = a(l.children[g], g, v)(), h[0] === sz)
              return h;
            g = typeof h[1] == "number" ? h[1] : g + i;
          }
        return m;
      }
    }
  }
);
function XRe(e) {
  return Array.isArray(e) ? e : typeof e == "number" ? [KRe, e] : [e];
}
const KP = (
  /**
   * @type {(
   *   (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &
   *   (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)
   * )}
   */
  /**
   * @param {Node} tree
   * @param {Test} test
   * @param {Visitor} visitor
   * @param {boolean | null | undefined} [reverse]
   * @returns {void}
   */
  function(e, t, n, r) {
    typeof t == "function" && typeof n != "function" && (r = n, n = t, t = null), iV(e, t, o, r);
    function o(i, a) {
      const l = a[a.length - 1];
      return n(
        i,
        l ? l.children.indexOf(i) : null,
        l
      );
    }
  }
);
function ZRe(e) {
  return !e || !e.position || !e.position.start || !e.position.start.line || !e.position.start.column || !e.position.end || !e.position.end.line || !e.position.end.column;
}
const uz = {}.hasOwnProperty;
function QRe(e) {
  const t = /* @__PURE__ */ Object.create(null);
  if (!e || !e.type)
    throw new Error("mdast-util-definitions expected node");
  return KP(e, "definition", (r) => {
    const o = cz(r.identifier);
    o && !uz.call(t, o) && (t[o] = r);
  }), n;
  function n(r) {
    const o = cz(r);
    return o && uz.call(t, o) ? t[o] : null;
  }
}
function cz(e) {
  return String(e || "").toUpperCase();
}
const Bb = {}.hasOwnProperty;
function JRe(e, t) {
  const n = t || {}, r = n.allowDangerousHtml || !1, o = {};
  return a.dangerous = r, a.clobberPrefix = n.clobberPrefix === void 0 || n.clobberPrefix === null ? "user-content-" : n.clobberPrefix, a.footnoteLabel = n.footnoteLabel || "Footnotes", a.footnoteLabelTagName = n.footnoteLabelTagName || "h2", a.footnoteLabelProperties = n.footnoteLabelProperties || {
    className: ["sr-only"]
  }, a.footnoteBackLabel = n.footnoteBackLabel || "Back to content", a.unknownHandler = n.unknownHandler, a.passThrough = n.passThrough, a.handlers = { ...HRe, ...n.handlers }, a.definition = QRe(e), a.footnoteById = o, a.footnoteOrder = [], a.footnoteCounts = {}, a.patch = eTe, a.applyData = tTe, a.one = l, a.all = s, a.wrap = rTe, a.augment = i, KP(e, "footnoteDefinition", (c) => {
    const p = String(c.identifier).toUpperCase();
    Bb.call(o, p) || (o[p] = c);
  }), a;
  function i(c, p) {
    if (c && "data" in c && c.data) {
      const f = c.data;
      f.hName && (p.type !== "element" && (p = {
        type: "element",
        tagName: "",
        properties: {},
        children: []
      }), p.tagName = f.hName), p.type === "element" && f.hProperties && (p.properties = { ...p.properties, ...f.hProperties }), "children" in p && p.children && f.hChildren && (p.children = f.hChildren);
    }
    if (c) {
      const f = "type" in c ? c : { position: c };
      ZRe(f) || (p.position = { start: VP(f), end: qP(f) });
    }
    return p;
  }
  function a(c, p, f, m) {
    return Array.isArray(f) && (m = f, f = {}), i(c, {
      type: "element",
      tagName: p,
      properties: f || {},
      children: m || []
    });
  }
  function l(c, p) {
    return aV(a, c, p);
  }
  function s(c) {
    return YP(a, c);
  }
}
function eTe(e, t) {
  e.position && (t.position = zRe(e));
}
function tTe(e, t) {
  let n = t;
  if (e && e.data) {
    const r = e.data.hName, o = e.data.hChildren, i = e.data.hProperties;
    typeof r == "string" && (n.type === "element" ? n.tagName = r : n = {
      type: "element",
      tagName: r,
      properties: {},
      children: []
    }), n.type === "element" && i && (n.properties = { ...n.properties, ...i }), "children" in n && n.children && o !== null && o !== void 0 && (n.children = o);
  }
  return n;
}
function aV(e, t, n) {
  const r = t && t.type;
  if (!r)
    throw new Error("Expected node, got `" + t + "`");
  return Bb.call(e.handlers, r) ? e.handlers[r](e, t, n) : e.passThrough && e.passThrough.includes(r) ? "children" in t ? { ...t, children: YP(e, t) } : t : e.unknownHandler ? e.unknownHandler(e, t, n) : nTe(e, t);
}
function YP(e, t) {
  const n = [];
  if ("children" in t) {
    const r = t.children;
    let o = -1;
    for (; ++o < r.length; ) {
      const i = aV(e, r[o], t);
      if (i) {
        if (o && r[o - 1].type === "break" && (!Array.isArray(i) && i.type === "text" && (i.value = i.value.replace(/^\s+/, "")), !Array.isArray(i) && i.type === "element")) {
          const a = i.children[0];
          a && a.type === "text" && (a.value = a.value.replace(/^\s+/, ""));
        }
        Array.isArray(i) ? n.push(...i) : n.push(i);
      }
    }
  }
  return n;
}
function nTe(e, t) {
  const n = t.data || {}, r = "value" in t && !(Bb.call(n, "hProperties") || Bb.call(n, "hChildren")) ? { type: "text", value: t.value } : {
    type: "element",
    tagName: "div",
    properties: {},
    children: YP(e, t)
  };
  return e.patch(t, r), e.applyData(t, r);
}
function rTe(e, t) {
  const n = [];
  let r = -1;
  for (t && n.push({ type: "text", value: `
` }); ++r < e.length; )
    r && n.push({ type: "text", value: `
` }), n.push(e[r]);
  return t && e.length > 0 && n.push({ type: "text", value: `
` }), n;
}
function oTe(e) {
  const t = [];
  let n = -1;
  for (; ++n < e.footnoteOrder.length; ) {
    const r = e.footnoteById[e.footnoteOrder[n]];
    if (!r)
      continue;
    const o = e.all(r), i = String(r.identifier).toUpperCase(), a = uf(i.toLowerCase());
    let l = 0;
    const s = [];
    for (; ++l <= e.footnoteCounts[i]; ) {
      const f = {
        type: "element",
        tagName: "a",
        properties: {
          href: "#" + e.clobberPrefix + "fnref-" + a + (l > 1 ? "-" + l : ""),
          dataFootnoteBackref: !0,
          className: ["data-footnote-backref"],
          ariaLabel: e.footnoteBackLabel
        },
        children: [{ type: "text", value: "↩" }]
      };
      l > 1 && f.children.push({
        type: "element",
        tagName: "sup",
        children: [{ type: "text", value: String(l) }]
      }), s.length > 0 && s.push({ type: "text", value: " " }), s.push(f);
    }
    const c = o[o.length - 1];
    if (c && c.type === "element" && c.tagName === "p") {
      const f = c.children[c.children.length - 1];
      f && f.type === "text" ? f.value += " " : c.children.push({ type: "text", value: " " }), c.children.push(...s);
    } else
      o.push(...s);
    const p = {
      type: "element",
      tagName: "li",
      properties: { id: e.clobberPrefix + "fn-" + a },
      children: e.wrap(o, !0)
    };
    e.patch(r, p), t.push(p);
  }
  if (t.length !== 0)
    return {
      type: "element",
      tagName: "section",
      properties: { dataFootnotes: !0, className: ["footnotes"] },
      children: [
        {
          type: "element",
          tagName: e.footnoteLabelTagName,
          properties: {
            // To do: use structured clone.
            ...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),
            id: "footnote-label"
          },
          children: [{ type: "text", value: e.footnoteLabel }]
        },
        { type: "text", value: `
` },
        {
          type: "element",
          tagName: "ol",
          properties: {},
          children: e.wrap(t, !0)
        },
        { type: "text", value: `
` }
      ]
    };
}
function lV(e, t) {
  const n = JRe(e, t), r = n.one(e, null), o = oTe(n);
  return o && r.children.push({ type: "text", value: `
` }, o), Array.isArray(r) ? { type: "root", children: r } : r;
}
const iTe = (
  /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */
  function(e, t) {
    return e && "run" in e ? lTe(e, t) : sTe(e || t);
  }
), aTe = iTe;
function lTe(e, t) {
  return (n, r, o) => {
    e.run(lV(n, t), r, (i) => {
      o(i);
    });
  };
}
function sTe(e) {
  return (t) => lV(t, e);
}
class Hp {
  /**
   * @constructor
   * @param {Properties} property
   * @param {Normal} normal
   * @param {string} [space]
   */
  constructor(t, n, r) {
    this.property = t, this.normal = n, r && (this.space = r);
  }
}
Hp.prototype.property = {};
Hp.prototype.normal = {};
Hp.prototype.space = null;
function sV(e, t) {
  const n = {}, r = {};
  let o = -1;
  for (; ++o < e.length; )
    Object.assign(n, e[o].property), Object.assign(r, e[o].normal);
  return new Hp(n, r, t);
}
function aE(e) {
  return e.toLowerCase();
}
class Zo {
  /**
   * @constructor
   * @param {string} property
   * @param {string} attribute
   */
  constructor(t, n) {
    this.property = t, this.attribute = n;
  }
}
Zo.prototype.space = null;
Zo.prototype.boolean = !1;
Zo.prototype.booleanish = !1;
Zo.prototype.overloadedBoolean = !1;
Zo.prototype.number = !1;
Zo.prototype.commaSeparated = !1;
Zo.prototype.spaceSeparated = !1;
Zo.prototype.commaOrSpaceSeparated = !1;
Zo.prototype.mustUseProperty = !1;
Zo.prototype.defined = !1;
let uTe = 0;
const rt = eu(), bn = eu(), uV = eu(), ve = eu(), Ut = eu(), gc = eu(), ro = eu();
function eu() {
  return 2 ** ++uTe;
}
const lE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  boolean: rt,
  booleanish: bn,
  commaOrSpaceSeparated: ro,
  commaSeparated: gc,
  number: ve,
  overloadedBoolean: uV,
  spaceSeparated: Ut
}, Symbol.toStringTag, { value: "Module" })), D_ = Object.keys(lE);
class XP extends Zo {
  /**
   * @constructor
   * @param {string} property
   * @param {string} attribute
   * @param {number|null} [mask]
   * @param {string} [space]
   */
  constructor(t, n, r, o) {
    let i = -1;
    if (super(t, n), fz(this, "space", o), typeof r == "number")
      for (; ++i < D_.length; ) {
        const a = D_[i];
        fz(this, D_[i], (r & lE[a]) === lE[a]);
      }
  }
}
XP.prototype.defined = !0;
function fz(e, t, n) {
  n && (e[t] = n);
}
const cTe = {}.hasOwnProperty;
function cf(e) {
  const t = {}, n = {};
  let r;
  for (r in e.properties)
    if (cTe.call(e.properties, r)) {
      const o = e.properties[r], i = new XP(
        r,
        e.transform(e.attributes || {}, r),
        o,
        e.space
      );
      e.mustUseProperty && e.mustUseProperty.includes(r) && (i.mustUseProperty = !0), t[r] = i, n[aE(r)] = r, n[aE(i.attribute)] = r;
    }
  return new Hp(t, n, e.space);
}
const cV = cf({
  space: "xlink",
  transform(e, t) {
    return "xlink:" + t.slice(5).toLowerCase();
  },
  properties: {
    xLinkActuate: null,
    xLinkArcRole: null,
    xLinkHref: null,
    xLinkRole: null,
    xLinkShow: null,
    xLinkTitle: null,
    xLinkType: null
  }
}), fV = cf({
  space: "xml",
  transform(e, t) {
    return "xml:" + t.slice(3).toLowerCase();
  },
  properties: { xmlLang: null, xmlBase: null, xmlSpace: null }
});
function dV(e, t) {
  return t in e ? e[t] : t;
}
function pV(e, t) {
  return dV(e, t.toLowerCase());
}
const mV = cf({
  space: "xmlns",
  attributes: { xmlnsxlink: "xmlns:xlink" },
  transform: pV,
  properties: { xmlns: null, xmlnsXLink: null }
}), hV = cf({
  transform(e, t) {
    return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
  },
  properties: {
    ariaActiveDescendant: null,
    ariaAtomic: bn,
    ariaAutoComplete: null,
    ariaBusy: bn,
    ariaChecked: bn,
    ariaColCount: ve,
    ariaColIndex: ve,
    ariaColSpan: ve,
    ariaControls: Ut,
    ariaCurrent: null,
    ariaDescribedBy: Ut,
    ariaDetails: null,
    ariaDisabled: bn,
    ariaDropEffect: Ut,
    ariaErrorMessage: null,
    ariaExpanded: bn,
    ariaFlowTo: Ut,
    ariaGrabbed: bn,
    ariaHasPopup: null,
    ariaHidden: bn,
    ariaInvalid: null,
    ariaKeyShortcuts: null,
    ariaLabel: null,
    ariaLabelledBy: Ut,
    ariaLevel: ve,
    ariaLive: null,
    ariaModal: bn,
    ariaMultiLine: bn,
    ariaMultiSelectable: bn,
    ariaOrientation: null,
    ariaOwns: Ut,
    ariaPlaceholder: null,
    ariaPosInSet: ve,
    ariaPressed: bn,
    ariaReadOnly: bn,
    ariaRelevant: null,
    ariaRequired: bn,
    ariaRoleDescription: Ut,
    ariaRowCount: ve,
    ariaRowIndex: ve,
    ariaRowSpan: ve,
    ariaSelected: bn,
    ariaSetSize: ve,
    ariaSort: null,
    ariaValueMax: ve,
    ariaValueMin: ve,
    ariaValueNow: ve,
    ariaValueText: null,
    role: null
  }
}), fTe = cf({
  space: "html",
  attributes: {
    acceptcharset: "accept-charset",
    classname: "class",
    htmlfor: "for",
    httpequiv: "http-equiv"
  },
  transform: pV,
  mustUseProperty: ["checked", "multiple", "muted", "selected"],
  properties: {
    // Standard Properties.
    abbr: null,
    accept: gc,
    acceptCharset: Ut,
    accessKey: Ut,
    action: null,
    allow: null,
    allowFullScreen: rt,
    allowPaymentRequest: rt,
    allowUserMedia: rt,
    alt: null,
    as: null,
    async: rt,
    autoCapitalize: null,
    autoComplete: Ut,
    autoFocus: rt,
    autoPlay: rt,
    blocking: Ut,
    capture: rt,
    charSet: null,
    checked: rt,
    cite: null,
    className: Ut,
    cols: ve,
    colSpan: null,
    content: null,
    contentEditable: bn,
    controls: rt,
    controlsList: Ut,
    coords: ve | gc,
    crossOrigin: null,
    data: null,
    dateTime: null,
    decoding: null,
    default: rt,
    defer: rt,
    dir: null,
    dirName: null,
    disabled: rt,
    download: uV,
    draggable: bn,
    encType: null,
    enterKeyHint: null,
    fetchPriority: null,
    form: null,
    formAction: null,
    formEncType: null,
    formMethod: null,
    formNoValidate: rt,
    formTarget: null,
    headers: Ut,
    height: ve,
    hidden: rt,
    high: ve,
    href: null,
    hrefLang: null,
    htmlFor: Ut,
    httpEquiv: Ut,
    id: null,
    imageSizes: null,
    imageSrcSet: null,
    inert: rt,
    inputMode: null,
    integrity: null,
    is: null,
    isMap: rt,
    itemId: null,
    itemProp: Ut,
    itemRef: Ut,
    itemScope: rt,
    itemType: Ut,
    kind: null,
    label: null,
    lang: null,
    language: null,
    list: null,
    loading: null,
    loop: rt,
    low: ve,
    manifest: null,
    max: null,
    maxLength: ve,
    media: null,
    method: null,
    min: null,
    minLength: ve,
    multiple: rt,
    muted: rt,
    name: null,
    nonce: null,
    noModule: rt,
    noValidate: rt,
    onAbort: null,
    onAfterPrint: null,
    onAuxClick: null,
    onBeforeMatch: null,
    onBeforePrint: null,
    onBeforeToggle: null,
    onBeforeUnload: null,
    onBlur: null,
    onCancel: null,
    onCanPlay: null,
    onCanPlayThrough: null,
    onChange: null,
    onClick: null,
    onClose: null,
    onContextLost: null,
    onContextMenu: null,
    onContextRestored: null,
    onCopy: null,
    onCueChange: null,
    onCut: null,
    onDblClick: null,
    onDrag: null,
    onDragEnd: null,
    onDragEnter: null,
    onDragExit: null,
    onDragLeave: null,
    onDragOver: null,
    onDragStart: null,
    onDrop: null,
    onDurationChange: null,
    onEmptied: null,
    onEnded: null,
    onError: null,
    onFocus: null,
    onFormData: null,
    onHashChange: null,
    onInput: null,
    onInvalid: null,
    onKeyDown: null,
    onKeyPress: null,
    onKeyUp: null,
    onLanguageChange: null,
    onLoad: null,
    onLoadedData: null,
    onLoadedMetadata: null,
    onLoadEnd: null,
    onLoadStart: null,
    onMessage: null,
    onMessageError: null,
    onMouseDown: null,
    onMouseEnter: null,
    onMouseLeave: null,
    onMouseMove: null,
    onMouseOut: null,
    onMouseOver: null,
    onMouseUp: null,
    onOffline: null,
    onOnline: null,
    onPageHide: null,
    onPageShow: null,
    onPaste: null,
    onPause: null,
    onPlay: null,
    onPlaying: null,
    onPopState: null,
    onProgress: null,
    onRateChange: null,
    onRejectionHandled: null,
    onReset: null,
    onResize: null,
    onScroll: null,
    onScrollEnd: null,
    onSecurityPolicyViolation: null,
    onSeeked: null,
    onSeeking: null,
    onSelect: null,
    onSlotChange: null,
    onStalled: null,
    onStorage: null,
    onSubmit: null,
    onSuspend: null,
    onTimeUpdate: null,
    onToggle: null,
    onUnhandledRejection: null,
    onUnload: null,
    onVolumeChange: null,
    onWaiting: null,
    onWheel: null,
    open: rt,
    optimum: ve,
    pattern: null,
    ping: Ut,
    placeholder: null,
    playsInline: rt,
    popover: null,
    popoverTarget: null,
    popoverTargetAction: null,
    poster: null,
    preload: null,
    readOnly: rt,
    referrerPolicy: null,
    rel: Ut,
    required: rt,
    reversed: rt,
    rows: ve,
    rowSpan: ve,
    sandbox: Ut,
    scope: null,
    scoped: rt,
    seamless: rt,
    selected: rt,
    shadowRootDelegatesFocus: rt,
    shadowRootMode: null,
    shape: null,
    size: ve,
    sizes: null,
    slot: null,
    span: ve,
    spellCheck: bn,
    src: null,
    srcDoc: null,
    srcLang: null,
    srcSet: null,
    start: ve,
    step: null,
    style: null,
    tabIndex: ve,
    target: null,
    title: null,
    translate: null,
    type: null,
    typeMustMatch: rt,
    useMap: null,
    value: bn,
    width: ve,
    wrap: null,
    // Legacy.
    // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
    align: null,
    // Several. Use CSS `text-align` instead,
    aLink: null,
    // `<body>`. Use CSS `a:active {color}` instead
    archive: Ut,
    // `<object>`. List of URIs to archives
    axis: null,
    // `<td>` and `<th>`. Use `scope` on `<th>`
    background: null,
    // `<body>`. Use CSS `background-image` instead
    bgColor: null,
    // `<body>` and table elements. Use CSS `background-color` instead
    border: ve,
    // `<table>`. Use CSS `border-width` instead,
    borderColor: null,
    // `<table>`. Use CSS `border-color` instead,
    bottomMargin: ve,
    // `<body>`
    cellPadding: null,
    // `<table>`
    cellSpacing: null,
    // `<table>`
    char: null,
    // Several table elements. When `align=char`, sets the character to align on
    charOff: null,
    // Several table elements. When `char`, offsets the alignment
    classId: null,
    // `<object>`
    clear: null,
    // `<br>`. Use CSS `clear` instead
    code: null,
    // `<object>`
    codeBase: null,
    // `<object>`
    codeType: null,
    // `<object>`
    color: null,
    // `<font>` and `<hr>`. Use CSS instead
    compact: rt,
    // Lists. Use CSS to reduce space between items instead
    declare: rt,
    // `<object>`
    event: null,
    // `<script>`
    face: null,
    // `<font>`. Use CSS instead
    frame: null,
    // `<table>`
    frameBorder: null,
    // `<iframe>`. Use CSS `border` instead
    hSpace: ve,
    // `<img>` and `<object>`
    leftMargin: ve,
    // `<body>`
    link: null,
    // `<body>`. Use CSS `a:link {color: *}` instead
    longDesc: null,
    // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
    lowSrc: null,
    // `<img>`. Use a `<picture>`
    marginHeight: ve,
    // `<body>`
    marginWidth: ve,
    // `<body>`
    noResize: rt,
    // `<frame>`
    noHref: rt,
    // `<area>`. Use no href instead of an explicit `nohref`
    noShade: rt,
    // `<hr>`. Use background-color and height instead of borders
    noWrap: rt,
    // `<td>` and `<th>`
    object: null,
    // `<applet>`
    profile: null,
    // `<head>`
    prompt: null,
    // `<isindex>`
    rev: null,
    // `<link>`
    rightMargin: ve,
    // `<body>`
    rules: null,
    // `<table>`
    scheme: null,
    // `<meta>`
    scrolling: bn,
    // `<frame>`. Use overflow in the child context
    standby: null,
    // `<object>`
    summary: null,
    // `<table>`
    text: null,
    // `<body>`. Use CSS `color` instead
    topMargin: ve,
    // `<body>`
    valueType: null,
    // `<param>`
    version: null,
    // `<html>`. Use a doctype.
    vAlign: null,
    // Several. Use CSS `vertical-align` instead
    vLink: null,
    // `<body>`. Use CSS `a:visited {color}` instead
    vSpace: ve,
    // `<img>` and `<object>`
    // Non-standard Properties.
    allowTransparency: null,
    autoCorrect: null,
    autoSave: null,
    disablePictureInPicture: rt,
    disableRemotePlayback: rt,
    prefix: null,
    property: null,
    results: ve,
    security: null,
    unselectable: null
  }
}), dTe = cf({
  space: "svg",
  attributes: {
    accentHeight: "accent-height",
    alignmentBaseline: "alignment-baseline",
    arabicForm: "arabic-form",
    baselineShift: "baseline-shift",
    capHeight: "cap-height",
    className: "class",
    clipPath: "clip-path",
    clipRule: "clip-rule",
    colorInterpolation: "color-interpolation",
    colorInterpolationFilters: "color-interpolation-filters",
    colorProfile: "color-profile",
    colorRendering: "color-rendering",
    crossOrigin: "crossorigin",
    dataType: "datatype",
    dominantBaseline: "dominant-baseline",
    enableBackground: "enable-background",
    fillOpacity: "fill-opacity",
    fillRule: "fill-rule",
    floodColor: "flood-color",
    floodOpacity: "flood-opacity",
    fontFamily: "font-family",
    fontSize: "font-size",
    fontSizeAdjust: "font-size-adjust",
    fontStretch: "font-stretch",
    fontStyle: "font-style",
    fontVariant: "font-variant",
    fontWeight: "font-weight",
    glyphName: "glyph-name",
    glyphOrientationHorizontal: "glyph-orientation-horizontal",
    glyphOrientationVertical: "glyph-orientation-vertical",
    hrefLang: "hreflang",
    horizAdvX: "horiz-adv-x",
    horizOriginX: "horiz-origin-x",
    horizOriginY: "horiz-origin-y",
    imageRendering: "image-rendering",
    letterSpacing: "letter-spacing",
    lightingColor: "lighting-color",
    markerEnd: "marker-end",
    markerMid: "marker-mid",
    markerStart: "marker-start",
    navDown: "nav-down",
    navDownLeft: "nav-down-left",
    navDownRight: "nav-down-right",
    navLeft: "nav-left",
    navNext: "nav-next",
    navPrev: "nav-prev",
    navRight: "nav-right",
    navUp: "nav-up",
    navUpLeft: "nav-up-left",
    navUpRight: "nav-up-right",
    onAbort: "onabort",
    onActivate: "onactivate",
    onAfterPrint: "onafterprint",
    onBeforePrint: "onbeforeprint",
    onBegin: "onbegin",
    onCancel: "oncancel",
    onCanPlay: "oncanplay",
    onCanPlayThrough: "oncanplaythrough",
    onChange: "onchange",
    onClick: "onclick",
    onClose: "onclose",
    onCopy: "oncopy",
    onCueChange: "oncuechange",
    onCut: "oncut",
    onDblClick: "ondblclick",
    onDrag: "ondrag",
    onDragEnd: "ondragend",
    onDragEnter: "ondragenter",
    onDragExit: "ondragexit",
    onDragLeave: "ondragleave",
    onDragOver: "ondragover",
    onDragStart: "ondragstart",
    onDrop: "ondrop",
    onDurationChange: "ondurationchange",
    onEmptied: "onemptied",
    onEnd: "onend",
    onEnded: "onended",
    onError: "onerror",
    onFocus: "onfocus",
    onFocusIn: "onfocusin",
    onFocusOut: "onfocusout",
    onHashChange: "onhashchange",
    onInput: "oninput",
    onInvalid: "oninvalid",
    onKeyDown: "onkeydown",
    onKeyPress: "onkeypress",
    onKeyUp: "onkeyup",
    onLoad: "onload",
    onLoadedData: "onloadeddata",
    onLoadedMetadata: "onloadedmetadata",
    onLoadStart: "onloadstart",
    onMessage: "onmessage",
    onMouseDown: "onmousedown",
    onMouseEnter: "onmouseenter",
    onMouseLeave: "onmouseleave",
    onMouseMove: "onmousemove",
    onMouseOut: "onmouseout",
    onMouseOver: "onmouseover",
    onMouseUp: "onmouseup",
    onMouseWheel: "onmousewheel",
    onOffline: "onoffline",
    onOnline: "ononline",
    onPageHide: "onpagehide",
    onPageShow: "onpageshow",
    onPaste: "onpaste",
    onPause: "onpause",
    onPlay: "onplay",
    onPlaying: "onplaying",
    onPopState: "onpopstate",
    onProgress: "onprogress",
    onRateChange: "onratechange",
    onRepeat: "onrepeat",
    onReset: "onreset",
    onResize: "onresize",
    onScroll: "onscroll",
    onSeeked: "onseeked",
    onSeeking: "onseeking",
    onSelect: "onselect",
    onShow: "onshow",
    onStalled: "onstalled",
    onStorage: "onstorage",
    onSubmit: "onsubmit",
    onSuspend: "onsuspend",
    onTimeUpdate: "ontimeupdate",
    onToggle: "ontoggle",
    onUnload: "onunload",
    onVolumeChange: "onvolumechange",
    onWaiting: "onwaiting",
    onZoom: "onzoom",
    overlinePosition: "overline-position",
    overlineThickness: "overline-thickness",
    paintOrder: "paint-order",
    panose1: "panose-1",
    pointerEvents: "pointer-events",
    referrerPolicy: "referrerpolicy",
    renderingIntent: "rendering-intent",
    shapeRendering: "shape-rendering",
    stopColor: "stop-color",
    stopOpacity: "stop-opacity",
    strikethroughPosition: "strikethrough-position",
    strikethroughThickness: "strikethrough-thickness",
    strokeDashArray: "stroke-dasharray",
    strokeDashOffset: "stroke-dashoffset",
    strokeLineCap: "stroke-linecap",
    strokeLineJoin: "stroke-linejoin",
    strokeMiterLimit: "stroke-miterlimit",
    strokeOpacity: "stroke-opacity",
    strokeWidth: "stroke-width",
    tabIndex: "tabindex",
    textAnchor: "text-anchor",
    textDecoration: "text-decoration",
    textRendering: "text-rendering",
    transformOrigin: "transform-origin",
    typeOf: "typeof",
    underlinePosition: "underline-position",
    underlineThickness: "underline-thickness",
    unicodeBidi: "unicode-bidi",
    unicodeRange: "unicode-range",
    unitsPerEm: "units-per-em",
    vAlphabetic: "v-alphabetic",
    vHanging: "v-hanging",
    vIdeographic: "v-ideographic",
    vMathematical: "v-mathematical",
    vectorEffect: "vector-effect",
    vertAdvY: "vert-adv-y",
    vertOriginX: "vert-origin-x",
    vertOriginY: "vert-origin-y",
    wordSpacing: "word-spacing",
    writingMode: "writing-mode",
    xHeight: "x-height",
    // These were camelcased in Tiny. Now lowercased in SVG 2
    playbackOrder: "playbackorder",
    timelineBegin: "timelinebegin"
  },
  transform: dV,
  properties: {
    about: ro,
    accentHeight: ve,
    accumulate: null,
    additive: null,
    alignmentBaseline: null,
    alphabetic: ve,
    amplitude: ve,
    arabicForm: null,
    ascent: ve,
    attributeName: null,
    attributeType: null,
    azimuth: ve,
    bandwidth: null,
    baselineShift: null,
    baseFrequency: null,
    baseProfile: null,
    bbox: null,
    begin: null,
    bias: ve,
    by: null,
    calcMode: null,
    capHeight: ve,
    className: Ut,
    clip: null,
    clipPath: null,
    clipPathUnits: null,
    clipRule: null,
    color: null,
    colorInterpolation: null,
    colorInterpolationFilters: null,
    colorProfile: null,
    colorRendering: null,
    content: null,
    contentScriptType: null,
    contentStyleType: null,
    crossOrigin: null,
    cursor: null,
    cx: null,
    cy: null,
    d: null,
    dataType: null,
    defaultAction: null,
    descent: ve,
    diffuseConstant: ve,
    direction: null,
    display: null,
    dur: null,
    divisor: ve,
    dominantBaseline: null,
    download: rt,
    dx: null,
    dy: null,
    edgeMode: null,
    editable: null,
    elevation: ve,
    enableBackground: null,
    end: null,
    event: null,
    exponent: ve,
    externalResourcesRequired: null,
    fill: null,
    fillOpacity: ve,
    fillRule: null,
    filter: null,
    filterRes: null,
    filterUnits: null,
    floodColor: null,
    floodOpacity: null,
    focusable: null,
    focusHighlight: null,
    fontFamily: null,
    fontSize: null,
    fontSizeAdjust: null,
    fontStretch: null,
    fontStyle: null,
    fontVariant: null,
    fontWeight: null,
    format: null,
    fr: null,
    from: null,
    fx: null,
    fy: null,
    g1: gc,
    g2: gc,
    glyphName: gc,
    glyphOrientationHorizontal: null,
    glyphOrientationVertical: null,
    glyphRef: null,
    gradientTransform: null,
    gradientUnits: null,
    handler: null,
    hanging: ve,
    hatchContentUnits: null,
    hatchUnits: null,
    height: null,
    href: null,
    hrefLang: null,
    horizAdvX: ve,
    horizOriginX: ve,
    horizOriginY: ve,
    id: null,
    ideographic: ve,
    imageRendering: null,
    initialVisibility: null,
    in: null,
    in2: null,
    intercept: ve,
    k: ve,
    k1: ve,
    k2: ve,
    k3: ve,
    k4: ve,
    kernelMatrix: ro,
    kernelUnitLength: null,
    keyPoints: null,
    // SEMI_COLON_SEPARATED
    keySplines: null,
    // SEMI_COLON_SEPARATED
    keyTimes: null,
    // SEMI_COLON_SEPARATED
    kerning: null,
    lang: null,
    lengthAdjust: null,
    letterSpacing: null,
    lightingColor: null,
    limitingConeAngle: ve,
    local: null,
    markerEnd: null,
    markerMid: null,
    markerStart: null,
    markerHeight: null,
    markerUnits: null,
    markerWidth: null,
    mask: null,
    maskContentUnits: null,
    maskUnits: null,
    mathematical: null,
    max: null,
    media: null,
    mediaCharacterEncoding: null,
    mediaContentEncodings: null,
    mediaSize: ve,
    mediaTime: null,
    method: null,
    min: null,
    mode: null,
    name: null,
    navDown: null,
    navDownLeft: null,
    navDownRight: null,
    navLeft: null,
    navNext: null,
    navPrev: null,
    navRight: null,
    navUp: null,
    navUpLeft: null,
    navUpRight: null,
    numOctaves: null,
    observer: null,
    offset: null,
    onAbort: null,
    onActivate: null,
    onAfterPrint: null,
    onBeforePrint: null,
    onBegin: null,
    onCancel: null,
    onCanPlay: null,
    onCanPlayThrough: null,
    onChange: null,
    onClick: null,
    onClose: null,
    onCopy: null,
    onCueChange: null,
    onCut: null,
    onDblClick: null,
    onDrag: null,
    onDragEnd: null,
    onDragEnter: null,
    onDragExit: null,
    onDragLeave: null,
    onDragOver: null,
    onDragStart: null,
    onDrop: null,
    onDurationChange: null,
    onEmptied: null,
    onEnd: null,
    onEnded: null,
    onError: null,
    onFocus: null,
    onFocusIn: null,
    onFocusOut: null,
    onHashChange: null,
    onInput: null,
    onInvalid: null,
    onKeyDown: null,
    onKeyPress: null,
    onKeyUp: null,
    onLoad: null,
    onLoadedData: null,
    onLoadedMetadata: null,
    onLoadStart: null,
    onMessage: null,
    onMouseDown: null,
    onMouseEnter: null,
    onMouseLeave: null,
    onMouseMove: null,
    onMouseOut: null,
    onMouseOver: null,
    onMouseUp: null,
    onMouseWheel: null,
    onOffline: null,
    onOnline: null,
    onPageHide: null,
    onPageShow: null,
    onPaste: null,
    onPause: null,
    onPlay: null,
    onPlaying: null,
    onPopState: null,
    onProgress: null,
    onRateChange: null,
    onRepeat: null,
    onReset: null,
    onResize: null,
    onScroll: null,
    onSeeked: null,
    onSeeking: null,
    onSelect: null,
    onShow: null,
    onStalled: null,
    onStorage: null,
    onSubmit: null,
    onSuspend: null,
    onTimeUpdate: null,
    onToggle: null,
    onUnload: null,
    onVolumeChange: null,
    onWaiting: null,
    onZoom: null,
    opacity: null,
    operator: null,
    order: null,
    orient: null,
    orientation: null,
    origin: null,
    overflow: null,
    overlay: null,
    overlinePosition: ve,
    overlineThickness: ve,
    paintOrder: null,
    panose1: null,
    path: null,
    pathLength: ve,
    patternContentUnits: null,
    patternTransform: null,
    patternUnits: null,
    phase: null,
    ping: Ut,
    pitch: null,
    playbackOrder: null,
    pointerEvents: null,
    points: null,
    pointsAtX: ve,
    pointsAtY: ve,
    pointsAtZ: ve,
    preserveAlpha: null,
    preserveAspectRatio: null,
    primitiveUnits: null,
    propagate: null,
    property: ro,
    r: null,
    radius: null,
    referrerPolicy: null,
    refX: null,
    refY: null,
    rel: ro,
    rev: ro,
    renderingIntent: null,
    repeatCount: null,
    repeatDur: null,
    requiredExtensions: ro,
    requiredFeatures: ro,
    requiredFonts: ro,
    requiredFormats: ro,
    resource: null,
    restart: null,
    result: null,
    rotate: null,
    rx: null,
    ry: null,
    scale: null,
    seed: null,
    shapeRendering: null,
    side: null,
    slope: null,
    snapshotTime: null,
    specularConstant: ve,
    specularExponent: ve,
    spreadMethod: null,
    spacing: null,
    startOffset: null,
    stdDeviation: null,
    stemh: null,
    stemv: null,
    stitchTiles: null,
    stopColor: null,
    stopOpacity: null,
    strikethroughPosition: ve,
    strikethroughThickness: ve,
    string: null,
    stroke: null,
    strokeDashArray: ro,
    strokeDashOffset: null,
    strokeLineCap: null,
    strokeLineJoin: null,
    strokeMiterLimit: ve,
    strokeOpacity: ve,
    strokeWidth: null,
    style: null,
    surfaceScale: ve,
    syncBehavior: null,
    syncBehaviorDefault: null,
    syncMaster: null,
    syncTolerance: null,
    syncToleranceDefault: null,
    systemLanguage: ro,
    tabIndex: ve,
    tableValues: null,
    target: null,
    targetX: ve,
    targetY: ve,
    textAnchor: null,
    textDecoration: null,
    textRendering: null,
    textLength: null,
    timelineBegin: null,
    title: null,
    transformBehavior: null,
    type: null,
    typeOf: ro,
    to: null,
    transform: null,
    transformOrigin: null,
    u1: null,
    u2: null,
    underlinePosition: ve,
    underlineThickness: ve,
    unicode: null,
    unicodeBidi: null,
    unicodeRange: null,
    unitsPerEm: ve,
    values: null,
    vAlphabetic: ve,
    vMathematical: ve,
    vectorEffect: null,
    vHanging: ve,
    vIdeographic: ve,
    version: null,
    vertAdvY: ve,
    vertOriginX: ve,
    vertOriginY: ve,
    viewBox: null,
    viewTarget: null,
    visibility: null,
    width: null,
    widths: null,
    wordSpacing: null,
    writingMode: null,
    x: null,
    x1: null,
    x2: null,
    xChannelSelector: null,
    xHeight: ve,
    y: null,
    y1: null,
    y2: null,
    yChannelSelector: null,
    z: null,
    zoomAndPan: null
  }
}), pTe = /^data[-\w.:]+$/i, dz = /-[a-z]/g, mTe = /[A-Z]/g;
function hTe(e, t) {
  const n = aE(t);
  let r = t, o = Zo;
  if (n in e.normal)
    return e.property[e.normal[n]];
  if (n.length > 4 && n.slice(0, 4) === "data" && pTe.test(t)) {
    if (t.charAt(4) === "-") {
      const i = t.slice(5).replace(dz, yTe);
      r = "data" + i.charAt(0).toUpperCase() + i.slice(1);
    } else {
      const i = t.slice(4);
      if (!dz.test(i)) {
        let a = i.replace(mTe, gTe);
        a.charAt(0) !== "-" && (a = "-" + a), t = "data" + a;
      }
    }
    o = XP;
  }
  return new o(r, t);
}
function gTe(e) {
  return "-" + e.toLowerCase();
}
function yTe(e) {
  return e.charAt(1).toUpperCase();
}
const pz = {
  classId: "classID",
  dataType: "datatype",
  itemId: "itemID",
  strokeDashArray: "strokeDasharray",
  strokeDashOffset: "strokeDashoffset",
  strokeLineCap: "strokeLinecap",
  strokeLineJoin: "strokeLinejoin",
  strokeMiterLimit: "strokeMiterlimit",
  typeOf: "typeof",
  xLinkActuate: "xlinkActuate",
  xLinkArcRole: "xlinkArcrole",
  xLinkHref: "xlinkHref",
  xLinkRole: "xlinkRole",
  xLinkShow: "xlinkShow",
  xLinkTitle: "xlinkTitle",
  xLinkType: "xlinkType",
  xmlnsXLink: "xmlnsXlink"
}, vTe = sV([fV, cV, mV, hV, fTe], "html"), bTe = sV([fV, cV, mV, hV, dTe], "svg");
function wTe(e) {
  if (e.allowedElements && e.disallowedElements)
    throw new TypeError(
      "Only one of `allowedElements` and `disallowedElements` should be defined"
    );
  if (e.allowedElements || e.disallowedElements || e.allowElement)
    return (t) => {
      KP(t, "element", (n, r, o) => {
        const i = (
          /** @type {Element|Root} */
          o
        );
        let a;
        if (e.allowedElements ? a = !e.allowedElements.includes(n.tagName) : e.disallowedElements && (a = e.disallowedElements.includes(n.tagName)), !a && e.allowElement && typeof r == "number" && (a = !e.allowElement(n, r, i)), a && typeof r == "number")
          return e.unwrapDisallowed && n.children ? i.children.splice(r, 1, ...n.children) : i.children.splice(r, 1), r;
      });
    };
}
var gV = { exports: {} }, Tt = {};
/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var mz;
function xTe() {
  if (mz)
    return Tt;
  mz = 1;
  var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.server_context"), s = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g;
  g = Symbol.for("react.module.reference");
  function v(S) {
    if (typeof S == "object" && S !== null) {
      var w = S.$$typeof;
      switch (w) {
        case e:
          switch (S = S.type, S) {
            case n:
            case o:
            case r:
            case c:
            case p:
              return S;
            default:
              switch (S = S && S.$$typeof, S) {
                case l:
                case a:
                case s:
                case m:
                case f:
                case i:
                  return S;
                default:
                  return w;
              }
          }
        case t:
          return w;
      }
    }
  }
  return Tt.ContextConsumer = a, Tt.ContextProvider = i, Tt.Element = e, Tt.ForwardRef = s, Tt.Fragment = n, Tt.Lazy = m, Tt.Memo = f, Tt.Portal = t, Tt.Profiler = o, Tt.StrictMode = r, Tt.Suspense = c, Tt.SuspenseList = p, Tt.isAsyncMode = function() {
    return !1;
  }, Tt.isConcurrentMode = function() {
    return !1;
  }, Tt.isContextConsumer = function(S) {
    return v(S) === a;
  }, Tt.isContextProvider = function(S) {
    return v(S) === i;
  }, Tt.isElement = function(S) {
    return typeof S == "object" && S !== null && S.$$typeof === e;
  }, Tt.isForwardRef = function(S) {
    return v(S) === s;
  }, Tt.isFragment = function(S) {
    return v(S) === n;
  }, Tt.isLazy = function(S) {
    return v(S) === m;
  }, Tt.isMemo = function(S) {
    return v(S) === f;
  }, Tt.isPortal = function(S) {
    return v(S) === t;
  }, Tt.isProfiler = function(S) {
    return v(S) === o;
  }, Tt.isStrictMode = function(S) {
    return v(S) === r;
  }, Tt.isSuspense = function(S) {
    return v(S) === c;
  }, Tt.isSuspenseList = function(S) {
    return v(S) === p;
  }, Tt.isValidElementType = function(S) {
    return typeof S == "string" || typeof S == "function" || S === n || S === o || S === r || S === c || S === p || S === h || typeof S == "object" && S !== null && (S.$$typeof === m || S.$$typeof === f || S.$$typeof === i || S.$$typeof === a || S.$$typeof === s || S.$$typeof === g || S.getModuleId !== void 0);
  }, Tt.typeOf = v, Tt;
}
gV.exports = xTe();
var STe = gV.exports;
const kTe = /* @__PURE__ */ Np(STe);
function _Te(e) {
  const t = (
    // @ts-expect-error looks like a node.
    e && typeof e == "object" && e.type === "text" ? (
      // @ts-expect-error looks like a text.
      e.value || ""
    ) : e
  );
  return typeof t == "string" && t.replace(/[ \t\n\f\r]/g, "") === "";
}
function OTe(e) {
  return e.join(" ").trim();
}
function ETe(e, t) {
  const n = t || {};
  return (e[e.length - 1] === "" ? [...e, ""] : e).join(
    (n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
  ).trim();
}
var ZP = { exports: {} }, hz = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, CTe = /\n/g, PTe = /^\s*/, RTe = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, TTe = /^:\s*/, jTe = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, NTe = /^[;\s]*/, $Te = /^\s+|\s+$/g, ITe = `
`, gz = "/", yz = "*", xs = "", ATe = "comment", zTe = "declaration", LTe = function(e, t) {
  if (typeof e != "string")
    throw new TypeError("First argument must be a string");
  if (!e)
    return [];
  t = t || {};
  var n = 1, r = 1;
  function o(g) {
    var v = g.match(CTe);
    v && (n += v.length);
    var S = g.lastIndexOf(ITe);
    r = ~S ? g.length - S : r + g.length;
  }
  function i() {
    var g = { line: n, column: r };
    return function(v) {
      return v.position = new a(g), c(), v;
    };
  }
  function a(g) {
    this.start = g, this.end = { line: n, column: r }, this.source = t.source;
  }
  a.prototype.content = e;
  function l(g) {
    var v = new Error(
      t.source + ":" + n + ":" + r + ": " + g
    );
    if (v.reason = g, v.filename = t.source, v.line = n, v.column = r, v.source = e, !t.silent)
      throw v;
  }
  function s(g) {
    var v = g.exec(e);
    if (v) {
      var S = v[0];
      return o(S), e = e.slice(S.length), v;
    }
  }
  function c() {
    s(PTe);
  }
  function p(g) {
    var v;
    for (g = g || []; v = f(); )
      v !== !1 && g.push(v);
    return g;
  }
  function f() {
    var g = i();
    if (!(gz != e.charAt(0) || yz != e.charAt(1))) {
      for (var v = 2; xs != e.charAt(v) && (yz != e.charAt(v) || gz != e.charAt(v + 1)); )
        ++v;
      if (v += 2, xs === e.charAt(v - 1))
        return l("End of comment missing");
      var S = e.slice(2, v - 2);
      return r += 2, o(S), e = e.slice(v), r += 2, g({
        type: ATe,
        comment: S
      });
    }
  }
  function m() {
    var g = i(), v = s(RTe);
    if (v) {
      if (f(), !s(TTe))
        return l("property missing ':'");
      var S = s(jTe), w = g({
        type: zTe,
        property: vz(v[0].replace(hz, xs)),
        value: S ? vz(S[0].replace(hz, xs)) : xs
      });
      return s(NTe), w;
    }
  }
  function h() {
    var g = [];
    p(g);
    for (var v; v = m(); )
      v !== !1 && (g.push(v), p(g));
    return g;
  }
  return c(), h();
};
function vz(e) {
  return e ? e.replace($Te, xs) : xs;
}
var DTe = LTe;
function yV(e, t) {
  var n = null;
  if (!e || typeof e != "string")
    return n;
  for (var r, o = DTe(e), i = typeof t == "function", a, l, s = 0, c = o.length; s < c; s++)
    r = o[s], a = r.property, l = r.value, i ? t(a, l, r) : l && (n || (n = {}), n[a] = l);
  return n;
}
ZP.exports = yV;
ZP.exports.default = yV;
var FTe = ZP.exports;
const MTe = /* @__PURE__ */ Np(FTe), sE = {}.hasOwnProperty, BTe = /* @__PURE__ */ new Set(["table", "thead", "tbody", "tfoot", "tr"]);
function vV(e, t) {
  const n = [];
  let r = -1, o;
  for (; ++r < t.children.length; )
    o = t.children[r], o.type === "element" ? n.push(UTe(e, o, r, t)) : o.type === "text" ? (t.type !== "element" || !BTe.has(t.tagName) || !_Te(o)) && n.push(o.value) : o.type === "raw" && !e.options.skipHtml && n.push(o.value);
  return n;
}
function UTe(e, t, n, r) {
  const o = e.options, i = o.transformLinkUri === void 0 ? YCe : o.transformLinkUri, a = e.schema, l = t.tagName, s = {};
  let c = a, p;
  if (a.space === "html" && l === "svg" && (c = bTe, e.schema = c), t.properties)
    for (p in t.properties)
      sE.call(t.properties, p) && WTe(s, p, t.properties[p], e);
  (l === "ol" || l === "ul") && e.listDepth++;
  const f = vV(e, t);
  (l === "ol" || l === "ul") && e.listDepth--, e.schema = a;
  const m = t.position || {
    start: { line: null, column: null, offset: null },
    end: { line: null, column: null, offset: null }
  }, h = o.components && sE.call(o.components, l) ? o.components[l] : l, g = typeof h == "string" || h === P.Fragment;
  if (!kTe.isValidElementType(h))
    throw new TypeError(
      `Component for name \`${l}\` not defined or is not renderable`
    );
  if (s.key = n, l === "a" && o.linkTarget && (s.target = typeof o.linkTarget == "function" ? o.linkTarget(
    String(s.href || ""),
    t.children,
    typeof s.title == "string" ? s.title : null
  ) : o.linkTarget), l === "a" && i && (s.href = i(
    String(s.href || ""),
    t.children,
    typeof s.title == "string" ? s.title : null
  )), !g && l === "code" && r.type === "element" && r.tagName !== "pre" && (s.inline = !0), !g && (l === "h1" || l === "h2" || l === "h3" || l === "h4" || l === "h5" || l === "h6") && (s.level = Number.parseInt(l.charAt(1), 10)), l === "img" && o.transformImageUri && (s.src = o.transformImageUri(
    String(s.src || ""),
    String(s.alt || ""),
    typeof s.title == "string" ? s.title : null
  )), !g && l === "li" && r.type === "element") {
    const v = HTe(t);
    s.checked = v && v.properties ? !!v.properties.checked : null, s.index = F_(r, t), s.ordered = r.tagName === "ol";
  }
  return !g && (l === "ol" || l === "ul") && (s.ordered = l === "ol", s.depth = e.listDepth), (l === "td" || l === "th") && (s.align && (s.style || (s.style = {}), s.style.textAlign = s.align, delete s.align), g || (s.isHeader = l === "th")), !g && l === "tr" && r.type === "element" && (s.isHeader = r.tagName === "thead"), o.sourcePos && (s["data-sourcepos"] = GTe(m)), !g && o.rawSourcePos && (s.sourcePosition = t.position), !g && o.includeElementIndex && (s.index = F_(r, t), s.siblingCount = F_(r)), g || (s.node = t), f.length > 0 ? P.createElement(h, s, f) : P.createElement(h, s);
}
function HTe(e) {
  let t = -1;
  for (; ++t < e.children.length; ) {
    const n = e.children[t];
    if (n.type === "element" && n.tagName === "input")
      return n;
  }
  return null;
}
function F_(e, t) {
  let n = -1, r = 0;
  for (; ++n < e.children.length && e.children[n] !== t; )
    e.children[n].type === "element" && r++;
  return r;
}
function WTe(e, t, n, r) {
  const o = hTe(r.schema, t);
  let i = n;
  i == null || i !== i || (Array.isArray(i) && (i = o.commaSeparated ? ETe(i) : OTe(i)), o.property === "style" && typeof i == "string" && (i = VTe(i)), o.space && o.property ? e[sE.call(pz, o.property) ? pz[o.property] : o.property] = i : o.attribute && (e[o.attribute] = i));
}
function VTe(e) {
  const t = {};
  try {
    MTe(e, n);
  } catch {
  }
  return t;
  function n(r, o) {
    const i = r.slice(0, 4) === "-ms-" ? `ms-${r.slice(4)}` : r;
    t[i.replace(/-([a-z])/g, qTe)] = o;
  }
}
function qTe(e, t) {
  return t.toUpperCase();
}
function GTe(e) {
  return [
    e.start.line,
    ":",
    e.start.column,
    "-",
    e.end.line,
    ":",
    e.end.column
  ].map(String).join("");
}
const bz = {}.hasOwnProperty, KTe = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", Uh = {
  plugins: { to: "remarkPlugins", id: "change-plugins-to-remarkplugins" },
  renderers: { to: "components", id: "change-renderers-to-components" },
  astPlugins: { id: "remove-buggy-html-in-markdown-parser" },
  allowDangerousHtml: { id: "remove-buggy-html-in-markdown-parser" },
  escapeHtml: { id: "remove-buggy-html-in-markdown-parser" },
  source: { to: "children", id: "change-source-to-children" },
  allowNode: {
    to: "allowElement",
    id: "replace-allownode-allowedtypes-and-disallowedtypes"
  },
  allowedTypes: {
    to: "allowedElements",
    id: "replace-allownode-allowedtypes-and-disallowedtypes"
  },
  disallowedTypes: {
    to: "disallowedElements",
    id: "replace-allownode-allowedtypes-and-disallowedtypes"
  },
  includeNodeIndex: {
    to: "includeElementIndex",
    id: "change-includenodeindex-to-includeelementindex"
  }
};
function bV(e) {
  for (const i in Uh)
    if (bz.call(Uh, i) && bz.call(e, i)) {
      const a = Uh[i];
      console.warn(
        `[react-markdown] Warning: please ${a.to ? `use \`${a.to}\` instead of` : "remove"} \`${i}\` (see <${KTe}#${a.id}> for more info)`
      ), delete Uh[i];
    }
  const t = fPe().use(gRe).use(e.remarkPlugins || []).use(aTe, {
    ...e.remarkRehypeOptions,
    allowDangerousHtml: !0
  }).use(e.rehypePlugins || []).use(wTe, e), n = new zW();
  typeof e.children == "string" ? n.value = e.children : e.children !== void 0 && e.children !== null && console.warn(
    `[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`
  );
  const r = t.runSync(t.parse(n), n);
  if (r.type !== "root")
    throw new TypeError("Expected a `root` node");
  let o = P.createElement(
    P.Fragment,
    {},
    vV({ options: e, schema: vTe, listDepth: 0 }, r)
  );
  return e.className && (o = P.createElement("div", { className: e.className }, o)), o;
}
bV.propTypes = {
  // Core options:
  children: Se.string,
  // Layout options:
  className: Se.string,
  // Filter options:
  allowElement: Se.func,
  allowedElements: Se.arrayOf(Se.string),
  disallowedElements: Se.arrayOf(Se.string),
  unwrapDisallowed: Se.bool,
  // Plugin options:
  remarkPlugins: Se.arrayOf(
    Se.oneOfType([
      Se.object,
      Se.func,
      Se.arrayOf(
        Se.oneOfType([
          Se.bool,
          Se.string,
          Se.object,
          Se.func,
          Se.arrayOf(
            // prettier-ignore
            // type-coverage:ignore-next-line
            Se.any
          )
        ])
      )
    ])
  ),
  rehypePlugins: Se.arrayOf(
    Se.oneOfType([
      Se.object,
      Se.func,
      Se.arrayOf(
        Se.oneOfType([
          Se.bool,
          Se.string,
          Se.object,
          Se.func,
          Se.arrayOf(
            // prettier-ignore
            // type-coverage:ignore-next-line
            Se.any
          )
        ])
      )
    ])
  ),
  // Transform options:
  sourcePos: Se.bool,
  rawSourcePos: Se.bool,
  skipHtml: Se.bool,
  includeElementIndex: Se.bool,
  transformLinkUri: Se.oneOfType([Se.func, Se.bool]),
  linkTarget: Se.oneOfType([Se.func, Se.string]),
  transformImageUri: Se.func,
  components: Se.object
};
const YTe = {
  tokenize: tje,
  partial: !0
}, wV = {
  tokenize: nje,
  partial: !0
}, xV = {
  tokenize: rje,
  partial: !0
}, SV = {
  tokenize: oje,
  partial: !0
}, XTe = {
  tokenize: ije,
  partial: !0
}, kV = {
  tokenize: JTe,
  previous: OV
}, _V = {
  tokenize: eje,
  previous: EV
}, Ua = {
  tokenize: QTe,
  previous: CV
}, na = {}, ZTe = {
  text: na
};
let us = 48;
for (; us < 123; )
  na[us] = Ua, us++, us === 58 ? us = 65 : us === 91 && (us = 97);
na[43] = Ua;
na[45] = Ua;
na[46] = Ua;
na[95] = Ua;
na[72] = [Ua, _V];
na[104] = [Ua, _V];
na[87] = [Ua, kV];
na[119] = [Ua, kV];
function QTe(e, t, n) {
  const r = this;
  let o, i;
  return a;
  function a(f) {
    return !uE(f) || !CV.call(r, r.previous) || QP(r.events) ? n(f) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), l(f));
  }
  function l(f) {
    return uE(f) ? (e.consume(f), l) : f === 64 ? (e.consume(f), s) : n(f);
  }
  function s(f) {
    return f === 46 ? e.check(
      XTe,
      p,
      c
    )(f) : f === 45 || f === 95 || sr(f) ? (i = !0, e.consume(f), s) : p(f);
  }
  function c(f) {
    return e.consume(f), o = !0, s;
  }
  function p(f) {
    return i && o && wr(r.previous) ? (e.exit("literalAutolinkEmail"), e.exit("literalAutolink"), t(f)) : n(f);
  }
}
function JTe(e, t, n) {
  const r = this;
  return o;
  function o(a) {
    return a !== 87 && a !== 119 || !OV.call(r, r.previous) || QP(r.events) ? n(a) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(
      YTe,
      e.attempt(wV, e.attempt(xV, i), n),
      n
    )(a));
  }
  function i(a) {
    return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), t(a);
  }
}
function eje(e, t, n) {
  const r = this;
  let o = "", i = !1;
  return a;
  function a(f) {
    return (f === 72 || f === 104) && EV.call(r, r.previous) && !QP(r.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), o += String.fromCodePoint(f), e.consume(f), l) : n(f);
  }
  function l(f) {
    if (wr(f) && o.length < 5)
      return o += String.fromCodePoint(f), e.consume(f), l;
    if (f === 58) {
      const m = o.toLowerCase();
      if (m === "http" || m === "https")
        return e.consume(f), s;
    }
    return n(f);
  }
  function s(f) {
    return f === 47 ? (e.consume(f), i ? c : (i = !0, s)) : n(f);
  }
  function c(f) {
    return f === null || Fb(f) || Mt(f) || Ws(f) || Rx(f) ? n(f) : e.attempt(wV, e.attempt(xV, p), n)(f);
  }
  function p(f) {
    return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(f);
  }
}
function tje(e, t, n) {
  let r = 0;
  return o;
  function o(a) {
    return (a === 87 || a === 119) && r < 3 ? (r++, e.consume(a), o) : a === 46 && r === 3 ? (e.consume(a), i) : n(a);
  }
  function i(a) {
    return a === null ? n(a) : t(a);
  }
}
function nje(e, t, n) {
  let r, o, i;
  return a;
  function a(c) {
    return c === 46 || c === 95 ? e.check(SV, s, l)(c) : c === null || Mt(c) || Ws(c) || c !== 45 && Rx(c) ? s(c) : (i = !0, e.consume(c), a);
  }
  function l(c) {
    return c === 95 ? r = !0 : (o = r, r = void 0), e.consume(c), a;
  }
  function s(c) {
    return o || r || !i ? n(c) : t(c);
  }
}
function rje(e, t) {
  let n = 0, r = 0;
  return o;
  function o(a) {
    return a === 40 ? (n++, e.consume(a), o) : a === 41 && r < n ? i(a) : a === 33 || a === 34 || a === 38 || a === 39 || a === 41 || a === 42 || a === 44 || a === 46 || a === 58 || a === 59 || a === 60 || a === 63 || a === 93 || a === 95 || a === 126 ? e.check(SV, t, i)(a) : a === null || Mt(a) || Ws(a) ? t(a) : (e.consume(a), o);
  }
  function i(a) {
    return a === 41 && r++, e.consume(a), o;
  }
}
function oje(e, t, n) {
  return r;
  function r(l) {
    return l === 33 || l === 34 || l === 39 || l === 41 || l === 42 || l === 44 || l === 46 || l === 58 || l === 59 || l === 63 || l === 95 || l === 126 ? (e.consume(l), r) : l === 38 ? (e.consume(l), i) : l === 93 ? (e.consume(l), o) : (
      // `<` is an end.
      l === 60 || // So is whitespace.
      l === null || Mt(l) || Ws(l) ? t(l) : n(l)
    );
  }
  function o(l) {
    return l === null || l === 40 || l === 91 || Mt(l) || Ws(l) ? t(l) : r(l);
  }
  function i(l) {
    return wr(l) ? a(l) : n(l);
  }
  function a(l) {
    return l === 59 ? (e.consume(l), r) : wr(l) ? (e.consume(l), a) : n(l);
  }
}
function ije(e, t, n) {
  return r;
  function r(i) {
    return e.consume(i), o;
  }
  function o(i) {
    return sr(i) ? n(i) : t(i);
  }
}
function OV(e) {
  return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || Mt(e);
}
function EV(e) {
  return !wr(e);
}
function CV(e) {
  return !(e === 47 || uE(e));
}
function uE(e) {
  return e === 43 || e === 45 || e === 46 || e === 95 || sr(e);
}
function QP(e) {
  let t = e.length, n = !1;
  for (; t--; ) {
    const r = e[t][1];
    if ((r.type === "labelLink" || r.type === "labelImage") && !r._balanced) {
      n = !0;
      break;
    }
    if (r._gfmAutolinkLiteralWalkedInto) {
      n = !1;
      break;
    }
  }
  return e.length > 0 && !n && (e[e.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), n;
}
const aje = {
  tokenize: mje,
  partial: !0
};
function lje() {
  return {
    document: {
      91: {
        tokenize: fje,
        continuation: {
          tokenize: dje
        },
        exit: pje
      }
    },
    text: {
      91: {
        tokenize: cje
      },
      93: {
        add: "after",
        tokenize: sje,
        resolveTo: uje
      }
    }
  };
}
function sje(e, t, n) {
  const r = this;
  let o = r.events.length;
  const i = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
  let a;
  for (; o--; ) {
    const s = r.events[o][1];
    if (s.type === "labelImage") {
      a = s;
      break;
    }
    if (s.type === "gfmFootnoteCall" || s.type === "labelLink" || s.type === "label" || s.type === "image" || s.type === "link")
      break;
  }
  return l;
  function l(s) {
    if (!a || !a._balanced)
      return n(s);
    const c = di(
      r.sliceSerialize({
        start: a.end,
        end: r.now()
      })
    );
    return c.codePointAt(0) !== 94 || !i.includes(c.slice(1)) ? n(s) : (e.enter("gfmFootnoteCallLabelMarker"), e.consume(s), e.exit("gfmFootnoteCallLabelMarker"), t(s));
  }
}
function uje(e, t) {
  let n = e.length;
  for (; n--; )
    if (e[n][1].type === "labelImage" && e[n][0] === "enter") {
      e[n][1];
      break;
    }
  e[n + 1][1].type = "data", e[n + 3][1].type = "gfmFootnoteCallLabelMarker";
  const r = {
    type: "gfmFootnoteCall",
    start: Object.assign({}, e[n + 3][1].start),
    end: Object.assign({}, e[e.length - 1][1].end)
  }, o = {
    type: "gfmFootnoteCallMarker",
    start: Object.assign({}, e[n + 3][1].end),
    end: Object.assign({}, e[n + 3][1].end)
  };
  o.end.column++, o.end.offset++, o.end._bufferIndex++;
  const i = {
    type: "gfmFootnoteCallString",
    start: Object.assign({}, o.end),
    end: Object.assign({}, e[e.length - 1][1].start)
  }, a = {
    type: "chunkString",
    contentType: "string",
    start: Object.assign({}, i.start),
    end: Object.assign({}, i.end)
  }, l = [
    // Take the `labelImageMarker` (now `data`, the `!`)
    e[n + 1],
    e[n + 2],
    ["enter", r, t],
    // The `[`
    e[n + 3],
    e[n + 4],
    // The `^`.
    ["enter", o, t],
    ["exit", o, t],
    // Everything in between.
    ["enter", i, t],
    ["enter", a, t],
    ["exit", a, t],
    ["exit", i, t],
    // The ending (`]`, properly parsed and labelled).
    e[e.length - 2],
    e[e.length - 1],
    ["exit", r, t]
  ];
  return e.splice(n, e.length - n + 1, ...l), e;
}
function cje(e, t, n) {
  const r = this, o = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
  let i = 0, a;
  return l;
  function l(f) {
    return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(f), e.exit("gfmFootnoteCallLabelMarker"), s;
  }
  function s(f) {
    return f !== 94 ? n(f) : (e.enter("gfmFootnoteCallMarker"), e.consume(f), e.exit("gfmFootnoteCallMarker"), e.enter("gfmFootnoteCallString"), e.enter("chunkString").contentType = "string", c);
  }
  function c(f) {
    if (
      // Too long.
      i > 999 || // Closing brace with nothing.
      f === 93 && !a || // Space or tab is not supported by GFM for some reason.
      // `\n` and `[` not being supported makes sense.
      f === null || f === 91 || Mt(f)
    )
      return n(f);
    if (f === 93) {
      e.exit("chunkString");
      const m = e.exit("gfmFootnoteCallString");
      return o.includes(di(r.sliceSerialize(m))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(f), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), t) : n(f);
    }
    return Mt(f) || (a = !0), i++, e.consume(f), f === 92 ? p : c;
  }
  function p(f) {
    return f === 91 || f === 92 || f === 93 ? (e.consume(f), i++, c) : c(f);
  }
}
function fje(e, t, n) {
  const r = this, o = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
  let i, a = 0, l;
  return s;
  function s(g) {
    return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(g), e.exit("gfmFootnoteDefinitionLabelMarker"), c;
  }
  function c(g) {
    return g === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(g), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", p) : n(g);
  }
  function p(g) {
    if (
      // Too long.
      a > 999 || // Closing brace with nothing.
      g === 93 && !l || // Space or tab is not supported by GFM for some reason.
      // `\n` and `[` not being supported makes sense.
      g === null || g === 91 || Mt(g)
    )
      return n(g);
    if (g === 93) {
      e.exit("chunkString");
      const v = e.exit("gfmFootnoteDefinitionLabelString");
      return i = di(r.sliceSerialize(v)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(g), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), m;
    }
    return Mt(g) || (l = !0), a++, e.consume(g), g === 92 ? f : p;
  }
  function f(g) {
    return g === 91 || g === 92 || g === 93 ? (e.consume(g), a++, p) : p(g);
  }
  function m(g) {
    return g === 58 ? (e.enter("definitionMarker"), e.consume(g), e.exit("definitionMarker"), o.includes(i) || o.push(i), bt(
      e,
      h,
      "gfmFootnoteDefinitionWhitespace"
    )) : n(g);
  }
  function h(g) {
    return t(g);
  }
}
function dje(e, t, n) {
  return e.check(Up, t, e.attempt(aje, t, n));
}
function pje(e) {
  e.exit("gfmFootnoteDefinition");
}
function mje(e, t, n) {
  const r = this;
  return bt(
    e,
    o,
    "gfmFootnoteDefinitionIndent",
    5
  );
  function o(i) {
    const a = r.events[r.events.length - 1];
    return a && a[1].type === "gfmFootnoteDefinitionIndent" && a[2].sliceSerialize(a[1], !0).length === 4 ? t(i) : n(i);
  }
}
function hje(e) {
  let t = (e || {}).singleTilde;
  const n = {
    tokenize: o,
    resolveAll: r
  };
  return t == null && (t = !0), {
    text: {
      126: n
    },
    insideSpan: {
      null: [n]
    },
    attentionMarkers: {
      null: [126]
    }
  };
  function r(i, a) {
    let l = -1;
    for (; ++l < i.length; )
      if (i[l][0] === "enter" && i[l][1].type === "strikethroughSequenceTemporary" && i[l][1]._close) {
        let s = l;
        for (; s--; )
          if (i[s][0] === "exit" && i[s][1].type === "strikethroughSequenceTemporary" && i[s][1]._open && // If the sizes are the same:
          i[l][1].end.offset - i[l][1].start.offset === i[s][1].end.offset - i[s][1].start.offset) {
            i[l][1].type = "strikethroughSequence", i[s][1].type = "strikethroughSequence";
            const c = {
              type: "strikethrough",
              start: Object.assign({}, i[s][1].start),
              end: Object.assign({}, i[l][1].end)
            }, p = {
              type: "strikethroughText",
              start: Object.assign({}, i[s][1].end),
              end: Object.assign({}, i[l][1].start)
            }, f = [
              ["enter", c, a],
              ["enter", i[s][1], a],
              ["exit", i[s][1], a],
              ["enter", p, a]
            ], m = a.parser.constructs.insideSpan.null;
            m && go(
              f,
              f.length,
              0,
              Tx(m, i.slice(s + 1, l), a)
            ), go(f, f.length, 0, [
              ["exit", p, a],
              ["enter", i[l][1], a],
              ["exit", i[l][1], a],
              ["exit", c, a]
            ]), go(i, s - 1, l - s + 3, f), l = s + f.length - 2;
            break;
          }
      }
    for (l = -1; ++l < i.length; )
      i[l][1].type === "strikethroughSequenceTemporary" && (i[l][1].type = "data");
    return i;
  }
  function o(i, a, l) {
    const s = this.previous, c = this.events;
    let p = 0;
    return f;
    function f(h) {
      return s === 126 && c[c.length - 1][1].type !== "characterEscape" ? l(h) : (i.enter("strikethroughSequenceTemporary"), m(h));
    }
    function m(h) {
      const g = Mb(s);
      if (h === 126)
        return p > 1 ? l(h) : (i.consume(h), p++, m);
      if (p < 2 && !t)
        return l(h);
      const v = i.exit("strikethroughSequenceTemporary"), S = Mb(h);
      return v._open = !S || S === 2 && !!g, v._close = !g || g === 2 && !!S, a(h);
    }
  }
}
class gje {
  /**
   * Create a new edit map.
   */
  constructor() {
    this.map = [];
  }
  /**
   * Create an edit: a remove and/or add at a certain place.
   *
   * @param {number} index
   * @param {number} remove
   * @param {Array<Event>} add
   * @returns {void}
   */
  add(t, n, r) {
    yje(this, t, n, r);
  }
  // To do: not used here.
  // /**
  //  * Create an edit: but insert `add` before existing additions.
  //  *
  //  * @param {number} index
  //  * @param {number} remove
  //  * @param {Array<Event>} add
  //  * @returns {void}
  //  */
  // addBefore(index, remove, add) {
  //   addImpl(this, index, remove, add, true)
  // }
  /**
   * Done, change the events.
   *
   * @param {Array<Event>} events
   * @returns {void}
   */
  consume(t) {
    if (this.map.sort((i, a) => i[0] - a[0]), this.map.length === 0)
      return;
    let n = this.map.length;
    const r = [];
    for (; n > 0; )
      n -= 1, r.push(t.slice(this.map[n][0] + this.map[n][1])), r.push(this.map[n][2]), t.length = this.map[n][0];
    r.push([...t]), t.length = 0;
    let o = r.pop();
    for (; o; )
      t.push(...o), o = r.pop();
    this.map.length = 0;
  }
}
function yje(e, t, n, r) {
  let o = 0;
  if (!(n === 0 && r.length === 0)) {
    for (; o < e.map.length; ) {
      if (e.map[o][0] === t) {
        e.map[o][1] += n, e.map[o][2].push(...r);
        return;
      }
      o += 1;
    }
    e.map.push([t, n, r]);
  }
}
function vje(e, t) {
  let n = !1;
  const r = [];
  for (; t < e.length; ) {
    const o = e[t];
    if (n) {
      if (o[0] === "enter")
        o[1].type === "tableContent" && r.push(
          e[t + 1][1].type === "tableDelimiterMarker" ? "left" : "none"
        );
      else if (o[1].type === "tableContent") {
        if (e[t - 1][1].type === "tableDelimiterMarker") {
          const i = r.length - 1;
          r[i] = r[i] === "left" ? "center" : "right";
        }
      } else if (o[1].type === "tableDelimiterRow")
        break;
    } else
      o[0] === "enter" && o[1].type === "tableDelimiterRow" && (n = !0);
    t += 1;
  }
  return r;
}
const bje = {
  flow: {
    null: {
      tokenize: wje,
      resolveAll: xje
    }
  }
};
function wje(e, t, n) {
  const r = this;
  let o = 0, i = 0, a;
  return l;
  function l(N) {
    let H = r.events.length - 1;
    for (; H > -1; ) {
      const W = r.events[H][1].type;
      if (W === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
      W === "linePrefix")
        H--;
      else
        break;
    }
    const B = H > -1 ? r.events[H][1].type : null, K = B === "tableHead" || B === "tableRow" ? C : s;
    return K === C && r.parser.lazy[r.now().line] ? n(N) : K(N);
  }
  function s(N) {
    return e.enter("tableHead"), e.enter("tableRow"), c(N);
  }
  function c(N) {
    return N === 124 || (a = !0, i += 1), p(N);
  }
  function p(N) {
    return N === null ? n(N) : Ke(N) ? i > 1 ? (i = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(N), e.exit("lineEnding"), h) : n(N) : ht(N) ? bt(e, p, "whitespace")(N) : (i += 1, a && (a = !1, o += 1), N === 124 ? (e.enter("tableCellDivider"), e.consume(N), e.exit("tableCellDivider"), a = !0, p) : (e.enter("data"), f(N)));
  }
  function f(N) {
    return N === null || N === 124 || Mt(N) ? (e.exit("data"), p(N)) : (e.consume(N), N === 92 ? m : f);
  }
  function m(N) {
    return N === 92 || N === 124 ? (e.consume(N), f) : f(N);
  }
  function h(N) {
    return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(N) : (e.enter("tableDelimiterRow"), a = !1, ht(N) ? bt(
      e,
      g,
      "linePrefix",
      r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
    )(N) : g(N));
  }
  function g(N) {
    return N === 45 || N === 58 ? S(N) : N === 124 ? (a = !0, e.enter("tableCellDivider"), e.consume(N), e.exit("tableCellDivider"), v) : O(N);
  }
  function v(N) {
    return ht(N) ? bt(e, S, "whitespace")(N) : S(N);
  }
  function S(N) {
    return N === 58 ? (i += 1, a = !0, e.enter("tableDelimiterMarker"), e.consume(N), e.exit("tableDelimiterMarker"), w) : N === 45 ? (i += 1, w(N)) : N === null || Ke(N) ? E(N) : O(N);
  }
  function w(N) {
    return N === 45 ? (e.enter("tableDelimiterFiller"), x(N)) : O(N);
  }
  function x(N) {
    return N === 45 ? (e.consume(N), x) : N === 58 ? (a = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(N), e.exit("tableDelimiterMarker"), k) : (e.exit("tableDelimiterFiller"), k(N));
  }
  function k(N) {
    return ht(N) ? bt(e, E, "whitespace")(N) : E(N);
  }
  function E(N) {
    return N === 124 ? g(N) : N === null || Ke(N) ? !a || o !== i ? O(N) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(N)) : O(N);
  }
  function O(N) {
    return n(N);
  }
  function C(N) {
    return e.enter("tableRow"), R(N);
  }
  function R(N) {
    return N === 124 ? (e.enter("tableCellDivider"), e.consume(N), e.exit("tableCellDivider"), R) : N === null || Ke(N) ? (e.exit("tableRow"), t(N)) : ht(N) ? bt(e, R, "whitespace")(N) : (e.enter("data"), L(N));
  }
  function L(N) {
    return N === null || N === 124 || Mt(N) ? (e.exit("data"), R(N)) : (e.consume(N), N === 92 ? D : L);
  }
  function D(N) {
    return N === 92 || N === 124 ? (e.consume(N), L) : L(N);
  }
}
function xje(e, t) {
  let n = -1, r = !0, o = 0, i = [0, 0, 0, 0], a = [0, 0, 0, 0], l = !1, s = 0, c, p, f;
  const m = new gje();
  for (; ++n < e.length; ) {
    const h = e[n], g = h[1];
    h[0] === "enter" ? g.type === "tableHead" ? (l = !1, s !== 0 && (wz(m, t, s, c, p), p = void 0, s = 0), c = {
      type: "table",
      start: Object.assign({}, g.start),
      // Note: correct end is set later.
      end: Object.assign({}, g.end)
    }, m.add(n, 0, [["enter", c, t]])) : g.type === "tableRow" || g.type === "tableDelimiterRow" ? (r = !0, f = void 0, i = [0, 0, 0, 0], a = [0, n + 1, 0, 0], l && (l = !1, p = {
      type: "tableBody",
      start: Object.assign({}, g.start),
      // Note: correct end is set later.
      end: Object.assign({}, g.end)
    }, m.add(n, 0, [["enter", p, t]])), o = g.type === "tableDelimiterRow" ? 2 : p ? 3 : 1) : o && (g.type === "data" || g.type === "tableDelimiterMarker" || g.type === "tableDelimiterFiller") ? (r = !1, a[2] === 0 && (i[1] !== 0 && (a[0] = a[1], f = Hh(
      m,
      t,
      i,
      o,
      void 0,
      f
    ), i = [0, 0, 0, 0]), a[2] = n)) : g.type === "tableCellDivider" && (r ? r = !1 : (i[1] !== 0 && (a[0] = a[1], f = Hh(
      m,
      t,
      i,
      o,
      void 0,
      f
    )), i = a, a = [i[1], n, 0, 0])) : g.type === "tableHead" ? (l = !0, s = n) : g.type === "tableRow" || g.type === "tableDelimiterRow" ? (s = n, i[1] !== 0 ? (a[0] = a[1], f = Hh(
      m,
      t,
      i,
      o,
      n,
      f
    )) : a[1] !== 0 && (f = Hh(m, t, a, o, n, f)), o = 0) : o && (g.type === "data" || g.type === "tableDelimiterMarker" || g.type === "tableDelimiterFiller") && (a[3] = n);
  }
  for (s !== 0 && wz(m, t, s, c, p), m.consume(t.events), n = -1; ++n < t.events.length; ) {
    const h = t.events[n];
    h[0] === "enter" && h[1].type === "table" && (h[1]._align = vje(t.events, n));
  }
  return e;
}
function Hh(e, t, n, r, o, i) {
  const a = r === 1 ? "tableHeader" : r === 2 ? "tableDelimiter" : "tableData", l = "tableContent";
  n[0] !== 0 && (i.end = Object.assign({}, Bu(t.events, n[0])), e.add(n[0], 0, [["exit", i, t]]));
  const s = Bu(t.events, n[1]);
  if (i = {
    type: a,
    start: Object.assign({}, s),
    // Note: correct end is set later.
    end: Object.assign({}, s)
  }, e.add(n[1], 0, [["enter", i, t]]), n[2] !== 0) {
    const c = Bu(t.events, n[2]), p = Bu(t.events, n[3]), f = {
      type: l,
      start: Object.assign({}, c),
      end: Object.assign({}, p)
    };
    if (e.add(n[2], 0, [["enter", f, t]]), r !== 2) {
      const m = t.events[n[2]], h = t.events[n[3]];
      if (m[1].end = Object.assign({}, h[1].end), m[1].type = "chunkText", m[1].contentType = "text", n[3] > n[2] + 1) {
        const g = n[2] + 1, v = n[3] - n[2] - 1;
        e.add(g, v, []);
      }
    }
    e.add(n[3] + 1, 0, [["exit", f, t]]);
  }
  return o !== void 0 && (i.end = Object.assign({}, Bu(t.events, o)), e.add(o, 0, [["exit", i, t]]), i = void 0), i;
}
function wz(e, t, n, r, o) {
  const i = [], a = Bu(t.events, n);
  o && (o.end = Object.assign({}, a), i.push(["exit", o, t])), r.end = Object.assign({}, a), i.push(["exit", r, t]), e.add(n + 1, 0, i);
}
function Bu(e, t) {
  const n = e[t], r = n[0] === "enter" ? "start" : "end";
  return n[1][r];
}
const Sje = {
  tokenize: _je
}, kje = {
  text: {
    91: Sje
  }
};
function _je(e, t, n) {
  const r = this;
  return o;
  function o(s) {
    return (
      // Exit if there’s stuff before.
      r.previous !== null || // Exit if not in the first content that is the first child of a list
      // item.
      !r._gfmTasklistFirstContentOfListItem ? n(s) : (e.enter("taskListCheck"), e.enter("taskListCheckMarker"), e.consume(s), e.exit("taskListCheckMarker"), i)
    );
  }
  function i(s) {
    return Mt(s) ? (e.enter("taskListCheckValueUnchecked"), e.consume(s), e.exit("taskListCheckValueUnchecked"), a) : s === 88 || s === 120 ? (e.enter("taskListCheckValueChecked"), e.consume(s), e.exit("taskListCheckValueChecked"), a) : n(s);
  }
  function a(s) {
    return s === 93 ? (e.enter("taskListCheckMarker"), e.consume(s), e.exit("taskListCheckMarker"), e.exit("taskListCheck"), l) : n(s);
  }
  function l(s) {
    return Ke(s) ? t(s) : ht(s) ? e.check(
      {
        tokenize: Oje
      },
      t,
      n
    )(s) : n(s);
  }
}
function Oje(e, t, n) {
  return bt(e, r, "whitespace");
  function r(o) {
    return o === null ? n(o) : t(o);
  }
}
function Eje(e) {
  return BW([
    ZTe,
    lje(),
    hje(e),
    bje,
    kje
  ]);
}
function xz(e, t) {
  const n = String(e);
  if (typeof t != "string")
    throw new TypeError("Expected character");
  let r = 0, o = n.indexOf(t);
  for (; o !== -1; )
    r++, o = n.indexOf(t, o + t.length);
  return r;
}
function Cje(e) {
  if (typeof e != "string")
    throw new TypeError("Expected a string");
  return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
const Pje = {}.hasOwnProperty, Rje = (
  /**
   * @type {(
   *   (<Tree extends Node>(tree: Tree, find: Find, replace?: Replace | null | undefined, options?: Options | null | undefined) => Tree) &
   *   (<Tree extends Node>(tree: Tree, schema: FindAndReplaceSchema | FindAndReplaceList, options?: Options | null | undefined) => Tree)
   * )}
   **/
  /**
   * @template {Node} Tree
   * @param {Tree} tree
   * @param {Find | FindAndReplaceSchema | FindAndReplaceList} find
   * @param {Replace | Options | null | undefined} [replace]
   * @param {Options | null | undefined} [options]
   * @returns {Tree}
   */
  function(e, t, n, r) {
    let o, i;
    typeof t == "string" || t instanceof RegExp ? (i = [[t, n]], o = r) : (i = t, o = n), o || (o = {});
    const a = GP(o.ignore || []), l = Tje(i);
    let s = -1;
    for (; ++s < l.length; )
      iV(e, "text", c);
    return e;
    function c(f, m) {
      let h = -1, g;
      for (; ++h < m.length; ) {
        const v = m[h];
        if (a(
          v,
          // @ts-expect-error: TS doesn’t understand but it’s perfect.
          g ? g.children.indexOf(v) : void 0,
          g
        ))
          return;
        g = v;
      }
      if (g)
        return p(f, m);
    }
    function p(f, m) {
      const h = m[m.length - 1], g = l[s][0], v = l[s][1];
      let S = 0;
      const w = h.children.indexOf(f);
      let x = !1, k = [];
      g.lastIndex = 0;
      let E = g.exec(f.value);
      for (; E; ) {
        const O = E.index, C = {
          index: E.index,
          input: E.input,
          // @ts-expect-error: stack is fine.
          stack: [...m, f]
        };
        let R = v(...E, C);
        if (typeof R == "string" && (R = R.length > 0 ? { type: "text", value: R } : void 0), R !== !1 && (S !== O && k.push({
          type: "text",
          value: f.value.slice(S, O)
        }), Array.isArray(R) ? k.push(...R) : R && k.push(R), S = O + E[0].length, x = !0), !g.global)
          break;
        E = g.exec(f.value);
      }
      return x ? (S < f.value.length && k.push({ type: "text", value: f.value.slice(S) }), h.children.splice(w, 1, ...k)) : k = [f], w + k.length;
    }
  }
);
function Tje(e) {
  const t = [];
  if (typeof e != "object")
    throw new TypeError("Expected array or object as schema");
  if (Array.isArray(e)) {
    let n = -1;
    for (; ++n < e.length; )
      t.push([
        Sz(e[n][0]),
        kz(e[n][1])
      ]);
  } else {
    let n;
    for (n in e)
      Pje.call(e, n) && t.push([Sz(n), kz(e[n])]);
  }
  return t;
}
function Sz(e) {
  return typeof e == "string" ? new RegExp(Cje(e), "g") : e;
}
function kz(e) {
  return typeof e == "function" ? e : () => e;
}
const M_ = "phrasing", B_ = ["autolink", "link", "image", "label"], jje = {
  transforms: [Dje],
  enter: {
    literalAutolink: $je,
    literalAutolinkEmail: U_,
    literalAutolinkHttp: U_,
    literalAutolinkWww: U_
  },
  exit: {
    literalAutolink: Lje,
    literalAutolinkEmail: zje,
    literalAutolinkHttp: Ije,
    literalAutolinkWww: Aje
  }
}, Nje = {
  unsafe: [
    {
      character: "@",
      before: "[+\\-.\\w]",
      after: "[\\-.\\w]",
      inConstruct: M_,
      notInConstruct: B_
    },
    {
      character: ".",
      before: "[Ww]",
      after: "[\\-.\\w]",
      inConstruct: M_,
      notInConstruct: B_
    },
    { character: ":", before: "[ps]", after: "\\/", inConstruct: M_, notInConstruct: B_ }
  ]
};
function $je(e) {
  this.enter({ type: "link", title: null, url: "", children: [] }, e);
}
function U_(e) {
  this.config.enter.autolinkProtocol.call(this, e);
}
function Ije(e) {
  this.config.exit.autolinkProtocol.call(this, e);
}
function Aje(e) {
  this.config.exit.data.call(this, e);
  const t = (
    /** @type {Link} */
    this.stack[this.stack.length - 1]
  );
  t.url = "http://" + this.sliceSerialize(e);
}
function zje(e) {
  this.config.exit.autolinkEmail.call(this, e);
}
function Lje(e) {
  this.exit(e);
}
function Dje(e) {
  Rje(
    e,
    [
      [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, Fje],
      [/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g, Mje]
    ],
    { ignore: ["link", "linkReference"] }
  );
}
function Fje(e, t, n, r, o) {
  let i = "";
  if (!PV(o) || (/^w/i.test(t) && (n = t + n, t = "", i = "http://"), !Bje(n)))
    return !1;
  const a = Uje(n + r);
  if (!a[0])
    return !1;
  const l = {
    type: "link",
    title: null,
    url: i + t + a[0],
    children: [{ type: "text", value: t + a[0] }]
  };
  return a[1] ? [l, { type: "text", value: a[1] }] : l;
}
function Mje(e, t, n, r) {
  return (
    // Not an expected previous character.
    !PV(r, !0) || // Label ends in not allowed character.
    /[-\d_]$/.test(n) ? !1 : {
      type: "link",
      title: null,
      url: "mailto:" + t + "@" + n,
      children: [{ type: "text", value: t + "@" + n }]
    }
  );
}
function Bje(e) {
  const t = e.split(".");
  return !(t.length < 2 || t[t.length - 1] && (/_/.test(t[t.length - 1]) || !/[a-zA-Z\d]/.test(t[t.length - 1])) || t[t.length - 2] && (/_/.test(t[t.length - 2]) || !/[a-zA-Z\d]/.test(t[t.length - 2])));
}
function Uje(e) {
  const t = /[!"&'),.:;<>?\]}]+$/.exec(e);
  if (!t)
    return [e, void 0];
  e = e.slice(0, t.index);
  let n = t[0], r = n.indexOf(")");
  const o = xz(e, "(");
  let i = xz(e, ")");
  for (; r !== -1 && o > i; )
    e += n.slice(0, r + 1), n = n.slice(r + 1), r = n.indexOf(")"), i++;
  return [e, n];
}
function PV(e, t) {
  const n = e.input.charCodeAt(e.index - 1);
  return (e.index === 0 || Ws(n) || Rx(n)) && (!t || n !== 47);
}
function RV(e) {
  return e.label || !e.identifier ? e.label || "" : QW(e.identifier);
}
function Hje(e, t, n) {
  const r = t.indexStack, o = e.children || [], i = t.createTracker(n), a = [];
  let l = -1;
  for (r.push(-1); ++l < o.length; ) {
    const s = o[l];
    r[r.length - 1] = l, a.push(
      i.move(
        t.handle(s, e, t, {
          before: `
`,
          after: `
`,
          ...i.current()
        })
      )
    ), s.type !== "list" && (t.bulletLastUsed = void 0), l < o.length - 1 && a.push(
      i.move(Wje(s, o[l + 1], e, t))
    );
  }
  return r.pop(), a.join("");
}
function Wje(e, t, n, r) {
  let o = r.join.length;
  for (; o--; ) {
    const i = r.join[o](e, t, n, r);
    if (i === !0 || i === 1)
      break;
    if (typeof i == "number")
      return `
`.repeat(1 + i);
    if (i === !1)
      return `

<!---->

`;
  }
  return `

`;
}
const Vje = /\r?\n|\r/g;
function qje(e, t) {
  const n = [];
  let r = 0, o = 0, i;
  for (; i = Vje.exec(e); )
    a(e.slice(r, i.index)), n.push(i[0]), r = i.index + i[0].length, o++;
  return a(e.slice(r)), n.join("");
  function a(l) {
    n.push(t(l, o, !l));
  }
}
function TV(e) {
  if (!e._compiled) {
    const t = (e.atBreak ? "[\\r\\n][\\t ]*" : "") + (e.before ? "(?:" + e.before + ")" : "");
    e._compiled = new RegExp(
      (t ? "(" + t + ")" : "") + (/[|\\{}()[\]^$+*?.-]/.test(e.character) ? "\\" : "") + e.character + (e.after ? "(?:" + e.after + ")" : ""),
      "g"
    );
  }
  return e._compiled;
}
function Gje(e, t) {
  return _z(e, t.inConstruct, !0) && !_z(e, t.notInConstruct, !1);
}
function _z(e, t, n) {
  if (typeof t == "string" && (t = [t]), !t || t.length === 0)
    return n;
  let r = -1;
  for (; ++r < t.length; )
    if (e.includes(t[r]))
      return !0;
  return !1;
}
function jV(e, t, n) {
  const r = (n.before || "") + (t || "") + (n.after || ""), o = [], i = [], a = {};
  let l = -1;
  for (; ++l < e.unsafe.length; ) {
    const p = e.unsafe[l];
    if (!Gje(e.stack, p))
      continue;
    const f = TV(p);
    let m;
    for (; m = f.exec(r); ) {
      const h = "before" in p || !!p.atBreak, g = "after" in p, v = m.index + (h ? m[1].length : 0);
      o.includes(v) ? (a[v].before && !h && (a[v].before = !1), a[v].after && !g && (a[v].after = !1)) : (o.push(v), a[v] = { before: h, after: g });
    }
  }
  o.sort(Kje);
  let s = n.before ? n.before.length : 0;
  const c = r.length - (n.after ? n.after.length : 0);
  for (l = -1; ++l < o.length; ) {
    const p = o[l];
    p < s || p >= c || p + 1 < c && o[l + 1] === p + 1 && a[p].after && !a[p + 1].before && !a[p + 1].after || o[l - 1] === p - 1 && a[p].before && !a[p - 1].before && !a[p - 1].after || (s !== p && i.push(Oz(r.slice(s, p), "\\")), s = p, /[!-/:-@[-`{-~]/.test(r.charAt(p)) && (!n.encode || !n.encode.includes(r.charAt(p))) ? i.push("\\") : (i.push(
      "&#x" + r.charCodeAt(p).toString(16).toUpperCase() + ";"
    ), s++));
  }
  return i.push(Oz(r.slice(s, c), n.after)), i.join("");
}
function Kje(e, t) {
  return e - t;
}
function Oz(e, t) {
  const n = /\\(?=[!-/:-@[-`{-~])/g, r = [], o = [], i = e + t;
  let a = -1, l = 0, s;
  for (; s = n.exec(i); )
    r.push(s.index);
  for (; ++a < r.length; )
    l !== r[a] && o.push(e.slice(l, r[a])), o.push("\\"), l = r[a];
  return o.push(e.slice(l)), o.join("");
}
function Nx(e) {
  const t = e || {}, n = t.now || {};
  let r = t.lineShift || 0, o = n.line || 1, i = n.column || 1;
  return { move: s, current: a, shift: l };
  function a() {
    return { now: { line: o, column: i }, lineShift: r };
  }
  function l(c) {
    r += c;
  }
  function s(c) {
    const p = c || "", f = p.split(/\r?\n|\r/g), m = f[f.length - 1];
    return o += f.length - 1, i = f.length === 1 ? i + m.length : 1 + m.length + r, p;
  }
}
NV.peek = i1e;
function Yje() {
  return {
    enter: {
      gfmFootnoteDefinition: Zje,
      gfmFootnoteDefinitionLabelString: Qje,
      gfmFootnoteCall: t1e,
      gfmFootnoteCallString: n1e
    },
    exit: {
      gfmFootnoteDefinition: e1e,
      gfmFootnoteDefinitionLabelString: Jje,
      gfmFootnoteCall: o1e,
      gfmFootnoteCallString: r1e
    }
  };
}
function Xje() {
  return {
    // This is on by default already.
    unsafe: [{ character: "[", inConstruct: ["phrasing", "label", "reference"] }],
    handlers: { footnoteDefinition: a1e, footnoteReference: NV }
  };
}
function Zje(e) {
  this.enter(
    { type: "footnoteDefinition", identifier: "", label: "", children: [] },
    e
  );
}
function Qje() {
  this.buffer();
}
function Jje(e) {
  const t = this.resume(), n = (
    /** @type {FootnoteDefinition} */
    this.stack[this.stack.length - 1]
  );
  n.label = t, n.identifier = di(
    this.sliceSerialize(e)
  ).toLowerCase();
}
function e1e(e) {
  this.exit(e);
}
function t1e(e) {
  this.enter({ type: "footnoteReference", identifier: "", label: "" }, e);
}
function n1e() {
  this.buffer();
}
function r1e(e) {
  const t = this.resume(), n = (
    /** @type {FootnoteDefinition} */
    this.stack[this.stack.length - 1]
  );
  n.label = t, n.identifier = di(
    this.sliceSerialize(e)
  ).toLowerCase();
}
function o1e(e) {
  this.exit(e);
}
function NV(e, t, n, r) {
  const o = Nx(r);
  let i = o.move("[^");
  const a = n.enter("footnoteReference"), l = n.enter("reference");
  return i += o.move(
    jV(n, RV(e), {
      ...o.current(),
      before: i,
      after: "]"
    })
  ), l(), a(), i += o.move("]"), i;
}
function i1e() {
  return "[";
}
function a1e(e, t, n, r) {
  const o = Nx(r);
  let i = o.move("[^");
  const a = n.enter("footnoteDefinition"), l = n.enter("label");
  return i += o.move(
    jV(n, RV(e), {
      ...o.current(),
      before: i,
      after: "]"
    })
  ), l(), i += o.move(
    "]:" + (e.children && e.children.length > 0 ? " " : "")
  ), o.shift(4), i += o.move(
    qje(Hje(e, n, o.current()), l1e)
  ), a(), i;
}
function l1e(e, t, n) {
  return t === 0 ? e : (n ? "" : "    ") + e;
}
function $V(e, t, n) {
  const r = t.indexStack, o = e.children || [], i = [];
  let a = -1, l = n.before;
  r.push(-1);
  let s = t.createTracker(n);
  for (; ++a < o.length; ) {
    const c = o[a];
    let p;
    if (r[r.length - 1] = a, a + 1 < o.length) {
      let f = t.handle.handlers[o[a + 1].type];
      f && f.peek && (f = f.peek), p = f ? f(o[a + 1], e, t, {
        before: "",
        after: "",
        ...s.current()
      }).charAt(0) : "";
    } else
      p = n.after;
    i.length > 0 && (l === "\r" || l === `
`) && c.type === "html" && (i[i.length - 1] = i[i.length - 1].replace(
      /(\r?\n|\r)$/,
      " "
    ), l = " ", s = t.createTracker(n), s.move(i.join(""))), i.push(
      s.move(
        t.handle(c, e, t, {
          ...s.current(),
          before: l,
          after: p
        })
      )
    ), l = i[i.length - 1].slice(-1);
  }
  return r.pop(), i.join("");
}
const s1e = [
  "autolink",
  "destinationLiteral",
  "destinationRaw",
  "reference",
  "titleQuote",
  "titleApostrophe"
];
IV.peek = p1e;
const u1e = {
  canContainEols: ["delete"],
  enter: { strikethrough: f1e },
  exit: { strikethrough: d1e }
}, c1e = {
  unsafe: [
    {
      character: "~",
      inConstruct: "phrasing",
      notInConstruct: s1e
    }
  ],
  handlers: { delete: IV }
};
function f1e(e) {
  this.enter({ type: "delete", children: [] }, e);
}
function d1e(e) {
  this.exit(e);
}
function IV(e, t, n, r) {
  const o = Nx(r), i = n.enter("strikethrough");
  let a = o.move("~~");
  return a += $V(e, n, {
    ...o.current(),
    before: a,
    after: "~"
  }), a += o.move("~~"), i(), a;
}
function p1e() {
  return "~";
}
AV.peek = m1e;
function AV(e, t, n) {
  let r = e.value || "", o = "`", i = -1;
  for (; new RegExp("(^|[^`])" + o + "([^`]|$)").test(r); )
    o += "`";
  for (/[^ \r\n]/.test(r) && (/^[ \r\n]/.test(r) && /[ \r\n]$/.test(r) || /^`|`$/.test(r)) && (r = " " + r + " "); ++i < n.unsafe.length; ) {
    const a = n.unsafe[i], l = TV(a);
    let s;
    if (a.atBreak)
      for (; s = l.exec(r); ) {
        let c = s.index;
        r.charCodeAt(c) === 10 && r.charCodeAt(c - 1) === 13 && c--, r = r.slice(0, c) + " " + r.slice(s.index + 1);
      }
  }
  return o + r + o;
}
function m1e() {
  return "`";
}
function h1e(e, t = {}) {
  const n = (t.align || []).concat(), r = t.stringLength || y1e, o = [], i = [], a = [], l = [];
  let s = 0, c = -1;
  for (; ++c < e.length; ) {
    const g = [], v = [];
    let S = -1;
    for (e[c].length > s && (s = e[c].length); ++S < e[c].length; ) {
      const w = g1e(e[c][S]);
      if (t.alignDelimiters !== !1) {
        const x = r(w);
        v[S] = x, (l[S] === void 0 || x > l[S]) && (l[S] = x);
      }
      g.push(w);
    }
    i[c] = g, a[c] = v;
  }
  let p = -1;
  if (typeof n == "object" && "length" in n)
    for (; ++p < s; )
      o[p] = Ez(n[p]);
  else {
    const g = Ez(n);
    for (; ++p < s; )
      o[p] = g;
  }
  p = -1;
  const f = [], m = [];
  for (; ++p < s; ) {
    const g = o[p];
    let v = "", S = "";
    g === 99 ? (v = ":", S = ":") : g === 108 ? v = ":" : g === 114 && (S = ":");
    let w = t.alignDelimiters === !1 ? 1 : Math.max(
      1,
      l[p] - v.length - S.length
    );
    const x = v + "-".repeat(w) + S;
    t.alignDelimiters !== !1 && (w = v.length + w + S.length, w > l[p] && (l[p] = w), m[p] = w), f[p] = x;
  }
  i.splice(1, 0, f), a.splice(1, 0, m), c = -1;
  const h = [];
  for (; ++c < i.length; ) {
    const g = i[c], v = a[c];
    p = -1;
    const S = [];
    for (; ++p < s; ) {
      const w = g[p] || "";
      let x = "", k = "";
      if (t.alignDelimiters !== !1) {
        const E = l[p] - (v[p] || 0), O = o[p];
        O === 114 ? x = " ".repeat(E) : O === 99 ? E % 2 ? (x = " ".repeat(E / 2 + 0.5), k = " ".repeat(E / 2 - 0.5)) : (x = " ".repeat(E / 2), k = x) : k = " ".repeat(E);
      }
      t.delimiterStart !== !1 && !p && S.push("|"), t.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
      // empty: there will be a closing space.
      !(t.alignDelimiters === !1 && w === "") && (t.delimiterStart !== !1 || p) && S.push(" "), t.alignDelimiters !== !1 && S.push(x), S.push(w), t.alignDelimiters !== !1 && S.push(k), t.padding !== !1 && S.push(" "), (t.delimiterEnd !== !1 || p !== s - 1) && S.push("|");
    }
    h.push(
      t.delimiterEnd === !1 ? S.join("").replace(/ +$/, "") : S.join("")
    );
  }
  return h.join(`
`);
}
function g1e(e) {
  return e == null ? "" : String(e);
}
function y1e(e) {
  return e.length;
}
function Ez(e) {
  const t = typeof e == "string" ? e.codePointAt(0) : 0;
  return t === 67 || t === 99 ? 99 : t === 76 || t === 108 ? 108 : t === 82 || t === 114 ? 114 : 0;
}
const v1e = {
  enter: {
    table: b1e,
    tableData: Cz,
    tableHeader: Cz,
    tableRow: x1e
  },
  exit: {
    codeText: S1e,
    table: w1e,
    tableData: H_,
    tableHeader: H_,
    tableRow: H_
  }
};
function b1e(e) {
  const t = e._align;
  this.enter(
    {
      type: "table",
      align: t.map((n) => n === "none" ? null : n),
      children: []
    },
    e
  ), this.setData("inTable", !0);
}
function w1e(e) {
  this.exit(e), this.setData("inTable");
}
function x1e(e) {
  this.enter({ type: "tableRow", children: [] }, e);
}
function H_(e) {
  this.exit(e);
}
function Cz(e) {
  this.enter({ type: "tableCell", children: [] }, e);
}
function S1e(e) {
  let t = this.resume();
  this.getData("inTable") && (t = t.replace(/\\([\\|])/g, k1e));
  const n = (
    /** @type {InlineCode} */
    this.stack[this.stack.length - 1]
  );
  n.value = t, this.exit(e);
}
function k1e(e, t) {
  return t === "|" ? t : e;
}
function _1e(e) {
  const t = e || {}, n = t.tableCellPadding, r = t.tablePipeAlign, o = t.stringLength, i = n ? " " : "|";
  return {
    unsafe: [
      { character: "\r", inConstruct: "tableCell" },
      { character: `
`, inConstruct: "tableCell" },
      // A pipe, when followed by a tab or space (padding), or a dash or colon
      // (unpadded delimiter row), could result in a table.
      { atBreak: !0, character: "|", after: "[	 :-]" },
      // A pipe in a cell must be encoded.
      { character: "|", inConstruct: "tableCell" },
      // A colon must be followed by a dash, in which case it could start a
      // delimiter row.
      { atBreak: !0, character: ":", after: "-" },
      // A delimiter row can also start with a dash, when followed by more
      // dashes, a colon, or a pipe.
      // This is a stricter version than the built in check for lists, thematic
      // breaks, and setex heading underlines though:
      // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>
      { atBreak: !0, character: "-", after: "[:|-]" }
    ],
    handlers: {
      table: a,
      tableRow: l,
      tableCell: s,
      inlineCode: m
    }
  };
  function a(h, g, v, S) {
    return c(
      p(h, v, S),
      h.align
    );
  }
  function l(h, g, v, S) {
    const w = f(h, v, S), x = c([w]);
    return x.slice(0, x.indexOf(`
`));
  }
  function s(h, g, v, S) {
    const w = v.enter("tableCell"), x = v.enter("phrasing"), k = $V(h, v, {
      ...S,
      before: i,
      after: i
    });
    return x(), w(), k;
  }
  function c(h, g) {
    return h1e(h, {
      align: g,
      // @ts-expect-error: `markdown-table` types should support `null`.
      alignDelimiters: r,
      // @ts-expect-error: `markdown-table` types should support `null`.
      padding: n,
      // @ts-expect-error: `markdown-table` types should support `null`.
      stringLength: o
    });
  }
  function p(h, g, v) {
    const S = h.children;
    let w = -1;
    const x = [], k = g.enter("table");
    for (; ++w < S.length; )
      x[w] = f(
        S[w],
        g,
        v
      );
    return k(), x;
  }
  function f(h, g, v) {
    const S = h.children;
    let w = -1;
    const x = [], k = g.enter("tableRow");
    for (; ++w < S.length; )
      x[w] = s(
        S[w],
        h,
        g,
        v
      );
    return k(), x;
  }
  function m(h, g, v) {
    let S = AV(h, g, v);
    return v.stack.includes("tableCell") && (S = S.replace(/\|/g, "\\$&")), S;
  }
}
function O1e(e) {
  const t = e.options.bullet || "*";
  if (t !== "*" && t !== "+" && t !== "-")
    throw new Error(
      "Cannot serialize items with `" + t + "` for `options.bullet`, expected `*`, `+`, or `-`"
    );
  return t;
}
function E1e(e) {
  const t = e.options.listItemIndent || "tab";
  if (t === 1 || t === "1")
    return "one";
  if (t !== "tab" && t !== "one" && t !== "mixed")
    throw new Error(
      "Cannot serialize items with `" + t + "` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`"
    );
  return t;
}
function C1e(e, t, n, r) {
  const o = E1e(n);
  let i = n.bulletCurrent || O1e(n);
  t && t.type === "list" && t.ordered && (i = (typeof t.start == "number" && t.start > -1 ? t.start : 1) + (n.options.incrementListMarker === !1 ? 0 : t.children.indexOf(e)) + i);
  let a = i.length + 1;
  (o === "tab" || o === "mixed" && (t && t.type === "list" && t.spread || e.spread)) && (a = Math.ceil(a / 4) * 4);
  const l = n.createTracker(r);
  l.move(i + " ".repeat(a - i.length)), l.shift(a);
  const s = n.enter("listItem"), c = n.indentLines(
    n.containerFlow(e, l.current()),
    p
  );
  return s(), c;
  function p(f, m, h) {
    return m ? (h ? "" : " ".repeat(a)) + f : (h ? i : i + " ".repeat(a - i.length)) + f;
  }
}
const P1e = {
  exit: {
    taskListCheckValueChecked: Pz,
    taskListCheckValueUnchecked: Pz,
    paragraph: T1e
  }
}, R1e = {
  unsafe: [{ atBreak: !0, character: "-", after: "[:|-]" }],
  handlers: { listItem: j1e }
};
function Pz(e) {
  const t = (
    /** @type {ListItem} */
    this.stack[this.stack.length - 2]
  );
  t.checked = e.type === "taskListCheckValueChecked";
}
function T1e(e) {
  const t = (
    /** @type {Parents} */
    this.stack[this.stack.length - 2]
  );
  if (t && t.type === "listItem" && typeof t.checked == "boolean") {
    const n = (
      /** @type {Paragraph} */
      this.stack[this.stack.length - 1]
    ), r = n.children[0];
    if (r && r.type === "text") {
      const o = t.children;
      let i = -1, a;
      for (; ++i < o.length; ) {
        const l = o[i];
        if (l.type === "paragraph") {
          a = l;
          break;
        }
      }
      a === n && (r.value = r.value.slice(1), r.value.length === 0 ? n.children.shift() : n.position && r.position && typeof r.position.start.offset == "number" && (r.position.start.column++, r.position.start.offset++, n.position.start = Object.assign({}, r.position.start)));
    }
  }
  this.exit(e);
}
function j1e(e, t, n, r) {
  const o = e.children[0], i = typeof e.checked == "boolean" && o && o.type === "paragraph", a = "[" + (e.checked ? "x" : " ") + "] ", l = Nx(r);
  i && l.move(a);
  let s = C1e(e, t, n, {
    ...r,
    ...l.current()
  });
  return i && (s = s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, c)), s;
  function c(p) {
    return p + a;
  }
}
function N1e() {
  return [
    jje,
    Yje(),
    u1e,
    v1e,
    P1e
  ];
}
function $1e(e) {
  return {
    extensions: [
      Nje,
      Xje(),
      c1e,
      _1e(e),
      R1e
    ]
  };
}
function I1e(e = {}) {
  const t = this.data();
  n("micromarkExtensions", Eje(e)), n("fromMarkdownExtensions", N1e()), n("toMarkdownExtensions", $1e(e));
  function n(r, o) {
    (t[r] ? t[r] : t[r] = []).push(o);
  }
}
function Nu({ level: e, children: t, ...n }) {
  return /* @__PURE__ */ $.jsx(Px, { order: e, ...n, children: t });
}
function Vs({ content: e }) {
  return /* @__PURE__ */ $.jsx(
    bV,
    {
      remarkPlugins: [[I1e, { singleTilde: !1 }]],
      components: {
        code({ inline: t, className: n, children: r, ...o }) {
          const i = /language-(\w+)/.exec(n || "");
          return t ? /* @__PURE__ */ $.jsx("code", { className: n, ...o, children: r }) : /* @__PURE__ */ $.jsx(
            sf,
            {
              language: i ? i[1] : "",
              ...o,
              style: { maxWidth: "100%", minWidth: "100%", overflow: "auto" },
              children: String(r).replace(/\n$/, "")
            }
          );
        },
        h1: Nu,
        h2: Nu,
        h3: Nu,
        h4: Nu,
        h5: Nu,
        h6: Nu,
        p({ children: t }) {
          return /* @__PURE__ */ $.jsx(Ft, { style: { whiteSpace: "pre-wrap" }, children: t });
        }
      },
      children: e || ""
    }
  );
}
const A1e = Ee((e) => ({
  // Match name input style to corresponding Title element styles
  // See https://github.com/mantinedev/mantine/blob/master/src/mantine-core/src/Title/Title.styles.ts
  nameInput: {
    ...e.fn.fontStyles(),
    fontFamily: e.headings.fontFamily,
    fontWeight: e.headings.fontWeight,
    fontSize: e.headings.sizes.h1.fontSize,
    lineHeight: e.headings.sizes.h1.lineHeight,
    width: "-webkit-fill-available",
    letterSpacing: "-1px",
    height: "44px"
  },
  hoverContainer: {
    "&:hover": {
      backgroundColor: e.colorScheme === "dark" ? "rgba(255, 255, 255, 0.1)" : e.colors.gray[1]
    },
    borderRadius: e.radius.sm,
    width: "-webkit-fill-available"
  }
}));
function z1e(e) {
  return e instanceof HTMLAnchorElement || e instanceof SVGElement;
}
const L1e = b.memo(function({
  name: e,
  description: t,
  setDescription: n,
  setName: r
}) {
  const { readOnly: o } = b.useContext(kn), { classes: i } = A1e(), [a, l] = b.useState(!e), [s, c] = b.useState("name"), p = b.useRef(null), f = b.useRef(null), m = t8(() => {
    e && l(!1);
  }), h = b.useCallback(
    (v) => {
      v.key === "Enter" && !v.shiftKey && (v.stopPropagation(), l(!1));
    },
    []
  ), g = b.useCallback(
    (v) => {
      o || (v.currentTarget === p.current ? (c("name"), l(!0)) : v.currentTarget === f.current && !z1e(v.target) && (c("description"), l(!0)));
    },
    [o]
  );
  return /* @__PURE__ */ $.jsx(
    ui,
    {
      ref: a ? m : void 0,
      spacing: "xs",
      ml: o ? "auto" : BP,
      mr: "0.5em",
      children: a ? /* @__PURE__ */ $.jsxs($.Fragment, { children: [
        /* @__PURE__ */ $.jsx(
          lf,
          {
            classNames: { input: i.nameInput },
            placeholder: "Config name",
            value: e,
            onKeyDown: h,
            autoFocus: s === "name",
            onChange: (v) => r(v.currentTarget.value)
          }
        ),
        /* @__PURE__ */ $.jsx(
          Bl,
          {
            placeholder: "Config description",
            value: t ?? void 0,
            onKeyDown: h,
            autoFocus: s === "description",
            onChange: (v) => n(v.currentTarget.value),
            autosize: !0,
            minRows: 2
          }
        )
      ] }) : /* @__PURE__ */ $.jsxs("div", { children: [
        /* @__PURE__ */ $.jsx(
          Px,
          {
            ref: p,
            onClick: g,
            className: o ? void 0 : `${i.hoverContainer} hoverContainer`,
            children: e
          }
        ),
        t && /* @__PURE__ */ $.jsx(
          "div",
          {
            ref: f,
            onClick: g,
            className: o ? void 0 : `${i.hoverContainer} hoverContainer`,
            children: /* @__PURE__ */ $.jsx(Vs, { content: t })
          }
        )
      ] })
    }
  );
});
function JP({ value: e, contentLabel: t }) {
  const n = t ? ` ${t}` : "";
  return /* @__PURE__ */ $.jsx(uU, { value: e, timeout: 2e3, children: ({ copied: r, copy: o }) => /* @__PURE__ */ $.jsx(
    fr,
    {
      label: r ? `Copied${n}` : `Copy${n}`,
      withArrow: !0,
      children: /* @__PURE__ */ $.jsx(jn, { color: r ? "teal" : "gray", onClick: o, children: r ? /* @__PURE__ */ $.jsx(sCe, { size: "1rem" }) : /* @__PURE__ */ $.jsx(uCe, { size: "1rem" }) })
    }
  ) });
}
const D1e = {
  colorScheme: "dark",
  headings: {
    fontFamily: "system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Arial, sans-serif",
    sizes: {
      h1: { fontSize: "2rem" }
    }
  },
  defaultGradient: {
    from: "pink",
    to: "pink",
    deg: 45
  },
  // local editor theme
  globalStyles: () => ({
    ".editorBackground": {
      background: "radial-gradient(ellipse at top,#08122d,#030712),radial-gradient(ellipse at bottom,#030712,#030712)",
      margin: "0 auto",
      minHeight: "100vh"
    },
    ".monoFont": {
      fontFamily: "sf mono, ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
    },
    ".ghost": {
      border: "none",
      borderRadius: "4px",
      padding: "4px",
      margin: "0px",
      backgroundColor: "transparent",
      ":hover": {
        backgroundColor: "rgba(226,232,255,.1)"
      },
      input: {
        maxHeight: "16px",
        fontFamily: "sf mono, ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
        border: "none",
        borderRadius: "4px",
        margin: "0px",
        backgroundColor: "transparent"
      }
    },
    ".cellStyle": {
      border: "1px solid rgba(226,232,255,.1) !important",
      background: "rgb(12 21 57 / 10%)",
      flex: 1,
      borderTopRightRadius: "0px",
      borderBottomRightRadius: "0px",
      ":hover": {
        background: "rgba(255, 255, 255, 0.03) !important"
      },
      textarea: {
        border: "1px solid rgba(226,232,255,.1)",
        backgroundColor: "#060c21",
        ":focus": {
          outline: "solid 1px #ff1cf7 !important",
          outlineOffset: "-1px"
        }
      },
      ".mantine-InputWrapper-label": {
        display: "none"
      }
    },
    ".sidePanel": {
      border: "1px solid rgba(226,232,255,.1)",
      borderLeft: "none",
      borderTopRightRadius: "4px",
      borderBottomRightRadius: "4px",
      input: {
        border: "1px solid rgba(226,232,255,.1)",
        backgroundColor: "#060c21",
        ":focus": {
          outline: "solid 1px #ff1cf7 !important",
          outlineOffset: "-1px"
        }
      },
      textarea: {
        border: "1px solid rgba(226,232,255,.1)",
        backgroundColor: "#060c21",
        ":focus": {
          outline: "solid 1px #ff1cf7 !important",
          outlineOffset: "-1px"
        }
      }
    },
    ".divider": {
      borderTopWidth: "1px",
      borderTopColor: "rgba(226,232,255,.1)",
      marginBottom: "0.5em"
    },
    ".runPromptButton": {
      background: "#ff1cf7",
      color: "white",
      height: "auto",
      "&:hover": {
        background: "#ff46f8"
      }
    },
    ".actionTabsPanel": {
      width: "400px"
    },
    ".parametersContainer": {
      maxWidth: "1250px",
      maxHeight: "-webkit-fill-available",
      padding: "0",
      backgroundColor: "rgba(226,232,255,.1)",
      borderRadius: "4px",
      border: "1px solid rgba(226,232,255,.1) !important",
      button: {
        ":hover": {
          backgroundColor: "rgba(226,232,255,.1)"
        }
      },
      input: {
        border: "1px solid rgba(226,232,255,.1)",
        backgroundColor: "#060c21",
        borderRadius: "4px",
        ":focus": {
          outline: "solid 1px #ff1cf7 !important",
          outlineOffset: "-1px"
        }
      },
      textarea: {
        border: "1px solid rgba(226,232,255,.1)",
        backgroundColor: "#060c21",
        borderRadius: "4px",
        ":focus": {
          outline: "solid 1px #ff1cf7 !important",
          outlineOffset: "-1px"
        }
      }
    },
    ".addParameterButton": {
      position: "sticky",
      left: "0",
      bottom: "0",
      margin: "16px 0 0 0",
      background: "#ff1cf7",
      "&:hover": {
        background: "#ff46f8"
      }
    },
    ".mantine-Slider-thumb": {
      border: "0.25rem solid #ff1cf7",
      backgroundColor: "white"
    },
    ".mantine-Slider-bar": {
      backgroundColor: "#ff1cf7"
    },
    ".mantine-Tabs-tab[data-active]": {
      borderBottom: "solid 1px #ff1cf7",
      ":hover": {
        borderBottom: "solid 1px #ff1cf7"
      }
    }
  })
}, F1e = {
  headings: {
    fontFamily: "system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Arial, sans-serif",
    sizes: {
      h1: { fontSize: "2rem" }
    }
  },
  defaultGradient: {
    from: "#E88949",
    to: "#E85921",
    deg: 90
  },
  //gradio light theme
  globalStyles: (e) => {
    const t = e.colorScheme === "light" ? "#E5E7EB" : "#384152", n = e.colorScheme === "light" ? "white" : "#374151";
    return {
      "div.editorBackground": {
        background: e.colorScheme === "light" ? "white" : "#0b0f19",
        borderRadius: "8px",
        // Gradio component is iframed so height should be in relation to
        // the height of the containing iframe, not the viewport
        height: "100%",
        // Add some margin & padding to better visually separate from surrounding
        // gradio card
        margin: "14px auto 0 auto",
        minHeight: "400px",
        paddingTop: "2px",
        // Apply nested styles on mantine elements for higher specificity
        // than gradio element styles
        /*
         * For all buttons, excluding menu dropdown and .ghost class buttons, apply the gradio color
         * styles
         */
        ".mantine-Button-root.mantine-UnstyledButton-root:not(.ghost):not([aria-haspopup='menu'])": {
          background: "linear-gradient(to bottom right, #ffedd5, #fdba74 100%)",
          border: "1px solid #fed7aa",
          boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05)",
          color: "#ea580c !important",
          fontSize: "16px",
          fontWeight: 600,
          minHeight: "36px",
          padding: "0 1.25rem"
        },
        /*
         * Same as above, only on hover
         */
        ".mantine-Button-root.mantine-UnstyledButton-root:not(.ghost):not([aria-haspopup='menu']):hover": {
          background: "linear-gradient(to bottom right, #ffedd5, #fed7aa)"
        },
        /*
         * Same as above, only on disabled. See gradio styles for these colors, specifically
         * .secondary[disabled] since .primary doesn't make enough of a contrast
         */
        ".mantine-Button-root.mantine-UnstyledButton-root:not(.ghost):not([aria-haspopup='menu']):disabled": {
          background: "linear-gradient(to bottom right, #e5e7eb,  #e5e7eb)",
          borderColor: "#e5e7eb",
          color: "#374151 !important",
          cursor: "not-allowed",
          pointerEvents: "auto"
        },
        /*
         * For all buttons, excluding menu dropdown, .ghost class buttons, and .runPromptButton, apply
         * this dark text color (from gradio text) so the text can be seen over orange button background
         * regardless of theme
         */
        ".mantine-Button-root.mantine-UnstyledButton-root:not(.ghost):not([aria-haspopup='menu']):not(.runPromptButton)": {
          color: "#374151"
        },
        ".mantine-Input-input:focus": {
          outline: "solid 1px #E85921 !important",
          outlineOffset: "-1px"
        },
        ".mantine-Input-input": e.colorScheme === "dark" ? {
          color: "#C1C2C5",
          backgroundColor: n
        } : void 0,
        // light colorScheme is fine without overrides
        ".mantine-Menu-dropdown": {
          border: `0.0625rem solid ${t}`
        },
        ".mantine-Slider-bar": {
          backgroundColor: "#E85921"
        },
        ".mantine-Slider-thumb": {
          border: "0.25rem solid #E85921",
          backgroundColor: "#E85921"
        },
        ".mantine-Tabs-tab[data-active]": {
          borderBottom: "solid 1px #E85921",
          ":hover": {
            borderBottom: "solid 1px #E85921"
          }
        },
        ".mantine-Tabs-tabsList": {
          gap: "12px"
        },
        ".mantine-Text-root": e.colorScheme === "dark" ? {
          color: "#C1C2C5"
          // default inherited backgroundColor is correct
        } : void 0,
        // light colorScheme is fine without overrides
        ".mantine-TextInput-input[data-with-icon]": {
          paddingLeft: "2.25rem"
        },
        ".mantine-Title-root.mantine-Text-root": {
          fontSize: "2rem"
        },
        ".monoFont": {
          fontFamily: "sf mono, ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
        },
        ".ghost": {
          input: {
            border: `1px solid ${t}`,
            minHeight: "36px",
            fontFamily: "sf mono, ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
            borderRadius: "8px",
            margin: "8px 0px 0px 0px",
            backgroundColor: n,
            boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset"
          },
          button: {
            color: e.colorScheme === "dark" ? "#C1C2C5" : "inherit",
            ":hover": {
              backgroundColor: "transparent"
            }
          }
        },
        ".buttonGroupLeft": {
          borderBottomRightRadius: 0,
          borderTopRightRadius: 0
        },
        ".buttonGroupRight": {
          borderBottomLeftRadius: 0,
          borderTopLeftRadius: 0
        },
        ".cellStyle": {
          border: `1px solid ${t}`,
          background: e.colorScheme === "light" ? "white" : "#1f2938",
          flex: 1,
          borderTopRightRadius: "0px",
          borderBottomRightRadius: "0px",
          borderTopLeftRadius: "8px",
          borderBottomLeftRadius: "8px",
          ":hover": {
            background: e.colorScheme === "light" ? "rgba(249, 250, 251, 0.5) !important" : "#1f2938"
          },
          textarea: {
            border: `1px solid ${t} !important`,
            borderRadius: "8px",
            margin: "8px 0px 0px 0px",
            boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset",
            backgroundColor: n
          }
        },
        ".sidePanel": {
          border: `1px solid ${t}`,
          borderLeft: "none",
          borderTopRightRadius: "8px",
          borderBottomRightRadius: "8px",
          background: e.colorScheme === "light" ? "linear-gradient(90deg, #F6F6F6, #FFFFFF)" : "#0e131f",
          input: {
            border: `1px solid ${t} !important`,
            boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset",
            backgroundColor: n,
            ":focus": {
              outline: "solid 1px #E85921 !important",
              outlineOffset: "-1px"
            }
          },
          textarea: {
            border: `1px solid ${t} !important`,
            boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset",
            borderRadius: "8px",
            backgroundColor: n,
            ":focus": {
              outline: "solid 1px #E85921 !important",
              outlineOffset: "-1px"
            }
          },
          ".promptActionBarClosed": {
            minWidth: "32px"
          }
        },
        ".divider": {
          backgroundColor: t,
          borderTopWidth: "1px",
          borderTopColor: "rgba(226,232,255,.1)",
          marginBottom: "0.5em"
        },
        ".runPromptButton": {
          borderRadius: "8px",
          border: "1px solid #FDD7AD",
          background: "linear-gradient(180deg, #FEE1C0 0%, #FCC792 100%)",
          boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05)",
          margin: "33px 4px 4px 4px",
          padding: "0.625rem !important",
          height: "auto"
        },
        ".runPromptButton.runPromptButtonReadOnly": {
          marginTop: "13px"
        },
        ".actionTabsPanel": {
          width: "400px"
        },
        ".parametersContainer": {
          maxWidth: "1250px",
          maxHeight: "-webkit-fill-available",
          padding: "0",
          backgroundColor: e.colorScheme === "light" ? "#F9FAFB" : "#1f2938",
          borderRadius: "8px",
          border: `1px solid ${t}`,
          button: {
            ":hover": {
              backgroundColor: e.colorScheme === "light" ? "#F0F1F1" : "transparent"
            }
          },
          input: {
            border: `1px solid ${t} !important`,
            boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset",
            borderRadius: "8px",
            backgroundColor: n
          },
          textarea: {
            border: `1px solid ${t} !important`,
            boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset",
            borderRadius: "8px",
            backgroundColor: n,
            ":focus": {
              outline: "solid 1px #E85921 !important",
              outlineOffset: "-1px"
            }
          }
        },
        // Override gradio's button styles
        ".promptMenuButton": {
          marginLeft: "-8px",
          padding: "0 0.875rem"
        },
        ".addParameterButton": {
          position: "sticky",
          left: "0",
          bottom: "0",
          margin: "16px 0 0 0",
          background: "linear-gradient(to bottom right, #ffedd5, #fdba74 100%)",
          border: "1px solid #fed7aa",
          boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05)",
          color: "#ea580c !important",
          path: {
            color: "#E85921"
          },
          ":hover": {
            background: "linear-gradient(to bottom right, #ffedd5, #fed7aa)"
          }
        }
      }
    };
  }
}, M1e = {
  defaultGradient: {
    from: "#ff1cf7",
    to: "#ff1cf7",
    deg: 45
  },
  globalStyles: () => ({
    body: {
      padding: "0 !important",
      color: "var(--vscode-editor-foreground)"
    },
    ".addPromptRow": {
      borderRadius: "0px"
    },
    ".editorBackground": {
      background: "var(--vscode-editor-background)",
      margin: "0 auto",
      minHeight: "100vh"
    },
    ".monoFont": {
      fontFamily: "sf mono, ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace"
    },
    ".ghost": {
      border: "none",
      borderRadius: "4px",
      padding: "4px",
      margin: "0px",
      color: "var(--vscode-editor-foreground)",
      backgroundColor: "var(--vscode-input-background)",
      ":hover": {
        backgroundColor: "rgba(226,232,255,.1)"
      },
      input: {
        maxHeight: "16px",
        fontFamily: "sf mono, ui-monospace, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
        border: "none",
        borderRadius: "4px",
        margin: "0px",
        backgroundColor: "var(--vscode-input-background)",
        color: "var(--vscode-editor-foreground)"
      }
    },
    ".cellStyle": {
      border: "1px solid",
      borderColor: "var(--vscode-notebook-cellBorderColor) !important",
      backgroundColor: "var(--vscode-editorWidget-background)",
      flex: 1,
      color: "var(--vscode-editor-foreground)",
      borderTopRightRadius: "0px",
      borderBottomRightRadius: "0px",
      borderTopLeftRadius: "0px",
      borderBottomLeftRadius: "0px",
      ":hover": {
        background: "rgba(249, 250, 251, 0.01) !important"
      },
      textarea: {
        border: "1px solid !important",
        borderColor: "var(--vscode-notebook-cellBorderColor) !important",
        color: "var(--vscode-editor-foreground)",
        borderRadius: "0px",
        margin: "0px 0px 0px 0px",
        boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset",
        backgroundColor: "var(--vscode-input-background)",
        ":focus": {
          outline: "solid 1px #ff1cf7 !important",
          outlineOffset: "-1px"
        }
      },
      ".mantine-InputWrapper-label": {
        display: "none"
      }
    },
    ".sidePanel": {
      border: "1px solid",
      borderColor: "var(--vscode-notebook-cellBorderColor)",
      borderLeft: "none",
      color: "var(--vscode-editor-foreground)",
      borderTopRightRadius: "0px",
      borderBottomRightRadius: "0px",
      background: "var(--vscode-sideBar-background)",
      minWidth: "32px",
      input: {
        borderRadius: "0px",
        border: "1px solid",
        borderColor: "var(--vscode-notebook-cellBorderColor)",
        color: "var(--vscode-editor-foreground)",
        backgroundColor: "var(--vscode-input-background)",
        ":focus": {
          outline: "solid 1px var(--vscode-inputOption-activeBorder) !important",
          outlineOffset: "-1px"
        }
      },
      textarea: {
        borderRadius: "0px",
        border: "1px solid",
        borderColor: "var(--vscode-notebook-cellBorderColor)",
        color: "var(--vscode-editor-foreground)",
        backgroundColor: "var(--vscode-input-background)",
        ":focus": {
          outline: "solid 1px var(--vscode-inputOption-activeBorder) !important",
          outlineOffset: "-1px"
        }
      },
      label: {
        color: "var(--vscode-editor-foreground) !important"
      },
      button: {
        color: "var(--vscode-editor-foreground) !important",
        borderColor: "ff1cf7 !important"
      }
    },
    ".runPromptButton": {
      background: "var(--vscode-button-background)",
      color: "white",
      borderRadius: "0",
      height: "auto",
      "&:hover": {
        background: "var(--vscode-button-hoverBackground)"
      }
    },
    ".primaryButton": {
      background: "var(--vscode-button-background)",
      color: "white",
      "&:hover": {
        background: "var(--vscode-button-hoverBackground)"
      }
    },
    ".secondaryButton": {
      background: "var(--vscode-button-secondaryBackground)",
      color: "white",
      "&:hover": {
        background: "var(--vscode-button-secondaryHoverBackground)"
      }
    },
    ".divider": {
      borderTopWidth: "1px",
      borderTopColor: "var(--vscode-notebook-cellBorderColor)",
      marginBottom: "0.5em"
    },
    ".parametersContainer": {
      width: "100%",
      maxHeight: "-webkit-fill-available",
      margin: "16px auto",
      padding: "0",
      background: "var(--vscode-sideBar-background)",
      color: "var(--vscode-editor-foreground) !important",
      borderRadius: "0px",
      border: "1px solid",
      borderColor: "var(--vscode-notebook-cellBorderColor)",
      textAlign: "left",
      button: {
        ":hover": {
          backgroundColor: "var(--vscode-toolbar-hoverBackground)"
        }
      },
      input: {
        border: "1px solid",
        borderColor: "var(--vscode-notebook-cellBorderColor)",
        borderRadius: "0px",
        color: "var(--vscode-editor-foreground)",
        backgroundColor: "var(--vscode-input-background) !important",
        ":focus": {
          outline: "solid 1px var(--vscode-inputOption-activeBorder) !important",
          outlineOffset: "-1px"
        }
      },
      textarea: {
        border: "1px solid",
        borderColor: "var(--vscode-notebook-cellBorderColor)",
        borderRadius: "0px",
        color: "var(--vscode-editor-foreground)",
        backgroundColor: "var(--vscode-input-background) !important",
        ":focus": {
          outline: "solid 1px var(--vscode-inputOption-activeBorder) !important",
          outlineOffset: "-1px"
        }
      },
      ".addParameterButton": {
        position: "sticky",
        left: "0",
        bottom: "0",
        margin: "16px 0 0 0",
        borderRadius: "0px",
        background: "var(--vscode-button-background)",
        ":hover": {
          backgroundColor: "var(--vscode-button-hoverBackground)"
        },
        path: {
          color: "#fff"
        }
      },
      ".promptMenuButton": {
        marginLeft: -8,
        background: "var(--vscode-button-secondaryBackground)",
        color: "white",
        ":hover": {
          backgroundColor: "var(--vscode-button-hoverBackground)"
        }
      }
    }
  })
};
function B1e({
  children: e,
  condition: t,
  wrapper: n
}) {
  return t ? n(e) : /* @__PURE__ */ $.jsx($.Fragment, { children: e });
}
const U1e = {
  local: D1e,
  gradio: F1e,
  vscode: M1e
};
function H1e({
  children: e,
  mode: t,
  themeMode: n,
  themeOverride: r
}) {
  let o = Ofe();
  n && (o = n);
  const i = b.useMemo(
    () => ({
      colorScheme: o,
      ...r ?? (t ? U1e[t] : {})
    }),
    [t, o, r]
  );
  return /* @__PURE__ */ $.jsx(
    B1e,
    {
      condition: t != null || n != null || r != null,
      wrapper: (a) => /* @__PURE__ */ $.jsx(J9, { withGlobalStyles: !0, withNormalizeCSS: !0, theme: i, children: a }),
      children: e
    }
  );
}
const W1e = Ee(() => ({
  buttonGroupLeft: {
    borderBottomRightRadius: 0,
    borderTopRightRadius: 0
  }
})), V1e = b.memo(function({
  onDownload: e,
  isGrouped: t = !1
}) {
  const [n, r] = b.useState(!1), { classes: o } = W1e(), i = async () => {
    n || (r(!0), await e(), r(!1));
  };
  return /* @__PURE__ */ $.jsx(fr, { label: "Download config file", children: /* @__PURE__ */ $.jsx(
    Hs,
    {
      loaderPosition: "center",
      loading: n,
      onClick: i,
      size: "xs",
      variant: "filled",
      className: t ? `${o.buttonGroupLeft} buttonGroupLeft` : void 0,
      children: /* @__PURE__ */ $.jsx(dCe, { size: "20px" })
    }
  ) });
}), q1e = Ee(() => ({
  buttonGroupRight: {
    borderBottomLeftRadius: 0,
    borderTopLeftRadius: 0
  }
})), G1e = b.memo(function({
  onShare: e,
  isGrouped: t = !1
}) {
  const { mode: n } = b.useContext(kn), [r, { open: o, close: i }] = c8(!1), [a, l] = b.useState(!1), [s, c] = b.useState(""), { classes: p } = q1e(), f = async () => {
    if (a)
      return;
    l(!0);
    const v = await e();
    l(!1), v && (c(v), o());
  }, m = n === "gradio" ? "Notebook" : "Workbook", h = a ? "Generating share link..." : `Create a link to share your ${m}!`, g = /* @__PURE__ */ $.jsx(fr, { label: h, withArrow: !0, children: /* @__PURE__ */ $.jsx(
    Hs,
    {
      loaderPosition: "center",
      loading: a,
      onClick: f,
      size: "xs",
      variant: "filled",
      className: t ? `${p.buttonGroupRight} buttonGroupRight` : void 0,
      children: /* @__PURE__ */ $.jsx(yCe, { size: "20px" })
    }
  ) });
  return /* @__PURE__ */ $.jsxs($.Fragment, { children: [
    /* @__PURE__ */ $.jsx(
      Ba,
      {
        opened: r,
        onClose: i,
        title: `${m} URL`,
        children: /* @__PURE__ */ $.jsx(Js, { p: 0, mr: -8, children: /* @__PURE__ */ $.jsxs(jt, { direction: "row", children: [
          /* @__PURE__ */ $.jsx(Ft, { truncate: !0, children: s }),
          /* @__PURE__ */ $.jsx(JP, { value: s, contentLabel: `${m} URL` })
        ] }) })
      }
    ),
    g
  ] });
}), $x = b.createContext({
  showNotification: () => {
  }
});
function zV(e, t) {
  const [n, r] = b.useState([]), { showNotification: o } = b.useContext($x), i = b.useCallback(
    async (a) => {
      if (t)
        try {
          const l = await t(a);
          r(l);
        } catch (l) {
          const s = l instanceof Error ? l.message : null;
          o({
            title: "Error loading models",
            message: s,
            type: "error"
          });
        }
    },
    [t, o]
  );
  return b.useEffect(() => {
    i(e);
  }, [i, e]), n;
}
const K1e = Ee((e) => ({
  addPromptRow: {
    borderRadius: F(4),
    display: "flex",
    justifyContent: "center",
    marginLeft: BP,
    align: "center",
    "&:hover": {
      backgroundColor: e.colorScheme === "light" ? e.colors.gray[1] : "rgba(255, 255, 255, 0.1)"
    },
    [e.fn.smallerThan("sm")]: {
      marginLeft: "0",
      display: "block",
      position: "static",
      bottom: -10,
      left: 0,
      height: 28,
      margin: "10px 0"
    }
  }
}));
function Y1e({
  models: e,
  onSelectModel: t,
  collapseLimit: n
}) {
  const [r, o] = b.useState(e.length > n), i = r ? e.slice(0, n) : e;
  return /* @__PURE__ */ $.jsxs(Dp, { mah: 300, style: { overflowY: "auto" }, children: [
    i.map((a) => /* @__PURE__ */ $.jsx(
      xr.Item,
      {
        icon: /* @__PURE__ */ $.jsx(vCe, { size: "16" }),
        onClick: () => t(a),
        children: a
      },
      a
    )),
    r && /* @__PURE__ */ $.jsx(xr.Item, { onClick: () => o(!1), children: "..." })
  ] });
}
const Rz = b.memo(function({ addPrompt: e, getModels: t }) {
  const [n, r] = b.useState(""), [o, i] = b.useState(!1), a = b.useCallback(
    (c) => {
      e(c), i(!1);
    },
    [e]
  ), l = zV(n, t), { classes: s } = K1e();
  return /* @__PURE__ */ $.jsx("div", { className: `${s.addPromptRow} addPromptRow`, children: /* @__PURE__ */ $.jsxs(
    xr,
    {
      position: "bottom",
      closeOnItemClick: !1,
      opened: o,
      onChange: i,
      children: [
        /* @__PURE__ */ $.jsx(xr.Target, { children: /* @__PURE__ */ $.jsx(fr, { label: "Add prompt", children: /* @__PURE__ */ $.jsx(jn, { w: "100%", children: /* @__PURE__ */ $.jsx(MP, { size: 20 }) }) }) }),
        /* @__PURE__ */ $.jsxs(xr.Dropdown, { children: [
          /* @__PURE__ */ $.jsx(
            lf,
            {
              icon: /* @__PURE__ */ $.jsx(gCe, { size: "16" }),
              placeholder: "Search",
              value: n,
              onChange: (c) => r(c.currentTarget.value)
            }
          ),
          /* @__PURE__ */ $.jsx(
            Y1e,
            {
              models: l ?? [],
              collapseLimit: 5,
              onSelectModel: a
            }
          )
        ] })
      ]
    }
  ) });
}), X1e = Ee(() => ({
  promptMenuButton: {
    marginLeft: -8
  }
})), Z1e = b.memo(function({
  promptId: e,
  onDeletePrompt: t
}) {
  const { classes: n } = X1e();
  return /* @__PURE__ */ $.jsxs(xr, { position: "bottom-end", children: [
    /* @__PURE__ */ $.jsx(xr.Target, { children: /* @__PURE__ */ $.jsx(
      Hs,
      {
        size: "xs",
        variant: "subtle",
        color: "dark",
        className: `${n.promptMenuButton} promptMenuButton`,
        children: /* @__PURE__ */ $.jsx(fCe, { size: 14 })
      }
    ) }),
    /* @__PURE__ */ $.jsx(xr.Dropdown, { children: /* @__PURE__ */ $.jsx(
      xr.Item,
      {
        icon: /* @__PURE__ */ $.jsx(vp, { size: 16 }),
        color: "red",
        onClick: () => t(e),
        children: "Delete Prompt"
      }
    ) })
  ] });
}), Q1e = b.memo(function(e) {
  const {
    disabled: t,
    property: n,
    renderProperty: r,
    setValue: o,
    ...i
  } = e, a = b.useMemo(
    () => n.types.map((h, g) => ({
      label: "",
      value: g.toString()
    })),
    [n.types]
  ), [l, s] = b.useState(/* @__PURE__ */ new Map()), [c, p] = b.useState("0"), f = b.useCallback(
    (h) => {
      console.log("set value: ", l.get(h)), o(l.get(h)), p(h);
    },
    [l, o]
  ), m = b.useCallback(
    (h) => {
      const g = typeof h == "function" ? h(l) : h;
      s((v) => v.set(c, g)), o(g);
    },
    [c, l, o]
  );
  return /* @__PURE__ */ $.jsxs(jt, { direction: "column", children: [
    /* @__PURE__ */ $.jsx(
      MH,
      {
        data: a,
        value: c,
        onChange: f,
        disabled: t
      }
    ),
    /* @__PURE__ */ $.jsx("div", { style: { marginLeft: "1em" }, children: r({
      ...i,
      property: n.types[parseInt(c)],
      setValue: m,
      propertyName: ""
    }) })
  ] });
});
function J1e(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function Tz(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    t && (r = r.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function jz(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Tz(Object(n), !0).forEach(function(r) {
      J1e(e, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Tz(Object(n)).forEach(function(r) {
      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return e;
}
function eNe(e, t) {
  if (e == null)
    return {};
  var n = {}, r = Object.keys(e), o, i;
  for (i = 0; i < r.length; i++)
    o = r[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
  return n;
}
function tNe(e, t) {
  if (e == null)
    return {};
  var n = eNe(e, t), r, o;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (o = 0; o < i.length; o++)
      r = i[o], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
  }
  return n;
}
function nNe(e, t) {
  return rNe(e) || oNe(e, t) || iNe(e, t) || aNe();
}
function rNe(e) {
  if (Array.isArray(e))
    return e;
}
function oNe(e, t) {
  if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
    var n = [], r = !0, o = !1, i = void 0;
    try {
      for (var a = e[Symbol.iterator](), l; !(r = (l = a.next()).done) && (n.push(l.value), !(t && n.length === t)); r = !0)
        ;
    } catch (s) {
      o = !0, i = s;
    } finally {
      try {
        !r && a.return != null && a.return();
      } finally {
        if (o)
          throw i;
      }
    }
    return n;
  }
}
function iNe(e, t) {
  if (e) {
    if (typeof e == "string")
      return Nz(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
      return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
      return Nz(e, t);
  }
}
function Nz(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, r = new Array(t); n < t; n++)
    r[n] = e[n];
  return r;
}
function aNe() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function lNe(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function $z(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    t && (r = r.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function Iz(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? $z(Object(n), !0).forEach(function(r) {
      lNe(e, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $z(Object(n)).forEach(function(r) {
      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return e;
}
function sNe() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return function(r) {
    return t.reduceRight(function(o, i) {
      return i(o);
    }, r);
  };
}
function wd(e) {
  return function t() {
    for (var n = this, r = arguments.length, o = new Array(r), i = 0; i < r; i++)
      o[i] = arguments[i];
    return o.length >= e.length ? e.apply(this, o) : function() {
      for (var a = arguments.length, l = new Array(a), s = 0; s < a; s++)
        l[s] = arguments[s];
      return t.apply(n, [].concat(o, l));
    };
  };
}
function Ub(e) {
  return {}.toString.call(e).includes("Object");
}
function uNe(e) {
  return !Object.keys(e).length;
}
function bp(e) {
  return typeof e == "function";
}
function cNe(e, t) {
  return Object.prototype.hasOwnProperty.call(e, t);
}
function fNe(e, t) {
  return Ub(t) || Al("changeType"), Object.keys(t).some(function(n) {
    return !cNe(e, n);
  }) && Al("changeField"), t;
}
function dNe(e) {
  bp(e) || Al("selectorType");
}
function pNe(e) {
  bp(e) || Ub(e) || Al("handlerType"), Ub(e) && Object.values(e).some(function(t) {
    return !bp(t);
  }) && Al("handlersType");
}
function mNe(e) {
  e || Al("initialIsRequired"), Ub(e) || Al("initialType"), uNe(e) && Al("initialContent");
}
function hNe(e, t) {
  throw new Error(e[t] || e.default);
}
var gNe = {
  initialIsRequired: "initial state is required",
  initialType: "initial state should be an object",
  initialContent: "initial state shouldn't be an empty object",
  handlerType: "handler should be an object or a function",
  handlersType: "all handlers should be a functions",
  selectorType: "selector should be a function",
  changeType: "provided value of changes should be an object",
  changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
  default: "an unknown error accured in `state-local` package"
}, Al = wd(hNe)(gNe), Wh = {
  changes: fNe,
  selector: dNe,
  handler: pNe,
  initial: mNe
};
function yNe(e) {
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  Wh.initial(e), Wh.handler(t);
  var n = {
    current: e
  }, r = wd(wNe)(n, t), o = wd(bNe)(n), i = wd(Wh.changes)(e), a = wd(vNe)(n);
  function l() {
    var c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(p) {
      return p;
    };
    return Wh.selector(c), c(n.current);
  }
  function s(c) {
    sNe(r, o, i, a)(c);
  }
  return [l, s];
}
function vNe(e, t) {
  return bp(t) ? t(e.current) : t;
}
function bNe(e, t) {
  return e.current = Iz(Iz({}, e.current), t), t;
}
function wNe(e, t, n) {
  return bp(t) ? t(e.current) : Object.keys(n).forEach(function(r) {
    var o;
    return (o = t[r]) === null || o === void 0 ? void 0 : o.call(t, e.current[r]);
  }), n;
}
var xNe = {
  create: yNe
}, SNe = {
  paths: {
    vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"
  }
};
function kNe(e) {
  return function t() {
    for (var n = this, r = arguments.length, o = new Array(r), i = 0; i < r; i++)
      o[i] = arguments[i];
    return o.length >= e.length ? e.apply(this, o) : function() {
      for (var a = arguments.length, l = new Array(a), s = 0; s < a; s++)
        l[s] = arguments[s];
      return t.apply(n, [].concat(o, l));
    };
  };
}
function _Ne(e) {
  return {}.toString.call(e).includes("Object");
}
function ONe(e) {
  return e || Az("configIsRequired"), _Ne(e) || Az("configType"), e.urls ? (ENe(), {
    paths: {
      vs: e.urls.monacoBase
    }
  }) : e;
}
function ENe() {
  console.warn(LV.deprecation);
}
function CNe(e, t) {
  throw new Error(e[t] || e.default);
}
var LV = {
  configIsRequired: "the configuration object is required",
  configType: "the configuration object should be an object",
  default: "an unknown error accured in `@monaco-editor/loader` package",
  deprecation: `Deprecation warning!
    You are using deprecated way of configuration.

    Instead of using
      monaco.config({ urls: { monacoBase: '...' } })
    use
      monaco.config({ paths: { vs: '...' } })

    For more please check the link https://github.com/suren-atoyan/monaco-loader#config
  `
}, Az = kNe(CNe)(LV), PNe = {
  config: ONe
}, RNe = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return function(r) {
    return t.reduceRight(function(o, i) {
      return i(o);
    }, r);
  };
};
function DV(e, t) {
  return Object.keys(t).forEach(function(n) {
    t[n] instanceof Object && e[n] && Object.assign(t[n], DV(e[n], t[n]));
  }), jz(jz({}, e), t);
}
var TNe = {
  type: "cancelation",
  msg: "operation is manually canceled"
};
function W_(e) {
  var t = !1, n = new Promise(function(r, o) {
    e.then(function(i) {
      return t ? o(TNe) : r(i);
    }), e.catch(o);
  });
  return n.cancel = function() {
    return t = !0;
  }, n;
}
var jNe = xNe.create({
  config: SNe,
  isInitialized: !1,
  resolve: null,
  reject: null,
  monaco: null
}), FV = nNe(jNe, 2), Wp = FV[0], Ix = FV[1];
function NNe(e) {
  var t = PNe.config(e), n = t.monaco, r = tNe(t, ["monaco"]);
  Ix(function(o) {
    return {
      config: DV(o.config, r),
      monaco: n
    };
  });
}
function $Ne() {
  var e = Wp(function(t) {
    var n = t.monaco, r = t.isInitialized, o = t.resolve;
    return {
      monaco: n,
      isInitialized: r,
      resolve: o
    };
  });
  if (!e.isInitialized) {
    if (Ix({
      isInitialized: !0
    }), e.monaco)
      return e.resolve(e.monaco), W_(V_);
    if (window.monaco && window.monaco.editor)
      return MV(window.monaco), e.resolve(window.monaco), W_(V_);
    RNe(INe, zNe)(LNe);
  }
  return W_(V_);
}
function INe(e) {
  return document.body.appendChild(e);
}
function ANe(e) {
  var t = document.createElement("script");
  return e && (t.src = e), t;
}
function zNe(e) {
  var t = Wp(function(r) {
    var o = r.config, i = r.reject;
    return {
      config: o,
      reject: i
    };
  }), n = ANe("".concat(t.config.paths.vs, "/loader.js"));
  return n.onload = function() {
    return e();
  }, n.onerror = t.reject, n;
}
function LNe() {
  var e = Wp(function(n) {
    var r = n.config, o = n.resolve, i = n.reject;
    return {
      config: r,
      resolve: o,
      reject: i
    };
  }), t = window.require;
  t.config(e.config), t(["vs/editor/editor.main"], function(n) {
    MV(n), e.resolve(n);
  }, function(n) {
    e.reject(n);
  });
}
function MV(e) {
  Wp().monaco || Ix({
    monaco: e
  });
}
function DNe() {
  return Wp(function(e) {
    var t = e.monaco;
    return t;
  });
}
var V_ = new Promise(function(e, t) {
  return Ix({
    resolve: e,
    reject: t
  });
}), BV = {
  config: NNe,
  init: $Ne,
  __getMonacoInstance: DNe
}, FNe = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, q_ = FNe, MNe = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, BNe = MNe;
function UNe({ children: e }) {
  return P.createElement("div", { style: BNe.container }, e);
}
var HNe = UNe, WNe = HNe;
function VNe({ width: e, height: t, isEditorReady: n, loading: r, _ref: o, className: i, wrapperProps: a }) {
  return P.createElement("section", { style: { ...q_.wrapper, width: e, height: t }, ...a }, !n && P.createElement(WNe, null, r), P.createElement("div", { ref: o, style: { ...q_.fullWidth, ...!n && q_.hide }, className: i }));
}
var qNe = VNe, UV = b.memo(qNe);
function GNe(e) {
  b.useEffect(e, []);
}
var HV = GNe;
function KNe(e, t, n = !0) {
  let r = b.useRef(!0);
  b.useEffect(r.current || !n ? () => {
    r.current = !1;
  } : e, t);
}
var co = KNe;
function Bd() {
}
function rc(e, t, n, r) {
  return YNe(e, r) || XNe(e, t, n, r);
}
function YNe(e, t) {
  return e.editor.getModel(WV(e, t));
}
function XNe(e, t, n, r) {
  return e.editor.createModel(t, n, r ? WV(e, r) : void 0);
}
function WV(e, t) {
  return e.Uri.parse(t);
}
function ZNe({ original: e, modified: t, language: n, originalLanguage: r, modifiedLanguage: o, originalModelPath: i, modifiedModelPath: a, keepCurrentOriginalModel: l = !1, keepCurrentModifiedModel: s = !1, theme: c = "light", loading: p = "Loading...", options: f = {}, height: m = "100%", width: h = "100%", className: g, wrapperProps: v = {}, beforeMount: S = Bd, onMount: w = Bd }) {
  let [x, k] = b.useState(!1), [E, O] = b.useState(!0), C = b.useRef(null), R = b.useRef(null), L = b.useRef(null), D = b.useRef(w), N = b.useRef(S), H = b.useRef(!1);
  HV(() => {
    let U = BV.init();
    return U.then((Q) => (R.current = Q) && O(!1)).catch((Q) => (Q == null ? void 0 : Q.type) !== "cancelation" && console.error("Monaco initialization: error:", Q)), () => C.current ? W() : U.cancel();
  }), co(() => {
    if (C.current && R.current) {
      let U = C.current.getOriginalEditor(), Q = rc(R.current, e || "", r || n || "text", i || "");
      Q !== U.getModel() && U.setModel(Q);
    }
  }, [i], x), co(() => {
    if (C.current && R.current) {
      let U = C.current.getModifiedEditor(), Q = rc(R.current, t || "", o || n || "text", a || "");
      Q !== U.getModel() && U.setModel(Q);
    }
  }, [a], x), co(() => {
    let U = C.current.getModifiedEditor();
    U.getOption(R.current.editor.EditorOption.readOnly) ? U.setValue(t || "") : t !== U.getValue() && (U.executeEdits("", [{ range: U.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), U.pushUndoStop());
  }, [t], x), co(() => {
    var U, Q;
    (Q = (U = C.current) == null ? void 0 : U.getModel()) == null || Q.original.setValue(e || "");
  }, [e], x), co(() => {
    let { original: U, modified: Q } = C.current.getModel();
    R.current.editor.setModelLanguage(U, r || n || "text"), R.current.editor.setModelLanguage(Q, o || n || "text");
  }, [n, r, o], x), co(() => {
    var U;
    (U = R.current) == null || U.editor.setTheme(c);
  }, [c], x), co(() => {
    var U;
    (U = C.current) == null || U.updateOptions(f);
  }, [f], x);
  let B = b.useCallback(() => {
    var U;
    if (!R.current)
      return;
    N.current(R.current);
    let Q = rc(R.current, e || "", r || n || "text", i || ""), J = rc(R.current, t || "", o || n || "text", a || "");
    (U = C.current) == null || U.setModel({ original: Q, modified: J });
  }, [n, t, o, e, r, i, a]), K = b.useCallback(() => {
    var U;
    !H.current && L.current && (C.current = R.current.editor.createDiffEditor(L.current, { automaticLayout: !0, ...f }), B(), (U = R.current) == null || U.editor.setTheme(c), k(!0), H.current = !0);
  }, [f, c, B]);
  b.useEffect(() => {
    x && D.current(C.current, R.current);
  }, [x]), b.useEffect(() => {
    !E && !x && K();
  }, [E, x, K]);
  function W() {
    var U, Q, J, q;
    let ee = (U = C.current) == null ? void 0 : U.getModel();
    l || (Q = ee == null ? void 0 : ee.original) == null || Q.dispose(), s || (J = ee == null ? void 0 : ee.modified) == null || J.dispose(), (q = C.current) == null || q.dispose();
  }
  return P.createElement(UV, { width: h, height: m, isEditorReady: x, loading: p, _ref: L, className: g, wrapperProps: v });
}
var QNe = ZNe;
b.memo(QNe);
function JNe(e) {
  let t = b.useRef();
  return b.useEffect(() => {
    t.current = e;
  }, [e]), t.current;
}
var e3e = JNe, Vh = /* @__PURE__ */ new Map();
function t3e({ defaultValue: e, defaultLanguage: t, defaultPath: n, value: r, language: o, path: i, theme: a = "light", line: l, loading: s = "Loading...", options: c = {}, overrideServices: p = {}, saveViewState: f = !0, keepCurrentModel: m = !1, width: h = "100%", height: g = "100%", className: v, wrapperProps: S = {}, beforeMount: w = Bd, onMount: x = Bd, onChange: k, onValidate: E = Bd }) {
  let [O, C] = b.useState(!1), [R, L] = b.useState(!0), D = b.useRef(null), N = b.useRef(null), H = b.useRef(null), B = b.useRef(x), K = b.useRef(w), W = b.useRef(), U = b.useRef(r), Q = e3e(i), J = b.useRef(!1), q = b.useRef(!1);
  HV(() => {
    let X = BV.init();
    return X.then((ie) => (D.current = ie) && L(!1)).catch((ie) => (ie == null ? void 0 : ie.type) !== "cancelation" && console.error("Monaco initialization: error:", ie)), () => N.current ? A() : X.cancel();
  }), co(() => {
    var X, ie, j, le;
    let re = rc(D.current, e || r || "", t || o || "", i || n || "");
    re !== ((X = N.current) == null ? void 0 : X.getModel()) && (f && Vh.set(Q, (ie = N.current) == null ? void 0 : ie.saveViewState()), (j = N.current) == null || j.setModel(re), f && ((le = N.current) == null || le.restoreViewState(Vh.get(i))));
  }, [i], O), co(() => {
    var X;
    (X = N.current) == null || X.updateOptions(c);
  }, [c], O), co(() => {
    !N.current || r === void 0 || (N.current.getOption(D.current.editor.EditorOption.readOnly) ? N.current.setValue(r) : r !== N.current.getValue() && (q.current = !0, N.current.executeEdits("", [{ range: N.current.getModel().getFullModelRange(), text: r, forceMoveMarkers: !0 }]), N.current.pushUndoStop(), q.current = !1));
  }, [r], O), co(() => {
    var X, ie;
    let j = (X = N.current) == null ? void 0 : X.getModel();
    j && o && ((ie = D.current) == null || ie.editor.setModelLanguage(j, o));
  }, [o], O), co(() => {
    var X;
    l !== void 0 && ((X = N.current) == null || X.revealLine(l));
  }, [l], O), co(() => {
    var X;
    (X = D.current) == null || X.editor.setTheme(a);
  }, [a], O);
  let ee = b.useCallback(() => {
    var X;
    if (!(!H.current || !D.current) && !J.current) {
      K.current(D.current);
      let ie = i || n, j = rc(D.current, r || e || "", t || o || "", ie || "");
      N.current = (X = D.current) == null ? void 0 : X.editor.create(H.current, { model: j, automaticLayout: !0, ...c }, p), f && N.current.restoreViewState(Vh.get(ie)), D.current.editor.setTheme(a), l !== void 0 && N.current.revealLine(l), C(!0), J.current = !0;
    }
  }, [e, t, n, r, o, i, c, p, f, a, l]);
  b.useEffect(() => {
    O && B.current(N.current, D.current);
  }, [O]), b.useEffect(() => {
    !R && !O && ee();
  }, [R, O, ee]), U.current = r, b.useEffect(() => {
    var X, ie;
    O && k && ((X = W.current) == null || X.dispose(), W.current = (ie = N.current) == null ? void 0 : ie.onDidChangeModelContent((j) => {
      q.current || k(N.current.getValue(), j);
    }));
  }, [O, k]), b.useEffect(() => {
    if (O) {
      let X = D.current.editor.onDidChangeMarkers((ie) => {
        var j;
        let le = (j = N.current.getModel()) == null ? void 0 : j.uri;
        if (le && ie.find((re) => re.path === le.path)) {
          let re = D.current.editor.getModelMarkers({ resource: le });
          E == null || E(re);
        }
      });
      return () => {
        X == null || X.dispose();
      };
    }
    return () => {
    };
  }, [O, E]);
  function A() {
    var X, ie;
    (X = W.current) == null || X.dispose(), m ? f && Vh.set(i, N.current.saveViewState()) : (ie = N.current.getModel()) == null || ie.dispose(), N.current.dispose();
  }
  return P.createElement(UV, { width: h, height: g, isEditorReady: O, loading: s, _ref: H, className: v, wrapperProps: S });
}
var n3e = t3e, r3e = b.memo(n3e);
const o3e = Ee(() => ({
  monacoEditor: {
    minHeight: "300px"
  }
}));
function i3e(e, t, n) {
  t.languages.json.jsonDefaults.setDiagnosticsOptions({
    validate: !0,
    schemas: [
      {
        uri: "https://json.schemastore.org/aiconfig-1.0",
        fileMatch: ["*"],
        // schema: {
        //     $ref: "#/definitions/PromptInput",
        // }
        // TODO: Figure out how to reference PromptInput definition from the uri schema
        // Getting the following error:
        // $ref '/definitions/PromptInput' in 'https://json.schemastore.org/aiconfig-1.0' can not be resolved.(768)
        schema: n
      }
    ],
    enableSchemaRequest: !0
  });
}
const a3e = b.memo(function({
  content: e,
  onChangeContent: t,
  schema: n
}) {
  const r = Yn(), { classes: o } = o3e();
  return /* @__PURE__ */ $.jsx(
    r3e,
    {
      defaultLanguage: "json",
      value: JSON.stringify(e, null, 2),
      onChange: (i) => {
        if (i)
          try {
            const a = JSON.parse(i);
            t(a);
          } catch {
            return;
          }
      },
      theme: r.colorScheme === "dark" ? "vs-dark" : void 0,
      className: o.monacoEditor,
      options: {
        lineNumbers: !1,
        minimap: { enabled: !1 },
        wordWrap: "on"
      },
      onMount: (i, a) => {
        n && i3e(i, a, n);
      }
    }
  );
}), Ki = b.memo(function({
  content: e,
  onChange: t,
  schema: n
}) {
  const { readOnly: r } = b.useContext(kn);
  return !t || r ? /* @__PURE__ */ $.jsx(sf, { language: "json", styles: { code: { textWrap: "pretty" } }, children: JSON.stringify(e, null, 2) }) : /* @__PURE__ */ $.jsx(a3e, { content: e, onChangeContent: t, schema: n });
});
function ri(e) {
  const { propertyName: t, propertyDescription: n } = e;
  return n != null && n.trim() !== "" ? /* @__PURE__ */ $.jsxs(As, { spacing: "xs", children: [
    /* @__PURE__ */ $.jsx(Ft, { size: "md", children: t }),
    /* @__PURE__ */ $.jsx(fr, { label: n, multiline: !0, maw: 400, children: /* @__PURE__ */ $.jsx(jn, { children: /* @__PURE__ */ $.jsx(OW, { size: 16 }) }) })
  ] }) : /* @__PURE__ */ $.jsx(Ft, { size: "md", children: t });
}
function xd({
  propertyName: e,
  property: t,
  isRequired: n = !1,
  initialValue: r = null,
  setValue: o
}) {
  const { readOnly: i } = b.useContext(kn), a = t.type, l = t.default, s = t.description, [c, p] = b.useState(
    r ?? l
  );
  let f;
  const m = b.useCallback(
    (x) => {
      const k = typeof x == "function" ? x(c) : x;
      e != null && e.trim() !== "" ? o((E) => ({
        ...E && typeof E == "object" ? E : {},
        [e]: k
      })) : o(k), p(k);
    },
    [e, c, o]
  ), h = b.useRef(
    Array.isArray(c) ? new Map(c.map((x) => [Lr.uniqueId(), x])) : /* @__PURE__ */ new Map()
  ), [g, v] = b.useState(
    () => Array.from(h.current, ([x, k]) => /* @__PURE__ */ $.jsxs(As, { children: [
      /* @__PURE__ */ $.jsx(
        xd,
        {
          propertyName: "",
          property: t.items,
          initialValue: k,
          setValue: (E) => {
            h.current.set(x, E), m(Array.from(h.current.values()));
          }
        }
      ),
      /* @__PURE__ */ $.jsx(jn, { onClick: () => S(x), children: /* @__PURE__ */ $.jsx(vp, { size: 16 }) })
    ] }, x))
  ), S = b.useCallback(
    async (x) => {
      v(
        (k) => k.filter((E) => E.key !== x)
      ), h.current.delete(x), m(Array.from(h.current.values()));
    },
    [m]
  ), w = b.useCallback(async () => {
    const x = Lr.uniqueId();
    v((k) => [
      ...k,
      /* @__PURE__ */ $.jsxs(As, { children: [
        /* @__PURE__ */ $.jsx(
          xd,
          {
            propertyName: "",
            property: t.items,
            setValue: (E) => {
              h.current.set(x, E), m(Array.from(h.current.values()));
            }
          }
        ),
        /* @__PURE__ */ $.jsx(jn, { onClick: () => S(x), children: /* @__PURE__ */ $.jsx(vp, { size: 16 }) })
      ] }, x)
    ]);
  }, [t.items, S, m]);
  switch (a) {
    case "string": {
      t.enum != null ? f = /* @__PURE__ */ $.jsx(
        NP,
        {
          label: /* @__PURE__ */ $.jsx(
            ri,
            {
              propertyName: e,
              propertyDescription: s
            }
          ),
          filter: (x, k) => {
            const E = k.value.toLocaleLowerCase(), O = x.toLocaleLowerCase().trim();
            return t.enum && t.enum.some((C) => C === O) ? !0 : E.includes(O);
          },
          required: n,
          placeholder: c ?? "select",
          data: t.enum,
          value: c ?? "",
          onChange: m,
          disabled: i
        }
      ) : f = /* @__PURE__ */ $.jsx(
        Bl,
        {
          label: /* @__PURE__ */ $.jsx(
            ri,
            {
              propertyName: e,
              propertyDescription: s
            }
          ),
          placeholder: c,
          required: n,
          withAsterisk: n,
          radius: "md",
          value: c ?? "",
          onChange: (x) => m(x.currentTarget.value),
          autosize: !0,
          maxRows: 20,
          disabled: i
        }
      );
      break;
    }
    case "text": {
      f = /* @__PURE__ */ $.jsx(
        Bl,
        {
          label: /* @__PURE__ */ $.jsx(
            ri,
            {
              propertyName: e,
              propertyDescription: s
            }
          ),
          placeholder: c,
          required: n,
          withAsterisk: n,
          radius: "md",
          value: c ?? "",
          onChange: (x) => m(x.currentTarget.value),
          autosize: !0,
          disabled: i
        }
      );
      break;
    }
    case "number": {
      t.minimum != null && t.maximum != null ? f = /* @__PURE__ */ $.jsxs(ui, { children: [
        /* @__PURE__ */ $.jsx(
          ri,
          {
            propertyName: e,
            propertyDescription: s
          }
        ),
        /* @__PURE__ */ $.jsx(
          ZO,
          {
            defaultValue: c ?? t.minimum,
            min: t.minimum,
            max: t.maximum,
            label: (x) => x.toFixed(1),
            step: t.step ?? 0.1,
            styles: { markLabel: { display: "none" } },
            value: c,
            onChange: m,
            style: { padding: "0 0.5em" },
            disabled: i
          }
        )
      ] }) : f = /* @__PURE__ */ $.jsx(
        XO,
        {
          label: /* @__PURE__ */ $.jsx(
            ri,
            {
              propertyName: e,
              propertyDescription: s
            }
          ),
          defaultValue: c,
          min: t.minimum,
          max: t.maximum,
          step: t.step ?? 0.05,
          precision: t.precision ?? 2,
          required: n,
          withAsterisk: n,
          radius: "md",
          value: c ?? "",
          onChange: (x) => m(x),
          disabled: i
        }
      );
      break;
    }
    case "integer": {
      t.minimum != null && t.maximum != null ? f = /* @__PURE__ */ $.jsxs(ui, { children: [
        /* @__PURE__ */ $.jsx(
          ri,
          {
            propertyName: e,
            propertyDescription: s
          }
        ),
        /* @__PURE__ */ $.jsx(
          ZO,
          {
            defaultValue: c ?? t.minimum,
            min: t.minimum,
            max: t.maximum,
            label: (x) => x.toFixed(0),
            step: t.step ?? 1,
            styles: { markLabel: { display: "none" } },
            value: c,
            onChange: m,
            style: { padding: "0 0.5em" },
            disabled: i
          }
        )
      ] }) : f = /* @__PURE__ */ $.jsx(
        XO,
        {
          label: /* @__PURE__ */ $.jsx(
            ri,
            {
              propertyName: e,
              propertyDescription: s
            }
          ),
          defaultValue: c,
          min: t.minimum,
          max: t.maximum,
          step: t.step ?? 1,
          required: n,
          withAsterisk: n,
          radius: "md",
          value: c ?? "",
          onChange: (x) => m(x),
          disabled: i
        }
      );
      break;
    }
    case "boolean": {
      f = /* @__PURE__ */ $.jsx(
        AP,
        {
          label: /* @__PURE__ */ $.jsx(
            ri,
            {
              propertyName: e,
              propertyDescription: s
            }
          ),
          checked: c,
          onChange: (x) => m(x.currentTarget.checked),
          disabled: i
        }
      );
      break;
    }
    case "array": {
      f = /* @__PURE__ */ $.jsxs($.Fragment, { children: [
        /* @__PURE__ */ $.jsxs(As, { align: "end", children: [
          /* @__PURE__ */ $.jsx(Ft, { size: "md", children: e }),
          s != null && s.trim() !== "" ? /* @__PURE__ */ $.jsx(fr, { label: s, multiline: !0, children: /* @__PURE__ */ $.jsx(jn, { children: /* @__PURE__ */ $.jsx(OW, { size: 16 }) }) }) : null,
          /* @__PURE__ */ $.jsx(jn, { onClick: () => w(), children: /* @__PURE__ */ $.jsx(MP, { size: 16 }) })
        ] }),
        /* @__PURE__ */ $.jsx(ui, { children: g })
      ] });
      break;
    }
    case "object": {
      const x = new Set(t.required ?? []), k = t.properties, E = [];
      for (const O in k) {
        const C = x.has(O), R = k[O];
        R.exclude !== !0 && E.push(
          /* @__PURE__ */ $.jsx(
            xd,
            {
              isRequired: C,
              property: R,
              propertyName: O,
              initialValue: r == null ? void 0 : r[O],
              setValue: m
            },
            O
          )
        );
      }
      E.length > 0 ? f = /* @__PURE__ */ $.jsxs($.Fragment, { children: [
        e != null && e.trim() !== "" ? /* @__PURE__ */ $.jsx(Ft, { children: e }) : /* @__PURE__ */ $.jsx($.Fragment, {}),
        /* @__PURE__ */ $.jsx(ui, { children: E })
      ] }) : f = /* @__PURE__ */ $.jsxs(ui, { children: [
        /* @__PURE__ */ $.jsx(
          ri,
          {
            propertyName: e,
            propertyDescription: s
          }
        ),
        /* @__PURE__ */ $.jsx("div", { style: { minWidth: "350px" }, children: /* @__PURE__ */ $.jsx(
          Ki,
          {
            content: r,
            onChange: m
          }
        ) })
      ] });
      break;
    }
    case "select": {
      t.values != null && (f = /* @__PURE__ */ $.jsx(
        HH,
        {
          label: /* @__PURE__ */ $.jsx(
            ri,
            {
              propertyName: e,
              propertyDescription: s
            }
          ),
          data: t.values,
          value: c,
          onChange: (x) => {
            m(x);
          },
          defaultValue: t.default,
          disabled: i
        }
      ));
      break;
    }
    case "union": {
      f = /* @__PURE__ */ $.jsxs(ui, { children: [
        /* @__PURE__ */ $.jsx(
          ri,
          {
            propertyName: e,
            propertyDescription: s
          }
        ),
        /* @__PURE__ */ $.jsx(
          Q1e,
          {
            property: t,
            isRequired: n,
            propertyName: e,
            initialValue: r,
            setValue: m,
            renderProperty: (x) => /* @__PURE__ */ $.jsx(xd, { ...x }),
            disabled: i
          }
        )
      ] });
      break;
    }
    default:
      console.warn(
        `Warning: Unable to render property '${e}' of type '${a}'.`
      );
  }
  return f ?? null;
}
const l3e = b.memo(function({
  schema: e,
  settings: t,
  onUpdateModelSettings: n
}) {
  const r = b.useMemo(
    () => Lr.debounce(
      (i) => n(i),
      250
    ),
    [n]
  ), o = (i) => {
    const a = typeof i == "function" ? i(t) : i;
    r(a);
  };
  return /* @__PURE__ */ $.jsx(
    xd,
    {
      propertyName: "",
      property: e,
      isRequired: !1,
      initialValue: t,
      setValue: o
    }
  );
});
function Ax({
  isRawJSON: e,
  setIsRawJSON: t
}) {
  const { readOnly: n } = b.useContext(kn), r = n ? "View JSON" : "Toggle JSON Editor";
  return /* @__PURE__ */ $.jsx(fr, { label: r, withArrow: !0, children: /* @__PURE__ */ $.jsx(jn, { onClick: () => t(!e), children: e ? /* @__PURE__ */ $.jsx(_W, { size: "1rem" }) : /* @__PURE__ */ $.jsx(FP, { size: "1rem" }) }) });
}
const VV = b.createContext(null), G_ = {
  didCatch: !1,
  error: null
};
class qV extends b.Component {
  constructor(t) {
    super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = G_;
  }
  static getDerivedStateFromError(t) {
    return {
      didCatch: !0,
      error: t
    };
  }
  resetErrorBoundary() {
    const {
      error: t
    } = this.state;
    if (t !== null) {
      for (var n, r, o = arguments.length, i = new Array(o), a = 0; a < o; a++)
        i[a] = arguments[a];
      (n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
        args: i,
        reason: "imperative-api"
      }), this.setState(G_);
    }
  }
  componentDidCatch(t, n) {
    var r, o;
    (r = (o = this.props).onError) === null || r === void 0 || r.call(o, t, n);
  }
  componentDidUpdate(t, n) {
    const {
      didCatch: r
    } = this.state, {
      resetKeys: o
    } = this.props;
    if (r && n.error !== null && s3e(t.resetKeys, o)) {
      var i, a;
      (i = (a = this.props).onReset) === null || i === void 0 || i.call(a, {
        next: o,
        prev: t.resetKeys,
        reason: "keys"
      }), this.setState(G_);
    }
  }
  render() {
    const {
      children: t,
      fallbackRender: n,
      FallbackComponent: r,
      fallback: o
    } = this.props, {
      didCatch: i,
      error: a
    } = this.state;
    let l = t;
    if (i) {
      const s = {
        error: a,
        resetErrorBoundary: this.resetErrorBoundary
      };
      if (typeof n == "function")
        l = n(s);
      else if (r)
        l = b.createElement(r, s);
      else if (o === null || b.isValidElement(o))
        l = o;
      else
        throw a;
    }
    return b.createElement(VV.Provider, {
      value: {
        didCatch: i,
        error: a,
        resetErrorBoundary: this.resetErrorBoundary
      }
    }, l);
  }
}
function s3e() {
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
}
function u3e(e) {
  if (e == null || typeof e.didCatch != "boolean" || typeof e.resetErrorBoundary != "function")
    throw new Error("ErrorBoundaryContext not found");
}
function GV() {
  const e = b.useContext(VV);
  u3e(e);
  const [t, n] = b.useState({
    error: null,
    hasError: !1
  }), r = b.useMemo(() => ({
    resetBoundary: () => {
      e.resetErrorBoundary(), n({
        error: null,
        hasError: !1
      });
    },
    showBoundary: (o) => n({
      error: o,
      hasError: !0
    })
  }), [e.resetErrorBoundary]);
  if (t.hasError)
    throw t.error;
  return r;
}
const c3e = Ee(() => ({
  settingsContainer: {
    overflow: "auto",
    paddingTop: "0.5em",
    width: "100%"
  }
}));
function f3e({
  settings: e,
  toggleJSONEditor: t
}) {
  const { resetBoundary: n } = GV();
  return /* @__PURE__ */ $.jsxs(jt, { direction: "column", children: [
    /* @__PURE__ */ $.jsxs(Ft, { color: "red", size: "sm", children: [
      /* @__PURE__ */ $.jsx(jt, { justify: "flex-end", children: /* @__PURE__ */ $.jsx(
        Ax,
        {
          isRawJSON: !1,
          setIsRawJSON: () => {
            n(), t();
          }
        }
      ) }),
      "Invalid settings format for model. Toggle JSON editor to update. Set to",
      " {}",
      " in JSON editor and toggle back to reset."
    ] }),
    /* @__PURE__ */ $.jsx(Ki, { content: e })
  ] });
}
const d3e = b.memo(function({
  settings: e,
  schema: t,
  onUpdateModelSettings: n
}) {
  const { classes: r } = c3e(), [o, i] = b.useState(t == null), a = /* @__PURE__ */ $.jsx(jt, { justify: "flex-end", children: /* @__PURE__ */ $.jsx(
    Ax,
    {
      isRawJSON: o,
      setIsRawJSON: i
    }
  ) });
  return /* @__PURE__ */ $.jsx(jt, { direction: "column", className: r.settingsContainer, children: o || !t ? /* @__PURE__ */ $.jsxs($.Fragment, { children: [
    t && a,
    /* @__PURE__ */ $.jsx(
      Ki,
      {
        content: e,
        onChange: (l) => n(l)
      }
    )
  ] }) : /* @__PURE__ */ $.jsxs(
    qV,
    {
      fallbackRender: () => /* @__PURE__ */ $.jsx(
        f3e,
        {
          settings: e,
          toggleJSONEditor: () => i(!0)
        }
      ),
      children: [
        a,
        /* @__PURE__ */ $.jsx(
          l3e,
          {
            settings: e,
            schema: t,
            onUpdateModelSettings: n
          }
        )
      ]
    }
  ) });
});
function p3e(e) {
  return null;
}
function m3e(e) {
  return null;
}
const h3e = b.memo(function({ prompt: e, schema: t }) {
  return t ? /* @__PURE__ */ $.jsx(m3e, { prompt: e, schema: t }) : /* @__PURE__ */ $.jsx(p3e, { prompt: e });
});
function g3e(e) {
  var t, n, r;
  if (typeof ((t = e.metadata) == null ? void 0 : t.model) != "string")
    return (r = (n = e.metadata) == null ? void 0 : n.model) == null ? void 0 : r.settings;
}
function y3e(e) {
  var t;
  return (t = e.metadata) == null ? void 0 : t.parameters;
}
const v3e = 84, b3e = 300, w3e = 46, x3e = b.memo(function({
  prompt: e,
  promptSchema: t,
  onUpdateModelSettings: n,
  onUpdateParameters: r
}) {
  const [o, i] = b.useState(!1), a = t == null ? void 0 : t.model_settings, l = t == null ? void 0 : t.prompt_metadata, s = dq.get(e._ui.id);
  let c;
  return s && (c = Math.max(
    s - v3e,
    b3e
  )), /* @__PURE__ */ $.jsx(jt, { direction: "column", justify: "space-between", children: o ? /* @__PURE__ */ $.jsxs(Js, { miw: "400px", children: [
    /* @__PURE__ */ $.jsx(jn, { size: "sm", onClick: () => i(!1), mt: "0.5em", children: /* @__PURE__ */ $.jsx(EA, {}) }),
    /* @__PURE__ */ $.jsxs(zr, { defaultValue: "settings", mb: "1em", children: [
      /* @__PURE__ */ $.jsxs(zr.List, { children: [
        /* @__PURE__ */ $.jsx(zr.Tab, { value: "settings", children: "Settings" }),
        wA(e) && /* @__PURE__ */ $.jsx(zr.Tab, { value: "parameters", children: "Local Parameters" })
      ] }),
      /* @__PURE__ */ $.jsx(zr.Panel, { value: "settings", className: "actionTabsPanel", children: /* @__PURE__ */ $.jsxs(
        Dp,
        {
          h: c,
          type: "auto",
          style: { overflowY: "auto" },
          children: [
            /* @__PURE__ */ $.jsx(
              d3e,
              {
                settings: g3e(e),
                schema: a,
                onUpdateModelSettings: n
              }
            ),
            /* @__PURE__ */ $.jsx(
              h3e,
              {
                prompt: e,
                schema: l
              }
            )
          ]
        }
      ) }),
      wA(e) && /* @__PURE__ */ $.jsx(zr.Panel, { value: "parameters", className: "actionTabsPanel", children: /* @__PURE__ */ $.jsx(
        CW,
        {
          initialValue: y3e(e),
          onUpdateParameters: r,
          maxHeight: c ? c - w3e : void 0
        }
      ) })
    ] })
  ] }) : /* @__PURE__ */ $.jsx(
    jt,
    {
      className: "promptActionBarClosed",
      direction: "column",
      justify: "space-between",
      h: "100%",
      children: /* @__PURE__ */ $.jsx(jt, { direction: "row", justify: "center", mt: "0.5em", children: /* @__PURE__ */ $.jsx(jn, { size: "sm", onClick: () => i(!0), children: /* @__PURE__ */ $.jsx(EA, {}) }) })
    }
  ) });
}), S3e = b.memo(function({ schema: e, data: t, onChangeData: n }) {
  const { readOnly: r } = b.useContext(kn);
  switch (e.type) {
    case "string": {
      const o = t || "";
      return r ? /* @__PURE__ */ $.jsx("div", { style: { padding: "0.5em" }, children: /* @__PURE__ */ $.jsx(Cx, { maxHeight: 200, showLabel: "Show more", hideLabel: "Hide", initialState: !1, transitionDuration: 300, children: /* @__PURE__ */ $.jsx(Vs, { content: o }) }) }) : /* @__PURE__ */ $.jsx(
        Bl,
        {
          value: o,
          onChange: (i) => n(i.target.value),
          disabled: r,
          placeholder: r ? "" : "Type a prompt"
        }
      );
    }
    default:
      return null;
  }
}), k3e = b.memo(function(e) {
  return null;
}), cE = b.memo(function({ mimeType: e, content: t }) {
  switch ((e ?? "text/plain").split("/", 1)[0]) {
    case "image":
      return /* @__PURE__ */ $.jsx(LU, { alt: "Attachment image", src: t, maw: 300 });
    case "audio":
      return /* @__PURE__ */ $.jsx("audio", { controls: !0, children: /* @__PURE__ */ $.jsx("source", { src: t, type: e }) });
    default:
      return /* @__PURE__ */ $.jsx("span", { children: t });
  }
}), _3e = b.memo(function({
  schema: e,
  attachment: t,
  onUpdateMetadata: n,
  onRemoveAttachment: r,
  onEditAttachment: o
}) {
  var i;
  const { readOnly: a } = b.useContext(kn);
  return /* @__PURE__ */ $.jsxs(Js, { display: "flex", children: [
    /* @__PURE__ */ $.jsxs(jt, { direction: "column", children: [
      o && !a && /* @__PURE__ */ $.jsx(jn, { onClick: o, children: /* @__PURE__ */ $.jsx(fr, { label: "Edit attachment", children: /* @__PURE__ */ $.jsx(pCe, { size: 16 }) }) }),
      r && !a && /* @__PURE__ */ $.jsx(jn, { onClick: r, children: /* @__PURE__ */ $.jsx(fr, { label: "Remove attachment", children: /* @__PURE__ */ $.jsx(vp, { size: 16, color: "red" }) }) })
    ] }),
    /* @__PURE__ */ $.jsx(
      cE,
      {
        mimeType: t.mime_type,
        content: t.data.value
      }
    ),
    ((i = e.items.properties) == null ? void 0 : i.metadata) && /* @__PURE__ */ $.jsx(
      k3e,
      {
        schema: e.items.properties.metadata,
        attachment: t,
        onUpdateMetadata: n
      }
    )
  ] });
});
var O3e = /* @__PURE__ */ new Map([
  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
  ["aac", "audio/aac"],
  ["abw", "application/x-abiword"],
  ["arc", "application/x-freearc"],
  ["avif", "image/avif"],
  ["avi", "video/x-msvideo"],
  ["azw", "application/vnd.amazon.ebook"],
  ["bin", "application/octet-stream"],
  ["bmp", "image/bmp"],
  ["bz", "application/x-bzip"],
  ["bz2", "application/x-bzip2"],
  ["cda", "application/x-cdf"],
  ["csh", "application/x-csh"],
  ["css", "text/css"],
  ["csv", "text/csv"],
  ["doc", "application/msword"],
  ["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
  ["eot", "application/vnd.ms-fontobject"],
  ["epub", "application/epub+zip"],
  ["gz", "application/gzip"],
  ["gif", "image/gif"],
  ["heic", "image/heic"],
  ["heif", "image/heif"],
  ["htm", "text/html"],
  ["html", "text/html"],
  ["ico", "image/vnd.microsoft.icon"],
  ["ics", "text/calendar"],
  ["jar", "application/java-archive"],
  ["jpeg", "image/jpeg"],
  ["jpg", "image/jpeg"],
  ["js", "text/javascript"],
  ["json", "application/json"],
  ["jsonld", "application/ld+json"],
  ["mid", "audio/midi"],
  ["midi", "audio/midi"],
  ["mjs", "text/javascript"],
  ["mp3", "audio/mpeg"],
  ["mp4", "video/mp4"],
  ["mpeg", "video/mpeg"],
  ["mpkg", "application/vnd.apple.installer+xml"],
  ["odp", "application/vnd.oasis.opendocument.presentation"],
  ["ods", "application/vnd.oasis.opendocument.spreadsheet"],
  ["odt", "application/vnd.oasis.opendocument.text"],
  ["oga", "audio/ogg"],
  ["ogv", "video/ogg"],
  ["ogx", "application/ogg"],
  ["opus", "audio/opus"],
  ["otf", "font/otf"],
  ["png", "image/png"],
  ["pdf", "application/pdf"],
  ["php", "application/x-httpd-php"],
  ["ppt", "application/vnd.ms-powerpoint"],
  ["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
  ["rar", "application/vnd.rar"],
  ["rtf", "application/rtf"],
  ["sh", "application/x-sh"],
  ["svg", "image/svg+xml"],
  ["swf", "application/x-shockwave-flash"],
  ["tar", "application/x-tar"],
  ["tif", "image/tiff"],
  ["tiff", "image/tiff"],
  ["ts", "video/mp2t"],
  ["ttf", "font/ttf"],
  ["txt", "text/plain"],
  ["vsd", "application/vnd.visio"],
  ["wav", "audio/wav"],
  ["weba", "audio/webm"],
  ["webm", "video/webm"],
  ["webp", "image/webp"],
  ["woff", "font/woff"],
  ["woff2", "font/woff2"],
  ["xhtml", "application/xhtml+xml"],
  ["xls", "application/vnd.ms-excel"],
  ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
  ["xml", "application/xml"],
  ["xul", "application/vnd.mozilla.xul+xml"],
  ["zip", "application/zip"],
  ["7z", "application/x-7z-compressed"],
  // Others
  ["mkv", "video/x-matroska"],
  ["mov", "video/quicktime"],
  ["msg", "application/vnd.ms-outlook"]
]);
function Vp(e, t) {
  var n = E3e(e);
  if (typeof n.path != "string") {
    var r = e.webkitRelativePath;
    Object.defineProperty(n, "path", {
      value: typeof t == "string" ? t : typeof r == "string" && r.length > 0 ? r : e.name,
      writable: !1,
      configurable: !1,
      enumerable: !0
    });
  }
  return n;
}
function E3e(e) {
  var t = e.name, n = t && t.lastIndexOf(".") !== -1;
  if (n && !e.type) {
    var r = t.split(".").pop().toLowerCase(), o = O3e.get(r);
    o && Object.defineProperty(e, "type", {
      value: o,
      writable: !1,
      configurable: !1,
      enumerable: !0
    });
  }
  return e;
}
var C3e = [
  // Thumbnail cache files for macOS and Windows
  ".DS_Store",
  "Thumbs.db"
  // Windows
];
function P3e(e) {
  return Xc(this, void 0, void 0, function() {
    return Zc(this, function(t) {
      return Hb(e) && R3e(e.dataTransfer) ? [2, $3e(e.dataTransfer, e.type)] : T3e(e) ? [2, j3e(e)] : Array.isArray(e) && e.every(function(n) {
        return "getFile" in n && typeof n.getFile == "function";
      }) ? [2, N3e(e)] : [2, []];
    });
  });
}
function R3e(e) {
  return Hb(e);
}
function T3e(e) {
  return Hb(e) && Hb(e.target);
}
function Hb(e) {
  return typeof e == "object" && e !== null;
}
function j3e(e) {
  return fE(e.target.files).map(function(t) {
    return Vp(t);
  });
}
function N3e(e) {
  return Xc(this, void 0, void 0, function() {
    var t;
    return Zc(this, function(n) {
      switch (n.label) {
        case 0:
          return [4, Promise.all(e.map(function(r) {
            return r.getFile();
          }))];
        case 1:
          return t = n.sent(), [2, t.map(function(r) {
            return Vp(r);
          })];
      }
    });
  });
}
function $3e(e, t) {
  return Xc(this, void 0, void 0, function() {
    var n, r;
    return Zc(this, function(o) {
      switch (o.label) {
        case 0:
          return e.items ? (n = fE(e.items).filter(function(i) {
            return i.kind === "file";
          }), t !== "drop" ? [2, n] : [4, Promise.all(n.map(I3e))]) : [3, 2];
        case 1:
          return r = o.sent(), [2, zz(KV(r))];
        case 2:
          return [2, zz(fE(e.files).map(function(i) {
            return Vp(i);
          }))];
      }
    });
  });
}
function zz(e) {
  return e.filter(function(t) {
    return C3e.indexOf(t.name) === -1;
  });
}
function fE(e) {
  if (e === null)
    return [];
  for (var t = [], n = 0; n < e.length; n++) {
    var r = e[n];
    t.push(r);
  }
  return t;
}
function I3e(e) {
  if (typeof e.webkitGetAsEntry != "function")
    return Lz(e);
  var t = e.webkitGetAsEntry();
  return t && t.isDirectory ? YV(t) : Lz(e);
}
function KV(e) {
  return e.reduce(function(t, n) {
    return NO(NO([], NN(t), !1), NN(Array.isArray(n) ? KV(n) : [n]), !1);
  }, []);
}
function Lz(e) {
  var t = e.getAsFile();
  if (!t)
    return Promise.reject("".concat(e, " is not a File"));
  var n = Vp(t);
  return Promise.resolve(n);
}
function A3e(e) {
  return Xc(this, void 0, void 0, function() {
    return Zc(this, function(t) {
      return [2, e.isDirectory ? YV(e) : z3e(e)];
    });
  });
}
function YV(e) {
  var t = e.createReader();
  return new Promise(function(n, r) {
    var o = [];
    function i() {
      var a = this;
      t.readEntries(function(l) {
        return Xc(a, void 0, void 0, function() {
          var s, c, p;
          return Zc(this, function(f) {
            switch (f.label) {
              case 0:
                if (l.length)
                  return [3, 5];
                f.label = 1;
              case 1:
                return f.trys.push([1, 3, , 4]), [4, Promise.all(o)];
              case 2:
                return s = f.sent(), n(s), [3, 4];
              case 3:
                return c = f.sent(), r(c), [3, 4];
              case 4:
                return [3, 6];
              case 5:
                p = Promise.all(l.map(A3e)), o.push(p), i(), f.label = 6;
              case 6:
                return [
                  2
                  /*return*/
                ];
            }
          });
        });
      }, function(l) {
        r(l);
      });
    }
    i();
  });
}
function z3e(e) {
  return Xc(this, void 0, void 0, function() {
    return Zc(this, function(t) {
      return [2, new Promise(function(n, r) {
        e.file(function(o) {
          var i = Vp(o, e.fullPath);
          n(i);
        }, function(o) {
          r(o);
        });
      })];
    });
  });
}
var L3e = function(e, t) {
  if (e && t) {
    var n = Array.isArray(t) ? t : t.split(","), r = e.name || "", o = (e.type || "").toLowerCase(), i = o.replace(/\/.*$/, "");
    return n.some(function(a) {
      var l = a.trim().toLowerCase();
      return l.charAt(0) === "." ? r.toLowerCase().endsWith(l) : l.endsWith("/*") ? i === l.replace(/\/.*$/, "") : o === l;
    });
  }
  return !0;
};
function Dz(e) {
  return M3e(e) || F3e(e) || ZV(e) || D3e();
}
function D3e() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function F3e(e) {
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
    return Array.from(e);
}
function M3e(e) {
  if (Array.isArray(e))
    return dE(e);
}
function Fz(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    t && (r = r.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function Mz(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Fz(Object(n), !0).forEach(function(r) {
      XV(e, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fz(Object(n)).forEach(function(r) {
      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return e;
}
function XV(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function wp(e, t) {
  return H3e(e) || U3e(e, t) || ZV(e, t) || B3e();
}
function B3e() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function ZV(e, t) {
  if (e) {
    if (typeof e == "string")
      return dE(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
      return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
      return dE(e, t);
  }
}
function dE(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, r = new Array(t); n < t; n++)
    r[n] = e[n];
  return r;
}
function U3e(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var r = [], o = !0, i = !1, a, l;
    try {
      for (n = n.call(e); !(o = (a = n.next()).done) && (r.push(a.value), !(t && r.length === t)); o = !0)
        ;
    } catch (s) {
      i = !0, l = s;
    } finally {
      try {
        !o && n.return != null && n.return();
      } finally {
        if (i)
          throw l;
      }
    }
    return r;
  }
}
function H3e(e) {
  if (Array.isArray(e))
    return e;
}
var W3e = "file-invalid-type", V3e = "file-too-large", q3e = "file-too-small", G3e = "too-many-files", K3e = function(e) {
  e = Array.isArray(e) && e.length === 1 ? e[0] : e;
  var t = Array.isArray(e) ? "one of ".concat(e.join(", ")) : e;
  return {
    code: W3e,
    message: "File type must be ".concat(t)
  };
}, Bz = function(e) {
  return {
    code: V3e,
    message: "File is larger than ".concat(e, " ").concat(e === 1 ? "byte" : "bytes")
  };
}, Uz = function(e) {
  return {
    code: q3e,
    message: "File is smaller than ".concat(e, " ").concat(e === 1 ? "byte" : "bytes")
  };
}, Y3e = {
  code: G3e,
  message: "Too many files"
};
function QV(e, t) {
  var n = e.type === "application/x-moz-file" || L3e(e, t);
  return [n, n ? null : K3e(t)];
}
function JV(e, t, n) {
  if (Ss(e.size))
    if (Ss(t) && Ss(n)) {
      if (e.size > n)
        return [!1, Bz(n)];
      if (e.size < t)
        return [!1, Uz(t)];
    } else {
      if (Ss(t) && e.size < t)
        return [!1, Uz(t)];
      if (Ss(n) && e.size > n)
        return [!1, Bz(n)];
    }
  return [!0, null];
}
function Ss(e) {
  return e != null;
}
function X3e(e) {
  var t = e.files, n = e.accept, r = e.minSize, o = e.maxSize, i = e.multiple, a = e.maxFiles, l = e.validator;
  return !i && t.length > 1 || i && a >= 1 && t.length > a ? !1 : t.every(function(s) {
    var c = QV(s, n), p = wp(c, 1), f = p[0], m = JV(s, r, o), h = wp(m, 1), g = h[0], v = l ? l(s) : null;
    return f && g && !v;
  });
}
function Wb(e) {
  return typeof e.isPropagationStopped == "function" ? e.isPropagationStopped() : typeof e.cancelBubble < "u" ? e.cancelBubble : !1;
}
function qh(e) {
  return e.dataTransfer ? Array.prototype.some.call(e.dataTransfer.types, function(t) {
    return t === "Files" || t === "application/x-moz-file";
  }) : !!e.target && !!e.target.files;
}
function Hz(e) {
  e.preventDefault();
}
function Z3e(e) {
  return e.indexOf("MSIE") !== -1 || e.indexOf("Trident/") !== -1;
}
function Q3e(e) {
  return e.indexOf("Edge/") !== -1;
}
function J3e() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
  return Z3e(e) || Q3e(e);
}
function Oi() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  return function(r) {
    for (var o = arguments.length, i = new Array(o > 1 ? o - 1 : 0), a = 1; a < o; a++)
      i[a - 1] = arguments[a];
    return t.some(function(l) {
      return !Wb(r) && l && l.apply(void 0, [r].concat(i)), Wb(r);
    });
  };
}
function e$e() {
  return "showOpenFilePicker" in window;
}
function t$e(e) {
  if (Ss(e)) {
    var t = Object.entries(e).filter(function(n) {
      var r = wp(n, 2), o = r[0], i = r[1], a = !0;
      return eq(o) || (console.warn('Skipped "'.concat(o, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), a = !1), (!Array.isArray(i) || !i.every(tq)) && (console.warn('Skipped "'.concat(o, '" because an invalid file extension was provided.')), a = !1), a;
    }).reduce(function(n, r) {
      var o = wp(r, 2), i = o[0], a = o[1];
      return Mz(Mz({}, n), {}, XV({}, i, a));
    }, {});
    return [{
      // description is required due to https://crbug.com/1264708
      description: "Files",
      accept: t
    }];
  }
  return e;
}
function n$e(e) {
  if (Ss(e))
    return Object.entries(e).reduce(function(t, n) {
      var r = wp(n, 2), o = r[0], i = r[1];
      return [].concat(Dz(t), [o], Dz(i));
    }, []).filter(function(t) {
      return eq(t) || tq(t);
    }).join(",");
}
function r$e(e) {
  return e instanceof DOMException && (e.name === "AbortError" || e.code === e.ABORT_ERR);
}
function o$e(e) {
  return e instanceof DOMException && (e.name === "SecurityError" || e.code === e.SECURITY_ERR);
}
function eq(e) {
  return e === "audio/*" || e === "video/*" || e === "image/*" || e === "text/*" || /\w+\/[-+.\w]+/g.test(e);
}
function tq(e) {
  return /^.*\.[\w]+$/.test(e);
}
var i$e = ["children"], a$e = ["open"], l$e = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], s$e = ["refKey", "onChange", "onClick"];
function u$e(e) {
  return d$e(e) || f$e(e) || nq(e) || c$e();
}
function c$e() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function f$e(e) {
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
    return Array.from(e);
}
function d$e(e) {
  if (Array.isArray(e))
    return pE(e);
}
function K_(e, t) {
  return h$e(e) || m$e(e, t) || nq(e, t) || p$e();
}
function p$e() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function nq(e, t) {
  if (e) {
    if (typeof e == "string")
      return pE(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set")
      return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
      return pE(e, t);
  }
}
function pE(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, r = new Array(t); n < t; n++)
    r[n] = e[n];
  return r;
}
function m$e(e, t) {
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
  if (n != null) {
    var r = [], o = !0, i = !1, a, l;
    try {
      for (n = n.call(e); !(o = (a = n.next()).done) && (r.push(a.value), !(t && r.length === t)); o = !0)
        ;
    } catch (s) {
      i = !0, l = s;
    } finally {
      try {
        !o && n.return != null && n.return();
      } finally {
        if (i)
          throw l;
      }
    }
    return r;
  }
}
function h$e(e) {
  if (Array.isArray(e))
    return e;
}
function Wz(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(e);
    t && (r = r.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), n.push.apply(n, r);
  }
  return n;
}
function nn(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? Wz(Object(n), !0).forEach(function(r) {
      mE(e, r, n[r]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Wz(Object(n)).forEach(function(r) {
      Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
    });
  }
  return e;
}
function mE(e, t, n) {
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function Vb(e, t) {
  if (e == null)
    return {};
  var n = g$e(e, t), r, o;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (o = 0; o < i.length; o++)
      r = i[o], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
  }
  return n;
}
function g$e(e, t) {
  if (e == null)
    return {};
  var n = {}, r = Object.keys(e), o, i;
  for (i = 0; i < r.length; i++)
    o = r[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
  return n;
}
var e2 = /* @__PURE__ */ b.forwardRef(function(e, t) {
  var n = e.children, r = Vb(e, i$e), o = oq(r), i = o.open, a = Vb(o, a$e);
  return b.useImperativeHandle(t, function() {
    return {
      open: i
    };
  }, [i]), /* @__PURE__ */ P.createElement(b.Fragment, null, n(nn(nn({}, a), {}, {
    open: i
  })));
});
e2.displayName = "Dropzone";
var rq = {
  disabled: !1,
  getFilesFromEvent: P3e,
  maxSize: 1 / 0,
  minSize: 0,
  multiple: !0,
  maxFiles: 0,
  preventDropOnDocument: !0,
  noClick: !1,
  noKeyboard: !1,
  noDrag: !1,
  noDragEventsBubbling: !1,
  validator: null,
  useFsAccessApi: !0,
  autoFocus: !1
};
e2.defaultProps = rq;
e2.propTypes = {
  /**
   * Render function that exposes the dropzone state and prop getter fns
   *
   * @param {object} params
   * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
   * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
   * @param {Function} params.open Open the native file selection dialog
   * @param {boolean} params.isFocused Dropzone area is in focus
   * @param {boolean} params.isFileDialogActive File dialog is opened
   * @param {boolean} params.isDragActive Active drag is in progress
   * @param {boolean} params.isDragAccept Dragged files are accepted
   * @param {boolean} params.isDragReject Some dragged files are rejected
   * @param {File[]} params.acceptedFiles Accepted files
   * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
   */
  children: Se.func,
  /**
   * Set accepted file types.
   * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
   * Keep in mind that mime type determination is not reliable across platforms. CSV files,
   * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
   * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
   */
  accept: Se.objectOf(Se.arrayOf(Se.string)),
  /**
   * Allow drag 'n' drop (or selection from the file dialog) of multiple files
   */
  multiple: Se.bool,
  /**
   * If false, allow dropped items to take over the current browser window
   */
  preventDropOnDocument: Se.bool,
  /**
   * If true, disables click to open the native file selection dialog
   */
  noClick: Se.bool,
  /**
   * If true, disables SPACE/ENTER to open the native file selection dialog.
   * Note that it also stops tracking the focus state.
   */
  noKeyboard: Se.bool,
  /**
   * If true, disables drag 'n' drop
   */
  noDrag: Se.bool,
  /**
   * If true, stops drag event propagation to parents
   */
  noDragEventsBubbling: Se.bool,
  /**
   * Minimum file size (in bytes)
   */
  minSize: Se.number,
  /**
   * Maximum file size (in bytes)
   */
  maxSize: Se.number,
  /**
   * Maximum accepted number of files
   * The default value is 0 which means there is no limitation to how many files are accepted.
   */
  maxFiles: Se.number,
  /**
   * Enable/disable the dropzone
   */
  disabled: Se.bool,
  /**
   * Use this to provide a custom file aggregator
   *
   * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
   */
  getFilesFromEvent: Se.func,
  /**
   * Cb for when closing the file dialog with no selection
   */
  onFileDialogCancel: Se.func,
  /**
   * Cb for when opening the file dialog
   */
  onFileDialogOpen: Se.func,
  /**
   * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
   * to open the file picker instead of using an `<input type="file">` click event.
   */
  useFsAccessApi: Se.bool,
  /**
   * Set to true to focus the root element on render
   */
  autoFocus: Se.bool,
  /**
   * Cb for when the `dragenter` event occurs.
   *
   * @param {DragEvent} event
   */
  onDragEnter: Se.func,
  /**
   * Cb for when the `dragleave` event occurs
   *
   * @param {DragEvent} event
   */
  onDragLeave: Se.func,
  /**
   * Cb for when the `dragover` event occurs
   *
   * @param {DragEvent} event
   */
  onDragOver: Se.func,
  /**
   * Cb for when the `drop` event occurs.
   * Note that this callback is invoked after the `getFilesFromEvent` callback is done.
   *
   * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
   * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
   * If `multiple` is set to false and additional files are dropped,
   * all files besides the first will be rejected.
   * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
   *
   * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
   * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
   *
   * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
   * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
   *
   * ```js
   * function onDrop(acceptedFiles) {
   *   const req = request.post('/upload')
   *   acceptedFiles.forEach(file => {
   *     req.attach(file.name, file)
   *   })
   *   req.end(callback)
   * }
   * ```
   *
   * @param {File[]} acceptedFiles
   * @param {FileRejection[]} fileRejections
   * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
   */
  onDrop: Se.func,
  /**
   * Cb for when the `drop` event occurs.
   * Note that if no files are accepted, this callback is not invoked.
   *
   * @param {File[]} files
   * @param {(DragEvent|Event)} event
   */
  onDropAccepted: Se.func,
  /**
   * Cb for when the `drop` event occurs.
   * Note that if no files are rejected, this callback is not invoked.
   *
   * @param {FileRejection[]} fileRejections
   * @param {(DragEvent|Event)} event
   */
  onDropRejected: Se.func,
  /**
   * Cb for when there's some error from any of the promises.
   *
   * @param {Error} error
   */
  onError: Se.func,
  /**
   * Custom validation function. It must return null if there's no errors.
   * @param {File} file
   * @returns {FileError|FileError[]|null}
   */
  validator: Se.func
};
var hE = {
  isFocused: !1,
  isFileDialogActive: !1,
  isDragActive: !1,
  isDragAccept: !1,
  isDragReject: !1,
  acceptedFiles: [],
  fileRejections: []
};
function oq() {
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = nn(nn({}, rq), e), n = t.accept, r = t.disabled, o = t.getFilesFromEvent, i = t.maxSize, a = t.minSize, l = t.multiple, s = t.maxFiles, c = t.onDragEnter, p = t.onDragLeave, f = t.onDragOver, m = t.onDrop, h = t.onDropAccepted, g = t.onDropRejected, v = t.onFileDialogCancel, S = t.onFileDialogOpen, w = t.useFsAccessApi, x = t.autoFocus, k = t.preventDropOnDocument, E = t.noClick, O = t.noKeyboard, C = t.noDrag, R = t.noDragEventsBubbling, L = t.onError, D = t.validator, N = b.useMemo(function() {
    return n$e(n);
  }, [n]), H = b.useMemo(function() {
    return t$e(n);
  }, [n]), B = b.useMemo(function() {
    return typeof S == "function" ? S : Vz;
  }, [S]), K = b.useMemo(function() {
    return typeof v == "function" ? v : Vz;
  }, [v]), W = b.useRef(null), U = b.useRef(null), Q = b.useReducer(y$e, hE), J = K_(Q, 2), q = J[0], ee = J[1], A = q.isFocused, X = q.isFileDialogActive, ie = b.useRef(typeof window < "u" && window.isSecureContext && w && e$e()), j = function() {
    !ie.current && X && setTimeout(function() {
      if (U.current) {
        var ue = U.current.files;
        ue.length || (ee({
          type: "closeDialog"
        }), K());
      }
    }, 300);
  };
  b.useEffect(function() {
    return window.addEventListener("focus", j, !1), function() {
      window.removeEventListener("focus", j, !1);
    };
  }, [U, X, K, ie]);
  var le = b.useRef([]), re = function(ue) {
    W.current && W.current.contains(ue.target) || (ue.preventDefault(), le.current = []);
  };
  b.useEffect(function() {
    return k && (document.addEventListener("dragover", Hz, !1), document.addEventListener("drop", re, !1)), function() {
      k && (document.removeEventListener("dragover", Hz), document.removeEventListener("drop", re));
    };
  }, [W, k]), b.useEffect(function() {
    return !r && x && W.current && W.current.focus(), function() {
    };
  }, [W, x, r]);
  var he = b.useCallback(function(ue) {
    L ? L(ue) : console.error(ue);
  }, [L]), xe = b.useCallback(function(ue) {
    ue.preventDefault(), ue.persist(), ye(ue), le.current = [].concat(u$e(le.current), [ue.target]), qh(ue) && Promise.resolve(o(ue)).then(function(Pe) {
      if (!(Wb(ue) && !R)) {
        var Je = Pe.length, Y = Je > 0 && X3e({
          files: Pe,
          accept: N,
          minSize: a,
          maxSize: i,
          multiple: l,
          maxFiles: s,
          validator: D
        }), te = Je > 0 && !Y;
        ee({
          isDragAccept: Y,
          isDragReject: te,
          isDragActive: !0,
          type: "setDraggedFiles"
        }), c && c(ue);
      }
    }).catch(function(Pe) {
      return he(Pe);
    });
  }, [o, c, he, R, N, a, i, l, s, D]), ke = b.useCallback(function(ue) {
    ue.preventDefault(), ue.persist(), ye(ue);
    var Pe = qh(ue);
    if (Pe && ue.dataTransfer)
      try {
        ue.dataTransfer.dropEffect = "copy";
      } catch {
      }
    return Pe && f && f(ue), !1;
  }, [f, R]), Ae = b.useCallback(function(ue) {
    ue.preventDefault(), ue.persist(), ye(ue);
    var Pe = le.current.filter(function(Y) {
      return W.current && W.current.contains(Y);
    }), Je = Pe.indexOf(ue.target);
    Je !== -1 && Pe.splice(Je, 1), le.current = Pe, !(Pe.length > 0) && (ee({
      type: "setDraggedFiles",
      isDragActive: !1,
      isDragAccept: !1,
      isDragReject: !1
    }), qh(ue) && p && p(ue));
  }, [W, p, R]), pe = b.useCallback(function(ue, Pe) {
    var Je = [], Y = [];
    ue.forEach(function(te) {
      var Ne = QV(te, N), et = K_(Ne, 2), ft = et[0], un = et[1], Ct = JV(te, a, i), _e = K_(Ct, 2), Ve = _e[0], dn = _e[1], pt = D ? D(te) : null;
      if (ft && Ve && !pt)
        Je.push(te);
      else {
        var Gt = [un, dn];
        pt && (Gt = Gt.concat(pt)), Y.push({
          file: te,
          errors: Gt.filter(function(pn) {
            return pn;
          })
        });
      }
    }), (!l && Je.length > 1 || l && s >= 1 && Je.length > s) && (Je.forEach(function(te) {
      Y.push({
        file: te,
        errors: [Y3e]
      });
    }), Je.splice(0)), ee({
      acceptedFiles: Je,
      fileRejections: Y,
      type: "setFiles"
    }), m && m(Je, Y, Pe), Y.length > 0 && g && g(Y, Pe), Je.length > 0 && h && h(Je, Pe);
  }, [ee, l, N, a, i, s, m, h, g, D]), Me = b.useCallback(function(ue) {
    ue.preventDefault(), ue.persist(), ye(ue), le.current = [], qh(ue) && Promise.resolve(o(ue)).then(function(Pe) {
      Wb(ue) && !R || pe(Pe, ue);
    }).catch(function(Pe) {
      return he(Pe);
    }), ee({
      type: "reset"
    });
  }, [o, pe, he, R]), We = b.useCallback(function() {
    if (ie.current) {
      ee({
        type: "openDialog"
      }), B();
      var ue = {
        multiple: l,
        types: H
      };
      window.showOpenFilePicker(ue).then(function(Pe) {
        return o(Pe);
      }).then(function(Pe) {
        pe(Pe, null), ee({
          type: "closeDialog"
        });
      }).catch(function(Pe) {
        r$e(Pe) ? (K(Pe), ee({
          type: "closeDialog"
        })) : o$e(Pe) ? (ie.current = !1, U.current ? (U.current.value = null, U.current.click()) : he(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : he(Pe);
      });
      return;
    }
    U.current && (ee({
      type: "openDialog"
    }), B(), U.current.value = null, U.current.click());
  }, [ee, B, K, w, pe, he, H, l]), ze = b.useCallback(function(ue) {
    !W.current || !W.current.isEqualNode(ue.target) || (ue.key === " " || ue.key === "Enter" || ue.keyCode === 32 || ue.keyCode === 13) && (ue.preventDefault(), We());
  }, [W, We]), Fe = b.useCallback(function() {
    ee({
      type: "focus"
    });
  }, []), Ye = b.useCallback(function() {
    ee({
      type: "blur"
    });
  }, []), oe = b.useCallback(function() {
    E || (J3e() ? setTimeout(We, 0) : We());
  }, [E, We]), ae = function(ue) {
    return r ? null : ue;
  }, Ie = function(ue) {
    return O ? null : ae(ue);
  }, Ce = function(ue) {
    return C ? null : ae(ue);
  }, ye = function(ue) {
    R && ue.stopPropagation();
  }, we = b.useMemo(function() {
    return function() {
      var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, Pe = ue.refKey, Je = Pe === void 0 ? "ref" : Pe, Y = ue.role, te = ue.onKeyDown, Ne = ue.onFocus, et = ue.onBlur, ft = ue.onClick, un = ue.onDragEnter, Ct = ue.onDragOver, _e = ue.onDragLeave, Ve = ue.onDrop, dn = Vb(ue, l$e);
      return nn(nn(mE({
        onKeyDown: Ie(Oi(te, ze)),
        onFocus: Ie(Oi(Ne, Fe)),
        onBlur: Ie(Oi(et, Ye)),
        onClick: ae(Oi(ft, oe)),
        onDragEnter: Ce(Oi(un, xe)),
        onDragOver: Ce(Oi(Ct, ke)),
        onDragLeave: Ce(Oi(_e, Ae)),
        onDrop: Ce(Oi(Ve, Me)),
        role: typeof Y == "string" && Y !== "" ? Y : "presentation"
      }, Je, W), !r && !O ? {
        tabIndex: 0
      } : {}), dn);
    };
  }, [W, ze, Fe, Ye, oe, xe, ke, Ae, Me, O, C, r]), Ge = b.useCallback(function(ue) {
    ue.stopPropagation();
  }, []), $e = b.useMemo(function() {
    return function() {
      var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, Pe = ue.refKey, Je = Pe === void 0 ? "ref" : Pe, Y = ue.onChange, te = ue.onClick, Ne = Vb(ue, s$e), et = mE({
        accept: N,
        multiple: l,
        type: "file",
        style: {
          display: "none"
        },
        onChange: ae(Oi(Y, Me)),
        onClick: ae(Oi(te, Ge)),
        tabIndex: -1
      }, Je, U);
      return nn(nn({}, et), Ne);
    };
  }, [U, n, l, Me, r]);
  return nn(nn({}, q), {}, {
    isFocused: A && !r,
    getRootProps: we,
    getInputProps: $e,
    rootRef: W,
    inputRef: U,
    open: ae(We)
  });
}
function y$e(e, t) {
  switch (t.type) {
    case "focus":
      return nn(nn({}, e), {}, {
        isFocused: !0
      });
    case "blur":
      return nn(nn({}, e), {}, {
        isFocused: !1
      });
    case "openDialog":
      return nn(nn({}, hE), {}, {
        isFileDialogActive: !0
      });
    case "closeDialog":
      return nn(nn({}, e), {}, {
        isFileDialogActive: !1
      });
    case "setDraggedFiles":
      return nn(nn({}, e), {}, {
        isDragActive: t.isDragActive,
        isDragAccept: t.isDragAccept,
        isDragReject: t.isDragReject
      });
    case "setFiles":
      return nn(nn({}, e), {}, {
        acceptedFiles: t.acceptedFiles,
        fileRejections: t.fileRejections
      });
    case "reset":
      return nn({}, hE);
    default:
      return e;
  }
}
function Vz() {
}
const [v$e, b$e] = Gl("Dropzone component was not found in tree");
var qz = Object.getOwnPropertySymbols, w$e = Object.prototype.hasOwnProperty, x$e = Object.prototype.propertyIsEnumerable, S$e = (e, t) => {
  var n = {};
  for (var r in e)
    w$e.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && qz)
    for (var r of qz(e))
      t.indexOf(r) < 0 && x$e.call(e, r) && (n[r] = e[r]);
  return n;
};
function t2(e) {
  const t = (n) => {
    const r = Te(`Dropzone${d3(e)}`, {}, n), { children: o } = r, i = S$e(r, ["children"]), a = b$e(), l = Qc(o) ? o : /* @__PURE__ */ P.createElement("span", null, o);
    return a[e] ? b.cloneElement(l, i) : null;
  };
  return t.displayName = `@mantine/dropzone/${d3(e)}`, t;
}
const k$e = t2("accept"), _$e = t2("reject"), O$e = t2("idle");
var E$e = Object.defineProperty, C$e = Object.defineProperties, P$e = Object.getOwnPropertyDescriptors, Gz = Object.getOwnPropertySymbols, R$e = Object.prototype.hasOwnProperty, T$e = Object.prototype.propertyIsEnumerable, Kz = (e, t, n) => t in e ? E$e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Yz = (e, t) => {
  for (var n in t || (t = {}))
    R$e.call(t, n) && Kz(e, n, t[n]);
  if (Gz)
    for (var n of Gz(t))
      T$e.call(t, n) && Kz(e, n, t[n]);
  return e;
}, j$e = (e, t) => C$e(e, P$e(t)), N$e = Ee((e, { padding: t, radius: n }) => {
  const r = e.fn.variant({ color: "red", variant: "light" }), o = e.fn.variant({ color: e.primaryColor, variant: "light" });
  return {
    root: j$e(Yz(Yz({}, e.fn.fontStyles()), e.fn.focusStyles()), {
      boxSizing: "border-box",
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
      border: `${F(2)} dashed ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4]}`,
      padding: Re({ size: t, sizes: e.spacing }),
      borderRadius: e.fn.radius(n),
      cursor: "pointer",
      userSelect: "none",
      transition: "background-color 150ms ease",
      position: "relative",
      "&:hover": {
        backgroundColor: e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[0]
      },
      "&[data-loading]": {
        cursor: "default",
        "&:hover": {
          backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white
        }
      },
      "&[data-accept]": {
        backgroundColor: e.colorScheme === "dark" ? o.background : e.colors[e.primaryColor][0],
        borderColor: e.colorScheme === "dark" ? o.border : e.colors[e.primaryColor][4],
        "&:hover": {
          backgroundColor: e.colorScheme === "dark" ? o.background : e.colors[e.primaryColor][0]
        }
      },
      "&[data-reject]": {
        backgroundColor: e.colorScheme === "dark" ? r.background : e.colors.red[0],
        borderColor: e.colorScheme === "dark" ? r.border : e.colors.red[4],
        "&:hover": {
          backgroundColor: e.colorScheme === "dark" ? r.background : e.colors.red[0]
        }
      }
    }),
    inner: {
      pointerEvents: "none",
      userSelect: "none"
    }
  };
}), $$e = Object.defineProperty, I$e = Object.defineProperties, A$e = Object.getOwnPropertyDescriptors, qb = Object.getOwnPropertySymbols, iq = Object.prototype.hasOwnProperty, aq = Object.prototype.propertyIsEnumerable, Xz = (e, t, n) => t in e ? $$e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, od = (e, t) => {
  for (var n in t || (t = {}))
    iq.call(t, n) && Xz(e, n, t[n]);
  if (qb)
    for (var n of qb(t))
      aq.call(t, n) && Xz(e, n, t[n]);
  return e;
}, Y_ = (e, t) => I$e(e, A$e(t)), z$e = (e, t) => {
  var n = {};
  for (var r in e)
    iq.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && qb)
    for (var r of qb(e))
      t.indexOf(r) < 0 && aq.call(e, r) && (n[r] = e[r]);
  return n;
};
const L$e = {
  padding: "md",
  loading: !1,
  multiple: !0,
  maxSize: 1 / 0,
  autoFocus: !1,
  activateOnClick: !0,
  activateOnDrag: !0,
  dragEventsBubbling: !0,
  activateOnKeyboard: !0,
  useFsAccessApi: !0
};
function ff(e) {
  const t = Te("Dropzone", L$e, e), {
    className: n,
    padding: r,
    radius: o,
    disabled: i,
    classNames: a,
    styles: l,
    loading: s,
    multiple: c,
    maxSize: p,
    accept: f,
    children: m,
    onDropAny: h,
    onDrop: g,
    onReject: v,
    openRef: S,
    name: w,
    unstyled: x,
    maxFiles: k,
    autoFocus: E,
    activateOnClick: O,
    activateOnDrag: C,
    dragEventsBubbling: R,
    activateOnKeyboard: L,
    onDragEnter: D,
    onDragLeave: N,
    onDragOver: H,
    onFileDialogCancel: B,
    onFileDialogOpen: K,
    preventDropOnDocument: W,
    useFsAccessApi: U,
    getFilesFromEvent: Q,
    validator: J,
    variant: q
  } = t, ee = z$e(t, [
    "className",
    "padding",
    "radius",
    "disabled",
    "classNames",
    "styles",
    "loading",
    "multiple",
    "maxSize",
    "accept",
    "children",
    "onDropAny",
    "onDrop",
    "onReject",
    "openRef",
    "name",
    "unstyled",
    "maxFiles",
    "autoFocus",
    "activateOnClick",
    "activateOnDrag",
    "dragEventsBubbling",
    "activateOnKeyboard",
    "onDragEnter",
    "onDragLeave",
    "onDragOver",
    "onFileDialogCancel",
    "onFileDialogOpen",
    "preventDropOnDocument",
    "useFsAccessApi",
    "getFilesFromEvent",
    "validator",
    "variant"
  ]), { classes: A, cx: X } = N$e({ radius: o, padding: r }, { name: "Dropzone", classNames: a, styles: l, unstyled: x, variant: q }), { getRootProps: ie, getInputProps: j, isDragAccept: le, isDragReject: re, open: he } = oq(od({
    onDrop: h,
    onDropAccepted: g,
    onDropRejected: v,
    disabled: i || s,
    accept: Array.isArray(f) ? f.reduce((ke, Ae) => Y_(od({}, ke), { [Ae]: [] }), {}) : f,
    multiple: c,
    maxSize: p,
    maxFiles: k,
    autoFocus: E,
    noClick: !O,
    noDrag: !C,
    noDragEventsBubbling: !R,
    noKeyboard: !L,
    onDragEnter: D,
    onDragLeave: N,
    onDragOver: H,
    onFileDialogCancel: B,
    onFileDialogOpen: K,
    preventDropOnDocument: W,
    useFsAccessApi: U,
    validator: J
  }, Q ? { getFilesFromEvent: Q } : null));
  sP(S, he);
  const xe = !le && !re;
  return /* @__PURE__ */ P.createElement(v$e, {
    value: { accept: le, reject: re, idle: xe }
  }, /* @__PURE__ */ P.createElement(qe, Y_(od(od({}, ee), ie()), {
    "data-accept": le || void 0,
    "data-reject": re || void 0,
    "data-idle": xe || void 0,
    "data-loading": s || void 0,
    className: X(A.root, n)
  }), /* @__PURE__ */ P.createElement(UU, {
    visible: s,
    radius: o,
    unstyled: x
  }), /* @__PURE__ */ P.createElement("input", Y_(od({}, j()), {
    name: w
  })), /* @__PURE__ */ P.createElement("div", {
    className: A.inner
  }, m)));
}
ff.displayName = "@mantine/dropzone/Dropzone";
ff.Accept = k$e;
ff.Reject = _$e;
ff.Idle = O$e;
const lq = ff;
var D$e = Object.defineProperty, F$e = Object.defineProperties, M$e = Object.getOwnPropertyDescriptors, Zz = Object.getOwnPropertySymbols, B$e = Object.prototype.hasOwnProperty, U$e = Object.prototype.propertyIsEnumerable, Qz = (e, t, n) => t in e ? D$e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, H$e = (e, t) => {
  for (var n in t || (t = {}))
    B$e.call(t, n) && Qz(e, n, t[n]);
  if (Zz)
    for (var n of Zz(t))
      U$e.call(t, n) && Qz(e, n, t[n]);
  return e;
}, W$e = (e, t) => F$e(e, M$e(t)), V$e = Ee((e) => ({
  wrapper: W$e(H$e({}, e.fn.cover(0)), {
    position: "fixed",
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.white,
    display: "flex",
    padding: e.spacing.xs,
    transition: "opacity 100ms ease"
  }),
  dropzone: {
    flex: 1
  }
})), q$e = Object.defineProperty, G$e = Object.defineProperties, K$e = Object.getOwnPropertyDescriptors, Gb = Object.getOwnPropertySymbols, sq = Object.prototype.hasOwnProperty, uq = Object.prototype.propertyIsEnumerable, Jz = (e, t, n) => t in e ? q$e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, X_ = (e, t) => {
  for (var n in t || (t = {}))
    sq.call(t, n) && Jz(e, n, t[n]);
  if (Gb)
    for (var n of Gb(t))
      uq.call(t, n) && Jz(e, n, t[n]);
  return e;
}, Z_ = (e, t) => G$e(e, K$e(t)), Y$e = (e, t) => {
  var n = {};
  for (var r in e)
    sq.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Gb)
    for (var r of Gb(e))
      t.indexOf(r) < 0 && uq.call(e, r) && (n[r] = e[r]);
  return n;
};
const X$e = {
  padding: "md",
  loading: !1,
  multiple: !0,
  maxSize: 1 / 0,
  autoFocus: !1,
  activateOnClick: !0,
  activateOnDrag: !0,
  dragEventsBubbling: !0,
  activateOnKeyboard: !0,
  active: !0,
  zIndex: Ji("max"),
  withinPortal: !0
};
function cq(e) {
  const t = Te("DropzoneFullScreen", X$e, e), {
    classNames: n,
    styles: r,
    sx: o,
    className: i,
    style: a,
    unstyled: l,
    active: s,
    onDrop: c,
    onReject: p,
    zIndex: f,
    withinPortal: m,
    portalProps: h
  } = t, g = Y$e(t, [
    "classNames",
    "styles",
    "sx",
    "className",
    "style",
    "unstyled",
    "active",
    "onDrop",
    "onReject",
    "zIndex",
    "withinPortal",
    "portalProps"
  ]), [v, S] = P.useState(0), [w, { open: x, close: k }] = c8(!1), { classes: E, cx: O } = V$e(null, {
    name: "DropzoneFullScreen",
    classNames: n,
    styles: r,
    unstyled: l
  }), C = (L) => {
    L.dataTransfer.types.includes("Files") && (S((D) => D + 1), x());
  }, R = () => {
    S((L) => L - 1);
  };
  return b.useEffect(() => {
    v === 0 && k();
  }, [v]), b.useEffect(() => {
    if (s)
      return document.addEventListener("dragenter", C, !1), document.addEventListener("dragleave", R, !1), () => {
        document.removeEventListener("dragenter", C, !1), document.removeEventListener("dragleave", R, !1);
      };
  }, [s]), /* @__PURE__ */ P.createElement(rf, Z_(X_({}, h), {
    withinPortal: m
  }), /* @__PURE__ */ P.createElement(qe, {
    className: O(E.wrapper, i),
    sx: o,
    style: Z_(X_({}, a), {
      opacity: w ? 1 : 0,
      pointerEvents: w ? "all" : "none",
      zIndex: f
    })
  }, /* @__PURE__ */ P.createElement(ff, Z_(X_({}, g), {
    classNames: n,
    styles: r,
    unstyled: l,
    className: E.dropzone,
    onDrop: (L) => {
      c == null || c(L), k();
    },
    onReject: (L) => {
      p == null || p(L), k();
    }
  }))));
}
cq.displayName = "@mantine/dropzone/DropzoneFullScreen";
lq.FullScreen = cq;
const Z$e = lq;
function Q$e(e, t) {
  let n = `Failed to upload file${t ? ` ${t}` : ""}`;
  return (e == null ? void 0 : e.code) === "file-too-large" ? n += ": File too large. Please upload a smaller file" : e != null && e.message && (n += `: ${e.message}`), n;
}
function J$e(e) {
  return e.replace(/[_+]/g, "_");
}
function eIe() {
  const e = /* @__PURE__ */ new Date(), t = `${e.getFullYear()}_${e.getMonth() + 1}_${e.getDate()}`, n = `${e.getUTCHours()}_${e.getUTCMinutes()}_${e.getUTCSeconds()}`;
  return `${t}_${n}`;
}
async function tIe(e) {
  const t = Math.round(Math.random() * 1e4), n = "https://s3.amazonaws.com/lastmileai.aiconfig.public/", r = `uploads/${eIe()}/${t}/${J$e(
    e.name
  )}`, o = new FormData();
  o.append("key", r), o.append("acl", "public-read"), o.append("Content-Type", e.type), o.append("success_action_status", "201"), o.append("file", e);
  const i = await fetch(n, {
    method: "POST",
    mode: "cors",
    cache: "no-cache",
    body: o,
    headers: {
      Authorization: ""
    }
  });
  if (i.ok && i.status === 201)
    return { url: `${n}${r}` };
  throw new Error("Error uploading to S3!");
}
function nIe(e) {
  return e.items.mime_types.join(", ");
}
const rIe = b.memo(function({
  schema: e,
  onUploadAttachments: t,
  onCancel: n
}) {
  const [r, o] = b.useState([]), [i, a] = b.useState("idle"), [l, s] = b.useState(null), { readOnly: c } = b.useContext(kn), p = async (m) => {
    var h;
    if (i === "dropzone_error")
      return;
    let g = [];
    try {
      if (m.length > 0 && (a("uploading"), g = await Promise.all(
        m.map(async (S) => ({
          url: (await tIe(S)).url,
          mimeType: S.type
        }))
      )), !((h = g[0]) != null && h.url))
        throw new Error("Error uploading file");
      a("success");
      const v = g.map((S) => ({
        data: { value: S.url, kind: "file_uri" },
        mime_type: S.mimeType
      }));
      t(v);
    } catch (v) {
      a("upload_error");
      const S = v instanceof Error ? v.message : "Error uploading file";
      s(S);
    }
  }, f = e.items.max_size;
  return /* @__PURE__ */ $.jsxs("div", { children: [
    (i === "upload_error" || i === "dropzone_error") && l && /* @__PURE__ */ $.jsx(Ft, { size: "xs", color: "red", children: l }),
    /* @__PURE__ */ $.jsxs(Js, { display: "flex", children: [
      n && /* @__PURE__ */ $.jsx(jn, { onClick: n, children: /* @__PURE__ */ $.jsx(fr, { label: "Cancel", children: /* @__PURE__ */ $.jsx(EW, { size: 16 }) }) }),
      /* @__PURE__ */ $.jsx(
        Z$e,
        {
          multiple: !0,
          onDrop: (m) => {
            a("idle"), o(m), p(m);
          },
          onReject: (m) => {
            var h, g, v, S;
            a("dropzone_error");
            const w = (g = (h = m == null ? void 0 : m[0]) == null ? void 0 : h.file) == null ? void 0 : g.name, x = (S = (v = m == null ? void 0 : m[0]) == null ? void 0 : v.errors) == null ? void 0 : S[0];
            s(Q$e(x, w));
          },
          accept: e.items.mime_types,
          disabled: c,
          children: r.length > 0 ? `${r.length} File(s) Uploading...` : /* @__PURE__ */ $.jsxs("div", { children: [
            /* @__PURE__ */ $.jsx(Px, { order: 4, children: "Upload File" }),
            /* @__PURE__ */ $.jsxs(Ft, { fz: "sm", c: "dimmed", children: [
              "Supported files: ",
              nIe(e)
            ] }),
            f && /* @__PURE__ */ $.jsxs(Ft, { fz: "sm", c: "dimmed", children: [
              "Max file size: ",
              f,
              "MB"
            ] })
          ] })
        }
      )
    ] })
  ] });
});
function e4({
  schema: e,
  attachment: t,
  onUpdateAttachment: n,
  onAddAttachments: r,
  onRemoveAttachment: o
}) {
  const [i, a] = b.useState((t == null ? void 0 : t.data) == null);
  return b.useContext(kn), /* @__PURE__ */ $.jsx(Js, { m: "xs", children: t && !i ? /* @__PURE__ */ $.jsx(
    _3e,
    {
      attachment: t,
      schema: e,
      onUpdateMetadata: (l) => n({ ...t, metadata: l }),
      onRemoveAttachment: o,
      onEditAttachment: () => a(!0)
    }
  ) : /* @__PURE__ */ $.jsx(
    rIe,
    {
      schema: e,
      onUploadAttachments: (l) => {
        r(l), a(!1);
      },
      onCancel: t ? () => a(!1) : void 0
    }
  ) });
}
const oIe = b.memo(function({
  schema: e,
  onChangeAttachments: t,
  attachments: n = []
}) {
  const r = (l, s) => {
    const c = [...n];
    c[s] = l, t(c);
  }, o = (l, s) => {
    let c;
    s > n.length ? c = [...n, ...l] : c = n.reduce((p, f, m) => m === s ? [...p, ...l] : [...p, f], []), t(c);
  }, i = (l) => {
    const s = [
      ...n.slice(0, l),
      ...n.slice(l + 1)
    ];
    t(s);
  }, a = n.length;
  return /* @__PURE__ */ $.jsxs($.Fragment, { children: [
    n.map((l, s) => /* @__PURE__ */ $.jsx(
      e4,
      {
        attachment: l,
        schema: e,
        onUpdateAttachment: (c) => r(c, s),
        onAddAttachments: (c) => o(c, s),
        onRemoveAttachment: () => i(s)
      },
      `${JSON.stringify(l.data)}-${s}`
    )),
    (e.max_items == null || a < e.max_items) && /* @__PURE__ */ $.jsx(
      e4,
      {
        schema: e,
        onUpdateAttachment: (l) => r(l, a + 1),
        onAddAttachments: (l) => o(l, a + 1)
      },
      a
    )
  ] });
});
function iIe({ input: e, schema: t, onChangeInput: n }) {
  const {
    data: r,
    attachments: o,
    ...i
  } = t.properties;
  if (typeof e == "string")
    throw new Error("Expected input type object but got string");
  const { data: a, attachments: l, ...s } = e, c = (f) => {
    n({ ...e, data: f });
  }, p = (f) => {
    n({ ...e, attachments: f });
  };
  return /* @__PURE__ */ $.jsxs(jt, { direction: "column", children: [
    r && /* @__PURE__ */ $.jsx(
      S3e,
      {
        schema: r,
        data: a,
        onChangeData: c
      }
    ),
    o && /* @__PURE__ */ $.jsx(
      oIe,
      {
        schema: o,
        onChangeAttachments: p,
        attachments: l ?? []
      }
    )
  ] });
}
const aIe = b.memo(function(e) {
  const { readOnly: t } = b.useContext(kn);
  return e.schema.type === "string" ? e.input && typeof e.input != "string" ? /* @__PURE__ */ $.jsxs($.Fragment, { children: [
    /* @__PURE__ */ $.jsxs(Ft, { color: "red", children: [
      "Expected input type string. Toggle JSON editor to update. Set to",
      ' ""',
      " in JSON editor and toggle back to reset."
    ] }),
    /* @__PURE__ */ $.jsx(Ki, { content: e.input })
  ] }) : t ? /* @__PURE__ */ $.jsx("div", { style: { padding: "0.5em" }, children: /* @__PURE__ */ $.jsx(
    Cx,
    {
      maxHeight: 200,
      showLabel: "Show more",
      hideLabel: "Hide",
      initialState: !1,
      transitionDuration: 300,
      children: /* @__PURE__ */ $.jsx(Vs, { content: e.input })
    }
  ) }) : /* @__PURE__ */ $.jsx(
    Bl,
    {
      value: e.input,
      label: "Prompt",
      onChange: (n) => e.onChangeInput(n.target.value),
      onKeyDown: (n) => {
        n.key === "Enter" && (n.shiftKey || n.ctrlKey) && (n.preventDefault(), e.runPrompt());
      },
      placeholder: "Type a prompt",
      autosize: !0
    }
  ) : /* @__PURE__ */ $.jsx(
    iIe,
    {
      ...e,
      schema: e.schema
    }
  );
}), lIe = b.memo(function({
  input: e,
  onChangeInput: t,
  runPrompt: n
}) {
  const { readOnly: r } = b.useContext(kn);
  return r ? /* @__PURE__ */ $.jsx("div", { style: { padding: "0.5em" }, children: /* @__PURE__ */ $.jsx(
    Cx,
    {
      maxHeight: 200,
      showLabel: "Show more",
      hideLabel: "Hide",
      initialState: !1,
      transitionDuration: 300,
      children: /* @__PURE__ */ $.jsx(Vs, { content: e })
    }
  ) }) : /* @__PURE__ */ $.jsx(
    Bl,
    {
      label: "Prompt",
      value: e,
      onChange: (o) => t(o.target.value),
      onKeyDown: (o) => {
        o.key === "Enter" && (o.shiftKey || o.ctrlKey) && (o.preventDefault(), n());
      },
      disabled: r
    }
  );
}), sIe = {
  anyOf: [
    {
      type: "object",
      additionalProperties: {},
      properties: {
        data: {
          description: `Input to the model. This can represent a single input, or multiple inputs.
The structure of the data object is up to the ModelParser. Attachments field should be leveraged for non-text inputs (e.g. image, audio).`
        },
        attachments: {
          description: "Used to include non-text inputs (e.g. image, audio) of specified MIME types in the prompt",
          type: "array",
          items: {
            $ref: "#/definitions/Attachment"
          }
        }
      }
    },
    {
      type: "string"
    }
  ],
  definitions: {
    Attachment: {
      description: "Data of specified MIME type to attach to a prompt",
      type: "object",
      required: ["data"],
      properties: {
        mime_type: {
          description: "MIME type of the attachment. If not specified, the MIME type will be assumed to be text/plain.",
          type: "string"
        },
        data: {
          description: "Data representing the attachment"
        },
        metadata: {
          description: "Attachment metadata.",
          type: "object",
          additionalProperties: {}
        }
      }
    }
  }
}, uIe = b.memo(function({
  input: e,
  onChangeInput: t
}) {
  const n = b.useCallback(
    (r) => {
      t(r);
    },
    [t]
  );
  return /* @__PURE__ */ $.jsx(
    Ki,
    {
      content: e,
      onChange: n,
      schema: sIe
    }
  );
}), cIe = b.memo(function({
  cancel: e,
  runPrompt: t,
  isRunning: n = !1,
  disabled: r = !1
}) {
  const { readOnly: o } = b.useContext(kn), i = r || o, a = async () => n ? await e() : await t(), l = /* @__PURE__ */ $.jsx(
    Hs,
    {
      onClick: a,
      disabled: i,
      p: "xs",
      size: "xs",
      className: `runPromptButton ${o ? "runPromptButtonReadOnly" : ""}`,
      children: n ? /* @__PURE__ */ $.jsxs(jt, { align: "center", justify: "center", children: [
        /* @__PURE__ */ $.jsx(nf, { style: { position: "absolute" }, size: "xs", color: "white" }),
        /* @__PURE__ */ $.jsx(hCe, { fill: "white", size: 14 })
      ] }) : /* @__PURE__ */ $.jsx($.Fragment, { children: /* @__PURE__ */ $.jsx(mCe, { size: "16" }) })
    }
  );
  return i ? o ? l : /* @__PURE__ */ $.jsx(fr, { label: "Can't run while another prompt is running", withArrow: !0, children: /* @__PURE__ */ $.jsx("div", { children: l }) }) : l;
}), fq = Ee(() => ({
  promptInputButtonWrapper: {
    marginLeft: "4px"
  },
  promptInputRendererWrapper: {
    width: "100%"
  }
}));
function fIe({
  input: e,
  toggleJSONEditor: t,
  renderRunButton: n
}) {
  const { classes: r } = fq(), { resetBoundary: o } = GV();
  return /* @__PURE__ */ $.jsxs($.Fragment, { children: [
    /* @__PURE__ */ $.jsxs(jt, { direction: "column", children: [
      /* @__PURE__ */ $.jsxs(Ft, { color: "red", size: "sm", children: [
        "Invalid input format for model. Toggle JSON editor to update. Set to",
        " {}",
        " in JSON editor and toggle back to reset."
      ] }),
      /* @__PURE__ */ $.jsxs(jt, { children: [
        /* @__PURE__ */ $.jsx("div", { className: r.promptInputRendererWrapper, children: /* @__PURE__ */ $.jsx(Ki, { content: e }) }),
        n()
      ] })
    ] }),
    /* @__PURE__ */ $.jsx(jt, { justify: "flex-end", children: /* @__PURE__ */ $.jsx(
      Ax,
      {
        isRawJSON: !1,
        setIsRawJSON: () => {
          o(), t();
        }
      }
    ) })
  ] });
}
const dIe = b.memo(function({
  input: e,
  schema: t,
  onChangeInput: n,
  onCancelRun: r,
  onRunPrompt: o,
  isRunning: i = !1,
  isRunButtonDisabled: a = !1
}) {
  const { classes: l } = fq(), [s, c] = b.useState(!1), p = /* @__PURE__ */ $.jsx(jt, { justify: "flex-end", children: /* @__PURE__ */ $.jsx(
    Ax,
    {
      isRawJSON: s,
      setIsRawJSON: c
    }
  ) }), { showNotification: f } = b.useContext($x), m = b.useCallback(async () => {
    if (i) {
      f({
        title: "Prompt already running",
        message: "Cannot run prompt while it is currently running. Click run button to cancel",
        type: "warning"
      });
      return;
    }
    if (a) {
      f({
        title: "Another prompt is running",
        message: "Cannot run prompt while another prompt is running",
        type: "warning"
      });
      return;
    }
    await o();
  }, [a, i, o, f]), h = (
    // Wrap with a div to prevent it from expanding to input height
    /* @__PURE__ */ $.jsx("div", { className: l.promptInputButtonWrapper, children: /* @__PURE__ */ $.jsx(
      cIe,
      {
        isRunning: i,
        disabled: a,
        cancel: r,
        runPrompt: m
      }
    ) })
  ), g = /* @__PURE__ */ $.jsxs(jt, { children: [
    /* @__PURE__ */ $.jsx("div", { className: l.promptInputRendererWrapper, children: t ? /* @__PURE__ */ $.jsx(
      aIe,
      {
        input: e,
        schema: t,
        onChangeInput: n,
        runPrompt: m
      }
    ) : /* @__PURE__ */ $.jsx(
      lIe,
      {
        input: e,
        onChangeInput: n,
        runPrompt: m
      }
    ) }),
    h
  ] });
  return /* @__PURE__ */ $.jsx($.Fragment, { children: s ? /* @__PURE__ */ $.jsxs($.Fragment, { children: [
    /* @__PURE__ */ $.jsxs(jt, { children: [
      /* @__PURE__ */ $.jsx(
        uIe,
        {
          input: e,
          onChangeInput: n
        }
      ),
      h
    ] }),
    /* @__PURE__ */ $.jsx(jt, { justify: "flex-end", children: p })
  ] }) : /* @__PURE__ */ $.jsxs(
    qV,
    {
      fallbackRender: () => /* @__PURE__ */ $.jsx(
        fIe,
        {
          input: e,
          toggleJSONEditor: () => c(!0),
          renderRunButton: () => h
        }
      ),
      children: [
        g,
        /* @__PURE__ */ $.jsx(jt, { justify: "flex-end", children: p })
      ]
    }
  ) });
}), Q_ = b.memo(function({
  children: e,
  copyContent: t,
  output: n,
  withRawJSONToggle: r = !1
}) {
  const [o, i] = b.useState(!1);
  return /* @__PURE__ */ $.jsxs($.Fragment, { children: [
    /* @__PURE__ */ $.jsxs(jt, { justify: "flex-end", children: [
      t && /* @__PURE__ */ $.jsx(JP, { value: t }),
      r && /* @__PURE__ */ $.jsx(fr, { label: "Toggle raw JSON", withArrow: !0, children: /* @__PURE__ */ $.jsx(jn, { onClick: () => i((a) => !a), children: o ? /* @__PURE__ */ $.jsx(_W, { size: "1rem" }) : /* @__PURE__ */ $.jsx(FP, { size: "1rem" }) }) })
    ] }),
    o ? /* @__PURE__ */ $.jsx(Ki, { content: n }) : /* @__PURE__ */ $.jsx($.Fragment, { children: e })
  ] });
});
function pIe({ output: e }) {
  return /* @__PURE__ */ $.jsx(jt, { direction: "column", children: /* @__PURE__ */ $.jsxs(cP, { color: "red", title: e.ename, children: [
    /* @__PURE__ */ $.jsx(Vs, { content: e.evalue }),
    /* @__PURE__ */ $.jsx(Vs, { content: e.traceback.join(`
`) })
  ] }) });
}
const mIe = b.memo(function({
  output: e
}) {
  if (e.data == null)
    return /* @__PURE__ */ $.jsx(Ki, { content: e });
  if (typeof e.data == "string")
    return /* @__PURE__ */ $.jsx(
      Q_,
      {
        copyContent: e.data,
        output: e,
        withRawJSONToggle: !0,
        children: /* @__PURE__ */ $.jsx(Vs, { content: e.data })
      }
    );
  if (typeof e.data == "object" && !Array.isArray(e.data) && Object.prototype.hasOwnProperty.call(e.data, "kind"))
    switch (e.data.kind) {
      case "file_uri":
        return /* @__PURE__ */ $.jsx(
          Q_,
          {
            copyContent: e.data.value,
            output: e,
            withRawJSONToggle: !0,
            children: /* @__PURE__ */ $.jsx(
              cE,
              {
                mimeType: e.mime_type,
                content: e.data.value
              }
            )
          }
        );
      case "base64":
        return /* @__PURE__ */ $.jsx(
          Q_,
          {
            copyContent: e.data.value,
            output: e,
            withRawJSONToggle: !0,
            children: /* @__PURE__ */ $.jsx(
              cE,
              {
                mimeType: e.mime_type,
                content: `data:${e.mime_type};base64, ${e.data.value}`
              }
            )
          }
        );
      default:
        return /* @__PURE__ */ $.jsx(
          Ki,
          {
            content: e.data.value
          }
        );
    }
  return /* @__PURE__ */ $.jsx(Ki, { content: e.data });
}), hIe = b.memo(function({ output: e }) {
  switch (e.output_type) {
    case "execute_result":
      return /* @__PURE__ */ $.jsx(mIe, { output: e });
    case "error":
      return /* @__PURE__ */ $.jsx(pIe, { output: e });
  }
}), gIe = b.memo(function({ outputs: e }) {
  return e.map((t, n) => /* @__PURE__ */ $.jsx(hIe, { output: t }, n));
}), yIe = b.memo(function() {
  return /* @__PURE__ */ $.jsxs(jt, { direction: "column", mt: "0.5em", children: [
    /* @__PURE__ */ $.jsx(mv, { size: "sm", className: "divider" }),
    /* @__PURE__ */ $.jsx(Ft, { color: "dimmed", size: "xs", className: "monoFont", children: "Output" })
  ] });
}), vIe = b.memo(function({ promptId: e, name: t, onUpdate: n }) {
  const { getState: r, readOnly: o } = b.useContext(kn), [i, a] = b.useState(t), l = (s) => {
    a(s.currentTarget.value), n(s.currentTarget.value);
  };
  return /* @__PURE__ */ $.jsx(
    lf,
    {
      value: i,
      label: "Prompt Name",
      className: "ghost",
      variant: "unstyled",
      placeholder: "Name this prompt",
      onChange: l,
      disabled: o,
      error: r().prompts.some(
        (s) => s.name === i && s._ui.id !== e
      ) ? "Name already exists" : null
    }
  );
}), bIe = b.memo(function({
  prompt: e,
  getModels: t,
  onSetModel: n,
  defaultConfigModelName: r
}) {
  const { mode: o } = b.useContext(kn), { readOnly: i } = b.useContext(kn), [a, l] = b.useState(
    $c(e, r)
  ), [s, c] = b.useState(!0), [p, f] = b.useState(
    $c(e, r)
  ), m = zV(
    s ? "" : p ?? "",
    t
  ), h = (g) => {
    l(g), n(g);
  };
  return /* @__PURE__ */ $.jsx(
    NP,
    {
      placeholder: `Select ${o === "gradio" ? "task" : "model"}`,
      limit: 100,
      className: "ghost",
      label: o === "gradio" ? "Hugging Face Task" : "Model",
      variant: "unstyled",
      maxDropdownHeight: 200,
      disabled: i,
      rightSection: a ? /* @__PURE__ */ $.jsx(
        Hs,
        {
          size: "xs",
          variant: "subtle",
          className: "ghost",
          mr: 10,
          onClick: () => {
            h(void 0), c(!0), f("");
          },
          children: /* @__PURE__ */ $.jsx(EW, { size: 10 })
        }
      ) : null,
      filter: (g, v) => s ? !0 : v.value.toLocaleLowerCase().includes(g.toLocaleLowerCase().trim()),
      data: m,
      value: p,
      onChange: (g) => {
        f(g), c(!1), h(g), m.some((v) => {
          if (v === g)
            return c(!0), !0;
        });
      }
    }
  );
}), dq = /* @__PURE__ */ new Map(), wIe = b.memo(function({
  prompt: e,
  cancel: t,
  getModels: n,
  onChangePromptInput: r,
  onChangePromptName: o,
  defaultConfigModelName: i,
  onRunPrompt: a,
  onUpdateModel: l,
  onUpdateModelSettings: s,
  onUpdateParameters: c,
  isRunButtonDisabled: p = !1
}) {
  const f = e._ui.id, m = b.useCallback(
    (R) => r(f, R),
    [f, r]
  ), h = b.useCallback(
    (R) => o(f, R),
    [f, o]
  ), g = b.useCallback(
    (R) => s(f, R),
    [f, s]
  ), v = b.useCallback(
    (R) => c(f, R),
    [f, c]
  ), S = b.useCallback(
    async () => await a(f),
    [f, a]
  ), w = b.useCallback(async () => {
    if (t) {
      if (e._ui.cancellationToken)
        return await t(e._ui.cancellationToken);
      console.log(
        `Warning: No cancellation token found for prompt: ${e.name}`
      );
    }
  }, [e.name, e._ui.cancellationToken, t]), x = b.useCallback(
    (R) => l(f, R),
    [f, l]
  ), k = b.useRef(null), E = b.useMemo(
    () => Lr.debounce((R) => {
      if (R.length > 0) {
        const L = R[0].target.getBoundingClientRect().height;
        dq.set(f, L);
      }
    }, Mu),
    [f]
  );
  b.useEffect(() => {
    if (!k.current)
      return;
    const R = new ResizeObserver(E);
    return R.observe(k.current), () => R.disconnect();
  }, [E]);
  const O = wW(e, i), C = O == null ? void 0 : O.input;
  return /* @__PURE__ */ $.jsxs(jt, { justify: "space-between", w: "100%", children: [
    /* @__PURE__ */ $.jsx(qbe, { withBorder: !0, className: "cellStyle", ref: k, children: /* @__PURE__ */ $.jsxs(jt, { direction: "column", children: [
      /* @__PURE__ */ $.jsxs(jt, { justify: "space-between", mb: "0.5em", children: [
        /* @__PURE__ */ $.jsx(
          vIe,
          {
            promptId: f,
            name: e.name,
            onUpdate: h
          }
        ),
        /* @__PURE__ */ $.jsx(
          bIe,
          {
            getModels: n,
            prompt: e,
            onSetModel: x,
            defaultConfigModelName: i
          }
        )
      ] }),
      /* @__PURE__ */ $.jsx(
        dIe,
        {
          input: e.input,
          schema: C,
          onChangeInput: m,
          onCancelRun: w,
          onRunPrompt: S,
          isRunning: e._ui.isRunning,
          isRunButtonDisabled: p
        }
      ),
      e.outputs && e.outputs.length > 0 && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
        /* @__PURE__ */ $.jsx(yIe, {}),
        /* @__PURE__ */ $.jsx(gIe, { outputs: e.outputs })
      ] })
    ] }) }),
    /* @__PURE__ */ $.jsx("div", { className: "sidePanel", children: /* @__PURE__ */ $.jsx(
      x3e,
      {
        prompt: e,
        promptSchema: O,
        onUpdateModelSettings: g,
        onUpdateParameters: v
      }
    ) })
  ] });
}), xIe = Ee((e) => ({
  promptsContainer: {
    [e.fn.smallerThan("sm")]: {
      padding: "0 0 200px 0"
    },
    paddingBottom: 400
  }
})), SIe = b.memo(function(e) {
  const { classes: t } = xIe(), { readOnly: n } = b.useContext(kn);
  return /* @__PURE__ */ $.jsxs("div", { className: `${t.promptsContainer} promptsContainer`, children: [
    !n && /* @__PURE__ */ $.jsx(
      Rz,
      {
        getModels: e.getModels,
        addPrompt: (r) => e.onAddPrompt(0, r)
      }
    ),
    e.prompts.map((r, o) => {
      const i = e.runningPromptId !== void 0 && e.runningPromptId !== r._ui.id;
      return /* @__PURE__ */ $.jsxs(ui, { children: [
        /* @__PURE__ */ $.jsxs(jt, { mt: "md", children: [
          !n && /* @__PURE__ */ $.jsx(
            Z1e,
            {
              promptId: r._ui.id,
              onDeletePrompt: () => e.onDeletePrompt(r._ui.id)
            }
          ),
          /* @__PURE__ */ $.jsx(
            wIe,
            {
              prompt: r,
              getModels: e.getModels,
              onChangePromptInput: e.onChangePromptInput,
              onChangePromptName: e.onChangePromptName,
              cancel: e.cancelRunPrompt,
              onRunPrompt: e.onRunPrompt,
              onUpdateModel: e.onUpdatePromptModel,
              onUpdateModelSettings: e.onUpdatePromptModelSettings,
              onUpdateParameters: e.onUpdatePromptParameters,
              defaultConfigModelName: e.defaultModel,
              isRunButtonDisabled: i
            }
          )
        ] }),
        !n && /* @__PURE__ */ $.jsx(
          Rz,
          {
            getModels: e.getModels,
            addPrompt: (a) => e.onAddPrompt(
              o + 1,
              a
            )
          }
        )
      ] }, r._ui.id);
    })
  ] });
});
function gE(e, t) {
  return gE = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
    return n.__proto__ = r, n;
  }, gE(e, t);
}
function pq(e, t) {
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, gE(e, t);
}
const t4 = {
  disabled: !1
}, Kb = P.createContext(null);
var Sd = "unmounted", hs = "exited", gs = "entering", Uu = "entered", yE = "exiting", Ha = /* @__PURE__ */ function(e) {
  pq(t, e);
  function t(r, o) {
    var i;
    i = e.call(this, r, o) || this;
    var a = o, l = a && !a.isMounting ? r.enter : r.appear, s;
    return i.appearStatus = null, r.in ? l ? (s = hs, i.appearStatus = gs) : s = Uu : r.unmountOnExit || r.mountOnEnter ? s = Sd : s = hs, i.state = {
      status: s
    }, i.nextCallback = null, i;
  }
  t.getDerivedStateFromProps = function(r, o) {
    var i = r.in;
    return i && o.status === Sd ? {
      status: hs
    } : null;
  };
  var n = t.prototype;
  return n.componentDidMount = function() {
    this.updateStatus(!0, this.appearStatus);
  }, n.componentDidUpdate = function(r) {
    var o = null;
    if (r !== this.props) {
      var i = this.state.status;
      this.props.in ? i !== gs && i !== Uu && (o = gs) : (i === gs || i === Uu) && (o = yE);
    }
    this.updateStatus(!1, o);
  }, n.componentWillUnmount = function() {
    this.cancelNextCallback();
  }, n.getTimeouts = function() {
    var r = this.props.timeout, o, i, a;
    return o = i = a = r, r != null && typeof r != "number" && (o = r.exit, i = r.enter, a = r.appear !== void 0 ? r.appear : i), {
      exit: o,
      enter: i,
      appear: a
    };
  }, n.updateStatus = function(r, o) {
    r === void 0 && (r = !1), o !== null ? (this.cancelNextCallback(), o === gs ? this.performEnter(r) : this.performExit()) : this.props.unmountOnExit && this.state.status === hs && this.setState({
      status: Sd
    });
  }, n.performEnter = function(r) {
    var o = this, i = this.props.enter, a = this.context ? this.context.isMounting : r, l = this.props.nodeRef ? [a] : [Vk.findDOMNode(this), a], s = l[0], c = l[1], p = this.getTimeouts(), f = a ? p.appear : p.enter;
    if (!r && !i || t4.disabled) {
      this.safeSetState({
        status: Uu
      }, function() {
        o.props.onEntered(s);
      });
      return;
    }
    this.props.onEnter(s, c), this.safeSetState({
      status: gs
    }, function() {
      o.props.onEntering(s, c), o.onTransitionEnd(f, function() {
        o.safeSetState({
          status: Uu
        }, function() {
          o.props.onEntered(s, c);
        });
      });
    });
  }, n.performExit = function() {
    var r = this, o = this.props.exit, i = this.getTimeouts(), a = this.props.nodeRef ? void 0 : Vk.findDOMNode(this);
    if (!o || t4.disabled) {
      this.safeSetState({
        status: hs
      }, function() {
        r.props.onExited(a);
      });
      return;
    }
    this.props.onExit(a), this.safeSetState({
      status: yE
    }, function() {
      r.props.onExiting(a), r.onTransitionEnd(i.exit, function() {
        r.safeSetState({
          status: hs
        }, function() {
          r.props.onExited(a);
        });
      });
    });
  }, n.cancelNextCallback = function() {
    this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
  }, n.safeSetState = function(r, o) {
    o = this.setNextCallback(o), this.setState(r, o);
  }, n.setNextCallback = function(r) {
    var o = this, i = !0;
    return this.nextCallback = function(a) {
      i && (i = !1, o.nextCallback = null, r(a));
    }, this.nextCallback.cancel = function() {
      i = !1;
    }, this.nextCallback;
  }, n.onTransitionEnd = function(r, o) {
    this.setNextCallback(o);
    var i = this.props.nodeRef ? this.props.nodeRef.current : Vk.findDOMNode(this), a = r == null && !this.props.addEndListener;
    if (!i || a) {
      setTimeout(this.nextCallback, 0);
      return;
    }
    if (this.props.addEndListener) {
      var l = this.props.nodeRef ? [this.nextCallback] : [i, this.nextCallback], s = l[0], c = l[1];
      this.props.addEndListener(s, c);
    }
    r != null && setTimeout(this.nextCallback, r);
  }, n.render = function() {
    var r = this.state.status;
    if (r === Sd)
      return null;
    var o = this.props, i = o.children;
    o.in, o.mountOnEnter, o.unmountOnExit, o.appear, o.enter, o.exit, o.timeout, o.addEndListener, o.onEnter, o.onEntering, o.onEntered, o.onExit, o.onExiting, o.onExited, o.nodeRef;
    var a = LP(o, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
    return (
      // allows for nested Transitions
      /* @__PURE__ */ P.createElement(Kb.Provider, {
        value: null
      }, typeof i == "function" ? i(r, a) : P.cloneElement(P.Children.only(i), a))
    );
  }, t;
}(P.Component);
Ha.contextType = Kb;
Ha.propTypes = {};
function $u() {
}
Ha.defaultProps = {
  in: !1,
  mountOnEnter: !1,
  unmountOnExit: !1,
  appear: !1,
  enter: !0,
  exit: !0,
  onEnter: $u,
  onEntering: $u,
  onEntered: $u,
  onExit: $u,
  onExiting: $u,
  onExited: $u
};
Ha.UNMOUNTED = Sd;
Ha.EXITED = hs;
Ha.ENTERING = gs;
Ha.ENTERED = Uu;
Ha.EXITING = yE;
const kIe = Ha;
function _Ie(e) {
  if (e === void 0)
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e;
}
function n2(e, t) {
  var n = function(o) {
    return t && b.isValidElement(o) ? t(o) : o;
  }, r = /* @__PURE__ */ Object.create(null);
  return e && b.Children.map(e, function(o) {
    return o;
  }).forEach(function(o) {
    r[o.key] = n(o);
  }), r;
}
function OIe(e, t) {
  e = e || {}, t = t || {};
  function n(p) {
    return p in t ? t[p] : e[p];
  }
  var r = /* @__PURE__ */ Object.create(null), o = [];
  for (var i in e)
    i in t ? o.length && (r[i] = o, o = []) : o.push(i);
  var a, l = {};
  for (var s in t) {
    if (r[s])
      for (a = 0; a < r[s].length; a++) {
        var c = r[s][a];
        l[r[s][a]] = n(c);
      }
    l[s] = n(s);
  }
  for (a = 0; a < o.length; a++)
    l[o[a]] = n(o[a]);
  return l;
}
function Rs(e, t, n) {
  return n[t] != null ? n[t] : e.props[t];
}
function EIe(e, t) {
  return n2(e.children, function(n) {
    return b.cloneElement(n, {
      onExited: t.bind(null, n),
      in: !0,
      appear: Rs(n, "appear", e),
      enter: Rs(n, "enter", e),
      exit: Rs(n, "exit", e)
    });
  });
}
function CIe(e, t, n) {
  var r = n2(e.children), o = OIe(t, r);
  return Object.keys(o).forEach(function(i) {
    var a = o[i];
    if (b.isValidElement(a)) {
      var l = i in t, s = i in r, c = t[i], p = b.isValidElement(c) && !c.props.in;
      s && (!l || p) ? o[i] = b.cloneElement(a, {
        onExited: n.bind(null, a),
        in: !0,
        exit: Rs(a, "exit", e),
        enter: Rs(a, "enter", e)
      }) : !s && l && !p ? o[i] = b.cloneElement(a, {
        in: !1
      }) : s && l && b.isValidElement(c) && (o[i] = b.cloneElement(a, {
        onExited: n.bind(null, a),
        in: c.props.in,
        exit: Rs(a, "exit", e),
        enter: Rs(a, "enter", e)
      }));
    }
  }), o;
}
var PIe = Object.values || function(e) {
  return Object.keys(e).map(function(t) {
    return e[t];
  });
}, RIe = {
  component: "div",
  childFactory: function(e) {
    return e;
  }
}, r2 = /* @__PURE__ */ function(e) {
  pq(t, e);
  function t(r, o) {
    var i;
    i = e.call(this, r, o) || this;
    var a = i.handleExited.bind(_Ie(i));
    return i.state = {
      contextValue: {
        isMounting: !0
      },
      handleExited: a,
      firstRender: !0
    }, i;
  }
  var n = t.prototype;
  return n.componentDidMount = function() {
    this.mounted = !0, this.setState({
      contextValue: {
        isMounting: !1
      }
    });
  }, n.componentWillUnmount = function() {
    this.mounted = !1;
  }, t.getDerivedStateFromProps = function(r, o) {
    var i = o.children, a = o.handleExited, l = o.firstRender;
    return {
      children: l ? EIe(r, a) : CIe(r, i, a),
      firstRender: !1
    };
  }, n.handleExited = function(r, o) {
    var i = n2(this.props.children);
    r.key in i || (r.props.onExited && r.props.onExited(o), this.mounted && this.setState(function(a) {
      var l = qt({}, a.children);
      return delete l[r.key], {
        children: l
      };
    }));
  }, n.render = function() {
    var r = this.props, o = r.component, i = r.childFactory, a = LP(r, ["component", "childFactory"]), l = this.state.contextValue, s = PIe(this.state.children).map(i);
    return delete a.appear, delete a.enter, delete a.exit, o === null ? /* @__PURE__ */ P.createElement(Kb.Provider, {
      value: l
    }, s) : /* @__PURE__ */ P.createElement(Kb.Provider, {
      value: l
    }, /* @__PURE__ */ P.createElement(o, a, s));
  }, t;
}(P.Component);
r2.propTypes = {};
r2.defaultProps = RIe;
const TIe = r2, [jIe, qp] = fue("mantine-notifications"), mq = qp("show"), NIe = qp("hide"), $Ie = qp("clean"), IIe = qp("cleanQueue"), AIe = qp("update"), Gp = {
  show: mq,
  hide: NIe,
  clean: $Ie,
  cleanQueue: IIe,
  update: AIe
};
function zIe([e, t], n) {
  const r = {};
  return e === "top" && (r.top = n), e === "bottom" && (r.bottom = n), t === "left" && (r.left = n), t === "right" && (r.right = n), t === "center" && (r.left = "50%", r.transform = "translateX(-50%)"), r;
}
var LIe = Object.defineProperty, n4 = Object.getOwnPropertySymbols, DIe = Object.prototype.hasOwnProperty, FIe = Object.prototype.propertyIsEnumerable, r4 = (e, t, n) => t in e ? LIe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, o4 = (e, t) => {
  for (var n in t || (t = {}))
    DIe.call(t, n) && r4(e, n, t[n]);
  if (n4)
    for (var n of n4(t))
      FIe.call(t, n) && r4(e, n, t[n]);
  return e;
};
const i4 = {
  left: "translateX(-100%)",
  right: "translateX(100%)",
  "top-center": "translateY(-100%)",
  "bottom-center": "translateY(100%)"
}, MIe = {
  left: "translateX(0)",
  right: "translateX(0)",
  "top-center": "translateY(0)",
  "bottom-center": "translateY(0)"
};
function BIe({
  state: e,
  maxHeight: t,
  positioning: n,
  transitionDuration: r
}) {
  const [o, i] = n, a = i === "center" ? `${o}-center` : i, l = {
    opacity: 0,
    maxHeight: t,
    transform: i4[a],
    transitionDuration: `${r}ms, ${r}ms, ${r}ms`,
    transitionTimingFunction: "cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",
    transitionProperty: "opacity, transform, max-height"
  }, s = {
    opacity: 1,
    transform: MIe[a]
  }, c = {
    opacity: 0,
    maxHeight: 0,
    transform: i4[a]
  }, p = {
    entering: s,
    entered: s,
    exiting: c,
    exited: c
  };
  return o4(o4({}, l), p[e]);
}
function UIe(e, t) {
  return typeof t == "number" ? t : t === !1 || e === !1 ? !1 : e;
}
var HIe = Object.defineProperty, WIe = Object.defineProperties, VIe = Object.getOwnPropertyDescriptors, Yb = Object.getOwnPropertySymbols, hq = Object.prototype.hasOwnProperty, gq = Object.prototype.propertyIsEnumerable, a4 = (e, t, n) => t in e ? HIe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, l4 = (e, t) => {
  for (var n in t || (t = {}))
    hq.call(t, n) && a4(e, n, t[n]);
  if (Yb)
    for (var n of Yb(t))
      gq.call(t, n) && a4(e, n, t[n]);
  return e;
}, qIe = (e, t) => WIe(e, VIe(t)), s4 = (e, t) => {
  var n = {};
  for (var r in e)
    hq.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Yb)
    for (var r of Yb(e))
      t.indexOf(r) < 0 && gq.call(e, r) && (n[r] = e[r]);
  return n;
};
function yq(e) {
  var t = e, {
    notification: n,
    autoClose: r,
    onHide: o,
    innerRef: i
  } = t, a = s4(t, [
    "notification",
    "autoClose",
    "onHide",
    "innerRef"
  ]);
  const l = n, { autoClose: s, message: c } = l, p = s4(l, ["autoClose", "message"]), f = UIe(r, s), m = b.useRef(), h = () => {
    o(n.id), window.clearTimeout(m.current);
  }, g = () => {
    clearTimeout(m.current);
  }, v = () => {
    typeof f == "number" && (m.current = window.setTimeout(h, f));
  };
  return b.useEffect(() => {
    typeof n.onOpen == "function" && n.onOpen(n);
  }, []), b.useEffect(() => (v(), g), [r, n.autoClose]), /* @__PURE__ */ P.createElement(kH, qIe(l4(l4({}, p), a), {
    onClose: h,
    onMouseEnter: g,
    onMouseLeave: v,
    ref: i
  }), c);
}
yq.displayName = "@mantine/notifications/NotificationContainer";
var GIe = Ee((e, { zIndex: t }) => ({
  notifications: {
    width: `calc(100% - ${e.spacing.md} * 2)`,
    boxSizing: "border-box",
    position: "fixed",
    zIndex: t
  },
  notification: {
    "&:not(:first-of-type)": {
      marginTop: e.spacing.sm
    }
  }
})), KIe = Object.defineProperty, YIe = Object.defineProperties, XIe = Object.getOwnPropertyDescriptors, u4 = Object.getOwnPropertySymbols, ZIe = Object.prototype.hasOwnProperty, QIe = Object.prototype.propertyIsEnumerable, c4 = (e, t, n) => t in e ? KIe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, JIe = (e, t) => {
  for (var n in t || (t = {}))
    ZIe.call(t, n) && c4(e, n, t[n]);
  if (u4)
    for (var n of u4(t))
      QIe.call(t, n) && c4(e, n, t[n]);
  return e;
}, e5e = (e, t) => YIe(e, XIe(t));
function t5e({ limit: e }) {
  const { state: t, queue: n, update: r, cleanQueue: o } = Dfe({
    initialValues: [],
    limit: e
  });
  return {
    notifications: t,
    queue: n,
    showNotification: (i) => {
      const a = i.id || yx();
      return r((l) => i.id && l.some((s) => s.id === i.id) ? l : [...l, e5e(JIe({}, i), { id: a })]), a;
    },
    updateNotification: (i) => r((a) => {
      const l = a.findIndex((c) => c.id === i.id);
      if (l === -1)
        return a;
      const s = [...a];
      return s[l] = i, s;
    }),
    hideNotification: (i) => r((a) => a.filter((l) => l.id === i ? (typeof l.onClose == "function" && l.onClose(l), !1) : !0)),
    cleanQueue: o,
    clean: () => r(() => [])
  };
}
var n5e = Object.defineProperty, Xb = Object.getOwnPropertySymbols, vq = Object.prototype.hasOwnProperty, bq = Object.prototype.propertyIsEnumerable, f4 = (e, t, n) => t in e ? n5e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, J_ = (e, t) => {
  for (var n in t || (t = {}))
    vq.call(t, n) && f4(e, n, t[n]);
  if (Xb)
    for (var n of Xb(t))
      bq.call(t, n) && f4(e, n, t[n]);
  return e;
}, r5e = (e, t) => {
  var n = {};
  for (var r in e)
    vq.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Xb)
    for (var r of Xb(e))
      t.indexOf(r) < 0 && bq.call(e, r) && (n[r] = e[r]);
  return n;
};
const o5e = [
  "top-left",
  "top-right",
  "top-center",
  "bottom-left",
  "bottom-right",
  "bottom-center"
], tu = (e) => {
  var t = e, {
    className: n,
    position: r = "bottom-right",
    autoClose: o = 4e3,
    transitionDuration: i = 250,
    containerWidth: a = F(440),
    notificationMaxHeight: l = F(200),
    limit: s = 5,
    zIndex: c = Ji("overlay"),
    style: p,
    children: f,
    target: m
  } = t, h = r5e(t, [
    "className",
    "position",
    "autoClose",
    "transitionDuration",
    "containerWidth",
    "notificationMaxHeight",
    "limit",
    "zIndex",
    "style",
    "children",
    "target"
  ]);
  const g = Ife(), v = b.useRef({}), S = b.useRef(0), {
    notifications: w,
    showNotification: x,
    updateNotification: k,
    hideNotification: E,
    clean: O,
    cleanQueue: C
  } = t5e({ limit: s }), { classes: R, cx: L, theme: D } = GIe({ zIndex: c }), N = ef(), H = D.respectReducedMotion && N ? 1 : i, B = (o5e.includes(r) ? r : "bottom-right").split("-");
  Hr(() => {
    w.length > S.current && setTimeout(() => g(), 0), S.current = w.length;
  }, [w]), jIe({
    show: x,
    hide: E,
    update: k,
    clean: O,
    cleanQueue: C
  });
  const K = w.map((W) => /* @__PURE__ */ P.createElement(kIe, {
    key: W.id,
    timeout: H,
    onEnter: () => v.current[W.id].offsetHeight,
    nodeRef: { current: v.current[W.id] }
  }, (U) => /* @__PURE__ */ P.createElement(yq, {
    innerRef: (Q) => {
      v.current[W.id] = Q;
    },
    notification: W,
    onHide: E,
    className: R.notification,
    autoClose: o,
    sx: [
      J_({}, BIe({
        state: U,
        positioning: B,
        transitionDuration: H,
        maxHeight: l
      })),
      ...Array.isArray(W.sx) ? W.sx : [W.sx]
    ]
  })));
  return /* @__PURE__ */ P.createElement(uP, {
    target: m
  }, /* @__PURE__ */ P.createElement(qe, J_({
    className: L(R.notifications, n),
    style: p,
    sx: J_({
      maxWidth: a
    }, zIe(B, D.spacing.md))
  }, h), /* @__PURE__ */ P.createElement(TIe, null, K)));
};
tu.displayName = "@mantine/notifications/Notifications";
tu.show = Gp.show;
tu.hide = Gp.hide;
tu.update = Gp.update;
tu.clean = Gp.clean;
tu.cleanQueue = Gp.cleanQueue;
const i5e = {
  info: "blue",
  success: "green",
  warning: "yellow",
  error: "red"
};
function a5e({
  children: e,
  showNotification: t
}) {
  const n = b.useCallback(
    (o) => mq({
      ...o,
      color: i5e[o.type ?? "info"]
    }),
    []
  ), r = b.useMemo(
    () => ({
      showNotification: t ?? n
    }),
    [n, t]
  );
  return /* @__PURE__ */ $.jsxs($x.Provider, { value: r, children: [
    !t && /* @__PURE__ */ $.jsx(tu, {}),
    e
  ] });
}
function l5e({
  aiconfig: e,
  callbacks: t,
  mode: n,
  readOnly: r = !1
}) {
  var o;
  const [i, a] = b.useState(!1), [l, s] = b.useState("OK"), [c, p] = b.useReducer(
    YEe,
    XEe(e)
  ), { showNotification: f } = b.useContext($x), m = b.useRef(c);
  m.current = c;
  const h = t == null ? void 0 : t.logEventHandler, g = t == null ? void 0 : t.download, v = t == null ? void 0 : t.openInTextEditor, S = b.useCallback(async () => {
    if (g)
      try {
        await g(), h == null || h("DOWNLOAD_BUTTON_CLICKED");
      } catch (oe) {
        const ae = oe.message ?? null;
        f({
          title: "Error downloading AIConfig",
          message: ae,
          type: "error"
        });
      }
  }, [g, h, f]), w = t == null ? void 0 : t.share, x = b.useCallback(async () => {
    if (w)
      try {
        const { share_url: oe } = await w();
        return h == null || h("SHARE_BUTTON_CLICKED"), oe;
      } catch (oe) {
        const ae = oe.message ?? null;
        f({
          title: "Error sharing AIConfig",
          message: ae,
          type: "error"
        });
      }
  }, [h, w, f]), k = t == null ? void 0 : t.save, E = b.useCallback(async () => {
    if (k) {
      a(!0);
      try {
        await k(xA(m.current)), p({
          type: "SAVE_CONFIG_SUCCESS"
        });
      } catch (oe) {
        const ae = oe.message ?? null;
        f({
          title: "Error saving",
          message: ae,
          type: "error"
        });
      } finally {
        a(!1);
      }
    }
  }, [k, f]), O = t == null ? void 0 : t.updatePrompt, C = b.useMemo(() => {
    if (O)
      return Lr.debounce(
        async (oe, ae, Ie, Ce) => {
          try {
            const ye = await O(
              oe,
              ae
            );
            ye != null && ye.aiconfig && Ie(ye.aiconfig);
          } catch (ye) {
            Ce(ye);
          }
        },
        Mu
      );
  }, [O]), R = b.useCallback(
    async (oe, ae) => {
      if (!C)
        return;
      const Ie = {
        type: "UPDATE_PROMPT_INPUT",
        id: oe,
        input: ae
      };
      p(Ie), h == null || h("UPDATE_PROMPT_INPUT");
      const Ce = (ye) => {
        const we = ye.message ?? null;
        f({
          title: "Error updating prompt input",
          message: we,
          type: "error"
        });
      };
      try {
        const ye = _i(m.current, oe);
        if (!ye)
          throw new Error(`Could not find prompt with id ${oe}`);
        const we = JO(ye);
        await C(
          we.name,
          {
            ...we,
            input: ae
          },
          (Ge) => p({
            type: "CONSOLIDATE_AICONFIG",
            action: Ie,
            config: Ge
          }),
          Ce
        );
      } catch (ye) {
        Ce(ye);
      }
    },
    [C, p, h, f]
  ), L = b.useCallback(
    async (oe, ae) => {
      if (!C)
        return;
      const Ie = (Ce) => {
        const ye = Ce.message ?? null;
        f({
          title: "Error updating prompt name",
          message: ye,
          type: "error"
        });
      };
      try {
        const Ce = _i(m.current, oe);
        if (!Ce)
          throw new Error(`Could not find prompt with id ${oe}`);
        const ye = JO(Ce);
        await C(
          ye.name,
          {
            ...ye,
            name: ae
          },
          // PromptName component maintains local state for the name to show in the UI
          // We cannot update client config state until the name is successfully set server-side
          // or else we could end up referencing a prompt name that is not set server-side
          () => {
            p({
              type: "UPDATE_PROMPT_NAME",
              id: oe,
              name: ae
            }), h == null || h("UPDATE_PROMPT_NAME");
          },
          Ie
        );
      } catch (Ce) {
        Ie(Ce);
      }
    },
    [C, h, f]
  ), D = t == null ? void 0 : t.updateModel, N = b.useMemo(() => {
    if (D)
      return Lr.debounce(
        async (oe, ae) => {
          try {
            await D(oe);
          } catch (Ie) {
            ae(Ie);
          }
        },
        Mu
      );
  }, [D]), H = b.useCallback(
    async (oe, ae) => {
      if (!N)
        return;
      p({
        type: "UPDATE_PROMPT_MODEL_SETTINGS",
        id: oe,
        modelSettings: ae
      }), h == null || h("UPDATE_PROMPT_MODEL_SETTINGS");
      const Ie = (Ce) => {
        const ye = Ce.message ?? null;
        f({
          title: "Error updating prompt model settings",
          message: ye,
          type: "error"
        });
      };
      try {
        const Ce = _i(m.current, oe);
        if (!Ce)
          throw new Error(`Could not find prompt with id ${oe}`);
        const ye = $c(
          Ce,
          m.current.metadata.default_model
        );
        if (!ye)
          throw new Error(`Could not find model name for prompt ${oe}`);
        await N(
          {
            modelName: ye,
            settings: ae,
            promptName: Ce.name
          },
          Ie
        );
      } catch (Ce) {
        Ie(Ce);
      }
    },
    [N, p, h, f]
  ), B = b.useCallback(
    async (oe, ae) => {
      if (!N)
        return;
      p({
        type: "UPDATE_PROMPT_MODEL",
        id: oe,
        modelName: ae
      }), h == null || h("UPDATE_PROMPT_MODEL", { model: ae });
      const Ie = (Ce) => {
        const ye = Ce.message ?? null;
        f({
          title: "Error updating model for prompt",
          message: ye,
          type: "error"
        });
      };
      try {
        const Ce = _i(m.current, oe);
        if (!Ce)
          throw new Error(`Could not find prompt with id ${oe}`);
        await N(
          {
            modelName: ae,
            promptName: Ce.name
          },
          Ie
        );
      } catch (Ce) {
        Ie(Ce);
      }
    },
    [p, N, h, f]
  ), K = t == null ? void 0 : t.setParameters, W = b.useMemo(() => {
    if (K)
      return Lr.debounce(
        async (oe, ae, Ie) => {
          try {
            await K(oe, ae);
          } catch (Ce) {
            Ie == null || Ie(Ce);
          }
        },
        Mu
      );
  }, [K]), U = b.useCallback(
    async (oe) => {
      if (!W)
        return;
      p({
        type: "UPDATE_GLOBAL_PARAMETERS",
        parameters: oe
      }), h == null || h("UPDATE_GLOBAL_PARAMETERS");
      const ae = (Ie) => {
        const Ce = Ie.message ?? null;
        f({
          title: "Error setting global parameters",
          message: Ce,
          type: "error"
        });
      };
      try {
        await W(
          oe,
          void 0,
          ae
        );
      } catch (Ie) {
        ae(Ie);
      }
    },
    [W, p, h, f]
  ), Q = b.useCallback(
    async (oe, ae) => {
      if (!W)
        return;
      p({
        type: "UPDATE_PROMPT_PARAMETERS",
        id: oe,
        parameters: ae
      }), h == null || h("UPDATE_PROMPT_PARAMETERS");
      const Ie = (Ce) => {
        var ye;
        const we = Ce.message ?? null, Ge = ((ye = _i(m.current, oe)) == null ? void 0 : ye.name) ?? oe;
        f({
          title: `Error setting parameters for prompt ${Ge}`,
          message: we,
          type: "error"
        });
      };
      try {
        const Ce = _i(m.current, oe);
        if (!Ce)
          throw new Error(`Could not find prompt with id ${oe}`);
        await W(ae, Ce.name, Ie);
      } catch (Ce) {
        Ie(Ce);
      }
    },
    [W, p, h, f]
  ), J = t == null ? void 0 : t.addPrompt, q = b.useCallback(
    async (oe, ae) => {
      if (!J)
        return;
      const Ie = ZEe(
        m.current
      ), Ce = {
        name: Ie,
        input: qEe(ae),
        metadata: {
          model: ae
        }
      }, ye = {
        type: "ADD_PROMPT_AT_INDEX",
        index: oe,
        prompt: {
          ...Ce,
          _ui: {
            id: Lr.uniqueId()
          }
        }
      };
      p(ye), h == null || h("ADD_PROMPT", { model: ae, promptIndex: oe });
      try {
        const we = await J(
          Ie,
          Ce,
          oe
        );
        p({
          type: "CONSOLIDATE_AICONFIG",
          action: ye,
          config: we.aiconfig
        });
      } catch (we) {
        const Ge = we.message ?? null;
        f({
          title: "Error adding prompt to config",
          message: Ge,
          type: "error"
        });
      }
    },
    [J, h, f]
  ), ee = t == null ? void 0 : t.deletePrompt, A = b.useCallback(
    async (oe) => {
      if (ee) {
        p({
          type: "DELETE_PROMPT",
          id: oe
        }), h == null || h("DELETE_PROMPT");
        try {
          const ae = _i(m.current, oe);
          if (!ae)
            throw new Error(`Could not find prompt with id ${oe}`);
          await ee(ae.name);
        } catch (ae) {
          const Ie = ae.message ?? null;
          f({
            title: "Error deleting prompt",
            message: Ie,
            type: "error"
          });
        }
      }
    },
    [ee, p, h, f]
  ), X = t == null ? void 0 : t.clearOutputs, ie = b.useCallback(async () => {
    if (X) {
      p({
        type: "CLEAR_OUTPUTS"
      }), h == null || h("CLEAR_OUTPUTS");
      try {
        await X();
      } catch (oe) {
        const ae = oe.message ?? null;
        f({
          title: "Error clearing outputs",
          message: ae,
          type: "error"
        });
      }
    }
  }, [X, p, h, f]), j = t == null ? void 0 : t.runPrompt, le = b.useCallback(
    async (oe) => {
      if (!j)
        return;
      const ae = LEe();
      p({
        // This sets the isRunning and runningPromptId flags
        type: "RUN_PROMPT_START",
        promptId: oe,
        cancellationToken: ae
      }), h == null || h("RUN_PROMPT_START");
      const Ie = (Ce) => {
        var ye;
        p({
          type: "RUN_PROMPT_ERROR",
          promptId: oe,
          message: Ce ?? void 0
        }), h == null || h("RUN_PROMPT_ERROR");
        const we = (ye = _i(m.current, oe)) == null ? void 0 : ye.name;
        f({
          title: `Error running prompt${we ? ` ${we}` : ""}`,
          message: Ce,
          type: "error"
        });
      };
      try {
        const Ce = _i(m.current, oe);
        if (!Ce)
          throw new Error(`Could not find prompt with id ${oe}`);
        const ye = Ce.name, we = QEe(
          Ce,
          m.current
        ), Ge = await j(
          ye,
          ($e) => {
            $e.type === "output_chunk" ? p({
              type: "STREAM_OUTPUT_CHUNK",
              promptId: oe,
              output: $e.data
            }) : $e.type === "aiconfig_chunk" ? p({
              type: "STREAM_AICONFIG_CHUNK",
              config: $e.data
            }) : $e.type === "stop_streaming" && (p({
              type: "RUN_PROMPT_SUCCESS",
              promptId: oe
            }), h == null || h("RUN_PROMPT_SUCCESS"));
          },
          ($e) => {
            var ue;
            if (console.log(
              `Error running prompt ${ye}: ${JSON.stringify($e)}`
            ), $e.type === "error")
              if ($e.data.code === 499) {
                p({
                  type: "RUN_PROMPT_CANCEL",
                  promptId: oe,
                  // Returned config output is reset to before running RUN_PROMPT
                  config: $e.data.data
                }), h == null || h("RUN_PROMPT_CANCELED");
                const Pe = (ue = _i(m.current, oe)) == null ? void 0 : ue.name;
                f({
                  title: `Execution interrupted for prompt${Pe ? ` '${Pe}'` : ""}. Resetting output to previous state.`,
                  message: $e.data.message,
                  type: "warning"
                });
              } else
                Ie($e.data.message);
          },
          we,
          ae
        );
        Ge != null && Ge.aiconfig && (p({
          type: "RUN_PROMPT_SUCCESS",
          promptId: oe,
          config: Ge.aiconfig
        }), h == null || h("RUN_PROMPT_SUCCESS"));
      } catch (Ce) {
        const ye = Ce.message ?? null;
        Ie(ye);
      }
    },
    [h, j, f]
  ), re = t == null ? void 0 : t.setConfigName, he = b.useMemo(() => {
    if (re)
      return Lr.debounce(async (oe, ae) => {
        try {
          await re(oe);
        } catch (Ie) {
          ae(Ie);
        }
      }, Mu);
  }, [re]), xe = b.useCallback(
    async (oe) => {
      he && (p({
        type: "SET_NAME",
        name: oe
      }), h == null || h("SET_NAME"), await he(oe, (ae) => {
        const Ie = ae.message ?? null;
        f({
          title: "Error setting config name",
          message: Ie,
          type: "error"
        });
      }));
    },
    [he, h, f]
  ), ke = t == null ? void 0 : t.setConfigDescription, Ae = b.useMemo(() => {
    if (ke)
      return Lr.debounce(
        async (oe, ae) => {
          try {
            await ke(oe);
          } catch (Ie) {
            ae(Ie);
          }
        },
        Mu
      );
  }, [ke]), pe = b.useCallback(
    async (oe) => {
      Ae && (p({
        type: "SET_DESCRIPTION",
        description: oe
      }), h == null || h("SET_DESCRIPTION"), await Ae(oe, (ae) => {
        const Ie = ae.message ?? null;
        f({
          title: "Error setting config description",
          message: Ie,
          type: "error"
        });
      }));
    },
    [Ae, h, f]
  ), Me = b.useCallback(() => m.current, []), We = b.useMemo(
    () => ({
      getState: Me,
      logEventHandler: h,
      mode: n,
      readOnly: r
    }),
    [Me, h, n, r]
  ), ze = c._ui.isDirty !== !1;
  b.useEffect(() => {
    if (!ze || !k)
      return;
    const oe = setInterval(E, wCe);
    return () => clearInterval(oe);
  }, [ze, E, k]), b.useEffect(() => {
    if (!k)
      return;
    const oe = (ae) => {
      ae.key === "s" && (ae.metaKey || ae.ctrlKey) && (ae.preventDefault(), m.current._ui.isDirty && E());
    };
    return window.addEventListener("keydown", oe, !1), () => window.removeEventListener("keydown", oe);
  }, [E, k]);
  const Fe = t == null ? void 0 : t.getServerStatus;
  b.useEffect(() => {
    if (!Fe || l !== "OK")
      return;
    const oe = setInterval(async () => {
      try {
        const ae = await Fe();
        s(ae.status);
      } catch {
        s("ERROR");
      }
    }, xCe);
    return () => clearInterval(oe);
  }, [Fe, l]);
  const Ye = c._ui.runningPromptId;
  return /* @__PURE__ */ $.jsx(kn.Provider, { value: We, children: /* @__PURE__ */ $.jsxs(Js, { className: "editorBackground", maw: "80rem", children: [
    l !== "OK" && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
      /* @__PURE__ */ $.jsx("div", { style: { height: "100px" } }),
      /* @__PURE__ */ $.jsxs(
        cP,
        {
          color: "red",
          title: "Server Connection Error",
          w: "100%",
          style: { position: "fixed", top: 0, zIndex: 999 },
          children: [
            /* @__PURE__ */ $.jsx(Ft, { children: "There is a problem with the editor server connection. Please copy important changes somewhere safe and then try reloading the page or restarting the editor." }),
            /* @__PURE__ */ $.jsxs(jt, { align: "center", children: [
              /* @__PURE__ */ $.jsx(
                JP,
                {
                  value: JSON.stringify(
                    xA(c),
                    null,
                    2
                  ),
                  contentLabel: "AIConfig JSON"
                }
              ),
              /* @__PURE__ */ $.jsx(Ft, { color: "dimmed", children: "Click to copy current AIConfig JSON" })
            ] })
          ]
        }
      )
    ] }),
    /* @__PURE__ */ $.jsxs("div", { children: [
      /* @__PURE__ */ $.jsx(jt, { justify: "flex-end", pt: "md", mb: "xs", children: /* @__PURE__ */ $.jsxs(As, { spacing: "xs", children: [
        !r && ie && /* @__PURE__ */ $.jsx(
          Hs,
          {
            loading: void 0,
            onClick: ie,
            size: "xs",
            variant: "gradient",
            children: "Clear Outputs"
          }
        ),
        (g || w) && /* @__PURE__ */ $.jsxs("div", { children: [
          g && /* @__PURE__ */ $.jsx(
            V1e,
            {
              onDownload: S,
              isGrouped: w != null
            }
          ),
          w && /* @__PURE__ */ $.jsx(
            G1e,
            {
              onShare: x,
              isGrouped: g != null
            }
          )
        ] }),
        v && /* @__PURE__ */ $.jsx(fr, { label: "Open in Text Editor", withArrow: !0, children: /* @__PURE__ */ $.jsx(
          jn,
          {
            onClick: v,
            className: "secondaryButton",
            children: /* @__PURE__ */ $.jsx(FP, { size: "1rem" })
          }
        ) }),
        !r && k && /* @__PURE__ */ $.jsx(
          fr,
          {
            label: ze ? "Save changes to config" : "No unsaved changes",
            children: /* @__PURE__ */ $.jsx(
              Hs,
              {
                leftIcon: /* @__PURE__ */ $.jsx(cCe, {}),
                loading: i,
                onClick: () => {
                  E(), h == null || h("SAVE_BUTTON_CLICKED");
                },
                disabled: !ze,
                size: "xs",
                variant: "gradient",
                children: "Save"
              }
            )
          }
        )
      ] }) }),
      /* @__PURE__ */ $.jsx(
        L1e,
        {
          name: c.name,
          description: c.description,
          setDescription: pe,
          setName: xe
        }
      )
    ] }),
    /* @__PURE__ */ $.jsx(
      kCe,
      {
        initialValue: ((o = c == null ? void 0 : c.metadata) == null ? void 0 : o.parameters) ?? {},
        onUpdateParameters: U
      }
    ),
    /* @__PURE__ */ $.jsx(
      SIe,
      {
        cancelRunPrompt: t == null ? void 0 : t.cancel,
        defaultModel: c.metadata.default_model,
        getModels: t == null ? void 0 : t.getModels,
        onAddPrompt: q,
        onChangePromptInput: R,
        onChangePromptName: L,
        onDeletePrompt: A,
        onRunPrompt: le,
        onUpdatePromptModel: B,
        onUpdatePromptModelSettings: H,
        onUpdatePromptParameters: Q,
        prompts: c.prompts,
        runningPromptId: Ye
      }
    )
  ] }) });
}
function s5e(e) {
  var t;
  return /* @__PURE__ */ $.jsx(
    H1e,
    {
      mode: e.mode,
      themeMode: e.themeMode,
      themeOverride: e.themeOverride,
      children: /* @__PURE__ */ $.jsx(
        a5e,
        {
          showNotification: (t = e.callbacks) == null ? void 0 : t.showNotification,
          children: /* @__PURE__ */ $.jsx(l5e, { ...e })
        }
      )
    }
  );
}
function wq(e) {
  const t = b.createContext(null);
  return [({ children: o, value: i }) => /* @__PURE__ */ P.createElement(t.Provider, {
    value: i
  }, o), () => {
    const o = b.useContext(t);
    if (o === null)
      throw new Error(e);
    return o;
  }];
}
function xq(e) {
  return Array.isArray(e) ? e : [e];
}
const u5e = () => {
};
function c5e(e, t = { active: !0 }) {
  return typeof e != "function" || !t.active ? t.onKeyDown || u5e : (n) => {
    var r;
    n.key === "Escape" && (e(n), (r = t.onTrigger) == null || r.call(t));
  };
}
function Zb(e, t) {
  return (n) => {
    e == null || e(n), t == null || t(n);
  };
}
function o2(e) {
  return Array.isArray(e) || e === null ? !1 : typeof e == "object" ? e.type !== P.Fragment : !1;
}
function Sq(e) {
  var t, n, r = "";
  if (typeof e == "string" || typeof e == "number")
    r += e;
  else if (typeof e == "object")
    if (Array.isArray(e))
      for (t = 0; t < e.length; t++)
        e[t] && (n = Sq(e[t])) && (r && (r += " "), r += n);
    else
      for (t in e)
        e[t] && (r && (r += " "), r += t);
  return r;
}
function kq() {
  for (var e = 0, t, n, r = ""; e < arguments.length; )
    (t = arguments[e++]) && (n = Sq(t)) && (r && (r += " "), r += n);
  return r;
}
const f5e = {
  dark: [
    "#C1C2C5",
    "#A6A7AB",
    "#909296",
    "#5c5f66",
    "#373A40",
    "#2C2E33",
    "#25262b",
    "#1A1B1E",
    "#141517",
    "#101113"
  ],
  gray: [
    "#f8f9fa",
    "#f1f3f5",
    "#e9ecef",
    "#dee2e6",
    "#ced4da",
    "#adb5bd",
    "#868e96",
    "#495057",
    "#343a40",
    "#212529"
  ],
  red: [
    "#fff5f5",
    "#ffe3e3",
    "#ffc9c9",
    "#ffa8a8",
    "#ff8787",
    "#ff6b6b",
    "#fa5252",
    "#f03e3e",
    "#e03131",
    "#c92a2a"
  ],
  pink: [
    "#fff0f6",
    "#ffdeeb",
    "#fcc2d7",
    "#faa2c1",
    "#f783ac",
    "#f06595",
    "#e64980",
    "#d6336c",
    "#c2255c",
    "#a61e4d"
  ],
  grape: [
    "#f8f0fc",
    "#f3d9fa",
    "#eebefa",
    "#e599f7",
    "#da77f2",
    "#cc5de8",
    "#be4bdb",
    "#ae3ec9",
    "#9c36b5",
    "#862e9c"
  ],
  violet: [
    "#f3f0ff",
    "#e5dbff",
    "#d0bfff",
    "#b197fc",
    "#9775fa",
    "#845ef7",
    "#7950f2",
    "#7048e8",
    "#6741d9",
    "#5f3dc4"
  ],
  indigo: [
    "#edf2ff",
    "#dbe4ff",
    "#bac8ff",
    "#91a7ff",
    "#748ffc",
    "#5c7cfa",
    "#4c6ef5",
    "#4263eb",
    "#3b5bdb",
    "#364fc7"
  ],
  blue: [
    "#e7f5ff",
    "#d0ebff",
    "#a5d8ff",
    "#74c0fc",
    "#4dabf7",
    "#339af0",
    "#228be6",
    "#1c7ed6",
    "#1971c2",
    "#1864ab"
  ],
  cyan: [
    "#e3fafc",
    "#c5f6fa",
    "#99e9f2",
    "#66d9e8",
    "#3bc9db",
    "#22b8cf",
    "#15aabf",
    "#1098ad",
    "#0c8599",
    "#0b7285"
  ],
  teal: [
    "#e6fcf5",
    "#c3fae8",
    "#96f2d7",
    "#63e6be",
    "#38d9a9",
    "#20c997",
    "#12b886",
    "#0ca678",
    "#099268",
    "#087f5b"
  ],
  green: [
    "#ebfbee",
    "#d3f9d8",
    "#b2f2bb",
    "#8ce99a",
    "#69db7c",
    "#51cf66",
    "#40c057",
    "#37b24d",
    "#2f9e44",
    "#2b8a3e"
  ],
  lime: [
    "#f4fce3",
    "#e9fac8",
    "#d8f5a2",
    "#c0eb75",
    "#a9e34b",
    "#94d82d",
    "#82c91e",
    "#74b816",
    "#66a80f",
    "#5c940d"
  ],
  yellow: [
    "#fff9db",
    "#fff3bf",
    "#ffec99",
    "#ffe066",
    "#ffd43b",
    "#fcc419",
    "#fab005",
    "#f59f00",
    "#f08c00",
    "#e67700"
  ],
  orange: [
    "#fff4e6",
    "#ffe8cc",
    "#ffd8a8",
    "#ffc078",
    "#ffa94d",
    "#ff922b",
    "#fd7e14",
    "#f76707",
    "#e8590c",
    "#d9480f"
  ]
};
function d5e(e) {
  return () => ({ fontFamily: e.fontFamily || "sans-serif" });
}
var p5e = Object.defineProperty, d4 = Object.getOwnPropertySymbols, m5e = Object.prototype.hasOwnProperty, h5e = Object.prototype.propertyIsEnumerable, p4 = (e, t, n) => t in e ? p5e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, m4 = (e, t) => {
  for (var n in t || (t = {}))
    m5e.call(t, n) && p4(e, n, t[n]);
  if (d4)
    for (var n of d4(t))
      h5e.call(t, n) && p4(e, n, t[n]);
  return e;
};
function g5e(e) {
  return (t) => ({
    WebkitTapHighlightColor: "transparent",
    [t || "&:focus"]: m4({}, e.focusRing === "always" || e.focusRing === "auto" ? e.focusRingStyles.styles(e) : e.focusRingStyles.resetStyles(e)),
    [t ? t.replace(":focus", ":focus:not(:focus-visible)") : "&:focus:not(:focus-visible)"]: m4({}, e.focusRing === "auto" || e.focusRing === "never" ? e.focusRingStyles.resetStyles(e) : null)
  });
}
function Kp(e) {
  return (t) => typeof e.primaryShade == "number" ? e.primaryShade : e.primaryShade[t || e.colorScheme];
}
function i2(e) {
  const t = Kp(e);
  return (n, r, o = !0, i = !0) => {
    if (typeof n == "string" && n.includes(".")) {
      const [l, s] = n.split("."), c = parseInt(s, 10);
      if (l in e.colors && c >= 0 && c < 10)
        return e.colors[l][typeof r == "number" && !i ? r : c];
    }
    const a = typeof r == "number" ? r : t();
    return n in e.colors ? e.colors[n][a] : o ? e.colors[e.primaryColor][a] : n;
  };
}
function _q(e) {
  let t = "";
  for (let n = 1; n < e.length - 1; n += 1)
    t += `${e[n]} ${n / (e.length - 1) * 100}%, `;
  return `${e[0]} 0%, ${t}${e[e.length - 1]} 100%`;
}
function y5e(e, ...t) {
  return `linear-gradient(${e}deg, ${_q(t)})`;
}
function v5e(...e) {
  return `radial-gradient(circle, ${_q(e)})`;
}
function Oq(e) {
  const t = i2(e), n = Kp(e);
  return (r) => {
    const o = {
      from: (r == null ? void 0 : r.from) || e.defaultGradient.from,
      to: (r == null ? void 0 : r.to) || e.defaultGradient.to,
      deg: (r == null ? void 0 : r.deg) || e.defaultGradient.deg
    };
    return `linear-gradient(${o.deg}deg, ${t(o.from, n(), !1)} 0%, ${t(o.to, n(), !1)} 100%)`;
  };
}
function Eq(e) {
  return (t) => {
    if (typeof t == "number")
      return `${t / 16}${e}`;
    if (typeof t == "string") {
      const n = t.replace("px", "");
      if (!Number.isNaN(Number(n)))
        return `${Number(n) / 16}${e}`;
    }
    return t;
  };
}
const be = Eq("rem"), zx = Eq("em");
function $t({
  size: e,
  sizes: t,
  units: n
}) {
  return e in t ? t[e] : typeof e == "number" ? n === "em" ? zx(e) : be(e) : e || t.md;
}
function Ic(e) {
  return typeof e == "number" ? e : typeof e == "string" && e.includes("rem") ? Number(e.replace("rem", "")) * 16 : typeof e == "string" && e.includes("em") ? Number(e.replace("em", "")) * 16 : Number(e);
}
function b5e(e) {
  return (t) => `@media (min-width: ${zx(Ic($t({ size: t, sizes: e.breakpoints })))})`;
}
function w5e(e) {
  return (t) => `@media (max-width: ${zx(Ic($t({ size: t, sizes: e.breakpoints })) - 1)})`;
}
function x5e(e) {
  return /^#?([0-9A-F]{3}){1,2}$/i.test(e);
}
function S5e(e) {
  let t = e.replace("#", "");
  if (t.length === 3) {
    const a = t.split("");
    t = [
      a[0],
      a[0],
      a[1],
      a[1],
      a[2],
      a[2]
    ].join("");
  }
  const n = parseInt(t, 16), r = n >> 16 & 255, o = n >> 8 & 255, i = n & 255;
  return {
    r,
    g: o,
    b: i,
    a: 1
  };
}
function k5e(e) {
  const [t, n, r, o] = e.replace(/[^0-9,.]/g, "").split(",").map(Number);
  return { r: t, g: n, b: r, a: o || 1 };
}
function a2(e) {
  return x5e(e) ? S5e(e) : e.startsWith("rgb") ? k5e(e) : {
    r: 0,
    g: 0,
    b: 0,
    a: 1
  };
}
function Hu(e, t) {
  if (typeof e != "string" || t > 1 || t < 0)
    return "rgba(0, 0, 0, 1)";
  if (e.startsWith("var(--"))
    return e;
  const { r: n, g: r, b: o } = a2(e);
  return `rgba(${n}, ${r}, ${o}, ${t})`;
}
function _5e(e = 0) {
  return {
    position: "absolute",
    top: be(e),
    right: be(e),
    left: be(e),
    bottom: be(e)
  };
}
function O5e(e, t) {
  if (typeof e == "string" && e.startsWith("var(--"))
    return e;
  const { r: n, g: r, b: o, a: i } = a2(e), a = 1 - t, l = (s) => Math.round(s * a);
  return `rgba(${l(n)}, ${l(r)}, ${l(o)}, ${i})`;
}
function E5e(e, t) {
  if (typeof e == "string" && e.startsWith("var(--"))
    return e;
  const { r: n, g: r, b: o, a: i } = a2(e), a = (l) => Math.round(l + (255 - l) * t);
  return `rgba(${a(n)}, ${a(r)}, ${a(o)}, ${i})`;
}
function C5e(e) {
  return (t) => {
    if (typeof t == "number")
      return be(t);
    const n = typeof e.defaultRadius == "number" ? e.defaultRadius : e.radius[e.defaultRadius] || e.defaultRadius;
    return e.radius[t] || t || n;
  };
}
function P5e(e, t) {
  if (typeof e == "string" && e.includes(".")) {
    const [n, r] = e.split("."), o = parseInt(r, 10);
    if (n in t.colors && o >= 0 && o < 10)
      return { isSplittedColor: !0, key: n, shade: o };
  }
  return { isSplittedColor: !1 };
}
function R5e(e) {
  const t = i2(e), n = Kp(e), r = Oq(e);
  return ({ variant: o, color: i, gradient: a, primaryFallback: l }) => {
    const s = P5e(i, e);
    switch (o) {
      case "light":
        return {
          border: "transparent",
          background: Hu(t(i, e.colorScheme === "dark" ? 8 : 0, l, !1), e.colorScheme === "dark" ? 0.2 : 1),
          color: i === "dark" ? e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.dark[9] : t(i, e.colorScheme === "dark" ? 2 : n("light")),
          hover: Hu(t(i, e.colorScheme === "dark" ? 7 : 1, l, !1), e.colorScheme === "dark" ? 0.25 : 0.65)
        };
      case "subtle":
        return {
          border: "transparent",
          background: "transparent",
          color: i === "dark" ? e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.dark[9] : t(i, e.colorScheme === "dark" ? 2 : n("light")),
          hover: Hu(t(i, e.colorScheme === "dark" ? 8 : 0, l, !1), e.colorScheme === "dark" ? 0.2 : 1)
        };
      case "outline":
        return {
          border: t(i, e.colorScheme === "dark" ? 5 : n("light")),
          background: "transparent",
          color: t(i, e.colorScheme === "dark" ? 5 : n("light")),
          hover: e.colorScheme === "dark" ? Hu(t(i, 5, l, !1), 0.05) : Hu(t(i, 0, l, !1), 0.35)
        };
      case "default":
        return {
          border: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4],
          background: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
          color: e.colorScheme === "dark" ? e.white : e.black,
          hover: e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[0]
        };
      case "white":
        return {
          border: "transparent",
          background: e.white,
          color: t(i, n()),
          hover: null
        };
      case "transparent":
        return {
          border: "transparent",
          color: i === "dark" ? e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.dark[9] : t(i, e.colorScheme === "dark" ? 2 : n("light")),
          background: "transparent",
          hover: null
        };
      case "gradient":
        return {
          background: r(a),
          color: e.white,
          border: "transparent",
          hover: null
        };
      default: {
        const c = n(), p = s.isSplittedColor ? s.shade : c, f = s.isSplittedColor ? s.key : i;
        return {
          border: "transparent",
          background: t(f, p, l),
          color: e.white,
          hover: t(f, p === 9 ? 8 : p + 1)
        };
      }
    }
  };
}
function T5e(e) {
  return (t) => {
    const n = Kp(e)(t);
    return e.colors[e.primaryColor][n];
  };
}
function j5e(e) {
  return {
    "@media (hover: hover)": {
      "&:hover": e
    },
    "@media (hover: none)": {
      "&:active": e
    }
  };
}
function N5e(e) {
  return () => ({
    userSelect: "none",
    color: e.colorScheme === "dark" ? e.colors.dark[3] : e.colors.gray[5]
  });
}
function $5e(e) {
  return () => e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6];
}
const Cn = {
  fontStyles: d5e,
  themeColor: i2,
  focusStyles: g5e,
  linearGradient: y5e,
  radialGradient: v5e,
  smallerThan: w5e,
  largerThan: b5e,
  rgba: Hu,
  cover: _5e,
  darken: O5e,
  lighten: E5e,
  radius: C5e,
  variant: R5e,
  primaryShade: Kp,
  hover: j5e,
  gradient: Oq,
  primaryColor: T5e,
  placeholderStyles: N5e,
  dimmed: $5e
};
var I5e = Object.defineProperty, A5e = Object.defineProperties, z5e = Object.getOwnPropertyDescriptors, h4 = Object.getOwnPropertySymbols, L5e = Object.prototype.hasOwnProperty, D5e = Object.prototype.propertyIsEnumerable, g4 = (e, t, n) => t in e ? I5e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, F5e = (e, t) => {
  for (var n in t || (t = {}))
    L5e.call(t, n) && g4(e, n, t[n]);
  if (h4)
    for (var n of h4(t))
      D5e.call(t, n) && g4(e, n, t[n]);
  return e;
}, M5e = (e, t) => A5e(e, z5e(t));
function Cq(e) {
  return M5e(F5e({}, e), {
    fn: {
      fontStyles: Cn.fontStyles(e),
      themeColor: Cn.themeColor(e),
      focusStyles: Cn.focusStyles(e),
      largerThan: Cn.largerThan(e),
      smallerThan: Cn.smallerThan(e),
      radialGradient: Cn.radialGradient,
      linearGradient: Cn.linearGradient,
      gradient: Cn.gradient(e),
      rgba: Cn.rgba,
      cover: Cn.cover,
      lighten: Cn.lighten,
      darken: Cn.darken,
      primaryShade: Cn.primaryShade(e),
      radius: Cn.radius(e),
      variant: Cn.variant(e),
      hover: Cn.hover,
      primaryColor: Cn.primaryColor(e),
      placeholderStyles: Cn.placeholderStyles(e),
      dimmed: Cn.dimmed(e)
    }
  });
}
const B5e = {
  dir: "ltr",
  primaryShade: {
    light: 6,
    dark: 8
  },
  focusRing: "auto",
  loader: "oval",
  colorScheme: "light",
  white: "#fff",
  black: "#000",
  defaultRadius: "sm",
  transitionTimingFunction: "ease",
  colors: f5e,
  lineHeight: 1.55,
  fontFamily: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
  fontFamilyMonospace: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",
  primaryColor: "blue",
  respectReducedMotion: !0,
  cursorType: "default",
  defaultGradient: {
    from: "indigo",
    to: "cyan",
    deg: 45
  },
  shadows: {
    xs: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",
    sm: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",
    md: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",
    lg: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",
    xl: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"
  },
  fontSizes: {
    xs: "0.75rem",
    sm: "0.875rem",
    md: "1rem",
    lg: "1.125rem",
    xl: "1.25rem"
  },
  radius: {
    xs: "0.125rem",
    sm: "0.25rem",
    md: "0.5rem",
    lg: "1rem",
    xl: "2rem"
  },
  spacing: {
    xs: "0.625rem",
    sm: "0.75rem",
    md: "1rem",
    lg: "1.25rem",
    xl: "1.5rem"
  },
  breakpoints: {
    xs: "36em",
    sm: "48em",
    md: "62em",
    lg: "75em",
    xl: "88em"
  },
  headings: {
    fontFamily: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
    fontWeight: 700,
    sizes: {
      h1: { fontSize: "2.125rem", lineHeight: 1.3, fontWeight: void 0 },
      h2: { fontSize: "1.625rem", lineHeight: 1.35, fontWeight: void 0 },
      h3: { fontSize: "1.375rem", lineHeight: 1.4, fontWeight: void 0 },
      h4: { fontSize: "1.125rem", lineHeight: 1.45, fontWeight: void 0 },
      h5: { fontSize: "1rem", lineHeight: 1.5, fontWeight: void 0 },
      h6: { fontSize: "0.875rem", lineHeight: 1.5, fontWeight: void 0 }
    }
  },
  other: {},
  components: {},
  activeStyles: { transform: "translateY(0.0625rem)" },
  datesLocale: "en",
  globalStyles: void 0,
  focusRingStyles: {
    styles: (e) => ({
      outlineOffset: "0.125rem",
      outline: `0.125rem solid ${e.colors[e.primaryColor][e.colorScheme === "dark" ? 7 : 5]}`
    }),
    resetStyles: () => ({ outline: "none" }),
    inputStyles: (e) => ({
      outline: "none",
      borderColor: e.colors[e.primaryColor][typeof e.primaryShade == "object" ? e.primaryShade[e.colorScheme] : e.primaryShade]
    })
  }
}, l2 = Cq(B5e);
function U5e(e) {
  if (e.sheet)
    return e.sheet;
  for (var t = 0; t < document.styleSheets.length; t++)
    if (document.styleSheets[t].ownerNode === e)
      return document.styleSheets[t];
}
function H5e(e) {
  var t = document.createElement("style");
  return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
}
var W5e = /* @__PURE__ */ function() {
  function e(n) {
    var r = this;
    this._insertTag = function(o) {
      var i;
      r.tags.length === 0 ? r.insertionPoint ? i = r.insertionPoint.nextSibling : r.prepend ? i = r.container.firstChild : i = r.before : i = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(o, i), r.tags.push(o);
    }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
  }
  var t = e.prototype;
  return t.hydrate = function(r) {
    r.forEach(this._insertTag);
  }, t.insert = function(r) {
    this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(H5e(this));
    var o = this.tags[this.tags.length - 1];
    if (this.isSpeedy) {
      var i = U5e(o);
      try {
        i.insertRule(r, i.cssRules.length);
      } catch {
      }
    } else
      o.appendChild(document.createTextNode(r));
    this.ctr++;
  }, t.flush = function() {
    this.tags.forEach(function(r) {
      return r.parentNode && r.parentNode.removeChild(r);
    }), this.tags = [], this.ctr = 0;
  }, e;
}(), nr = "-ms-", Qb = "-moz-", _t = "-webkit-", Pq = "comm", s2 = "rule", u2 = "decl", V5e = "@import", Rq = "@keyframes", q5e = "@layer", G5e = Math.abs, Lx = String.fromCharCode, K5e = Object.assign;
function Y5e(e, t) {
  return Hn(e, 0) ^ 45 ? (((t << 2 ^ Hn(e, 0)) << 2 ^ Hn(e, 1)) << 2 ^ Hn(e, 2)) << 2 ^ Hn(e, 3) : 0;
}
function Tq(e) {
  return e.trim();
}
function X5e(e, t) {
  return (e = t.exec(e)) ? e[0] : e;
}
function Et(e, t, n) {
  return e.replace(t, n);
}
function vE(e, t) {
  return e.indexOf(t);
}
function Hn(e, t) {
  return e.charCodeAt(t) | 0;
}
function xp(e, t, n) {
  return e.slice(t, n);
}
function Ii(e) {
  return e.length;
}
function c2(e) {
  return e.length;
}
function Gh(e, t) {
  return t.push(e), e;
}
function Z5e(e, t) {
  return e.map(t).join("");
}
var Dx = 1, Ac = 1, jq = 0, Wr = 0, xn = 0, df = "";
function Fx(e, t, n, r, o, i, a) {
  return { value: e, root: t, parent: n, type: r, props: o, children: i, line: Dx, column: Ac, length: a, return: "" };
}
function id(e, t) {
  return K5e(Fx("", null, null, "", null, null, 0), e, { length: -e.length }, t);
}
function Q5e() {
  return xn;
}
function J5e() {
  return xn = Wr > 0 ? Hn(df, --Wr) : 0, Ac--, xn === 10 && (Ac = 1, Dx--), xn;
}
function yo() {
  return xn = Wr < jq ? Hn(df, Wr++) : 0, Ac++, xn === 10 && (Ac = 1, Dx++), xn;
}
function Yi() {
  return Hn(df, Wr);
}
function Qg() {
  return Wr;
}
function Yp(e, t) {
  return xp(df, e, t);
}
function Sp(e) {
  switch (e) {
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    case 59:
    case 123:
    case 125:
      return 4;
    case 58:
      return 3;
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function Nq(e) {
  return Dx = Ac = 1, jq = Ii(df = e), Wr = 0, [];
}
function $q(e) {
  return df = "", e;
}
function Jg(e) {
  return Tq(Yp(Wr - 1, bE(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function eAe(e) {
  for (; (xn = Yi()) && xn < 33; )
    yo();
  return Sp(e) > 2 || Sp(xn) > 3 ? "" : " ";
}
function tAe(e, t) {
  for (; --t && yo() && !(xn < 48 || xn > 102 || xn > 57 && xn < 65 || xn > 70 && xn < 97); )
    ;
  return Yp(e, Qg() + (t < 6 && Yi() == 32 && yo() == 32));
}
function bE(e) {
  for (; yo(); )
    switch (xn) {
      case e:
        return Wr;
      case 34:
      case 39:
        e !== 34 && e !== 39 && bE(xn);
        break;
      case 40:
        e === 41 && bE(e);
        break;
      case 92:
        yo();
        break;
    }
  return Wr;
}
function nAe(e, t) {
  for (; yo() && e + xn !== 57; )
    if (e + xn === 84 && Yi() === 47)
      break;
  return "/*" + Yp(t, Wr - 1) + "*" + Lx(e === 47 ? e : yo());
}
function rAe(e) {
  for (; !Sp(Yi()); )
    yo();
  return Yp(e, Wr);
}
function oAe(e) {
  return $q(ey("", null, null, null, [""], e = Nq(e), 0, [0], e));
}
function ey(e, t, n, r, o, i, a, l, s) {
  for (var c = 0, p = 0, f = a, m = 0, h = 0, g = 0, v = 1, S = 1, w = 1, x = 0, k = "", E = o, O = i, C = r, R = k; S; )
    switch (g = x, x = yo()) {
      case 40:
        if (g != 108 && Hn(R, f - 1) == 58) {
          vE(R += Et(Jg(x), "&", "&\f"), "&\f") != -1 && (w = -1);
          break;
        }
      case 34:
      case 39:
      case 91:
        R += Jg(x);
        break;
      case 9:
      case 10:
      case 13:
      case 32:
        R += eAe(g);
        break;
      case 92:
        R += tAe(Qg() - 1, 7);
        continue;
      case 47:
        switch (Yi()) {
          case 42:
          case 47:
            Gh(iAe(nAe(yo(), Qg()), t, n), s);
            break;
          default:
            R += "/";
        }
        break;
      case 123 * v:
        l[c++] = Ii(R) * w;
      case 125 * v:
      case 59:
      case 0:
        switch (x) {
          case 0:
          case 125:
            S = 0;
          case 59 + p:
            w == -1 && (R = Et(R, /\f/g, "")), h > 0 && Ii(R) - f && Gh(h > 32 ? v4(R + ";", r, n, f - 1) : v4(Et(R, " ", "") + ";", r, n, f - 2), s);
            break;
          case 59:
            R += ";";
          default:
            if (Gh(C = y4(R, t, n, c, p, o, l, k, E = [], O = [], f), i), x === 123)
              if (p === 0)
                ey(R, t, C, C, E, i, f, l, O);
              else
                switch (m === 99 && Hn(R, 3) === 110 ? 100 : m) {
                  case 100:
                  case 108:
                  case 109:
                  case 115:
                    ey(e, C, C, r && Gh(y4(e, C, C, 0, 0, o, l, k, o, E = [], f), O), o, O, f, l, r ? E : O);
                    break;
                  default:
                    ey(R, C, C, C, [""], O, 0, l, O);
                }
        }
        c = p = h = 0, v = w = 1, k = R = "", f = a;
        break;
      case 58:
        f = 1 + Ii(R), h = g;
      default:
        if (v < 1) {
          if (x == 123)
            --v;
          else if (x == 125 && v++ == 0 && J5e() == 125)
            continue;
        }
        switch (R += Lx(x), x * v) {
          case 38:
            w = p > 0 ? 1 : (R += "\f", -1);
            break;
          case 44:
            l[c++] = (Ii(R) - 1) * w, w = 1;
            break;
          case 64:
            Yi() === 45 && (R += Jg(yo())), m = Yi(), p = f = Ii(k = R += rAe(Qg())), x++;
            break;
          case 45:
            g === 45 && Ii(R) == 2 && (v = 0);
        }
    }
  return i;
}
function y4(e, t, n, r, o, i, a, l, s, c, p) {
  for (var f = o - 1, m = o === 0 ? i : [""], h = c2(m), g = 0, v = 0, S = 0; g < r; ++g)
    for (var w = 0, x = xp(e, f + 1, f = G5e(v = a[g])), k = e; w < h; ++w)
      (k = Tq(v > 0 ? m[w] + " " + x : Et(x, /&\f/g, m[w]))) && (s[S++] = k);
  return Fx(e, t, n, o === 0 ? s2 : l, s, c, p);
}
function iAe(e, t, n) {
  return Fx(e, t, n, Pq, Lx(Q5e()), xp(e, 2, -2), 0);
}
function v4(e, t, n, r) {
  return Fx(e, t, n, u2, xp(e, 0, r), xp(e, r + 1, -1), r);
}
function yc(e, t) {
  for (var n = "", r = c2(e), o = 0; o < r; o++)
    n += t(e[o], o, e, t) || "";
  return n;
}
function aAe(e, t, n, r) {
  switch (e.type) {
    case q5e:
      if (e.children.length)
        break;
    case V5e:
    case u2:
      return e.return = e.return || e.value;
    case Pq:
      return "";
    case Rq:
      return e.return = e.value + "{" + yc(e.children, r) + "}";
    case s2:
      e.value = e.props.join(",");
  }
  return Ii(n = yc(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
}
function lAe(e) {
  var t = c2(e);
  return function(n, r, o, i) {
    for (var a = "", l = 0; l < t; l++)
      a += e[l](n, r, o, i) || "";
    return a;
  };
}
function sAe(e) {
  return function(t) {
    t.root || (t = t.return) && e(t);
  };
}
var b4 = function(t) {
  var n = /* @__PURE__ */ new WeakMap();
  return function(r) {
    if (n.has(r))
      return n.get(r);
    var o = t(r);
    return n.set(r, o), o;
  };
};
function uAe(e) {
  var t = /* @__PURE__ */ Object.create(null);
  return function(n) {
    return t[n] === void 0 && (t[n] = e(n)), t[n];
  };
}
var cAe = function(t, n, r) {
  for (var o = 0, i = 0; o = i, i = Yi(), o === 38 && i === 12 && (n[r] = 1), !Sp(i); )
    yo();
  return Yp(t, Wr);
}, fAe = function(t, n) {
  var r = -1, o = 44;
  do
    switch (Sp(o)) {
      case 0:
        o === 38 && Yi() === 12 && (n[r] = 1), t[r] += cAe(Wr - 1, n, r);
        break;
      case 2:
        t[r] += Jg(o);
        break;
      case 4:
        if (o === 44) {
          t[++r] = Yi() === 58 ? "&\f" : "", n[r] = t[r].length;
          break;
        }
      default:
        t[r] += Lx(o);
    }
  while (o = yo());
  return t;
}, dAe = function(t, n) {
  return $q(fAe(Nq(t), n));
}, w4 = /* @__PURE__ */ new WeakMap(), pAe = function(t) {
  if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
  // negative .length indicates that this rule has been already prefixed
  t.length < 1)) {
    for (var n = t.value, r = t.parent, o = t.column === r.column && t.line === r.line; r.type !== "rule"; )
      if (r = r.parent, !r)
        return;
    if (!(t.props.length === 1 && n.charCodeAt(0) !== 58 && !w4.get(r)) && !o) {
      w4.set(t, !0);
      for (var i = [], a = dAe(n, i), l = r.props, s = 0, c = 0; s < a.length; s++)
        for (var p = 0; p < l.length; p++, c++)
          t.props[c] = i[s] ? a[s].replace(/&\f/g, l[p]) : l[p] + " " + a[s];
    }
  }
}, mAe = function(t) {
  if (t.type === "decl") {
    var n = t.value;
    // charcode for l
    n.charCodeAt(0) === 108 && // charcode for b
    n.charCodeAt(2) === 98 && (t.return = "", t.value = "");
  }
};
function Iq(e, t) {
  switch (Y5e(e, t)) {
    case 5103:
      return _t + "print-" + e + e;
    case 5737:
    case 4201:
    case 3177:
    case 3433:
    case 1641:
    case 4457:
    case 2921:
    case 5572:
    case 6356:
    case 5844:
    case 3191:
    case 6645:
    case 3005:
    case 6391:
    case 5879:
    case 5623:
    case 6135:
    case 4599:
    case 4855:
    case 4215:
    case 6389:
    case 5109:
    case 5365:
    case 5621:
    case 3829:
      return _t + e + e;
    case 5349:
    case 4246:
    case 4810:
    case 6968:
    case 2756:
      return _t + e + Qb + e + nr + e + e;
    case 6828:
    case 4268:
      return _t + e + nr + e + e;
    case 6165:
      return _t + e + nr + "flex-" + e + e;
    case 5187:
      return _t + e + Et(e, /(\w+).+(:[^]+)/, _t + "box-$1$2" + nr + "flex-$1$2") + e;
    case 5443:
      return _t + e + nr + "flex-item-" + Et(e, /flex-|-self/, "") + e;
    case 4675:
      return _t + e + nr + "flex-line-pack" + Et(e, /align-content|flex-|-self/, "") + e;
    case 5548:
      return _t + e + nr + Et(e, "shrink", "negative") + e;
    case 5292:
      return _t + e + nr + Et(e, "basis", "preferred-size") + e;
    case 6060:
      return _t + "box-" + Et(e, "-grow", "") + _t + e + nr + Et(e, "grow", "positive") + e;
    case 4554:
      return _t + Et(e, /([^-])(transform)/g, "$1" + _t + "$2") + e;
    case 6187:
      return Et(Et(Et(e, /(zoom-|grab)/, _t + "$1"), /(image-set)/, _t + "$1"), e, "") + e;
    case 5495:
    case 3959:
      return Et(e, /(image-set\([^]*)/, _t + "$1$`$1");
    case 4968:
      return Et(Et(e, /(.+:)(flex-)?(.*)/, _t + "box-pack:$3" + nr + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + _t + e + e;
    case 4095:
    case 3583:
    case 4068:
    case 2532:
      return Et(e, /(.+)-inline(.+)/, _t + "$1$2") + e;
    case 8116:
    case 7059:
    case 5753:
    case 5535:
    case 5445:
    case 5701:
    case 4933:
    case 4677:
    case 5533:
    case 5789:
    case 5021:
    case 4765:
      if (Ii(e) - 1 - t > 6)
        switch (Hn(e, t + 1)) {
          case 109:
            if (Hn(e, t + 4) !== 45)
              break;
          case 102:
            return Et(e, /(.+:)(.+)-([^]+)/, "$1" + _t + "$2-$3$1" + Qb + (Hn(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
          case 115:
            return ~vE(e, "stretch") ? Iq(Et(e, "stretch", "fill-available"), t) + e : e;
        }
      break;
    case 4949:
      if (Hn(e, t + 1) !== 115)
        break;
    case 6444:
      switch (Hn(e, Ii(e) - 3 - (~vE(e, "!important") && 10))) {
        case 107:
          return Et(e, ":", ":" + _t) + e;
        case 101:
          return Et(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + _t + (Hn(e, 14) === 45 ? "inline-" : "") + "box$3$1" + _t + "$2$3$1" + nr + "$2box$3") + e;
      }
      break;
    case 5936:
      switch (Hn(e, t + 11)) {
        case 114:
          return _t + e + nr + Et(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
        case 108:
          return _t + e + nr + Et(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
        case 45:
          return _t + e + nr + Et(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
      }
      return _t + e + nr + e + e;
  }
  return e;
}
var hAe = function(t, n, r, o) {
  if (t.length > -1 && !t.return)
    switch (t.type) {
      case u2:
        t.return = Iq(t.value, t.length);
        break;
      case Rq:
        return yc([id(t, {
          value: Et(t.value, "@", "@" + _t)
        })], o);
      case s2:
        if (t.length)
          return Z5e(t.props, function(i) {
            switch (X5e(i, /(::plac\w+|:read-\w+)/)) {
              case ":read-only":
              case ":read-write":
                return yc([id(t, {
                  props: [Et(i, /:(read-\w+)/, ":" + Qb + "$1")]
                })], o);
              case "::placeholder":
                return yc([id(t, {
                  props: [Et(i, /:(plac\w+)/, ":" + _t + "input-$1")]
                }), id(t, {
                  props: [Et(i, /:(plac\w+)/, ":" + Qb + "$1")]
                }), id(t, {
                  props: [Et(i, /:(plac\w+)/, nr + "input-$1")]
                })], o);
            }
            return "";
          });
    }
}, gAe = [hAe], Aq = function(t) {
  var n = t.key;
  if (n === "css") {
    var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
    Array.prototype.forEach.call(r, function(v) {
      var S = v.getAttribute("data-emotion");
      S.indexOf(" ") !== -1 && (document.head.appendChild(v), v.setAttribute("data-s", ""));
    });
  }
  var o = t.stylisPlugins || gAe, i = {}, a, l = [];
  a = t.container || document.head, Array.prototype.forEach.call(
    // this means we will ignore elements which don't have a space in them which
    // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
    document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
    function(v) {
      for (var S = v.getAttribute("data-emotion").split(" "), w = 1; w < S.length; w++)
        i[S[w]] = !0;
      l.push(v);
    }
  );
  var s, c = [pAe, mAe];
  {
    var p, f = [aAe, sAe(function(v) {
      p.insert(v);
    })], m = lAe(c.concat(o, f)), h = function(S) {
      return yc(oAe(S), m);
    };
    s = function(S, w, x, k) {
      p = x, h(S ? S + "{" + w.styles + "}" : w.styles), k && (g.inserted[w.name] = !0);
    };
  }
  var g = {
    key: n,
    sheet: new W5e({
      key: n,
      container: a,
      nonce: t.nonce,
      speedy: t.speedy,
      prepend: t.prepend,
      insertionPoint: t.insertionPoint
    }),
    nonce: t.nonce,
    inserted: i,
    registered: {},
    insert: s
  };
  return g.sheet.hydrate(l), g;
};
function wE() {
  return wE = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var r in n)
        Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
    }
    return e;
  }, wE.apply(this, arguments);
}
var zq = { exports: {} }, At = {};
/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var zn = typeof Symbol == "function" && Symbol.for, f2 = zn ? Symbol.for("react.element") : 60103, d2 = zn ? Symbol.for("react.portal") : 60106, Mx = zn ? Symbol.for("react.fragment") : 60107, Bx = zn ? Symbol.for("react.strict_mode") : 60108, Ux = zn ? Symbol.for("react.profiler") : 60114, Hx = zn ? Symbol.for("react.provider") : 60109, Wx = zn ? Symbol.for("react.context") : 60110, p2 = zn ? Symbol.for("react.async_mode") : 60111, Vx = zn ? Symbol.for("react.concurrent_mode") : 60111, qx = zn ? Symbol.for("react.forward_ref") : 60112, Gx = zn ? Symbol.for("react.suspense") : 60113, yAe = zn ? Symbol.for("react.suspense_list") : 60120, Kx = zn ? Symbol.for("react.memo") : 60115, Yx = zn ? Symbol.for("react.lazy") : 60116, vAe = zn ? Symbol.for("react.block") : 60121, bAe = zn ? Symbol.for("react.fundamental") : 60117, wAe = zn ? Symbol.for("react.responder") : 60118, xAe = zn ? Symbol.for("react.scope") : 60119;
function ko(e) {
  if (typeof e == "object" && e !== null) {
    var t = e.$$typeof;
    switch (t) {
      case f2:
        switch (e = e.type, e) {
          case p2:
          case Vx:
          case Mx:
          case Ux:
          case Bx:
          case Gx:
            return e;
          default:
            switch (e = e && e.$$typeof, e) {
              case Wx:
              case qx:
              case Yx:
              case Kx:
              case Hx:
                return e;
              default:
                return t;
            }
        }
      case d2:
        return t;
    }
  }
}
function Lq(e) {
  return ko(e) === Vx;
}
At.AsyncMode = p2;
At.ConcurrentMode = Vx;
At.ContextConsumer = Wx;
At.ContextProvider = Hx;
At.Element = f2;
At.ForwardRef = qx;
At.Fragment = Mx;
At.Lazy = Yx;
At.Memo = Kx;
At.Portal = d2;
At.Profiler = Ux;
At.StrictMode = Bx;
At.Suspense = Gx;
At.isAsyncMode = function(e) {
  return Lq(e) || ko(e) === p2;
};
At.isConcurrentMode = Lq;
At.isContextConsumer = function(e) {
  return ko(e) === Wx;
};
At.isContextProvider = function(e) {
  return ko(e) === Hx;
};
At.isElement = function(e) {
  return typeof e == "object" && e !== null && e.$$typeof === f2;
};
At.isForwardRef = function(e) {
  return ko(e) === qx;
};
At.isFragment = function(e) {
  return ko(e) === Mx;
};
At.isLazy = function(e) {
  return ko(e) === Yx;
};
At.isMemo = function(e) {
  return ko(e) === Kx;
};
At.isPortal = function(e) {
  return ko(e) === d2;
};
At.isProfiler = function(e) {
  return ko(e) === Ux;
};
At.isStrictMode = function(e) {
  return ko(e) === Bx;
};
At.isSuspense = function(e) {
  return ko(e) === Gx;
};
At.isValidElementType = function(e) {
  return typeof e == "string" || typeof e == "function" || e === Mx || e === Vx || e === Ux || e === Bx || e === Gx || e === yAe || typeof e == "object" && e !== null && (e.$$typeof === Yx || e.$$typeof === Kx || e.$$typeof === Hx || e.$$typeof === Wx || e.$$typeof === qx || e.$$typeof === bAe || e.$$typeof === wAe || e.$$typeof === xAe || e.$$typeof === vAe);
};
At.typeOf = ko;
zq.exports = At;
var SAe = zq.exports, Dq = SAe, kAe = {
  $$typeof: !0,
  render: !0,
  defaultProps: !0,
  displayName: !0,
  propTypes: !0
}, _Ae = {
  $$typeof: !0,
  compare: !0,
  defaultProps: !0,
  displayName: !0,
  propTypes: !0,
  type: !0
}, Fq = {};
Fq[Dq.ForwardRef] = kAe;
Fq[Dq.Memo] = _Ae;
var OAe = !0;
function EAe(e, t, n) {
  var r = "";
  return n.split(" ").forEach(function(o) {
    e[o] !== void 0 ? t.push(e[o] + ";") : r += o + " ";
  }), r;
}
var CAe = function(t, n, r) {
  var o = t.key + "-" + n.name;
  // we only need to add the styles to the registered cache if the
  // class name could be used further down
  // the tree but if it's a string tag, we know it won't
  // so we don't have to add it to registered cache.
  // this improves memory usage since we can avoid storing the whole style string
  (r === !1 || // we need to always store it if we're in compat mode and
  // in node since emotion-server relies on whether a style is in
  // the registered cache to know whether a style is global or not
  // also, note that this check will be dead code eliminated in the browser
  OAe === !1) && t.registered[o] === void 0 && (t.registered[o] = n.styles);
}, Mq = function(t, n, r) {
  CAe(t, n, r);
  var o = t.key + "-" + n.name;
  if (t.inserted[n.name] === void 0) {
    var i = n;
    do
      t.insert(n === i ? "." + o : "", i, t.sheet, !0), i = i.next;
    while (i !== void 0);
  }
};
function PAe(e) {
  for (var t = 0, n, r = 0, o = e.length; o >= 4; ++r, o -= 4)
    n = e.charCodeAt(r) & 255 | (e.charCodeAt(++r) & 255) << 8 | (e.charCodeAt(++r) & 255) << 16 | (e.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
    n >>> 24, t = /* Math.imul(k, m): */
    (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  switch (o) {
    case 3:
      t ^= (e.charCodeAt(r + 2) & 255) << 16;
    case 2:
      t ^= (e.charCodeAt(r + 1) & 255) << 8;
    case 1:
      t ^= e.charCodeAt(r) & 255, t = /* Math.imul(h, m): */
      (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
  }
  return t ^= t >>> 13, t = /* Math.imul(h, m): */
  (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
}
var RAe = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
}, TAe = /[A-Z]|^ms/g, jAe = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Bq = function(t) {
  return t.charCodeAt(1) === 45;
}, x4 = function(t) {
  return t != null && typeof t != "boolean";
}, e0 = /* @__PURE__ */ uAe(function(e) {
  return Bq(e) ? e : e.replace(TAe, "-$&").toLowerCase();
}), S4 = function(t, n) {
  switch (t) {
    case "animation":
    case "animationName":
      if (typeof n == "string")
        return n.replace(jAe, function(r, o, i) {
          return Ai = {
            name: o,
            styles: i,
            next: Ai
          }, o;
        });
  }
  return RAe[t] !== 1 && !Bq(t) && typeof n == "number" && n !== 0 ? n + "px" : n;
};
function kp(e, t, n) {
  if (n == null)
    return "";
  if (n.__emotion_styles !== void 0)
    return n;
  switch (typeof n) {
    case "boolean":
      return "";
    case "object": {
      if (n.anim === 1)
        return Ai = {
          name: n.name,
          styles: n.styles,
          next: Ai
        }, n.name;
      if (n.styles !== void 0) {
        var r = n.next;
        if (r !== void 0)
          for (; r !== void 0; )
            Ai = {
              name: r.name,
              styles: r.styles,
              next: Ai
            }, r = r.next;
        var o = n.styles + ";";
        return o;
      }
      return NAe(e, t, n);
    }
    case "function": {
      if (e !== void 0) {
        var i = Ai, a = n(e);
        return Ai = i, kp(e, t, a);
      }
      break;
    }
  }
  if (t == null)
    return n;
  var l = t[n];
  return l !== void 0 ? l : n;
}
function NAe(e, t, n) {
  var r = "";
  if (Array.isArray(n))
    for (var o = 0; o < n.length; o++)
      r += kp(e, t, n[o]) + ";";
  else
    for (var i in n) {
      var a = n[i];
      if (typeof a != "object")
        t != null && t[a] !== void 0 ? r += i + "{" + t[a] + "}" : x4(a) && (r += e0(i) + ":" + S4(i, a) + ";");
      else if (Array.isArray(a) && typeof a[0] == "string" && (t == null || t[a[0]] === void 0))
        for (var l = 0; l < a.length; l++)
          x4(a[l]) && (r += e0(i) + ":" + S4(i, a[l]) + ";");
      else {
        var s = kp(e, t, a);
        switch (i) {
          case "animation":
          case "animationName": {
            r += e0(i) + ":" + s + ";";
            break;
          }
          default:
            r += i + "{" + s + "}";
        }
      }
    }
  return r;
}
var k4 = /label:\s*([^\s;\n{]+)\s*(;|$)/g, Ai, Uq = function(t, n, r) {
  if (t.length === 1 && typeof t[0] == "object" && t[0] !== null && t[0].styles !== void 0)
    return t[0];
  var o = !0, i = "";
  Ai = void 0;
  var a = t[0];
  a == null || a.raw === void 0 ? (o = !1, i += kp(r, n, a)) : i += a[0];
  for (var l = 1; l < t.length; l++)
    i += kp(r, n, t[l]), o && (i += a[l]);
  k4.lastIndex = 0;
  for (var s = "", c; (c = k4.exec(i)) !== null; )
    s += "-" + // $FlowFixMe we know it's not null
    c[1];
  var p = PAe(i) + s;
  return {
    name: p,
    styles: i,
    next: Ai
  };
}, $Ae = _0.useInsertionEffect ? _0.useInsertionEffect : !1, _4 = $Ae || b.useLayoutEffect, Hq = /* @__PURE__ */ b.createContext(
  // we're doing this to avoid preconstruct's dead code elimination in this one case
  // because this module is primarily intended for the browser and node
  // but it's also required in react native and similar environments sometimes
  // and we could have a special build just for that
  // but this is much easier and the native packages
  // might use a different theme context in the future anyway
  typeof HTMLElement < "u" ? /* @__PURE__ */ Aq({
    key: "css"
  }) : null
);
Hq.Provider;
var IAe = function(t) {
  return /* @__PURE__ */ b.forwardRef(function(n, r) {
    var o = b.useContext(Hq);
    return t(n, o, r);
  });
}, xE = /* @__PURE__ */ b.createContext({}), AAe = function(t, n) {
  if (typeof n == "function") {
    var r = n(t);
    return r;
  }
  return wE({}, t, n);
}, zAe = /* @__PURE__ */ b4(function(e) {
  return b4(function(t) {
    return AAe(e, t);
  });
}), LAe = function(t) {
  var n = b.useContext(xE);
  return t.theme !== n && (n = zAe(n)(t.theme)), /* @__PURE__ */ b.createElement(xE.Provider, {
    value: n
  }, t.children);
}, Xx = /* @__PURE__ */ IAe(function(e, t) {
  var n = e.styles, r = Uq([n], void 0, b.useContext(xE)), o = b.useRef();
  return _4(function() {
    var i = t.key + "-global", a = new t.sheet.constructor({
      key: i,
      nonce: t.sheet.nonce,
      container: t.sheet.container,
      speedy: t.sheet.isSpeedy
    }), l = !1, s = document.querySelector('style[data-emotion="' + i + " " + r.name + '"]');
    return t.sheet.tags.length && (a.before = t.sheet.tags[0]), s !== null && (l = !0, s.setAttribute("data-emotion", i), a.hydrate([s])), o.current = [a, l], function() {
      a.flush();
    };
  }, [t]), _4(function() {
    var i = o.current, a = i[0], l = i[1];
    if (l) {
      i[1] = !1;
      return;
    }
    if (r.next !== void 0 && Mq(t, r.next, !0), a.tags.length) {
      var s = a.tags[a.tags.length - 1].nextElementSibling;
      a.before = s, a.flush();
    }
    t.insert("", r, a, !1);
  }, [t, r.name]), null;
}), DAe = Object.defineProperty, FAe = Object.defineProperties, MAe = Object.getOwnPropertyDescriptors, O4 = Object.getOwnPropertySymbols, BAe = Object.prototype.hasOwnProperty, UAe = Object.prototype.propertyIsEnumerable, E4 = (e, t, n) => t in e ? DAe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, HAe = (e, t) => {
  for (var n in t || (t = {}))
    BAe.call(t, n) && E4(e, n, t[n]);
  if (O4)
    for (var n of O4(t))
      UAe.call(t, n) && E4(e, n, t[n]);
  return e;
}, WAe = (e, t) => FAe(e, MAe(t));
function VAe({ theme: e }) {
  return /* @__PURE__ */ P.createElement(Xx, {
    styles: {
      "*, *::before, *::after": {
        boxSizing: "border-box"
      },
      html: {
        colorScheme: e.colorScheme === "dark" ? "dark" : "light"
      },
      body: WAe(HAe({}, e.fn.fontStyles()), {
        backgroundColor: e.colorScheme === "dark" ? e.colors.dark[7] : e.white,
        color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
        lineHeight: e.lineHeight,
        fontSize: e.fontSizes.md,
        WebkitFontSmoothing: "antialiased",
        MozOsxFontSmoothing: "grayscale"
      })
    }
  });
}
function ad(e, t, n, r = be) {
  Object.keys(t).forEach((o) => {
    e[`--mantine-${n}-${o}`] = r(t[o]);
  });
}
function qAe({ theme: e }) {
  const t = {
    "--mantine-color-white": e.white,
    "--mantine-color-black": e.black,
    "--mantine-transition-timing-function": e.transitionTimingFunction,
    "--mantine-line-height": `${e.lineHeight}`,
    "--mantine-font-family": e.fontFamily,
    "--mantine-font-family-monospace": e.fontFamilyMonospace,
    "--mantine-font-family-headings": e.headings.fontFamily,
    "--mantine-heading-font-weight": `${e.headings.fontWeight}`
  };
  ad(t, e.shadows, "shadow"), ad(t, e.fontSizes, "font-size"), ad(t, e.radius, "radius"), ad(t, e.spacing, "spacing"), ad(t, e.breakpoints, "breakpoints", zx), Object.keys(e.colors).forEach((r) => {
    e.colors[r].forEach((o, i) => {
      t[`--mantine-color-${r}-${i}`] = o;
    });
  });
  const n = e.headings.sizes;
  return Object.keys(n).forEach((r) => {
    t[`--mantine-${r}-font-size`] = n[r].fontSize, t[`--mantine-${r}-line-height`] = `${n[r].lineHeight}`;
  }), /* @__PURE__ */ P.createElement(Xx, {
    styles: {
      ":root": t
    }
  });
}
var GAe = Object.defineProperty, KAe = Object.defineProperties, YAe = Object.getOwnPropertyDescriptors, C4 = Object.getOwnPropertySymbols, XAe = Object.prototype.hasOwnProperty, ZAe = Object.prototype.propertyIsEnumerable, P4 = (e, t, n) => t in e ? GAe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ei = (e, t) => {
  for (var n in t || (t = {}))
    XAe.call(t, n) && P4(e, n, t[n]);
  if (C4)
    for (var n of C4(t))
      ZAe.call(t, n) && P4(e, n, t[n]);
  return e;
}, t0 = (e, t) => KAe(e, YAe(t));
function QAe(e, t) {
  var n;
  if (!t)
    return e;
  const r = Object.keys(e).reduce((o, i) => {
    if (i === "headings" && t.headings) {
      const a = t.headings.sizes ? Object.keys(e.headings.sizes).reduce((l, s) => (l[s] = Ei(Ei({}, e.headings.sizes[s]), t.headings.sizes[s]), l), {}) : e.headings.sizes;
      return t0(Ei({}, o), {
        headings: t0(Ei(Ei({}, e.headings), t.headings), {
          sizes: a
        })
      });
    }
    if (i === "breakpoints" && t.breakpoints) {
      const a = Ei(Ei({}, e.breakpoints), t.breakpoints);
      return t0(Ei({}, o), {
        breakpoints: Object.fromEntries(Object.entries(a).sort((l, s) => Ic(l[1]) - Ic(s[1])))
      });
    }
    return o[i] = typeof t[i] == "object" ? Ei(Ei({}, e[i]), t[i]) : typeof t[i] == "number" || typeof t[i] == "boolean" || typeof t[i] == "function" ? t[i] : t[i] || e[i], o;
  }, {});
  if (t != null && t.fontFamily && !((n = t == null ? void 0 : t.headings) != null && n.fontFamily) && (r.headings.fontFamily = t.fontFamily), !(r.primaryColor in r.colors))
    throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");
  return r;
}
function JAe(e, t) {
  return Cq(QAe(e, t));
}
function Wq(e) {
  return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[n] = e[n]), t), {});
}
const eze = {
  html: {
    fontFamily: "sans-serif",
    lineHeight: "1.15",
    textSizeAdjust: "100%"
  },
  body: {
    margin: 0
  },
  "article, aside, footer, header, nav, section, figcaption, figure, main": {
    display: "block"
  },
  h1: {
    fontSize: "2em"
  },
  hr: {
    boxSizing: "content-box",
    height: 0,
    overflow: "visible"
  },
  pre: {
    fontFamily: "monospace, monospace",
    fontSize: "1em"
  },
  a: {
    background: "transparent",
    textDecorationSkip: "objects"
  },
  "a:active, a:hover": {
    outlineWidth: 0
  },
  "abbr[title]": {
    borderBottom: "none",
    textDecoration: "underline"
  },
  "b, strong": {
    fontWeight: "bolder"
  },
  "code, kbp, samp": {
    fontFamily: "monospace, monospace",
    fontSize: "1em"
  },
  dfn: {
    fontStyle: "italic"
  },
  mark: {
    backgroundColor: "#ff0",
    color: "#000"
  },
  small: {
    fontSize: "80%"
  },
  "sub, sup": {
    fontSize: "75%",
    lineHeight: 0,
    position: "relative",
    verticalAlign: "baseline"
  },
  sup: {
    top: "-0.5em"
  },
  sub: {
    bottom: "-0.25em"
  },
  "audio, video": {
    display: "inline-block"
  },
  "audio:not([controls])": {
    display: "none",
    height: 0
  },
  img: {
    borderStyle: "none",
    verticalAlign: "middle"
  },
  "svg:not(:root)": {
    overflow: "hidden"
  },
  "button, input, optgroup, select, textarea": {
    fontFamily: "sans-serif",
    fontSize: "100%",
    lineHeight: "1.15",
    margin: 0
  },
  "button, input": {
    overflow: "visible"
  },
  "button, select": {
    textTransform: "none"
  },
  "button, [type=reset], [type=submit]": {
    WebkitAppearance: "button"
  },
  "button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner": {
    borderStyle: "none",
    padding: 0
  },
  "button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring": {
    outline: `${be(1)} dotted ButtonText`
  },
  legend: {
    boxSizing: "border-box",
    color: "inherit",
    display: "table",
    maxWidth: "100%",
    padding: 0,
    whiteSpace: "normal"
  },
  progress: {
    display: "inline-block",
    verticalAlign: "baseline"
  },
  textarea: {
    overflow: "auto"
  },
  "[type=checkbox], [type=radio]": {
    boxSizing: "border-box",
    padding: 0
  },
  "[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button": {
    height: "auto"
  },
  "[type=search]": {
    appearance: "none"
  },
  "[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration": {
    appearance: "none"
  },
  "::-webkit-file-upload-button": {
    appearance: "button",
    font: "inherit"
  },
  "details, menu": {
    display: "block"
  },
  summary: {
    display: "list-item"
  },
  canvas: {
    display: "inline-block"
  },
  template: {
    display: "none"
  }
};
function tze() {
  return /* @__PURE__ */ P.createElement(Xx, {
    styles: eze
  });
}
var nze = Object.defineProperty, R4 = Object.getOwnPropertySymbols, rze = Object.prototype.hasOwnProperty, oze = Object.prototype.propertyIsEnumerable, T4 = (e, t, n) => t in e ? nze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ud = (e, t) => {
  for (var n in t || (t = {}))
    rze.call(t, n) && T4(e, n, t[n]);
  if (R4)
    for (var n of R4(t))
      oze.call(t, n) && T4(e, n, t[n]);
  return e;
};
const Jb = b.createContext({
  theme: l2
});
function Wa() {
  var e;
  return ((e = b.useContext(Jb)) == null ? void 0 : e.theme) || l2;
}
function ize(e) {
  const t = Wa(), n = (r) => {
    var o, i, a, l;
    return {
      styles: ((o = t.components[r]) == null ? void 0 : o.styles) || {},
      classNames: ((i = t.components[r]) == null ? void 0 : i.classNames) || {},
      variants: (a = t.components[r]) == null ? void 0 : a.variants,
      sizes: (l = t.components[r]) == null ? void 0 : l.sizes
    };
  };
  return Array.isArray(e) ? e.map(n) : [n(e)];
}
function Vq() {
  var e;
  return (e = b.useContext(Jb)) == null ? void 0 : e.emotionCache;
}
function en(e, t, n) {
  var r;
  const o = Wa(), i = (r = o.components[e]) == null ? void 0 : r.defaultProps, a = typeof i == "function" ? i(o) : i;
  return Ud(Ud(Ud({}, t), a), Wq(n));
}
function qq({
  theme: e,
  emotionCache: t,
  withNormalizeCSS: n = !1,
  withGlobalStyles: r = !1,
  withCSSVariables: o = !1,
  inherit: i = !1,
  children: a
}) {
  const l = b.useContext(Jb), s = JAe(l2, i ? Ud(Ud({}, l.theme), e) : e);
  return /* @__PURE__ */ P.createElement(LAe, {
    theme: s
  }, /* @__PURE__ */ P.createElement(Jb.Provider, {
    value: { theme: s, emotionCache: t }
  }, n && /* @__PURE__ */ P.createElement(tze, null), r && /* @__PURE__ */ P.createElement(VAe, {
    theme: s
  }), o && /* @__PURE__ */ P.createElement(qAe, {
    theme: s
  }), typeof s.globalStyles == "function" && /* @__PURE__ */ P.createElement(Xx, {
    styles: s.globalStyles(s)
  }), a));
}
qq.displayName = "@mantine/core/MantineProvider";
const aze = {
  app: 100,
  modal: 200,
  popover: 300,
  overlay: 400,
  max: 9999
};
function lze(e) {
  return aze[e];
}
function sze(e, t) {
  const n = b.useRef();
  return (!n.current || t.length !== n.current.prevDeps.length || n.current.prevDeps.map((r, o) => r === t[o]).indexOf(!1) >= 0) && (n.current = {
    v: e(),
    prevDeps: [...t]
  }), n.current.v;
}
const uze = Aq({ key: "mantine", prepend: !0 });
function cze() {
  return Vq() || uze;
}
var fze = Object.defineProperty, j4 = Object.getOwnPropertySymbols, dze = Object.prototype.hasOwnProperty, pze = Object.prototype.propertyIsEnumerable, N4 = (e, t, n) => t in e ? fze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, mze = (e, t) => {
  for (var n in t || (t = {}))
    dze.call(t, n) && N4(e, n, t[n]);
  if (j4)
    for (var n of j4(t))
      pze.call(t, n) && N4(e, n, t[n]);
  return e;
};
const n0 = "ref";
function hze(e) {
  let t;
  if (e.length !== 1)
    return { args: e, ref: t };
  const [n] = e;
  if (!(n instanceof Object))
    return { args: e, ref: t };
  if (!(n0 in n))
    return { args: e, ref: t };
  t = n[n0];
  const r = mze({}, n);
  return delete r[n0], { args: [r], ref: t };
}
const { cssFactory: gze } = /* @__PURE__ */ (() => {
  function e(n, r, o) {
    const i = [], a = EAe(n, i, o);
    return i.length < 2 ? o : a + r(i);
  }
  function t(n) {
    const { cache: r } = n, o = (...a) => {
      const { ref: l, args: s } = hze(a), c = Uq(s, r.registered);
      return Mq(r, c, !1), `${r.key}-${c.name}${l === void 0 ? "" : ` ${l}`}`;
    };
    return { css: o, cx: (...a) => e(r.registered, o, kq(a)) };
  }
  return { cssFactory: t };
})();
function Gq() {
  const e = cze();
  return sze(() => gze({ cache: e }), [e]);
}
function yze({
  cx: e,
  classes: t,
  context: n,
  classNames: r,
  name: o,
  cache: i
}) {
  const a = n.reduce((l, s) => (Object.keys(s.classNames).forEach((c) => {
    typeof l[c] != "string" ? l[c] = `${s.classNames[c]}` : l[c] = `${l[c]} ${s.classNames[c]}`;
  }), l), {});
  return Object.keys(t).reduce((l, s) => (l[s] = e(t[s], a[s], r != null && r[s], Array.isArray(o) ? o.filter(Boolean).map((c) => `${(i == null ? void 0 : i.key) || "mantine"}-${c}-${s}`).join(" ") : o ? `${(i == null ? void 0 : i.key) || "mantine"}-${o}-${s}` : null), l), {});
}
var vze = Object.defineProperty, $4 = Object.getOwnPropertySymbols, bze = Object.prototype.hasOwnProperty, wze = Object.prototype.propertyIsEnumerable, I4 = (e, t, n) => t in e ? vze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r0 = (e, t) => {
  for (var n in t || (t = {}))
    bze.call(t, n) && I4(e, n, t[n]);
  if ($4)
    for (var n of $4(t))
      wze.call(t, n) && I4(e, n, t[n]);
  return e;
};
function SE(e, t) {
  return t && Object.keys(t).forEach((n) => {
    e[n] ? e[n] = r0(r0({}, e[n]), t[n]) : e[n] = r0({}, t[n]);
  }), e;
}
function A4(e, t, n, r) {
  const o = (i) => typeof i == "function" ? i(t, n || {}, r) : i || {};
  return Array.isArray(e) ? e.map((i) => o(i.styles)).reduce((i, a) => SE(i, a), {}) : o(e);
}
function xze({ ctx: e, theme: t, params: n, variant: r, size: o }) {
  return e.reduce((i, a) => (a.variants && r in a.variants && SE(i, a.variants[r](t, n, { variant: r, size: o })), a.sizes && o in a.sizes && SE(i, a.sizes[o](t, n, { variant: r, size: o })), i), {});
}
function Cr(e) {
  const t = typeof e == "function" ? e : () => e;
  function n(r, o) {
    const i = Wa(), a = ize(o == null ? void 0 : o.name), l = Vq(), s = { variant: o == null ? void 0 : o.variant, size: o == null ? void 0 : o.size }, { css: c, cx: p } = Gq(), f = t(i, r, s), m = A4(o == null ? void 0 : o.styles, i, r, s), h = A4(a, i, r, s), g = xze({
      ctx: a,
      theme: i,
      params: r,
      variant: o == null ? void 0 : o.variant,
      size: o == null ? void 0 : o.size
    }), v = Object.fromEntries(Object.keys(f).map((S) => {
      const w = p({ [c(f[S])]: !(o != null && o.unstyled) }, c(g[S]), c(h[S]), c(m[S]));
      return [S, w];
    }));
    return {
      classes: yze({
        cx: p,
        classes: v,
        context: a,
        classNames: o == null ? void 0 : o.classNames,
        name: o == null ? void 0 : o.name,
        cache: l
      }),
      cx: p,
      theme: i
    };
  }
  return n;
}
var Sze = Object.defineProperty, kze = Object.defineProperties, _ze = Object.getOwnPropertyDescriptors, z4 = Object.getOwnPropertySymbols, Oze = Object.prototype.hasOwnProperty, Eze = Object.prototype.propertyIsEnumerable, L4 = (e, t, n) => t in e ? Sze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ld = (e, t) => {
  for (var n in t || (t = {}))
    Oze.call(t, n) && L4(e, n, t[n]);
  if (z4)
    for (var n of z4(t))
      Eze.call(t, n) && L4(e, n, t[n]);
  return e;
}, sd = (e, t) => kze(e, _ze(t));
const ud = {
  in: { opacity: 1, transform: "scale(1)" },
  out: { opacity: 0, transform: `scale(.9) translateY(${be(10)})` },
  transitionProperty: "transform, opacity"
}, Kh = {
  fade: {
    in: { opacity: 1 },
    out: { opacity: 0 },
    transitionProperty: "opacity"
  },
  scale: {
    in: { opacity: 1, transform: "scale(1)" },
    out: { opacity: 0, transform: "scale(0)" },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "scale-y": {
    in: { opacity: 1, transform: "scaleY(1)" },
    out: { opacity: 0, transform: "scaleY(0)" },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "scale-x": {
    in: { opacity: 1, transform: "scaleX(1)" },
    out: { opacity: 0, transform: "scaleX(0)" },
    common: { transformOrigin: "left" },
    transitionProperty: "transform, opacity"
  },
  "skew-up": {
    in: { opacity: 1, transform: "translateY(0) skew(0deg, 0deg)" },
    out: { opacity: 0, transform: `translateY(-${be(20)}) skew(-10deg, -5deg)` },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "skew-down": {
    in: { opacity: 1, transform: "translateY(0) skew(0deg, 0deg)" },
    out: { opacity: 0, transform: `translateY(${be(20)}) skew(-10deg, -5deg)` },
    common: { transformOrigin: "bottom" },
    transitionProperty: "transform, opacity"
  },
  "rotate-left": {
    in: { opacity: 1, transform: "translateY(0) rotate(0deg)" },
    out: { opacity: 0, transform: `translateY(${be(20)}) rotate(-5deg)` },
    common: { transformOrigin: "bottom" },
    transitionProperty: "transform, opacity"
  },
  "rotate-right": {
    in: { opacity: 1, transform: "translateY(0) rotate(0deg)" },
    out: { opacity: 0, transform: `translateY(${be(20)}) rotate(5deg)` },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "slide-down": {
    in: { opacity: 1, transform: "translateY(0)" },
    out: { opacity: 0, transform: "translateY(-100%)" },
    common: { transformOrigin: "top" },
    transitionProperty: "transform, opacity"
  },
  "slide-up": {
    in: { opacity: 1, transform: "translateY(0)" },
    out: { opacity: 0, transform: "translateY(100%)" },
    common: { transformOrigin: "bottom" },
    transitionProperty: "transform, opacity"
  },
  "slide-left": {
    in: { opacity: 1, transform: "translateX(0)" },
    out: { opacity: 0, transform: "translateX(100%)" },
    common: { transformOrigin: "left" },
    transitionProperty: "transform, opacity"
  },
  "slide-right": {
    in: { opacity: 1, transform: "translateX(0)" },
    out: { opacity: 0, transform: "translateX(-100%)" },
    common: { transformOrigin: "right" },
    transitionProperty: "transform, opacity"
  },
  pop: sd(ld({}, ud), {
    common: { transformOrigin: "center center" }
  }),
  "pop-bottom-left": sd(ld({}, ud), {
    common: { transformOrigin: "bottom left" }
  }),
  "pop-bottom-right": sd(ld({}, ud), {
    common: { transformOrigin: "bottom right" }
  }),
  "pop-top-left": sd(ld({}, ud), {
    common: { transformOrigin: "top left" }
  }),
  "pop-top-right": sd(ld({}, ud), {
    common: { transformOrigin: "top right" }
  })
}, D4 = ["mousedown", "touchstart"];
function Cze(e, t, n) {
  const r = b.useRef();
  return b.useEffect(() => {
    const o = (i) => {
      const { target: a } = i ?? {};
      if (Array.isArray(n)) {
        const l = (a == null ? void 0 : a.hasAttribute("data-ignore-outside-clicks")) || !document.body.contains(a) && a.tagName !== "HTML";
        n.every((c) => !!c && !i.composedPath().includes(c)) && !l && e();
      } else
        r.current && !r.current.contains(a) && e();
    };
    return (t || D4).forEach((i) => document.addEventListener(i, o)), () => {
      (t || D4).forEach((i) => document.removeEventListener(i, o));
    };
  }, [r, e, n]), r;
}
function Pze(e, t) {
  try {
    return e.addEventListener("change", t), () => e.removeEventListener("change", t);
  } catch {
    return e.addListener(t), () => e.removeListener(t);
  }
}
function Rze(e, t) {
  return typeof t == "boolean" ? t : typeof window < "u" && "matchMedia" in window ? window.matchMedia(e).matches : !1;
}
function Tze(e, t, { getInitialValueInEffect: n } = {
  getInitialValueInEffect: !0
}) {
  const [r, o] = b.useState(n ? t : Rze(e, t)), i = b.useRef();
  return b.useEffect(() => {
    if ("matchMedia" in window)
      return i.current = window.matchMedia(e), o(i.current.matches), Pze(i.current, (a) => o(a.matches));
  }, [e]), r;
}
const Kq = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
function zc(e, t) {
  const n = b.useRef(!1);
  b.useEffect(() => () => {
    n.current = !1;
  }, []), b.useEffect(() => {
    if (n.current)
      return e();
    n.current = !0;
  }, t);
}
function jze({ opened: e, shouldReturnFocus: t = !0 }) {
  const n = b.useRef(), r = () => {
    var o;
    n.current && "focus" in n.current && typeof n.current.focus == "function" && ((o = n.current) == null || o.focus({ preventScroll: !0 }));
  };
  return zc(() => {
    let o = -1;
    const i = (a) => {
      a.key === "Tab" && window.clearTimeout(o);
    };
    return document.addEventListener("keydown", i), e ? n.current = document.activeElement : t && (o = window.setTimeout(r, 10)), () => {
      window.clearTimeout(o), document.removeEventListener("keydown", i);
    };
  }, [e, t]), r;
}
const Nze = /input|select|textarea|button|object/, Yq = "a, input, select, textarea, button, object, [tabindex]";
function $ze(e) {
  return e.style.display === "none";
}
function Ize(e) {
  if (e.getAttribute("aria-hidden") || e.getAttribute("hidden") || e.getAttribute("type") === "hidden")
    return !1;
  let n = e;
  for (; n && !(n === document.body || n.nodeType === 11); ) {
    if ($ze(n))
      return !1;
    n = n.parentNode;
  }
  return !0;
}
function Xq(e) {
  let t = e.getAttribute("tabindex");
  return t === null && (t = void 0), parseInt(t, 10);
}
function kE(e) {
  const t = e.nodeName.toLowerCase(), n = !Number.isNaN(Xq(e));
  return (Nze.test(t) && !e.disabled || e instanceof HTMLAnchorElement && e.href || n) && Ize(e);
}
function Zq(e) {
  const t = Xq(e);
  return (Number.isNaN(t) || t >= 0) && kE(e);
}
function Aze(e) {
  return Array.from(e.querySelectorAll(Yq)).filter(Zq);
}
function zze(e, t) {
  const n = Aze(e);
  if (!n.length) {
    t.preventDefault();
    return;
  }
  const r = n[t.shiftKey ? 0 : n.length - 1], o = e.getRootNode();
  if (!(r === o.activeElement || e === o.activeElement))
    return;
  t.preventDefault();
  const a = n[t.shiftKey ? n.length - 1 : 0];
  a && a.focus();
}
function Qq() {
  return `mantine-${Math.random().toString(36).slice(2, 11)}`;
}
function Lze(e, t = "body > :not(script)") {
  const n = Qq(), r = Array.from(document.querySelectorAll(t)).map((o) => {
    var i;
    if ((i = o == null ? void 0 : o.shadowRoot) != null && i.contains(e) || o.contains(e))
      return;
    const a = o.getAttribute("aria-hidden"), l = o.getAttribute("data-hidden"), s = o.getAttribute("data-focus-id");
    return o.setAttribute("data-focus-id", n), a === null || a === "false" ? o.setAttribute("aria-hidden", "true") : !l && !s && o.setAttribute("data-hidden", a), {
      node: o,
      ariaHidden: l || null
    };
  });
  return () => {
    r.forEach((o) => {
      !o || n !== o.node.getAttribute("data-focus-id") || (o.ariaHidden === null ? o.node.removeAttribute("aria-hidden") : o.node.setAttribute("aria-hidden", o.ariaHidden), o.node.removeAttribute("data-focus-id"), o.node.removeAttribute("data-hidden"));
    });
  };
}
function Dze(e = !0) {
  const t = b.useRef(), n = b.useRef(null), r = (i) => {
    let a = i.querySelector("[data-autofocus]");
    if (!a) {
      const l = Array.from(i.querySelectorAll(Yq));
      a = l.find(Zq) || l.find(kE) || null, !a && kE(i) && (a = i);
    }
    a && a.focus({ preventScroll: !0 });
  }, o = b.useCallback((i) => {
    if (e) {
      if (i === null) {
        n.current && (n.current(), n.current = null);
        return;
      }
      n.current = Lze(i), t.current !== i && (i ? (setTimeout(() => {
        i.getRootNode() && r(i);
      }), t.current = i) : t.current = null);
    }
  }, [e]);
  return b.useEffect(() => {
    if (!e)
      return;
    t.current && setTimeout(() => r(t.current));
    const i = (a) => {
      a.key === "Tab" && t.current && zze(t.current, a);
    };
    return document.addEventListener("keydown", i), () => {
      document.removeEventListener("keydown", i), n.current && n.current();
    };
  }, [e]), o;
}
const Fze = P.useId || (() => {
});
function Mze() {
  const e = Fze();
  return e ? `mantine-${e.replace(/:/g, "")}` : "";
}
function m2(e) {
  const t = Mze(), [n, r] = b.useState(t);
  return Kq(() => {
    r(Qq());
  }, []), typeof e == "string" ? e : typeof window > "u" ? t : n;
}
function Bze(e, t) {
  typeof e == "function" ? e(t) : typeof e == "object" && e !== null && "current" in e && (e.current = t);
}
function Uze(...e) {
  return (t) => {
    e.forEach((n) => Bze(n, t));
  };
}
function Jq(...e) {
  return b.useCallback(Uze(...e), e);
}
function Hze({
  value: e,
  defaultValue: t,
  finalValue: n,
  onChange: r = () => {
  }
}) {
  const [o, i] = b.useState(t !== void 0 ? t : n), a = (l) => {
    i(l), r == null || r(l);
  };
  return e !== void 0 ? [e, r, !0] : [o, a, !1];
}
function Wze(e, t) {
  return Tze("(prefers-reduced-motion: reduce)", e, t);
}
function Vze(e = !1, t) {
  const { onOpen: n, onClose: r } = t || {}, [o, i] = b.useState(e), a = b.useCallback(() => {
    i((c) => c || (n == null || n(), !0));
  }, [n]), l = b.useCallback(() => {
    i((c) => c && (r == null || r(), !1));
  }, [r]), s = b.useCallback(() => {
    o ? l() : a();
  }, [l, a, o]);
  return [o, { open: a, close: l, toggle: s }];
}
var F4 = Object.getOwnPropertySymbols, qze = Object.prototype.hasOwnProperty, Gze = Object.prototype.propertyIsEnumerable, Kze = (e, t) => {
  var n = {};
  for (var r in e)
    qze.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && F4)
    for (var r of F4(e))
      t.indexOf(r) < 0 && Gze.call(e, r) && (n[r] = e[r]);
  return n;
};
function h2(e) {
  const t = e, {
    m: n,
    mx: r,
    my: o,
    mt: i,
    mb: a,
    ml: l,
    mr: s,
    p: c,
    px: p,
    py: f,
    pt: m,
    pb: h,
    pl: g,
    pr: v,
    bg: S,
    c: w,
    opacity: x,
    ff: k,
    fz: E,
    fw: O,
    lts: C,
    ta: R,
    lh: L,
    fs: D,
    tt: N,
    td: H,
    w: B,
    miw: K,
    maw: W,
    h: U,
    mih: Q,
    mah: J,
    bgsz: q,
    bgp: ee,
    bgr: A,
    bga: X,
    pos: ie,
    top: j,
    left: le,
    bottom: re,
    right: he,
    inset: xe,
    display: ke
  } = t, Ae = Kze(t, [
    "m",
    "mx",
    "my",
    "mt",
    "mb",
    "ml",
    "mr",
    "p",
    "px",
    "py",
    "pt",
    "pb",
    "pl",
    "pr",
    "bg",
    "c",
    "opacity",
    "ff",
    "fz",
    "fw",
    "lts",
    "ta",
    "lh",
    "fs",
    "tt",
    "td",
    "w",
    "miw",
    "maw",
    "h",
    "mih",
    "mah",
    "bgsz",
    "bgp",
    "bgr",
    "bga",
    "pos",
    "top",
    "left",
    "bottom",
    "right",
    "inset",
    "display"
  ]);
  return { systemStyles: Wq({
    m: n,
    mx: r,
    my: o,
    mt: i,
    mb: a,
    ml: l,
    mr: s,
    p: c,
    px: p,
    py: f,
    pt: m,
    pb: h,
    pl: g,
    pr: v,
    bg: S,
    c: w,
    opacity: x,
    ff: k,
    fz: E,
    fw: O,
    lts: C,
    ta: R,
    lh: L,
    fs: D,
    tt: N,
    td: H,
    w: B,
    miw: K,
    maw: W,
    h: U,
    mih: Q,
    mah: J,
    bgsz: q,
    bgp: ee,
    bgr: A,
    bga: X,
    pos: ie,
    top: j,
    left: le,
    bottom: re,
    right: he,
    inset: xe,
    display: ke
  }), rest: Ae };
}
function Yze(e, t) {
  const n = Object.keys(e).filter((r) => r !== "base").sort((r, o) => Ic($t({ size: r, sizes: t.breakpoints })) - Ic($t({ size: o, sizes: t.breakpoints })));
  return "base" in e ? ["base", ...n] : n;
}
function Xze({ value: e, theme: t, getValue: n, property: r }) {
  if (e == null)
    return;
  if (typeof e == "object")
    return Yze(e, t).reduce((a, l) => {
      if (l === "base" && e.base !== void 0) {
        const c = n(e.base, t);
        return Array.isArray(r) ? (r.forEach((p) => {
          a[p] = c;
        }), a) : (a[r] = c, a);
      }
      const s = n(e[l], t);
      return Array.isArray(r) ? (a[t.fn.largerThan(l)] = {}, r.forEach((c) => {
        a[t.fn.largerThan(l)][c] = s;
      }), a) : (a[t.fn.largerThan(l)] = {
        [r]: s
      }, a);
    }, {});
  const o = n(e, t);
  return Array.isArray(r) ? r.reduce((i, a) => (i[a] = o, i), {}) : { [r]: o };
}
function Zze(e, t) {
  return e === "dimmed" ? t.colorScheme === "dark" ? t.colors.dark[2] : t.colors.gray[6] : t.fn.variant({ variant: "filled", color: e, primaryFallback: !1 }).background;
}
function Qze(e) {
  return be(e);
}
function Jze(e) {
  return e;
}
function e4e(e, t) {
  return $t({ size: e, sizes: t.fontSizes });
}
const t4e = ["-xs", "-sm", "-md", "-lg", "-xl"];
function n4e(e, t) {
  return t4e.includes(e) ? `calc(${$t({
    size: e.replace("-", ""),
    sizes: t.spacing
  })} * -1)` : $t({ size: e, sizes: t.spacing });
}
const r4e = {
  identity: Jze,
  color: Zze,
  size: Qze,
  fontSize: e4e,
  spacing: n4e
}, o4e = {
  m: { type: "spacing", property: "margin" },
  mt: { type: "spacing", property: "marginTop" },
  mb: { type: "spacing", property: "marginBottom" },
  ml: { type: "spacing", property: "marginLeft" },
  mr: { type: "spacing", property: "marginRight" },
  mx: { type: "spacing", property: ["marginRight", "marginLeft"] },
  my: { type: "spacing", property: ["marginTop", "marginBottom"] },
  p: { type: "spacing", property: "padding" },
  pt: { type: "spacing", property: "paddingTop" },
  pb: { type: "spacing", property: "paddingBottom" },
  pl: { type: "spacing", property: "paddingLeft" },
  pr: { type: "spacing", property: "paddingRight" },
  px: { type: "spacing", property: ["paddingRight", "paddingLeft"] },
  py: { type: "spacing", property: ["paddingTop", "paddingBottom"] },
  bg: { type: "color", property: "background" },
  c: { type: "color", property: "color" },
  opacity: { type: "identity", property: "opacity" },
  ff: { type: "identity", property: "fontFamily" },
  fz: { type: "fontSize", property: "fontSize" },
  fw: { type: "identity", property: "fontWeight" },
  lts: { type: "size", property: "letterSpacing" },
  ta: { type: "identity", property: "textAlign" },
  lh: { type: "identity", property: "lineHeight" },
  fs: { type: "identity", property: "fontStyle" },
  tt: { type: "identity", property: "textTransform" },
  td: { type: "identity", property: "textDecoration" },
  w: { type: "spacing", property: "width" },
  miw: { type: "spacing", property: "minWidth" },
  maw: { type: "spacing", property: "maxWidth" },
  h: { type: "spacing", property: "height" },
  mih: { type: "spacing", property: "minHeight" },
  mah: { type: "spacing", property: "maxHeight" },
  bgsz: { type: "size", property: "backgroundSize" },
  bgp: { type: "identity", property: "backgroundPosition" },
  bgr: { type: "identity", property: "backgroundRepeat" },
  bga: { type: "identity", property: "backgroundAttachment" },
  pos: { type: "identity", property: "position" },
  top: { type: "identity", property: "top" },
  left: { type: "size", property: "left" },
  bottom: { type: "size", property: "bottom" },
  right: { type: "size", property: "right" },
  inset: { type: "size", property: "inset" },
  display: { type: "identity", property: "display" }
};
var i4e = Object.defineProperty, M4 = Object.getOwnPropertySymbols, a4e = Object.prototype.hasOwnProperty, l4e = Object.prototype.propertyIsEnumerable, B4 = (e, t, n) => t in e ? i4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, U4 = (e, t) => {
  for (var n in t || (t = {}))
    a4e.call(t, n) && B4(e, n, t[n]);
  if (M4)
    for (var n of M4(t))
      l4e.call(t, n) && B4(e, n, t[n]);
  return e;
};
function _E(e, t, n = o4e) {
  return Object.keys(n).reduce((o, i) => (i in e && e[i] !== void 0 && o.push(Xze({
    value: e[i],
    getValue: r4e[n[i].type],
    property: n[i].property,
    theme: t
  })), o), []).reduce((o, i) => (Object.keys(i).forEach((a) => {
    typeof i[a] == "object" && i[a] !== null && a in o ? o[a] = U4(U4({}, o[a]), i[a]) : o[a] = i[a];
  }), o), {});
}
function H4(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function s4e(e, t, n) {
  const r = Wa(), { css: o, cx: i } = Gq();
  return Array.isArray(e) ? i(n, o(_E(t, r)), e.map((a) => o(H4(a, r)))) : i(n, o(H4(e, r)), o(_E(t, r)));
}
var u4e = Object.defineProperty, ew = Object.getOwnPropertySymbols, eG = Object.prototype.hasOwnProperty, tG = Object.prototype.propertyIsEnumerable, W4 = (e, t, n) => t in e ? u4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, c4e = (e, t) => {
  for (var n in t || (t = {}))
    eG.call(t, n) && W4(e, n, t[n]);
  if (ew)
    for (var n of ew(t))
      tG.call(t, n) && W4(e, n, t[n]);
  return e;
}, f4e = (e, t) => {
  var n = {};
  for (var r in e)
    eG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ew)
    for (var r of ew(e))
      t.indexOf(r) < 0 && tG.call(e, r) && (n[r] = e[r]);
  return n;
};
const nG = b.forwardRef((e, t) => {
  var n = e, { className: r, component: o, style: i, sx: a } = n, l = f4e(n, ["className", "component", "style", "sx"]);
  const { systemStyles: s, rest: c } = h2(l), p = o || "div";
  return /* @__PURE__ */ P.createElement(p, c4e({
    ref: t,
    className: s4e(a, s, r),
    style: i
  }, c));
});
nG.displayName = "@mantine/core/Box";
const qo = nG;
var d4e = Object.defineProperty, p4e = Object.defineProperties, m4e = Object.getOwnPropertyDescriptors, V4 = Object.getOwnPropertySymbols, h4e = Object.prototype.hasOwnProperty, g4e = Object.prototype.propertyIsEnumerable, q4 = (e, t, n) => t in e ? d4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, G4 = (e, t) => {
  for (var n in t || (t = {}))
    h4e.call(t, n) && q4(e, n, t[n]);
  if (V4)
    for (var n of V4(t))
      g4e.call(t, n) && q4(e, n, t[n]);
  return e;
}, y4e = (e, t) => p4e(e, m4e(t)), v4e = Cr((e) => ({
  root: y4e(G4(G4({}, e.fn.focusStyles()), e.fn.fontStyles()), {
    cursor: "pointer",
    border: 0,
    padding: 0,
    appearance: "none",
    fontSize: e.fontSizes.md,
    backgroundColor: "transparent",
    textAlign: "left",
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    textDecoration: "none",
    boxSizing: "border-box"
  })
})), b4e = Object.defineProperty, tw = Object.getOwnPropertySymbols, rG = Object.prototype.hasOwnProperty, oG = Object.prototype.propertyIsEnumerable, K4 = (e, t, n) => t in e ? b4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, w4e = (e, t) => {
  for (var n in t || (t = {}))
    rG.call(t, n) && K4(e, n, t[n]);
  if (tw)
    for (var n of tw(t))
      oG.call(t, n) && K4(e, n, t[n]);
  return e;
}, x4e = (e, t) => {
  var n = {};
  for (var r in e)
    rG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && tw)
    for (var r of tw(e))
      t.indexOf(r) < 0 && oG.call(e, r) && (n[r] = e[r]);
  return n;
};
const iG = b.forwardRef((e, t) => {
  const n = en("UnstyledButton", {}, e), {
    className: r,
    component: o = "button",
    unstyled: i,
    variant: a
  } = n, l = x4e(n, [
    "className",
    "component",
    "unstyled",
    "variant"
  ]), { classes: s, cx: c } = v4e(null, { name: "UnstyledButton", unstyled: i, variant: a });
  return /* @__PURE__ */ P.createElement(qo, w4e({
    component: o,
    ref: t,
    className: c(s.root, r),
    type: o === "button" ? "button" : void 0
  }, l));
});
iG.displayName = "@mantine/core/UnstyledButton";
const aG = iG;
var S4e = Object.defineProperty, k4e = Object.defineProperties, _4e = Object.getOwnPropertyDescriptors, Y4 = Object.getOwnPropertySymbols, O4e = Object.prototype.hasOwnProperty, E4e = Object.prototype.propertyIsEnumerable, X4 = (e, t, n) => t in e ? S4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, OE = (e, t) => {
  for (var n in t || (t = {}))
    O4e.call(t, n) && X4(e, n, t[n]);
  if (Y4)
    for (var n of Y4(t))
      E4e.call(t, n) && X4(e, n, t[n]);
  return e;
}, Z4 = (e, t) => k4e(e, _4e(t));
const C4e = [
  "subtle",
  "filled",
  "outline",
  "light",
  "default",
  "transparent",
  "gradient"
], Yh = {
  xs: be(18),
  sm: be(22),
  md: be(28),
  lg: be(34),
  xl: be(44)
};
function P4e({ variant: e, theme: t, color: n, gradient: r }) {
  const o = t.fn.variant({ color: n, variant: e, gradient: r });
  return e === "gradient" ? {
    border: 0,
    backgroundImage: o.background,
    color: o.color,
    "&:hover": t.fn.hover({
      backgroundSize: "200%"
    })
  } : C4e.includes(e) ? OE({
    border: `${be(1)} solid ${o.border}`,
    backgroundColor: o.background,
    color: o.color
  }, t.fn.hover({
    backgroundColor: o.hover
  })) : null;
}
var R4e = Cr((e, { radius: t, color: n, gradient: r }, { variant: o, size: i }) => ({
  root: Z4(OE({
    position: "relative",
    borderRadius: e.fn.radius(t),
    padding: 0,
    lineHeight: 1,
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    height: $t({ size: i, sizes: Yh }),
    minHeight: $t({ size: i, sizes: Yh }),
    width: $t({ size: i, sizes: Yh }),
    minWidth: $t({ size: i, sizes: Yh })
  }, P4e({ variant: o, theme: e, color: n, gradient: r })), {
    "&:active": e.activeStyles,
    "& [data-action-icon-loader]": {
      maxWidth: "70%"
    },
    "&:disabled, &[data-disabled]": {
      color: e.colors.gray[e.colorScheme === "dark" ? 6 : 4],
      cursor: "not-allowed",
      backgroundColor: o === "transparent" ? void 0 : e.fn.themeColor("gray", e.colorScheme === "dark" ? 8 : 1),
      borderColor: o === "transparent" ? void 0 : e.fn.themeColor("gray", e.colorScheme === "dark" ? 8 : 1),
      backgroundImage: "none",
      pointerEvents: "none",
      "&:active": {
        transform: "none"
      }
    },
    "&[data-loading]": {
      pointerEvents: "none",
      "&::before": Z4(OE({
        content: '""'
      }, e.fn.cover(be(-1))), {
        backgroundColor: e.colorScheme === "dark" ? e.fn.rgba(e.colors.dark[7], 0.5) : "rgba(255, 255, 255, .5)",
        borderRadius: e.fn.radius(t),
        cursor: "not-allowed"
      })
    }
  })
})), T4e = Object.defineProperty, nw = Object.getOwnPropertySymbols, lG = Object.prototype.hasOwnProperty, sG = Object.prototype.propertyIsEnumerable, Q4 = (e, t, n) => t in e ? T4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, J4 = (e, t) => {
  for (var n in t || (t = {}))
    lG.call(t, n) && Q4(e, n, t[n]);
  if (nw)
    for (var n of nw(t))
      sG.call(t, n) && Q4(e, n, t[n]);
  return e;
}, eL = (e, t) => {
  var n = {};
  for (var r in e)
    lG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && nw)
    for (var r of nw(e))
      t.indexOf(r) < 0 && sG.call(e, r) && (n[r] = e[r]);
  return n;
};
function j4e(e) {
  var t = e, { size: n, color: r } = t, o = eL(t, ["size", "color"]);
  const i = o, { style: a } = i, l = eL(i, ["style"]);
  return /* @__PURE__ */ P.createElement("svg", J4({
    viewBox: "0 0 135 140",
    xmlns: "http://www.w3.org/2000/svg",
    fill: r,
    style: J4({ width: n }, a)
  }, l), /* @__PURE__ */ P.createElement("rect", {
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.5s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.5s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "30",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.25s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.25s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "60",
    width: "15",
    height: "140",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "90",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.25s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.25s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("rect", {
    x: "120",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "height",
    begin: "0.5s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "y",
    begin: "0.5s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })));
}
var N4e = Object.defineProperty, rw = Object.getOwnPropertySymbols, uG = Object.prototype.hasOwnProperty, cG = Object.prototype.propertyIsEnumerable, tL = (e, t, n) => t in e ? N4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, nL = (e, t) => {
  for (var n in t || (t = {}))
    uG.call(t, n) && tL(e, n, t[n]);
  if (rw)
    for (var n of rw(t))
      cG.call(t, n) && tL(e, n, t[n]);
  return e;
}, rL = (e, t) => {
  var n = {};
  for (var r in e)
    uG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && rw)
    for (var r of rw(e))
      t.indexOf(r) < 0 && cG.call(e, r) && (n[r] = e[r]);
  return n;
};
function $4e(e) {
  var t = e, { size: n, color: r } = t, o = rL(t, ["size", "color"]);
  const i = o, { style: a } = i, l = rL(i, ["style"]);
  return /* @__PURE__ */ P.createElement("svg", nL({
    viewBox: "0 0 38 38",
    xmlns: "http://www.w3.org/2000/svg",
    stroke: r,
    style: nL({ width: n, height: n }, a)
  }, l), /* @__PURE__ */ P.createElement("g", {
    fill: "none",
    fillRule: "evenodd"
  }, /* @__PURE__ */ P.createElement("g", {
    transform: "translate(2.5 2.5)",
    strokeWidth: "5"
  }, /* @__PURE__ */ P.createElement("circle", {
    strokeOpacity: ".5",
    cx: "16",
    cy: "16",
    r: "16"
  }), /* @__PURE__ */ P.createElement("path", {
    d: "M32 16c0-9.94-8.06-16-16-16"
  }, /* @__PURE__ */ P.createElement("animateTransform", {
    attributeName: "transform",
    type: "rotate",
    from: "0 16 16",
    to: "360 16 16",
    dur: "1s",
    repeatCount: "indefinite"
  })))));
}
var I4e = Object.defineProperty, ow = Object.getOwnPropertySymbols, fG = Object.prototype.hasOwnProperty, dG = Object.prototype.propertyIsEnumerable, oL = (e, t, n) => t in e ? I4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, iL = (e, t) => {
  for (var n in t || (t = {}))
    fG.call(t, n) && oL(e, n, t[n]);
  if (ow)
    for (var n of ow(t))
      dG.call(t, n) && oL(e, n, t[n]);
  return e;
}, aL = (e, t) => {
  var n = {};
  for (var r in e)
    fG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ow)
    for (var r of ow(e))
      t.indexOf(r) < 0 && dG.call(e, r) && (n[r] = e[r]);
  return n;
};
function A4e(e) {
  var t = e, { size: n, color: r } = t, o = aL(t, ["size", "color"]);
  const i = o, { style: a } = i, l = aL(i, ["style"]);
  return /* @__PURE__ */ P.createElement("svg", iL({
    viewBox: "0 0 120 30",
    xmlns: "http://www.w3.org/2000/svg",
    fill: r,
    style: iL({ width: n }, a)
  }, l), /* @__PURE__ */ P.createElement("circle", {
    cx: "15",
    cy: "15",
    r: "15"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "r",
    from: "15",
    to: "15",
    begin: "0s",
    dur: "0.8s",
    values: "15;9;15",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "fill-opacity",
    from: "1",
    to: "1",
    begin: "0s",
    dur: "0.8s",
    values: "1;.5;1",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("circle", {
    cx: "60",
    cy: "15",
    r: "9",
    fillOpacity: "0.3"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "r",
    from: "9",
    to: "9",
    begin: "0s",
    dur: "0.8s",
    values: "9;15;9",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "fill-opacity",
    from: "0.5",
    to: "0.5",
    begin: "0s",
    dur: "0.8s",
    values: ".5;1;.5",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ P.createElement("circle", {
    cx: "105",
    cy: "15",
    r: "15"
  }, /* @__PURE__ */ P.createElement("animate", {
    attributeName: "r",
    from: "15",
    to: "15",
    begin: "0s",
    dur: "0.8s",
    values: "15;9;15",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ P.createElement("animate", {
    attributeName: "fill-opacity",
    from: "1",
    to: "1",
    begin: "0s",
    dur: "0.8s",
    values: "1;.5;1",
    calcMode: "linear",
    repeatCount: "indefinite"
  })));
}
var z4e = Object.defineProperty, iw = Object.getOwnPropertySymbols, pG = Object.prototype.hasOwnProperty, mG = Object.prototype.propertyIsEnumerable, lL = (e, t, n) => t in e ? z4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, L4e = (e, t) => {
  for (var n in t || (t = {}))
    pG.call(t, n) && lL(e, n, t[n]);
  if (iw)
    for (var n of iw(t))
      mG.call(t, n) && lL(e, n, t[n]);
  return e;
}, D4e = (e, t) => {
  var n = {};
  for (var r in e)
    pG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && iw)
    for (var r of iw(e))
      t.indexOf(r) < 0 && mG.call(e, r) && (n[r] = e[r]);
  return n;
};
const o0 = {
  bars: j4e,
  oval: $4e,
  dots: A4e
}, F4e = {
  xs: be(18),
  sm: be(22),
  md: be(36),
  lg: be(44),
  xl: be(58)
}, M4e = {
  size: "md"
};
function g2(e) {
  const t = en("Loader", M4e, e), { size: n, color: r, variant: o } = t, i = D4e(t, ["size", "color", "variant"]), a = Wa(), l = o in o0 ? o : a.loader;
  return /* @__PURE__ */ P.createElement(qo, L4e({
    role: "presentation",
    component: o0[l] || o0.bars,
    size: $t({ size: n, sizes: F4e }),
    color: a.fn.variant({
      variant: "filled",
      primaryFallback: !1,
      color: r || a.primaryColor
    }).background
  }, i));
}
g2.displayName = "@mantine/core/Loader";
var B4e = Object.defineProperty, aw = Object.getOwnPropertySymbols, hG = Object.prototype.hasOwnProperty, gG = Object.prototype.propertyIsEnumerable, sL = (e, t, n) => t in e ? B4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, uL = (e, t) => {
  for (var n in t || (t = {}))
    hG.call(t, n) && sL(e, n, t[n]);
  if (aw)
    for (var n of aw(t))
      gG.call(t, n) && sL(e, n, t[n]);
  return e;
}, U4e = (e, t) => {
  var n = {};
  for (var r in e)
    hG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && aw)
    for (var r of aw(e))
      t.indexOf(r) < 0 && gG.call(e, r) && (n[r] = e[r]);
  return n;
};
const H4e = {
  color: "gray",
  size: "md",
  variant: "subtle"
}, yG = b.forwardRef((e, t) => {
  const n = en("ActionIcon", H4e, e), {
    className: r,
    color: o,
    children: i,
    radius: a,
    size: l,
    variant: s,
    gradient: c,
    disabled: p,
    loaderProps: f,
    loading: m,
    unstyled: h,
    __staticSelector: g
  } = n, v = U4e(n, [
    "className",
    "color",
    "children",
    "radius",
    "size",
    "variant",
    "gradient",
    "disabled",
    "loaderProps",
    "loading",
    "unstyled",
    "__staticSelector"
  ]), { classes: S, cx: w, theme: x } = R4e({ radius: a, color: o, gradient: c }, { name: ["ActionIcon", g], unstyled: h, size: l, variant: s }), k = /* @__PURE__ */ P.createElement(g2, uL({
    color: x.fn.variant({ color: o, variant: s }).color,
    size: "100%",
    "data-action-icon-loader": !0
  }, f));
  return /* @__PURE__ */ P.createElement(aG, uL({
    className: w(S.root, r),
    ref: t,
    disabled: p,
    "data-disabled": p || void 0,
    "data-loading": m || void 0,
    unstyled: h
  }, v), m ? k : i);
});
yG.displayName = "@mantine/core/ActionIcon";
const W4e = yG;
var V4e = Object.defineProperty, q4e = Object.defineProperties, G4e = Object.getOwnPropertyDescriptors, lw = Object.getOwnPropertySymbols, vG = Object.prototype.hasOwnProperty, bG = Object.prototype.propertyIsEnumerable, cL = (e, t, n) => t in e ? V4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, K4e = (e, t) => {
  for (var n in t || (t = {}))
    vG.call(t, n) && cL(e, n, t[n]);
  if (lw)
    for (var n of lw(t))
      bG.call(t, n) && cL(e, n, t[n]);
  return e;
}, Y4e = (e, t) => q4e(e, G4e(t)), X4e = (e, t) => {
  var n = {};
  for (var r in e)
    vG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && lw)
    for (var r of lw(e))
      t.indexOf(r) < 0 && bG.call(e, r) && (n[r] = e[r]);
  return n;
};
function wG(e) {
  const t = en("Portal", {}, e), { children: n, target: r, className: o, innerRef: i } = t, a = X4e(t, ["children", "target", "className", "innerRef"]), l = Wa(), [s, c] = b.useState(!1), p = b.useRef();
  return Kq(() => (c(!0), p.current = r ? typeof r == "string" ? document.querySelector(r) : r : document.createElement("div"), r || document.body.appendChild(p.current), () => {
    !r && document.body.removeChild(p.current);
  }), [r]), s ? La.createPortal(/* @__PURE__ */ P.createElement("div", Y4e(K4e({
    className: o,
    dir: l.dir
  }, a), {
    ref: i
  }), n), p.current) : null;
}
wG.displayName = "@mantine/core/Portal";
var Z4e = Object.defineProperty, sw = Object.getOwnPropertySymbols, xG = Object.prototype.hasOwnProperty, SG = Object.prototype.propertyIsEnumerable, fL = (e, t, n) => t in e ? Z4e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Q4e = (e, t) => {
  for (var n in t || (t = {}))
    xG.call(t, n) && fL(e, n, t[n]);
  if (sw)
    for (var n of sw(t))
      SG.call(t, n) && fL(e, n, t[n]);
  return e;
}, J4e = (e, t) => {
  var n = {};
  for (var r in e)
    xG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && sw)
    for (var r of sw(e))
      t.indexOf(r) < 0 && SG.call(e, r) && (n[r] = e[r]);
  return n;
};
function kG(e) {
  var t = e, { withinPortal: n = !0, children: r } = t, o = J4e(t, ["withinPortal", "children"]);
  return n ? /* @__PURE__ */ P.createElement(wG, Q4e({}, o), r) : /* @__PURE__ */ P.createElement(P.Fragment, null, r);
}
kG.displayName = "@mantine/core/OptionalPortal";
var eLe = Object.defineProperty, tLe = Object.defineProperties, nLe = Object.getOwnPropertyDescriptors, dL = Object.getOwnPropertySymbols, rLe = Object.prototype.hasOwnProperty, oLe = Object.prototype.propertyIsEnumerable, pL = (e, t, n) => t in e ? eLe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, i0 = (e, t) => {
  for (var n in t || (t = {}))
    rLe.call(t, n) && pL(e, n, t[n]);
  if (dL)
    for (var n of dL(t))
      oLe.call(t, n) && pL(e, n, t[n]);
  return e;
}, mL = (e, t) => tLe(e, nLe(t));
function iLe({ variant: e, color: t, theme: n }) {
  if (e === "filled")
    return {
      backgroundColor: n.fn.variant({ variant: "filled", color: t }).background,
      color: n.white
    };
  if (e === "outline") {
    const r = n.fn.variant({ variant: "outline", color: t });
    return {
      color: r.color,
      borderColor: r.border,
      backgroundColor: n.colorScheme === "dark" ? n.colors.dark[6] : n.white
    };
  }
  if (e === "light") {
    const r = n.fn.variant({ variant: "light", color: t });
    return {
      backgroundColor: r.background,
      color: r.color
    };
  }
  return null;
}
var aLe = Cr((e, { radius: t, color: n }, { variant: r }) => ({
  root: i0(mL(i0({}, e.fn.fontStyles()), {
    position: "relative",
    overflow: "hidden",
    paddingTop: e.spacing.sm,
    paddingBottom: e.spacing.sm,
    paddingLeft: e.spacing.md,
    paddingRight: e.spacing.sm,
    borderRadius: e.fn.radius(t),
    border: `${be(1)} solid transparent`
  }), iLe({ variant: r, color: n, theme: e })),
  wrapper: {
    display: "flex"
  },
  body: {
    flex: 1
  },
  title: {
    boxSizing: "border-box",
    margin: 0,
    marginBottom: e.spacing.xs,
    display: "flex",
    alignItems: "center",
    justifyContent: "space-between",
    lineHeight: e.lineHeight,
    fontSize: e.fontSizes.sm,
    fontWeight: 700,
    "&[data-with-close-button]": {
      paddingRight: e.spacing.md
    }
  },
  label: {
    display: "block",
    overflow: "hidden",
    textOverflow: "ellipsis"
  },
  icon: {
    lineHeight: 1,
    width: be(20),
    height: be(20),
    display: "flex",
    alignItems: "center",
    justifyContent: "flex-start",
    marginRight: e.spacing.md,
    marginTop: 1
  },
  message: mL(i0({}, e.fn.fontStyles()), {
    lineHeight: e.lineHeight,
    textOverflow: "ellipsis",
    overflow: "hidden",
    fontSize: e.fontSizes.sm,
    color: r === "filled" ? e.white : e.colorScheme === "dark" ? r === "light" ? e.white : e.colors.dark[0] : e.black
  }),
  closeButton: {
    width: be(10),
    height: be(10),
    color: r === "filled" ? e.white : e.colorScheme === "dark" ? r === "light" ? e.white : e.colors.dark[0] : e.black
  }
})), lLe = Object.defineProperty, uw = Object.getOwnPropertySymbols, _G = Object.prototype.hasOwnProperty, OG = Object.prototype.propertyIsEnumerable, hL = (e, t, n) => t in e ? lLe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, gL = (e, t) => {
  for (var n in t || (t = {}))
    _G.call(t, n) && hL(e, n, t[n]);
  if (uw)
    for (var n of uw(t))
      OG.call(t, n) && hL(e, n, t[n]);
  return e;
}, sLe = (e, t) => {
  var n = {};
  for (var r in e)
    _G.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && uw)
    for (var r of uw(e))
      t.indexOf(r) < 0 && OG.call(e, r) && (n[r] = e[r]);
  return n;
};
function EG(e) {
  const t = e, { width: n, height: r, style: o } = t, i = sLe(t, ["width", "height", "style"]);
  return /* @__PURE__ */ P.createElement("svg", gL({
    viewBox: "0 0 15 15",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg",
    style: gL({ width: n, height: r }, o)
  }, i), /* @__PURE__ */ P.createElement("path", {
    d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
    fill: "currentColor",
    fillRule: "evenodd",
    clipRule: "evenodd"
  }));
}
EG.displayName = "@mantine/core/CloseIcon";
var uLe = Object.defineProperty, cw = Object.getOwnPropertySymbols, CG = Object.prototype.hasOwnProperty, PG = Object.prototype.propertyIsEnumerable, yL = (e, t, n) => t in e ? uLe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, cLe = (e, t) => {
  for (var n in t || (t = {}))
    CG.call(t, n) && yL(e, n, t[n]);
  if (cw)
    for (var n of cw(t))
      PG.call(t, n) && yL(e, n, t[n]);
  return e;
}, fLe = (e, t) => {
  var n = {};
  for (var r in e)
    CG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && cw)
    for (var r of cw(e))
      t.indexOf(r) < 0 && PG.call(e, r) && (n[r] = e[r]);
  return n;
};
const dLe = {
  xs: be(12),
  sm: be(16),
  md: be(20),
  lg: be(28),
  xl: be(34)
}, pLe = {
  size: "sm"
}, RG = b.forwardRef((e, t) => {
  const n = en("CloseButton", pLe, e), { iconSize: r, size: o, children: i } = n, a = fLe(n, ["iconSize", "size", "children"]), l = be(r || dLe[o]);
  return /* @__PURE__ */ P.createElement(W4e, cLe({
    ref: t,
    __staticSelector: "CloseButton",
    size: o
  }, a), i || /* @__PURE__ */ P.createElement(EG, {
    width: l,
    height: l
  }));
});
RG.displayName = "@mantine/core/CloseButton";
const mLe = RG;
var hLe = Object.defineProperty, fw = Object.getOwnPropertySymbols, TG = Object.prototype.hasOwnProperty, jG = Object.prototype.propertyIsEnumerable, vL = (e, t, n) => t in e ? hLe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, gLe = (e, t) => {
  for (var n in t || (t = {}))
    TG.call(t, n) && vL(e, n, t[n]);
  if (fw)
    for (var n of fw(t))
      jG.call(t, n) && vL(e, n, t[n]);
  return e;
}, yLe = (e, t) => {
  var n = {};
  for (var r in e)
    TG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && fw)
    for (var r of fw(e))
      t.indexOf(r) < 0 && jG.call(e, r) && (n[r] = e[r]);
  return n;
};
const vLe = {
  variant: "light"
}, NG = b.forwardRef((e, t) => {
  const n = en("Alert", vLe, e), {
    id: r,
    className: o,
    title: i,
    variant: a,
    children: l,
    color: s,
    classNames: c,
    icon: p,
    styles: f,
    onClose: m,
    radius: h,
    withCloseButton: g,
    closeButtonLabel: v,
    unstyled: S
  } = n, w = yLe(n, [
    "id",
    "className",
    "title",
    "variant",
    "children",
    "color",
    "classNames",
    "icon",
    "styles",
    "onClose",
    "radius",
    "withCloseButton",
    "closeButtonLabel",
    "unstyled"
  ]), { classes: x, cx: k } = aLe({ color: s, radius: h }, { classNames: c, styles: f, unstyled: S, variant: a, name: "Alert" }), E = m2(r), O = i && `${E}-title`, C = `${E}-body`;
  return /* @__PURE__ */ P.createElement(qo, gLe({
    id: E,
    role: "alert",
    "aria-labelledby": O,
    "aria-describedby": C,
    className: k(x.root, x[a], o),
    ref: t
  }, w), /* @__PURE__ */ P.createElement("div", {
    className: x.wrapper
  }, p && /* @__PURE__ */ P.createElement("div", {
    className: x.icon
  }, p), /* @__PURE__ */ P.createElement("div", {
    className: x.body
  }, i && /* @__PURE__ */ P.createElement("div", {
    className: x.title,
    "data-with-close-button": g || void 0
  }, /* @__PURE__ */ P.createElement("span", {
    id: O,
    className: x.label
  }, i)), /* @__PURE__ */ P.createElement("div", {
    id: C,
    className: x.message
  }, l)), g && /* @__PURE__ */ P.createElement(mLe, {
    className: x.closeButton,
    onClick: m,
    variant: "transparent",
    size: 16,
    iconSize: 16,
    "aria-label": v
  })));
});
NG.displayName = "@mantine/core/Alert";
var bLe = Object.defineProperty, wLe = Object.defineProperties, xLe = Object.getOwnPropertyDescriptors, bL = Object.getOwnPropertySymbols, SLe = Object.prototype.hasOwnProperty, kLe = Object.prototype.propertyIsEnumerable, wL = (e, t, n) => t in e ? bLe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Xh = (e, t) => {
  for (var n in t || (t = {}))
    SLe.call(t, n) && wL(e, n, t[n]);
  if (bL)
    for (var n of bL(t))
      kLe.call(t, n) && wL(e, n, t[n]);
  return e;
}, _Le = (e, t) => wLe(e, xLe(t));
function OLe({
  underline: e,
  strikethrough: t
}) {
  const n = [];
  return e && n.push("underline"), t && n.push("line-through"), n.length > 0 ? n.join(" ") : "none";
}
function ELe({ theme: e, color: t }) {
  return t === "dimmed" ? e.fn.dimmed() : typeof t == "string" && (t in e.colors || t.split(".")[0] in e.colors) ? e.fn.variant({ variant: "filled", color: t }).background : t || "inherit";
}
function CLe(e) {
  return typeof e == "number" ? {
    overflow: "hidden",
    textOverflow: "ellipsis",
    display: "-webkit-box",
    WebkitLineClamp: e,
    WebkitBoxOrient: "vertical"
  } : null;
}
function PLe({ theme: e, truncate: t }) {
  return t === "start" ? {
    overflow: "hidden",
    textOverflow: "ellipsis",
    whiteSpace: "nowrap",
    direction: e.dir === "ltr" ? "rtl" : "ltr",
    textAlign: e.dir === "ltr" ? "right" : "left"
  } : t ? {
    overflow: "hidden",
    textOverflow: "ellipsis",
    whiteSpace: "nowrap"
  } : null;
}
var RLe = Cr((e, {
  color: t,
  lineClamp: n,
  truncate: r,
  inline: o,
  inherit: i,
  underline: a,
  gradient: l,
  weight: s,
  transform: c,
  align: p,
  strikethrough: f,
  italic: m
}, { size: h }) => {
  const g = e.fn.variant({ variant: "gradient", gradient: l });
  return {
    root: _Le(Xh(Xh(Xh(Xh({}, e.fn.fontStyles()), e.fn.focusStyles()), CLe(n)), PLe({ theme: e, truncate: r })), {
      color: ELe({ color: t, theme: e }),
      fontFamily: i ? "inherit" : e.fontFamily,
      fontSize: i || h === void 0 ? "inherit" : $t({ size: h, sizes: e.fontSizes }),
      lineHeight: i ? "inherit" : o ? 1 : e.lineHeight,
      textDecoration: OLe({ underline: a, strikethrough: f }),
      WebkitTapHighlightColor: "transparent",
      fontWeight: i ? "inherit" : s,
      textTransform: c,
      textAlign: p,
      fontStyle: m ? "italic" : void 0
    }),
    gradient: {
      backgroundImage: g.background,
      WebkitBackgroundClip: "text",
      WebkitTextFillColor: "transparent"
    }
  };
}), TLe = Object.defineProperty, dw = Object.getOwnPropertySymbols, $G = Object.prototype.hasOwnProperty, IG = Object.prototype.propertyIsEnumerable, xL = (e, t, n) => t in e ? TLe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, jLe = (e, t) => {
  for (var n in t || (t = {}))
    $G.call(t, n) && xL(e, n, t[n]);
  if (dw)
    for (var n of dw(t))
      IG.call(t, n) && xL(e, n, t[n]);
  return e;
}, NLe = (e, t) => {
  var n = {};
  for (var r in e)
    $G.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && dw)
    for (var r of dw(e))
      t.indexOf(r) < 0 && IG.call(e, r) && (n[r] = e[r]);
  return n;
};
const $Le = {
  variant: "text"
}, AG = b.forwardRef((e, t) => {
  const n = en("Text", $Le, e), {
    className: r,
    size: o,
    weight: i,
    transform: a,
    color: l,
    align: s,
    variant: c,
    lineClamp: p,
    truncate: f,
    gradient: m,
    inline: h,
    inherit: g,
    underline: v,
    strikethrough: S,
    italic: w,
    classNames: x,
    styles: k,
    unstyled: E,
    span: O,
    __staticSelector: C
  } = n, R = NLe(n, [
    "className",
    "size",
    "weight",
    "transform",
    "color",
    "align",
    "variant",
    "lineClamp",
    "truncate",
    "gradient",
    "inline",
    "inherit",
    "underline",
    "strikethrough",
    "italic",
    "classNames",
    "styles",
    "unstyled",
    "span",
    "__staticSelector"
  ]), { classes: L, cx: D } = RLe({
    color: l,
    lineClamp: p,
    truncate: f,
    inline: h,
    inherit: g,
    underline: v,
    strikethrough: S,
    italic: w,
    weight: i,
    transform: a,
    align: s,
    gradient: m
  }, { unstyled: E, name: C || "Text", variant: c, size: o });
  return /* @__PURE__ */ P.createElement(qo, jLe({
    ref: t,
    className: D(L.root, { [L.gradient]: c === "gradient" }, r),
    component: O ? "span" : "div"
  }, R));
});
AG.displayName = "@mantine/core/Text";
const Xp = AG;
var ILe = Object.defineProperty, SL = Object.getOwnPropertySymbols, ALe = Object.prototype.hasOwnProperty, zLe = Object.prototype.propertyIsEnumerable, kL = (e, t, n) => t in e ? ILe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, LLe = (e, t) => {
  for (var n in t || (t = {}))
    ALe.call(t, n) && kL(e, n, t[n]);
  if (SL)
    for (var n of SL(t))
      zLe.call(t, n) && kL(e, n, t[n]);
  return e;
};
function DLe({ theme: e, color: t }) {
  return t === "dimmed" ? e.fn.dimmed() : e.fn.themeColor(t || e.primaryColor, e.colorScheme === "dark" ? 4 : 7, !1, !0);
}
var FLe = Cr((e, { color: t, underline: n }) => ({
  root: LLe({
    backgroundColor: "transparent",
    cursor: "pointer",
    padding: 0,
    border: 0,
    color: DLe({ theme: e, color: t })
  }, e.fn.hover({ textDecoration: n ? "underline" : "none" }))
})), MLe = Object.defineProperty, pw = Object.getOwnPropertySymbols, zG = Object.prototype.hasOwnProperty, LG = Object.prototype.propertyIsEnumerable, _L = (e, t, n) => t in e ? MLe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, OL = (e, t) => {
  for (var n in t || (t = {}))
    zG.call(t, n) && _L(e, n, t[n]);
  if (pw)
    for (var n of pw(t))
      LG.call(t, n) && _L(e, n, t[n]);
  return e;
}, BLe = (e, t) => {
  var n = {};
  for (var r in e)
    zG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && pw)
    for (var r of pw(e))
      t.indexOf(r) < 0 && LG.call(e, r) && (n[r] = e[r]);
  return n;
};
const ULe = {
  underline: !0
}, DG = b.forwardRef((e, t) => {
  const n = en("Anchor", ULe, e), { component: r, className: o, unstyled: i, variant: a, size: l, color: s, underline: c } = n, p = BLe(n, ["component", "className", "unstyled", "variant", "size", "color", "underline"]), { classes: f, cx: m } = FLe({ color: s, underline: c }, { name: "Anchor", unstyled: i, variant: a, size: l }), h = r === "button" ? { type: "button" } : null;
  return /* @__PURE__ */ P.createElement(Xp, OL(OL({
    component: r || "a",
    ref: t,
    className: m(f.root, o),
    size: l
  }, h), p));
});
DG.displayName = "@mantine/core/Anchor";
const EE = DG, gi = Math.min, lr = Math.max, mw = Math.round, Zh = Math.floor, Ul = (e) => ({
  x: e,
  y: e
}), HLe = {
  left: "right",
  right: "left",
  bottom: "top",
  top: "bottom"
}, WLe = {
  start: "end",
  end: "start"
};
function CE(e, t, n) {
  return lr(e, gi(t, n));
}
function Na(e, t) {
  return typeof e == "function" ? e(t) : e;
}
function yi(e) {
  return e.split("-")[0];
}
function pf(e) {
  return e.split("-")[1];
}
function y2(e) {
  return e === "x" ? "y" : "x";
}
function v2(e) {
  return e === "y" ? "height" : "width";
}
function nu(e) {
  return ["top", "bottom"].includes(yi(e)) ? "y" : "x";
}
function b2(e) {
  return y2(nu(e));
}
function VLe(e, t, n) {
  n === void 0 && (n = !1);
  const r = pf(e), o = b2(e), i = v2(o);
  let a = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
  return t.reference[i] > t.floating[i] && (a = hw(a)), [a, hw(a)];
}
function qLe(e) {
  const t = hw(e);
  return [PE(e), t, PE(t)];
}
function PE(e) {
  return e.replace(/start|end/g, (t) => WLe[t]);
}
function GLe(e, t, n) {
  const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], a = ["bottom", "top"];
  switch (e) {
    case "top":
    case "bottom":
      return n ? t ? o : r : t ? r : o;
    case "left":
    case "right":
      return t ? i : a;
    default:
      return [];
  }
}
function KLe(e, t, n, r) {
  const o = pf(e);
  let i = GLe(yi(e), n === "start", r);
  return o && (i = i.map((a) => a + "-" + o), t && (i = i.concat(i.map(PE)))), i;
}
function hw(e) {
  return e.replace(/left|right|bottom|top/g, (t) => HLe[t]);
}
function YLe(e) {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0,
    ...e
  };
}
function w2(e) {
  return typeof e != "number" ? YLe(e) : {
    top: e,
    right: e,
    bottom: e,
    left: e
  };
}
function Lc(e) {
  return {
    ...e,
    top: e.y,
    left: e.x,
    right: e.x + e.width,
    bottom: e.y + e.height
  };
}
function EL(e, t, n) {
  let {
    reference: r,
    floating: o
  } = e;
  const i = nu(t), a = b2(t), l = v2(a), s = yi(t), c = i === "y", p = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, m = r[l] / 2 - o[l] / 2;
  let h;
  switch (s) {
    case "top":
      h = {
        x: p,
        y: r.y - o.height
      };
      break;
    case "bottom":
      h = {
        x: p,
        y: r.y + r.height
      };
      break;
    case "right":
      h = {
        x: r.x + r.width,
        y: f
      };
      break;
    case "left":
      h = {
        x: r.x - o.width,
        y: f
      };
      break;
    default:
      h = {
        x: r.x,
        y: r.y
      };
  }
  switch (pf(t)) {
    case "start":
      h[a] -= m * (n && c ? -1 : 1);
      break;
    case "end":
      h[a] += m * (n && c ? -1 : 1);
      break;
  }
  return h;
}
const XLe = async (e, t, n) => {
  const {
    placement: r = "bottom",
    strategy: o = "absolute",
    middleware: i = [],
    platform: a
  } = n, l = i.filter(Boolean), s = await (a.isRTL == null ? void 0 : a.isRTL(t));
  let c = await a.getElementRects({
    reference: e,
    floating: t,
    strategy: o
  }), {
    x: p,
    y: f
  } = EL(c, r, s), m = r, h = {}, g = 0;
  for (let v = 0; v < l.length; v++) {
    const {
      name: S,
      fn: w
    } = l[v], {
      x,
      y: k,
      data: E,
      reset: O
    } = await w({
      x: p,
      y: f,
      initialPlacement: r,
      placement: m,
      strategy: o,
      middlewareData: h,
      rects: c,
      platform: a,
      elements: {
        reference: e,
        floating: t
      }
    });
    p = x ?? p, f = k ?? f, h = {
      ...h,
      [S]: {
        ...h[S],
        ...E
      }
    }, O && g <= 50 && (g++, typeof O == "object" && (O.placement && (m = O.placement), O.rects && (c = O.rects === !0 ? await a.getElementRects({
      reference: e,
      floating: t,
      strategy: o
    }) : O.rects), {
      x: p,
      y: f
    } = EL(c, m, s)), v = -1);
  }
  return {
    x: p,
    y: f,
    placement: m,
    strategy: o,
    middlewareData: h
  };
};
async function x2(e, t) {
  var n;
  t === void 0 && (t = {});
  const {
    x: r,
    y: o,
    platform: i,
    rects: a,
    elements: l,
    strategy: s
  } = e, {
    boundary: c = "clippingAncestors",
    rootBoundary: p = "viewport",
    elementContext: f = "floating",
    altBoundary: m = !1,
    padding: h = 0
  } = Na(t, e), g = w2(h), S = l[m ? f === "floating" ? "reference" : "floating" : f], w = Lc(await i.getClippingRect({
    element: (n = await (i.isElement == null ? void 0 : i.isElement(S))) == null || n ? S : S.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
    boundary: c,
    rootBoundary: p,
    strategy: s
  })), x = f === "floating" ? {
    ...a.floating,
    x: r,
    y: o
  } : a.reference, k = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), E = await (i.isElement == null ? void 0 : i.isElement(k)) ? await (i.getScale == null ? void 0 : i.getScale(k)) || {
    x: 1,
    y: 1
  } : {
    x: 1,
    y: 1
  }, O = Lc(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
    elements: l,
    rect: x,
    offsetParent: k,
    strategy: s
  }) : x);
  return {
    top: (w.top - O.top + g.top) / E.y,
    bottom: (O.bottom - w.bottom + g.bottom) / E.y,
    left: (w.left - O.left + g.left) / E.x,
    right: (O.right - w.right + g.right) / E.x
  };
}
const ZLe = (e) => ({
  name: "arrow",
  options: e,
  async fn(t) {
    const {
      x: n,
      y: r,
      placement: o,
      rects: i,
      platform: a,
      elements: l,
      middlewareData: s
    } = t, {
      element: c,
      padding: p = 0
    } = Na(e, t) || {};
    if (c == null)
      return {};
    const f = w2(p), m = {
      x: n,
      y: r
    }, h = b2(o), g = v2(h), v = await a.getDimensions(c), S = h === "y", w = S ? "top" : "left", x = S ? "bottom" : "right", k = S ? "clientHeight" : "clientWidth", E = i.reference[g] + i.reference[h] - m[h] - i.floating[g], O = m[h] - i.reference[h], C = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
    let R = C ? C[k] : 0;
    (!R || !await (a.isElement == null ? void 0 : a.isElement(C))) && (R = l.floating[k] || i.floating[g]);
    const L = E / 2 - O / 2, D = R / 2 - v[g] / 2 - 1, N = gi(f[w], D), H = gi(f[x], D), B = N, K = R - v[g] - H, W = R / 2 - v[g] / 2 + L, U = CE(B, W, K), Q = !s.arrow && pf(o) != null && W !== U && i.reference[g] / 2 - (W < B ? N : H) - v[g] / 2 < 0, J = Q ? W < B ? W - B : W - K : 0;
    return {
      [h]: m[h] + J,
      data: {
        [h]: U,
        centerOffset: W - U - J,
        ...Q && {
          alignmentOffset: J
        }
      },
      reset: Q
    };
  }
}), QLe = function(e) {
  return e === void 0 && (e = {}), {
    name: "flip",
    options: e,
    async fn(t) {
      var n, r;
      const {
        placement: o,
        middlewareData: i,
        rects: a,
        initialPlacement: l,
        platform: s,
        elements: c
      } = t, {
        mainAxis: p = !0,
        crossAxis: f = !0,
        fallbackPlacements: m,
        fallbackStrategy: h = "bestFit",
        fallbackAxisSideDirection: g = "none",
        flipAlignment: v = !0,
        ...S
      } = Na(e, t);
      if ((n = i.arrow) != null && n.alignmentOffset)
        return {};
      const w = yi(o), x = yi(l) === l, k = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), E = m || (x || !v ? [hw(l)] : qLe(l));
      !m && g !== "none" && E.push(...KLe(l, v, g, k));
      const O = [l, ...E], C = await x2(t, S), R = [];
      let L = ((r = i.flip) == null ? void 0 : r.overflows) || [];
      if (p && R.push(C[w]), f) {
        const B = VLe(o, a, k);
        R.push(C[B[0]], C[B[1]]);
      }
      if (L = [...L, {
        placement: o,
        overflows: R
      }], !R.every((B) => B <= 0)) {
        var D, N;
        const B = (((D = i.flip) == null ? void 0 : D.index) || 0) + 1, K = O[B];
        if (K)
          return {
            data: {
              index: B,
              overflows: L
            },
            reset: {
              placement: K
            }
          };
        let W = (N = L.filter((U) => U.overflows[0] <= 0).sort((U, Q) => U.overflows[1] - Q.overflows[1])[0]) == null ? void 0 : N.placement;
        if (!W)
          switch (h) {
            case "bestFit": {
              var H;
              const U = (H = L.map((Q) => [Q.placement, Q.overflows.filter((J) => J > 0).reduce((J, q) => J + q, 0)]).sort((Q, J) => Q[1] - J[1])[0]) == null ? void 0 : H[0];
              U && (W = U);
              break;
            }
            case "initialPlacement":
              W = l;
              break;
          }
        if (o !== W)
          return {
            reset: {
              placement: W
            }
          };
      }
      return {};
    }
  };
};
function FG(e) {
  const t = gi(...e.map((i) => i.left)), n = gi(...e.map((i) => i.top)), r = lr(...e.map((i) => i.right)), o = lr(...e.map((i) => i.bottom));
  return {
    x: t,
    y: n,
    width: r - t,
    height: o - n
  };
}
function JLe(e) {
  const t = e.slice().sort((o, i) => o.y - i.y), n = [];
  let r = null;
  for (let o = 0; o < t.length; o++) {
    const i = t[o];
    !r || i.y - r.y > r.height / 2 ? n.push([i]) : n[n.length - 1].push(i), r = i;
  }
  return n.map((o) => Lc(FG(o)));
}
const eDe = function(e) {
  return e === void 0 && (e = {}), {
    name: "inline",
    options: e,
    async fn(t) {
      const {
        placement: n,
        elements: r,
        rects: o,
        platform: i,
        strategy: a
      } = t, {
        padding: l = 2,
        x: s,
        y: c
      } = Na(e, t), p = Array.from(await (i.getClientRects == null ? void 0 : i.getClientRects(r.reference)) || []), f = JLe(p), m = Lc(FG(p)), h = w2(l);
      function g() {
        if (f.length === 2 && f[0].left > f[1].right && s != null && c != null)
          return f.find((S) => s > S.left - h.left && s < S.right + h.right && c > S.top - h.top && c < S.bottom + h.bottom) || m;
        if (f.length >= 2) {
          if (nu(n) === "y") {
            const N = f[0], H = f[f.length - 1], B = yi(n) === "top", K = N.top, W = H.bottom, U = B ? N.left : H.left, Q = B ? N.right : H.right, J = Q - U, q = W - K;
            return {
              top: K,
              bottom: W,
              left: U,
              right: Q,
              width: J,
              height: q,
              x: U,
              y: K
            };
          }
          const S = yi(n) === "left", w = lr(...f.map((N) => N.right)), x = gi(...f.map((N) => N.left)), k = f.filter((N) => S ? N.left === x : N.right === w), E = k[0].top, O = k[k.length - 1].bottom, C = x, R = w, L = R - C, D = O - E;
          return {
            top: E,
            bottom: O,
            left: C,
            right: R,
            width: L,
            height: D,
            x: C,
            y: E
          };
        }
        return m;
      }
      const v = await i.getElementRects({
        reference: {
          getBoundingClientRect: g
        },
        floating: r.floating,
        strategy: a
      });
      return o.reference.x !== v.reference.x || o.reference.y !== v.reference.y || o.reference.width !== v.reference.width || o.reference.height !== v.reference.height ? {
        reset: {
          rects: v
        }
      } : {};
    }
  };
};
async function tDe(e, t) {
  const {
    placement: n,
    platform: r,
    elements: o
  } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = yi(n), l = pf(n), s = nu(n) === "y", c = ["left", "top"].includes(a) ? -1 : 1, p = i && s ? -1 : 1, f = Na(t, e);
  let {
    mainAxis: m,
    crossAxis: h,
    alignmentAxis: g
  } = typeof f == "number" ? {
    mainAxis: f,
    crossAxis: 0,
    alignmentAxis: null
  } : {
    mainAxis: 0,
    crossAxis: 0,
    alignmentAxis: null,
    ...f
  };
  return l && typeof g == "number" && (h = l === "end" ? g * -1 : g), s ? {
    x: h * p,
    y: m * c
  } : {
    x: m * c,
    y: h * p
  };
}
const nDe = function(e) {
  return e === void 0 && (e = 0), {
    name: "offset",
    options: e,
    async fn(t) {
      var n, r;
      const {
        x: o,
        y: i,
        placement: a,
        middlewareData: l
      } = t, s = await tDe(t, e);
      return a === ((n = l.offset) == null ? void 0 : n.placement) && (r = l.arrow) != null && r.alignmentOffset ? {} : {
        x: o + s.x,
        y: i + s.y,
        data: {
          ...s,
          placement: a
        }
      };
    }
  };
}, rDe = function(e) {
  return e === void 0 && (e = {}), {
    name: "shift",
    options: e,
    async fn(t) {
      const {
        x: n,
        y: r,
        placement: o
      } = t, {
        mainAxis: i = !0,
        crossAxis: a = !1,
        limiter: l = {
          fn: (S) => {
            let {
              x: w,
              y: x
            } = S;
            return {
              x: w,
              y: x
            };
          }
        },
        ...s
      } = Na(e, t), c = {
        x: n,
        y: r
      }, p = await x2(t, s), f = nu(yi(o)), m = y2(f);
      let h = c[m], g = c[f];
      if (i) {
        const S = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", x = h + p[S], k = h - p[w];
        h = CE(x, h, k);
      }
      if (a) {
        const S = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", x = g + p[S], k = g - p[w];
        g = CE(x, g, k);
      }
      const v = l.fn({
        ...t,
        [m]: h,
        [f]: g
      });
      return {
        ...v,
        data: {
          x: v.x - n,
          y: v.y - r
        }
      };
    }
  };
}, oDe = function(e) {
  return e === void 0 && (e = {}), {
    options: e,
    fn(t) {
      const {
        x: n,
        y: r,
        placement: o,
        rects: i,
        middlewareData: a
      } = t, {
        offset: l = 0,
        mainAxis: s = !0,
        crossAxis: c = !0
      } = Na(e, t), p = {
        x: n,
        y: r
      }, f = nu(o), m = y2(f);
      let h = p[m], g = p[f];
      const v = Na(l, t), S = typeof v == "number" ? {
        mainAxis: v,
        crossAxis: 0
      } : {
        mainAxis: 0,
        crossAxis: 0,
        ...v
      };
      if (s) {
        const k = m === "y" ? "height" : "width", E = i.reference[m] - i.floating[k] + S.mainAxis, O = i.reference[m] + i.reference[k] - S.mainAxis;
        h < E ? h = E : h > O && (h = O);
      }
      if (c) {
        var w, x;
        const k = m === "y" ? "width" : "height", E = ["top", "left"].includes(yi(o)), O = i.reference[f] - i.floating[k] + (E && ((w = a.offset) == null ? void 0 : w[f]) || 0) + (E ? 0 : S.crossAxis), C = i.reference[f] + i.reference[k] + (E ? 0 : ((x = a.offset) == null ? void 0 : x[f]) || 0) - (E ? S.crossAxis : 0);
        g < O ? g = O : g > C && (g = C);
      }
      return {
        [m]: h,
        [f]: g
      };
    }
  };
}, iDe = function(e) {
  return e === void 0 && (e = {}), {
    name: "size",
    options: e,
    async fn(t) {
      const {
        placement: n,
        rects: r,
        platform: o,
        elements: i
      } = t, {
        apply: a = () => {
        },
        ...l
      } = Na(e, t), s = await x2(t, l), c = yi(n), p = pf(n), f = nu(n) === "y", {
        width: m,
        height: h
      } = r.floating;
      let g, v;
      c === "top" || c === "bottom" ? (g = c, v = p === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (v = c, g = p === "end" ? "top" : "bottom");
      const S = h - s[g], w = m - s[v], x = !t.middlewareData.shift;
      let k = S, E = w;
      if (f) {
        const C = m - s.left - s.right;
        E = p || x ? gi(w, C) : C;
      } else {
        const C = h - s.top - s.bottom;
        k = p || x ? gi(S, C) : C;
      }
      if (x && !p) {
        const C = lr(s.left, 0), R = lr(s.right, 0), L = lr(s.top, 0), D = lr(s.bottom, 0);
        f ? E = m - 2 * (C !== 0 || R !== 0 ? C + R : lr(s.left, s.right)) : k = h - 2 * (L !== 0 || D !== 0 ? L + D : lr(s.top, s.bottom));
      }
      await a({
        ...t,
        availableWidth: E,
        availableHeight: k
      });
      const O = await o.getDimensions(i.floating);
      return m !== O.width || h !== O.height ? {
        reset: {
          rects: !0
        }
      } : {};
    }
  };
};
function Hl(e) {
  return MG(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function vo(e) {
  var t;
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function Va(e) {
  var t;
  return (t = (MG(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
}
function MG(e) {
  return e instanceof Node || e instanceof vo(e).Node;
}
function $a(e) {
  return e instanceof Element || e instanceof vo(e).Element;
}
function Qi(e) {
  return e instanceof HTMLElement || e instanceof vo(e).HTMLElement;
}
function CL(e) {
  return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof vo(e).ShadowRoot;
}
function Zp(e) {
  const {
    overflow: t,
    overflowX: n,
    overflowY: r,
    display: o
  } = Go(e);
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
}
function aDe(e) {
  return ["table", "td", "th"].includes(Hl(e));
}
function S2(e) {
  const t = k2(), n = Go(e);
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
}
function BG(e) {
  let t = Dc(e);
  for (; Qi(t) && !Zx(t); ) {
    if (S2(t))
      return t;
    t = Dc(t);
  }
  return null;
}
function k2() {
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function Zx(e) {
  return ["html", "body", "#document"].includes(Hl(e));
}
function Go(e) {
  return vo(e).getComputedStyle(e);
}
function Qx(e) {
  return $a(e) ? {
    scrollLeft: e.scrollLeft,
    scrollTop: e.scrollTop
  } : {
    scrollLeft: e.pageXOffset,
    scrollTop: e.pageYOffset
  };
}
function Dc(e) {
  if (Hl(e) === "html")
    return e;
  const t = (
    // Step into the shadow DOM of the parent of a slotted node.
    e.assignedSlot || // DOM Element detected.
    e.parentNode || // ShadowRoot detected.
    CL(e) && e.host || // Fallback.
    Va(e)
  );
  return CL(t) ? t.host : t;
}
function UG(e) {
  const t = Dc(e);
  return Zx(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Qi(t) && Zp(t) ? t : UG(t);
}
function _p(e, t, n) {
  var r;
  t === void 0 && (t = []), n === void 0 && (n = !0);
  const o = UG(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), a = vo(o);
  return i ? t.concat(a, a.visualViewport || [], Zp(o) ? o : [], a.frameElement && n ? _p(a.frameElement) : []) : t.concat(o, _p(o, [], n));
}
function HG(e) {
  const t = Go(e);
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
  const o = Qi(e), i = o ? e.offsetWidth : n, a = o ? e.offsetHeight : r, l = mw(n) !== i || mw(r) !== a;
  return l && (n = i, r = a), {
    width: n,
    height: r,
    $: l
  };
}
function _2(e) {
  return $a(e) ? e : e.contextElement;
}
function vc(e) {
  const t = _2(e);
  if (!Qi(t))
    return Ul(1);
  const n = t.getBoundingClientRect(), {
    width: r,
    height: o,
    $: i
  } = HG(t);
  let a = (i ? mw(n.width) : n.width) / r, l = (i ? mw(n.height) : n.height) / o;
  return (!a || !Number.isFinite(a)) && (a = 1), (!l || !Number.isFinite(l)) && (l = 1), {
    x: a,
    y: l
  };
}
const lDe = /* @__PURE__ */ Ul(0);
function WG(e) {
  const t = vo(e);
  return !k2() || !t.visualViewport ? lDe : {
    x: t.visualViewport.offsetLeft,
    y: t.visualViewport.offsetTop
  };
}
function sDe(e, t, n) {
  return t === void 0 && (t = !1), !n || t && n !== vo(e) ? !1 : t;
}
function qs(e, t, n, r) {
  t === void 0 && (t = !1), n === void 0 && (n = !1);
  const o = e.getBoundingClientRect(), i = _2(e);
  let a = Ul(1);
  t && (r ? $a(r) && (a = vc(r)) : a = vc(e));
  const l = sDe(i, n, r) ? WG(i) : Ul(0);
  let s = (o.left + l.x) / a.x, c = (o.top + l.y) / a.y, p = o.width / a.x, f = o.height / a.y;
  if (i) {
    const m = vo(i), h = r && $a(r) ? vo(r) : r;
    let g = m.frameElement;
    for (; g && r && h !== m; ) {
      const v = vc(g), S = g.getBoundingClientRect(), w = Go(g), x = S.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, k = S.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y;
      s *= v.x, c *= v.y, p *= v.x, f *= v.y, s += x, c += k, g = vo(g).frameElement;
    }
  }
  return Lc({
    width: p,
    height: f,
    x: s,
    y: c
  });
}
const uDe = [":popover-open", ":modal"];
function VG(e) {
  let t = !1, n = 0, r = 0;
  function o(a) {
    try {
      t = t || e.matches(a);
    } catch {
    }
  }
  uDe.forEach((a) => {
    o(a);
  });
  const i = BG(e);
  if (t && i) {
    const a = i.getBoundingClientRect();
    n = a.x, r = a.y;
  }
  return [t, n, r];
}
function cDe(e) {
  let {
    elements: t,
    rect: n,
    offsetParent: r,
    strategy: o
  } = e;
  const i = Va(r), [a] = t ? VG(t.floating) : [!1];
  if (r === i || a)
    return n;
  let l = {
    scrollLeft: 0,
    scrollTop: 0
  }, s = Ul(1);
  const c = Ul(0), p = Qi(r);
  if ((p || !p && o !== "fixed") && ((Hl(r) !== "body" || Zp(i)) && (l = Qx(r)), Qi(r))) {
    const f = qs(r);
    s = vc(r), c.x = f.x + r.clientLeft, c.y = f.y + r.clientTop;
  }
  return {
    width: n.width * s.x,
    height: n.height * s.y,
    x: n.x * s.x - l.scrollLeft * s.x + c.x,
    y: n.y * s.y - l.scrollTop * s.y + c.y
  };
}
function fDe(e) {
  return Array.from(e.getClientRects());
}
function qG(e) {
  return qs(Va(e)).left + Qx(e).scrollLeft;
}
function dDe(e) {
  const t = Va(e), n = Qx(e), r = e.ownerDocument.body, o = lr(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = lr(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
  let a = -n.scrollLeft + qG(e);
  const l = -n.scrollTop;
  return Go(r).direction === "rtl" && (a += lr(t.clientWidth, r.clientWidth) - o), {
    width: o,
    height: i,
    x: a,
    y: l
  };
}
function pDe(e, t) {
  const n = vo(e), r = Va(e), o = n.visualViewport;
  let i = r.clientWidth, a = r.clientHeight, l = 0, s = 0;
  if (o) {
    i = o.width, a = o.height;
    const c = k2();
    (!c || c && t === "fixed") && (l = o.offsetLeft, s = o.offsetTop);
  }
  return {
    width: i,
    height: a,
    x: l,
    y: s
  };
}
function mDe(e, t) {
  const n = qs(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Qi(e) ? vc(e) : Ul(1), a = e.clientWidth * i.x, l = e.clientHeight * i.y, s = o * i.x, c = r * i.y;
  return {
    width: a,
    height: l,
    x: s,
    y: c
  };
}
function PL(e, t, n) {
  let r;
  if (t === "viewport")
    r = pDe(e, n);
  else if (t === "document")
    r = dDe(Va(e));
  else if ($a(t))
    r = mDe(t, n);
  else {
    const o = WG(e);
    r = {
      ...t,
      x: t.x - o.x,
      y: t.y - o.y
    };
  }
  return Lc(r);
}
function GG(e, t) {
  const n = Dc(e);
  return n === t || !$a(n) || Zx(n) ? !1 : Go(n).position === "fixed" || GG(n, t);
}
function hDe(e, t) {
  const n = t.get(e);
  if (n)
    return n;
  let r = _p(e, [], !1).filter((l) => $a(l) && Hl(l) !== "body"), o = null;
  const i = Go(e).position === "fixed";
  let a = i ? Dc(e) : e;
  for (; $a(a) && !Zx(a); ) {
    const l = Go(a), s = S2(a);
    !s && l.position === "fixed" && (o = null), (i ? !s && !o : !s && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Zp(a) && !s && GG(e, a)) ? r = r.filter((p) => p !== a) : o = l, a = Dc(a);
  }
  return t.set(e, r), r;
}
function gDe(e) {
  let {
    element: t,
    boundary: n,
    rootBoundary: r,
    strategy: o
  } = e;
  const a = [...n === "clippingAncestors" ? hDe(t, this._c) : [].concat(n), r], l = a[0], s = a.reduce((c, p) => {
    const f = PL(t, p, o);
    return c.top = lr(f.top, c.top), c.right = gi(f.right, c.right), c.bottom = gi(f.bottom, c.bottom), c.left = lr(f.left, c.left), c;
  }, PL(t, l, o));
  return {
    width: s.right - s.left,
    height: s.bottom - s.top,
    x: s.left,
    y: s.top
  };
}
function yDe(e) {
  const {
    width: t,
    height: n
  } = HG(e);
  return {
    width: t,
    height: n
  };
}
function vDe(e, t, n, r) {
  const o = Qi(t), i = Va(t), a = n === "fixed", l = qs(e, !0, a, t);
  let s = {
    scrollLeft: 0,
    scrollTop: 0
  };
  const c = Ul(0);
  if (o || !o && !a)
    if ((Hl(t) !== "body" || Zp(i)) && (s = Qx(t)), o) {
      const v = qs(t, !0, a, t);
      c.x = v.x + t.clientLeft, c.y = v.y + t.clientTop;
    } else
      i && (c.x = qG(i));
  let p = l.left + s.scrollLeft - c.x, f = l.top + s.scrollTop - c.y;
  const [m, h, g] = VG(r);
  return m && (p += h, f += g, o && (p += t.clientLeft, f += t.clientTop)), {
    x: p,
    y: f,
    width: l.width,
    height: l.height
  };
}
function RL(e, t) {
  return !Qi(e) || Go(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
}
function KG(e, t) {
  const n = vo(e);
  if (!Qi(e))
    return n;
  let r = RL(e, t);
  for (; r && aDe(r) && Go(r).position === "static"; )
    r = RL(r, t);
  return r && (Hl(r) === "html" || Hl(r) === "body" && Go(r).position === "static" && !S2(r)) ? n : r || BG(e) || n;
}
const bDe = async function(e) {
  const t = this.getOffsetParent || KG, n = this.getDimensions;
  return {
    reference: vDe(e.reference, await t(e.floating), e.strategy, e.floating),
    floating: {
      x: 0,
      y: 0,
      ...await n(e.floating)
    }
  };
};
function wDe(e) {
  return Go(e).direction === "rtl";
}
const xDe = {
  convertOffsetParentRelativeRectToViewportRelativeRect: cDe,
  getDocumentElement: Va,
  getClippingRect: gDe,
  getOffsetParent: KG,
  getElementRects: bDe,
  getClientRects: fDe,
  getDimensions: yDe,
  getScale: vc,
  isElement: $a,
  isRTL: wDe
};
function SDe(e, t) {
  let n = null, r;
  const o = Va(e);
  function i() {
    var l;
    clearTimeout(r), (l = n) == null || l.disconnect(), n = null;
  }
  function a(l, s) {
    l === void 0 && (l = !1), s === void 0 && (s = 1), i();
    const {
      left: c,
      top: p,
      width: f,
      height: m
    } = e.getBoundingClientRect();
    if (l || t(), !f || !m)
      return;
    const h = Zh(p), g = Zh(o.clientWidth - (c + f)), v = Zh(o.clientHeight - (p + m)), S = Zh(c), x = {
      rootMargin: -h + "px " + -g + "px " + -v + "px " + -S + "px",
      threshold: lr(0, gi(1, s)) || 1
    };
    let k = !0;
    function E(O) {
      const C = O[0].intersectionRatio;
      if (C !== s) {
        if (!k)
          return a();
        C ? a(!1, C) : r = setTimeout(() => {
          a(!1, 1e-7);
        }, 100);
      }
      k = !1;
    }
    try {
      n = new IntersectionObserver(E, {
        ...x,
        // Handle <iframe>s
        root: o.ownerDocument
      });
    } catch {
      n = new IntersectionObserver(E, x);
    }
    n.observe(e);
  }
  return a(!0), i;
}
function kDe(e, t, n, r) {
  r === void 0 && (r = {});
  const {
    ancestorScroll: o = !0,
    ancestorResize: i = !0,
    elementResize: a = typeof ResizeObserver == "function",
    layoutShift: l = typeof IntersectionObserver == "function",
    animationFrame: s = !1
  } = r, c = _2(e), p = o || i ? [...c ? _p(c) : [], ..._p(t)] : [];
  p.forEach((w) => {
    o && w.addEventListener("scroll", n, {
      passive: !0
    }), i && w.addEventListener("resize", n);
  });
  const f = c && l ? SDe(c, n) : null;
  let m = -1, h = null;
  a && (h = new ResizeObserver((w) => {
    let [x] = w;
    x && x.target === c && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
      var k;
      (k = h) == null || k.observe(t);
    })), n();
  }), c && !s && h.observe(c), h.observe(t));
  let g, v = s ? qs(e) : null;
  s && S();
  function S() {
    const w = qs(e);
    v && (w.x !== v.x || w.y !== v.y || w.width !== v.width || w.height !== v.height) && n(), v = w, g = requestAnimationFrame(S);
  }
  return n(), () => {
    var w;
    p.forEach((x) => {
      o && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
    }), f == null || f(), (w = h) == null || w.disconnect(), h = null, s && cancelAnimationFrame(g);
  };
}
const _De = rDe, ODe = QLe, EDe = iDe, TL = ZLe, CDe = eDe, PDe = oDe, RDe = (e, t, n) => {
  const r = /* @__PURE__ */ new Map(), o = {
    platform: xDe,
    ...n
  }, i = {
    ...o.platform,
    _c: r
  };
  return XLe(e, t, {
    ...o,
    platform: i
  });
}, TDe = (e) => {
  const {
    element: t,
    padding: n
  } = e;
  function r(o) {
    return Object.prototype.hasOwnProperty.call(o, "current");
  }
  return {
    name: "arrow",
    options: e,
    fn(o) {
      return r(t) ? t.current != null ? TL({
        element: t.current,
        padding: n
      }).fn(o) : {} : t ? TL({
        element: t,
        padding: n
      }).fn(o) : {};
    }
  };
};
var ty = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
function gw(e, t) {
  if (e === t)
    return !0;
  if (typeof e != typeof t)
    return !1;
  if (typeof e == "function" && e.toString() === t.toString())
    return !0;
  let n, r, o;
  if (e && t && typeof e == "object") {
    if (Array.isArray(e)) {
      if (n = e.length, n != t.length)
        return !1;
      for (r = n; r-- !== 0; )
        if (!gw(e[r], t[r]))
          return !1;
      return !0;
    }
    if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
      return !1;
    for (r = n; r-- !== 0; )
      if (!Object.prototype.hasOwnProperty.call(t, o[r]))
        return !1;
    for (r = n; r-- !== 0; ) {
      const i = o[r];
      if (!(i === "_owner" && e.$$typeof) && !gw(e[i], t[i]))
        return !1;
    }
    return !0;
  }
  return e !== e && t !== t;
}
function jL(e) {
  const t = b.useRef(e);
  return ty(() => {
    t.current = e;
  }), t;
}
function jDe(e) {
  e === void 0 && (e = {});
  const {
    placement: t = "bottom",
    strategy: n = "absolute",
    middleware: r = [],
    platform: o,
    whileElementsMounted: i,
    open: a
  } = e, [l, s] = b.useState({
    x: null,
    y: null,
    strategy: n,
    placement: t,
    middlewareData: {},
    isPositioned: !1
  }), [c, p] = b.useState(r);
  gw(c, r) || p(r);
  const f = b.useRef(null), m = b.useRef(null), h = b.useRef(l), g = jL(i), v = jL(o), [S, w] = b.useState(null), [x, k] = b.useState(null), E = b.useCallback((N) => {
    f.current !== N && (f.current = N, w(N));
  }, []), O = b.useCallback((N) => {
    m.current !== N && (m.current = N, k(N));
  }, []), C = b.useCallback(() => {
    if (!f.current || !m.current)
      return;
    const N = {
      placement: t,
      strategy: n,
      middleware: c
    };
    v.current && (N.platform = v.current), RDe(f.current, m.current, N).then((H) => {
      const B = {
        ...H,
        isPositioned: !0
      };
      R.current && !gw(h.current, B) && (h.current = B, La.flushSync(() => {
        s(B);
      }));
    });
  }, [c, t, n, v]);
  ty(() => {
    a === !1 && h.current.isPositioned && (h.current.isPositioned = !1, s((N) => ({
      ...N,
      isPositioned: !1
    })));
  }, [a]);
  const R = b.useRef(!1);
  ty(() => (R.current = !0, () => {
    R.current = !1;
  }), []), ty(() => {
    if (S && x) {
      if (g.current)
        return g.current(S, x, C);
      C();
    }
  }, [S, x, C, g]);
  const L = b.useMemo(() => ({
    reference: f,
    floating: m,
    setReference: E,
    setFloating: O
  }), [E, O]), D = b.useMemo(() => ({
    reference: S,
    floating: x
  }), [S, x]);
  return b.useMemo(() => ({
    ...l,
    update: C,
    refs: L,
    elements: D,
    reference: E,
    floating: O
  }), [l, C, L, D, E, O]);
}
var NDe = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
function $De() {
  const e = /* @__PURE__ */ new Map();
  return {
    emit(t, n) {
      var r;
      (r = e.get(t)) == null || r.forEach((o) => o(n));
    },
    on(t, n) {
      e.set(t, [...e.get(t) || [], n]);
    },
    off(t, n) {
      e.set(t, (e.get(t) || []).filter((r) => r !== n));
    }
  };
}
const IDe = /* @__PURE__ */ b.createContext(null), ADe = () => b.useContext(IDe);
function zDe(e) {
  return (e == null ? void 0 : e.ownerDocument) || document;
}
function LDe(e) {
  return zDe(e).defaultView || window;
}
function Qh(e) {
  return e ? e instanceof LDe(e).Element : !1;
}
const DDe = _0.useInsertionEffect, FDe = DDe || ((e) => e());
function MDe(e) {
  const t = b.useRef(() => {
  });
  return FDe(() => {
    t.current = e;
  }), b.useCallback(function() {
    for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
      r[o] = arguments[o];
    return t.current == null ? void 0 : t.current(...r);
  }, []);
}
function BDe(e) {
  e === void 0 && (e = {});
  const {
    open: t = !1,
    onOpenChange: n,
    nodeId: r
  } = e, o = jDe(e), i = ADe(), a = b.useRef(null), l = b.useRef({}), s = b.useState(() => $De())[0], [c, p] = b.useState(null), f = b.useCallback((w) => {
    const x = Qh(w) ? {
      getBoundingClientRect: () => w.getBoundingClientRect(),
      contextElement: w
    } : w;
    o.refs.setReference(x);
  }, [o.refs]), m = b.useCallback((w) => {
    (Qh(w) || w === null) && (a.current = w, p(w)), (Qh(o.refs.reference.current) || o.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
    // `null` to support `positionReference` + an unstable `reference`
    // callback ref.
    w !== null && !Qh(w)) && o.refs.setReference(w);
  }, [o.refs]), h = b.useMemo(() => ({
    ...o.refs,
    setReference: m,
    setPositionReference: f,
    domReference: a
  }), [o.refs, m, f]), g = b.useMemo(() => ({
    ...o.elements,
    domReference: c
  }), [o.elements, c]), v = MDe(n), S = b.useMemo(() => ({
    ...o,
    refs: h,
    elements: g,
    dataRef: l,
    nodeId: r,
    events: s,
    open: t,
    onOpenChange: v
  }), [o, r, s, t, v, h, g]);
  return NDe(() => {
    const w = i == null ? void 0 : i.nodesRef.current.find((x) => x.id === r);
    w && (w.context = S);
  }), b.useMemo(() => ({
    ...o,
    context: S,
    refs: h,
    reference: m,
    positionReference: f
  }), [o, h, S, m, f]);
}
function UDe({
  opened: e,
  floating: t,
  position: n,
  positionDependencies: r
}) {
  const [o, i] = b.useState(0);
  b.useEffect(() => {
    if (t.refs.reference.current && t.refs.floating.current)
      return kDe(t.refs.reference.current, t.refs.floating.current, t.update);
  }, [
    t.refs.reference.current,
    t.refs.floating.current,
    e,
    o,
    n
  ]), zc(() => {
    t.update();
  }, r), zc(() => {
    i((a) => a + 1);
  }, [e]);
}
function HDe(e) {
  const t = [nDe(e.offset)];
  return e.middlewares.shift && t.push(_De({ limiter: PDe() })), e.middlewares.flip && t.push(ODe()), e.middlewares.inline && t.push(CDe()), t.push(TDe({ element: e.arrowRef, padding: e.arrowOffset })), t;
}
function WDe(e) {
  const [t, n] = Hze({
    value: e.opened,
    defaultValue: e.defaultOpened,
    finalValue: !1,
    onChange: e.onChange
  }), r = () => {
    var a;
    (a = e.onClose) == null || a.call(e), n(!1);
  }, o = () => {
    var a, l;
    t ? ((a = e.onClose) == null || a.call(e), n(!1)) : ((l = e.onOpen) == null || l.call(e), n(!0));
  }, i = BDe({
    placement: e.position,
    middleware: [
      ...HDe(e),
      ...e.width === "target" ? [
        EDe({
          apply({ rects: a }) {
            var l, s;
            Object.assign((s = (l = i.refs.floating.current) == null ? void 0 : l.style) != null ? s : {}, {
              width: `${a.reference.width}px`
            });
          }
        })
      ] : []
    ]
  });
  return UDe({
    opened: e.opened,
    position: e.position,
    positionDependencies: e.positionDependencies,
    floating: i
  }), zc(() => {
    var a;
    (a = e.onPositionChange) == null || a.call(e, i.placement);
  }, [i.placement]), zc(() => {
    var a, l;
    e.opened ? (l = e.onOpen) == null || l.call(e) : (a = e.onClose) == null || a.call(e);
  }, [e.opened]), {
    floating: i,
    controlled: typeof e.opened == "boolean",
    opened: t,
    onClose: r,
    onToggle: o
  };
}
const YG = {
  context: "Popover component was not found in the tree",
  children: "Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
}, [VDe, XG] = wq(YG.context);
var qDe = Object.defineProperty, GDe = Object.defineProperties, KDe = Object.getOwnPropertyDescriptors, yw = Object.getOwnPropertySymbols, ZG = Object.prototype.hasOwnProperty, QG = Object.prototype.propertyIsEnumerable, NL = (e, t, n) => t in e ? qDe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Jh = (e, t) => {
  for (var n in t || (t = {}))
    ZG.call(t, n) && NL(e, n, t[n]);
  if (yw)
    for (var n of yw(t))
      QG.call(t, n) && NL(e, n, t[n]);
  return e;
}, YDe = (e, t) => GDe(e, KDe(t)), XDe = (e, t) => {
  var n = {};
  for (var r in e)
    ZG.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && yw)
    for (var r of yw(e))
      t.indexOf(r) < 0 && QG.call(e, r) && (n[r] = e[r]);
  return n;
};
const ZDe = {
  refProp: "ref",
  popupType: "dialog",
  shouldOverrideDefaultTargetId: !0
}, JG = b.forwardRef((e, t) => {
  const n = en("PopoverTarget", ZDe, e), { children: r, refProp: o, popupType: i, shouldOverrideDefaultTargetId: a } = n, l = XDe(n, ["children", "refProp", "popupType", "shouldOverrideDefaultTargetId"]);
  if (!o2(r))
    throw new Error(YG.children);
  const s = l, c = XG(), p = Jq(c.reference, r.ref, t), f = c.withRoles ? {
    "aria-haspopup": i,
    "aria-expanded": c.opened,
    "aria-controls": c.getDropdownId(),
    id: a ? c.getTargetId() : r.props.id
  } : {};
  return b.cloneElement(r, Jh(YDe(Jh(Jh(Jh({}, s), f), c.targetProps), {
    className: kq(c.targetProps.className, s.className, r.props.className),
    [o]: p
  }), c.controlled ? null : { onClick: c.onToggle }));
});
JG.displayName = "@mantine/core/PopoverTarget";
var QDe = Cr((e, { radius: t, shadow: n }) => ({
  dropdown: {
    position: "absolute",
    backgroundColor: e.white,
    background: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
    border: `${be(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]}`,
    padding: `${e.spacing.sm} ${e.spacing.md}`,
    boxShadow: e.shadows[n] || n || "none",
    borderRadius: e.fn.radius(t),
    "&:focus": {
      outline: 0
    }
  },
  arrow: {
    backgroundColor: "inherit",
    border: `${be(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2]}`,
    zIndex: 1
  }
}));
const JDe = QDe;
var eFe = Object.defineProperty, $L = Object.getOwnPropertySymbols, tFe = Object.prototype.hasOwnProperty, nFe = Object.prototype.propertyIsEnumerable, IL = (e, t, n) => t in e ? eFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Iu = (e, t) => {
  for (var n in t || (t = {}))
    tFe.call(t, n) && IL(e, n, t[n]);
  if ($L)
    for (var n of $L(t))
      nFe.call(t, n) && IL(e, n, t[n]);
  return e;
};
const AL = {
  entering: "in",
  entered: "in",
  exiting: "out",
  exited: "out",
  "pre-exiting": "out",
  "pre-entering": "out"
};
function rFe({
  transition: e,
  state: t,
  duration: n,
  timingFunction: r
}) {
  const o = {
    transitionDuration: `${n}ms`,
    transitionTimingFunction: r
  };
  return typeof e == "string" ? e in Kh ? Iu(Iu(Iu({
    transitionProperty: Kh[e].transitionProperty
  }, o), Kh[e].common), Kh[e][AL[t]]) : null : Iu(Iu(Iu({
    transitionProperty: e.transitionProperty
  }, o), e.common), e[AL[t]]);
}
function oFe({
  duration: e,
  exitDuration: t,
  timingFunction: n,
  mounted: r,
  onEnter: o,
  onExit: i,
  onEntered: a,
  onExited: l
}) {
  const s = Wa(), c = Wze(), p = s.respectReducedMotion ? c : !1, [f, m] = b.useState(p ? 0 : e), [h, g] = b.useState(r ? "entered" : "exited"), v = b.useRef(-1), S = (w) => {
    const x = w ? o : i, k = w ? a : l;
    g(w ? "pre-entering" : "pre-exiting"), window.clearTimeout(v.current);
    const E = p ? 0 : w ? e : t;
    if (m(E), E === 0)
      typeof x == "function" && x(), typeof k == "function" && k(), g(w ? "entered" : "exited");
    else {
      const O = window.setTimeout(() => {
        typeof x == "function" && x(), g(w ? "entering" : "exiting");
      }, 10);
      v.current = window.setTimeout(() => {
        window.clearTimeout(O), typeof k == "function" && k(), g(w ? "entered" : "exited");
      }, E);
    }
  };
  return zc(() => {
    S(r);
  }, [r]), b.useEffect(() => () => window.clearTimeout(v.current), []), {
    transitionDuration: f,
    transitionStatus: h,
    transitionTimingFunction: n || s.transitionTimingFunction
  };
}
function eK({
  keepMounted: e,
  transition: t,
  duration: n = 250,
  exitDuration: r = n,
  mounted: o,
  children: i,
  timingFunction: a,
  onExit: l,
  onEntered: s,
  onEnter: c,
  onExited: p
}) {
  const { transitionDuration: f, transitionStatus: m, transitionTimingFunction: h } = oFe({
    mounted: o,
    exitDuration: r,
    duration: n,
    timingFunction: a,
    onExit: l,
    onEntered: s,
    onEnter: c,
    onExited: p
  });
  return f === 0 ? o ? /* @__PURE__ */ P.createElement(P.Fragment, null, i({})) : e ? i({ display: "none" }) : null : m === "exited" ? e ? i({ display: "none" }) : null : /* @__PURE__ */ P.createElement(P.Fragment, null, i(rFe({
    transition: t,
    duration: f,
    state: m,
    timingFunction: h
  })));
}
eK.displayName = "@mantine/core/Transition";
function tK({
  children: e,
  active: t = !0,
  refProp: n = "ref"
}) {
  const r = Dze(t), o = Jq(r, e == null ? void 0 : e.ref);
  return o2(e) ? b.cloneElement(e, { [n]: o }) : e;
}
tK.displayName = "@mantine/core/FocusTrap";
var iFe = Object.defineProperty, aFe = Object.defineProperties, lFe = Object.getOwnPropertyDescriptors, zL = Object.getOwnPropertySymbols, sFe = Object.prototype.hasOwnProperty, uFe = Object.prototype.propertyIsEnumerable, LL = (e, t, n) => t in e ? iFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sl = (e, t) => {
  for (var n in t || (t = {}))
    sFe.call(t, n) && LL(e, n, t[n]);
  if (zL)
    for (var n of zL(t))
      uFe.call(t, n) && LL(e, n, t[n]);
  return e;
}, eg = (e, t) => aFe(e, lFe(t));
function DL(e, t, n, r) {
  return e === "center" || r === "center" ? { top: t } : e === "end" ? { bottom: n } : e === "start" ? { top: n } : {};
}
function FL(e, t, n, r, o) {
  return e === "center" || r === "center" ? { left: t } : e === "end" ? { [o === "ltr" ? "right" : "left"]: n } : e === "start" ? { [o === "ltr" ? "left" : "right"]: n } : {};
}
const cFe = {
  bottom: "borderTopLeftRadius",
  left: "borderTopRightRadius",
  right: "borderBottomLeftRadius",
  top: "borderBottomRightRadius"
};
function fFe({
  position: e,
  arrowSize: t,
  arrowOffset: n,
  arrowRadius: r,
  arrowPosition: o,
  arrowX: i,
  arrowY: a,
  dir: l
}) {
  const [s, c = "center"] = e.split("-"), p = {
    width: be(t),
    height: be(t),
    transform: "rotate(45deg)",
    position: "absolute",
    [cFe[s]]: be(r)
  }, f = be(-t / 2);
  return s === "left" ? eg(sl(sl({}, p), DL(c, a, n, o)), {
    right: f,
    borderLeftColor: "transparent",
    borderBottomColor: "transparent"
  }) : s === "right" ? eg(sl(sl({}, p), DL(c, a, n, o)), {
    left: f,
    borderRightColor: "transparent",
    borderTopColor: "transparent"
  }) : s === "top" ? eg(sl(sl({}, p), FL(c, i, n, o, l)), {
    bottom: f,
    borderTopColor: "transparent",
    borderLeftColor: "transparent"
  }) : s === "bottom" ? eg(sl(sl({}, p), FL(c, i, n, o, l)), {
    top: f,
    borderBottomColor: "transparent",
    borderRightColor: "transparent"
  }) : {};
}
var dFe = Object.defineProperty, pFe = Object.defineProperties, mFe = Object.getOwnPropertyDescriptors, vw = Object.getOwnPropertySymbols, nK = Object.prototype.hasOwnProperty, rK = Object.prototype.propertyIsEnumerable, ML = (e, t, n) => t in e ? dFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, hFe = (e, t) => {
  for (var n in t || (t = {}))
    nK.call(t, n) && ML(e, n, t[n]);
  if (vw)
    for (var n of vw(t))
      rK.call(t, n) && ML(e, n, t[n]);
  return e;
}, gFe = (e, t) => pFe(e, mFe(t)), yFe = (e, t) => {
  var n = {};
  for (var r in e)
    nK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && vw)
    for (var r of vw(e))
      t.indexOf(r) < 0 && rK.call(e, r) && (n[r] = e[r]);
  return n;
};
const oK = b.forwardRef((e, t) => {
  var n = e, {
    position: r,
    arrowSize: o,
    arrowOffset: i,
    arrowRadius: a,
    arrowPosition: l,
    visible: s,
    arrowX: c,
    arrowY: p
  } = n, f = yFe(n, [
    "position",
    "arrowSize",
    "arrowOffset",
    "arrowRadius",
    "arrowPosition",
    "visible",
    "arrowX",
    "arrowY"
  ]);
  const m = Wa();
  return s ? /* @__PURE__ */ P.createElement("div", gFe(hFe({}, f), {
    ref: t,
    style: fFe({
      position: r,
      arrowSize: o,
      arrowOffset: i,
      arrowRadius: a,
      arrowPosition: l,
      dir: m.dir,
      arrowX: c,
      arrowY: p
    })
  })) : null;
});
oK.displayName = "@mantine/core/FloatingArrow";
var vFe = Object.defineProperty, bFe = Object.defineProperties, wFe = Object.getOwnPropertyDescriptors, bw = Object.getOwnPropertySymbols, iK = Object.prototype.hasOwnProperty, aK = Object.prototype.propertyIsEnumerable, BL = (e, t, n) => t in e ? vFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Au = (e, t) => {
  for (var n in t || (t = {}))
    iK.call(t, n) && BL(e, n, t[n]);
  if (bw)
    for (var n of bw(t))
      aK.call(t, n) && BL(e, n, t[n]);
  return e;
}, tg = (e, t) => bFe(e, wFe(t)), xFe = (e, t) => {
  var n = {};
  for (var r in e)
    iK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && bw)
    for (var r of bw(e))
      t.indexOf(r) < 0 && aK.call(e, r) && (n[r] = e[r]);
  return n;
};
const SFe = {};
function lK(e) {
  var t;
  const n = en("PopoverDropdown", SFe, e), { style: r, className: o, children: i, onKeyDownCapture: a } = n, l = xFe(n, ["style", "className", "children", "onKeyDownCapture"]), s = XG(), { classes: c, cx: p } = JDe({ radius: s.radius, shadow: s.shadow }, {
    name: s.__staticSelector,
    classNames: s.classNames,
    styles: s.styles,
    unstyled: s.unstyled,
    variant: s.variant
  }), f = jze({
    opened: s.opened,
    shouldReturnFocus: s.returnFocus
  }), m = s.withRoles ? {
    "aria-labelledby": s.getTargetId(),
    id: s.getDropdownId(),
    role: "dialog"
  } : {};
  return s.disabled ? null : /* @__PURE__ */ P.createElement(kG, tg(Au({}, s.portalProps), {
    withinPortal: s.withinPortal
  }), /* @__PURE__ */ P.createElement(eK, tg(Au({
    mounted: s.opened
  }, s.transitionProps), {
    transition: s.transitionProps.transition || "fade",
    duration: (t = s.transitionProps.duration) != null ? t : 150,
    keepMounted: s.keepMounted,
    exitDuration: typeof s.transitionProps.exitDuration == "number" ? s.transitionProps.exitDuration : s.transitionProps.duration
  }), (h) => {
    var g, v;
    return /* @__PURE__ */ P.createElement(tK, {
      active: s.trapFocus
    }, /* @__PURE__ */ P.createElement(qo, Au(tg(Au({}, m), {
      tabIndex: -1,
      ref: s.floating,
      style: tg(Au(Au({}, r), h), {
        zIndex: s.zIndex,
        top: (g = s.y) != null ? g : 0,
        left: (v = s.x) != null ? v : 0,
        width: s.width === "target" ? void 0 : be(s.width)
      }),
      className: p(c.dropdown, o),
      onKeyDownCapture: c5e(s.onClose, {
        active: s.closeOnEscape,
        onTrigger: f,
        onKeyDown: a
      }),
      "data-position": s.placement
    }), l), i, /* @__PURE__ */ P.createElement(oK, {
      ref: s.arrowRef,
      arrowX: s.arrowX,
      arrowY: s.arrowY,
      visible: s.withArrow,
      position: s.placement,
      arrowSize: s.arrowSize,
      arrowRadius: s.arrowRadius,
      arrowOffset: s.arrowOffset,
      arrowPosition: s.arrowPosition,
      className: c.arrow
    })));
  }));
}
lK.displayName = "@mantine/core/PopoverDropdown";
function kFe(e, t) {
  if (e === "rtl" && (t.includes("right") || t.includes("left"))) {
    const [n, r] = t.split("-"), o = n === "right" ? "left" : "right";
    return r === void 0 ? o : `${o}-${r}`;
  }
  return t;
}
var UL = Object.getOwnPropertySymbols, _Fe = Object.prototype.hasOwnProperty, OFe = Object.prototype.propertyIsEnumerable, EFe = (e, t) => {
  var n = {};
  for (var r in e)
    _Fe.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && UL)
    for (var r of UL(e))
      t.indexOf(r) < 0 && OFe.call(e, r) && (n[r] = e[r]);
  return n;
};
const CFe = {
  position: "bottom",
  offset: 8,
  positionDependencies: [],
  transitionProps: { transition: "fade", duration: 150 },
  middlewares: { flip: !0, shift: !0, inline: !1 },
  arrowSize: 7,
  arrowOffset: 5,
  arrowRadius: 0,
  arrowPosition: "side",
  closeOnClickOutside: !0,
  withinPortal: !1,
  closeOnEscape: !0,
  trapFocus: !1,
  withRoles: !0,
  returnFocus: !1,
  clickOutsideEvents: ["mousedown", "touchstart"],
  zIndex: lze("popover"),
  __staticSelector: "Popover",
  width: "max-content"
};
function mf(e) {
  var t, n, r, o, i, a;
  const l = b.useRef(null), s = en("Popover", CFe, e), {
    children: c,
    position: p,
    offset: f,
    onPositionChange: m,
    positionDependencies: h,
    opened: g,
    transitionProps: v,
    width: S,
    middlewares: w,
    withArrow: x,
    arrowSize: k,
    arrowOffset: E,
    arrowRadius: O,
    arrowPosition: C,
    unstyled: R,
    classNames: L,
    styles: D,
    closeOnClickOutside: N,
    withinPortal: H,
    portalProps: B,
    closeOnEscape: K,
    clickOutsideEvents: W,
    trapFocus: U,
    onClose: Q,
    onOpen: J,
    onChange: q,
    zIndex: ee,
    radius: A,
    shadow: X,
    id: ie,
    defaultOpened: j,
    __staticSelector: le,
    withRoles: re,
    disabled: he,
    returnFocus: xe,
    variant: ke,
    keepMounted: Ae
  } = s, pe = EFe(s, [
    "children",
    "position",
    "offset",
    "onPositionChange",
    "positionDependencies",
    "opened",
    "transitionProps",
    "width",
    "middlewares",
    "withArrow",
    "arrowSize",
    "arrowOffset",
    "arrowRadius",
    "arrowPosition",
    "unstyled",
    "classNames",
    "styles",
    "closeOnClickOutside",
    "withinPortal",
    "portalProps",
    "closeOnEscape",
    "clickOutsideEvents",
    "trapFocus",
    "onClose",
    "onOpen",
    "onChange",
    "zIndex",
    "radius",
    "shadow",
    "id",
    "defaultOpened",
    "__staticSelector",
    "withRoles",
    "disabled",
    "returnFocus",
    "variant",
    "keepMounted"
  ]), [Me, We] = b.useState(null), [ze, Fe] = b.useState(null), Ye = m2(ie), oe = Wa(), ae = WDe({
    middlewares: w,
    width: S,
    position: kFe(oe.dir, p),
    offset: typeof f == "number" ? f + (x ? k / 2 : 0) : f,
    arrowRef: l,
    arrowOffset: E,
    onPositionChange: m,
    positionDependencies: h,
    opened: g,
    defaultOpened: j,
    onChange: q,
    onOpen: J,
    onClose: Q
  });
  Cze(() => ae.opened && N && ae.onClose(), W, [Me, ze]);
  const Ie = b.useCallback((ye) => {
    We(ye), ae.floating.reference(ye);
  }, [ae.floating.reference]), Ce = b.useCallback((ye) => {
    Fe(ye), ae.floating.floating(ye);
  }, [ae.floating.floating]);
  return /* @__PURE__ */ P.createElement(VDe, {
    value: {
      returnFocus: xe,
      disabled: he,
      controlled: ae.controlled,
      reference: Ie,
      floating: Ce,
      x: ae.floating.x,
      y: ae.floating.y,
      arrowX: (r = (n = (t = ae.floating) == null ? void 0 : t.middlewareData) == null ? void 0 : n.arrow) == null ? void 0 : r.x,
      arrowY: (a = (i = (o = ae.floating) == null ? void 0 : o.middlewareData) == null ? void 0 : i.arrow) == null ? void 0 : a.y,
      opened: ae.opened,
      arrowRef: l,
      transitionProps: v,
      width: S,
      withArrow: x,
      arrowSize: k,
      arrowOffset: E,
      arrowRadius: O,
      arrowPosition: C,
      placement: ae.floating.placement,
      trapFocus: U,
      withinPortal: H,
      portalProps: B,
      zIndex: ee,
      radius: A,
      shadow: X,
      closeOnEscape: K,
      onClose: ae.onClose,
      onToggle: ae.onToggle,
      getTargetId: () => `${Ye}-target`,
      getDropdownId: () => `${Ye}-dropdown`,
      withRoles: re,
      targetProps: pe,
      __staticSelector: le,
      classNames: L,
      styles: D,
      unstyled: R,
      variant: ke,
      keepMounted: Ae
    }
  }, c);
}
mf.Target = JG;
mf.Dropdown = lK;
mf.displayName = "@mantine/core/Popover";
var PFe = Object.defineProperty, RFe = Object.defineProperties, TFe = Object.getOwnPropertyDescriptors, ww = Object.getOwnPropertySymbols, sK = Object.prototype.hasOwnProperty, uK = Object.prototype.propertyIsEnumerable, HL = (e, t, n) => t in e ? PFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ng = (e, t) => {
  for (var n in t || (t = {}))
    sK.call(t, n) && HL(e, n, t[n]);
  if (ww)
    for (var n of ww(t))
      uK.call(t, n) && HL(e, n, t[n]);
  return e;
}, jFe = (e, t) => RFe(e, TFe(t)), NFe = (e, t) => {
  var n = {};
  for (var r in e)
    sK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && ww)
    for (var r of ww(e))
      t.indexOf(r) < 0 && uK.call(e, r) && (n[r] = e[r]);
  return n;
};
function $Fe(e, t, n) {
  const r = en(e, t, n), {
    label: o,
    description: i,
    error: a,
    required: l,
    classNames: s,
    styles: c,
    className: p,
    unstyled: f,
    __staticSelector: m,
    sx: h,
    errorProps: g,
    labelProps: v,
    descriptionProps: S,
    wrapperProps: w,
    id: x,
    size: k,
    style: E,
    inputContainer: O,
    inputWrapperOrder: C,
    withAsterisk: R,
    variant: L
  } = r, D = NFe(r, [
    "label",
    "description",
    "error",
    "required",
    "classNames",
    "styles",
    "className",
    "unstyled",
    "__staticSelector",
    "sx",
    "errorProps",
    "labelProps",
    "descriptionProps",
    "wrapperProps",
    "id",
    "size",
    "style",
    "inputContainer",
    "inputWrapperOrder",
    "withAsterisk",
    "variant"
  ]), N = m2(x), { systemStyles: H, rest: B } = h2(D), K = ng({
    label: o,
    description: i,
    error: a,
    required: l,
    classNames: s,
    className: p,
    __staticSelector: m,
    sx: h,
    errorProps: g,
    labelProps: v,
    descriptionProps: S,
    unstyled: f,
    styles: c,
    id: N,
    size: k,
    style: E,
    inputContainer: O,
    inputWrapperOrder: C,
    withAsterisk: R,
    variant: L
  }, w);
  return jFe(ng({}, B), {
    classNames: s,
    styles: c,
    unstyled: f,
    wrapperProps: ng(ng({}, K), H),
    inputProps: {
      required: l,
      classNames: s,
      styles: c,
      unstyled: f,
      id: N,
      size: k,
      __staticSelector: m,
      error: a,
      variant: L
    }
  });
}
var IFe = Cr((e, t, { size: n }) => ({
  label: {
    display: "inline-block",
    fontSize: $t({ size: n, sizes: e.fontSizes }),
    fontWeight: 500,
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.colors.gray[9],
    wordBreak: "break-word",
    cursor: "default",
    WebkitTapHighlightColor: "transparent"
  },
  required: {
    color: e.fn.variant({ variant: "filled", color: "red" }).background
  }
})), AFe = Object.defineProperty, xw = Object.getOwnPropertySymbols, cK = Object.prototype.hasOwnProperty, fK = Object.prototype.propertyIsEnumerable, WL = (e, t, n) => t in e ? AFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, zFe = (e, t) => {
  for (var n in t || (t = {}))
    cK.call(t, n) && WL(e, n, t[n]);
  if (xw)
    for (var n of xw(t))
      fK.call(t, n) && WL(e, n, t[n]);
  return e;
}, LFe = (e, t) => {
  var n = {};
  for (var r in e)
    cK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && xw)
    for (var r of xw(e))
      t.indexOf(r) < 0 && fK.call(e, r) && (n[r] = e[r]);
  return n;
};
const DFe = {
  labelElement: "label",
  size: "sm"
}, O2 = b.forwardRef((e, t) => {
  const n = en("InputLabel", DFe, e), {
    labelElement: r,
    children: o,
    required: i,
    size: a,
    classNames: l,
    styles: s,
    unstyled: c,
    className: p,
    htmlFor: f,
    __staticSelector: m,
    variant: h,
    onMouseDown: g
  } = n, v = LFe(n, [
    "labelElement",
    "children",
    "required",
    "size",
    "classNames",
    "styles",
    "unstyled",
    "className",
    "htmlFor",
    "__staticSelector",
    "variant",
    "onMouseDown"
  ]), { classes: S, cx: w } = IFe(null, {
    name: ["InputWrapper", m],
    classNames: l,
    styles: s,
    unstyled: c,
    variant: h,
    size: a
  });
  return /* @__PURE__ */ P.createElement(qo, zFe({
    component: r,
    ref: t,
    className: w(S.label, p),
    htmlFor: r === "label" ? f : void 0,
    onMouseDown: (x) => {
      g == null || g(x), !x.defaultPrevented && x.detail > 1 && x.preventDefault();
    }
  }, v), o, i && /* @__PURE__ */ P.createElement("span", {
    className: S.required,
    "aria-hidden": !0
  }, " *"));
});
O2.displayName = "@mantine/core/InputLabel";
var FFe = Cr((e, t, { size: n }) => ({
  error: {
    wordBreak: "break-word",
    color: e.fn.variant({ variant: "filled", color: "red" }).background,
    fontSize: `calc(${$t({ size: n, sizes: e.fontSizes })} - ${be(2)})`,
    lineHeight: 1.2,
    display: "block"
  }
})), MFe = Object.defineProperty, Sw = Object.getOwnPropertySymbols, dK = Object.prototype.hasOwnProperty, pK = Object.prototype.propertyIsEnumerable, VL = (e, t, n) => t in e ? MFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, BFe = (e, t) => {
  for (var n in t || (t = {}))
    dK.call(t, n) && VL(e, n, t[n]);
  if (Sw)
    for (var n of Sw(t))
      pK.call(t, n) && VL(e, n, t[n]);
  return e;
}, UFe = (e, t) => {
  var n = {};
  for (var r in e)
    dK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Sw)
    for (var r of Sw(e))
      t.indexOf(r) < 0 && pK.call(e, r) && (n[r] = e[r]);
  return n;
};
const HFe = {
  size: "sm"
}, E2 = b.forwardRef((e, t) => {
  const n = en("InputError", HFe, e), {
    children: r,
    className: o,
    classNames: i,
    styles: a,
    unstyled: l,
    size: s,
    __staticSelector: c,
    variant: p
  } = n, f = UFe(n, [
    "children",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "size",
    "__staticSelector",
    "variant"
  ]), { classes: m, cx: h } = FFe(null, {
    name: ["InputWrapper", c],
    classNames: i,
    styles: a,
    unstyled: l,
    variant: p,
    size: s
  });
  return /* @__PURE__ */ P.createElement(Xp, BFe({
    className: h(m.error, o),
    ref: t
  }, f), r);
});
E2.displayName = "@mantine/core/InputError";
var WFe = Cr((e, t, { size: n }) => ({
  description: {
    wordBreak: "break-word",
    color: e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[6],
    fontSize: `calc(${$t({ size: n, sizes: e.fontSizes })} - ${be(2)})`,
    lineHeight: 1.2,
    display: "block"
  }
})), VFe = Object.defineProperty, kw = Object.getOwnPropertySymbols, mK = Object.prototype.hasOwnProperty, hK = Object.prototype.propertyIsEnumerable, qL = (e, t, n) => t in e ? VFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, qFe = (e, t) => {
  for (var n in t || (t = {}))
    mK.call(t, n) && qL(e, n, t[n]);
  if (kw)
    for (var n of kw(t))
      hK.call(t, n) && qL(e, n, t[n]);
  return e;
}, GFe = (e, t) => {
  var n = {};
  for (var r in e)
    mK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && kw)
    for (var r of kw(e))
      t.indexOf(r) < 0 && hK.call(e, r) && (n[r] = e[r]);
  return n;
};
const KFe = {
  size: "sm"
}, C2 = b.forwardRef((e, t) => {
  const n = en("InputDescription", KFe, e), {
    children: r,
    className: o,
    classNames: i,
    styles: a,
    unstyled: l,
    size: s,
    __staticSelector: c,
    variant: p
  } = n, f = GFe(n, [
    "children",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "size",
    "__staticSelector",
    "variant"
  ]), { classes: m, cx: h } = WFe(null, {
    name: ["InputWrapper", c],
    classNames: i,
    styles: a,
    unstyled: l,
    variant: p,
    size: s
  });
  return /* @__PURE__ */ P.createElement(Xp, qFe({
    color: "dimmed",
    className: h(m.description, o),
    ref: t,
    unstyled: l
  }, f), r);
});
C2.displayName = "@mantine/core/InputDescription";
const gK = b.createContext({
  offsetBottom: !1,
  offsetTop: !1,
  describedBy: void 0
}), YFe = gK.Provider, XFe = () => b.useContext(gK);
function ZFe(e, { hasDescription: t, hasError: n }) {
  const r = e.findIndex((s) => s === "input"), o = e[r - 1], i = e[r + 1];
  return { offsetBottom: t && i === "description" || n && i === "error", offsetTop: t && o === "description" || n && o === "error" };
}
var QFe = Object.defineProperty, JFe = Object.defineProperties, e6e = Object.getOwnPropertyDescriptors, GL = Object.getOwnPropertySymbols, t6e = Object.prototype.hasOwnProperty, n6e = Object.prototype.propertyIsEnumerable, KL = (e, t, n) => t in e ? QFe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, r6e = (e, t) => {
  for (var n in t || (t = {}))
    t6e.call(t, n) && KL(e, n, t[n]);
  if (GL)
    for (var n of GL(t))
      n6e.call(t, n) && KL(e, n, t[n]);
  return e;
}, o6e = (e, t) => JFe(e, e6e(t)), i6e = Cr((e) => ({
  root: o6e(r6e({}, e.fn.fontStyles()), {
    lineHeight: e.lineHeight
  })
})), a6e = Object.defineProperty, l6e = Object.defineProperties, s6e = Object.getOwnPropertyDescriptors, _w = Object.getOwnPropertySymbols, yK = Object.prototype.hasOwnProperty, vK = Object.prototype.propertyIsEnumerable, YL = (e, t, n) => t in e ? a6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ul = (e, t) => {
  for (var n in t || (t = {}))
    yK.call(t, n) && YL(e, n, t[n]);
  if (_w)
    for (var n of _w(t))
      vK.call(t, n) && YL(e, n, t[n]);
  return e;
}, XL = (e, t) => l6e(e, s6e(t)), u6e = (e, t) => {
  var n = {};
  for (var r in e)
    yK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && _w)
    for (var r of _w(e))
      t.indexOf(r) < 0 && vK.call(e, r) && (n[r] = e[r]);
  return n;
};
const c6e = {
  labelElement: "label",
  size: "sm",
  inputContainer: (e) => e,
  inputWrapperOrder: ["label", "description", "input", "error"]
}, bK = b.forwardRef((e, t) => {
  const n = en("InputWrapper", c6e, e), {
    className: r,
    label: o,
    children: i,
    required: a,
    id: l,
    error: s,
    description: c,
    labelElement: p,
    labelProps: f,
    descriptionProps: m,
    errorProps: h,
    classNames: g,
    styles: v,
    size: S,
    inputContainer: w,
    __staticSelector: x,
    unstyled: k,
    inputWrapperOrder: E,
    withAsterisk: O,
    variant: C
  } = n, R = u6e(n, [
    "className",
    "label",
    "children",
    "required",
    "id",
    "error",
    "description",
    "labelElement",
    "labelProps",
    "descriptionProps",
    "errorProps",
    "classNames",
    "styles",
    "size",
    "inputContainer",
    "__staticSelector",
    "unstyled",
    "inputWrapperOrder",
    "withAsterisk",
    "variant"
  ]), { classes: L, cx: D } = i6e(null, {
    classNames: g,
    styles: v,
    name: ["InputWrapper", x],
    unstyled: k,
    variant: C,
    size: S
  }), N = {
    classNames: g,
    styles: v,
    unstyled: k,
    size: S,
    variant: C,
    __staticSelector: x
  }, H = typeof O == "boolean" ? O : a, B = l ? `${l}-error` : h == null ? void 0 : h.id, K = l ? `${l}-description` : m == null ? void 0 : m.id, U = `${!!s && typeof s != "boolean" ? B : ""} ${c ? K : ""}`, Q = U.trim().length > 0 ? U.trim() : void 0, J = o && /* @__PURE__ */ P.createElement(O2, ul(ul({
    key: "label",
    labelElement: p,
    id: l ? `${l}-label` : void 0,
    htmlFor: l,
    required: H
  }, N), f), o), q = c && /* @__PURE__ */ P.createElement(C2, XL(ul(ul({
    key: "description"
  }, m), N), {
    size: (m == null ? void 0 : m.size) || N.size,
    id: (m == null ? void 0 : m.id) || K
  }), c), ee = /* @__PURE__ */ P.createElement(b.Fragment, {
    key: "input"
  }, w(i)), A = typeof s != "boolean" && s && /* @__PURE__ */ P.createElement(E2, XL(ul(ul({}, h), N), {
    size: (h == null ? void 0 : h.size) || N.size,
    key: "error",
    id: (h == null ? void 0 : h.id) || B
  }), s), X = E.map((ie) => {
    switch (ie) {
      case "label":
        return J;
      case "input":
        return ee;
      case "description":
        return q;
      case "error":
        return A;
      default:
        return null;
    }
  });
  return /* @__PURE__ */ P.createElement(YFe, {
    value: ul({
      describedBy: Q
    }, ZFe(E, {
      hasDescription: !!q,
      hasError: !!A
    }))
  }, /* @__PURE__ */ P.createElement(qo, ul({
    className: D(L.root, r),
    ref: t
  }, R), X));
});
bK.displayName = "@mantine/core/InputWrapper";
var f6e = Object.defineProperty, Ow = Object.getOwnPropertySymbols, wK = Object.prototype.hasOwnProperty, xK = Object.prototype.propertyIsEnumerable, ZL = (e, t, n) => t in e ? f6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, d6e = (e, t) => {
  for (var n in t || (t = {}))
    wK.call(t, n) && ZL(e, n, t[n]);
  if (Ow)
    for (var n of Ow(t))
      xK.call(t, n) && ZL(e, n, t[n]);
  return e;
}, p6e = (e, t) => {
  var n = {};
  for (var r in e)
    wK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Ow)
    for (var r of Ow(e))
      t.indexOf(r) < 0 && xK.call(e, r) && (n[r] = e[r]);
  return n;
};
const m6e = {}, SK = b.forwardRef((e, t) => {
  const n = en("InputPlaceholder", m6e, e), { sx: r } = n, o = p6e(n, ["sx"]);
  return /* @__PURE__ */ P.createElement(qo, d6e({
    component: "span",
    sx: [(i) => i.fn.placeholderStyles(), ...xq(r)],
    ref: t
  }, o));
});
SK.displayName = "@mantine/core/InputPlaceholder";
var h6e = Object.defineProperty, g6e = Object.defineProperties, y6e = Object.getOwnPropertyDescriptors, QL = Object.getOwnPropertySymbols, v6e = Object.prototype.hasOwnProperty, b6e = Object.prototype.propertyIsEnumerable, JL = (e, t, n) => t in e ? h6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, rg = (e, t) => {
  for (var n in t || (t = {}))
    v6e.call(t, n) && JL(e, n, t[n]);
  if (QL)
    for (var n of QL(t))
      b6e.call(t, n) && JL(e, n, t[n]);
  return e;
}, a0 = (e, t) => g6e(e, y6e(t));
const yr = {
  xs: be(30),
  sm: be(36),
  md: be(42),
  lg: be(50),
  xl: be(60)
}, w6e = ["default", "filled", "unstyled"];
function x6e({ theme: e, variant: t }) {
  return w6e.includes(t) ? t === "default" ? {
    border: `${be(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[4]}`,
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.white,
    transition: "border-color 100ms ease",
    "&:focus, &:focus-within": e.focusRingStyles.inputStyles(e)
  } : t === "filled" ? {
    border: `${be(1)} solid transparent`,
    backgroundColor: e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[1],
    "&:focus, &:focus-within": e.focusRingStyles.inputStyles(e)
  } : {
    borderWidth: 0,
    color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
    backgroundColor: "transparent",
    minHeight: be(28),
    outline: 0,
    "&:focus, &:focus-within": {
      outline: "none",
      borderColor: "transparent"
    },
    "&:disabled": {
      backgroundColor: "transparent",
      "&:focus, &:focus-within": {
        outline: "none",
        borderColor: "transparent"
      }
    }
  } : null;
}
var S6e = Cr((e, {
  multiline: t,
  radius: n,
  invalid: r,
  rightSectionWidth: o,
  withRightSection: i,
  iconWidth: a,
  offsetBottom: l,
  offsetTop: s,
  pointer: c
}, { variant: p, size: f }) => {
  const m = e.fn.variant({
    variant: "filled",
    color: "red"
  }).background, h = p === "default" || p === "filled" ? {
    minHeight: $t({ size: f, sizes: yr }),
    paddingLeft: `calc(${$t({ size: f, sizes: yr })}  / 3)`,
    paddingRight: i ? o || $t({ size: f, sizes: yr }) : `calc(${$t({ size: f, sizes: yr })}  / 3)`,
    borderRadius: e.fn.radius(n)
  } : p === "unstyled" && i ? {
    paddingRight: o || $t({ size: f, sizes: yr })
  } : null;
  return {
    wrapper: {
      position: "relative",
      marginTop: s ? `calc(${e.spacing.xs} / 2)` : void 0,
      marginBottom: l ? `calc(${e.spacing.xs} / 2)` : void 0,
      "&:has(input:disabled)": {
        "& .mantine-Input-rightSection": {
          display: "none"
        }
      }
    },
    input: a0(rg(rg(a0(rg({}, e.fn.fontStyles()), {
      height: t ? p === "unstyled" ? void 0 : "auto" : $t({ size: f, sizes: yr }),
      WebkitTapHighlightColor: "transparent",
      lineHeight: t ? e.lineHeight : `calc(${$t({ size: f, sizes: yr })} - ${be(2)})`,
      appearance: "none",
      resize: "none",
      boxSizing: "border-box",
      fontSize: $t({ size: f, sizes: e.fontSizes }),
      width: "100%",
      color: e.colorScheme === "dark" ? e.colors.dark[0] : e.black,
      display: "block",
      textAlign: "left",
      cursor: c ? "pointer" : void 0
    }), x6e({ theme: e, variant: p })), h), {
      "&:disabled, &[data-disabled]": {
        backgroundColor: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[1],
        color: e.colors.dark[2],
        opacity: 0.6,
        cursor: "not-allowed",
        pointerEvents: "none",
        "&::placeholder": {
          color: e.colors.dark[2]
        }
      },
      "&[data-invalid]": {
        color: m,
        borderColor: m,
        "&::placeholder": {
          opacity: 1,
          color: m
        }
      },
      "&[data-with-icon]": {
        paddingLeft: typeof a == "number" ? be(a) : $t({ size: f, sizes: yr })
      },
      "&::placeholder": a0(rg({}, e.fn.placeholderStyles()), {
        opacity: 1
      }),
      "&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration": {
        appearance: "none"
      },
      "&[type=number]": {
        MozAppearance: "textfield"
      }
    }),
    icon: {
      pointerEvents: "none",
      position: "absolute",
      zIndex: 1,
      left: 0,
      top: 0,
      bottom: 0,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: a ? be(a) : $t({ size: f, sizes: yr }),
      color: r ? e.colors.red[e.colorScheme === "dark" ? 6 : 7] : e.colorScheme === "dark" ? e.colors.dark[2] : e.colors.gray[5]
    },
    rightSection: {
      position: "absolute",
      top: 0,
      bottom: 0,
      right: 0,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: o || $t({ size: f, sizes: yr })
    }
  };
});
const k6e = S6e;
var _6e = Object.defineProperty, O6e = Object.defineProperties, E6e = Object.getOwnPropertyDescriptors, Ew = Object.getOwnPropertySymbols, kK = Object.prototype.hasOwnProperty, _K = Object.prototype.propertyIsEnumerable, eD = (e, t, n) => t in e ? _6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, og = (e, t) => {
  for (var n in t || (t = {}))
    kK.call(t, n) && eD(e, n, t[n]);
  if (Ew)
    for (var n of Ew(t))
      _K.call(t, n) && eD(e, n, t[n]);
  return e;
}, tD = (e, t) => O6e(e, E6e(t)), C6e = (e, t) => {
  var n = {};
  for (var r in e)
    kK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Ew)
    for (var r of Ew(e))
      t.indexOf(r) < 0 && _K.call(e, r) && (n[r] = e[r]);
  return n;
};
const P6e = {
  size: "sm",
  variant: "default"
}, ru = b.forwardRef((e, t) => {
  const n = en("Input", P6e, e), {
    className: r,
    error: o,
    required: i,
    disabled: a,
    variant: l,
    icon: s,
    style: c,
    rightSectionWidth: p,
    iconWidth: f,
    rightSection: m,
    rightSectionProps: h,
    radius: g,
    size: v,
    wrapperProps: S,
    classNames: w,
    styles: x,
    __staticSelector: k,
    multiline: E,
    sx: O,
    unstyled: C,
    pointer: R
  } = n, L = C6e(n, [
    "className",
    "error",
    "required",
    "disabled",
    "variant",
    "icon",
    "style",
    "rightSectionWidth",
    "iconWidth",
    "rightSection",
    "rightSectionProps",
    "radius",
    "size",
    "wrapperProps",
    "classNames",
    "styles",
    "__staticSelector",
    "multiline",
    "sx",
    "unstyled",
    "pointer"
  ]), { offsetBottom: D, offsetTop: N, describedBy: H } = XFe(), { classes: B, cx: K } = k6e({
    radius: g,
    multiline: E,
    invalid: !!o,
    rightSectionWidth: p ? be(p) : void 0,
    iconWidth: f,
    withRightSection: !!m,
    offsetBottom: D,
    offsetTop: N,
    pointer: R
  }, { classNames: w, styles: x, name: ["Input", k], unstyled: C, variant: l, size: v }), { systemStyles: W, rest: U } = h2(L);
  return /* @__PURE__ */ P.createElement(qo, og(og({
    className: K(B.wrapper, r),
    sx: O,
    style: c
  }, W), S), s && /* @__PURE__ */ P.createElement("div", {
    className: B.icon
  }, s), /* @__PURE__ */ P.createElement(qo, tD(og({
    component: "input"
  }, U), {
    ref: t,
    required: i,
    "aria-invalid": !!o,
    "aria-describedby": H,
    disabled: a,
    "data-disabled": a || void 0,
    "data-with-icon": !!s || void 0,
    "data-invalid": !!o || void 0,
    className: B.input
  })), m && /* @__PURE__ */ P.createElement("div", tD(og({}, h), {
    className: B.rightSection
  }), m));
});
ru.displayName = "@mantine/core/Input";
ru.Wrapper = bK;
ru.Label = O2;
ru.Description = C2;
ru.Error = E2;
ru.Placeholder = SK;
const nD = ru;
var R6e = Cr((e, { orientation: t, buttonBorderWidth: n }) => ({
  root: {
    display: "flex",
    flexDirection: t === "vertical" ? "column" : "row",
    "& [data-button]": {
      "&:first-of-type:not(:last-of-type)": {
        borderBottomRightRadius: 0,
        [t === "vertical" ? "borderBottomLeftRadius" : "borderTopRightRadius"]: 0,
        [t === "vertical" ? "borderBottomWidth" : "borderRightWidth"]: `calc(${be(n)} / 2)`
      },
      "&:last-of-type:not(:first-of-type)": {
        borderTopLeftRadius: 0,
        [t === "vertical" ? "borderTopRightRadius" : "borderBottomLeftRadius"]: 0,
        [t === "vertical" ? "borderTopWidth" : "borderLeftWidth"]: `calc(${be(n)} / 2)`
      },
      "&:not(:first-of-type):not(:last-of-type)": {
        borderRadius: 0,
        [t === "vertical" ? "borderTopWidth" : "borderLeftWidth"]: `calc(${be(n)} / 2)`,
        [t === "vertical" ? "borderBottomWidth" : "borderRightWidth"]: `calc(${be(n)} / 2)`
      },
      "& + [data-button]": {
        [t === "vertical" ? "marginTop" : "marginLeft"]: `calc(${n} * -1)`,
        "@media (min-resolution: 192dpi)": {
          [t === "vertical" ? "marginTop" : "marginLeft"]: 0
        }
      }
    }
  }
})), T6e = Object.defineProperty, Cw = Object.getOwnPropertySymbols, OK = Object.prototype.hasOwnProperty, EK = Object.prototype.propertyIsEnumerable, rD = (e, t, n) => t in e ? T6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j6e = (e, t) => {
  for (var n in t || (t = {}))
    OK.call(t, n) && rD(e, n, t[n]);
  if (Cw)
    for (var n of Cw(t))
      EK.call(t, n) && rD(e, n, t[n]);
  return e;
}, N6e = (e, t) => {
  var n = {};
  for (var r in e)
    OK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Cw)
    for (var r of Cw(e))
      t.indexOf(r) < 0 && EK.call(e, r) && (n[r] = e[r]);
  return n;
};
const $6e = {
  orientation: "horizontal",
  buttonBorderWidth: 1
}, CK = b.forwardRef((e, t) => {
  const n = en("ButtonGroup", $6e, e), { className: r, orientation: o, buttonBorderWidth: i, unstyled: a } = n, l = N6e(n, ["className", "orientation", "buttonBorderWidth", "unstyled"]), { classes: s, cx: c } = R6e({ orientation: o, buttonBorderWidth: i }, { name: "ButtonGroup", unstyled: a });
  return /* @__PURE__ */ P.createElement(qo, j6e({
    className: c(s.root, r),
    ref: t
  }, l));
});
CK.displayName = "@mantine/core/ButtonGroup";
var I6e = Object.defineProperty, A6e = Object.defineProperties, z6e = Object.getOwnPropertyDescriptors, oD = Object.getOwnPropertySymbols, L6e = Object.prototype.hasOwnProperty, D6e = Object.prototype.propertyIsEnumerable, iD = (e, t, n) => t in e ? I6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ya = (e, t) => {
  for (var n in t || (t = {}))
    L6e.call(t, n) && iD(e, n, t[n]);
  if (oD)
    for (var n of oD(t))
      D6e.call(t, n) && iD(e, n, t[n]);
  return e;
}, ny = (e, t) => A6e(e, z6e(t));
const F6e = [
  "filled",
  "outline",
  "light",
  "white",
  "default",
  "subtle",
  "gradient"
], RE = {
  xs: { height: yr.xs, paddingLeft: be(14), paddingRight: be(14) },
  sm: { height: yr.sm, paddingLeft: be(18), paddingRight: be(18) },
  md: { height: yr.md, paddingLeft: be(22), paddingRight: be(22) },
  lg: { height: yr.lg, paddingLeft: be(26), paddingRight: be(26) },
  xl: { height: yr.xl, paddingLeft: be(32), paddingRight: be(32) },
  "compact-xs": { height: be(22), paddingLeft: be(7), paddingRight: be(7) },
  "compact-sm": { height: be(26), paddingLeft: be(8), paddingRight: be(8) },
  "compact-md": { height: be(30), paddingLeft: be(10), paddingRight: be(10) },
  "compact-lg": { height: be(34), paddingLeft: be(12), paddingRight: be(12) },
  "compact-xl": { height: be(40), paddingLeft: be(14), paddingRight: be(14) }
};
function M6e({ compact: e, size: t, withLeftIcon: n, withRightIcon: r }) {
  if (e)
    return RE[`compact-${t}`];
  const o = RE[t];
  return o ? ny(ya({}, o), {
    paddingLeft: n ? `calc(${o.paddingLeft}  / 1.5)` : o.paddingLeft,
    paddingRight: r ? `calc(${o.paddingRight}  / 1.5)` : o.paddingRight
  }) : {};
}
const B6e = (e) => ({
  display: e ? "block" : "inline-block",
  width: e ? "100%" : "auto"
});
function U6e({ variant: e, theme: t, color: n, gradient: r }) {
  if (!F6e.includes(e))
    return null;
  const o = t.fn.variant({ color: n, variant: e, gradient: r });
  return e === "gradient" ? ya({
    border: 0,
    backgroundImage: o.background,
    color: o.color
  }, t.fn.hover({ backgroundSize: "200%" })) : ya({
    border: `${be(1)} solid ${o.border}`,
    backgroundColor: o.background,
    color: o.color
  }, t.fn.hover({ backgroundColor: o.hover }));
}
var H6e = Cr((e, {
  radius: t,
  fullWidth: n,
  compact: r,
  withLeftIcon: o,
  withRightIcon: i,
  color: a,
  gradient: l
}, { variant: s, size: c }) => ({
  root: ny(ya(ny(ya(ya(ya(ya({}, M6e({ compact: r, size: c, withLeftIcon: o, withRightIcon: i })), e.fn.fontStyles()), e.fn.focusStyles()), B6e(n)), {
    borderRadius: e.fn.radius(t),
    fontWeight: 600,
    position: "relative",
    lineHeight: 1,
    fontSize: $t({ size: c, sizes: e.fontSizes }),
    userSelect: "none",
    cursor: "pointer"
  }), U6e({ variant: s, theme: e, color: a, gradient: l })), {
    "&:active": e.activeStyles,
    "&:disabled, &[data-disabled]": {
      borderColor: "transparent",
      backgroundColor: e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[2],
      color: e.colorScheme === "dark" ? e.colors.dark[6] : e.colors.gray[5],
      cursor: "not-allowed",
      backgroundImage: "none",
      pointerEvents: "none",
      "&:active": {
        transform: "none"
      }
    },
    "&[data-loading]": {
      pointerEvents: "none",
      "&::before": ny(ya({
        content: '""'
      }, e.fn.cover(be(-1))), {
        backgroundColor: e.colorScheme === "dark" ? e.fn.rgba(e.colors.dark[7], 0.5) : "rgba(255, 255, 255, .5)",
        borderRadius: e.fn.radius(t),
        cursor: "not-allowed"
      })
    }
  }),
  icon: {
    display: "flex",
    alignItems: "center"
  },
  leftIcon: {
    marginRight: e.spacing.xs
  },
  rightIcon: {
    marginLeft: e.spacing.xs
  },
  centerLoader: {
    position: "absolute",
    left: "50%",
    transform: "translateX(-50%)",
    opacity: 0.5
  },
  inner: {
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    height: "100%",
    overflow: "visible"
  },
  label: {
    whiteSpace: "nowrap",
    height: "100%",
    overflow: "hidden",
    display: "flex",
    alignItems: "center"
  }
})), W6e = Object.defineProperty, Pw = Object.getOwnPropertySymbols, PK = Object.prototype.hasOwnProperty, RK = Object.prototype.propertyIsEnumerable, aD = (e, t, n) => t in e ? W6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, lD = (e, t) => {
  for (var n in t || (t = {}))
    PK.call(t, n) && aD(e, n, t[n]);
  if (Pw)
    for (var n of Pw(t))
      RK.call(t, n) && aD(e, n, t[n]);
  return e;
}, V6e = (e, t) => {
  var n = {};
  for (var r in e)
    PK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Pw)
    for (var r of Pw(e))
      t.indexOf(r) < 0 && RK.call(e, r) && (n[r] = e[r]);
  return n;
};
const q6e = {
  size: "sm",
  type: "button",
  variant: "filled",
  loaderPosition: "left"
}, P2 = b.forwardRef((e, t) => {
  const n = en("Button", q6e, e), {
    className: r,
    size: o,
    color: i,
    type: a,
    disabled: l,
    children: s,
    leftIcon: c,
    rightIcon: p,
    fullWidth: f,
    variant: m,
    radius: h,
    uppercase: g,
    compact: v,
    loading: S,
    loaderPosition: w,
    loaderProps: x,
    gradient: k,
    classNames: E,
    styles: O,
    unstyled: C
  } = n, R = V6e(n, [
    "className",
    "size",
    "color",
    "type",
    "disabled",
    "children",
    "leftIcon",
    "rightIcon",
    "fullWidth",
    "variant",
    "radius",
    "uppercase",
    "compact",
    "loading",
    "loaderPosition",
    "loaderProps",
    "gradient",
    "classNames",
    "styles",
    "unstyled"
  ]), { classes: L, cx: D, theme: N } = H6e({
    radius: h,
    color: i,
    fullWidth: f,
    compact: v,
    gradient: k,
    withLeftIcon: !!c,
    withRightIcon: !!p
  }, { name: "Button", unstyled: C, classNames: E, styles: O, variant: m, size: o }), H = N.fn.variant({ color: i, variant: m }), B = /* @__PURE__ */ P.createElement(g2, lD({
    color: H.color,
    size: `calc(${$t({ size: o, sizes: RE }).height} / 2)`
  }, x));
  return /* @__PURE__ */ P.createElement(aG, lD({
    className: D(L.root, r),
    type: a,
    disabled: l,
    "data-button": !0,
    "data-disabled": l || void 0,
    "data-loading": S || void 0,
    ref: t,
    unstyled: C
  }, R), /* @__PURE__ */ P.createElement("div", {
    className: L.inner
  }, (c || S && w === "left") && /* @__PURE__ */ P.createElement("span", {
    className: D(L.icon, L.leftIcon)
  }, S && w === "left" ? B : c), S && w === "center" && /* @__PURE__ */ P.createElement("span", {
    className: L.centerLoader
  }, B), /* @__PURE__ */ P.createElement("span", {
    className: L.label,
    style: { textTransform: g ? "uppercase" : void 0 }
  }, s), (p || S && w === "right") && /* @__PURE__ */ P.createElement("span", {
    className: D(L.icon, L.rightIcon)
  }, S && w === "right" ? B : p)));
});
P2.displayName = "@mantine/core/Button";
P2.Group = CK;
const G6e = P2, K6e = {
  gap: { type: "spacing", property: "gap" },
  rowGap: { type: "spacing", property: "rowGap" },
  columnGap: { type: "spacing", property: "columnGap" },
  align: { type: "identity", property: "alignItems" },
  justify: { type: "identity", property: "justifyContent" },
  wrap: { type: "identity", property: "flexWrap" },
  direction: { type: "identity", property: "flexDirection" }
};
var Y6e = Object.defineProperty, X6e = Object.defineProperties, Z6e = Object.getOwnPropertyDescriptors, Rw = Object.getOwnPropertySymbols, TK = Object.prototype.hasOwnProperty, jK = Object.prototype.propertyIsEnumerable, sD = (e, t, n) => t in e ? Y6e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Q6e = (e, t) => {
  for (var n in t || (t = {}))
    TK.call(t, n) && sD(e, n, t[n]);
  if (Rw)
    for (var n of Rw(t))
      jK.call(t, n) && sD(e, n, t[n]);
  return e;
}, J6e = (e, t) => X6e(e, Z6e(t)), eMe = (e, t) => {
  var n = {};
  for (var r in e)
    TK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Rw)
    for (var r of Rw(e))
      t.indexOf(r) < 0 && jK.call(e, r) && (n[r] = e[r]);
  return n;
};
const tMe = {}, R2 = b.forwardRef((e, t) => {
  const n = en("Flex", tMe, e), { gap: r, rowGap: o, columnGap: i, align: a, justify: l, wrap: s, direction: c, sx: p } = n, f = eMe(n, ["gap", "rowGap", "columnGap", "align", "justify", "wrap", "direction", "sx"]);
  return /* @__PURE__ */ P.createElement(qo, J6e(Q6e({}, f), {
    sx: [
      { display: "flex" },
      (m) => _E({ gap: r, rowGap: o, columnGap: i, align: a, justify: l, wrap: s, direction: c }, m, K6e),
      ...xq(p)
    ],
    ref: t
  }));
});
R2.displayName = "@mantine/core/Flex";
const NK = {
  context: "HoverCard component was not found in the tree",
  children: "HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"
}, [nMe, $K] = wq(NK.context);
var rMe = Object.defineProperty, Tw = Object.getOwnPropertySymbols, IK = Object.prototype.hasOwnProperty, AK = Object.prototype.propertyIsEnumerable, uD = (e, t, n) => t in e ? rMe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, oMe = (e, t) => {
  for (var n in t || (t = {}))
    IK.call(t, n) && uD(e, n, t[n]);
  if (Tw)
    for (var n of Tw(t))
      AK.call(t, n) && uD(e, n, t[n]);
  return e;
}, iMe = (e, t) => {
  var n = {};
  for (var r in e)
    IK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Tw)
    for (var r of Tw(e))
      t.indexOf(r) < 0 && AK.call(e, r) && (n[r] = e[r]);
  return n;
};
const aMe = {};
function zK(e) {
  const t = en("HoverCardDropdown", aMe, e), { children: n, onMouseEnter: r, onMouseLeave: o } = t, i = iMe(t, ["children", "onMouseEnter", "onMouseLeave"]), a = $K(), l = Zb(r, a.openDropdown), s = Zb(o, a.closeDropdown);
  return /* @__PURE__ */ P.createElement(mf.Dropdown, oMe({
    onMouseEnter: l,
    onMouseLeave: s
  }, i), n);
}
zK.displayName = "@mantine/core/HoverCardDropdown";
var lMe = Object.defineProperty, jw = Object.getOwnPropertySymbols, LK = Object.prototype.hasOwnProperty, DK = Object.prototype.propertyIsEnumerable, cD = (e, t, n) => t in e ? lMe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, sMe = (e, t) => {
  for (var n in t || (t = {}))
    LK.call(t, n) && cD(e, n, t[n]);
  if (jw)
    for (var n of jw(t))
      DK.call(t, n) && cD(e, n, t[n]);
  return e;
}, uMe = (e, t) => {
  var n = {};
  for (var r in e)
    LK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && jw)
    for (var r of jw(e))
      t.indexOf(r) < 0 && DK.call(e, r) && (n[r] = e[r]);
  return n;
};
const cMe = {
  refProp: "ref"
}, FK = b.forwardRef((e, t) => {
  const n = en("HoverCardTarget", cMe, e), { children: r, refProp: o } = n, i = uMe(n, ["children", "refProp"]);
  if (!o2(r))
    throw new Error(NK.children);
  const a = $K(), l = Zb(r.props.onMouseEnter, a.openDropdown), s = Zb(r.props.onMouseLeave, a.closeDropdown);
  return /* @__PURE__ */ P.createElement(mf.Target, sMe({
    refProp: o,
    ref: t
  }, i), b.cloneElement(r, { onMouseEnter: l, onMouseLeave: s }));
});
FK.displayName = "@mantine/core/HoverCardTarget";
function fMe({ open: e, close: t, openDelay: n, closeDelay: r }) {
  const o = b.useRef(-1), i = b.useRef(-1), a = () => {
    window.clearTimeout(o.current), window.clearTimeout(i.current);
  }, l = () => {
    a(), n === 0 ? e() : o.current = window.setTimeout(e, n);
  }, s = () => {
    a(), r === 0 ? t() : i.current = window.setTimeout(t, r);
  };
  return b.useEffect(() => a, []), { openDropdown: l, closeDropdown: s };
}
var dMe = Object.defineProperty, Nw = Object.getOwnPropertySymbols, MK = Object.prototype.hasOwnProperty, BK = Object.prototype.propertyIsEnumerable, fD = (e, t, n) => t in e ? dMe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, pMe = (e, t) => {
  for (var n in t || (t = {}))
    MK.call(t, n) && fD(e, n, t[n]);
  if (Nw)
    for (var n of Nw(t))
      BK.call(t, n) && fD(e, n, t[n]);
  return e;
}, mMe = (e, t) => {
  var n = {};
  for (var r in e)
    MK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Nw)
    for (var r of Nw(e))
      t.indexOf(r) < 0 && BK.call(e, r) && (n[r] = e[r]);
  return n;
};
const hMe = {
  openDelay: 0,
  closeDelay: 150,
  initiallyOpened: !1
};
function bc(e) {
  const t = en("HoverCard", hMe, e), { children: n, onOpen: r, onClose: o, openDelay: i, closeDelay: a, initiallyOpened: l } = t, s = mMe(t, ["children", "onOpen", "onClose", "openDelay", "closeDelay", "initiallyOpened"]), [c, { open: p, close: f }] = Vze(l, { onClose: o, onOpen: r }), { openDropdown: m, closeDropdown: h } = fMe({ open: p, close: f, openDelay: i, closeDelay: a });
  return /* @__PURE__ */ P.createElement(nMe, {
    value: { openDropdown: m, closeDropdown: h }
  }, /* @__PURE__ */ P.createElement(mf, pMe({
    opened: c,
    __staticSelector: "HoverCard"
  }, s), n));
}
bc.displayName = "@mantine/core/HoverCard";
bc.Target = FK;
bc.Dropdown = zK;
var gMe = Object.defineProperty, yMe = Object.defineProperties, vMe = Object.getOwnPropertyDescriptors, $w = Object.getOwnPropertySymbols, UK = Object.prototype.hasOwnProperty, HK = Object.prototype.propertyIsEnumerable, dD = (e, t, n) => t in e ? gMe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, l0 = (e, t) => {
  for (var n in t || (t = {}))
    UK.call(t, n) && dD(e, n, t[n]);
  if ($w)
    for (var n of $w(t))
      HK.call(t, n) && dD(e, n, t[n]);
  return e;
}, bMe = (e, t) => yMe(e, vMe(t)), wMe = (e, t) => {
  var n = {};
  for (var r in e)
    UK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && $w)
    for (var r of $w(e))
      t.indexOf(r) < 0 && HK.call(e, r) && (n[r] = e[r]);
  return n;
};
const xMe = {
  type: "text",
  size: "sm",
  __staticSelector: "TextInput"
}, WK = b.forwardRef((e, t) => {
  const n = $Fe("TextInput", xMe, e), { inputProps: r, wrapperProps: o } = n, i = wMe(n, ["inputProps", "wrapperProps"]);
  return /* @__PURE__ */ P.createElement(nD.Wrapper, l0({}, o), /* @__PURE__ */ P.createElement(nD, bMe(l0(l0({}, r), i), {
    ref: t
  })));
});
WK.displayName = "@mantine/core/TextInput";
var VK = { exports: {} }, SMe = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", kMe = SMe, _Me = kMe;
function qK() {
}
function GK() {
}
GK.resetWarningCache = qK;
var OMe = function() {
  function e(r, o, i, a, l, s) {
    if (s !== _Me) {
      var c = new Error(
        "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
      );
      throw c.name = "Invariant Violation", c;
    }
  }
  e.isRequired = e;
  function t() {
    return e;
  }
  var n = {
    array: e,
    bigint: e,
    bool: e,
    func: e,
    number: e,
    object: e,
    string: e,
    symbol: e,
    any: e,
    arrayOf: t,
    element: e,
    elementType: e,
    instanceOf: t,
    node: e,
    objectOf: t,
    oneOf: t,
    oneOfType: t,
    shape: t,
    exact: t,
    checkPropTypes: GK,
    resetWarningCache: qK
  };
  return n.PropTypes = n, n;
};
VK.exports = OMe();
var EMe = VK.exports;
const cs = /* @__PURE__ */ BE(EMe);
var CMe = {
  xmlns: "http://www.w3.org/2000/svg",
  width: 24,
  height: 24,
  viewBox: "0 0 24 24",
  fill: "none",
  stroke: "currentColor",
  strokeWidth: 2,
  strokeLinecap: "round",
  strokeLinejoin: "round"
}, PMe = Object.defineProperty, RMe = Object.defineProperties, TMe = Object.getOwnPropertyDescriptors, Iw = Object.getOwnPropertySymbols, KK = Object.prototype.hasOwnProperty, YK = Object.prototype.propertyIsEnumerable, pD = (e, t, n) => t in e ? PMe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, mD = (e, t) => {
  for (var n in t || (t = {}))
    KK.call(t, n) && pD(e, n, t[n]);
  if (Iw)
    for (var n of Iw(t))
      YK.call(t, n) && pD(e, n, t[n]);
  return e;
}, jMe = (e, t) => RMe(e, TMe(t)), NMe = (e, t) => {
  var n = {};
  for (var r in e)
    KK.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
  if (e != null && Iw)
    for (var r of Iw(e))
      t.indexOf(r) < 0 && YK.call(e, r) && (n[r] = e[r]);
  return n;
}, $Me = (e, t, n) => {
  const r = b.forwardRef(
    (o, i) => {
      var a = o, { color: l = "currentColor", size: s = 24, stroke: c = 2, children: p } = a, f = NMe(a, ["color", "size", "stroke", "children"]);
      return b.createElement(
        "svg",
        mD(jMe(mD({
          ref: i
        }, CMe), {
          width: s,
          height: s,
          stroke: l,
          strokeWidth: c,
          className: `tabler-icon tabler-icon-${e}`
        }), f),
        [...n.map(([m, h]) => b.createElement(m, h)), ...p || []]
      );
    }
  );
  return r.propTypes = {
    color: cs.string,
    size: cs.oneOfType([cs.string, cs.number]),
    stroke: cs.oneOfType([cs.string, cs.number])
  }, r.displayName = `${t}`, r;
}, IMe = $Me("info-circle", "IconInfoCircle", [
  ["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }],
  ["path", { d: "M12 9h.01", key: "svg-1" }],
  ["path", { d: "M11 12h1v4h1", key: "svg-2" }]
]);
const AMe = Cr((e) => ({
  // Override gradio styles, using original mantine border styles
  hoverCard: {
    border: `0.0625rem solid ${e.colorScheme === "light" ? "#e9ecef" : "#373A40"} !important`
  },
  // Override gradio styles, using original mantine link styles
  link: {
    color: `${e.colorScheme === "dark" ? e.colors.blue[4] : e.primaryColor} !important`
  }
}));
function TE(e) {
  return e.startsWith("hf_");
}
function zMe(e) {
  return e.length > 0 && !TE(e) ? "Invalid token. Tokens must begin with hf_" : null;
}
const LMe = b.memo(function(t) {
  const [n, r] = b.useState(""), [o, i] = b.useState(""), a = async () => {
    o.length > 0 && !TE(o) || (await t.onSetToken(o), r(o));
  }, { classes: l } = AMe();
  return /* @__PURE__ */ Pn.jsxs(R2, { align: "center", justify: "flex-end", gap: "sm", children: [
    /* @__PURE__ */ Pn.jsx(
      WK,
      {
        className: "hfTokenInput",
        placeholder: "Enter your HF Token",
        type: "password",
        value: o,
        onChange: (s) => i(s.currentTarget.value),
        error: zMe(o),
        rightSection: (
          // Delay so it's not shown when quickly moving mouse from input to button
          /* @__PURE__ */ Pn.jsxs(bc, { openDelay: 300, withArrow: !0, children: [
            /* @__PURE__ */ Pn.jsx(bc.Target, { children: /* @__PURE__ */ Pn.jsx(IMe, { size: 16 }) }),
            /* @__PURE__ */ Pn.jsx(bc.Dropdown, { className: l.hoverCard, children: /* @__PURE__ */ Pn.jsxs(Xp, { size: "sm", children: [
              /* @__PURE__ */ Pn.jsx(
                EE,
                {
                  href: "https://huggingface.co/settings/tokens",
                  target: "_blank",
                  className: l.link,
                  children: "Hugging Face API token"
                }
              ),
              " ",
              "used for model inference"
            ] }) })
          ] })
        )
      }
    ),
    /* @__PURE__ */ Pn.jsx(
      G6e,
      {
        onClick: a,
        disabled: (
          // Allow clearing token (set to empty after previously submitting a token)
          o.length === 0 && n.length === 0 || o.length > 0 && !TE(o)
        ),
        children: "Set HF Token"
      }
    )
  ] });
}), DMe = Cr((e) => ({
  link: {
    color: `${e.colorScheme === "dark" ? e.colors.blue[4] : e.primaryColor} !important`
  }
})), FMe = b.memo(function() {
  const { classes: t } = DMe(), [n, r] = b.useState(!0);
  return /* @__PURE__ */ Pn.jsx(
    NG,
    {
      color: "blue",
      hidden: !n,
      mb: "8px",
      onClose: () => r(!1),
      withCloseButton: !0,
      children: /* @__PURE__ */ Pn.jsxs(Xp, { children: [
        "This is a",
        " ",
        /* @__PURE__ */ Pn.jsx(
          EE,
          {
            href: "https://aiconfig.lastmileai.dev/docs/gradio-notebook",
            target: "_blank",
            className: t.link,
            children: "Gradio Notebook"
          }
        ),
        " ",
        "space.",
        " ",
        /* @__PURE__ */ Pn.jsx(
          EE,
          {
            href: "https://huggingface.co/docs/hub/en/spaces-overview#duplicating-a-space",
            target: "_blank",
            className: t.link,
            children: "Duplicate"
          }
        ),
        " ",
        "the space to build your own!"
      ] })
    }
  );
});
var Fo = {
  log: "log",
  debug: "debug",
  info: "info",
  warn: "warn",
  error: "error"
}, Mi = console, ks = {};
Object.keys(Fo).forEach(function(e) {
  ks[e] = Mi[e];
});
var cd = "Datadog Browser SDK:", ur = {
  debug: ks.debug.bind(Mi, cd),
  log: ks.log.bind(Mi, cd),
  info: ks.info.bind(Mi, cd),
  warn: ks.warn.bind(Mi, cd),
  error: ks.error.bind(Mi, cd)
};
function XK(e, t) {
  return function() {
    for (var n = [], r = 0; r < arguments.length; r++)
      n[r] = arguments[r];
    try {
      return e.apply(void 0, n);
    } catch (o) {
      ur.error(t, o);
    }
  };
}
var Op;
(function(e) {
  e.PAGEHIDE = "pagehide", e.FEATURE_FLAGS = "feature_flags", e.RESOURCE_PAGE_STATES = "resource_page_states", e.COLLECT_FLUSH_REASON = "collect_flush_reason", e.ZERO_LCP_TELEMETRY = "zero_lcp_telemetry", e.DISABLE_REPLAY_INLINE_CSS = "disable_replay_inline_css", e.WRITABLE_RESOURCE_GRAPHQL = "writable_resource_graphql";
})(Op || (Op = {}));
var T2 = /* @__PURE__ */ new Set();
function MMe(e) {
  e.forEach(function(t) {
    T2.add(t);
  });
}
function ZK(e) {
  return T2.has(e);
}
function BMe() {
  return T2;
}
function jE(e) {
  return e !== 0 && Math.random() * 100 <= e;
}
function s0(e) {
  return UMe(e) && e >= 0 && e <= 100;
}
function UMe(e) {
  return typeof e == "number";
}
var Qp = 1e3, ou = 60 * Qp, HMe = 60 * ou;
function Hd() {
  return (/* @__PURE__ */ new Date()).getTime();
}
function Yl() {
  return Hd();
}
function Aw() {
  return performance.now();
}
function hf() {
  return { relative: Aw(), timeStamp: Yl() };
}
function WMe() {
  return { relative: 0, timeStamp: QK() };
}
function VMe(e, t) {
  return t - e;
}
function qMe(e, t) {
  return e + t;
}
function GMe(e) {
  return e - QK();
}
var u0;
function QK() {
  return u0 === void 0 && (u0 = performance.timing.navigationStart), u0;
}
var Ia = 1024, JK = 1024 * Ia, KMe = /[^\u0000-\u007F]/;
function j2(e) {
  return KMe.test(e) ? window.TextEncoder !== void 0 ? new TextEncoder().encode(e).length : new Blob([e]).size : e.length;
}
function gf(e, t) {
  return e.indexOf(t) !== -1;
}
function eY(e) {
  if (Array.from)
    return Array.from(e);
  var t = [];
  if (e instanceof Set)
    e.forEach(function(r) {
      return t.push(r);
    });
  else
    for (var n = 0; n < e.length; n++)
      t.push(e[n]);
  return t;
}
function YMe(e, t) {
  for (var n = 0; n < e.length; n += 1) {
    var r = e[n];
    if (t(r, n))
      return r;
  }
}
function Fc(e) {
  return Object.keys(e).map(function(t) {
    return e[t];
  });
}
function XMe(e) {
  return Object.keys(e).map(function(t) {
    return [t, e[t]];
  });
}
function tY(e, t) {
  return e.slice(0, t.length) === t;
}
function ZMe(e, t) {
  return e.slice(-t.length) === t;
}
function wo(e) {
  for (var t = [], n = 1; n < arguments.length; n++)
    t[n - 1] = arguments[n];
  return t.forEach(function(r) {
    for (var o in r)
      Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o]);
  }), e;
}
function QMe(e) {
  return wo({}, e);
}
function JMe(e, t) {
  return Object.keys(e).some(function(n) {
    return e[n] === t;
  });
}
function N2(e) {
  return Object.keys(e).length === 0;
}
function Xl() {
  if (typeof globalThis == "object")
    return globalThis;
  Object.defineProperty(Object.prototype, "_dd_temp_", {
    get: function() {
      return this;
    },
    configurable: !0
  });
  var e = _dd_temp_;
  return delete Object.prototype._dd_temp_, typeof e != "object" && (typeof self == "object" ? e = self : typeof window == "object" ? e = window : e = {}), e;
}
function Mc(e, t) {
  var n = Xl(), r;
  return n.Zone && typeof n.Zone.__symbol__ == "function" && (r = e[n.Zone.__symbol__(t)]), r || (r = e[t]), r;
}
var e9e = function(e, t, n) {
  if (n || arguments.length === 2)
    for (var r = 0, o = t.length, i; r < o; r++)
      (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
  return e.concat(i || Array.prototype.slice.call(t));
}, zw, nY = !1;
function t9e(e) {
  zw = e;
}
function n9e(e) {
  nY = e;
}
function r9e(e, t, n) {
  var r = n.value;
  n.value = function() {
    for (var o = [], i = 0; i < arguments.length; i++)
      o[i] = arguments[i];
    var a = zw ? zt(r) : r;
    return a.apply(this, o);
  };
}
function zt(e) {
  return function() {
    return Ep(e, this, arguments);
  };
}
function Ep(e, t, n) {
  try {
    return e.apply(t, n);
  } catch (r) {
    if (NE(r), zw)
      try {
        zw(r);
      } catch (o) {
        NE(o);
      }
  }
}
function NE() {
  for (var e = [], t = 0; t < arguments.length; t++)
    e[t] = arguments[t];
  nY && ur.error.apply(ur, e9e(["[MONITOR]"], e, !1));
}
function Jp(e, t) {
  return Mc(Xl(), "setTimeout")(zt(e), t);
}
function rY(e) {
  Mc(Xl(), "clearTimeout")(e);
}
function $2(e, t) {
  return Mc(Xl(), "setInterval")(zt(e), t);
}
function oY(e) {
  Mc(Xl(), "clearInterval")(e);
}
var Vr = (
  /** @class */
  function() {
    function e(t) {
      this.onFirstSubscribe = t, this.observers = [];
    }
    return e.prototype.subscribe = function(t) {
      var n = this;
      return !this.observers.length && this.onFirstSubscribe && (this.onLastUnsubscribe = this.onFirstSubscribe(this) || void 0), this.observers.push(t), {
        unsubscribe: function() {
          n.observers = n.observers.filter(function(r) {
            return t !== r;
          }), !n.observers.length && n.onLastUnsubscribe && n.onLastUnsubscribe();
        }
      };
    }, e.prototype.notify = function(t) {
      this.observers.forEach(function(n) {
        return n(t);
      });
    }, e;
  }()
);
function iY() {
  for (var e = [], t = 0; t < arguments.length; t++)
    e[t] = arguments[t];
  return new Vr(function(n) {
    var r = e.map(function(o) {
      return o.subscribe(function(i) {
        return n.notify(i);
      });
    });
    return function() {
      return r.forEach(function(o) {
        return o.unsubscribe();
      });
    };
  });
}
function aY(e, t, n) {
  var r = n && n.leading !== void 0 ? n.leading : !0, o = n && n.trailing !== void 0 ? n.trailing : !0, i = !1, a, l;
  return {
    throttled: function() {
      for (var s = [], c = 0; c < arguments.length; c++)
        s[c] = arguments[c];
      if (i) {
        a = s;
        return;
      }
      r ? e.apply(void 0, s) : a = s, i = !0, l = Jp(function() {
        o && a && e.apply(void 0, a), i = !1, a = void 0;
      }, t);
    },
    cancel: function() {
      rY(l), i = !1, a = void 0;
    }
  };
}
function em() {
}
function iu(e) {
  return e ? (
    // eslint-disable-next-line  no-bitwise
    (parseInt(e, 10) ^ Math.random() * 16 >> parseInt(e, 10) / 4).toString(16)
  ) : "".concat(1e7, "-").concat(1e3, "-").concat(4e3, "-").concat(8e3, "-").concat(1e11).replace(/[018]/g, iu);
}
var Lw = /([\w-]+)\s*=\s*([^;]+)/g;
function o9e(e, t) {
  for (Lw.lastIndex = 0; ; ) {
    var n = Lw.exec(e);
    if (n) {
      if (n[1] === t)
        return n[2];
    } else
      break;
  }
}
function i9e(e) {
  var t = /* @__PURE__ */ new Map();
  for (Lw.lastIndex = 0; ; ) {
    var n = Lw.exec(e);
    if (n)
      t.set(n[1], n[2]);
    else
      break;
  }
  return t;
}
function a9e(e, t, n) {
  n === void 0 && (n = "");
  var r = e.charCodeAt(t - 1), o = r >= 55296 && r <= 56319, i = o ? t + 1 : t;
  return e.length <= i ? e : "".concat(e.slice(0, i)).concat(n);
}
var lY = 4 * HMe, sY = 15 * ou;
function l9e() {
  return s9e() === 1;
}
var ig;
function s9e() {
  return ig ?? (ig = u9e());
}
function u9e(e) {
  var t;
  e === void 0 && (e = window);
  var n = e.navigator.userAgent;
  return e.chrome || /HeadlessChrome/.test(n) ? 1 : (
    // navigator.vendor is deprecated, but it is the most resilient way we found to detect
    // "Apple maintained browsers" (AKA Safari). If one day it gets removed, we still have the
    // useragent test as a semi-working fallback.
    ((t = e.navigator.vendor) === null || t === void 0 ? void 0 : t.indexOf("Apple")) === 0 || /safari/i.test(n) && !/chrome|android/i.test(n) ? 2 : e.document.documentMode ? 0 : 3
  );
}
function Jx(e, t, n, r) {
  var o = /* @__PURE__ */ new Date();
  o.setTime(o.getTime() + n);
  var i = "expires=".concat(o.toUTCString()), a = r && r.crossSite ? "none" : "strict", l = r && r.domain ? ";domain=".concat(r.domain) : "", s = r && r.secure ? ";secure" : "", c = r && r.partitioned ? ";partitioned" : "";
  document.cookie = "".concat(e, "=").concat(t, ";").concat(i, ";path=/;samesite=").concat(a).concat(l).concat(s).concat(c);
}
function I2(e) {
  return o9e(document.cookie, e);
}
var c0;
function Ts(e) {
  return c0 || (c0 = i9e(document.cookie)), c0.get(e);
}
function A2(e, t) {
  Jx(e, "", 0, t);
}
function c9e(e) {
  if (document.cookie === void 0 || document.cookie === null)
    return !1;
  try {
    var t = "dd_cookie_test_".concat(iu()), n = "test";
    Jx(t, n, ou, e);
    var r = I2(t) === n;
    return A2(t, e), r;
  } catch (o) {
    return ur.error(o), !1;
  }
}
var f0;
function f9e() {
  if (f0 === void 0) {
    for (var e = "dd_site_test_".concat(iu()), t = "test", n = window.location.hostname.split("."), r = n.pop(); n.length && !I2(e); )
      r = "".concat(n.pop(), ".").concat(r), Jx(e, t, Qp, { domain: r });
    A2(e, { domain: r }), f0 = r;
  }
  return f0;
}
var au = "_dd_s", uY = /^([a-z]+)=([a-z0-9-]+)$/, z2 = "&";
function $E(e) {
  return N2(e);
}
function cY(e) {
  e.expire = String(Hd() + sY);
}
function fY(e) {
  return XMe(e).map(function(t) {
    var n = t[0], r = t[1];
    return "".concat(n, "=").concat(r);
  }).join(z2);
}
function dY(e) {
  var t = {};
  return d9e(e) && e.split(z2).forEach(function(n) {
    var r = uY.exec(n);
    if (r !== null) {
      var o = r[1], i = r[2];
      t[o] = i;
    }
  }), t;
}
function d9e(e) {
  return !!e && (e.indexOf(z2) !== -1 || uY.test(e));
}
var p9e = "_dd", m9e = "_dd_r", h9e = "_dd_l", g9e = "rum", y9e = "logs";
function v9e(e) {
  var t = Ts(au);
  if (!t) {
    var n = Ts(p9e), r = Ts(m9e), o = Ts(h9e), i = {};
    n && (i.id = n), o && /^[01]$/.test(o) && (i[y9e] = o), r && /^[012]$/.test(r) && (i[g9e] = r), $E(i) || (cY(i), e.persistSession(i));
  }
}
function b9e(e) {
  var t = _9e(e);
  return c9e(t) ? { type: "Cookie", cookieOptions: t } : void 0;
}
function w9e(e) {
  var t = {
    /**
     * Lock strategy allows mitigating issues due to concurrent access to cookie.
     * This issue concerns only chromium browsers and enabling this on firefox increases cookie write failures.
     */
    isLockEnabled: l9e(),
    persistSession: x9e(e),
    retrieveSession: S9e,
    clearSession: k9e(e)
  };
  return v9e(t), t;
}
function x9e(e) {
  return function(t) {
    Jx(au, fY(t), sY, e);
  };
}
function S9e() {
  var e = I2(au);
  return dY(e);
}
function k9e(e) {
  return function() {
    A2(au, e);
  };
}
function _9e(e) {
  var t = {};
  return t.secure = !!e.useSecureSessionCookie || !!e.usePartitionedCrossSiteSessionCookie || !!e.useCrossSiteSessionCookie, t.crossSite = !!e.usePartitionedCrossSiteSessionCookie || !!e.useCrossSiteSessionCookie, t.partitioned = !!e.usePartitionedCrossSiteSessionCookie, e.trackSessionAcrossSubdomains && (t.domain = f9e()), t;
}
var O9e = "_dd_test_";
function E9e() {
  try {
    var e = iu(), t = "".concat(O9e).concat(e);
    localStorage.setItem(t, e);
    var n = localStorage.getItem(t);
    return localStorage.removeItem(t), e === n ? { type: "LocalStorage" } : void 0;
  } catch {
    return;
  }
}
function C9e() {
  return {
    isLockEnabled: !1,
    persistSession: P9e,
    retrieveSession: R9e,
    clearSession: T9e
  };
}
function P9e(e) {
  localStorage.setItem(au, fY(e));
}
function R9e() {
  var e = localStorage.getItem(au);
  return dY(e);
}
function T9e() {
  localStorage.removeItem(au);
}
var j9e = 10, N9e = 100, pY = [], ry;
function Wd(e, t, n) {
  var r;
  n === void 0 && (n = 0);
  var o = t.isLockEnabled, i = t.retrieveSession, a = t.persistSession, l = t.clearSession;
  if (ry || (ry = e), e !== ry) {
    pY.push(e);
    return;
  }
  if (o && n >= N9e) {
    hD(t);
    return;
  }
  var s, c = i();
  if (o) {
    if (c.lock) {
      ag(e, t, n);
      return;
    }
    if (s = iu(), c.lock = s, a(c), c = i(), c.lock !== s) {
      ag(e, t, n);
      return;
    }
  }
  var p = e.process(c);
  if (o && (c = i(), c.lock !== s)) {
    ag(e, t, n);
    return;
  }
  if (p && ($E(p) ? l() : (cY(p), a(p))), o && !(p && $E(p))) {
    if (c = i(), c.lock !== s) {
      ag(e, t, n);
      return;
    }
    delete c.lock, a(c), p = c;
  }
  (r = e.after) === null || r === void 0 || r.call(e, p || c), hD(t);
}
function ag(e, t, n) {
  Jp(function() {
    Wd(e, t, n + 1);
  }, j9e);
}
function hD(e) {
  ry = void 0;
  var t = pY.shift();
  t && Wd(t, e);
}
var gD = Qp;
function $9e(e) {
  var t = b9e(e);
  return !t && e.allowFallbackToLocalStorage && (t = E9e()), t;
}
function I9e(e, t, n) {
  var r = new Vr(), o = new Vr(), i = e.type === "Cookie" ? w9e(e.cookieOptions) : C9e(), a = i.clearSession, l = i.retrieveSession, s = $2(m, gD), c = k();
  function p() {
    var O;
    Wd({
      process: function(C) {
        var R = h(C);
        return O = g(R), R;
      },
      after: function(C) {
        O && !v() && x(C), c = C;
      }
    }, i);
  }
  function f() {
    Wd({
      process: function(O) {
        return v() ? h(O) : void 0;
      }
    }, i);
  }
  function m() {
    Wd({
      process: function(O) {
        return E(O) ? void 0 : {};
      },
      after: h
    }, i);
  }
  function h(O) {
    return E(O) || (O = {}), v() && (S(O) ? w() : c = O), O;
  }
  function g(O) {
    var C = n(O[t]), R = C.trackingType, L = C.isTracked;
    return O[t] = R, L && !O.id && (O.id = iu(), O.created = String(Hd())), L;
  }
  function v() {
    return c[t] !== void 0;
  }
  function S(O) {
    return c.id !== O.id || c[t] !== O[t];
  }
  function w() {
    c = {}, o.notify();
  }
  function x(O) {
    c = O, r.notify();
  }
  function k() {
    var O = l();
    return E(O) ? O : {};
  }
  function E(O) {
    return (O.created === void 0 || Hd() - Number(O.created) < lY) && (O.expire === void 0 || Hd() < Number(O.expire));
  }
  return {
    expandOrRenewSession: aY(p, gD).throttled,
    expandSession: f,
    getSession: function() {
      return c;
    },
    renewObservable: r,
    expireObservable: o,
    expire: function() {
      a(), h({});
    },
    stop: function() {
      oY(s);
    }
  };
}
function yf(e, t, n) {
  if (typeof e != "object" || e === null)
    return JSON.stringify(e);
  var r = oc(Object.prototype), o = oc(Array.prototype), i = oc(Object.getPrototypeOf(e)), a = oc(e);
  try {
    return JSON.stringify(e, t, n);
  } catch {
    return "<error: unable to serialize object>";
  } finally {
    r(), o(), i(), a();
  }
}
function oc(e) {
  var t = e, n = t.toJSON;
  return n ? (delete t.toJSON, function() {
    t.toJSON = n;
  }) : em;
}
function L2(e) {
  return A9e(e, L9e()).href;
}
function A9e(e, t) {
  var n = z9e();
  if (n)
    try {
      return t !== void 0 ? new n(e, t) : new n(e);
    } catch (a) {
      throw new Error("Failed to construct URL: ".concat(String(a), " ").concat(yf({ url: e, base: t })));
    }
  if (t === void 0 && !/:/.test(e))
    throw new Error("Invalid URL: '".concat(e, "'"));
  var r = document, o = r.createElement("a");
  if (t !== void 0) {
    r = document.implementation.createHTMLDocument("");
    var i = r.createElement("base");
    i.href = t, r.head.appendChild(i), r.body.appendChild(o);
  }
  return o.href = e, o;
}
var yD = URL, lg;
function z9e() {
  if (lg === void 0)
    try {
      var e = new yD("http://test/path");
      lg = e.href === "http://test/path";
    } catch {
      lg = !1;
    }
  return lg ? yD : void 0;
}
function L9e() {
  return D9e(window.location);
}
function D9e(e) {
  if (e.origin && e.origin !== "null")
    return e.origin;
  var t = e.host.replace(/(:80|:443)$/, "");
  return "".concat(e.protocol, "//").concat(t);
}
var F9e = "datad0g.com", M9e = "dd0g-gov.com", Vd = "datadoghq.com", B9e = "ddog-gov.com";
function qd(e, t, n) {
  var r = U9e(e, t);
  return {
    build: function(o, i) {
      var a = W9e(e, t, n, o, i);
      return r(a);
    },
    urlPrefix: r(""),
    trackType: t
  };
}
function U9e(e, t) {
  var n = "/api/v2/".concat(t), r = e.proxy;
  if (typeof r == "string") {
    var o = L2(r);
    return function(a) {
      return "".concat(o, "?ddforward=").concat(encodeURIComponent("".concat(n, "?").concat(a)));
    };
  }
  if (typeof r == "function")
    return function(a) {
      return r({ path: n, parameters: a });
    };
  var i = H9e(e);
  return function(a) {
    return "https://".concat(i).concat(n, "?").concat(a);
  };
}
function H9e(e) {
  var t = e.site, n = t === void 0 ? Vd : t, r = e.internalAnalyticsSubdomain;
  if (r && n === Vd)
    return "".concat(r, ".").concat(Vd);
  if (n === M9e)
    return "http-intake.logs.".concat(n);
  var o = n.split("."), i = o.pop();
  return "browser-intake-".concat(o.join("-"), ".").concat(i);
}
function W9e(e, t, n, r, o) {
  var i = e.clientToken, a = e.internalAnalyticsSubdomain, l = o.retry, s = o.flushReason, c = o.encoding, p = ["sdk_version:".concat("5.8.0"), "api:".concat(r)].concat(n);
  s && ZK(Op.COLLECT_FLUSH_REASON) && p.push("flush_reason:".concat(s)), l && p.push("retry_count:".concat(l.count), "retry_after:".concat(l.lastFailureStatus));
  var f = [
    "ddsource=browser",
    "ddtags=".concat(encodeURIComponent(p.join(","))),
    "dd-api-key=".concat(i),
    "dd-evp-origin-version=".concat(encodeURIComponent("5.8.0")),
    "dd-evp-origin=browser",
    "dd-request-id=".concat(iu())
  ];
  return c && f.push("dd-evp-encoding=".concat(c)), t === "rum" && f.push("batch_time=".concat(Yl())), a && f.reverse(), f.join("&");
}
var V9e = 200;
function q9e(e) {
  var t = e.env, n = e.service, r = e.version, o = e.datacenter, i = [];
  return t && i.push(sg("env", t)), n && i.push(sg("service", n)), r && i.push(sg("version", r)), o && i.push(sg("datacenter", o)), i;
}
var G9e = /[^a-z0-9_:./-]/;
function sg(e, t) {
  var n = V9e - e.length - 1;
  (t.length > n || G9e.test(t)) && ur.warn("".concat(e, " value doesn't meet tag requirements and will be sanitized"));
  var r = t.replace(/,/g, "_");
  return "".concat(e, ":").concat(r);
}
function K9e(e) {
  var t = q9e(e), n = Y9e(e, t), r = Fc(n).map(function(i) {
    return i.urlPrefix;
  }), o = X9e(e, r, t);
  return wo({
    isIntakeUrl: function(i) {
      return r.some(function(a) {
        return i.indexOf(a) === 0;
      });
    },
    replica: o,
    site: e.site || Vd
  }, n);
}
function Y9e(e, t) {
  return {
    logsEndpointBuilder: qd(e, "logs", t),
    rumEndpointBuilder: qd(e, "rum", t),
    sessionReplayEndpointBuilder: qd(e, "replay", t)
  };
}
function X9e(e, t, n) {
  if (e.replica) {
    var r = wo({}, e, {
      site: Vd,
      clientToken: e.replica.clientToken
    }), o = {
      logsEndpointBuilder: qd(r, "logs", n),
      rumEndpointBuilder: qd(r, "rum", n)
    };
    return t.push.apply(t, Fc(o).map(function(i) {
      return i.urlPrefix;
    })), wo({ applicationId: e.replica.applicationId }, o);
  }
}
function Z9e(e) {
  var t, n, r;
  if (!e || !e.clientToken) {
    ur.error("Client Token is not configured, we will not send any data.");
    return;
  }
  if (e.sessionSampleRate !== void 0 && !s0(e.sessionSampleRate)) {
    ur.error("Session Sample Rate should be a number between 0 and 100");
    return;
  }
  if (e.telemetrySampleRate !== void 0 && !s0(e.telemetrySampleRate)) {
    ur.error("Telemetry Sample Rate should be a number between 0 and 100");
    return;
  }
  if (e.telemetryConfigurationSampleRate !== void 0 && !s0(e.telemetryConfigurationSampleRate)) {
    ur.error("Telemetry Configuration Sample Rate should be a number between 0 and 100");
    return;
  }
  return Array.isArray(e.enableExperimentalFeatures) && MMe(e.enableExperimentalFeatures.filter(function(o) {
    return JMe(Op, o);
  })), wo({
    beforeSend: e.beforeSend && XK(e.beforeSend, "beforeSend threw an error:"),
    sessionStoreStrategyType: $9e(e),
    sessionSampleRate: (t = e.sessionSampleRate) !== null && t !== void 0 ? t : 100,
    telemetrySampleRate: (n = e.telemetrySampleRate) !== null && n !== void 0 ? n : 20,
    telemetryConfigurationSampleRate: (r = e.telemetryConfigurationSampleRate) !== null && r !== void 0 ? r : 5,
    service: e.service,
    silentMultipleInit: !!e.silentMultipleInit,
    allowUntrustedEvents: !!e.allowUntrustedEvents,
    /**
     * beacon payload max queue size implementation is 64kb
     * ensure that we leave room for logs, rum and potential other users
     */
    batchBytesLimit: 16 * Ia,
    eventRateLimiterThreshold: 3e3,
    maxTelemetryEventsPerPage: 15,
    /**
     * flush automatically, aim to be lower than ALB connection timeout
     * to maximize connection reuse.
     */
    flushTimeout: 30 * Qp,
    /**
     * Logs intake limit
     */
    batchMessagesLimit: 50,
    messageBytesLimit: 256 * Ia
  }, K9e(e));
}
function Q9e(e) {
  return {
    session_sample_rate: e.sessionSampleRate,
    telemetry_sample_rate: e.telemetrySampleRate,
    telemetry_configuration_sample_rate: e.telemetryConfigurationSampleRate,
    use_before_send: !!e.beforeSend,
    use_cross_site_session_cookie: e.useCrossSiteSessionCookie,
    use_partitioned_cross_site_session_cookie: e.usePartitionedCrossSiteSessionCookie,
    use_secure_session_cookie: e.useSecureSessionCookie,
    use_proxy: !!e.proxy,
    silent_multiple_init: e.silentMultipleInit,
    track_session_across_subdomains: e.trackSessionAcrossSubdomains,
    allow_fallback_to_local_storage: !!e.allowFallbackToLocalStorage,
    store_contexts_across_pages: !!e.storeContextsAcrossPages,
    allow_untrusted_events: !!e.allowUntrustedEvents
  };
}
function zs(e, t, n) {
  var r = e[t], o = J9e(r, n), i = function() {
    if (typeof o == "function")
      return o.apply(this, arguments);
  };
  return e[t] = i, {
    stop: function() {
      e[t] === i ? e[t] = r : o = r;
    }
  };
}
function J9e(e, t) {
  return function() {
    var n = arguments, r, o;
    return Ep(t, null, [
      {
        target: this,
        parameters: n,
        onPostCall: function(i) {
          o = i;
        }
      }
    ]), typeof e == "function" && (r = e.apply(this, n)), o && Ep(o, null, [r]), r;
  };
}
var tm = "?";
function qa(e) {
  var t = [], n = d0(e, "stack"), r = String(e);
  return n && tY(n, r) && (n = n.slice(r.length)), n && n.split(`
`).forEach(function(o) {
    var i = n8e(o) || o8e(o) || a8e(o) || u8e(o);
    i && (!i.func && i.line && (i.func = tm), t.push(i));
  }), {
    message: d0(e, "message"),
    name: d0(e, "name"),
    stack: t
  };
}
var mY = "((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)", Bc = "(?::(\\d+))", e8e = new RegExp("^\\s*at (.*?) ?\\(".concat(mY).concat(Bc, "?").concat(Bc, "?\\)?\\s*$"), "i"), t8e = new RegExp("\\((\\S*)".concat(Bc).concat(Bc, "\\)"));
function n8e(e) {
  var t = e8e.exec(e);
  if (t) {
    var n = t[2] && t[2].indexOf("native") === 0, r = t[2] && t[2].indexOf("eval") === 0, o = t8e.exec(t[2]);
    return r && o && (t[2] = o[1], t[3] = o[2], t[4] = o[3]), {
      args: n ? [t[2]] : [],
      column: t[4] ? +t[4] : void 0,
      func: t[1] || tm,
      line: t[3] ? +t[3] : void 0,
      url: n ? void 0 : t[2]
    };
  }
}
var r8e = new RegExp("^\\s*at ?".concat(mY).concat(Bc, "?").concat(Bc, "??\\s*$"), "i");
function o8e(e) {
  var t = r8e.exec(e);
  if (t)
    return {
      args: [],
      column: t[3] ? +t[3] : void 0,
      func: tm,
      line: t[2] ? +t[2] : void 0,
      url: t[1]
    };
}
var i8e = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
function a8e(e) {
  var t = i8e.exec(e);
  if (t)
    return {
      args: [],
      column: t[4] ? +t[4] : void 0,
      func: t[1] || tm,
      line: +t[3],
      url: t[2]
    };
}
var l8e = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i, s8e = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
function u8e(e) {
  var t = l8e.exec(e);
  if (t) {
    var n = t[3] && t[3].indexOf(" > eval") > -1, r = s8e.exec(t[3]);
    return n && r && (t[3] = r[1], t[4] = r[2], t[5] = void 0), {
      args: t[2] ? t[2].split(",") : [],
      column: t[5] ? +t[5] : void 0,
      func: t[1] || tm,
      line: t[4] ? +t[4] : void 0,
      url: t[3]
    };
  }
}
function d0(e, t) {
  if (!(typeof e != "object" || !e || !(t in e))) {
    var n = e[t];
    return typeof n == "string" ? n : void 0;
  }
}
function c8e(e, t, n, r) {
  var o = [{ url: t, column: r, line: n }], i = d8e(e), a = i.name, l = i.message;
  return {
    name: a,
    message: l,
    stack: o
  };
}
var f8e = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;
function d8e(e) {
  var t, n, r;
  return {}.toString.call(e) === "[object String]" && (t = f8e.exec(e), n = t[1], r = t[2]), { name: n, message: r };
}
var p8e = 220 * Ia, m8e = "$", h8e = 3;
function Aa(e, t) {
  var n;
  t === void 0 && (t = p8e);
  var r = oc(Object.prototype), o = oc(Array.prototype), i = [], a = /* @__PURE__ */ new WeakMap(), l = p0(e, m8e, void 0, i, a), s = ((n = JSON.stringify(l)) === null || n === void 0 ? void 0 : n.length) || 0;
  if (s > t) {
    m0(t, "discarded", e);
    return;
  }
  for (; i.length > 0 && s < t; ) {
    var c = i.shift(), p = 0;
    if (Array.isArray(c.source))
      for (var f = 0; f < c.source.length; f++) {
        var m = p0(c.source[f], c.path, f, i, a);
        if (m !== void 0 ? s += JSON.stringify(m).length : s += 4, s += p, p = 1, s > t) {
          m0(t, "truncated", e);
          break;
        }
        c.target[f] = m;
      }
    else
      for (var f in c.source)
        if (Object.prototype.hasOwnProperty.call(c.source, f)) {
          var m = p0(c.source[f], c.path, f, i, a);
          if (m !== void 0 && (s += JSON.stringify(m).length + p + f.length + h8e, p = 1), s > t) {
            m0(t, "truncated", e);
            break;
          }
          c.target[f] = m;
        }
  }
  return r(), o(), l;
}
function p0(e, t, n, r, o) {
  var i = v8e(e);
  if (!i || typeof i != "object")
    return g8e(i);
  var a = y8e(i);
  if (a !== "[Object]" && a !== "[Array]" && a !== "[Error]")
    return a;
  var l = e;
  if (o.has(l))
    return "[Reference seen at ".concat(o.get(l), "]");
  var s = n !== void 0 ? "".concat(t, ".").concat(n) : t, c = Array.isArray(i) ? [] : {};
  return o.set(l, s), r.push({ source: i, target: c, path: s }), c;
}
function g8e(e) {
  return typeof e == "bigint" ? "[BigInt] ".concat(e.toString()) : typeof e == "function" ? "[Function] ".concat(e.name || "unknown") : typeof e == "symbol" ? "[Symbol] ".concat(e.description || e.toString()) : e;
}
function y8e(e) {
  try {
    if (e instanceof Event)
      return {
        isTrusted: e.isTrusted
      };
    var t = Object.prototype.toString.call(e), n = t.match(/\[object (.*)\]/);
    if (n && n[1])
      return "[".concat(n[1], "]");
  } catch {
  }
  return "[Unserializable]";
}
function v8e(e) {
  var t = e;
  if (t && typeof t.toJSON == "function")
    try {
      return t.toJSON();
    } catch {
    }
  return e;
}
function m0(e, t, n) {
  ur.warn("The data provided has been ".concat(t, " as it is over the limit of ").concat(e, " characters:"), n);
}
var hY = "No stack, consider using an instance of Error";
function gY(e) {
  var t = e.stackTrace, n = e.originalError, r = e.handlingStack, o = e.startClocks, i = e.nonErrorPrefix, a = e.source, l = e.handling, s = n instanceof Error, c = b8e(t, s, i, n), p = w8e(s, t) ? lu(t) : hY, f = s ? k8e(n, a) : void 0, m = t == null ? void 0 : t.name, h = yY(n);
  return {
    startClocks: o,
    source: a,
    handling: l,
    handlingStack: r,
    originalError: n,
    type: m,
    message: c,
    stack: p,
    causes: f,
    fingerprint: h
  };
}
function b8e(e, t, n, r) {
  return e != null && e.message && (e != null && e.name) ? e.message : t ? "Empty message" : "".concat(n, " ").concat(yf(Aa(r)));
}
function w8e(e, t) {
  return t === void 0 ? !1 : e ? !0 : t.stack.length > 0 && (t.stack.length > 1 || t.stack[0].url !== void 0);
}
function yY(e) {
  return e instanceof Error && "dd_fingerprint" in e ? String(e.dd_fingerprint) : void 0;
}
function lu(e) {
  var t = vY(e);
  return e.stack.forEach(function(n) {
    var r = n.func === "?" ? "<anonymous>" : n.func, o = n.args && n.args.length > 0 ? "(".concat(n.args.join(", "), ")") : "", i = n.line ? ":".concat(n.line) : "", a = n.line && n.column ? ":".concat(n.column) : "";
    t += `
  at `.concat(r).concat(o, " @ ").concat(n.url).concat(i).concat(a);
  }), t;
}
function x8e(e) {
  var t;
  return (t = /@ (.+)/.exec(e)) === null || t === void 0 ? void 0 : t[1];
}
function vY(e) {
  return "".concat(e.name || "Error", ": ").concat(e.message);
}
function S8e() {
  var e = 2, t = new Error(), n;
  if (!t.stack)
    try {
      throw t;
    } catch {
    }
  return Ep(function() {
    var r = qa(t);
    r.stack = r.stack.slice(e), n = lu(r);
  }), n;
}
function k8e(e, t) {
  for (var n = e, r = []; (n == null ? void 0 : n.cause) instanceof Error && r.length < 10; ) {
    var o = qa(n.cause);
    r.push({
      message: n.cause.message,
      source: t,
      type: o == null ? void 0 : o.name,
      stack: o && lu(o)
    }), n = n.cause;
  }
  return r.length ? r : void 0;
}
var vi = {
  AGENT: "agent",
  CONSOLE: "console",
  CUSTOM: "custom",
  LOGGER: "logger",
  NETWORK: "network",
  SOURCE: "source",
  REPORT: "report"
};
function _8e(e) {
  var t = function(o, i) {
    var a = gY({
      stackTrace: o,
      originalError: i,
      startClocks: hf(),
      nonErrorPrefix: "Uncaught",
      source: vi.SOURCE,
      handling: "unhandled"
    });
    e.notify(a);
  }, n = O8e(t).stop, r = E8e(t).stop;
  return {
    stop: function() {
      n(), r();
    }
  };
}
function O8e(e) {
  return zs(window, "onerror", function(t) {
    var n = t.parameters, r = n[0], o = n[1], i = n[2], a = n[3], l = n[4], s;
    l instanceof Error ? s = qa(l) : s = c8e(r, o, i, a), e(s, l ?? r);
  });
}
function E8e(e) {
  return zs(window, "onunhandledrejection", function(t) {
    var n = t.parameters[0], r = n.reason || "Empty reason", o = qa(r);
    e(o, r);
  });
}
function C8e(e) {
  var t = wo({
    version: "5.8.0",
    // This API method is intentionally not monitored, since the only thing executed is the
    // user-provided 'callback'.  All SDK usages executed in the callback should be monitored, and
    // we don't want to interfere with the user uncaught exceptions.
    onReady: function(n) {
      n();
    }
  }, e);
  return Object.defineProperty(t, "_setDebug", {
    get: function() {
      return n9e;
    },
    enumerable: !1
  }), t;
}
function P8e(e, t, n) {
  var r = e[t];
  e[t] = n, r && r.q && r.q.forEach(function(o) {
    return XK(o, "onReady callback threw an error:")();
  });
}
var rr;
(function(e) {
  e.BEFORE_UNLOAD = "beforeunload", e.CLICK = "click", e.DBL_CLICK = "dblclick", e.KEY_DOWN = "keydown", e.LOAD = "load", e.POP_STATE = "popstate", e.SCROLL = "scroll", e.TOUCH_START = "touchstart", e.TOUCH_END = "touchend", e.TOUCH_MOVE = "touchmove", e.VISIBILITY_CHANGE = "visibilitychange", e.PAGE_SHOW = "pageshow", e.FREEZE = "freeze", e.RESUME = "resume", e.DOM_CONTENT_LOADED = "DOMContentLoaded", e.POINTER_DOWN = "pointerdown", e.POINTER_UP = "pointerup", e.POINTER_CANCEL = "pointercancel", e.HASH_CHANGE = "hashchange", e.PAGE_HIDE = "pagehide", e.MOUSE_DOWN = "mousedown", e.MOUSE_UP = "mouseup", e.MOUSE_MOVE = "mousemove", e.FOCUS = "focus", e.BLUR = "blur", e.CONTEXT_MENU = "contextmenu", e.RESIZE = "resize", e.CHANGE = "change", e.INPUT = "input", e.PLAY = "play", e.PAUSE = "pause", e.SECURITY_POLICY_VIOLATION = "securitypolicyviolation", e.SELECTION_CHANGE = "selectionchange", e.STORAGE = "storage";
})(rr || (rr = {}));
function vf(e, t, n, r, o) {
  return D2(e, t, [n], r, o);
}
function D2(e, t, n, r, o) {
  var i = o === void 0 ? {} : o, a = i.once, l = i.capture, s = i.passive, c = zt(function(h) {
    !h.isTrusted && !h.__ddIsTrusted && !e.allowUntrustedEvents || (a && m(), r(h));
  }), p = s ? { capture: l, passive: s } : l, f = Mc(t, "addEventListener");
  n.forEach(function(h) {
    return f.call(t, h, c, p);
  });
  function m() {
    var h = Mc(t, "removeEventListener");
    n.forEach(function(g) {
      return h.call(t, g, c, p);
    });
  }
  return {
    stop: m
  };
}
var zl = {
  intervention: "intervention",
  deprecation: "deprecation",
  cspViolation: "csp_violation"
};
function R8e(e, t) {
  var n = [];
  gf(t, zl.cspViolation) && n.push(j8e(e));
  var r = t.filter(function(o) {
    return o !== zl.cspViolation;
  });
  return r.length && n.push(T8e(r)), iY.apply(void 0, n);
}
function T8e(e) {
  return new Vr(function(t) {
    if (window.ReportingObserver) {
      var n = zt(function(o, i) {
        return o.forEach(function(a) {
          t.notify(N8e(a));
        });
      }), r = new window.ReportingObserver(n, {
        types: e,
        buffered: !0
      });
      return r.observe(), function() {
        r.disconnect();
      };
    }
  });
}
function j8e(e) {
  return new Vr(function(t) {
    var n = vf(e, document, rr.SECURITY_POLICY_VIOLATION, function(r) {
      t.notify($8e(r));
    }).stop;
    return n;
  });
}
function N8e(e) {
  var t = e.type, n = e.body;
  return {
    type: t,
    subtype: n.id,
    message: "".concat(t, ": ").concat(n.message),
    originalReport: e,
    stack: bY(n.id, n.message, n.sourceFile, n.lineNumber, n.columnNumber)
  };
}
function $8e(e) {
  var t = zl.cspViolation, n = "'".concat(e.blockedURI, "' blocked by '").concat(e.effectiveDirective, "' directive");
  return {
    type: zl.cspViolation,
    subtype: e.effectiveDirective,
    message: "".concat(t, ": ").concat(n),
    stack: bY(e.effectiveDirective, e.originalPolicy ? "".concat(n, ' of the policy "').concat(a9e(e.originalPolicy, 100, "..."), '"') : "no policy", e.sourceFile, e.lineNumber, e.columnNumber),
    originalReport: e
  };
}
function bY(e, t, n, r, o) {
  return n ? lu({
    name: e,
    message: t,
    stack: [
      {
        func: "?",
        url: n,
        line: r ?? void 0,
        column: o ?? void 0
      }
    ]
  }) : void 0;
}
function wY(e, t) {
  var n = window.__ddBrowserSdkExtensionCallback;
  n && n({ type: e, payload: t });
}
function F2(e) {
  return e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
}
function Dw(e, t, n) {
  if (n === void 0 && (n = I8e()), t === void 0)
    return e;
  if (typeof t != "object" || t === null)
    return t;
  if (t instanceof Date)
    return new Date(t.getTime());
  if (t instanceof RegExp) {
    var r = t.flags || // old browsers compatibility
    [
      t.global ? "g" : "",
      t.ignoreCase ? "i" : "",
      t.multiline ? "m" : "",
      t.sticky ? "y" : "",
      t.unicode ? "u" : ""
    ].join("");
    return new RegExp(t.source, r);
  }
  if (!n.hasAlreadyBeenSeen(t)) {
    if (Array.isArray(t)) {
      for (var o = Array.isArray(e) ? e : [], i = 0; i < t.length; ++i)
        o[i] = Dw(o[i], t[i], n);
      return o;
    }
    var a = F2(e) === "object" ? e : {};
    for (var l in t)
      Object.prototype.hasOwnProperty.call(t, l) && (a[l] = Dw(a[l], t[l], n));
    return a;
  }
}
function xY(e) {
  return Dw(void 0, e);
}
function Uc() {
  for (var e = [], t = 0; t < arguments.length; t++)
    e[t] = arguments[t];
  for (var n, r = 0, o = e; r < o.length; r++) {
    var i = o[r];
    i != null && (n = Dw(n, i));
  }
  return n;
}
function I8e() {
  if (typeof WeakSet < "u") {
    var e = /* @__PURE__ */ new WeakSet();
    return {
      hasAlreadyBeenSeen: function(n) {
        var r = e.has(n);
        return r || e.add(n), r;
      }
    };
  }
  var t = [];
  return {
    hasAlreadyBeenSeen: function(n) {
      var r = t.indexOf(n) >= 0;
      return r || t.push(n), r;
    }
  };
}
function A8e() {
  var e, t = window.navigator;
  return {
    status: t.onLine ? "connected" : "not_connected",
    interfaces: t.connection && t.connection.type ? [t.connection.type] : void 0,
    effective_type: (e = t.connection) === null || e === void 0 ? void 0 : e.effectiveType
  };
}
var M2 = {
  log: "log",
  configuration: "configuration"
}, z8e = [
  "https://www.datadoghq-browser-agent.com",
  "https://www.datad0g-browser-agent.com",
  "https://d3uc069fcn7uxw.cloudfront.net",
  "https://d20xtzwzcl0ceb.cloudfront.net",
  "http://localhost",
  "<anonymous>"
], L8e = [B9e], zi = { maxEventsPerPage: 0, sentEventCount: 0, telemetryEnabled: !1, telemetryConfigurationEnabled: !1 }, IE;
function D8e(e, t) {
  var n, r = new Vr();
  zi.telemetryEnabled = !gf(L8e, t.site) && jE(t.telemetrySampleRate), zi.telemetryConfigurationEnabled = zi.telemetryEnabled && jE(t.telemetryConfigurationSampleRate);
  var o = F8e();
  IE = function(a) {
    if (zi.telemetryEnabled) {
      var l = i(e, a, o);
      r.notify(l), wY("telemetry", l);
    }
  }, t9e(kY), wo(zi, {
    maxEventsPerPage: t.maxTelemetryEventsPerPage,
    sentEventCount: 0
  });
  function i(a, l, s) {
    return Uc({
      type: "telemetry",
      date: Yl(),
      service: a,
      version: "5.8.0",
      source: "browser",
      _dd: {
        format_version: 2
      },
      telemetry: Uc(l, {
        runtime_env: s,
        connectivity: A8e()
      }),
      experimental_features: eY(BMe())
    }, n !== void 0 ? n() : {});
  }
  return {
    setContextProvider: function(a) {
      n = a;
    },
    observable: r,
    enabled: zi.telemetryEnabled
  };
}
function F8e() {
  return {
    is_local_file: window.location.protocol === "file:",
    is_worker: "WorkerGlobalScope" in self
  };
}
function M8e(e) {
  return e.site === F9e;
}
function SY(e, t) {
  NE(Fo.debug, e, t), B2(wo({
    type: M2.log,
    message: e,
    status: "debug"
  }, t));
}
function kY(e, t) {
  B2(wo({
    type: M2.log,
    status: "error"
  }, U8e(e), t));
}
function B8e(e) {
  zi.telemetryConfigurationEnabled && B2({
    type: M2.configuration,
    configuration: e
  });
}
function B2(e) {
  IE && zi.sentEventCount < zi.maxEventsPerPage && (zi.sentEventCount += 1, IE(e));
}
function U8e(e) {
  if (e instanceof Error) {
    var t = qa(e);
    return {
      error: {
        kind: t.name,
        stack: lu(H8e(t))
      },
      message: t.message
    };
  }
  return {
    error: {
      stack: hY
    },
    message: "".concat("Uncaught", " ").concat(yf(e))
  };
}
function H8e(e) {
  return e.stack = e.stack.filter(function(t) {
    return !t.url || z8e.some(function(n) {
      return tY(t.url, n);
    });
  }), e;
}
var ug = 1 / 0, W8e = ou, V8e = (
  /** @class */
  function() {
    function e(t, n) {
      var r = this;
      this.expireDelay = t, this.maxEntries = n, this.entries = [], this.clearOldValuesInterval = $2(function() {
        return r.clearOldValues();
      }, W8e);
    }
    return e.prototype.add = function(t, n) {
      var r = this, o = {
        value: t,
        startTime: n,
        endTime: ug,
        remove: function() {
          var i = r.entries.indexOf(o);
          i >= 0 && r.entries.splice(i, 1);
        },
        close: function(i) {
          o.endTime = i;
        }
      };
      return this.maxEntries && this.entries.length >= this.maxEntries && this.entries.pop(), this.entries.unshift(o), o;
    }, e.prototype.find = function(t) {
      t === void 0 && (t = ug);
      for (var n = 0, r = this.entries; n < r.length; n++) {
        var o = r[n];
        if (o.startTime <= t) {
          if (t <= o.endTime)
            return o.value;
          break;
        }
      }
    }, e.prototype.closeActive = function(t) {
      var n = this.entries[0];
      n && n.endTime === ug && n.close(t);
    }, e.prototype.findAll = function(t, n) {
      t === void 0 && (t = ug), n === void 0 && (n = 0);
      var r = qMe(t, n);
      return this.entries.filter(function(o) {
        return o.startTime <= r && t <= o.endTime;
      }).map(function(o) {
        return o.value;
      });
    }, e.prototype.reset = function() {
      this.entries = [];
    }, e.prototype.stop = function() {
      oY(this.clearOldValuesInterval);
    }, e.prototype.clearOldValues = function() {
      for (var t = Aw() - this.expireDelay; this.entries.length > 0 && this.entries[this.entries.length - 1].endTime < t; )
        this.entries.pop();
    }, e;
  }()
), q8e = ou, G8e = lY;
function K8e(e, t, n) {
  var r = I9e(e.sessionStoreStrategyType, t, n), o = new V8e(G8e);
  r.renewObservable.subscribe(function() {
    o.add(i(), Aw());
  }), r.expireObservable.subscribe(function() {
    o.closeActive(Aw());
  }), r.expandOrRenewSession(), o.add(i(), WMe().relative), Y8e(e, function() {
    return r.expandOrRenewSession();
  }), X8e(e, function() {
    return r.expandSession();
  });
  function i() {
    return {
      id: r.getSession().id,
      trackingType: r.getSession()[t]
    };
  }
  return {
    findActiveSession: function(a) {
      return o.find(a);
    },
    renewObservable: r.renewObservable,
    expireObservable: r.expireObservable,
    expire: r.expire
  };
}
function Y8e(e, t) {
  D2(e, window, [rr.CLICK, rr.TOUCH_START, rr.KEY_DOWN, rr.SCROLL], t, { capture: !0, passive: !0 }).stop;
}
function X8e(e, t) {
  var n = function() {
    document.visibilityState === "visible" && t();
  };
  vf(e, document, rr.VISIBILITY_CHANGE, n).stop, $2(n, q8e);
}
function _Y(e) {
  return e >= 500;
}
function Z8e(e) {
  try {
    return e.clone();
  } catch {
    return;
  }
}
var Q8e = 80 * Ia, J8e = 32, OY = 3 * JK, eBe = ou, EY = Qp;
function CY(e, t, n, r, o) {
  t.transportStatus === 0 && t.queuedPayloads.size() === 0 && t.bandwidthMonitor.canHandle(e) ? RY(e, t, n, {
    onSuccess: function() {
      return TY(0, t, n, r, o);
    },
    onFailure: function() {
      t.queuedPayloads.enqueue(e), PY(t, n, r, o);
    }
  }) : t.queuedPayloads.enqueue(e);
}
function PY(e, t, n, r) {
  e.transportStatus === 2 && Jp(function() {
    var o = e.queuedPayloads.first();
    RY(o, e, t, {
      onSuccess: function() {
        e.queuedPayloads.dequeue(), e.currentBackoffTime = EY, TY(1, e, t, n, r);
      },
      onFailure: function() {
        e.currentBackoffTime = Math.min(eBe, e.currentBackoffTime * 2), PY(e, t, n, r);
      }
    });
  }, e.currentBackoffTime);
}
function RY(e, t, n, r) {
  var o = r.onSuccess, i = r.onFailure;
  t.bandwidthMonitor.add(e), n(e, function(a) {
    t.bandwidthMonitor.remove(e), tBe(a) ? (t.transportStatus = t.bandwidthMonitor.ongoingRequestCount > 0 ? 1 : 2, e.retry = {
      count: e.retry ? e.retry.count + 1 : 1,
      lastFailureStatus: a.status
    }, i()) : (t.transportStatus = 0, o());
  });
}
function TY(e, t, n, r, o) {
  e === 0 && t.queuedPayloads.isFull() && !t.queueFullReported && (o({
    message: "Reached max ".concat(r, " events size queued for upload: ").concat(OY / JK, "MiB"),
    source: vi.AGENT,
    startClocks: hf()
  }), t.queueFullReported = !0);
  var i = t.queuedPayloads;
  for (t.queuedPayloads = jY(); i.size() > 0; )
    CY(i.dequeue(), t, n, r, o);
}
function tBe(e) {
  return e.type !== "opaque" && (e.status === 0 && !navigator.onLine || e.status === 408 || e.status === 429 || _Y(e.status));
}
function nBe() {
  return {
    transportStatus: 0,
    currentBackoffTime: EY,
    bandwidthMonitor: rBe(),
    queuedPayloads: jY(),
    queueFullReported: !1
  };
}
function jY() {
  var e = [];
  return {
    bytesCount: 0,
    enqueue: function(t) {
      this.isFull() || (e.push(t), this.bytesCount += t.bytesCount);
    },
    first: function() {
      return e[0];
    },
    dequeue: function() {
      var t = e.shift();
      return t && (this.bytesCount -= t.bytesCount), t;
    },
    size: function() {
      return e.length;
    },
    isFull: function() {
      return this.bytesCount >= OY;
    }
  };
}
function rBe() {
  return {
    ongoingRequestCount: 0,
    ongoingByteCount: 0,
    canHandle: function(e) {
      return this.ongoingRequestCount === 0 || this.ongoingByteCount + e.bytesCount <= Q8e && this.ongoingRequestCount < J8e;
    },
    add: function(e) {
      this.ongoingRequestCount += 1, this.ongoingByteCount += e.bytesCount;
    },
    remove: function(e) {
      this.ongoingRequestCount -= 1, this.ongoingByteCount -= e.bytesCount;
    }
  };
}
function oBe(e, t, n, r) {
  var o = nBe(), i = function(a, l) {
    return lBe(e, t, n, a, l);
  };
  return {
    send: function(a) {
      CY(a, o, i, t.trackType, r);
    },
    /**
     * Since fetch keepalive behaves like regular fetch on Firefox,
     * keep using sendBeaconStrategy on exit
     */
    sendOnExit: function(a) {
      iBe(e, t, n, a);
    }
  };
}
function iBe(e, t, n, r) {
  var o = !!navigator.sendBeacon && r.bytesCount < n;
  if (o)
    try {
      var i = t.build("beacon", r), a = navigator.sendBeacon(i, r.data);
      if (a)
        return;
    } catch (s) {
      aBe(s);
    }
  var l = t.build("xhr", r);
  AE(e, l, r.data);
}
var vD = !1;
function aBe(e) {
  vD || (vD = !0, kY(e));
}
function lBe(e, t, n, r, o) {
  var i = sBe() && r.bytesCount < n;
  if (i) {
    var a = t.build("fetch", r);
    fetch(a, { method: "POST", body: r.data, keepalive: !0, mode: "cors" }).then(zt(function(s) {
      return o == null ? void 0 : o({ status: s.status, type: s.type });
    }), zt(function() {
      var s = t.build("xhr", r);
      AE(e, s, r.data, o);
    }));
  } else {
    var l = t.build("xhr", r);
    AE(e, l, r.data, o);
  }
}
function sBe() {
  try {
    return window.Request && "keepalive" in new Request("http://a");
  } catch {
    return !1;
  }
}
function AE(e, t, n, r) {
  var o = new XMLHttpRequest();
  o.open("POST", t, !0), n instanceof Blob && o.setRequestHeader("Content-Type", n.type), vf(e, o, "loadend", function() {
    r == null || r({ status: o.status });
  }, {
    // prevent multiple onResponse callbacks
    // if the xhr instance is reused by a third party
    once: !0
  }), o.send(n);
}
function U2() {
  var e = uBe();
  if (e)
    return {
      getAllowedWebViewHosts: function() {
        return JSON.parse(e.getAllowedWebViewHosts());
      },
      send: function(t, n) {
        e.send(JSON.stringify({ eventType: t, event: n }));
      }
    };
}
function Fw(e) {
  var t;
  e === void 0 && (e = (t = Xl().location) === null || t === void 0 ? void 0 : t.hostname);
  var n = U2();
  return !!n && n.getAllowedWebViewHosts().some(function(r) {
    return e === r || ZMe(e, ".".concat(r));
  });
}
function uBe() {
  return Xl().DatadogEventBridge;
}
var kd = {
  HIDDEN: "visibility_hidden",
  UNLOADING: "before_unload",
  PAGEHIDE: "page_hide",
  FROZEN: "page_frozen"
};
function cBe(e) {
  return new Vr(function(t) {
    var n = ZK(Op.PAGEHIDE), r = D2(e, window, [rr.VISIBILITY_CHANGE, rr.FREEZE, rr.PAGE_HIDE], function(i) {
      i.type === rr.PAGE_HIDE && n ? t.notify({ reason: kd.PAGEHIDE }) : i.type === rr.VISIBILITY_CHANGE && document.visibilityState === "hidden" ? t.notify({ reason: kd.HIDDEN }) : i.type === rr.FREEZE && t.notify({ reason: kd.FROZEN });
    }, { capture: !0 }).stop, o = em;
    return n || (o = vf(e, window, rr.BEFORE_UNLOAD, function() {
      t.notify({ reason: kd.UNLOADING });
    }).stop), function() {
      r(), o();
    };
  });
}
function fBe(e) {
  return gf(Fc(kd), e);
}
var dBe = (
  /** @class */
  function() {
    function e(t, n, r, o) {
      var i = this;
      this.encoder = t, this.request = n, this.flushController = r, this.messageBytesLimit = o, this.upsertBuffer = {}, this.flushSubscription = this.flushController.flushObservable.subscribe(function(a) {
        return i.flush(a);
      });
    }
    return e.prototype.add = function(t) {
      this.addOrUpdate(t);
    }, e.prototype.upsert = function(t, n) {
      this.addOrUpdate(t, n);
    }, e.prototype.stop = function() {
      this.flushSubscription.unsubscribe();
    }, e.prototype.flush = function(t) {
      var n = Fc(this.upsertBuffer).join(`
`);
      this.upsertBuffer = {};
      var r = fBe(t.reason), o = r ? this.request.sendOnExit : this.request.send;
      if (r && // Note: checking that the encoder is async is not strictly needed, but it's an optimization:
      // if the encoder is async we need to send two requests in some cases (one for encoded data
      // and the other for non-encoded data). But if it's not async, we don't have to worry about
      // it and always send a single request.
      this.encoder.isAsync) {
        var i = this.encoder.finishSync();
        i.outputBytesCount && o(bD(i, t));
        var a = [i.pendingData, n].filter(Boolean).join(`
`);
        a && o({
          data: a,
          bytesCount: j2(a),
          flushReason: t.reason
        });
      } else
        n && this.encoder.write(this.encoder.isEmpty ? n : `
`.concat(n)), this.encoder.finish(function(l) {
          o(bD(l, t));
        });
    }, e.prototype.addOrUpdate = function(t, n) {
      var r = yf(t), o = this.encoder.estimateEncodedBytesCount(r);
      if (o >= this.messageBytesLimit) {
        ur.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit, "KB."));
        return;
      }
      this.hasMessageFor(n) && this.remove(n), this.push(r, o, n);
    }, e.prototype.push = function(t, n, r) {
      var o = this;
      this.flushController.notifyBeforeAddMessage(n), r !== void 0 ? (this.upsertBuffer[r] = t, this.flushController.notifyAfterAddMessage()) : this.encoder.write(this.encoder.isEmpty ? t : `
`.concat(t), function(i) {
        o.flushController.notifyAfterAddMessage(i - n);
      });
    }, e.prototype.remove = function(t) {
      var n = this.upsertBuffer[t];
      delete this.upsertBuffer[t];
      var r = this.encoder.estimateEncodedBytesCount(n);
      this.flushController.notifyAfterRemoveMessage(r);
    }, e.prototype.hasMessageFor = function(t) {
      return t !== void 0 && this.upsertBuffer[t] !== void 0;
    }, e;
  }()
);
function bD(e, t) {
  var n;
  return typeof e.output == "string" ? n = e.output : n = new Blob([e.output], {
    // This will set the 'Content-Type: text/plain' header. Reasoning:
    // * The intake rejects the request if there is no content type.
    // * The browser will issue CORS preflight requests if we set it to 'application/json', which
    // could induce higher intake load (and maybe has other impacts).
    // * Also it's not quite JSON, since we are concatenating multiple JSON objects separated by
    // new lines.
    type: "text/plain"
  }), {
    data: n,
    bytesCount: e.outputBytesCount,
    encoding: e.encoding,
    flushReason: t.reason
  };
}
function pBe(e) {
  var t = e.messagesLimit, n = e.bytesLimit, r = e.durationLimit, o = e.pageExitObservable, i = e.sessionExpireObservable, a = o.subscribe(function(v) {
    return f(v.reason);
  }), l = i.subscribe(function() {
    return f("session_expire");
  }), s = new Vr(function() {
    return function() {
      a.unsubscribe(), l.unsubscribe();
    };
  }), c = 0, p = 0;
  function f(v) {
    if (p !== 0) {
      var S = p, w = c;
      p = 0, c = 0, g(), s.notify({
        reason: v,
        messagesCount: S,
        bytesCount: w
      });
    }
  }
  var m;
  function h() {
    m === void 0 && (m = Jp(function() {
      f("duration_limit");
    }, r));
  }
  function g() {
    rY(m), m = void 0;
  }
  return {
    flushObservable: s,
    get messagesCount() {
      return p;
    },
    /**
     * Notifies that a message will be added to a pool of pending messages waiting to be flushed.
     *
     * This function needs to be called synchronously, right before adding the message, so no flush
     * event can happen after `notifyBeforeAddMessage` and before adding the message.
     *
     * @param estimatedMessageBytesCount: an estimation of the message bytes count once it is
     * actually added.
     */
    notifyBeforeAddMessage: function(v) {
      c + v >= n && f("bytes_limit"), p += 1, c += v, h();
    },
    /**
     * Notifies that a message *was* added to a pool of pending messages waiting to be flushed.
     *
     * This function can be called asynchronously after the message was added, but in this case it
     * should not be called if a flush event occurred in between.
     *
     * @param messageBytesCountDiff: the difference between the estimated message bytes count and
     * its actual bytes count once added to the pool.
     */
    notifyAfterAddMessage: function(v) {
      v === void 0 && (v = 0), c += v, p >= t ? f("messages_limit") : c >= n && f("bytes_limit");
    },
    /**
     * Notifies that a message was removed from a pool of pending messages waiting to be flushed.
     *
     * This function needs to be called synchronously, right after removing the message, so no flush
     * event can happen after removing the message and before `notifyAfterRemoveMessage`.
     *
     * @param messageBytesCount: the message bytes count that was added to the pool. Should
     * correspond to the sum of bytes counts passed to `notifyBeforeAddMessage` and
     * `notifyAfterAddMessage`.
     */
    notifyAfterRemoveMessage: function(v) {
      c -= v, p -= 1, p === 0 && g();
    }
  };
}
function NY(e, t, n, r, o, i) {
  var a = s(e, t), l = n && s(e, n);
  function s(c, p) {
    var f = p.endpoint, m = p.encoder;
    return new dBe(m, oBe(c, f, c.batchBytesLimit, r), pBe({
      messagesLimit: c.batchMessagesLimit,
      bytesLimit: c.batchBytesLimit,
      durationLimit: c.flushTimeout,
      pageExitObservable: o,
      sessionExpireObservable: i
    }), c.messageBytesLimit);
  }
  return {
    flushObservable: a.flushController.flushObservable,
    add: function(c, p) {
      p === void 0 && (p = !0), a.add(c), l && p && l.add(n.transformMessage ? n.transformMessage(c) : c);
    },
    upsert: function(c, p) {
      a.upsert(c, p), l && l.upsert(n.transformMessage ? n.transformMessage(c) : c, p);
    },
    stop: function() {
      a.stop(), l == null || l.stop();
    }
  };
}
function Mw() {
  var e = "", t = 0;
  return {
    isAsync: !1,
    get isEmpty() {
      return !e;
    },
    write: function(n, r) {
      var o = j2(n);
      t += o, e += n, r && r(o);
    },
    finish: function(n) {
      n(this.finishSync());
    },
    finishSync: function() {
      var n = {
        output: e,
        outputBytesCount: t,
        rawBytesCount: t,
        pendingData: ""
      };
      return e = "", t = 0, n;
    },
    estimateEncodedBytesCount: function(n) {
      return n.length;
    }
  };
}
function mBe(e) {
  var t = /* @__PURE__ */ new Set();
  return e.forEach(function(n) {
    return t.add(n);
  }), eY(t);
}
var hBe = (
  /** @class */
  function() {
    function e() {
      this.callbacks = {};
    }
    return e.prototype.notify = function(t, n) {
      var r = this.callbacks[t];
      r && r.forEach(function(o) {
        return o(n);
      });
    }, e.prototype.subscribe = function(t, n) {
      var r = this;
      return this.callbacks[t] || (this.callbacks[t] = []), this.callbacks[t].push(n), {
        unsubscribe: function() {
          r.callbacks[t] = r.callbacks[t].filter(function(o) {
            return n !== o;
          });
        }
      };
    }, e;
  }()
);
function gBe(e, t, n) {
  var r = 0, o = !1;
  return {
    isLimitReached: function() {
      if (r === 0 && Jp(function() {
        r = 0;
      }, ou), r += 1, r <= t || o)
        return o = !1, !1;
      if (r === t + 1) {
        o = !0;
        try {
          n({
            message: "Reached max number of ".concat(e, "s by minute: ").concat(t),
            source: vi.AGENT,
            startClocks: hf()
          });
        } finally {
          o = !1;
        }
      }
      return !0;
    }
  };
}
var h0, H2 = /* @__PURE__ */ new WeakMap();
function yBe(e) {
  return h0 || (h0 = vBe(e)), h0;
}
function vBe(e) {
  return new Vr(function(t) {
    var n = zs(XMLHttpRequest.prototype, "open", bBe).stop, r = zs(XMLHttpRequest.prototype, "send", function(i) {
      wBe(i, e, t);
    }).stop, o = zs(XMLHttpRequest.prototype, "abort", xBe).stop;
    return function() {
      n(), r(), o();
    };
  });
}
function bBe(e) {
  var t = e.target, n = e.parameters, r = n[0], o = n[1];
  H2.set(t, {
    state: "open",
    method: String(r).toUpperCase(),
    url: L2(String(o))
  });
}
function wBe(e, t, n) {
  var r = e.target, o = H2.get(r);
  if (o) {
    var i = o;
    i.state = "start", i.startClocks = hf(), i.isAborted = !1, i.xhr = r;
    var a = !1, l = zs(r, "onreadystatechange", function() {
      r.readyState === XMLHttpRequest.DONE && s();
    }).stop, s = function() {
      if (c(), l(), !a) {
        a = !0;
        var p = o;
        p.state = "complete", p.duration = VMe(i.startClocks.timeStamp, Yl()), p.status = r.status, n.notify(QMe(p));
      }
    }, c = vf(t, r, "loadend", s).stop;
    n.notify(i);
  }
}
function xBe(e) {
  var t = e.target, n = H2.get(t);
  n && (n.isAborted = !0);
}
var g0;
function SBe() {
  return g0 || (g0 = kBe()), g0;
}
function kBe() {
  return new Vr(function(e) {
    if (window.fetch) {
      var t = zs(window, "fetch", function(n) {
        return _Be(n, e);
      }).stop;
      return t;
    }
  });
}
function _Be(e, t) {
  var n = e.parameters, r = e.onPostCall, o = n[0], i = n[1], a = i && i.method;
  a === void 0 && o instanceof Request && (a = o.method);
  var l = a !== void 0 ? String(a).toUpperCase() : "GET", s = o instanceof Request ? o.url : L2(String(o)), c = hf(), p = {
    state: "start",
    init: i,
    input: o,
    method: l,
    startClocks: c,
    url: s
  };
  t.notify(p), n[0] = p.input, n[1] = p.init, r(function(f) {
    return OBe(t, f, p);
  });
}
function OBe(e, t, n) {
  var r = function(o) {
    var i = n;
    i.state = "resolve", "stack" in o || o instanceof Error ? (i.status = 0, i.isAborted = o instanceof DOMException && o.code === DOMException.ABORT_ERR, i.error = o) : "status" in o && (i.response = o, i.responseType = o.type, i.status = o.status, i.isAborted = !1), e.notify(i);
  };
  t.then(zt(r), zt(r));
}
var y0 = {};
function EBe(e) {
  var t = e.map(function(n) {
    return y0[n] || (y0[n] = CBe(n)), y0[n];
  });
  return iY.apply(void 0, t);
}
function CBe(e) {
  return new Vr(function(t) {
    var n = Mi[e];
    return Mi[e] = function() {
      for (var r = [], o = 0; o < arguments.length; o++)
        r[o] = arguments[o];
      n.apply(console, r);
      var i = S8e();
      Ep(function() {
        t.notify(PBe(r, e, i));
      });
    }, function() {
      Mi[e] = n;
    };
  });
}
function PBe(e, t, n) {
  var r = e.map(function(l) {
    return RBe(l);
  }).join(" "), o, i;
  if (t === Fo.error) {
    var a = YMe(e, function(l) {
      return l instanceof Error;
    });
    o = a ? lu(qa(a)) : void 0, i = yY(a);
  }
  return {
    api: t,
    message: r,
    stack: o,
    handlingStack: n,
    fingerprint: i
  };
}
function RBe(e) {
  return typeof e == "string" ? Aa(e) : e instanceof Error ? vY(qa(e)) : yf(Aa(e), void 0, 2);
}
var TBe = 500, jBe = (
  /** @class */
  function() {
    function e() {
      this.buffer = [];
    }
    return e.prototype.add = function(t) {
      var n = this.buffer.push(t);
      n > TBe && this.buffer.splice(0, 1);
    }, e.prototype.drain = function() {
      this.buffer.forEach(function(t) {
        return t();
      }), this.buffer.length = 0;
    }, e;
  }()
);
function zE(e) {
  var t = {}, n = new Vr(), r = {
    getContext: function() {
      return xY(t);
    },
    setContext: function(o) {
      F2(o) === "object" ? (t = Aa(o), e.updateCustomerData(t)) : r.clearContext(), n.notify();
    },
    setContextProperty: function(o, i) {
      t[o] = Aa(i), e.updateCustomerData(t), n.notify();
    },
    removeContextProperty: function(o) {
      delete t[o], e.updateCustomerData(t), n.notify();
    },
    clearContext: function() {
      t = {}, e.resetCustomerData(), n.notify();
    },
    changeObservable: n
  };
  return r;
}
var NBe = "_dd_c", $Be = [];
function wD(e, t, n, r) {
  var o = IBe(n, r);
  $Be.push(vf(e, window, rr.STORAGE, function(s) {
    var c = s.key;
    o === c && i();
  })), t.changeObservable.subscribe(a), t.setContext(Uc(l(), t.getContext()));
  function i() {
    t.setContext(l());
  }
  function a() {
    localStorage.setItem(o, JSON.stringify(t.getContext()));
  }
  function l() {
    var s = localStorage.getItem(o);
    return s !== null ? JSON.parse(s) : {};
  }
}
function IBe(e, t) {
  return "".concat(NBe, "_").concat(e, "_").concat(t);
}
var ABe = 3 * Ia, zBe = 16 * Ia, LBe = 200;
function DBe(e) {
  e === void 0 && (e = 2);
  var t = /* @__PURE__ */ new Map(), n = !1;
  function r(o) {
    if (o === void 0 && (o = 0), !(n || e === 0)) {
      var i = e === 2 ? ABe : zBe, a = o;
      t.forEach(function(l) {
        a += l.getBytesCount();
      }), a > i && (FBe(i), n = !0);
    }
  }
  return {
    /**
     * Creates a detached tracker. The manager will not store a reference to that tracker, and the
     * bytes count will be counted independently from other detached trackers.
     *
     * This is particularly useful when we don't know when the tracker will be unused, so we don't
     * leak memory (ex: when used in Logger instances).
     */
    createDetachedTracker: function() {
      var o = xD(function() {
        return r(o.getBytesCount());
      });
      return o;
    },
    /**
     * Creates a tracker if it doesn't exist, and returns it.
     */
    getOrCreateTracker: function(o) {
      return t.has(o) || t.set(o, xD(r)), t.get(o);
    },
    setCompressionStatus: function(o) {
      e === 0 && (e = o, r());
    },
    getCompressionStatus: function() {
      return e;
    },
    stop: function() {
      t.forEach(function(o) {
        return o.stop();
      }), t.clear();
    }
  };
}
function xD(e) {
  var t = 0, n = aY(function(a) {
    t = j2(yf(a)), e();
  }, LBe), r = n.throttled, o = n.cancel, i = function() {
    o(), t = 0;
  };
  return {
    updateCustomerData: function(a) {
      N2(a) ? i() : r(a);
    },
    resetCustomerData: i,
    getBytesCount: function() {
      return t;
    },
    stop: function() {
      o();
    }
  };
}
function FBe(e) {
  ur.warn("Customer data exceeds the recommended ".concat(e / Ia, "KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-threshold-warning"));
}
function MBe(e, t, n) {
  var r = e.getReader(), o = [], i = 0;
  a();
  function a() {
    r.read().then(zt(function(s) {
      if (s.done) {
        l();
        return;
      }
      n.collectStreamBody && o.push(s.value), i += s.value.length, i > n.bytesLimit ? l() : a();
    }), zt(function(s) {
      return t(s);
    }));
  }
  function l() {
    r.cancel().catch(
      // we don't care if cancel fails, but we still need to catch the error to avoid reporting it
      // as an unhandled rejection
      em
    );
    var s, c;
    if (n.collectStreamBody) {
      var p;
      if (o.length === 1)
        p = o[0];
      else {
        p = new Uint8Array(i);
        var f = 0;
        o.forEach(function(m) {
          p.set(m, f), f += m.length;
        });
      }
      s = p.slice(0, n.bytesLimit), c = p.length > n.bytesLimit;
    }
    t(void 0, s, c);
  }
}
var BBe = "datadog-synthetics-public-id", UBe = "datadog-synthetics-result-id", HBe = "datadog-synthetics-injects-rum";
function $Y() {
  return !!(window._DATADOG_SYNTHETICS_INJECTS_RUM || Ts(HBe));
}
function WBe() {
  var e = window._DATADOG_SYNTHETICS_PUBLIC_ID || Ts(BBe);
  return typeof e == "string" ? e : void 0;
}
function VBe() {
  var e = window._DATADOG_SYNTHETICS_RESULT_ID || Ts(UBe);
  return typeof e == "string" ? e : void 0;
}
function SD(e) {
  var t = wo({}, e), n = ["id", "name", "email"];
  return n.forEach(function(r) {
    r in t && (t[r] = String(t[r]));
  }), t;
}
function qBe(e) {
  var t = F2(e) === "object";
  return t || ur.error("Unsupported user:", e), t;
}
var GBe = 32 * Ia;
function KBe(e) {
  var t = Z9e(e), n = kD(e.forwardConsoleLogs, Fc(Fo), "Forward Console Logs"), r = kD(e.forwardReports, Fc(zl), "Forward Reports");
  if (!(!t || !n || !r))
    return e.forwardErrorsToLogs && !gf(n, Fo.error) && n.push(Fo.error), wo({
      forwardErrorsToLogs: e.forwardErrorsToLogs !== !1,
      forwardConsoleLogs: n,
      forwardReports: r,
      requestErrorResponseLengthLimit: GBe
    }, t);
}
function kD(e, t, n) {
  if (e === void 0)
    return [];
  if (!(e === "all" || Array.isArray(e) && e.every(function(r) {
    return gf(t, r);
  }))) {
    ur.error("".concat(n, ' should be "all" or an array with allowed values "').concat(t.join('", "'), '"'));
    return;
  }
  return e === "all" ? t : mBe(e);
}
function YBe(e) {
  var t = Q9e(e);
  return wo({
    forward_errors_to_logs: e.forwardErrorsToLogs,
    forward_console_logs: e.forwardConsoleLogs,
    forward_reports: e.forwardReports
  }, t);
}
var XBe = function(e, t, n, r) {
  var o = arguments.length, i = o < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, a;
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
    i = Reflect.decorate(e, t, n, r);
  else
    for (var l = e.length - 1; l >= 0; l--)
      (a = e[l]) && (i = (o < 3 ? a(i) : o > 3 ? a(t, n, i) : a(t, n)) || i);
  return o > 3 && i && Object.defineProperty(t, n, i), i;
}, on = {
  debug: "debug",
  error: "error",
  info: "info",
  warn: "warn"
}, LE = {
  console: "console",
  http: "http",
  silent: "silent"
}, ZBe = Object.keys(on), _D = (
  /** @class */
  function() {
    function e(t, n, r, o, i, a) {
      o === void 0 && (o = LE.http), i === void 0 && (i = on.debug), a === void 0 && (a = {}), this.handleLogStrategy = t, this.handlerType = o, this.level = i, this.contextManager = zE(n), this.contextManager.setContext(a), r && this.contextManager.setContextProperty("logger", { name: r });
    }
    return e.prototype.log = function(t, n, r, o) {
      r === void 0 && (r = on.info);
      var i;
      if (o != null) {
        var a = o instanceof Error ? qa(o) : void 0, l = gY({
          stackTrace: a,
          originalError: o,
          nonErrorPrefix: "Provided",
          source: vi.LOGGER,
          handling: "handled",
          startClocks: hf()
        });
        i = {
          stack: l.stack,
          kind: l.type,
          message: l.message
        };
      }
      var s = Aa(n), c = i ? Uc({ error: i }, s) : s;
      this.handleLogStrategy({
        message: Aa(t),
        context: c,
        status: r
      }, this);
    }, e.prototype.debug = function(t, n, r) {
      this.log(t, n, on.debug, r);
    }, e.prototype.info = function(t, n, r) {
      this.log(t, n, on.info, r);
    }, e.prototype.warn = function(t, n, r) {
      this.log(t, n, on.warn, r);
    }, e.prototype.error = function(t, n, r) {
      this.log(t, n, on.error, r);
    }, e.prototype.setContext = function(t) {
      this.contextManager.setContext(t);
    }, e.prototype.getContext = function() {
      return this.contextManager.getContext();
    }, e.prototype.setContextProperty = function(t, n) {
      this.contextManager.setContextProperty(t, n);
    }, e.prototype.removeContextProperty = function(t) {
      this.contextManager.removeContextProperty(t);
    }, e.prototype.clearContext = function() {
      this.contextManager.clearContext();
    }, e.prototype.setHandler = function(t) {
      this.handlerType = t;
    }, e.prototype.getHandler = function() {
      return this.handlerType;
    }, e.prototype.setLevel = function(t) {
      this.level = t;
    }, e.prototype.getLevel = function() {
      return this.level;
    }, XBe([
      r9e
    ], e.prototype, "log", null), e;
  }()
);
function QBe(e, t) {
  return {
    view: {
      referrer: document.referrer,
      url: window.location.href
    },
    context: e.getContext(),
    user: t.getContext()
  };
}
var OD = "logs";
function JBe(e) {
  var t = !1, n = DBe(), r = zE(n.getOrCreateTracker(
    2
    /* CustomerDataType.GlobalContext */
  )), o = zE(n.getOrCreateTracker(
    1
    /* CustomerDataType.User */
  )), i = {}, a = function() {
  }, l = new jBe(), s = function(g, v, S, w) {
    S === void 0 && (S = f()), w === void 0 && (w = Yl()), l.add(function() {
      return s(g, v, S, w);
    });
  }, c = function() {
  }, p = new _D(function() {
    for (var g = [], v = 0; v < arguments.length; v++)
      g[v] = arguments[v];
    return s.apply(void 0, g);
  }, n.createDetachedTracker());
  function f() {
    return QBe(r, o);
  }
  return C8e({
    logger: p,
    init: zt(function(g) {
      var v;
      if (!g) {
        ur.error("Missing configuration");
        return;
      }
      if (c = function() {
        return xY(g);
      }, Fw() && (g = m(g)), !!h(g)) {
        var S = KBe(g);
        S && (g.storeContextsAcrossPages && (wD(
          S,
          r,
          OD,
          2
          /* CustomerDataType.GlobalContext */
        ), wD(
          S,
          o,
          OD,
          1
          /* CustomerDataType.User */
        )), v = e(g, S, f), s = v.handleLog, a = v.getInternalContext, l.drain(), t = !0);
      }
    }),
    getGlobalContext: zt(function() {
      return r.getContext();
    }),
    setGlobalContext: zt(function(g) {
      return r.setContext(g);
    }),
    setGlobalContextProperty: zt(function(g, v) {
      return r.setContextProperty(g, v);
    }),
    removeGlobalContextProperty: zt(function(g) {
      return r.removeContextProperty(g);
    }),
    clearGlobalContext: zt(function() {
      return r.clearContext();
    }),
    createLogger: zt(function(g, v) {
      return v === void 0 && (v = {}), i[g] = new _D(function() {
        for (var S = [], w = 0; w < arguments.length; w++)
          S[w] = arguments[w];
        return s.apply(void 0, S);
      }, n.createDetachedTracker(), Aa(g), v.handler, v.level, Aa(v.context)), i[g];
    }),
    getLogger: zt(function(g) {
      return i[g];
    }),
    getInitConfiguration: zt(function() {
      return c();
    }),
    getInternalContext: zt(function(g) {
      return a(g);
    }),
    setUser: zt(function(g) {
      qBe(g) && o.setContext(SD(g));
    }),
    getUser: zt(function() {
      return o.getContext();
    }),
    setUserProperty: zt(function(g, v) {
      var S, w = SD((S = {}, S[g] = v, S))[g];
      o.setContextProperty(g, w);
    }),
    removeUserProperty: zt(function(g) {
      return o.removeContextProperty(g);
    }),
    clearUser: zt(function() {
      return o.clearContext();
    })
  });
  function m(g) {
    return wo({}, g, { clientToken: "empty" });
  }
  function h(g) {
    return t ? (g.silentMultipleInit || ur.error("DD_LOGS is already initialized."), !1) : !0;
  }
}
var e7e = "logs";
function t7e(e) {
  var t = K8e(e, e7e, function(n) {
    return r7e(e, n);
  });
  return {
    findTrackedSession: function(n) {
      var r = t.findActiveSession(n);
      return r && r.trackingType === "1" ? {
        id: r.id
      } : void 0;
    },
    expireObservable: t.expireObservable
  };
}
function n7e(e) {
  var t = IY(e) === "1", n = t ? {} : void 0;
  return {
    findTrackedSession: function() {
      return n;
    },
    expireObservable: new Vr()
  };
}
function IY(e) {
  return jE(e.sessionSampleRate) ? "1" : "0";
}
function r7e(e, t) {
  var n = o7e(t) ? t : IY(e);
  return {
    trackingType: n,
    isTracked: n === "1"
  };
}
function o7e(e) {
  return e === "0" || e === "1";
}
var ED = !1;
function oy(e) {
  var t = window;
  if ($Y()) {
    var n = r(t.DD_RUM_SYNTHETICS);
    return !n && !ED && (ED = !0, SY("Logs sent before RUM is injected by the synthetics worker", {
      testId: WBe(),
      resultId: VBe()
    })), n;
  }
  return r(t.DD_RUM);
  function r(o) {
    if (o && o.getInternalContext)
      return o.getInternalContext(e);
  }
}
function i7e(e, t, n, r, o) {
  var i = ZBe.concat(["custom"]), a = {};
  i.forEach(function(l) {
    a[l] = gBe(l, t.eventRateLimiterThreshold, o);
  }), n.subscribe(0, function(l) {
    var s, c, p = l.rawLogsEvent, f = l.messageContext, m = f === void 0 ? void 0 : f, h = l.savedCommonContext, g = h === void 0 ? void 0 : h, v = GMe(p.date), S = e.findTrackedSession(v);
    if (S) {
      var w = g || r(), x = Uc({
        service: t.service,
        session_id: S.id,
        // Insert user first to allow overrides from global context
        usr: N2(w.user) ? void 0 : w.user,
        view: w.view
      }, w.context, oy(v), p, m);
      ((s = t.beforeSend) === null || s === void 0 ? void 0 : s.call(t, x)) === !1 || x.origin !== vi.AGENT && ((c = a[x.status]) !== null && c !== void 0 ? c : a.custom).isLimitReached() || n.notify(1, x);
    }
  });
}
var fs, a7e = (fs = {}, fs[Fo.log] = on.info, fs[Fo.debug] = on.debug, fs[Fo.info] = on.info, fs[Fo.warn] = on.warn, fs[Fo.error] = on.error, fs);
function l7e(e, t) {
  var n = EBe(e.forwardConsoleLogs).subscribe(function(r) {
    t.notify(0, {
      rawLogsEvent: {
        date: Yl(),
        message: r.message,
        origin: vi.CONSOLE,
        error: r.api === Fo.error ? {
          stack: r.stack,
          fingerprint: r.fingerprint
        } : void 0,
        status: a7e[r.api]
      }
    });
  });
  return {
    stop: function() {
      n.unsubscribe();
    }
  };
}
var fd, s7e = (fd = {}, fd[zl.cspViolation] = on.error, fd[zl.intervention] = on.error, fd[zl.deprecation] = on.warn, fd);
function u7e(e, t) {
  var n = R8e(e, e.forwardReports).subscribe(function(r) {
    var o = r.message, i = s7e[r.type], a;
    i === on.error ? a = {
      kind: r.subtype,
      stack: r.stack
    } : r.stack && (o += " Found in ".concat(x8e(r.stack))), t.notify(0, {
      rawLogsEvent: {
        date: Yl(),
        message: o,
        origin: vi.REPORT,
        error: a,
        status: i
      }
    });
  });
  return {
    stop: function() {
      n.unsubscribe();
    }
  };
}
function c7e(e, t) {
  if (!e.forwardErrorsToLogs)
    return { stop: em };
  var n = yBe(e).subscribe(function(i) {
    i.state === "complete" && o("xhr", i);
  }), r = SBe().subscribe(function(i) {
    i.state === "resolve" && o("fetch", i);
  });
  function o(i, a) {
    !e.isIntakeUrl(a.url) && (m7e(a) || _Y(a.status)) && ("xhr" in a ? f7e(a.xhr, e, l) : a.response ? p7e(a.response, e, l) : a.error && d7e(a.error, e, l));
    function l(s) {
      t.notify(0, {
        rawLogsEvent: {
          message: "".concat(h7e(i), " error ").concat(a.method, " ").concat(a.url),
          date: a.startClocks.timeStamp,
          error: {
            stack: s || "Failed to load"
          },
          http: {
            method: a.method,
            // Cast resource method because of case mismatch cf issue RUMF-1152
            status_code: a.status,
            url: a.url
          },
          status: on.error,
          origin: vi.NETWORK
        }
      });
    }
  }
  return {
    stop: function() {
      n.unsubscribe(), r.unsubscribe();
    }
  };
}
function f7e(e, t, n) {
  typeof e.response == "string" ? n(W2(e.response, t)) : n(e.response);
}
function d7e(e, t, n) {
  n(W2(lu(qa(e)), t));
}
function p7e(e, t, n) {
  var r = Z8e(e);
  !r || !r.body ? n() : window.TextDecoder ? g7e(r.body, t.requestErrorResponseLengthLimit, function(o, i) {
    n(o ? "Unable to retrieve response: ".concat(o) : i);
  }) : r.text().then(zt(function(o) {
    return n(W2(o, t));
  }), zt(function(o) {
    return n("Unable to retrieve response: ".concat(o));
  }));
}
function m7e(e) {
  return e.status === 0 && e.responseType !== "opaque";
}
function W2(e, t) {
  return e.length > t.requestErrorResponseLengthLimit ? "".concat(e.substring(0, t.requestErrorResponseLengthLimit), "...") : e;
}
function h7e(e) {
  return e === "xhr" ? "XHR" : "Fetch";
}
function g7e(e, t, n) {
  MBe(e, function(r, o, i) {
    if (r)
      n(r);
    else {
      var a = new TextDecoder().decode(o);
      i && (a += "..."), n(void 0, a);
    }
  }, {
    bytesLimit: t,
    collectStreamBody: !0
  });
}
function y7e(e, t) {
  if (!e.forwardErrorsToLogs)
    return { stop: em };
  var n = new Vr(), r = _8e(n).stop, o = n.subscribe(function(i) {
    t.notify(0, {
      rawLogsEvent: {
        message: i.message,
        date: i.startClocks.timeStamp,
        error: {
          kind: i.type,
          stack: i.stack
        },
        origin: vi.SOURCE,
        status: on.error
      }
    });
  });
  return {
    stop: function() {
      r(), o.unsubscribe();
    }
  };
}
var v7e = hBe, zu, CD = (zu = {}, zu[on.debug] = 0, zu[on.info] = 1, zu[on.warn] = 2, zu[on.error] = 3, zu);
function b7e(e) {
  function t(n, r, o, i) {
    var a = Uc(r.getContext(), n.context);
    PD(n.status, LE.console, r) && w7e(n, a), PD(n.status, LE.http, r) && e.notify(0, {
      rawLogsEvent: {
        date: i || Yl(),
        message: n.message,
        status: n.status,
        origin: vi.LOGGER
      },
      messageContext: a,
      savedCommonContext: o
    });
  }
  return {
    handleLog: t
  };
}
function PD(e, t, n) {
  var r = n.getHandler(), o = Array.isArray(r) ? r : [r];
  return CD[e] >= CD[n.getLevel()] && gf(o, t);
}
function w7e(e, t) {
  ks[e.status].call(Mi, e.message, t);
}
function x7e(e, t, n, r, o) {
  var i = NY(e, {
    endpoint: e.logsEndpointBuilder,
    encoder: Mw()
  }, e.replica && {
    endpoint: e.replica.logsEndpointBuilder,
    encoder: Mw()
  }, n, r, o.expireObservable);
  return t.subscribe(1, function(a) {
    i.add(a);
  }), i;
}
function S7e(e) {
  var t = U2();
  e.subscribe(1, function(n) {
    t.send("log", n);
  });
}
function k7e(e) {
  return {
    get: function(t) {
      var n = e.findTrackedSession(t);
      if (n)
        return {
          session_id: n.id
        };
    }
  };
}
function _7e(e) {
  return function(t) {
    e.notify(0, {
      rawLogsEvent: {
        message: t.message,
        date: t.startClocks.timeStamp,
        origin: vi.AGENT,
        status: on.error
      }
    }), SY("Error reported to customer", { "error.message": t.message });
  };
}
function O7e(e, t, n, r, o) {
  var i = D8e("browser-logs-sdk", t);
  i.setContextProvider(function() {
    var f, m, h, g, v, S;
    return {
      application: {
        id: (f = oy()) === null || f === void 0 ? void 0 : f.application_id
      },
      session: {
        id: (m = o.findTrackedSession()) === null || m === void 0 ? void 0 : m.id
      },
      view: {
        id: (g = (h = oy()) === null || h === void 0 ? void 0 : h.view) === null || g === void 0 ? void 0 : g.id
      },
      action: {
        id: (S = (v = oy()) === null || v === void 0 ? void 0 : v.user_action) === null || S === void 0 ? void 0 : S.id
      }
    };
  });
  var a = [];
  if (Fw()) {
    var l = U2(), s = i.observable.subscribe(function(f) {
      return l.send("internal_telemetry", f);
    });
    a.push(function() {
      return s.unsubscribe();
    });
  } else {
    var c = NY(t, {
      endpoint: t.rumEndpointBuilder,
      encoder: Mw()
    }, t.replica && {
      endpoint: t.replica.rumEndpointBuilder,
      encoder: Mw()
    }, n, r, o.expireObservable);
    a.push(function() {
      return c.stop();
    });
    var p = i.observable.subscribe(function(f) {
      return c.add(f, M8e(t));
    });
    a.push(function() {
      return p.unsubscribe();
    });
  }
  return B8e(YBe(e)), {
    telemetry: i,
    stop: function() {
      a.forEach(function(f) {
        return f();
      });
    }
  };
}
function E7e(e, t, n) {
  var r = new v7e(), o = [];
  r.subscribe(1, function(m) {
    return wY("logs", m);
  });
  var i = _7e(r), a = cBe(t), l = t.sessionStoreStrategyType && !Fw() && !$Y() ? t7e(t) : n7e(t), s = O7e(e, t, i, a, l).stop;
  o.push(function() {
    return s();
  }), c7e(t, r), y7e(t, r), l7e(t, r), u7e(t, r);
  var c = b7e(r).handleLog;
  if (i7e(l, t, r, n, i), Fw())
    S7e(r);
  else {
    var p = x7e(t, r, i, a, l).stop;
    o.push(function() {
      return p();
    });
  }
  var f = k7e(l);
  return {
    handleLog: c,
    getInternalContext: f.get,
    stop: function() {
      o.forEach(function(m) {
        return m();
      });
    }
  };
}
var _d = JBe(E7e);
P8e(Xl(), "DD_LOGS", _d);
let cg;
const C7e = new Uint8Array(16);
function P7e() {
  if (!cg && (cg = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !cg))
    throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
  return cg(C7e);
}
const Mn = [];
for (let e = 0; e < 256; ++e)
  Mn.push((e + 256).toString(16).slice(1));
function R7e(e, t = 0) {
  return Mn[e[t + 0]] + Mn[e[t + 1]] + Mn[e[t + 2]] + Mn[e[t + 3]] + "-" + Mn[e[t + 4]] + Mn[e[t + 5]] + "-" + Mn[e[t + 6]] + Mn[e[t + 7]] + "-" + Mn[e[t + 8]] + Mn[e[t + 9]] + "-" + Mn[e[t + 10]] + Mn[e[t + 11]] + Mn[e[t + 12]] + Mn[e[t + 13]] + Mn[e[t + 14]] + Mn[e[t + 15]];
}
const T7e = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), RD = {
  randomUUID: T7e
};
function j7e(e, t, n) {
  if (RD.randomUUID && !t && !e)
    return RD.randomUUID();
  e = e || {};
  const r = e.random || (e.rng || P7e)();
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
    n = n || 0;
    for (let o = 0; o < 16; ++o)
      t[n + o] = r[o];
    return t;
  }
  return R7e(r);
}
function TD(e, t) {
  return e ?? t();
}
const jD = "gradio";
function N7e(e) {
  const t = e.themeMode === "system" ? void 0 : e.themeMode, n = b.useMemo(
    () => ({
      colorScheme: t,
      defaultGradient: {
        from: "#E88949",
        to: "#E85921",
        deg: 90
      },
      globalStyles: (a) => {
        const l = a.colorScheme === "light" ? "#E5E7EB" : "#384152", s = a.colorScheme === "light" ? "white" : "#374151";
        return {
          "div.editorBackground": {
            background: a.colorScheme === "light" ? "white" : "#0b0f19",
            ".mantine-Input-input": {
              border: `1px solid ${l} !important`,
              boxShadow: "0px 1px 4px 0px rgba(0, 0, 0, 0.05) inset",
              backgroundColor: s,
              ":focus": {
                outline: "solid 1px #E85921 !important",
                outlineOffset: "-1px"
              }
            }
          }
        };
      }
    }),
    [t]
  ), r = b.useCallback(async () => {
    if (TD("production", () => "production") === "development")
      return;
    const l = j7e();
    _d.init({
      clientToken: "pub356987caf022337989e492681d1944a8",
      env: TD("production", () => "development"),
      service: "gradio-notebook",
      site: "us5.datadoghq.com",
      forwardErrorsToLogs: !0,
      sessionSampleRate: 100
    }), _d.setGlobalContextProperty("mode", jD), _d.setGlobalContextProperty("session_id_internal", l);
  }, []);
  b.useEffect(() => {
    r();
  }, [r]);
  const o = b.useCallback(
    (a, l) => {
      try {
        _d.logger.info(a, l);
      } catch {
      }
    },
    []
  ), i = {
    ...e.editorCallbacks,
    logEventHandler: o
  };
  return /* @__PURE__ */ Pn.jsx(qq, { withGlobalStyles: !0, withNormalizeCSS: !0, theme: n, children: /* @__PURE__ */ Pn.jsxs("div", { className: "editorBackground", children: [
    /* @__PURE__ */ Pn.jsxs(R2, { direction: "column", p: "0 1rem", mt: "1rem", children: [
      /* @__PURE__ */ Pn.jsx(FMe, {}),
      /* @__PURE__ */ Pn.jsx(LMe, { onSetToken: e.onSetApiToken })
    ] }),
    /* @__PURE__ */ Pn.jsx(
      s5e,
      {
        callbacks: i,
        aiconfig: e.aiconfig,
        mode: jD,
        themeMode: t
      }
    )
  ] }) });
}
var v0 = new Intl.Collator(0, { numeric: 1 }).compare;
function ND(e, t, n) {
  return e = e.split("."), t = t.split("."), v0(e[0], t[0]) || v0(e[1], t[1]) || (t[2] = t.slice(2).join("."), n = /[.-]/.test(e[2] = e.slice(2).join(".")), n == /[.-]/.test(t[2]) ? v0(e[2], t[2]) : n ? -1 : 1);
}
function AY(e, t, n) {
  return t.startsWith("http://") || t.startsWith("https://") ? n ? e : t : e + t;
}
function b0(e) {
  if (e.startsWith("http")) {
    const { protocol: t, host: n } = new URL(e);
    return n.endsWith("hf.space") ? {
      ws_protocol: "wss",
      host: n,
      http_protocol: t
    } : {
      ws_protocol: t === "https:" ? "wss" : "ws",
      http_protocol: t,
      host: n
    };
  } else if (e.startsWith("file:"))
    return {
      ws_protocol: "ws",
      http_protocol: "http:",
      host: "lite.local"
      // Special fake hostname only used for this case. This matches the hostname allowed in `is_self_host()` in `js/wasm/network/host.ts`.
    };
  return {
    ws_protocol: "wss",
    http_protocol: "https:",
    host: e
  };
}
const zY = /^[^\/]*\/[^\/]*$/, $7e = /.*hf\.space\/{0,1}$/;
async function I7e(e, t) {
  const n = {};
  t && (n.Authorization = `Bearer ${t}`);
  const r = e.trim();
  if (zY.test(r))
    try {
      const o = await fetch(
        `https://huggingface.co/api/spaces/${r}/host`,
        { headers: n }
      );
      if (o.status !== 200)
        throw new Error("Space metadata could not be loaded.");
      const i = (await o.json()).host;
      return {
        space_id: e,
        ...b0(i)
      };
    } catch (o) {
      throw new Error("Space metadata could not be loaded." + o.message);
    }
  if ($7e.test(r)) {
    const { ws_protocol: o, http_protocol: i, host: a } = b0(r);
    return {
      space_id: a.replace(".hf.space", ""),
      ws_protocol: o,
      http_protocol: i,
      host: a
    };
  }
  return {
    space_id: !1,
    ...b0(r)
  };
}
function A7e(e) {
  let t = {};
  return e.forEach(({ api_name: n }, r) => {
    n && (t[n] = r);
  }), t;
}
const z7e = /^(?=[^]*\b[dD]iscussions{0,1}\b)(?=[^]*\b[dD]isabled\b)[^]*$/;
async function $D(e) {
  try {
    const n = (await fetch(
      `https://huggingface.co/api/spaces/${e}/discussions`,
      {
        method: "HEAD"
      }
    )).headers.get("x-error-message");
    return !(n && z7e.test(n));
  } catch {
    return !1;
  }
}
function Od(e, t, n) {
  if (e == null)
    return null;
  if (Array.isArray(e)) {
    const r = [];
    for (const o of e)
      o == null ? r.push(null) : r.push(Od(o, t, n));
    return r;
  }
  return e.is_stream ? n == null ? new iy({
    ...e,
    url: t + "/stream/" + e.path
  }) : new iy({
    ...e,
    url: "/proxy=" + n + "stream/" + e.path
  }) : new iy({
    ...e,
    url: D7e(e.path, t, n)
  });
}
function L7e(e) {
  try {
    const t = new URL(e);
    return t.protocol === "http:" || t.protocol === "https:";
  } catch {
    return !1;
  }
}
function D7e(e, t, n) {
  return e == null ? n ? `/proxy=${n}file=` : `${t}/file=` : L7e(e) ? e : n ? `/proxy=${n}file=${e}` : `${t}/file=${e}`;
}
class iy {
  constructor({
    path: t,
    url: n,
    orig_name: r,
    size: o,
    blob: i,
    is_stream: a,
    mime_type: l,
    alt_text: s
  }) {
    this.path = t, this.url = n, this.orig_name = r, this.size = o, this.blob = n ? void 0 : i, this.is_stream = a, this.mime_type = l, this.alt_text = s;
  }
}
const LY = "This application is too busy. Keep trying!", ds = "Connection errored out.";
let DY;
function F7e(e, t) {
  return { post_data: n, upload_files: r, client: o, handle_blob: i };
  async function n(a, l, s) {
    const c = { "Content-Type": "application/json" };
    s && (c.Authorization = `Bearer ${s}`);
    try {
      var p = await e(a, {
        method: "POST",
        body: JSON.stringify(l),
        headers: c
      });
    } catch {
      return [{ error: ds }, 500];
    }
    let f, m;
    try {
      f = await p.json(), m = p.status;
    } catch (h) {
      f = { error: `Could not parse server response: ${h}` }, m = 500;
    }
    return [f, m];
  }
  async function r(a, l, s, c) {
    const p = {};
    s && (p.Authorization = `Bearer ${s}`);
    const f = 1e3, m = [];
    for (let g = 0; g < l.length; g += f) {
      const v = l.slice(g, g + f), S = new FormData();
      v.forEach((x) => {
        S.append("files", x);
      });
      try {
        const x = c ? `${a}/upload?upload_id=${c}` : `${a}/upload`;
        var h = await e(x, {
          method: "POST",
          body: S,
          headers: p
        });
      } catch {
        return { error: ds };
      }
      const w = await h.json();
      m.push(...w);
    }
    return { files: m };
  }
  async function o(a, l = { normalise_files: !0 }) {
    return new Promise(async (s) => {
      const { status_callback: c, hf_token: p, normalise_files: f } = l, m = {
        predict: U,
        submit: Q,
        view_api: A,
        component_server: ee
      }, h = f ?? !0;
      if ((typeof window > "u" || !("WebSocket" in window)) && !global.Websocket) {
        const X = await import("./wrapper-6f348d45-pgNaiy2L.js");
        DY = (await import("./__vite-browser-external-jWVCDlBL.js")).Blob, global.WebSocket = X.WebSocket;
      }
      const { ws_protocol: g, http_protocol: v, host: S, space_id: w } = await I7e(a, p), x = Math.random().toString(36).substring(2), k = {};
      let E = !1, O = {}, C = null;
      const R = {}, L = /* @__PURE__ */ new Set();
      let D, N = {}, H = !1;
      p && w && (H = await B7e(w, p));
      async function B(X) {
        if (D = X, N = A7e((X == null ? void 0 : X.dependencies) || []), D.auth_required)
          return {
            config: D,
            ...m
          };
        try {
          K = await A(D);
        } catch (ie) {
          console.error(`Could not get api details: ${ie.message}`);
        }
        return {
          config: D,
          ...m
        };
      }
      let K;
      async function W(X) {
        if (c && c(X), X.status === "running")
          try {
            D = await LD(
              e,
              `${v}//${S}`,
              p
            );
            const ie = await B(D);
            s(ie);
          } catch (ie) {
            console.error(ie), c && c({
              status: "error",
              message: "Could not load this space.",
              load_status: "error",
              detail: "NOT_FOUND"
            });
          }
      }
      try {
        D = await LD(
          e,
          `${v}//${S}`,
          p
        );
        const X = await B(D);
        s(X);
      } catch (X) {
        console.error(X), w ? FE(
          w,
          zY.test(w) ? "space_name" : "subdomain",
          W
        ) : c && c({
          status: "error",
          message: "Could not load this space.",
          load_status: "error",
          detail: "NOT_FOUND"
        });
      }
      function U(X, ie, j) {
        let le = !1, re = !1, he;
        if (typeof X == "number")
          he = D.dependencies[X];
        else {
          const xe = X.replace(/^\//, "");
          he = D.dependencies[N[xe]];
        }
        if (he.types.continuous)
          throw new Error(
            "Cannot call predict on this function as it may run forever. Use submit instead"
          );
        return new Promise((xe, ke) => {
          const Ae = Q(X, ie, j);
          let pe;
          Ae.on("data", (Me) => {
            re && (Ae.destroy(), xe(Me)), le = !0, pe = Me;
          }).on("status", (Me) => {
            Me.stage === "error" && ke(Me), Me.stage === "complete" && (re = !0, le && (Ae.destroy(), xe(pe)));
          });
        });
      }
      function Q(X, ie, j, le = null) {
        let re, he;
        if (typeof X == "number")
          re = X, he = K.unnamed_endpoints[re];
        else {
          const we = X.replace(/^\//, "");
          re = N[we], he = K.named_endpoints[X.trim()];
        }
        if (typeof re != "number")
          throw new Error(
            "There is no endpoint matching that name of fn_index matching that number."
          );
        let xe, ke, Ae = D.protocol ?? "ws";
        const pe = typeof X == "number" ? "/predict" : X;
        let Me, We = null, ze = !1;
        const Fe = {};
        let Ye = "";
        typeof window < "u" && (Ye = new URLSearchParams(window.location.search).toString()), i(`${D.root}`, ie, he, p).then(
          (we) => {
            if (Me = {
              data: we || [],
              event_data: j,
              fn_index: re,
              trigger_id: le
            }, U7e(re, D))
              oe({
                type: "status",
                endpoint: pe,
                stage: "pending",
                queue: !1,
                fn_index: re,
                time: /* @__PURE__ */ new Date()
              }), n(
                `${D.root}/run${pe.startsWith("/") ? pe : `/${pe}`}${Ye ? "?" + Ye : ""}`,
                {
                  ...Me,
                  session_hash: x
                },
                p
              ).then(([$e, ue]) => {
                const Pe = h ? fg(
                  $e.data,
                  he,
                  D.root,
                  D.root_url
                ) : $e.data;
                ue == 200 ? (oe({
                  type: "data",
                  endpoint: pe,
                  fn_index: re,
                  data: Pe,
                  time: /* @__PURE__ */ new Date()
                }), oe({
                  type: "status",
                  endpoint: pe,
                  fn_index: re,
                  stage: "complete",
                  eta: $e.average_duration,
                  queue: !1,
                  time: /* @__PURE__ */ new Date()
                })) : oe({
                  type: "status",
                  stage: "error",
                  endpoint: pe,
                  fn_index: re,
                  message: $e.error,
                  queue: !1,
                  time: /* @__PURE__ */ new Date()
                });
              }).catch(($e) => {
                oe({
                  type: "status",
                  stage: "error",
                  message: $e.message,
                  endpoint: pe,
                  fn_index: re,
                  queue: !1,
                  time: /* @__PURE__ */ new Date()
                });
              });
            else if (Ae == "ws") {
              oe({
                type: "status",
                stage: "pending",
                queue: !0,
                endpoint: pe,
                fn_index: re,
                time: /* @__PURE__ */ new Date()
              });
              let $e = new URL(`${g}://${AY(
                S,
                D.path,
                !0
              )}
							/queue/join${Ye ? "?" + Ye : ""}`);
              H && $e.searchParams.set("__sign", H), xe = new WebSocket($e), xe.onclose = (ue) => {
                ue.wasClean || oe({
                  type: "status",
                  stage: "error",
                  broken: !0,
                  message: ds,
                  queue: !0,
                  endpoint: pe,
                  fn_index: re,
                  time: /* @__PURE__ */ new Date()
                });
              }, xe.onmessage = function(ue) {
                const Pe = JSON.parse(ue.data), { type: Je, status: Y, data: te } = x0(
                  Pe,
                  k[re]
                );
                if (Je === "update" && Y && !ze)
                  oe({
                    type: "status",
                    endpoint: pe,
                    fn_index: re,
                    time: /* @__PURE__ */ new Date(),
                    ...Y
                  }), Y.stage === "error" && xe.close();
                else if (Je === "hash") {
                  xe.send(JSON.stringify({ fn_index: re, session_hash: x }));
                  return;
                } else
                  Je === "data" ? xe.send(JSON.stringify({ ...Me, session_hash: x })) : Je === "complete" ? ze = Y : Je === "log" ? oe({
                    type: "log",
                    log: te.log,
                    level: te.level,
                    endpoint: pe,
                    fn_index: re
                  }) : Je === "generating" && oe({
                    type: "status",
                    time: /* @__PURE__ */ new Date(),
                    ...Y,
                    stage: Y == null ? void 0 : Y.stage,
                    queue: !0,
                    endpoint: pe,
                    fn_index: re
                  });
                te && (oe({
                  type: "data",
                  time: /* @__PURE__ */ new Date(),
                  data: h ? fg(
                    te.data,
                    he,
                    D.root,
                    D.root_url
                  ) : te.data,
                  endpoint: pe,
                  fn_index: re
                }), ze && (oe({
                  type: "status",
                  time: /* @__PURE__ */ new Date(),
                  ...ze,
                  stage: Y == null ? void 0 : Y.stage,
                  queue: !0,
                  endpoint: pe,
                  fn_index: re
                }), xe.close()));
              }, ND(D.version || "2.0.0", "3.6") < 0 && addEventListener(
                "open",
                () => xe.send(JSON.stringify({ hash: x }))
              );
            } else if (Ae == "sse") {
              oe({
                type: "status",
                stage: "pending",
                queue: !0,
                endpoint: pe,
                fn_index: re,
                time: /* @__PURE__ */ new Date()
              });
              var Ge = new URLSearchParams({
                fn_index: re.toString(),
                session_hash: x
              }).toString();
              let $e = new URL(
                `${D.root}/queue/join?${Ye ? Ye + "&" : ""}${Ge}`
              );
              ke = t($e), ke.onmessage = async function(ue) {
                const Pe = JSON.parse(ue.data), { type: Je, status: Y, data: te } = x0(
                  Pe,
                  k[re]
                );
                if (Je === "update" && Y && !ze)
                  oe({
                    type: "status",
                    endpoint: pe,
                    fn_index: re,
                    time: /* @__PURE__ */ new Date(),
                    ...Y
                  }), Y.stage === "error" && ke.close();
                else if (Je === "data") {
                  We = Pe.event_id;
                  let [Ne, et] = await n(
                    `${D.root}/queue/data`,
                    {
                      ...Me,
                      session_hash: x,
                      event_id: We
                    },
                    p
                  );
                  et !== 200 && (oe({
                    type: "status",
                    stage: "error",
                    message: ds,
                    queue: !0,
                    endpoint: pe,
                    fn_index: re,
                    time: /* @__PURE__ */ new Date()
                  }), ke.close());
                } else
                  Je === "complete" ? ze = Y : Je === "log" ? oe({
                    type: "log",
                    log: te.log,
                    level: te.level,
                    endpoint: pe,
                    fn_index: re
                  }) : Je === "generating" && oe({
                    type: "status",
                    time: /* @__PURE__ */ new Date(),
                    ...Y,
                    stage: Y == null ? void 0 : Y.stage,
                    queue: !0,
                    endpoint: pe,
                    fn_index: re
                  });
                te && (oe({
                  type: "data",
                  time: /* @__PURE__ */ new Date(),
                  data: h ? fg(
                    te.data,
                    he,
                    D.root,
                    D.root_url
                  ) : te.data,
                  endpoint: pe,
                  fn_index: re
                }), ze && (oe({
                  type: "status",
                  time: /* @__PURE__ */ new Date(),
                  ...ze,
                  stage: Y == null ? void 0 : Y.stage,
                  queue: !0,
                  endpoint: pe,
                  fn_index: re
                }), ke.close()));
              };
            } else
              Ae == "sse_v1" && (oe({
                type: "status",
                stage: "pending",
                queue: !0,
                endpoint: pe,
                fn_index: re,
                time: /* @__PURE__ */ new Date()
              }), n(
                `${D.root}/queue/join?${Ye}`,
                {
                  ...Me,
                  session_hash: x
                },
                p
              ).then(([$e, ue]) => {
                if (ue === 503)
                  oe({
                    type: "status",
                    stage: "error",
                    message: LY,
                    queue: !0,
                    endpoint: pe,
                    fn_index: re,
                    time: /* @__PURE__ */ new Date()
                  });
                else if (ue !== 200)
                  oe({
                    type: "status",
                    stage: "error",
                    message: ds,
                    queue: !0,
                    endpoint: pe,
                    fn_index: re,
                    time: /* @__PURE__ */ new Date()
                  });
                else {
                  We = $e.event_id;
                  let Pe = async function(Je) {
                    try {
                      const { type: Y, status: te, data: Ne } = x0(
                        Je,
                        k[re]
                      );
                      if (Y == "heartbeat")
                        return;
                      if (Y === "update" && te && !ze)
                        oe({
                          type: "status",
                          endpoint: pe,
                          fn_index: re,
                          time: /* @__PURE__ */ new Date(),
                          ...te
                        });
                      else if (Y === "complete")
                        ze = te;
                      else if (Y == "unexpected_error")
                        console.error("Unexpected error", te == null ? void 0 : te.message), oe({
                          type: "status",
                          stage: "error",
                          message: (te == null ? void 0 : te.message) || "An Unexpected Error Occurred!",
                          queue: !0,
                          endpoint: pe,
                          fn_index: re,
                          time: /* @__PURE__ */ new Date()
                        });
                      else if (Y === "log") {
                        oe({
                          type: "log",
                          log: Ne.log,
                          level: Ne.level,
                          endpoint: pe,
                          fn_index: re
                        });
                        return;
                      } else
                        Y === "generating" && oe({
                          type: "status",
                          time: /* @__PURE__ */ new Date(),
                          ...te,
                          stage: te == null ? void 0 : te.stage,
                          queue: !0,
                          endpoint: pe,
                          fn_index: re
                        });
                      Ne && (oe({
                        type: "data",
                        time: /* @__PURE__ */ new Date(),
                        data: h ? fg(
                          Ne.data,
                          he,
                          D.root,
                          D.root_url
                        ) : Ne.data,
                        endpoint: pe,
                        fn_index: re
                      }), ze && oe({
                        type: "status",
                        time: /* @__PURE__ */ new Date(),
                        ...ze,
                        stage: te == null ? void 0 : te.stage,
                        queue: !0,
                        endpoint: pe,
                        fn_index: re
                      })), ((te == null ? void 0 : te.stage) === "complete" || (te == null ? void 0 : te.stage) === "error") && R[We] && delete R[We];
                    } catch (Y) {
                      console.error("Unexpected client exception", Y), oe({
                        type: "status",
                        stage: "error",
                        message: "An Unexpected Error Occurred!",
                        queue: !0,
                        endpoint: pe,
                        fn_index: re,
                        time: /* @__PURE__ */ new Date()
                      }), q();
                    }
                  };
                  We in O && (O[We].forEach(
                    (Je) => Pe(Je)
                  ), delete O[We]), R[We] = Pe, L.add(We), E || J();
                }
              }));
          }
        );
        function oe(we) {
          const $e = Fe[we.type] || [];
          $e == null || $e.forEach((ue) => ue(we));
        }
        function ae(we, Ge) {
          const $e = Fe, ue = $e[we] || [];
          return $e[we] = ue, ue == null || ue.push(Ge), { on: ae, off: Ie, cancel: Ce, destroy: ye };
        }
        function Ie(we, Ge) {
          const $e = Fe;
          let ue = $e[we] || [];
          return ue = ue == null ? void 0 : ue.filter((Pe) => Pe !== Ge), $e[we] = ue, { on: ae, off: Ie, cancel: Ce, destroy: ye };
        }
        async function Ce() {
          const we = {
            stage: "complete",
            queue: !1,
            time: /* @__PURE__ */ new Date()
          };
          ze = we, oe({
            ...we,
            type: "status",
            endpoint: pe,
            fn_index: re
          });
          let Ge = {};
          Ae === "ws" ? (xe && xe.readyState === 0 ? xe.addEventListener("open", () => {
            xe.close();
          }) : xe.close(), Ge = { fn_index: re, session_hash: x }) : (ke.close(), Ge = { event_id: We });
          try {
            await e(`${D.root}/reset`, {
              headers: { "Content-Type": "application/json" },
              method: "POST",
              body: JSON.stringify(Ge)
            });
          } catch {
            console.warn(
              "The `/reset` endpoint could not be called. Subsequent endpoint results may be unreliable."
            );
          }
        }
        function ye() {
          for (const we in Fe)
            Fe[we].forEach((Ge) => {
              Ie(we, Ge);
            });
        }
        return {
          on: ae,
          off: Ie,
          cancel: Ce,
          destroy: ye
        };
      }
      function J() {
        E = !0;
        let X = new URLSearchParams({
          session_hash: x
        }).toString(), ie = new URL(`${D.root}/queue/data?${X}`);
        C = t(ie), C.onmessage = async function(j) {
          let le = JSON.parse(j.data);
          const re = le.event_id;
          if (!re)
            await Promise.all(
              Object.keys(R).map(
                (he) => R[he](le)
              )
            );
          else if (R[re]) {
            le.msg === "process_completed" && (L.delete(re), L.size === 0 && q());
            let he = R[re];
            window.setTimeout(he, 0, le);
          } else
            O[re] || (O[re] = []), O[re].push(le);
        }, C.onerror = async function(j) {
          await Promise.all(
            Object.keys(R).map(
              (le) => R[le]({
                msg: "unexpected_error",
                message: ds
              })
            )
          ), q();
        };
      }
      function q() {
        E = !1, C == null || C.close();
      }
      async function ee(X, ie, j) {
        var le;
        const re = { "Content-Type": "application/json" };
        p && (re.Authorization = `Bearer ${p}`);
        let he, xe = D.components.find(
          (pe) => pe.id === X
        );
        (le = xe == null ? void 0 : xe.props) != null && le.root_url ? he = xe.props.root_url : he = D.root;
        const ke = await e(
          `${he}/component_server/`,
          {
            method: "POST",
            body: JSON.stringify({
              data: j,
              component_id: X,
              fn_name: ie,
              session_hash: x
            }),
            headers: re
          }
        );
        if (!ke.ok)
          throw new Error(
            "Could not connect to component server: " + ke.statusText
          );
        return await ke.json();
      }
      async function A(X) {
        if (K)
          return K;
        const ie = { "Content-Type": "application/json" };
        p && (ie.Authorization = `Bearer ${p}`);
        let j;
        if (ND(X.version || "2.0.0", "3.30") < 0 ? j = await e(
          "https://gradio-space-api-fetcher-v2.hf.space/api",
          {
            method: "POST",
            body: JSON.stringify({
              serialize: !1,
              config: JSON.stringify(X)
            }),
            headers: ie
          }
        ) : j = await e(`${X.root}/info`, {
          headers: ie
        }), !j.ok)
          throw new Error(ds);
        let le = await j.json();
        return "api" in le && (le = le.api), le.named_endpoints["/predict"] && !le.unnamed_endpoints[0] && (le.unnamed_endpoints[0] = le.named_endpoints["/predict"]), M7e(le, X, N);
      }
    });
  }
  async function i(a, l, s, c) {
    const p = await DE(
      l,
      void 0,
      [],
      !0,
      s
    );
    return Promise.all(
      p.map(async ({ path: f, blob: m, type: h }) => {
        if (m) {
          const g = (await r(a, [m], c)).files[0];
          return { path: f, file_url: g, type: h, name: m == null ? void 0 : m.name };
        }
        return { path: f, type: h };
      })
    ).then((f) => (f.forEach(({ path: m, file_url: h, type: g, name: v }) => {
      if (g === "Gallery")
        zD(l, h, m);
      else if (h) {
        const S = new iy({ path: h, orig_name: v });
        zD(l, S, m);
      }
    }), l));
  }
}
const { post_data: sHe, upload_files: uHe, client: w0, handle_blob: cHe } = F7e(
  fetch,
  (...e) => new EventSource(...e)
);
function fg(e, t, n, r) {
  return e.map((o, i) => {
    var a, l, s, c;
    return ((l = (a = t == null ? void 0 : t.returns) == null ? void 0 : a[i]) == null ? void 0 : l.component) === "File" ? Od(o, n, r) : ((c = (s = t == null ? void 0 : t.returns) == null ? void 0 : s[i]) == null ? void 0 : c.component) === "Gallery" ? o.map((p) => Array.isArray(p) ? [Od(p[0], n, r), p[1]] : [Od(p, n, r), null]) : typeof o == "object" && o.path ? Od(o, n, r) : o;
  });
}
function ID(e, t, n, r) {
  switch (e.type) {
    case "string":
      return "string";
    case "boolean":
      return "boolean";
    case "number":
      return "number";
  }
  if (n === "JSONSerializable" || n === "StringSerializable")
    return "any";
  if (n === "ListStringSerializable")
    return "string[]";
  if (t === "Image")
    return r === "parameter" ? "Blob | File | Buffer" : "string";
  if (n === "FileSerializable")
    return (e == null ? void 0 : e.type) === "array" ? r === "parameter" ? "(Blob | File | Buffer)[]" : "{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}[]" : r === "parameter" ? "Blob | File | Buffer" : "{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}";
  if (n === "GallerySerializable")
    return r === "parameter" ? "[(Blob | File | Buffer), (string | null)][]" : "[{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}, (string | null))][]";
}
function AD(e, t) {
  return t === "GallerySerializable" ? "array of [file, label] tuples" : t === "ListStringSerializable" ? "array of strings" : t === "FileSerializable" ? "array of files or single file" : e.description;
}
function M7e(e, t, n) {
  const r = {
    named_endpoints: {},
    unnamed_endpoints: {}
  };
  for (const o in e) {
    const i = e[o];
    for (const a in i) {
      const l = t.dependencies[a] ? a : n[a.replace("/", "")], s = i[a];
      r[o][a] = {}, r[o][a].parameters = {}, r[o][a].returns = {}, r[o][a].type = t.dependencies[l].types, r[o][a].parameters = s.parameters.map(
        ({ label: c, component: p, type: f, serializer: m }) => ({
          label: c,
          component: p,
          type: ID(f, p, m, "parameter"),
          description: AD(f, m)
        })
      ), r[o][a].returns = s.returns.map(
        ({ label: c, component: p, type: f, serializer: m }) => ({
          label: c,
          component: p,
          type: ID(f, p, m, "return"),
          description: AD(f, m)
        })
      );
    }
  }
  return r;
}
async function B7e(e, t) {
  try {
    return (await (await fetch(`https://huggingface.co/api/spaces/${e}/jwt`, {
      headers: {
        Authorization: `Bearer ${t}`
      }
    })).json()).token || !1;
  } catch (n) {
    return console.error(n), !1;
  }
}
function zD(e, t, n) {
  for (; n.length > 1; )
    e = e[n.shift()];
  e[n.shift()] = t;
}
async function DE(e, t = void 0, n = [], r = !1, o = void 0) {
  if (Array.isArray(e)) {
    let i = [];
    return await Promise.all(
      e.map(async (a, l) => {
        var s;
        let c = n.slice();
        c.push(l);
        const p = await DE(
          e[l],
          r ? ((s = o == null ? void 0 : o.parameters[l]) == null ? void 0 : s.component) || void 0 : t,
          c,
          !1,
          o
        );
        i = i.concat(p);
      })
    ), i;
  } else {
    if (globalThis.Buffer && e instanceof globalThis.Buffer)
      return [
        {
          path: n,
          blob: t === "Image" ? !1 : new DY([e]),
          type: t
        }
      ];
    if (typeof e == "object") {
      let i = [];
      for (let a in e)
        if (e.hasOwnProperty(a)) {
          let l = n.slice();
          l.push(a), i = i.concat(
            await DE(
              e[a],
              void 0,
              l,
              !1,
              o
            )
          );
        }
      return i;
    }
  }
  return [];
}
function U7e(e, t) {
  var n, r, o, i;
  return !(((r = (n = t == null ? void 0 : t.dependencies) == null ? void 0 : n[e]) == null ? void 0 : r.queue) === null ? t.enable_queue : (i = (o = t == null ? void 0 : t.dependencies) == null ? void 0 : o[e]) != null && i.queue) || !1;
}
async function LD(e, t, n) {
  const r = {};
  if (n && (r.Authorization = `Bearer ${n}`), typeof window < "u" && window.gradio_config && location.origin !== "http://localhost:9876" && !window.gradio_config.dev_mode) {
    const o = window.gradio_config.root, i = window.gradio_config;
    return i.root = AY(t, i.root, !1), { ...i, path: o };
  } else if (t) {
    let o = await e(`${t}/config`, {
      headers: r
    });
    if (o.status === 200) {
      const i = await o.json();
      return i.path = i.path ?? "", i.root = t, i;
    }
    throw new Error("Could not get config.");
  }
  throw new Error("No config or app endpoint found");
}
async function FE(e, t, n) {
  let r = t === "subdomain" ? `https://huggingface.co/api/spaces/by-subdomain/${e}` : `https://huggingface.co/api/spaces/${e}`, o, i;
  try {
    if (o = await fetch(r), i = o.status, i !== 200)
      throw new Error();
    o = await o.json();
  } catch {
    n({
      status: "error",
      load_status: "error",
      message: "Could not get space status",
      detail: "NOT_FOUND"
    });
    return;
  }
  if (!o || i !== 200)
    return;
  const {
    runtime: { stage: a },
    id: l
  } = o;
  switch (a) {
    case "STOPPED":
    case "SLEEPING":
      n({
        status: "sleeping",
        load_status: "pending",
        message: "Space is asleep. Waking it up...",
        detail: a
      }), setTimeout(() => {
        FE(e, t, n);
      }, 1e3);
      break;
    case "PAUSED":
      n({
        status: "paused",
        load_status: "error",
        message: "This space has been paused by the author. If you would like to try this demo, consider duplicating the space.",
        detail: a,
        discussions_enabled: await $D(l)
      });
      break;
    case "RUNNING":
    case "RUNNING_BUILDING":
      n({
        status: "running",
        load_status: "complete",
        message: "",
        detail: a
      });
      break;
    case "BUILDING":
      n({
        status: "building",
        load_status: "pending",
        message: "Space is building...",
        detail: a
      }), setTimeout(() => {
        FE(e, t, n);
      }, 1e3);
      break;
    default:
      n({
        status: "space_error",
        load_status: "error",
        message: "This space is experiencing an issue.",
        detail: a,
        discussions_enabled: await $D(l)
      });
      break;
  }
}
function x0(e, t) {
  switch (e.msg) {
    case "send_data":
      return { type: "data" };
    case "send_hash":
      return { type: "hash" };
    case "queue_full":
      return {
        type: "update",
        status: {
          queue: !0,
          message: LY,
          stage: "error",
          code: e.code,
          success: e.success
        }
      };
    case "heartbeat":
      return {
        type: "heartbeat"
      };
    case "unexpected_error":
      return {
        type: "unexpected_error",
        status: {
          queue: !0,
          message: e.message,
          stage: "error",
          success: !1
        }
      };
    case "estimation":
      return {
        type: "update",
        status: {
          queue: !0,
          stage: t || "pending",
          code: e.code,
          size: e.queue_size,
          position: e.rank,
          eta: e.rank_eta,
          success: e.success
        }
      };
    case "progress":
      return {
        type: "update",
        status: {
          queue: !0,
          stage: "pending",
          code: e.code,
          progress_data: e.progress_data,
          success: e.success
        }
      };
    case "log":
      return { type: "log", data: e };
    case "process_generating":
      return {
        type: "generating",
        status: {
          queue: !0,
          message: e.success ? null : e.output.error,
          stage: e.success ? "generating" : "error",
          code: e.code,
          progress_data: e.progress_data,
          eta: e.average_duration
        },
        data: e.success ? e.output : null
      };
    case "process_completed":
      return "error" in e.output ? {
        type: "update",
        status: {
          queue: !0,
          message: e.output.error,
          stage: "error",
          code: e.code,
          success: e.success
        }
      } : {
        type: "complete",
        status: {
          queue: !0,
          message: e.success ? void 0 : e.output.error,
          stage: e.success ? "complete" : "error",
          code: e.code,
          progress_data: e.progress_data
        },
        data: e.success ? e.output : null
      };
    case "process_starts":
      return {
        type: "update",
        status: {
          queue: !0,
          stage: "pending",
          code: e.code,
          size: e.rank,
          position: 0,
          success: e.success,
          eta: e.eta
        }
      };
  }
  return { type: "none", status: { stage: "error", queue: !0 } };
}
const {
  SvelteComponent: H7e,
  assign: W7e,
  create_slot: V7e,
  detach: q7e,
  element: G7e,
  get_all_dirty_from_scope: K7e,
  get_slot_changes: Y7e,
  get_spread_update: X7e,
  init: Z7e,
  insert: Q7e,
  safe_not_equal: J7e,
  set_dynamic_element_data: DD,
  set_style: eo,
  toggle_class: cl,
  transition_in: FY,
  transition_out: MY,
  update_slot_base: eUe
} = window.__gradio__svelte__internal;
function tUe(e) {
  let t, n, r;
  const o = (
    /*#slots*/
    e[17].default
  ), i = V7e(
    o,
    e,
    /*$$scope*/
    e[16],
    null
  );
  let a = [
    { "data-testid": (
      /*test_id*/
      e[7]
    ) },
    { id: (
      /*elem_id*/
      e[2]
    ) },
    {
      class: n = "block " + /*elem_classes*/
      e[3].join(" ") + " svelte-1t38q2d"
    }
  ], l = {};
  for (let s = 0; s < a.length; s += 1)
    l = W7e(l, a[s]);
  return {
    c() {
      t = G7e(
        /*tag*/
        e[14]
      ), i && i.c(), DD(
        /*tag*/
        e[14]
      )(t, l), cl(
        t,
        "hidden",
        /*visible*/
        e[10] === !1
      ), cl(
        t,
        "padded",
        /*padding*/
        e[6]
      ), cl(
        t,
        "border_focus",
        /*border_mode*/
        e[5] === "focus"
      ), cl(t, "hide-container", !/*explicit_call*/
      e[8] && !/*container*/
      e[9]), eo(t, "height", typeof /*height*/
      e[0] == "number" ? (
        /*height*/
        e[0] + "px"
      ) : void 0), eo(t, "width", typeof /*width*/
      e[1] == "number" ? `calc(min(${/*width*/
      e[1]}px, 100%))` : void 0), eo(
        t,
        "border-style",
        /*variant*/
        e[4]
      ), eo(
        t,
        "overflow",
        /*allow_overflow*/
        e[11] ? "visible" : "hidden"
      ), eo(
        t,
        "flex-grow",
        /*scale*/
        e[12]
      ), eo(t, "min-width", `calc(min(${/*min_width*/
      e[13]}px, 100%))`), eo(t, "border-width", "var(--block-border-width)");
    },
    m(s, c) {
      Q7e(s, t, c), i && i.m(t, null), r = !0;
    },
    p(s, c) {
      i && i.p && (!r || c & /*$$scope*/
      65536) && eUe(
        i,
        o,
        s,
        /*$$scope*/
        s[16],
        r ? Y7e(
          o,
          /*$$scope*/
          s[16],
          c,
          null
        ) : K7e(
          /*$$scope*/
          s[16]
        ),
        null
      ), DD(
        /*tag*/
        s[14]
      )(t, l = X7e(a, [
        (!r || c & /*test_id*/
        128) && { "data-testid": (
          /*test_id*/
          s[7]
        ) },
        (!r || c & /*elem_id*/
        4) && { id: (
          /*elem_id*/
          s[2]
        ) },
        (!r || c & /*elem_classes*/
        8 && n !== (n = "block " + /*elem_classes*/
        s[3].join(" ") + " svelte-1t38q2d")) && { class: n }
      ])), cl(
        t,
        "hidden",
        /*visible*/
        s[10] === !1
      ), cl(
        t,
        "padded",
        /*padding*/
        s[6]
      ), cl(
        t,
        "border_focus",
        /*border_mode*/
        s[5] === "focus"
      ), cl(t, "hide-container", !/*explicit_call*/
      s[8] && !/*container*/
      s[9]), c & /*height*/
      1 && eo(t, "height", typeof /*height*/
      s[0] == "number" ? (
        /*height*/
        s[0] + "px"
      ) : void 0), c & /*width*/
      2 && eo(t, "width", typeof /*width*/
      s[1] == "number" ? `calc(min(${/*width*/
      s[1]}px, 100%))` : void 0), c & /*variant*/
      16 && eo(
        t,
        "border-style",
        /*variant*/
        s[4]
      ), c & /*allow_overflow*/
      2048 && eo(
        t,
        "overflow",
        /*allow_overflow*/
        s[11] ? "visible" : "hidden"
      ), c & /*scale*/
      4096 && eo(
        t,
        "flex-grow",
        /*scale*/
        s[12]
      ), c & /*min_width*/
      8192 && eo(t, "min-width", `calc(min(${/*min_width*/
      s[13]}px, 100%))`);
    },
    i(s) {
      r || (FY(i, s), r = !0);
    },
    o(s) {
      MY(i, s), r = !1;
    },
    d(s) {
      s && q7e(t), i && i.d(s);
    }
  };
}
function nUe(e) {
  let t, n = (
    /*tag*/
    e[14] && tUe(e)
  );
  return {
    c() {
      n && n.c();
    },
    m(r, o) {
      n && n.m(r, o), t = !0;
    },
    p(r, [o]) {
      /*tag*/
      r[14] && n.p(r, o);
    },
    i(r) {
      t || (FY(n, r), t = !0);
    },
    o(r) {
      MY(n, r), t = !1;
    },
    d(r) {
      n && n.d(r);
    }
  };
}
function rUe(e, t, n) {
  let { $$slots: r = {}, $$scope: o } = t, { height: i = void 0 } = t, { width: a = void 0 } = t, { elem_id: l = "" } = t, { elem_classes: s = [] } = t, { variant: c = "solid" } = t, { border_mode: p = "base" } = t, { padding: f = !0 } = t, { type: m = "normal" } = t, { test_id: h = void 0 } = t, { explicit_call: g = !1 } = t, { container: v = !0 } = t, { visible: S = !0 } = t, { allow_overflow: w = !0 } = t, { scale: x = null } = t, { min_width: k = 0 } = t, E = m === "fieldset" ? "fieldset" : "div";
  return e.$$set = (O) => {
    "height" in O && n(0, i = O.height), "width" in O && n(1, a = O.width), "elem_id" in O && n(2, l = O.elem_id), "elem_classes" in O && n(3, s = O.elem_classes), "variant" in O && n(4, c = O.variant), "border_mode" in O && n(5, p = O.border_mode), "padding" in O && n(6, f = O.padding), "type" in O && n(15, m = O.type), "test_id" in O && n(7, h = O.test_id), "explicit_call" in O && n(8, g = O.explicit_call), "container" in O && n(9, v = O.container), "visible" in O && n(10, S = O.visible), "allow_overflow" in O && n(11, w = O.allow_overflow), "scale" in O && n(12, x = O.scale), "min_width" in O && n(13, k = O.min_width), "$$scope" in O && n(16, o = O.$$scope);
  }, [
    i,
    a,
    l,
    s,
    c,
    p,
    f,
    h,
    g,
    v,
    S,
    w,
    x,
    k,
    E,
    m,
    o,
    r
  ];
}
class oUe extends H7e {
  constructor(t) {
    super(), Z7e(this, t, rUe, nUe, J7e, {
      height: 0,
      width: 1,
      elem_id: 2,
      elem_classes: 3,
      variant: 4,
      border_mode: 5,
      padding: 6,
      type: 15,
      test_id: 7,
      explicit_call: 8,
      container: 9,
      visible: 10,
      allow_overflow: 11,
      scale: 12,
      min_width: 13
    });
  }
}
const iUe = [
  { color: "red", primary: 600, secondary: 100 },
  { color: "green", primary: 600, secondary: 100 },
  { color: "blue", primary: 600, secondary: 100 },
  { color: "yellow", primary: 500, secondary: 100 },
  { color: "purple", primary: 600, secondary: 100 },
  { color: "teal", primary: 600, secondary: 100 },
  { color: "orange", primary: 600, secondary: 100 },
  { color: "cyan", primary: 600, secondary: 100 },
  { color: "lime", primary: 500, secondary: 100 },
  { color: "pink", primary: 600, secondary: 100 }
], FD = {
  inherit: "inherit",
  current: "currentColor",
  transparent: "transparent",
  black: "#000",
  white: "#fff",
  slate: {
    50: "#f8fafc",
    100: "#f1f5f9",
    200: "#e2e8f0",
    300: "#cbd5e1",
    400: "#94a3b8",
    500: "#64748b",
    600: "#475569",
    700: "#334155",
    800: "#1e293b",
    900: "#0f172a",
    950: "#020617"
  },
  gray: {
    50: "#f9fafb",
    100: "#f3f4f6",
    200: "#e5e7eb",
    300: "#d1d5db",
    400: "#9ca3af",
    500: "#6b7280",
    600: "#4b5563",
    700: "#374151",
    800: "#1f2937",
    900: "#111827",
    950: "#030712"
  },
  zinc: {
    50: "#fafafa",
    100: "#f4f4f5",
    200: "#e4e4e7",
    300: "#d4d4d8",
    400: "#a1a1aa",
    500: "#71717a",
    600: "#52525b",
    700: "#3f3f46",
    800: "#27272a",
    900: "#18181b",
    950: "#09090b"
  },
  neutral: {
    50: "#fafafa",
    100: "#f5f5f5",
    200: "#e5e5e5",
    300: "#d4d4d4",
    400: "#a3a3a3",
    500: "#737373",
    600: "#525252",
    700: "#404040",
    800: "#262626",
    900: "#171717",
    950: "#0a0a0a"
  },
  stone: {
    50: "#fafaf9",
    100: "#f5f5f4",
    200: "#e7e5e4",
    300: "#d6d3d1",
    400: "#a8a29e",
    500: "#78716c",
    600: "#57534e",
    700: "#44403c",
    800: "#292524",
    900: "#1c1917",
    950: "#0c0a09"
  },
  red: {
    50: "#fef2f2",
    100: "#fee2e2",
    200: "#fecaca",
    300: "#fca5a5",
    400: "#f87171",
    500: "#ef4444",
    600: "#dc2626",
    700: "#b91c1c",
    800: "#991b1b",
    900: "#7f1d1d",
    950: "#450a0a"
  },
  orange: {
    50: "#fff7ed",
    100: "#ffedd5",
    200: "#fed7aa",
    300: "#fdba74",
    400: "#fb923c",
    500: "#f97316",
    600: "#ea580c",
    700: "#c2410c",
    800: "#9a3412",
    900: "#7c2d12",
    950: "#431407"
  },
  amber: {
    50: "#fffbeb",
    100: "#fef3c7",
    200: "#fde68a",
    300: "#fcd34d",
    400: "#fbbf24",
    500: "#f59e0b",
    600: "#d97706",
    700: "#b45309",
    800: "#92400e",
    900: "#78350f",
    950: "#451a03"
  },
  yellow: {
    50: "#fefce8",
    100: "#fef9c3",
    200: "#fef08a",
    300: "#fde047",
    400: "#facc15",
    500: "#eab308",
    600: "#ca8a04",
    700: "#a16207",
    800: "#854d0e",
    900: "#713f12",
    950: "#422006"
  },
  lime: {
    50: "#f7fee7",
    100: "#ecfccb",
    200: "#d9f99d",
    300: "#bef264",
    400: "#a3e635",
    500: "#84cc16",
    600: "#65a30d",
    700: "#4d7c0f",
    800: "#3f6212",
    900: "#365314",
    950: "#1a2e05"
  },
  green: {
    50: "#f0fdf4",
    100: "#dcfce7",
    200: "#bbf7d0",
    300: "#86efac",
    400: "#4ade80",
    500: "#22c55e",
    600: "#16a34a",
    700: "#15803d",
    800: "#166534",
    900: "#14532d",
    950: "#052e16"
  },
  emerald: {
    50: "#ecfdf5",
    100: "#d1fae5",
    200: "#a7f3d0",
    300: "#6ee7b7",
    400: "#34d399",
    500: "#10b981",
    600: "#059669",
    700: "#047857",
    800: "#065f46",
    900: "#064e3b",
    950: "#022c22"
  },
  teal: {
    50: "#f0fdfa",
    100: "#ccfbf1",
    200: "#99f6e4",
    300: "#5eead4",
    400: "#2dd4bf",
    500: "#14b8a6",
    600: "#0d9488",
    700: "#0f766e",
    800: "#115e59",
    900: "#134e4a",
    950: "#042f2e"
  },
  cyan: {
    50: "#ecfeff",
    100: "#cffafe",
    200: "#a5f3fc",
    300: "#67e8f9",
    400: "#22d3ee",
    500: "#06b6d4",
    600: "#0891b2",
    700: "#0e7490",
    800: "#155e75",
    900: "#164e63",
    950: "#083344"
  },
  sky: {
    50: "#f0f9ff",
    100: "#e0f2fe",
    200: "#bae6fd",
    300: "#7dd3fc",
    400: "#38bdf8",
    500: "#0ea5e9",
    600: "#0284c7",
    700: "#0369a1",
    800: "#075985",
    900: "#0c4a6e",
    950: "#082f49"
  },
  blue: {
    50: "#eff6ff",
    100: "#dbeafe",
    200: "#bfdbfe",
    300: "#93c5fd",
    400: "#60a5fa",
    500: "#3b82f6",
    600: "#2563eb",
    700: "#1d4ed8",
    800: "#1e40af",
    900: "#1e3a8a",
    950: "#172554"
  },
  indigo: {
    50: "#eef2ff",
    100: "#e0e7ff",
    200: "#c7d2fe",
    300: "#a5b4fc",
    400: "#818cf8",
    500: "#6366f1",
    600: "#4f46e5",
    700: "#4338ca",
    800: "#3730a3",
    900: "#312e81",
    950: "#1e1b4b"
  },
  violet: {
    50: "#f5f3ff",
    100: "#ede9fe",
    200: "#ddd6fe",
    300: "#c4b5fd",
    400: "#a78bfa",
    500: "#8b5cf6",
    600: "#7c3aed",
    700: "#6d28d9",
    800: "#5b21b6",
    900: "#4c1d95",
    950: "#2e1065"
  },
  purple: {
    50: "#faf5ff",
    100: "#f3e8ff",
    200: "#e9d5ff",
    300: "#d8b4fe",
    400: "#c084fc",
    500: "#a855f7",
    600: "#9333ea",
    700: "#7e22ce",
    800: "#6b21a8",
    900: "#581c87",
    950: "#3b0764"
  },
  fuchsia: {
    50: "#fdf4ff",
    100: "#fae8ff",
    200: "#f5d0fe",
    300: "#f0abfc",
    400: "#e879f9",
    500: "#d946ef",
    600: "#c026d3",
    700: "#a21caf",
    800: "#86198f",
    900: "#701a75",
    950: "#4a044e"
  },
  pink: {
    50: "#fdf2f8",
    100: "#fce7f3",
    200: "#fbcfe8",
    300: "#f9a8d4",
    400: "#f472b6",
    500: "#ec4899",
    600: "#db2777",
    700: "#be185d",
    800: "#9d174d",
    900: "#831843",
    950: "#500724"
  },
  rose: {
    50: "#fff1f2",
    100: "#ffe4e6",
    200: "#fecdd3",
    300: "#fda4af",
    400: "#fb7185",
    500: "#f43f5e",
    600: "#e11d48",
    700: "#be123c",
    800: "#9f1239",
    900: "#881337",
    950: "#4c0519"
  }
};
iUe.reduce(
  (e, { color: t, primary: n, secondary: r }) => ({
    ...e,
    [t]: {
      primary: FD[t][n],
      secondary: FD[t][r]
    }
  }),
  {}
);
function ic(e) {
  let t = ["", "k", "M", "G", "T", "P", "E", "Z"], n = 0;
  for (; e > 1e3 && n < t.length - 1; )
    e /= 1e3, n++;
  let r = t[n];
  return (Number.isInteger(e) ? e : e.toFixed(1)) + r;
}
const {
  SvelteComponent: aUe,
  append: oi,
  attr: wt,
  component_subscribe: MD,
  detach: lUe,
  element: sUe,
  init: uUe,
  insert: cUe,
  noop: BD,
  safe_not_equal: fUe,
  set_style: dg,
  svg_element: ii,
  toggle_class: UD
} = window.__gradio__svelte__internal, { onMount: dUe } = window.__gradio__svelte__internal;
function pUe(e) {
  let t, n, r, o, i, a, l, s, c, p, f, m;
  return {
    c() {
      t = sUe("div"), n = ii("svg"), r = ii("g"), o = ii("path"), i = ii("path"), a = ii("path"), l = ii("path"), s = ii("g"), c = ii("path"), p = ii("path"), f = ii("path"), m = ii("path"), wt(o, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), wt(o, "fill", "#FF7C00"), wt(o, "fill-opacity", "0.4"), wt(o, "class", "svelte-43sxxs"), wt(i, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), wt(i, "fill", "#FF7C00"), wt(i, "class", "svelte-43sxxs"), wt(a, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), wt(a, "fill", "#FF7C00"), wt(a, "fill-opacity", "0.4"), wt(a, "class", "svelte-43sxxs"), wt(l, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), wt(l, "fill", "#FF7C00"), wt(l, "class", "svelte-43sxxs"), dg(r, "transform", "translate(" + /*$top*/
      e[1][0] + "px, " + /*$top*/
      e[1][1] + "px)"), wt(c, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), wt(c, "fill", "#FF7C00"), wt(c, "fill-opacity", "0.4"), wt(c, "class", "svelte-43sxxs"), wt(p, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), wt(p, "fill", "#FF7C00"), wt(p, "class", "svelte-43sxxs"), wt(f, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), wt(f, "fill", "#FF7C00"), wt(f, "fill-opacity", "0.4"), wt(f, "class", "svelte-43sxxs"), wt(m, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), wt(m, "fill", "#FF7C00"), wt(m, "class", "svelte-43sxxs"), dg(s, "transform", "translate(" + /*$bottom*/
      e[2][0] + "px, " + /*$bottom*/
      e[2][1] + "px)"), wt(n, "viewBox", "-1200 -1200 3000 3000"), wt(n, "fill", "none"), wt(n, "xmlns", "http://www.w3.org/2000/svg"), wt(n, "class", "svelte-43sxxs"), wt(t, "class", "svelte-43sxxs"), UD(
        t,
        "margin",
        /*margin*/
        e[0]
      );
    },
    m(h, g) {
      cUe(h, t, g), oi(t, n), oi(n, r), oi(r, o), oi(r, i), oi(r, a), oi(r, l), oi(n, s), oi(s, c), oi(s, p), oi(s, f), oi(s, m);
    },
    p(h, [g]) {
      g & /*$top*/
      2 && dg(r, "transform", "translate(" + /*$top*/
      h[1][0] + "px, " + /*$top*/
      h[1][1] + "px)"), g & /*$bottom*/
      4 && dg(s, "transform", "translate(" + /*$bottom*/
      h[2][0] + "px, " + /*$bottom*/
      h[2][1] + "px)"), g & /*margin*/
      1 && UD(
        t,
        "margin",
        /*margin*/
        h[0]
      );
    },
    i: BD,
    o: BD,
    d(h) {
      h && lUe(t);
    }
  };
}
function mUe(e, t, n) {
  let r, o, { margin: i = !0 } = t;
  const a = _j([0, 0]);
  MD(e, a, (m) => n(1, r = m));
  const l = _j([0, 0]);
  MD(e, l, (m) => n(2, o = m));
  let s;
  async function c() {
    await Promise.all([a.set([125, 140]), l.set([-125, -140])]), await Promise.all([a.set([-125, 140]), l.set([125, -140])]), await Promise.all([a.set([-125, 0]), l.set([125, -0])]), await Promise.all([a.set([125, 0]), l.set([-125, 0])]);
  }
  async function p() {
    await c(), s || p();
  }
  async function f() {
    await Promise.all([a.set([125, 0]), l.set([-125, 0])]), p();
  }
  return dUe(() => (f(), () => s = !0)), e.$$set = (m) => {
    "margin" in m && n(0, i = m.margin);
  }, [i, r, o, a, l];
}
class hUe extends aUe {
  constructor(t) {
    super(), uUe(this, t, mUe, pUe, fUe, { margin: 0 });
  }
}
const {
  SvelteComponent: gUe,
  append: js,
  attr: Hi,
  binding_callbacks: HD,
  check_outros: BY,
  create_component: yUe,
  create_slot: vUe,
  destroy_component: bUe,
  destroy_each: UY,
  detach: at,
  element: xa,
  empty: bf,
  ensure_array_like: Bw,
  get_all_dirty_from_scope: wUe,
  get_slot_changes: xUe,
  group_outros: HY,
  init: SUe,
  insert: lt,
  mount_component: kUe,
  noop: ME,
  safe_not_equal: _Ue,
  set_data: Ko,
  set_style: _l,
  space: Wi,
  text: an,
  toggle_class: Ao,
  transition_in: Hc,
  transition_out: Wc,
  update_slot_base: OUe
} = window.__gradio__svelte__internal, { tick: EUe } = window.__gradio__svelte__internal, { onDestroy: CUe } = window.__gradio__svelte__internal, PUe = (e) => ({}), WD = (e) => ({});
function VD(e, t, n) {
  const r = e.slice();
  return r[38] = t[n], r[40] = n, r;
}
function qD(e, t, n) {
  const r = e.slice();
  return r[38] = t[n], r;
}
function RUe(e) {
  let t, n = (
    /*i18n*/
    e[1]("common.error") + ""
  ), r, o, i;
  const a = (
    /*#slots*/
    e[29].error
  ), l = vUe(
    a,
    e,
    /*$$scope*/
    e[28],
    WD
  );
  return {
    c() {
      t = xa("span"), r = an(n), o = Wi(), l && l.c(), Hi(t, "class", "error svelte-1txqlrd");
    },
    m(s, c) {
      lt(s, t, c), js(t, r), lt(s, o, c), l && l.m(s, c), i = !0;
    },
    p(s, c) {
      (!i || c[0] & /*i18n*/
      2) && n !== (n = /*i18n*/
      s[1]("common.error") + "") && Ko(r, n), l && l.p && (!i || c[0] & /*$$scope*/
      268435456) && OUe(
        l,
        a,
        s,
        /*$$scope*/
        s[28],
        i ? xUe(
          a,
          /*$$scope*/
          s[28],
          c,
          PUe
        ) : wUe(
          /*$$scope*/
          s[28]
        ),
        WD
      );
    },
    i(s) {
      i || (Hc(l, s), i = !0);
    },
    o(s) {
      Wc(l, s), i = !1;
    },
    d(s) {
      s && (at(t), at(o)), l && l.d(s);
    }
  };
}
function TUe(e) {
  let t, n, r, o, i, a, l, s, c, p = (
    /*variant*/
    e[8] === "default" && /*show_eta_bar*/
    e[18] && /*show_progress*/
    e[6] === "full" && GD(e)
  );
  function f(k, E) {
    if (
      /*progress*/
      k[7]
    )
      return $Ue;
    if (
      /*queue_position*/
      k[2] !== null && /*queue_size*/
      k[3] !== void 0 && /*queue_position*/
      k[2] >= 0
    )
      return NUe;
    if (
      /*queue_position*/
      k[2] === 0
    )
      return jUe;
  }
  let m = f(e), h = m && m(e), g = (
    /*timer*/
    e[5] && XD(e)
  );
  const v = [LUe, zUe], S = [];
  function w(k, E) {
    return (
      /*last_progress_level*/
      k[15] != null ? 0 : (
        /*show_progress*/
        k[6] === "full" ? 1 : -1
      )
    );
  }
  ~(i = w(e)) && (a = S[i] = v[i](e));
  let x = !/*timer*/
  e[5] && rF(e);
  return {
    c() {
      p && p.c(), t = Wi(), n = xa("div"), h && h.c(), r = Wi(), g && g.c(), o = Wi(), a && a.c(), l = Wi(), x && x.c(), s = bf(), Hi(n, "class", "progress-text svelte-1txqlrd"), Ao(
        n,
        "meta-text-center",
        /*variant*/
        e[8] === "center"
      ), Ao(
        n,
        "meta-text",
        /*variant*/
        e[8] === "default"
      );
    },
    m(k, E) {
      p && p.m(k, E), lt(k, t, E), lt(k, n, E), h && h.m(n, null), js(n, r), g && g.m(n, null), lt(k, o, E), ~i && S[i].m(k, E), lt(k, l, E), x && x.m(k, E), lt(k, s, E), c = !0;
    },
    p(k, E) {
      /*variant*/
      k[8] === "default" && /*show_eta_bar*/
      k[18] && /*show_progress*/
      k[6] === "full" ? p ? p.p(k, E) : (p = GD(k), p.c(), p.m(t.parentNode, t)) : p && (p.d(1), p = null), m === (m = f(k)) && h ? h.p(k, E) : (h && h.d(1), h = m && m(k), h && (h.c(), h.m(n, r))), /*timer*/
      k[5] ? g ? g.p(k, E) : (g = XD(k), g.c(), g.m(n, null)) : g && (g.d(1), g = null), (!c || E[0] & /*variant*/
      256) && Ao(
        n,
        "meta-text-center",
        /*variant*/
        k[8] === "center"
      ), (!c || E[0] & /*variant*/
      256) && Ao(
        n,
        "meta-text",
        /*variant*/
        k[8] === "default"
      );
      let O = i;
      i = w(k), i === O ? ~i && S[i].p(k, E) : (a && (HY(), Wc(S[O], 1, 1, () => {
        S[O] = null;
      }), BY()), ~i ? (a = S[i], a ? a.p(k, E) : (a = S[i] = v[i](k), a.c()), Hc(a, 1), a.m(l.parentNode, l)) : a = null), /*timer*/
      k[5] ? x && (x.d(1), x = null) : x ? x.p(k, E) : (x = rF(k), x.c(), x.m(s.parentNode, s));
    },
    i(k) {
      c || (Hc(a), c = !0);
    },
    o(k) {
      Wc(a), c = !1;
    },
    d(k) {
      k && (at(t), at(n), at(o), at(l), at(s)), p && p.d(k), h && h.d(), g && g.d(), ~i && S[i].d(k), x && x.d(k);
    }
  };
}
function GD(e) {
  let t, n = `translateX(${/*eta_level*/
  (e[17] || 0) * 100 - 100}%)`;
  return {
    c() {
      t = xa("div"), Hi(t, "class", "eta-bar svelte-1txqlrd"), _l(t, "transform", n);
    },
    m(r, o) {
      lt(r, t, o);
    },
    p(r, o) {
      o[0] & /*eta_level*/
      131072 && n !== (n = `translateX(${/*eta_level*/
      (r[17] || 0) * 100 - 100}%)`) && _l(t, "transform", n);
    },
    d(r) {
      r && at(t);
    }
  };
}
function jUe(e) {
  let t;
  return {
    c() {
      t = an("processing |");
    },
    m(n, r) {
      lt(n, t, r);
    },
    p: ME,
    d(n) {
      n && at(t);
    }
  };
}
function NUe(e) {
  let t, n = (
    /*queue_position*/
    e[2] + 1 + ""
  ), r, o, i, a;
  return {
    c() {
      t = an("queue: "), r = an(n), o = an("/"), i = an(
        /*queue_size*/
        e[3]
      ), a = an(" |");
    },
    m(l, s) {
      lt(l, t, s), lt(l, r, s), lt(l, o, s), lt(l, i, s), lt(l, a, s);
    },
    p(l, s) {
      s[0] & /*queue_position*/
      4 && n !== (n = /*queue_position*/
      l[2] + 1 + "") && Ko(r, n), s[0] & /*queue_size*/
      8 && Ko(
        i,
        /*queue_size*/
        l[3]
      );
    },
    d(l) {
      l && (at(t), at(r), at(o), at(i), at(a));
    }
  };
}
function $Ue(e) {
  let t, n = Bw(
    /*progress*/
    e[7]
  ), r = [];
  for (let o = 0; o < n.length; o += 1)
    r[o] = YD(qD(e, n, o));
  return {
    c() {
      for (let o = 0; o < r.length; o += 1)
        r[o].c();
      t = bf();
    },
    m(o, i) {
      for (let a = 0; a < r.length; a += 1)
        r[a] && r[a].m(o, i);
      lt(o, t, i);
    },
    p(o, i) {
      if (i[0] & /*progress*/
      128) {
        n = Bw(
          /*progress*/
          o[7]
        );
        let a;
        for (a = 0; a < n.length; a += 1) {
          const l = qD(o, n, a);
          r[a] ? r[a].p(l, i) : (r[a] = YD(l), r[a].c(), r[a].m(t.parentNode, t));
        }
        for (; a < r.length; a += 1)
          r[a].d(1);
        r.length = n.length;
      }
    },
    d(o) {
      o && at(t), UY(r, o);
    }
  };
}
function KD(e) {
  let t, n = (
    /*p*/
    e[38].unit + ""
  ), r, o, i = " ", a;
  function l(p, f) {
    return (
      /*p*/
      p[38].length != null ? AUe : IUe
    );
  }
  let s = l(e), c = s(e);
  return {
    c() {
      c.c(), t = Wi(), r = an(n), o = an(" | "), a = an(i);
    },
    m(p, f) {
      c.m(p, f), lt(p, t, f), lt(p, r, f), lt(p, o, f), lt(p, a, f);
    },
    p(p, f) {
      s === (s = l(p)) && c ? c.p(p, f) : (c.d(1), c = s(p), c && (c.c(), c.m(t.parentNode, t))), f[0] & /*progress*/
      128 && n !== (n = /*p*/
      p[38].unit + "") && Ko(r, n);
    },
    d(p) {
      p && (at(t), at(r), at(o), at(a)), c.d(p);
    }
  };
}
function IUe(e) {
  let t = ic(
    /*p*/
    e[38].index || 0
  ) + "", n;
  return {
    c() {
      n = an(t);
    },
    m(r, o) {
      lt(r, n, o);
    },
    p(r, o) {
      o[0] & /*progress*/
      128 && t !== (t = ic(
        /*p*/
        r[38].index || 0
      ) + "") && Ko(n, t);
    },
    d(r) {
      r && at(n);
    }
  };
}
function AUe(e) {
  let t = ic(
    /*p*/
    e[38].index || 0
  ) + "", n, r, o = ic(
    /*p*/
    e[38].length
  ) + "", i;
  return {
    c() {
      n = an(t), r = an("/"), i = an(o);
    },
    m(a, l) {
      lt(a, n, l), lt(a, r, l), lt(a, i, l);
    },
    p(a, l) {
      l[0] & /*progress*/
      128 && t !== (t = ic(
        /*p*/
        a[38].index || 0
      ) + "") && Ko(n, t), l[0] & /*progress*/
      128 && o !== (o = ic(
        /*p*/
        a[38].length
      ) + "") && Ko(i, o);
    },
    d(a) {
      a && (at(n), at(r), at(i));
    }
  };
}
function YD(e) {
  let t, n = (
    /*p*/
    e[38].index != null && KD(e)
  );
  return {
    c() {
      n && n.c(), t = bf();
    },
    m(r, o) {
      n && n.m(r, o), lt(r, t, o);
    },
    p(r, o) {
      /*p*/
      r[38].index != null ? n ? n.p(r, o) : (n = KD(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
    },
    d(r) {
      r && at(t), n && n.d(r);
    }
  };
}
function XD(e) {
  let t, n = (
    /*eta*/
    e[0] ? `/${/*formatted_eta*/
    e[19]}` : ""
  ), r, o;
  return {
    c() {
      t = an(
        /*formatted_timer*/
        e[20]
      ), r = an(n), o = an("s");
    },
    m(i, a) {
      lt(i, t, a), lt(i, r, a), lt(i, o, a);
    },
    p(i, a) {
      a[0] & /*formatted_timer*/
      1048576 && Ko(
        t,
        /*formatted_timer*/
        i[20]
      ), a[0] & /*eta, formatted_eta*/
      524289 && n !== (n = /*eta*/
      i[0] ? `/${/*formatted_eta*/
      i[19]}` : "") && Ko(r, n);
    },
    d(i) {
      i && (at(t), at(r), at(o));
    }
  };
}
function zUe(e) {
  let t, n;
  return t = new hUe({
    props: { margin: (
      /*variant*/
      e[8] === "default"
    ) }
  }), {
    c() {
      yUe(t.$$.fragment);
    },
    m(r, o) {
      kUe(t, r, o), n = !0;
    },
    p(r, o) {
      const i = {};
      o[0] & /*variant*/
      256 && (i.margin = /*variant*/
      r[8] === "default"), t.$set(i);
    },
    i(r) {
      n || (Hc(t.$$.fragment, r), n = !0);
    },
    o(r) {
      Wc(t.$$.fragment, r), n = !1;
    },
    d(r) {
      bUe(t, r);
    }
  };
}
function LUe(e) {
  let t, n, r, o, i, a = `${/*last_progress_level*/
  e[15] * 100}%`, l = (
    /*progress*/
    e[7] != null && ZD(e)
  );
  return {
    c() {
      t = xa("div"), n = xa("div"), l && l.c(), r = Wi(), o = xa("div"), i = xa("div"), Hi(n, "class", "progress-level-inner svelte-1txqlrd"), Hi(i, "class", "progress-bar svelte-1txqlrd"), _l(i, "width", a), Hi(o, "class", "progress-bar-wrap svelte-1txqlrd"), Hi(t, "class", "progress-level svelte-1txqlrd");
    },
    m(s, c) {
      lt(s, t, c), js(t, n), l && l.m(n, null), js(t, r), js(t, o), js(o, i), e[30](i);
    },
    p(s, c) {
      /*progress*/
      s[7] != null ? l ? l.p(s, c) : (l = ZD(s), l.c(), l.m(n, null)) : l && (l.d(1), l = null), c[0] & /*last_progress_level*/
      32768 && a !== (a = `${/*last_progress_level*/
      s[15] * 100}%`) && _l(i, "width", a);
    },
    i: ME,
    o: ME,
    d(s) {
      s && at(t), l && l.d(), e[30](null);
    }
  };
}
function ZD(e) {
  let t, n = Bw(
    /*progress*/
    e[7]
  ), r = [];
  for (let o = 0; o < n.length; o += 1)
    r[o] = nF(VD(e, n, o));
  return {
    c() {
      for (let o = 0; o < r.length; o += 1)
        r[o].c();
      t = bf();
    },
    m(o, i) {
      for (let a = 0; a < r.length; a += 1)
        r[a] && r[a].m(o, i);
      lt(o, t, i);
    },
    p(o, i) {
      if (i[0] & /*progress_level, progress*/
      16512) {
        n = Bw(
          /*progress*/
          o[7]
        );
        let a;
        for (a = 0; a < n.length; a += 1) {
          const l = VD(o, n, a);
          r[a] ? r[a].p(l, i) : (r[a] = nF(l), r[a].c(), r[a].m(t.parentNode, t));
        }
        for (; a < r.length; a += 1)
          r[a].d(1);
        r.length = n.length;
      }
    },
    d(o) {
      o && at(t), UY(r, o);
    }
  };
}
function QD(e) {
  let t, n, r, o, i = (
    /*i*/
    e[40] !== 0 && DUe()
  ), a = (
    /*p*/
    e[38].desc != null && JD(e)
  ), l = (
    /*p*/
    e[38].desc != null && /*progress_level*/
    e[14] && /*progress_level*/
    e[14][
      /*i*/
      e[40]
    ] != null && eF()
  ), s = (
    /*progress_level*/
    e[14] != null && tF(e)
  );
  return {
    c() {
      i && i.c(), t = Wi(), a && a.c(), n = Wi(), l && l.c(), r = Wi(), s && s.c(), o = bf();
    },
    m(c, p) {
      i && i.m(c, p), lt(c, t, p), a && a.m(c, p), lt(c, n, p), l && l.m(c, p), lt(c, r, p), s && s.m(c, p), lt(c, o, p);
    },
    p(c, p) {
      /*p*/
      c[38].desc != null ? a ? a.p(c, p) : (a = JD(c), a.c(), a.m(n.parentNode, n)) : a && (a.d(1), a = null), /*p*/
      c[38].desc != null && /*progress_level*/
      c[14] && /*progress_level*/
      c[14][
        /*i*/
        c[40]
      ] != null ? l || (l = eF(), l.c(), l.m(r.parentNode, r)) : l && (l.d(1), l = null), /*progress_level*/
      c[14] != null ? s ? s.p(c, p) : (s = tF(c), s.c(), s.m(o.parentNode, o)) : s && (s.d(1), s = null);
    },
    d(c) {
      c && (at(t), at(n), at(r), at(o)), i && i.d(c), a && a.d(c), l && l.d(c), s && s.d(c);
    }
  };
}
function DUe(e) {
  let t;
  return {
    c() {
      t = an(" /");
    },
    m(n, r) {
      lt(n, t, r);
    },
    d(n) {
      n && at(t);
    }
  };
}
function JD(e) {
  let t = (
    /*p*/
    e[38].desc + ""
  ), n;
  return {
    c() {
      n = an(t);
    },
    m(r, o) {
      lt(r, n, o);
    },
    p(r, o) {
      o[0] & /*progress*/
      128 && t !== (t = /*p*/
      r[38].desc + "") && Ko(n, t);
    },
    d(r) {
      r && at(n);
    }
  };
}
function eF(e) {
  let t;
  return {
    c() {
      t = an("-");
    },
    m(n, r) {
      lt(n, t, r);
    },
    d(n) {
      n && at(t);
    }
  };
}
function tF(e) {
  let t = (100 * /*progress_level*/
  (e[14][
    /*i*/
    e[40]
  ] || 0)).toFixed(1) + "", n, r;
  return {
    c() {
      n = an(t), r = an("%");
    },
    m(o, i) {
      lt(o, n, i), lt(o, r, i);
    },
    p(o, i) {
      i[0] & /*progress_level*/
      16384 && t !== (t = (100 * /*progress_level*/
      (o[14][
        /*i*/
        o[40]
      ] || 0)).toFixed(1) + "") && Ko(n, t);
    },
    d(o) {
      o && (at(n), at(r));
    }
  };
}
function nF(e) {
  let t, n = (
    /*p*/
    (e[38].desc != null || /*progress_level*/
    e[14] && /*progress_level*/
    e[14][
      /*i*/
      e[40]
    ] != null) && QD(e)
  );
  return {
    c() {
      n && n.c(), t = bf();
    },
    m(r, o) {
      n && n.m(r, o), lt(r, t, o);
    },
    p(r, o) {
      /*p*/
      r[38].desc != null || /*progress_level*/
      r[14] && /*progress_level*/
      r[14][
        /*i*/
        r[40]
      ] != null ? n ? n.p(r, o) : (n = QD(r), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
    },
    d(r) {
      r && at(t), n && n.d(r);
    }
  };
}
function rF(e) {
  let t, n;
  return {
    c() {
      t = xa("p"), n = an(
        /*loading_text*/
        e[9]
      ), Hi(t, "class", "loading svelte-1txqlrd");
    },
    m(r, o) {
      lt(r, t, o), js(t, n);
    },
    p(r, o) {
      o[0] & /*loading_text*/
      512 && Ko(
        n,
        /*loading_text*/
        r[9]
      );
    },
    d(r) {
      r && at(t);
    }
  };
}
function FUe(e) {
  let t, n, r, o, i;
  const a = [TUe, RUe], l = [];
  function s(c, p) {
    return (
      /*status*/
      c[4] === "pending" ? 0 : (
        /*status*/
        c[4] === "error" ? 1 : -1
      )
    );
  }
  return ~(n = s(e)) && (r = l[n] = a[n](e)), {
    c() {
      t = xa("div"), r && r.c(), Hi(t, "class", o = "wrap " + /*variant*/
      e[8] + " " + /*show_progress*/
      e[6] + " svelte-1txqlrd"), Ao(t, "hide", !/*status*/
      e[4] || /*status*/
      e[4] === "complete" || /*show_progress*/
      e[6] === "hidden"), Ao(
        t,
        "translucent",
        /*variant*/
        e[8] === "center" && /*status*/
        (e[4] === "pending" || /*status*/
        e[4] === "error") || /*translucent*/
        e[11] || /*show_progress*/
        e[6] === "minimal"
      ), Ao(
        t,
        "generating",
        /*status*/
        e[4] === "generating"
      ), Ao(
        t,
        "border",
        /*border*/
        e[12]
      ), _l(
        t,
        "position",
        /*absolute*/
        e[10] ? "absolute" : "static"
      ), _l(
        t,
        "padding",
        /*absolute*/
        e[10] ? "0" : "var(--size-8) 0"
      );
    },
    m(c, p) {
      lt(c, t, p), ~n && l[n].m(t, null), e[31](t), i = !0;
    },
    p(c, p) {
      let f = n;
      n = s(c), n === f ? ~n && l[n].p(c, p) : (r && (HY(), Wc(l[f], 1, 1, () => {
        l[f] = null;
      }), BY()), ~n ? (r = l[n], r ? r.p(c, p) : (r = l[n] = a[n](c), r.c()), Hc(r, 1), r.m(t, null)) : r = null), (!i || p[0] & /*variant, show_progress*/
      320 && o !== (o = "wrap " + /*variant*/
      c[8] + " " + /*show_progress*/
      c[6] + " svelte-1txqlrd")) && Hi(t, "class", o), (!i || p[0] & /*variant, show_progress, status, show_progress*/
      336) && Ao(t, "hide", !/*status*/
      c[4] || /*status*/
      c[4] === "complete" || /*show_progress*/
      c[6] === "hidden"), (!i || p[0] & /*variant, show_progress, variant, status, translucent, show_progress*/
      2384) && Ao(
        t,
        "translucent",
        /*variant*/
        c[8] === "center" && /*status*/
        (c[4] === "pending" || /*status*/
        c[4] === "error") || /*translucent*/
        c[11] || /*show_progress*/
        c[6] === "minimal"
      ), (!i || p[0] & /*variant, show_progress, status*/
      336) && Ao(
        t,
        "generating",
        /*status*/
        c[4] === "generating"
      ), (!i || p[0] & /*variant, show_progress, border*/
      4416) && Ao(
        t,
        "border",
        /*border*/
        c[12]
      ), p[0] & /*absolute*/
      1024 && _l(
        t,
        "position",
        /*absolute*/
        c[10] ? "absolute" : "static"
      ), p[0] & /*absolute*/
      1024 && _l(
        t,
        "padding",
        /*absolute*/
        c[10] ? "0" : "var(--size-8) 0"
      );
    },
    i(c) {
      i || (Hc(r), i = !0);
    },
    o(c) {
      Wc(r), i = !1;
    },
    d(c) {
      c && at(t), ~n && l[n].d(), e[31](null);
    }
  };
}
let pg = [], S0 = !1;
async function MUe(e, t = !0) {
  if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) {
    if (pg.push(e), !S0)
      S0 = !0;
    else
      return;
    await EUe(), requestAnimationFrame(() => {
      let n = [0, 0];
      for (let r = 0; r < pg.length; r++) {
        const i = pg[r].getBoundingClientRect();
        (r === 0 || i.top + window.scrollY <= n[0]) && (n[0] = i.top + window.scrollY, n[1] = r);
      }
      window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), S0 = !1, pg = [];
    });
  }
}
function BUe(e, t, n) {
  let r, { $$slots: o = {}, $$scope: i } = t, { i18n: a } = t, { eta: l = null } = t, { queue: s = !1 } = t, { queue_position: c } = t, { queue_size: p } = t, { status: f } = t, { scroll_to_output: m = !1 } = t, { timer: h = !0 } = t, { show_progress: g = "full" } = t, { message: v = null } = t, { progress: S = null } = t, { variant: w = "default" } = t, { loading_text: x = "Loading..." } = t, { absolute: k = !0 } = t, { translucent: E = !1 } = t, { border: O = !1 } = t, { autoscroll: C } = t, R, L = !1, D = 0, N = 0, H = null, B = 0, K = null, W, U = null, Q = !0;
  const J = () => {
    n(25, D = performance.now()), n(26, N = 0), L = !0, q();
  };
  function q() {
    requestAnimationFrame(() => {
      n(26, N = (performance.now() - D) / 1e3), L && q();
    });
  }
  function ee() {
    n(26, N = 0), L && (L = !1);
  }
  CUe(() => {
    L && ee();
  });
  let A = null;
  function X(j) {
    HD[j ? "unshift" : "push"](() => {
      U = j, n(16, U), n(7, S), n(14, K), n(15, W);
    });
  }
  function ie(j) {
    HD[j ? "unshift" : "push"](() => {
      R = j, n(13, R);
    });
  }
  return e.$$set = (j) => {
    "i18n" in j && n(1, a = j.i18n), "eta" in j && n(0, l = j.eta), "queue" in j && n(21, s = j.queue), "queue_position" in j && n(2, c = j.queue_position), "queue_size" in j && n(3, p = j.queue_size), "status" in j && n(4, f = j.status), "scroll_to_output" in j && n(22, m = j.scroll_to_output), "timer" in j && n(5, h = j.timer), "show_progress" in j && n(6, g = j.show_progress), "message" in j && n(23, v = j.message), "progress" in j && n(7, S = j.progress), "variant" in j && n(8, w = j.variant), "loading_text" in j && n(9, x = j.loading_text), "absolute" in j && n(10, k = j.absolute), "translucent" in j && n(11, E = j.translucent), "border" in j && n(12, O = j.border), "autoscroll" in j && n(24, C = j.autoscroll), "$$scope" in j && n(28, i = j.$$scope);
  }, e.$$.update = () => {
    e.$$.dirty[0] & /*eta, old_eta, queue, timer_start*/
    169869313 && (l === null ? n(0, l = H) : s && n(0, l = (performance.now() - D) / 1e3 + l), l != null && (n(19, A = l.toFixed(1)), n(27, H = l))), e.$$.dirty[0] & /*eta, timer_diff*/
    67108865 && n(17, B = l === null || l <= 0 || !N ? null : Math.min(N / l, 1)), e.$$.dirty[0] & /*progress*/
    128 && S != null && n(18, Q = !1), e.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/
    114816 && (S != null ? n(14, K = S.map((j) => {
      if (j.index != null && j.length != null)
        return j.index / j.length;
      if (j.progress != null)
        return j.progress;
    })) : n(14, K = null), K ? (n(15, W = K[K.length - 1]), U && (W === 0 ? n(16, U.style.transition = "0", U) : n(16, U.style.transition = "150ms", U))) : n(15, W = void 0)), e.$$.dirty[0] & /*status*/
    16 && (f === "pending" ? J() : ee()), e.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/
    20979728 && R && m && (f === "pending" || f === "complete") && MUe(R, C), e.$$.dirty[0] & /*status, message*/
    8388624, e.$$.dirty[0] & /*timer_diff*/
    67108864 && n(20, r = N.toFixed(1));
  }, [
    l,
    a,
    c,
    p,
    f,
    h,
    g,
    S,
    w,
    x,
    k,
    E,
    O,
    R,
    K,
    W,
    U,
    B,
    Q,
    A,
    r,
    s,
    m,
    v,
    C,
    D,
    N,
    H,
    i,
    o,
    X,
    ie
  ];
}
class UUe extends gUe {
  constructor(t) {
    super(), SUe(
      this,
      t,
      BUe,
      FUe,
      _Ue,
      {
        i18n: 1,
        eta: 0,
        queue: 21,
        queue_position: 2,
        queue_size: 3,
        status: 4,
        scroll_to_output: 22,
        timer: 5,
        show_progress: 6,
        message: 23,
        progress: 7,
        variant: 8,
        loading_text: 9,
        absolute: 10,
        translucent: 11,
        border: 12,
        autoscroll: 24
      },
      null,
      [-1, -1]
    );
  }
}
const {
  SvelteComponent: HUe,
  assign: WUe,
  check_outros: VUe,
  create_component: V2,
  destroy_component: q2,
  detach: qUe,
  get_spread_object: GUe,
  get_spread_update: KUe,
  globals: YUe,
  group_outros: XUe,
  init: ZUe,
  insert: QUe,
  listen: JUe,
  mount_component: G2,
  safe_not_equal: eHe,
  space: tHe,
  transition_in: ac,
  transition_out: Gd
} = window.__gradio__svelte__internal, { window: nHe } = YUe;
function oF(e) {
  let t, n;
  const r = [
    { autoscroll: (
      /*gradio*/
      e[8].autoscroll
    ) },
    { i18n: (
      /*gradio*/
      e[8].i18n
    ) },
    /*loading_status*/
    e[7]
  ];
  let o = {};
  for (let i = 0; i < r.length; i += 1)
    o = WUe(o, r[i]);
  return t = new UUe({ props: o }), {
    c() {
      V2(t.$$.fragment);
    },
    m(i, a) {
      G2(t, i, a), n = !0;
    },
    p(i, a) {
      const l = a[0] & /*gradio, loading_status*/
      384 ? KUe(r, [
        a[0] & /*gradio*/
        256 && { autoscroll: (
          /*gradio*/
          i[8].autoscroll
        ) },
        a[0] & /*gradio*/
        256 && { i18n: (
          /*gradio*/
          i[8].i18n
        ) },
        a[0] & /*loading_status*/
        128 && GUe(
          /*loading_status*/
          i[7]
        )
      ]) : {};
      t.$set(l);
    },
    i(i) {
      n || (ac(t.$$.fragment, i), n = !0);
    },
    o(i) {
      Gd(t.$$.fragment, i), n = !1;
    },
    d(i) {
      q2(t, i);
    }
  };
}
function rHe(e) {
  let t, n, r, o = (
    /*loading_status*/
    e[7] && oF(e)
  );
  return n = new /*React$GradioWorkbook*/
  e[25]({
    props: {
      aiconfig: (
        /*aiconfig*/
        e[9]
      ),
      editorCallbacks: {
        addPrompt: (
          /*handleAddPrompt*/
          e[10]
        ),
        cancel: (
          /*handleCancel*/
          e[11]
        ),
        clearOutputs: (
          /*handleClearOutputs*/
          e[12]
        ),
        deletePrompt: (
          /*handleDeletePrompt*/
          e[13]
        ),
        download: (
          /*handleDownload*/
          e[14]
        ),
        getModels: (
          /*handleGetModels*/
          e[15]
        ),
        runPrompt: (
          /*handleRunPrompt*/
          e[16]
        ),
        setConfigDescription: (
          /*handleSetConfigDescription*/
          e[18]
        ),
        setConfigName: (
          /*handleSetConfigName*/
          e[19]
        ),
        setParameters: (
          /*handleSetParameters*/
          e[20]
        ),
        share: (
          /*handleShare*/
          e[21]
        ),
        updateModel: (
          /*handleUpdateModel*/
          e[22]
        ),
        updatePrompt: (
          /*handleUpdatePrompt*/
          e[23]
        )
      },
      onSetApiToken: (
        /*handleSetApiToken*/
        e[17]
      ),
      themeMode: (
        /*theme_mode*/
        e[3]
      )
    }
  }), {
    c() {
      o && o.c(), t = tHe(), V2(n.$$.fragment);
    },
    m(i, a) {
      o && o.m(i, a), QUe(i, t, a), G2(n, i, a), r = !0;
    },
    p(i, a) {
      /*loading_status*/
      i[7] ? o ? (o.p(i, a), a[0] & /*loading_status*/
      128 && ac(o, 1)) : (o = oF(i), o.c(), ac(o, 1), o.m(t.parentNode, t)) : o && (XUe(), Gd(o, 1, 1, () => {
        o = null;
      }), VUe());
      const l = {};
      a[0] & /*aiconfig*/
      512 && (l.aiconfig = /*aiconfig*/
      i[9]), a[0] & /*theme_mode*/
      8 && (l.themeMode = /*theme_mode*/
      i[3]), n.$set(l);
    },
    i(i) {
      r || (ac(o), ac(n.$$.fragment, i), r = !0);
    },
    o(i) {
      Gd(o), Gd(n.$$.fragment, i), r = !1;
    },
    d(i) {
      i && qUe(t), o && o.d(i), q2(n, i);
    }
  };
}
function oHe(e) {
  let t, n, r, o;
  return t = new oUe({
    props: {
      visible: (
        /*visible*/
        e[2]
      ),
      elem_id: (
        /*elem_id*/
        e[0]
      ),
      elem_classes: (
        /*elem_classes*/
        e[1]
      ),
      container: (
        /*container*/
        e[4]
      ),
      scale: (
        /*scale*/
        e[5]
      ),
      min_width: (
        /*min_width*/
        e[6]
      ),
      $$slots: { default: [rHe] },
      $$scope: { ctx: e }
    }
  }), {
    c() {
      V2(t.$$.fragment);
    },
    m(i, a) {
      G2(t, i, a), n = !0, r || (o = JUe(
        nHe,
        "beforeunload",
        /*beforeUnload*/
        e[24]
      ), r = !0);
    },
    p(i, a) {
      const l = {};
      a[0] & /*visible*/
      4 && (l.visible = /*visible*/
      i[2]), a[0] & /*elem_id*/
      1 && (l.elem_id = /*elem_id*/
      i[0]), a[0] & /*elem_classes*/
      2 && (l.elem_classes = /*elem_classes*/
      i[1]), a[0] & /*container*/
      16 && (l.container = /*container*/
      i[4]), a[0] & /*scale*/
      32 && (l.scale = /*scale*/
      i[5]), a[0] & /*min_width*/
      64 && (l.min_width = /*min_width*/
      i[6]), a[0] & /*aiconfig, theme_mode, gradio, loading_status*/
      904 | a[1] & /*$$scope*/
      32 && (l.$$scope = { dirty: a, ctx: i }), t.$set(l);
    },
    i(i) {
      n || (ac(t.$$.fragment, i), n = !0);
    },
    o(i) {
      Gd(t.$$.fragment, i), n = !1;
    },
    d(i) {
      q2(t, i), r = !1, o();
    }
  };
}
function k0(e, t) {
  return e ?? t();
}
function iHe(e) {
  let t, n = e[0], r = 1;
  for (; r < e.length; ) {
    const o = e[r], i = e[r + 1];
    if (r += 2, (o === "optionalAccess" || o === "optionalCall") && n == null)
      return;
    o === "access" || o === "optionalAccess" ? (t = n, n = i(n)) : (o === "call" || o === "optionalCall") && (n = i((...a) => n.call(t, ...a)), t = void 0);
  }
  return n;
}
function aHe(e, t, n) {
  let { elem_id: r = "" } = t, { elem_classes: o = [] } = t, { visible: i = !0 } = t, { theme_mode: a = "system" } = t, { value: l } = t, s, c, p = [], f = !1, { root: m } = t, h;
  const g = Math.random().toString(36).substring(2);
  let { container: v = !0 } = t, { scale: S = null } = t, { min_width: w = void 0 } = t, { loading_status: x } = t, { gradio: k } = t, E;
  async function O() {
    return E || (E = await w0(`${h}`, {})), E;
  }
  async function C(j, le, re) {
    const xe = await (await O()).predict("/add_prompt_impl", void 0, {
      prompt_name: j,
      prompt: le,
      index: re,
      session_id: g
    });
    return f = !0, JSON.parse(xe.data[0]);
  }
  async function R(j) {
    await (await O()).predict("/cancel_run_impl", void 0, { cancellation_token_id: j });
  }
  async function L() {
    const le = await (await O()).predict("/clear_outputs_impl", void 0, { session_id: g });
    return f = !0, JSON.parse(le.data[0]);
  }
  async function D(j) {
    await (await O()).predict("/delete_prompt_impl", void 0, { prompt_name: j, session_id: g }), f = !0;
  }
  async function N() {
    const le = await (await O()).predict("/get_aiconfig_impl", void 0, { session_id: g }), { aiconfig: re } = JSON.parse(le.data[0]), he = new Blob([JSON.stringify(re, null, 2)], { type: "application/json" }), xe = window.URL.createObjectURL(he), ke = /* @__PURE__ */ new Date(), Ae = String(ke.getFullYear()), pe = String(ke.getMonth() + 1).padStart(2, "0"), Me = String(ke.getDate()).padStart(2, "0"), We = String(ke.getHours()).padStart(2, "0"), ze = String(ke.getMinutes()).padStart(2, "0"), Fe = String(ke.getSeconds()).padStart(2, "0"), oe = `${k0(iHe([re, "optionalAccess", (Ie) => Ie.name]), () => "Gradio Notebook")} ${Ae}-${pe}-${Me} at ${We}:${ze}:${Fe}.aiconfig.json`, ae = document.createElement("a");
    ae.href = xe, ae.download = oe, ae.click(), window.URL.revokeObjectURL(xe), ae.remove();
  }
  function H(j) {
    return p.filter((le) => le.toLowerCase().includes(j.toLowerCase()));
  }
  async function B(j, le, re, he, xe) {
    const ke = await O(), Ae = {
      prompt_name: j,
      cancellation_token: xe,
      session_id: g,
      api_token: K
    }, pe = await ke.submit("/run_prompt_impl", void 0, Ae);
    let Me = !1, We = !1;
    pe.on("data", (ze) => {
      const Fe = JSON.parse(ze.data[0]), Ye = Object.keys(Fe)[0];
      switch (Ye) {
        case "error":
          We || (re({
            type: "error",
            data: {
              message: k0(Fe.error.message, () => "Unknown error"),
              code: Fe.error.code ? parseInt(Fe.error.code) : 500,
              data: Fe.error.data
            }
          }), We = !0);
          break;
        case "stop_streaming":
          Me || (le({
            type: "stop_streaming",
            data: Fe[Ye]
          }), Me = !0);
          break;
        default:
          le({ type: Ye, data: Fe[Ye] });
          break;
      }
    }), f = !0;
  }
  let K;
  async function W(j) {
    K = j, K.startsWith("hf_") ? E = await w0(`${h}`, {
      hf_token: K
      // gradio has weird typing for this...
    }) : E = await w0(`${h}`, {});
  }
  async function U(j) {
    await (await O()).predict("/set_config_description_impl", void 0, { description: j, session_id: g }), f = !0;
  }
  async function Q(j) {
    await (await O()).predict("/set_config_name_impl", void 0, { name: j, session_id: g }), f = !0;
  }
  async function J(j, le) {
    await (await O()).predict("/set_parameters_impl", void 0, {
      parameters: j,
      prompt_name: le,
      session_id: g
    }), f = !0;
  }
  async function q() {
    const le = await (await O()).predict("/share_config_impl", void 0, {
      session_id: g,
      workspace_url: window.location.href
    });
    return JSON.parse(le.data[0]);
  }
  function ee(j) {
    k.dispatch("update_model", {
      prompt_name: j.promptName,
      model_name: j.modelName,
      model_settings: j.settings,
      session_id: g
    }), f = !0;
  }
  async function A(j, le) {
    const he = await (await O()).predict("/update_prompt_impl", void 0, {
      prompt_name: j,
      prompt: le,
      session_id: g
    });
    return f = !0, JSON.parse(he.data[0]);
  }
  function X(j) {
    if (f)
      return j.preventDefault(), j.returnValue = !0, "does not matter";
  }
  window.onpagehide = (j) => {
    !j.persisted && E && E.predict("/remove_session_id_impl", void 0, { session_id: g });
  };
  const ie = noe(N7e, La.createPortal, R0, mse);
  return e.$$set = (j) => {
    "elem_id" in j && n(0, r = j.elem_id), "elem_classes" in j && n(1, o = j.elem_classes), "visible" in j && n(2, i = j.visible), "theme_mode" in j && n(3, a = j.theme_mode), "value" in j && n(26, l = j.value), "root" in j && n(27, m = j.root), "container" in j && n(4, v = j.container), "scale" in j && n(5, S = j.scale), "min_width" in j && n(6, w = j.min_width), "loading_status" in j && n(7, x = j.loading_status), "gradio" in j && n(8, k = j.gradio);
  }, e.$$.update = () => {
    if (e.$$.dirty[0] & /*root*/
    134217728 && m != null && (h = m), e.$$.dirty[0] & /*value, parsedValue*/
    335544320)
      try {
        if (l != null) {
          n(28, s = JSON.parse(l));
          const j = k0(s.aiconfig, () => s.aiconfig_chunk);
          j && n(9, c = j), s.model_ids && (p = s.model_ids);
        }
      } catch (j) {
        console.error("Invalid JSON value passed to GradioNotebook", j);
      }
  }, [
    r,
    o,
    i,
    a,
    v,
    S,
    w,
    x,
    k,
    c,
    C,
    R,
    L,
    D,
    N,
    H,
    B,
    W,
    U,
    Q,
    J,
    q,
    ee,
    A,
    X,
    ie,
    l,
    m,
    s
  ];
}
class fHe extends HUe {
  constructor(t) {
    super(), ZUe(
      this,
      t,
      aHe,
      oHe,
      eHe,
      {
        elem_id: 0,
        elem_classes: 1,
        visible: 2,
        theme_mode: 3,
        value: 26,
        root: 27,
        container: 4,
        scale: 5,
        min_width: 6,
        loading_status: 7,
        gradio: 8
      },
      null,
      [-1, -1]
    );
  }
}
export {
  fHe as default
};
