import { ik as O, F as M, pb as Pt, a6 as In, eY as Pn, eZ as fe } from "./603b75d9.js";
import { _ as Oe, i as ee, b as ar, a as L, e as wt } from "./c41c92f6.js";
import { _ as fr, a as Et, b as ur, d as Mt, e as St, f as Ct, g as cr, h as Rt, i as Nt, k as He, j as Tt, l as Ft, m as lr, n as qt, o as Lt } from "./267ca380.js";
import { g as A, _ as Ut, u as Kt, d as xt, v as Ae, n as ne, i as Je, l as Dt, f as ze, p as Gt, w as Xe, x as Yt, k as dr, c as pr, y as Wt, z as yr, e as Ze, A as jt, t as be } from "./06d051b0.js";
import { _ as gr, a as hr, b as Be, c as Qe, i as $r, d as Vt } from "./3b47f9d5.js";
import { i as Ie, t as Ht } from "./42df2f03.js";
import "react";
function v(e) {
  return typeof File < "u" && e instanceof File || typeof Date < "u" && e instanceof Date ? !1 : typeof e == "object" && e !== null && !Array.isArray(e);
}
const Jt = "__additional_property", zt = "additionalProperties", ke = "allOf", ye = "anyOf", Xt = "const", Zt = "default", vr = "dependencies", Ky = "enum", xy = "__errors", Bt = "$id", Qt = "if", kt = "items", ei = "_$junk_option_schema_id$_", Dy = "$name", B = "oneOf", C = "properties", ni = "required", Gy = "submitButtonOptions", R = "$ref", Yy = "__rjsf_additionalProperties", Wy = "__rjsf_rootSchema", jy = "ui:field", ri = "ui:widget", ti = "ui:options", Vy = "ui:globalOptions";
function xe(e = {}, n = {}) {
  return Object.keys(e).filter((r) => r.indexOf("ui:") === 0).reduce((r, t) => {
    const s = e[t];
    return t === ri && v(s) ? (console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"), r) : t === ti && v(s) ? { ...r, ...s } : { ...r, [t.substring(3)]: s };
  }, { ...n });
}
function ii(e, n = {}, r) {
  if (!e.additionalProperties)
    return !1;
  const { expandable: t = !0 } = xe(n);
  return t === !1 ? t : e.maxProperties !== void 0 && r ? Object.keys(r).length < e.maxProperties : !0;
}
var si = Oe, oi = fr, ai = ee, fi = "[object Object]", ui = Function.prototype, ci = Object.prototype, mr = ui.toString, li = ci.hasOwnProperty, di = mr.call(Object);
function pi(e) {
  if (!ai(e) || si(e) != fi)
    return !1;
  var n = oi(e);
  if (n === null)
    return !0;
  var r = li.call(n, "constructor") && n.constructor;
  return typeof r == "function" && r instanceof r && mr.call(r) == di;
}
var W = pi;
const Hy = /* @__PURE__ */ O(W);
var yi = A, gi = Ie, hi = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, $i = /^\w*$/;
function vi(e, n) {
  if (yi(e))
    return !1;
  var r = typeof e;
  return r == "number" || r == "symbol" || r == "boolean" || e == null || gi(e) ? !0 : $i.test(e) || !hi.test(e) || n != null && e in Object(n);
}
var en = vi, _r = Ut, mi = "Expected a function";
function nn(e, n) {
  if (typeof e != "function" || n != null && typeof n != "function")
    throw new TypeError(mi);
  var r = function() {
    var t = arguments, s = n ? n.apply(this, t) : t[0], i = r.cache;
    if (i.has(s))
      return i.get(s);
    var a = e.apply(this, t);
    return r.cache = i.set(s, a) || i, a;
  };
  return r.cache = new (nn.Cache || _r)(), r;
}
nn.Cache = _r;
var _i = nn, Oi = _i, Ai = 500;
function bi(e) {
  var n = Oi(e, function(t) {
    return r.size === Ai && r.clear(), t;
  }), r = n.cache;
  return n;
}
var Ii = bi, Pi = Ii, wi = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ei = /\\(\\)?/g, Mi = Pi(function(e) {
  var n = [];
  return e.charCodeAt(0) === 46 && n.push(""), e.replace(wi, function(r, t, s, i) {
    n.push(s ? i.replace(Ei, "$1") : t || r);
  }), n;
}), Si = Mi;
function Ci(e, n) {
  for (var r = -1, t = e == null ? 0 : e.length, s = Array(t); ++r < t; )
    s[r] = n(e[r], r, e);
  return s;
}
var F = Ci, wn = ar, Ri = F, Ni = A, Ti = Ie, Fi = 1 / 0, En = wn ? wn.prototype : void 0, Mn = En ? En.toString : void 0;
function Or(e) {
  if (typeof e == "string")
    return e;
  if (Ni(e))
    return Ri(e, Or) + "";
  if (Ti(e))
    return Mn ? Mn.call(e) : "";
  var n = e + "";
  return n == "0" && 1 / e == -Fi ? "-0" : n;
}
var qi = Or, Li = qi;
function Ui(e) {
  return e == null ? "" : Li(e);
}
var Ki = Ui, xi = A, Di = en, Gi = Si, Yi = Ki;
function Wi(e, n) {
  return xi(e) ? e : Di(e, n) ? [e] : Gi(Yi(e));
}
var re = Wi, ji = Ie, Vi = 1 / 0;
function Hi(e) {
  if (typeof e == "string" || ji(e))
    return e;
  var n = e + "";
  return n == "0" && 1 / e == -Vi ? "-0" : n;
}
var j = Hi, Ji = re, zi = j;
function Xi(e, n) {
  n = Ji(n, e);
  for (var r = 0, t = n.length; e != null && r < t; )
    e = e[zi(n[r++])];
  return r && r == t ? e : void 0;
}
var Pe = Xi, Zi = Pe;
function Bi(e, n, r) {
  var t = e == null ? void 0 : Zi(e, n);
  return t === void 0 ? r : t;
}
var Ar = Bi;
const m = /* @__PURE__ */ O(Ar);
var Qi = Kt, ki = xt, es = Ae, ns = A, rs = ne, ts = Je, is = Dt, ss = ze, os = "[object Map]", as = "[object Set]", fs = Object.prototype, us = fs.hasOwnProperty;
function cs(e) {
  if (e == null)
    return !0;
  if (rs(e) && (ns(e) || typeof e == "string" || typeof e.splice == "function" || ts(e) || ss(e) || es(e)))
    return !e.length;
  var n = ki(e);
  if (n == os || n == as)
    return !e.size;
  if (is(e))
    return !Qi(e).length;
  for (var r in e)
    if (us.call(e, r))
      return !1;
  return !0;
}
var ls = cs;
const ge = /* @__PURE__ */ O(ls);
var we = {}, ds = /~/, ps = /~[01]/g;
function ys(e) {
  switch (e) {
    case "~1":
      return "/";
    case "~0":
      return "~";
  }
  throw new Error("Invalid tilde escape: " + e);
}
function br(e) {
  return ds.test(e) ? e.replace(ps, ys) : e;
}
function gs(e, n, r) {
  for (var t, s, i = 1, a = n.length; i < a; ) {
    if (n[i] === "constructor" || n[i] === "prototype" || n[i] === "__proto__")
      return e;
    if (t = br(n[i++]), s = a > i, typeof e[t] > "u" && (Array.isArray(e) && t === "-" && (t = e.length), s && (n[i] !== "" && n[i] < 1 / 0 || n[i] === "-" ? e[t] = [] : e[t] = {})), !s)
      break;
    e = e[t];
  }
  var o = e[t];
  return r === void 0 ? delete e[t] : e[t] = r, o;
}
function rn(e) {
  if (typeof e == "string") {
    if (e = e.split("/"), e[0] === "")
      return e;
    throw new Error("Invalid JSON pointer.");
  } else if (Array.isArray(e)) {
    for (const n of e)
      if (typeof n != "string" && typeof n != "number")
        throw new Error("Invalid JSON pointer. Must be of type string or number.");
    return e;
  }
  throw new Error("Invalid JSON pointer.");
}
function Ir(e, n) {
  if (typeof e != "object")
    throw new Error("Invalid input object.");
  n = rn(n);
  var r = n.length;
  if (r === 1)
    return e;
  for (var t = 1; t < r; ) {
    if (e = e[br(n[t++])], r === t)
      return e;
    if (typeof e != "object" || e === null)
      return;
  }
}
function Pr(e, n, r) {
  if (typeof e != "object")
    throw new Error("Invalid input object.");
  if (n = rn(n), n.length === 0)
    throw new Error("Invalid JSON pointer for set.");
  return gs(e, n, r);
}
function hs(e) {
  var n = rn(e);
  return {
    get: function(r) {
      return Ir(r, n);
    },
    set: function(r, t) {
      return Pr(r, n, t);
    }
  };
}
we.get = Ir;
we.set = Pr;
we.compile = hs;
function $s(e) {
  var n = e == null ? 0 : e.length;
  return n ? e[n - 1] : void 0;
}
var wr = $s;
function vs(e, n, r) {
  var t = -1, s = e.length;
  n < 0 && (n = -n > s ? 0 : s + n), r = r > s ? s : r, r < 0 && (r += s), s = n > r ? 0 : r - n >>> 0, n >>>= 0;
  for (var i = Array(s); ++t < s; )
    i[t] = e[t + n];
  return i;
}
var ms = vs, _s = Pe, Os = ms;
function As(e, n) {
  return n.length < 2 ? e : _s(e, Os(n, 0, -1));
}
var bs = As, Is = re, Ps = wr, ws = bs, Es = j;
function Ms(e, n) {
  return n = Is(n, e), e = ws(e, n), e == null || delete e[Es(Ps(n))];
}
var Ss = Ms, Cs = W;
function Rs(e) {
  return Cs(e) ? void 0 : e;
}
var Ns = Rs, Sn = ar, Ts = Ae, Fs = A, Cn = Sn ? Sn.isConcatSpreadable : void 0;
function qs(e) {
  return Fs(e) || Ts(e) || !!(Cn && e && e[Cn]);
}
var Ls = qs, Us = Gt, Ks = Ls;
function Er(e, n, r, t, s) {
  var i = -1, a = e.length;
  for (r || (r = Ks), s || (s = []); ++i < a; ) {
    var o = e[i];
    n > 0 && r(o) ? n > 1 ? Er(o, n - 1, r, t, s) : Us(s, o) : t || (s[s.length] = o);
  }
  return s;
}
var Ee = Er, xs = Ee;
function Ds(e) {
  var n = e == null ? 0 : e.length;
  return n ? xs(e, 1) : [];
}
var tn = Ds;
function Gs(e, n, r) {
  switch (r.length) {
    case 0:
      return e.call(n);
    case 1:
      return e.call(n, r[0]);
    case 2:
      return e.call(n, r[0], r[1]);
    case 3:
      return e.call(n, r[0], r[1], r[2]);
  }
  return e.apply(n, r);
}
var Mr = Gs, Ys = Mr, Rn = Math.max;
function Ws(e, n, r) {
  return n = Rn(n === void 0 ? e.length - 1 : n, 0), function() {
    for (var t = arguments, s = -1, i = Rn(t.length - n, 0), a = Array(i); ++s < i; )
      a[s] = t[n + s];
    s = -1;
    for (var o = Array(n + 1); ++s < n; )
      o[s] = t[s];
    return o[n] = r(a), Ys(e, this, o);
  };
}
var Sr = Ws;
function js(e) {
  return function() {
    return e;
  };
}
var Vs = js;
function Hs(e) {
  return e;
}
var te = Hs, Js = Vs, Nn = Et, zs = te, Xs = Nn ? function(e, n) {
  return Nn(e, "toString", {
    configurable: !0,
    enumerable: !1,
    value: Js(n),
    writable: !0
  });
} : zs, Zs = Xs, Bs = 800, Qs = 16, ks = Date.now;
function eo(e) {
  var n = 0, r = 0;
  return function() {
    var t = ks(), s = Qs - (t - r);
    if (r = t, s > 0) {
      if (++n >= Bs)
        return arguments[0];
    } else
      n = 0;
    return e.apply(void 0, arguments);
  };
}
var no = eo, ro = Zs, to = no, io = to(ro), Cr = io, so = tn, oo = Sr, ao = Cr;
function fo(e) {
  return ao(oo(e, void 0, so), e + "");
}
var uo = fo, co = F, lo = St, po = Ss, yo = re, go = ur, ho = Ns, $o = uo, vo = Mt, mo = 1, _o = 2, Oo = 4, Ao = $o(function(e, n) {
  var r = {};
  if (e == null)
    return r;
  var t = !1;
  n = co(n, function(i) {
    return i = yo(i, e), t || (t = i.length > 1), i;
  }), go(e, vo(e), r), t && (r = lo(r, mo | _o | Oo, ho));
  for (var s = n.length; s--; )
    po(r, n[s]);
  return r;
}), bo = Ao;
const Io = /* @__PURE__ */ O(bo);
function sn(e, n) {
  const r = n[e];
  return [Io(n, [e]), r];
}
function Rr(e, n = {}, r = []) {
  const t = e || "";
  let s;
  if (t.startsWith("#"))
    s = decodeURIComponent(t.substring(1));
  else
    throw new Error(`Could not find a definition for ${e}.`);
  const i = we.get(n, s);
  if (i === void 0)
    throw new Error(`Could not find a definition for ${e}.`);
  const a = i[R];
  if (a) {
    if (r.includes(a)) {
      if (r.length === 1)
        throw new Error(`Definition for ${e} is a circular reference`);
      const [c, ...l] = r, d = [...l, t, c].join(" -> ");
      throw new Error(`Definition for ${c} contains a circular reference through ${d}`);
    }
    const [o, f] = sn(R, i), u = Rr(f, n, [...r, t]);
    return Object.keys(o).length > 0 ? { ...o, ...u } : u;
  }
  return i;
}
function Nr(e, n = {}) {
  return Rr(e, n, []);
}
var Po = Object.prototype, wo = Po.hasOwnProperty;
function Eo(e, n) {
  return e != null && wo.call(e, n);
}
var Mo = Eo, So = re, Co = Ae, Ro = A, No = Xe, To = Yt, Fo = j;
function qo(e, n, r) {
  n = So(n, e);
  for (var t = -1, s = n.length, i = !1; ++t < s; ) {
    var a = Fo(n[t]);
    if (!(i = e != null && r(e, a)))
      break;
    e = e[a];
  }
  return i || ++t != s ? i : (s = e == null ? 0 : e.length, !!s && To(s) && No(a, s) && (Ro(e) || Co(e)));
}
var Tr = qo, Lo = Mo, Uo = Tr;
function Ko(e, n) {
  return e != null && Uo(e, n, Lo);
}
var xo = Ko;
const Z = /* @__PURE__ */ O(xo);
var Do = Oe, Go = ee, Yo = "[object Number]";
function Wo(e) {
  return typeof e == "number" || Go(e) && Do(e) == Yo;
}
var jo = Wo;
const Fr = /* @__PURE__ */ O(jo);
var Vo = Oe, Ho = A, Jo = ee, zo = "[object String]";
function Xo(e) {
  return typeof e == "string" || !Ho(e) && Jo(e) && Vo(e) == zo;
}
var Zo = Xo;
const on = /* @__PURE__ */ O(Zo);
function Bo(e, n, r, t) {
  var s = -1, i = e == null ? 0 : e.length;
  for (t && i && (r = e[++s]); ++s < i; )
    r = n(r, e[s], s, e);
  return r;
}
var Qo = Bo;
function ko(e) {
  return function(n, r, t) {
    for (var s = -1, i = Object(n), a = t(n), o = a.length; o--; ) {
      var f = a[e ? o : ++s];
      if (r(i[f], f, i) === !1)
        break;
    }
    return n;
  };
}
var ea = ko, na = ea, ra = na(), qr = ra, ta = qr, ia = dr;
function sa(e, n) {
  return e && ta(e, n, ia);
}
var Lr = sa, oa = ne;
function aa(e, n) {
  return function(r, t) {
    if (r == null)
      return r;
    if (!oa(r))
      return e(r, t);
    for (var s = r.length, i = n ? s : -1, a = Object(r); (n ? i-- : ++i < s) && t(a[i], i, a) !== !1; )
      ;
    return r;
  };
}
var fa = aa, ua = Lr, ca = fa, la = ca(ua), an = la, da = pr, pa = gr, ya = 1, ga = 2;
function ha(e, n, r, t) {
  var s = r.length, i = s, a = !t;
  if (e == null)
    return !i;
  for (e = Object(e); s--; ) {
    var o = r[s];
    if (a && o[2] ? o[1] !== e[o[0]] : !(o[0] in e))
      return !1;
  }
  for (; ++s < i; ) {
    o = r[s];
    var f = o[0], u = e[f], c = o[1];
    if (a && o[2]) {
      if (u === void 0 && !(f in e))
        return !1;
    } else {
      var l = new da();
      if (t)
        var d = t(u, c, f, e, n, l);
      if (!(d === void 0 ? pa(c, u, ya | ga, t, l) : d))
        return !1;
    }
  }
  return !0;
}
var $a = ha, va = L;
function ma(e) {
  return e === e && !va(e);
}
var Ur = ma, _a = Ur, Oa = dr;
function Aa(e) {
  for (var n = Oa(e), r = n.length; r--; ) {
    var t = n[r], s = e[t];
    n[r] = [t, s, _a(s)];
  }
  return n;
}
var ba = Aa;
function Ia(e, n) {
  return function(r) {
    return r == null ? !1 : r[e] === n && (n !== void 0 || e in Object(r));
  };
}
var Kr = Ia, Pa = $a, wa = ba, Ea = Kr;
function Ma(e) {
  var n = wa(e);
  return n.length == 1 && n[0][2] ? Ea(n[0][0], n[0][1]) : function(r) {
    return r === e || Pa(r, e, n);
  };
}
var Sa = Ma;
function Ca(e, n) {
  return e != null && n in Object(e);
}
var Ra = Ca, Na = Ra, Ta = Tr;
function Fa(e, n) {
  return e != null && Ta(e, n, Na);
}
var qa = Fa, La = gr, Ua = Ar, Ka = qa, xa = en, Da = Ur, Ga = Kr, Ya = j, Wa = 1, ja = 2;
function Va(e, n) {
  return xa(e) && Da(n) ? Ga(Ya(e), n) : function(r) {
    var t = Ua(r, e);
    return t === void 0 && t === n ? Ka(r, e) : La(n, t, Wa | ja);
  };
}
var Ha = Va;
function Ja(e) {
  return function(n) {
    return n == null ? void 0 : n[e];
  };
}
var za = Ja, Xa = Pe;
function Za(e) {
  return function(n) {
    return Xa(n, e);
  };
}
var Ba = Za, Qa = za, ka = Ba, ef = en, nf = j;
function rf(e) {
  return ef(e) ? Qa(nf(e)) : ka(e);
}
var tf = rf, sf = Sa, of = Ha, af = te, ff = A, uf = tf;
function cf(e) {
  return typeof e == "function" ? e : e == null ? af : typeof e == "object" ? ff(e) ? of(e[0], e[1]) : sf(e) : uf(e);
}
var fn = cf;
function lf(e, n, r, t, s) {
  return s(e, function(i, a, o) {
    r = t ? (t = !1, i) : n(r, i, a, o);
  }), r;
}
var df = lf, pf = Qo, yf = an, gf = fn, hf = df, $f = A;
function vf(e, n, r) {
  var t = $f(e) ? pf : hf, s = arguments.length < 3;
  return t(e, gf(n), r, s, yf);
}
var mf = vf;
const _f = /* @__PURE__ */ O(mf);
var Of = te;
function Af(e) {
  return typeof e == "function" ? e : Of;
}
var xr = Af, bf = Ht, Tn = 1 / 0, If = 17976931348623157e292;
function Pf(e) {
  if (!e)
    return e === 0 ? e : 0;
  if (e = bf(e), e === Tn || e === -Tn) {
    var n = e < 0 ? -1 : 1;
    return n * If;
  }
  return e === e ? e : 0;
}
var wf = Pf, Ef = wf;
function Mf(e) {
  var n = Ef(e), r = n % 1;
  return n === n ? r ? n - r : n : 0;
}
var Sf = Mf, Cf = Wt, Rf = xr, Nf = Sf, Tf = 9007199254740991, Ne = 4294967295, Ff = Math.min;
function qf(e, n) {
  if (e = Nf(e), e < 1 || e > Tf)
    return [];
  var r = Ne, t = Ff(e, Ne);
  n = Rf(n), e -= Ne;
  for (var s = Cf(t, n); ++r < e; )
    n(r);
  return s;
}
var Lf = qf;
const Dr = /* @__PURE__ */ O(Lf);
function Gr(e, n, r) {
  var t;
  if (e && r) {
    const s = m(e, r);
    if (s === void 0)
      return;
    for (let i = 0; i < n.length; i++) {
      const a = n[i], o = m(a, [C, r], {});
      if (!(o.type === "object" || o.type === "array") && (o.const === s || !((t = o.enum) === null || t === void 0) && t.includes(s)))
        return i;
    }
  }
}
function Uf(e, n, r, t, s) {
  if (n === void 0)
    return 0;
  const i = Gr(n, r, s);
  if (Fr(i))
    return i;
  for (let a = 0; a < r.length; a++) {
    const o = r[a];
    if (s && Z(o, [C, s])) {
      const f = m(n, s), u = m(o, [C, s], {});
      if (e.isValid(u, f, t))
        return a;
    } else if (o[C]) {
      const f = {
        anyOf: Object.keys(o[C]).map((c) => ({
          required: [c]
        }))
      };
      let u;
      if (o.anyOf) {
        const { ...c } = o;
        c.allOf ? c.allOf = c.allOf.slice() : c.allOf = [], c.allOf.push(f), u = c;
      } else
        u = Object.assign({}, o, f);
      if (delete u.required, e.isValid(u, n, t))
        return a;
    } else if (e.isValid(o, n, t))
      return a;
  }
  return 0;
}
function Yr(e, n, r, t, s) {
  return Uf(e, n, r, t, s);
}
var Kf = Ct, xf = re, Df = Xe, Fn = L, Gf = j;
function Yf(e, n, r, t) {
  if (!Fn(e))
    return e;
  n = xf(n, e);
  for (var s = -1, i = n.length, a = i - 1, o = e; o != null && ++s < i; ) {
    var f = Gf(n[s]), u = r;
    if (f === "__proto__" || f === "constructor" || f === "prototype")
      return e;
    if (s != a) {
      var c = o[f];
      u = t ? t(c, f, o) : void 0, u === void 0 && (u = Fn(c) ? c : Df(n[s + 1]) ? [] : {});
    }
    Kf(o, f, u), o = o[f];
  }
  return e;
}
var Wf = Yf, jf = Wf;
function Vf(e, n, r) {
  return e == null ? e : jf(e, n, r);
}
var Hf = Vf;
const Jf = /* @__PURE__ */ O(Hf);
var zf = cr, Xf = Rt, Zf = Lr, Bf = fn, Qf = fr, kf = A, eu = Je, nu = yr, ru = L, tu = ze;
function iu(e, n, r) {
  var t = kf(e), s = t || eu(e) || tu(e);
  if (n = Bf(n), r == null) {
    var i = e && e.constructor;
    s ? r = t ? new i() : [] : ru(e) ? r = nu(i) ? Xf(Qf(e)) : {} : r = {};
  }
  return (s ? zf : Zf)(e, function(a, o, f) {
    return n(r, a, o, f);
  }), r;
}
var su = iu;
const ou = /* @__PURE__ */ O(su);
var au = Nt, fu = Ze;
function uu(e, n, r) {
  (r !== void 0 && !fu(e[n], r) || r === void 0 && !(n in e)) && au(e, n, r);
}
var Wr = uu, cu = ne, lu = ee;
function du(e) {
  return lu(e) && cu(e);
}
var Me = du;
function pu(e, n) {
  if (!(n === "constructor" && typeof e[n] == "function") && n != "__proto__")
    return e[n];
}
var jr = pu, yu = ur, gu = He;
function hu(e) {
  return yu(e, gu(e));
}
var $u = hu, qn = Wr, vu = Tt, mu = Ft, _u = lr, Ou = qt, Ln = Ae, Un = A, Au = Me, bu = Je, Iu = yr, Pu = L, wu = W, Eu = ze, Kn = jr, Mu = $u;
function Su(e, n, r, t, s, i, a) {
  var o = Kn(e, r), f = Kn(n, r), u = a.get(f);
  if (u) {
    qn(e, r, u);
    return;
  }
  var c = i ? i(o, f, r + "", e, n, a) : void 0, l = c === void 0;
  if (l) {
    var d = Un(f), p = !d && bu(f), y = !d && !p && Eu(f);
    c = f, d || p || y ? Un(o) ? c = o : Au(o) ? c = _u(o) : p ? (l = !1, c = vu(f, !0)) : y ? (l = !1, c = mu(f, !0)) : c = [] : wu(f) || Ln(f) ? (c = o, Ln(o) ? c = Mu(o) : (!Pu(o) || Iu(o)) && (c = Ou(f))) : l = !1;
  }
  l && (a.set(f, c), s(c, f, t, i, a), a.delete(f)), qn(e, r, c);
}
var Cu = Su, Ru = pr, Nu = Wr, Tu = qr, Fu = Cu, qu = L, Lu = He, Uu = jr;
function Vr(e, n, r, t, s) {
  e !== n && Tu(n, function(i, a) {
    if (s || (s = new Ru()), qu(i))
      Fu(e, n, a, r, Vr, t, s);
    else {
      var o = t ? t(Uu(e, a), i, a + "", e, n, s) : void 0;
      o === void 0 && (o = i), Nu(e, a, o);
    }
  }, Lu);
}
var un = Vr, Ku = te, xu = Sr, Du = Cr;
function Gu(e, n) {
  return Du(xu(e, n, Ku), e + "");
}
var q = Gu, Yu = Ze, Wu = ne, ju = Xe, Vu = L;
function Hu(e, n, r) {
  if (!Vu(r))
    return !1;
  var t = typeof n;
  return (t == "number" ? Wu(r) && ju(n, r.length) : t == "string" && n in r) ? Yu(r[n], e) : !1;
}
var cn = Hu, Ju = q, zu = cn;
function Xu(e) {
  return Ju(function(n, r) {
    var t = -1, s = r.length, i = s > 1 ? r[s - 1] : void 0, a = s > 2 ? r[2] : void 0;
    for (i = e.length > 3 && typeof i == "function" ? (s--, i) : void 0, a && zu(r[0], r[1], a) && (i = s < 3 ? void 0 : i, s = 1), n = Object(n); ++t < s; ) {
      var o = r[t];
      o && e(n, o, t, i);
    }
    return n;
  });
}
var Hr = Xu, Zu = un, Bu = Hr, Qu = Bu(function(e, n, r) {
  Zu(e, n, r);
}), ku = Qu;
const ec = /* @__PURE__ */ O(ku);
var nc = Ee, rc = 1 / 0;
function tc(e) {
  var n = e == null ? 0 : e.length;
  return n ? nc(e, rc) : [];
}
var ln = tc;
const ic = /* @__PURE__ */ O(ln);
function sc(e, n, r, t) {
  for (var s = e.length, i = r + (t ? 1 : -1); t ? i-- : ++i < s; )
    if (n(e[i], i, e))
      return i;
  return -1;
}
var oc = sc;
function ac(e) {
  return e !== e;
}
var fc = ac;
function uc(e, n, r) {
  for (var t = r - 1, s = e.length; ++t < s; )
    if (e[t] === n)
      return t;
  return -1;
}
var cc = uc, lc = oc, dc = fc, pc = cc;
function yc(e, n, r) {
  return n === n ? pc(e, n, r) : lc(e, dc, r);
}
var Jr = yc, gc = Jr;
function hc(e, n) {
  var r = e == null ? 0 : e.length;
  return !!r && gc(e, n, 0) > -1;
}
var dn = hc;
function $c(e, n, r) {
  for (var t = -1, s = e == null ? 0 : e.length; ++t < s; )
    if (r(n, e[t]))
      return !0;
  return !1;
}
var pn = $c;
function vc() {
}
var mc = vc, Te = jt, _c = mc, Oc = hr, Ac = 1 / 0, bc = Te && 1 / Oc(new Te([, -0]))[1] == Ac ? function(e) {
  return new Te(e);
} : _c, Ic = bc, Pc = Be, wc = dn, Ec = pn, Mc = Qe, Sc = Ic, Cc = hr, Rc = 200;
function Nc(e, n, r) {
  var t = -1, s = wc, i = e.length, a = !0, o = [], f = o;
  if (r)
    a = !1, s = Ec;
  else if (i >= Rc) {
    var u = n ? null : Sc(e);
    if (u)
      return Cc(u);
    a = !1, s = Mc, f = new Pc();
  } else
    f = n ? [] : o;
  e:
    for (; ++t < i; ) {
      var c = e[t], l = n ? n(c) : c;
      if (c = r || c !== 0 ? c : 0, a && l === l) {
        for (var d = f.length; d--; )
          if (f[d] === l)
            continue e;
        n && f.push(l), o.push(c);
      } else
        s(f, l, r) || (f !== o && f.push(l), o.push(c));
    }
  return o;
}
var yn = Nc, Tc = yn;
function Fc(e) {
  return e && e.length ? Tc(e) : [];
}
var Se = Fc;
const qc = /* @__PURE__ */ O(Se);
var Lc = an, Uc = ne;
function Kc(e, n) {
  var r = -1, t = Uc(e) ? Array(e.length) : [];
  return Lc(e, function(s, i, a) {
    t[++r] = n(s, i, a);
  }), t;
}
var xc = Kc;
function Dc(e, n) {
  var r = e.length;
  for (e.sort(n); r--; )
    e[r] = e[r].value;
  return e;
}
var Gc = Dc, xn = Ie;
function Yc(e, n) {
  if (e !== n) {
    var r = e !== void 0, t = e === null, s = e === e, i = xn(e), a = n !== void 0, o = n === null, f = n === n, u = xn(n);
    if (!o && !u && !i && e > n || i && a && f && !o && !u || t && a && f || !r && f || !s)
      return 1;
    if (!t && !i && !u && e < n || u && r && s && !t && !i || o && r && s || !a && s || !f)
      return -1;
  }
  return 0;
}
var Wc = Yc, jc = Wc;
function Vc(e, n, r) {
  for (var t = -1, s = e.criteria, i = n.criteria, a = s.length, o = r.length; ++t < a; ) {
    var f = jc(s[t], i[t]);
    if (f) {
      if (t >= o)
        return f;
      var u = r[t];
      return f * (u == "desc" ? -1 : 1);
    }
  }
  return e.index - n.index;
}
var Hc = Vc, Fe = F, Jc = Pe, zc = fn, Xc = xc, Zc = Gc, Bc = be, Qc = Hc, kc = te, el = A;
function nl(e, n, r) {
  n.length ? n = Fe(n, function(i) {
    return el(i) ? function(a) {
      return Jc(a, i.length === 1 ? i[0] : i);
    } : i;
  }) : n = [kc];
  var t = -1;
  n = Fe(n, Bc(zc));
  var s = Xc(e, function(i, a, o) {
    var f = Fe(n, function(u) {
      return u(i);
    });
    return { criteria: f, index: ++t, value: i };
  });
  return Zc(s, function(i, a) {
    return Qc(i, a, r);
  });
}
var rl = nl, tl = Ee, il = rl, sl = q, Dn = cn, ol = sl(function(e, n) {
  if (e == null)
    return [];
  var r = n.length;
  return r > 1 && Dn(e, n[0], n[1]) ? n = [] : r > 2 && Dn(n[0], n[1], n[2]) && (n = [n[0]]), il(e, tl(n, 1), []);
}), zr = ol, al = yn;
function fl(e, n) {
  return n = typeof n == "function" ? n : void 0, e && e.length ? al(e, void 0, n) : [];
}
var gn = fl, ul = q, cl = Ze, ll = cn, dl = He, Xr = Object.prototype, pl = Xr.hasOwnProperty, yl = ul(function(e, n) {
  e = Object(e);
  var r = -1, t = n.length, s = t > 2 ? n[2] : void 0;
  for (s && ll(n[0], n[1], s) && (t = 1); ++r < t; )
    for (var i = n[r], a = dl(i), o = -1, f = a.length; ++o < f; ) {
      var u = a[o], c = e[u];
      (c === void 0 || cl(c, Xr[u]) && !pl.call(e, u)) && (e[u] = i[u]);
    }
  return e;
}), gl = yl, hl = Be, $l = dn, vl = pn, ml = F, _l = be, Gn = Qe, Ol = Math.min;
function Al(e, n, r) {
  for (var t = r ? vl : $l, s = e[0].length, i = e.length, a = i, o = Array(i), f = 1 / 0, u = []; a--; ) {
    var c = e[a];
    a && n && (c = ml(c, _l(n))), f = Ol(c.length, f), o[a] = !r && (n || s >= 120 && c.length >= 120) ? new hl(a && c) : void 0;
  }
  c = e[0];
  var l = -1, d = o[0];
  e:
    for (; ++l < s && u.length < f; ) {
      var p = c[l], y = n ? n(p) : p;
      if (p = r || p !== 0 ? p : 0, !(d ? Gn(d, y) : t(u, y, r))) {
        for (a = i; --a; ) {
          var h = o[a];
          if (!(h ? Gn(h, y) : t(e[a], y, r)))
            continue e;
        }
        d && d.push(y), u.push(p);
      }
    }
  return u;
}
var Zr = Al, bl = Me;
function Il(e) {
  return bl(e) ? e : [];
}
var Br = Il, Pl = F, wl = Zr, El = q, Ml = Br, Sl = wr, Cl = El(function(e) {
  var n = Sl(e), r = Pl(e, Ml);
  return n = typeof n == "function" ? n : void 0, n && r.pop(), r.length && r[0] === e[0] ? wl(r, void 0, n) : [];
}), Qr = Cl, Rl = Oe, Nl = ee, Tl = "[object Boolean]";
function Fl(e) {
  return e === !0 || e === !1 || Nl(e) && Rl(e) == Tl;
}
var ql = Fl, E = $r, Ll = zr, hn = Se, Yn = gn, Ul = gl, Kl = Qr, he = W, qe = ql, Wn = (e) => Array.isArray(e) ? e : [e], I = (e) => e === void 0, ue = (e) => he(e) || Array.isArray(e) ? Object.keys(e) : [], K = (e, n) => e.hasOwnProperty(n), D = (e) => Ll(hn(e)), jn = (e) => I(e) || Array.isArray(e) && e.length === 0, xl = (e, n, r, t) => n && K(n, r) && e && K(e, r) && t(e[r], n[r]), Le = (e, n) => I(e) && n === 0 || I(n) && e === 0 || E(e, n), Dl = (e, n) => I(e) && n === !1 || I(n) && e === !1 || E(e, n), Vn = (e) => I(e) || E(e, {}) || e === !0, ce = (e) => I(e) || E(e, {}), Hn = (e) => I(e) || he(e) || e === !0 || e === !1;
function Jn(e, n) {
  return jn(e) && jn(n) ? !0 : E(D(e), D(n));
}
function Gl(e, n) {
  return e = Wn(e), n = Wn(n), E(D(e), D(n));
}
function pe(e, n, r, t) {
  var s = hn(ue(e).concat(ue(n)));
  return ce(e) && ce(n) ? !0 : ce(e) && ue(n).length || ce(n) && ue(e).length ? !1 : s.every(function(i) {
    var a = e[i], o = n[i];
    return Array.isArray(a) && Array.isArray(o) ? E(D(e), D(n)) : Array.isArray(a) && !Array.isArray(o) || Array.isArray(o) && !Array.isArray(a) ? !1 : xl(e, n, i, t);
  });
}
function Yl(e, n, r, t) {
  return he(e) && he(n) ? t(e, n) : Array.isArray(e) && Array.isArray(n) ? pe(e, n, r, t) : E(e, n);
}
function Ue(e, n, r, t) {
  var s = Yn(e, t), i = Yn(n, t), a = Kl(s, i, t);
  return a.length === Math.max(s.length, i.length);
}
var Wl = {
  title: E,
  uniqueItems: Dl,
  minLength: Le,
  minItems: Le,
  minProperties: Le,
  required: Jn,
  enum: Jn,
  type: Gl,
  items: Yl,
  anyOf: Ue,
  allOf: Ue,
  oneOf: Ue,
  properties: pe,
  patternProperties: pe,
  dependencies: pe
}, jl = [
  "properties",
  "patternProperties",
  "dependencies",
  "uniqueItems",
  "minLength",
  "minItems",
  "minProperties",
  "required"
], Vl = ["additionalProperties", "additionalItems", "contains", "propertyNames", "not"];
function De(e, n, r) {
  if (r = Ul(r, {
    ignore: []
  }), Vn(e) && Vn(n))
    return !0;
  if (!Hn(e) || !Hn(n))
    throw new Error("Either of the values are not a JSON schema.");
  if (e === n)
    return !0;
  if (qe(e) && qe(n))
    return e === n;
  if (e === void 0 && n === !1 || n === void 0 && e === !1 || I(e) && !I(n) || !I(e) && I(n))
    return !1;
  var t = hn(Object.keys(e).concat(Object.keys(n)));
  if (r.ignore.length && (t = t.filter((i) => r.ignore.indexOf(i) === -1)), !t.length)
    return !0;
  function s(i, a) {
    return De(i, a, r);
  }
  return t.every(function(i) {
    var a = e[i], o = n[i];
    if (Vl.indexOf(i) !== -1)
      return De(a, o, r);
    var f = Wl[i];
    if (f || (f = E), E(a, o))
      return !0;
    if (jl.indexOf(i) === -1 && (!K(e, i) && K(n, i) || K(e, i) && !K(n, i)))
      return a === o;
    var u = f(a, o, i, s);
    if (!qe(u))
      throw new Error("Comparer must return true or false");
    return u;
  });
}
var $n = De;
function Hl(e) {
  return Object.prototype.toString.call(e) === "[object Array]";
}
var vn = Array.isArray || Hl;
function Jl(e) {
  return (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]") && e.valueOf() === e.valueOf();
}
var zl = Jl, Xl = zl;
function Zl(e) {
  return Xl(e) && e % 1 === 0;
}
var Bl = Zl, Ql = vn, kl = Bl;
function ed(e) {
  var n;
  if (!Ql(e) || (n = e.length, !n))
    return !1;
  for (var r = 0; r < n; r++)
    if (!kl(e[r]))
      return !1;
  return !0;
}
var kr = ed;
function nd(e) {
  return typeof e == "function";
}
var et = nd, rd = vn, zn = kr, td = et, le = Math.pow(2, 31) - 1;
function Xn(e, n) {
  var r = 1, t;
  if (e === 0)
    return n;
  if (n === 0)
    return e;
  for (; e % 2 === 0 && n % 2 === 0; )
    e = e / 2, n = n / 2, r = r * 2;
  for (; e % 2 === 0; )
    e = e / 2;
  for (; n; ) {
    for (; n % 2 === 0; )
      n = n / 2;
    e > n && (t = n, n = e, e = t), n = n - e;
  }
  return r * e;
}
function Zn(e, n) {
  var r = 0, t;
  if (e === 0)
    return n;
  if (n === 0)
    return e;
  for (; !(e & 1) && !(n & 1); )
    e >>>= 1, n >>>= 1, r++;
  for (; !(e & 1); )
    e >>>= 1;
  for (; n; ) {
    for (; !(n & 1); )
      n >>>= 1;
    e > n && (t = n, n = e, e = t), n = n - e;
  }
  return e << r;
}
function id() {
  var e = arguments.length, n, r, t, s, i, a, o;
  for (n = new Array(e), o = 0; o < e; o++)
    n[o] = arguments[o];
  if (zn(n)) {
    if (e === 2)
      return i = n[0], a = n[1], i < 0 && (i = -i), a < 0 && (a = -a), i <= le && a <= le ? Zn(i, a) : Xn(i, a);
    t = n;
  } else if (rd(n[0]))
    if (e > 1) {
      if (t = n[0], r = n[1], !td(r))
        throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `" + r + "`.");
    } else
      t = n[0];
  else
    throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `" + n[0] + "`.");
  if (s = t.length, s < 2)
    return null;
  if (r) {
    for (i = new Array(s), o = 0; o < s; o++)
      i[o] = r(t[o], o);
    t = i;
  }
  if (e < 3 && !zn(t))
    throw new TypeError("gcd()::invalid input argument. Accessed array values must be integers. Value: `" + t + "`.");
  for (o = 0; o < s; o++)
    i = t[o], i < 0 && (t[o] = -i);
  for (i = t[0], o = 1; o < s; o++)
    a = t[o], a <= le && i <= le ? i = Zn(i, a) : i = Xn(i, a);
  return i;
}
var sd = id, Bn = sd, od = vn, Qn = kr, ad = et;
function fd() {
  var e = arguments.length, n, r, t, s, i, a, o;
  for (n = new Array(e), o = 0; o < e; o++)
    n[o] = arguments[o];
  if (Qn(n)) {
    if (e === 2)
      return i = n[0], a = n[1], i < 0 && (i = -i), a < 0 && (a = -a), i === 0 || a === 0 ? 0 : i / Bn(i, a) * a;
    t = n;
  } else if (od(n[0]))
    if (e > 1) {
      if (t = n[0], r = n[1], !ad(r))
        throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `" + r + "`.");
    } else
      t = n[0];
  else
    throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `" + n[0] + "`.");
  if (s = t.length, s < 2)
    return null;
  if (r) {
    for (i = new Array(s), o = 0; o < s; o++)
      i[o] = r(t[o], o);
    t = i;
  }
  if (e < 3 && !Qn(t))
    throw new TypeError("lcm()::invalid input argument. Accessed array values must be integers. Value: `" + t + "`.");
  for (o = 0; o < s; o++)
    i = t[o], i < 0 && (t[o] = -i);
  for (i = t[0], o = 1; o < s; o++) {
    if (a = t[o], i === 0 || a === 0)
      return 0;
    i = i / Bn(i, a) * a;
  }
  return i;
}
var ud = fd, cd = un, kn = L;
function nt(e, n, r, t, s, i) {
  return kn(e) && kn(n) && (i.set(n, e), cd(e, n, void 0, nt, i), i.delete(n)), e;
}
var ld = nt, dd = un, pd = Hr, yd = pd(function(e, n, r, t) {
  dd(e, n, r, t);
}), gd = yd, hd = Mr, $d = q, vd = ld, md = gd, _d = $d(function(e) {
  return e.push(void 0, vd), hd(md, void 0, e);
}), Od = _d, Ad = F, bd = Zr, Id = q, Pd = Br, wd = Id(function(e) {
  var n = Ad(e, Pd);
  return n.length && n[0] === e[0] ? bd(n) : [];
}), Ed = wd;
function Md(e, n, r, t) {
  for (var s = r - 1, i = e.length; ++s < i; )
    if (t(e[s], n))
      return s;
  return -1;
}
var Sd = Md, Cd = F, Rd = Jr, Nd = Sd, Td = be, Fd = lr, qd = Array.prototype, er = qd.splice;
function Ld(e, n, r, t) {
  var s = t ? Nd : Rd, i = -1, a = n.length, o = e;
  for (e === n && (n = Fd(n)), r && (o = Cd(e, Td(r))); ++i < a; )
    for (var f = 0, u = n[i], c = r ? r(u) : u; (f = s(o, c, f, t)) > -1; )
      o !== e && er.call(o, f, 1), er.call(e, f, 1);
  return e;
}
var Ud = Ld, Kd = Ud;
function xd(e, n) {
  return e && e.length && n && n.length ? Kd(e, n) : e;
}
var Dd = xd, Gd = cr, Yd = an, Wd = xr, jd = A;
function Vd(e, n) {
  var r = jd(e) ? Gd : Yd;
  return r(e, Wd(n));
}
var mn = Vd;
const Jy = /* @__PURE__ */ O(mn);
var Hd = Be, Jd = dn, zd = pn, Xd = F, Zd = be, Bd = Qe, Qd = 200;
function kd(e, n, r, t) {
  var s = -1, i = Jd, a = !0, o = e.length, f = [], u = n.length;
  if (!o)
    return f;
  r && (n = Xd(n, Zd(r))), t ? (i = zd, a = !1) : n.length >= Qd && (i = Bd, a = !1, n = new Hd(n));
  e:
    for (; ++s < o; ) {
      var c = e[s], l = r == null ? c : r(c);
      if (c = t || c !== 0 ? c : 0, a && l === l) {
        for (var d = u; d--; )
          if (n[d] === l)
            continue e;
        f.push(c);
      } else
        i(n, l, t) || f.push(c);
    }
  return f;
}
var ep = kd, np = ep, rp = q, tp = Me, ip = rp(function(e, n) {
  return tp(e) ? np(e, n) : [];
}), sp = ip;
const op = tn, ap = ln, rt = W, fp = Se, up = gn, cp = sp;
function lp(e) {
  for (const n in e)
    tt(e, n) && it(e[n]) && delete e[n];
  return e;
}
const dp = (e) => fp(ap(e.map(_n))), pp = (e, n) => e.map((r) => r && r[n]), tt = (e, n) => Object.prototype.hasOwnProperty.call(e, n), _n = (e) => rt(e) || Array.isArray(e) ? Object.keys(e) : [], yp = (e) => e !== void 0, gp = (e) => rt(e) || e === !0 || e === !1, it = (e) => !_n(e).length && e !== !1 && e !== !0, hp = (e, ...n) => cp.apply(null, [e].concat(op(n)));
var st = {
  allUniqueKeys: dp,
  deleteUndefinedProps: lp,
  getValues: pp,
  has: tt,
  isEmptySchema: it,
  isSchema: gp,
  keys: _n,
  notUndefined: yp,
  uniqWith: up,
  withoutArr: hp
};
const $p = $n, vp = mn, {
  allUniqueKeys: mp,
  deleteUndefinedProps: _p,
  getValues: Op,
  keys: X,
  notUndefined: Ap,
  uniqWith: bp,
  withoutArr: nr
} = st;
function Ip(e) {
  vp(e, function(n, r) {
    n === !1 && delete e[r];
  });
}
function rr(e, n) {
  return mp(e).reduce(function(t, s) {
    const i = Op(e, s), a = bp(i.filter(Ap), $p);
    return t[s] = n(a, s), t;
  }, {});
}
var Pp = {
  keywords: ["properties", "patternProperties", "additionalProperties"],
  resolver(e, n, r, t) {
    t.ignoreAdditionalProperties || (e.forEach(function(i) {
      const a = e.filter((c) => c !== i), o = X(i.properties), u = X(i.patternProperties).map((c) => new RegExp(c));
      a.forEach(function(c) {
        const l = X(c.properties), d = l.filter((y) => u.some((h) => h.test(y)));
        nr(l, o, d).forEach(function(y) {
          c.properties[y] = r.properties([
            c.properties[y],
            i.additionalProperties
          ], y);
        });
      });
    }), e.forEach(function(i) {
      const a = e.filter((f) => f !== i), o = X(i.patternProperties);
      i.additionalProperties === !1 && a.forEach(function(f) {
        const u = X(f.patternProperties);
        nr(u, o).forEach((l) => delete f.patternProperties[l]);
      });
    }));
    const s = {
      additionalProperties: r.additionalProperties(e.map((i) => i.additionalProperties)),
      patternProperties: rr(e.map((i) => i.patternProperties), r.patternProperties),
      properties: rr(e.map((i) => i.properties), r.properties)
    };
    return s.additionalProperties === !1 && Ip(s.properties), _p(s);
  }
};
const wp = $n, Ep = mn, {
  allUniqueKeys: Mp,
  deleteUndefinedProps: Sp,
  has: Cp,
  isSchema: ot,
  notUndefined: at,
  uniqWith: Rp
} = st;
function Np(e) {
  Ep(e, function(n, r) {
    n === !1 && e.splice(r, 1);
  });
}
function Tp(e, n) {
  return e.map(function(r) {
    if (r)
      if (Array.isArray(r.items)) {
        const t = r.items[n];
        if (ot(t))
          return t;
        if (Cp(r, "additionalItems"))
          return r.additionalItems;
      } else
        return r.items;
  });
}
function Fp(e) {
  return e.map(function(n) {
    if (n)
      return Array.isArray(n.items) ? n.additionalItems : n.items;
  });
}
function qp(e, n, r) {
  return Mp(r).reduce(function(s, i) {
    const a = Tp(e, i), o = Rp(a.filter(at), wp);
    return s[i] = n(o, i), s;
  }, []);
}
var Lp = {
  keywords: ["items", "additionalItems"],
  resolver(e, n, r) {
    const t = e.map((o) => o.items), s = t.filter(at), i = {};
    s.every(ot) ? i.items = r.items(t) : i.items = qp(e, r.items, t);
    let a;
    return s.every(Array.isArray) ? a = e.map((o) => o.additionalItems) : s.some(Array.isArray) && (a = Fp(e)), a && (i.additionalItems = r.additionalItems(a)), i.additionalItems === !1 && Array.isArray(i.items) && Np(i.items), Sp(i);
  }
};
const ft = Lt, $e = $n, Up = ud, Kp = Od, ut = tn, On = ln, xp = Ed, Dp = Qr, Ge = $r, G = W, Gp = Dd, ct = zr, An = Se, x = gn, lt = Pp, dt = Lp, de = (e, n) => e.indexOf(n) !== -1, Yp = (e) => G(e) || e === !0 || e === !1, Wp = (e) => e === !1, pt = (e) => e === !0, Ce = (e, n, r) => r(e), yt = (e) => ct(An(On(e))), ve = (e) => e !== void 0, gt = (e) => An(On(e.map(Xp))), V = (e) => e[0], jp = (e) => yt(e), ie = (e) => Math.max.apply(Math, e), se = (e) => Math.min.apply(Math, e), Vp = (e) => e.some(pt), Hp = (e) => x(ut(e), Ge);
function Jp(e) {
  return function(n, r) {
    return $e({
      [e]: n
    }, { [e]: r });
  };
}
function ht(e) {
  let { allOf: n = [], ...r } = e;
  return r = G(e) ? r : e, [r, ...n.map(ht)];
}
function $t(e, n) {
  return e.map((r) => r && r[n]);
}
function zp(e, n) {
  return e.map(function(r, t) {
    try {
      return n(r, t);
    } catch {
      return;
    }
  }).filter(ve);
}
function Xp(e) {
  return G(e) || Array.isArray(e) ? Object.keys(e) : [];
}
function Ye(e, n) {
  if (n = n || [], !e.length)
    return n;
  const r = e.slice(0).shift(), t = e.slice(1);
  return n.length ? Ye(t, ut(n.map((s) => r.map((i) => [i].concat(s))))) : Ye(t, r.map((s) => s));
}
function vt(e, n) {
  let r;
  try {
    r = e.map(function(t) {
      return JSON.stringify(t, null, 2);
    }).join(`
`);
  } catch {
    r = e.join(", ");
  }
  throw new Error('Could not resolve values for path:"' + n.join(".") + `". They are probably incompatible. Values: 
` + r);
}
function Zp(e, n, r, t, s, i) {
  if (e.length) {
    const a = s.complexResolvers[n];
    if (!a || !a.resolver)
      throw new Error("No resolver found for " + n);
    const o = r.map((l) => e.reduce((d, p) => (l[p] !== void 0 && (d[p] = l[p]), d), {})), f = x(o, $e), u = a.keywords.reduce((l, d) => ({
      ...l,
      [d]: (p, y = []) => t(p, null, i.concat(d, y))
    }), {}), c = a.resolver(f, i.concat(n), u, s);
    return G(c) || vt(f, i.concat(n)), c;
  }
}
function Bp(e) {
  return { required: e };
}
const Qp = ["properties", "patternProperties", "definitions", "dependencies"], kp = ["anyOf", "oneOf"], ey = [
  "additionalProperties",
  "additionalItems",
  "contains",
  "propertyNames",
  "not",
  "items"
], $ = {
  type(e) {
    if (e.some(Array.isArray)) {
      const n = e.map(function(t) {
        return Array.isArray(t) ? t : [t];
      }), r = xp.apply(null, n);
      if (r.length === 1)
        return r[0];
      if (r.length > 1)
        return An(r);
    }
  },
  dependencies(e, n, r) {
    return gt(e).reduce(function(s, i) {
      const a = $t(e, i);
      let o = x(a.filter(ve), Ge);
      const f = o.filter(Array.isArray);
      if (f.length) {
        if (f.length === o.length)
          s[i] = yt(o);
        else {
          const u = o.filter(Yp), c = f.map(Bp);
          s[i] = r(u.concat(c), i);
        }
        return s;
      }
      return o = x(o, $e), s[i] = r(o, i), s;
    }, {});
  },
  oneOf(e, n, r) {
    const t = Ye(ft(e)), s = zp(t, r), i = x(s, $e);
    if (i.length)
      return i;
  },
  not(e) {
    return { anyOf: e };
  },
  pattern(e) {
    return e.map((n) => "(?=" + n + ")").join("");
  },
  multipleOf(e) {
    let n = e.slice(0), r = 1;
    for (; n.some((t) => !Number.isInteger(t)); )
      n = n.map((t) => t * 10), r = r * 10;
    return Up(n) / r;
  },
  enum(e) {
    const n = Dp.apply(null, e.concat(Ge));
    if (n.length)
      return ct(n);
  }
};
$.$id = V;
$.$ref = V;
$.$schema = V;
$.additionalItems = Ce;
$.additionalProperties = Ce;
$.anyOf = $.oneOf;
$.contains = Ce;
$.default = V;
$.definitions = $.dependencies;
$.description = V;
$.examples = Hp;
$.exclusiveMaximum = se;
$.exclusiveMinimum = ie;
$.items = dt;
$.maximum = se;
$.maxItems = se;
$.maxLength = se;
$.maxProperties = se;
$.minimum = ie;
$.minItems = ie;
$.minLength = ie;
$.minProperties = ie;
$.properties = lt;
$.propertyNames = Ce;
$.required = jp;
$.title = V;
$.uniqueItems = Vp;
const ny = {
  properties: lt,
  items: dt
};
function bn(e, n, r) {
  n = Kp(n, {
    ignoreAdditionalProperties: !1,
    resolvers: $,
    complexResolvers: ny,
    deep: !0
  });
  const t = Object.entries(n.complexResolvers);
  function s(o, f, u) {
    o = ft(o.filter(ve)), u = u || [];
    const c = G(f) ? f : {};
    if (!o.length)
      return;
    if (o.some(Wp))
      return !1;
    if (o.every(pt))
      return !0;
    o = o.filter(G);
    const l = gt(o);
    if (n.deep && de(l, "allOf"))
      return bn({
        allOf: o
      }, n);
    const d = t.map(([p, y]) => l.filter((h) => y.keywords.includes(h)));
    return d.forEach((p) => Gp(l, p)), l.forEach(function(p) {
      const y = $t(o, p), h = x(y.filter(ve), Jp(p));
      if (h.length === 1 && de(kp, p))
        c[p] = h[0].map((g) => s([g], g));
      else if (h.length === 1 && !de(Qp, p) && !de(ey, p))
        c[p] = h[0];
      else {
        const g = n.resolvers[p] || n.resolvers.defaultResolver;
        if (!g)
          throw new Error("No resolver found for key " + p + ". You can provide a resolver for this keyword in the options, or provide a default resolver.");
        const _ = (b, H = []) => s(b, null, u.concat(p, H));
        c[p] = g(h, u.concat(p), _, n), c[p] === void 0 ? vt(h, u.concat(p)) : c[p] === void 0 && delete c[p];
      }
    }), t.reduce((p, [y, h], g) => ({
      ...p,
      ...Zp(d[g], y, o, s, n, u)
    }), c);
  }
  const i = On(ht(e));
  return s(i);
}
bn.options = {
  resolvers: $
};
var ry = bn;
const ty = /* @__PURE__ */ O(ry);
function me(e) {
  let n;
  const r = m(e, "discriminator.propertyName", void 0);
  return on(r) ? n = r : r !== void 0 && console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`), n;
}
function Q(e) {
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : e == null ? "null" : typeof e == "boolean" ? "boolean" : isNaN(e) ? typeof e == "object" ? "object" : "string" : "number";
}
var iy = Ee, sy = q, oy = yn, ay = Me, fy = sy(function(e) {
  return oy(iy(e, 1, ay, !0));
}), uy = fy;
const cy = /* @__PURE__ */ O(uy);
function We(e) {
  let { type: n } = e;
  return !n && e.const ? Q(e.const) : !n && e.enum ? "string" : !n && (e.properties || e.additionalProperties) ? "object" : (Array.isArray(n) && (n.length === 2 && n.includes("null") ? n = n.find((r) => r !== "null") : n = n[0]), n);
}
function T(e, n) {
  const r = Object.assign({}, e);
  return Object.keys(n).reduce((t, s) => {
    const i = e ? e[s] : {}, a = n[s];
    return e && s in e && v(a) ? t[s] = T(i, a) : e && n && (We(e) === "object" || We(n) === "object") && s === ni && Array.isArray(i) && Array.isArray(a) ? t[s] = cy(i, a) : t[s] = a, t;
  }, r);
}
function oe(e, n, r = {}, t) {
  return S(e, n, r, t)[0];
}
function ly(e, n, r, t, s, i) {
  const { if: a, then: o, else: f, ...u } = n, c = e.isValid(a, i || {}, r);
  let l = [u], d = [];
  if (t)
    o && typeof o != "boolean" && (d = d.concat(S(e, o, r, i, t, s))), f && typeof f != "boolean" && (d = d.concat(S(e, f, r, i, t, s)));
  else {
    const p = c ? o : f;
    p && typeof p != "boolean" && (d = d.concat(S(e, p, r, i, t, s)));
  }
  return d.length && (l = d.map((p) => T(u, p))), l.flatMap((p) => S(e, p, r, i, t, s));
}
function mt(e) {
  return e.reduce(
    (r, t) => t.length > 1 ? t.flatMap((s) => Dr(r.length, (i) => [...r[i]].concat(s))) : (r.forEach((s) => s.push(t[0])), r),
    [[]]
    // Start with an empty list
  );
}
function dy(e, n, r, t, s, i) {
  const a = _t(e, n, r, t, s, i);
  if (a.length > 1 || a[0] !== n)
    return a;
  if (vr in n)
    return Ot(e, n, r, t, s, i).flatMap((f) => S(e, f, r, i, t, s));
  if (ke in n && Array.isArray(n.allOf)) {
    const o = n.allOf.map((u) => S(e, u, r, i, t, s));
    return mt(o).map((u) => ({ ...n, allOf: u }));
  }
  return [n];
}
function _t(e, n, r, t, s, i) {
  const a = k(n, r, s);
  return a !== n ? S(e, a, r, i, t, s) : [n];
}
function k(e, n, r) {
  if (!v(e))
    return e;
  let t = e;
  if (R in t) {
    const { $ref: s, ...i } = t;
    if (r.includes(s))
      return t;
    r.push(s), t = { ...Nr(s, n), ...i };
  }
  if (C in t) {
    const s = [], i = ou(t[C], (a, o, f) => {
      const u = [...r];
      a[f] = k(o, n, u), s.push(u);
    }, {});
    ec(r, qc(ic(s))), t = { ...t, [C]: i };
  }
  return kt in t && !Array.isArray(t.items) && typeof t.items != "boolean" && (t = {
    ...t,
    items: k(t.items, n, r)
  }), Vt(e, t) ? e : t;
}
function py(e, n, r, t) {
  const s = {
    ...n,
    properties: { ...n.properties }
  }, i = t && v(t) ? t : {};
  return Object.keys(i).forEach((a) => {
    if (a in s.properties)
      return;
    let o = {};
    typeof s.additionalProperties != "boolean" ? R in s.additionalProperties ? o = oe(e, { $ref: m(s.additionalProperties, [R]) }, r, i) : "type" in s.additionalProperties ? o = { ...s.additionalProperties } : ye in s.additionalProperties || B in s.additionalProperties ? o = {
      type: "object",
      ...s.additionalProperties
    } : o = { type: Q(m(i, [a])) } : o = { type: Q(m(i, [a])) }, s.properties[a] = o, Jf(s.properties, [a, Jt], !0);
  }), s;
}
function S(e, n, r, t, s = !1, i = []) {
  return v(n) ? dy(e, n, r, s, i, t).flatMap((o) => {
    var f;
    let u = o;
    if (Qt in u)
      return ly(e, u, r, s, i, t);
    if (ke in u) {
      if (s) {
        const { allOf: l, ...d } = u;
        return [...l, d];
      }
      try {
        const l = [], d = [];
        (f = u.allOf) === null || f === void 0 || f.forEach((p) => {
          typeof p == "object" && p.contains ? l.push(p) : d.push(p);
        }), l.length && (u = { ...u, allOf: d }), u = ty(u, {
          deep: !1
        }), l.length && (u.allOf = l);
      } catch (l) {
        console.warn(`could not merge subschemas in allOf:
`, l);
        const { allOf: d, ...p } = u;
        return p;
      }
    }
    return zt in u && u.additionalProperties !== !1 ? py(e, u, r, t) : u;
  }) : [{}];
}
function yy(e, n, r, t, s) {
  let i;
  const { oneOf: a, anyOf: o, ...f } = n;
  if (Array.isArray(a) ? i = a : Array.isArray(o) && (i = o), i) {
    const u = s === void 0 && t ? {} : s, c = me(n);
    i = i.map((d) => k(d, r, []));
    const l = Yr(e, u, i, r, c);
    if (t)
      return i.map((d) => T(f, d));
    n = T(f, i[l]);
  }
  return [n];
}
function Ot(e, n, r, t, s, i) {
  const { dependencies: a, ...o } = n;
  return yy(e, o, r, t, i).flatMap((u) => At(e, a, u, r, t, s, i));
}
function At(e, n, r, t, s, i, a) {
  let o = [r];
  for (const f in n) {
    if (!s && m(a, [f]) === void 0 || r.properties && !(f in r.properties))
      continue;
    const [u, c] = sn(f, n);
    return Array.isArray(c) ? o[0] = gy(r, c) : v(c) && (o = hy(e, r, t, f, c, s, i, a)), o.flatMap((l) => At(e, u, l, t, s, i, a));
  }
  return o;
}
function gy(e, n) {
  if (!n)
    return e;
  const r = Array.isArray(e.required) ? Array.from(/* @__PURE__ */ new Set([...e.required, ...n])) : n;
  return { ...e, required: r };
}
function hy(e, n, r, t, s, i, a, o) {
  return S(e, s, r, o, i, a).flatMap((u) => {
    const { oneOf: c, ...l } = u;
    if (n = T(n, l), c === void 0)
      return n;
    const d = c.map((y) => typeof y == "boolean" || !(R in y) ? [y] : _t(e, y, r, i, a, o));
    return mt(d).flatMap((y) => $y(e, n, r, t, y, i, a, o));
  });
}
function $y(e, n, r, t, s, i, a, o) {
  const f = s.filter((u) => {
    if (typeof u == "boolean" || !u || !u.properties)
      return !1;
    const { [t]: c } = u.properties;
    if (c) {
      const l = {
        type: "object",
        properties: {
          [t]: c
        }
      };
      return e.isValid(l, o, r) || i;
    }
    return !1;
  });
  return !i && f.length !== 1 ? (console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"), [n]) : f.flatMap((u) => {
    const c = u, [l] = sn(t, c.properties), d = { ...c, properties: l };
    return S(e, d, r, o, i, a).map((y) => T(n, y));
  });
}
const vy = {
  type: "object",
  $id: ei,
  properties: {
    __not_really_there__: {
      type: "number"
    }
  }
};
function je(e, n, r, t = {}) {
  let s = 0;
  return r && (wt(r.properties) ? s += _f(r.properties, (i, a, o) => {
    const f = m(t, o);
    if (typeof a == "boolean")
      return i;
    if (Z(a, R)) {
      const u = oe(e, a, n, f);
      return i + je(e, n, u, f || {});
    }
    if ((Z(a, B) || Z(a, ye)) && f) {
      const u = Z(a, B) ? B : ye, c = me(a);
      return i + Ve(e, n, f, m(a, u), -1, c);
    }
    if (a.type === "object")
      return i + je(e, n, a, f || {});
    if (a.type === Q(f)) {
      let u = i + 1;
      return a.default ? u += f === a.default ? 1 : -1 : a.const && (u += f === a.const ? 1 : -1), u;
    }
    return i;
  }, 0) : on(r.type) && r.type === Q(t) && (s += 1)), s;
}
function Ve(e, n, r, t, s = -1, i) {
  const a = t.map((l) => k(l, n, [])), o = Gr(r, t, i);
  if (Fr(o))
    return o;
  const f = a.reduce((l, d, p) => (Yr(e, r, [vy, d], n, i) === 1 && l.push(p), l), []);
  if (f.length === 1)
    return f[0];
  f.length || Dr(a.length, (l) => f.push(l));
  const u = /* @__PURE__ */ new Set(), { bestIndex: c } = f.reduce((l, d) => {
    const { bestScore: p } = l, y = a[d], h = je(e, n, y, r);
    return u.add(h), h > p ? { bestIndex: d, bestScore: h } : l;
  }, { bestIndex: s, bestScore: 0 });
  return u.size === 1 && s >= 0 ? s : c;
}
function my(e) {
  return Array.isArray(e.items) && e.items.length > 0 && e.items.every((n) => v(n));
}
function _e(e, n, r = !1) {
  if (Array.isArray(n)) {
    const t = Array.isArray(e) ? e : [], s = n.map((i, a) => t[a] ? _e(t[a], i, r) : i);
    return r && s.length < t.length && s.push(...t.slice(s.length)), s;
  }
  if (v(n)) {
    const t = Object.assign({}, e);
    return Object.keys(n).reduce((s, i) => (s[i] = _e(e ? m(e, i) : {}, m(n, i), r), s), t);
  }
  return n;
}
function bt(e, n, r = !1) {
  return Object.keys(n).reduce((t, s) => {
    const i = e ? e[s] : {}, a = n[s];
    if (e && s in e && v(a))
      t[s] = bt(i, a, r);
    else if (r && Array.isArray(i) && Array.isArray(a)) {
      let o = a;
      r === "preventDuplicates" && (o = a.reduce((f, u) => (i.includes(u) || f.push(u), f), [])), t[s] = i.concat(o);
    } else
      t[s] = a;
    return t;
  }, Object.assign({}, e));
}
function _y(e) {
  return Array.isArray(e.enum) && e.enum.length === 1 || Xt in e;
}
function Oy(e, n, r = {}) {
  const t = oe(e, n, r, void 0), s = t.oneOf || t.anyOf;
  return Array.isArray(t.enum) ? !0 : Array.isArray(s) ? s.every((i) => typeof i != "boolean" && _y(i)) : !1;
}
function Ay(e, n, r) {
  return !n.uniqueItems || !n.items || typeof n.items == "boolean" ? !1 : Oy(e, n.items, r);
}
var Y;
(function(e) {
  e[e.Ignore = 0] = "Ignore", e[e.Invert = 1] = "Invert", e[e.Fallback = 2] = "Fallback";
})(Y || (Y = {}));
function Ke(e, n = Y.Ignore, r = -1) {
  if (r >= 0) {
    if (Array.isArray(e.items) && r < e.items.length) {
      const t = e.items[r];
      if (typeof t != "boolean")
        return t;
    }
  } else if (e.items && !Array.isArray(e.items) && typeof e.items != "boolean")
    return e.items;
  return n !== Y.Ignore && v(e.additionalItems) ? e.additionalItems : {};
}
function tr(e, n, r, t, s, i = [], a = {}) {
  const { emptyObjectFields: o = "populateAllDefaults" } = a;
  if (t)
    e[n] = r;
  else if (o !== "skipDefaults")
    if (v(r)) {
      const f = s === void 0 ? i.includes(n) : s;
      o === "skipEmptyDefaults" ? ge(r) || (e[n] = r) : (!ge(r) || i.includes(n)) && (f || o !== "populateRequiredDefaults") && (e[n] = r);
    } else
      // Store computedDefault if it's a defined primitive (e.g., true) and satisfies certain conditions
      // Condition 1: computedDefault is not undefined
      // Condition 2: If emptyObjectFields is 'populateAllDefaults' or 'skipEmptyDefaults) or if the key is a required field
      r !== void 0 && (o === "populateAllDefaults" || o === "skipEmptyDefaults" || i.includes(n)) && (e[n] = r);
}
function N(e, n, r = {}) {
  const { parentDefaults: t, rawFormData: s, rootSchema: i = {}, includeUndefinedValues: a = !1, _recurseList: o = [], experimental_defaultFormStateBehavior: f = void 0, required: u } = r, c = v(s) ? s : {}, l = v(n) ? n : {};
  let d = t, p = null, y = o;
  if (v(d) && v(l.default))
    d = bt(d, l.default);
  else if (Zt in l)
    d = l.default;
  else if (R in l) {
    const g = l[R];
    o.includes(g) || (y = o.concat(g), p = Nr(g, i));
  } else if (vr in l) {
    const g = {
      ...c,
      ...ir(e, l, r, d)
    };
    p = Ot(e, l, i, !1, [], g)[0];
  } else if (my(l))
    d = l.items.map((g, _) => N(e, g, {
      rootSchema: i,
      includeUndefinedValues: a,
      _recurseList: o,
      experimental_defaultFormStateBehavior: f,
      parentDefaults: Array.isArray(t) ? t[_] : void 0,
      rawFormData: c,
      required: u
    }));
  else if (B in l) {
    const { oneOf: g, ..._ } = l;
    if (g.length === 0)
      return;
    const b = me(l);
    p = g[Ve(e, i, ge(c) ? void 0 : c, g, 0, b)], p = T(_, p);
  } else if (ye in l) {
    const { anyOf: g, ..._ } = l;
    if (g.length === 0)
      return;
    const b = me(l);
    p = g[Ve(e, i, ge(c) ? void 0 : c, g, 0, b)], p = T(_, p);
  }
  if (p)
    return N(e, p, {
      rootSchema: i,
      includeUndefinedValues: a,
      _recurseList: y,
      experimental_defaultFormStateBehavior: f,
      parentDefaults: d,
      rawFormData: c,
      required: u
    });
  d === void 0 && (d = l.default);
  const h = ir(e, l, r, d);
  return h ?? d;
}
function by(e, n, { rawFormData: r, rootSchema: t = {}, includeUndefinedValues: s = !1, _recurseList: i = [], experimental_defaultFormStateBehavior: a = void 0, required: o } = {}, f) {
  {
    const u = v(r) ? r : {}, c = n, l = (a == null ? void 0 : a.allOf) === "populateDefaults" && ke in c ? oe(e, c, t, u) : c, d = Object.keys(l.properties || {}).reduce((p, y) => {
      var h;
      const g = N(e, m(l, [C, y]), {
        rootSchema: t,
        _recurseList: i,
        experimental_defaultFormStateBehavior: a,
        includeUndefinedValues: s === !0,
        parentDefaults: m(f, [y]),
        rawFormData: m(u, [y]),
        required: (h = l.required) === null || h === void 0 ? void 0 : h.includes(y)
      });
      return tr(p, y, g, s, o, l.required, a), p;
    }, {});
    if (l.additionalProperties) {
      const p = v(l.additionalProperties) ? l.additionalProperties : {}, y = /* @__PURE__ */ new Set();
      v(f) && Object.keys(f).filter((g) => !l.properties || !l.properties[g]).forEach((g) => y.add(g));
      const h = [];
      Object.keys(u).filter((g) => !l.properties || !l.properties[g]).forEach((g) => {
        y.add(g), h.push(g);
      }), y.forEach((g) => {
        var _;
        const b = N(e, p, {
          rootSchema: t,
          _recurseList: i,
          experimental_defaultFormStateBehavior: a,
          includeUndefinedValues: s === !0,
          parentDefaults: m(f, [g]),
          rawFormData: m(u, [g]),
          required: (_ = l.required) === null || _ === void 0 ? void 0 : _.includes(g)
        });
        tr(d, g, b, s, o, h);
      });
    }
    return d;
  }
}
function Iy(e, n, { rawFormData: r, rootSchema: t = {}, _recurseList: s = [], experimental_defaultFormStateBehavior: i = void 0, required: a } = {}, o) {
  var f, u, c, l;
  const d = n, p = ((f = i == null ? void 0 : i.arrayMinItems) === null || f === void 0 ? void 0 : f.populate) === "never", y = ((u = i == null ? void 0 : i.arrayMinItems) === null || u === void 0 ? void 0 : u.populate) === "requiredOnly", h = (i == null ? void 0 : i.emptyObjectFields) === "skipEmptyDefaults", g = (l = (c = i == null ? void 0 : i.arrayMinItems) === null || c === void 0 ? void 0 : c.computeSkipPopulate) !== null && l !== void 0 ? l : () => !1, _ = h ? void 0 : [];
  if (Array.isArray(o) && (o = o.map((w, z) => {
    const Re = Ke(d, Y.Fallback, z);
    return N(e, Re, {
      rootSchema: t,
      _recurseList: s,
      experimental_defaultFormStateBehavior: i,
      parentDefaults: w,
      required: a
    });
  })), Array.isArray(r)) {
    const w = Ke(d);
    p ? o = r : o = r.map((z, Re) => N(e, w, {
      rootSchema: t,
      _recurseList: s,
      experimental_defaultFormStateBehavior: i,
      rawFormData: z,
      parentDefaults: m(o, [Re]),
      required: a
    }));
  }
  if (p)
    return o ?? _;
  if (y && !a)
    return o || void 0;
  const b = Array.isArray(o) ? o.length : 0;
  if (!d.minItems || Ay(e, d, t) || g(e, d, t) || d.minItems <= b)
    return o || _;
  const H = o || [], U = Ke(d, Y.Invert), P = U.default, J = new Array(d.minItems - b).fill(N(e, U, {
    parentDefaults: P,
    rootSchema: t,
    _recurseList: s,
    experimental_defaultFormStateBehavior: i,
    required: a
  }));
  return H.concat(J);
}
function ir(e, n, r = {}, t) {
  switch (We(n)) {
    case "object":
      return by(e, n, r, t);
    case "array":
      return Iy(e, n, r, t);
  }
}
function zy(e, n, r, t, s = !1, i) {
  if (!v(n))
    throw new Error("Invalid schema: " + n);
  const a = oe(e, n, t, r), o = N(e, a, {
    rootSchema: t,
    includeUndefinedValues: s,
    experimental_defaultFormStateBehavior: i,
    rawFormData: r
  });
  if (r == null || typeof r == "number" && isNaN(r))
    return o;
  const { mergeExtraDefaults: f } = (i == null ? void 0 : i.arrayMinItems) || {};
  return v(r) || Array.isArray(r) ? _e(o, r, f) : r;
}
function sr(e, n, r = {}) {
  const { templates: t } = n;
  return e === "ButtonTemplates" ? t[e] : (
    // Evaluating uiOptions[name] results in TS2590: Expression produces a union type that is too complex to represent
    // To avoid that, we cast uiOptions to `any` before accessing the name field
    r[e] || t[e]
  );
}
function ae(e, n) {
  return `${on(e) ? e : e[Bt]}__${n}`;
}
function It(e) {
  return ae(e, "description");
}
function Py(e) {
  return ae(e, "error");
}
function wy(e) {
  return ae(e, "examples");
}
function Ey(e) {
  return ae(e, "help");
}
function My(e) {
  return ae(e, "title");
}
function Xy(e, n = !1) {
  const r = n ? ` ${wy(e)}` : "";
  return `${Py(e)} ${It(e)} ${Ey(e)}${r}`;
}
function Zy(e, n) {
  return `${e}-${n}`;
}
var or;
(function(e) {
  e.ArrayItemTitle = "Item", e.MissingItems = "Missing items definition", e.YesLabel = "Yes", e.NoLabel = "No", e.CloseLabel = "Close", e.ErrorsLabel = "Errors", e.NewStringDefault = "New Value", e.AddButton = "Add", e.AddItemButton = "Add Item", e.CopyButton = "Copy", e.MoveDownButton = "Move down", e.MoveUpButton = "Move up", e.RemoveButton = "Remove", e.NowLabel = "Now", e.ClearLabel = "Clear", e.AriaDateLabel = "Select a date", e.PreviewLabel = "Preview", e.DecrementAriaLabel = "Decrease value by 1", e.IncrementAriaLabel = "Increase value by 1", e.UnknownFieldType = "Unknown field type %1", e.OptionPrefix = "Option %1", e.TitleOptionPrefix = "%1 option %2", e.KeyLabel = "%1 Key", e.InvalidObjectField = 'Invalid "%1" object field configuration: _%2_.', e.UnsupportedField = "Unsupported field schema.", e.UnsupportedFieldWithId = "Unsupported field schema for field `%1`.", e.UnsupportedFieldWithReason = "Unsupported field schema: _%1_.", e.UnsupportedFieldWithIdAndReason = "Unsupported field schema for field `%1`: _%2_.", e.FilesInfo = "**%1** (%2, %3 bytes)";
})(or || (or = {}));
const Sy = {
  paddingBottom: "8px"
}, Cy = (e) => {
  const {
    title: n,
    description: r,
    properties: t,
    schema: s,
    uiSchema: i,
    formData: a,
    idSchema: o,
    onAddClick: f,
    disabled: u,
    readonly: c,
    registry: l
  } = e, d = xe(i), p = sr("TitleFieldTemplate", l, d), y = sr("DescriptionFieldTemplate", l, d), {
    ButtonTemplates: {
      AddButton: h
    }
  } = l.templates, g = {
    xs: 24,
    // Extra small devices
    sm: 24,
    // Small devices
    md: 12,
    // Medium devices
    lg: 12,
    // Large devices
    xl: 8
    // Extra large devices
  }, {
    rowGutter: _ = 4,
    colSpan: b = g
  } = (i == null ? void 0 : i["ui:props"]) || {}, H = (U) => {
    const {
      type: P
    } = U.content.props.schema, w = xe(U.content.props.uiSchema).widget === "textarea" || P === "object" || P === "array" ? 24 : b;
    return typeof w == "object" ? w : {
      span: w
    };
  };
  return /* @__PURE__ */ M(Pt, {
    children: (U) => /* @__PURE__ */ In("fieldset", {
      id: o.$id,
      className: "form-section",
      children: [/* @__PURE__ */ In(Pn, {
        gutter: _,
        children: [s.type === "object" && n && /* @__PURE__ */ M("legend", {
          children: /* @__PURE__ */ M(p, {
            id: My(o),
            title: n,
            required: e.required,
            schema: s,
            uiSchema: i,
            registry: l
          })
        }), r && /* @__PURE__ */ M(fe, {
          span: 24,
          style: Sy,
          children: /* @__PURE__ */ M(y, {
            id: It(o),
            description: r,
            schema: s,
            uiSchema: i,
            registry: l
          })
        }), i != null && i["ui:grid"] && Array.isArray(i["ui:grid"]) ? i["ui:grid"].map((P) => Object.keys(P).map((J) => {
          const w = t.find((z) => z.name === J);
          return w ? (
            // Pass responsive colSpan props using the calculated values
            /* @__PURE__ */ M(fe, {
              ...P[J],
              children: w.content
            }, w.name)
          ) : null;
        })) : t.map((P) => /* @__PURE__ */ M(fe, {
          ...H(P),
          children: P.content
        }, P.name))]
      }), ii(s, i, a) && /* @__PURE__ */ M(Pn, {
        justify: "end",
        style: {
          marginTop: "24px"
        },
        children: /* @__PURE__ */ M(fe, {
          children: /* @__PURE__ */ M(h, {
            className: "object-property-expand",
            onClick: f(s),
            disabled: u || c,
            registry: l
          })
        })
      })]
    })
  });
}, By = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Cy
}, Symbol.toStringTag, { value: "Module" }));
export {
  My as $,
  ke as A,
  j as B,
  Xt as C,
  vr as D,
  xy as E,
  Wy as F,
  Pe as G,
  re as H,
  kt as I,
  qa as J,
  uo as K,
  my as L,
  sr as M,
  Dy as N,
  B as O,
  C as P,
  Io as Q,
  R,
  Gy as S,
  or as T,
  ri as U,
  T as V,
  Ss as W,
  Jt as X,
  ti as Y,
  It as Z,
  ge as _,
  Hy as a,
  wy as a0,
  Xy as a1,
  Py as a2,
  Ey as a3,
  ii as a4,
  Zy as a5,
  Vy as a6,
  Jy as a7,
  on as a8,
  Fr as a9,
  Cy as aa,
  By as ab,
  We as b,
  Ay as c,
  jy as d,
  m as e,
  Bt as f,
  xe as g,
  Z as h,
  v as i,
  ye as j,
  me as k,
  Ve as l,
  bt as m,
  zt as n,
  Yy as o,
  zy as p,
  Yr as q,
  oe as r,
  Jf as s,
  Uf as t,
  Oy as u,
  Wf as v,
  Ky as w,
  F as x,
  Si as y,
  Ki as z
};
